diff --git a/VIPSWeb/static/css/3rdparty/ol.css b/VIPSWeb/static/css/3rdparty/ol.css
index 17197261d9dd6514a35bf2987dcdb4af2aa6bb04..88c701801ac5bf096c8a448f4000d02dfeb40a8d 100644
--- a/VIPSWeb/static/css/3rdparty/ol.css
+++ b/VIPSWeb/static/css/3rdparty/ol.css
@@ -1 +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}.ol-overlay-container{will-change:left,right,top,bottom}.ol-unsupported{display:none}.ol-unselectable,.ol-viewport{-webkit-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:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.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}@media print{.ol-control{display:none}}.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;font-size:.7rem;line-height:1.375em;color:#000;text-shadow:0 0 2px #fff}.ol-attribution li{display:inline;list-style:none;line-height:inherit}.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-attribution.ol-collapsed ul{display:none}.ol-attribution.ol-logo-only ul{display:block}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0;height:1.1em;line-height:1em}.ol-attribution.ol-logo-only{background:0 0;bottom:.4em;height:1.1em;line-height:1em}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-logo-only button,.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}
\ No newline at end of file
+.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid #b3c5db;background-color:rgba(255,255,255,.4)}.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-singlebar-even{background-color:#000}.ol-scale-singlebar-odd{background-color:#fff}.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{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.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-weight:700;text-decoration:none;font-size:inherit;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);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:rgba(0,60,136,.7);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:#000;text-shadow:0 0 2px #fff;font-size:12px}.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{flex-shrink:0}.ol-attribution.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:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:2px;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
diff --git a/VIPSWeb/static/css/3rdparty/ol.css.map b/VIPSWeb/static/css/3rdparty/ol.css.map
new file mode 100644
index 0000000000000000000000000000000000000000..e430caf6bdc2d789813d1aa9b1feb6b143d871f0
--- /dev/null
+++ b/VIPSWeb/static/css/3rdparty/ol.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["src/ol/ol.css"],"names":[],"mappings":"AAAA,QACE,WAAY,WACZ,cAAe,IACf,OAAQ,MAAM,MAAM,QACpB,iBAAkB,qBAGpB,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,yBACE,iBAAkB,KAEpB,wBACE,iBAAkB,KAEpB,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,OAAQ,KAC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,IAIzB,gBACE,WAAY,MACZ,OAAQ,KACR,MAAO,KACP,UAAW,mBACX,QAAS,KACT,UAAW,YACX,YAAa,OAEf,kBACE,MAAO,kBACP,gBAAiB,KAEnB,mBACE,OAAQ,EACR,QAAS,IAAI,KACb,MAAO,KACP,YAAa,EAAE,EAAE,IAAI,KACrB,UAAW,KAEb,mBACE,QAAS,OACT,WAAY,KAEd,0CACE,QAAS,IAEX,oBACE,WAAY,IACZ,UAAW,QACX,eAAgB,OAElB,uBACE,YAAa,EAEf,gCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,iCACE,OAAQ,EACR,MAAO,EACP,cAAe,IAAI,EAAE,EAEvB,qCACE,WAAY,MACZ,WAAY,MAEd,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,MAEX,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
diff --git a/VIPSWeb/static/js/3rdparty/ol-debug.js b/VIPSWeb/static/js/3rdparty/ol-debug.js
deleted file mode 100644
index e7c7f9eaceadf89b22bcefbfaac1a55d7285c925..0000000000000000000000000000000000000000
--- a/VIPSWeb/static/js/3rdparty/ol-debug.js
+++ /dev/null
@@ -1,92598 +0,0 @@
-// OpenLayers. See https://openlayers.org/
-// License: https://raw.githubusercontent.com/openlayers/openlayers/master/LICENSE.md
-// Version: v4.2.0
-;(function (root, factory) {
-  if (typeof exports === "object") {
-    module.exports = factory();
-  } else if (typeof define === "function" && define.amd) {
-    define([], factory);
-  } else {
-    root.ol = factory();
-  }
-}(this, function () {
-  var OPENLAYERS = {};
-  var goog = this.goog = {};
-this.CLOSURE_NO_DEPS = true;
-// Copyright 2006 The Closure Library Authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS-IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @fileoverview Bootstrap for the Google JS Library (Closure).
- *
- * In uncompiled mode base.js will write out Closure's deps file, unless the
- * global <code>CLOSURE_NO_DEPS</code> is set to true.  This allows projects to
- * include their own deps file(s) from different locations.
- *
- * Avoid including base.js more than once. This is strictly discouraged and not
- * supported. goog.require(...) won't work properly in that case.
- *
- * @author arv@google.com (Erik Arvidsson)
- *
- * @provideGoog
- */
-
-
-/**
- * @define {boolean} Overridden to true by the compiler when
- *     --process_closure_primitives is specified.
- */
-var COMPILED = false;
-
-
-/**
- * Base namespace for the Closure library.  Checks to see goog is already
- * defined in the current scope before assigning to prevent clobbering if
- * base.js is loaded more than once.
- *
- * @const
- */
-var goog = goog || {};
-
-
-/**
- * Reference to the global context.  In most cases this will be 'window'.
- */
-goog.global = this;
-
-
-/**
- * A hook for overriding the define values in uncompiled mode.
- *
- * In uncompiled mode, {@code CLOSURE_UNCOMPILED_DEFINES} may be defined before
- * loading base.js.  If a key is defined in {@code CLOSURE_UNCOMPILED_DEFINES},
- * {@code goog.define} will use the value instead of the default value.  This
- * allows flags to be overwritten without compilation (this is normally
- * accomplished with the compiler's "define" flag).
- *
- * Example:
- * <pre>
- *   var CLOSURE_UNCOMPILED_DEFINES = {'goog.DEBUG': false};
- * </pre>
- *
- * @type {Object<string, (string|number|boolean)>|undefined}
- */
-goog.global.CLOSURE_UNCOMPILED_DEFINES;
-
-
-/**
- * A hook for overriding the define values in uncompiled or compiled mode,
- * like CLOSURE_UNCOMPILED_DEFINES but effective in compiled code.  In
- * uncompiled code CLOSURE_UNCOMPILED_DEFINES takes precedence.
- *
- * Also unlike CLOSURE_UNCOMPILED_DEFINES the values must be number, boolean or
- * string literals or the compiler will emit an error.
- *
- * While any @define value may be set, only those set with goog.define will be
- * effective for uncompiled code.
- *
- * Example:
- * <pre>
- *   var CLOSURE_DEFINES = {'goog.DEBUG': false} ;
- * </pre>
- *
- * @type {Object<string, (string|number|boolean)>|undefined}
- */
-goog.global.CLOSURE_DEFINES;
-
-
-/**
- * Returns true if the specified value is not undefined.
- * WARNING: Do not use this to test if an object has a property. Use the in
- * operator instead.
- *
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is defined.
- */
-goog.isDef = function(val) {
-  // void 0 always evaluates to undefined and hence we do not need to depend on
-  // the definition of the global variable named 'undefined'.
-  return val !== void 0;
-};
-
-
-/**
- * Builds an object structure for the provided namespace path, ensuring that
- * names that already exist are not overwritten. For example:
- * "a.b.c" -> a = {};a.b={};a.b.c={};
- * Used by goog.provide and goog.exportSymbol.
- * @param {string} name name of the object that this file defines.
- * @param {*=} opt_object the object to expose at the end of the path.
- * @param {Object=} opt_objectToExportTo The object to add the path to; default
- *     is |goog.global|.
- * @private
- */
-goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) {
-  var parts = name.split('.');
-  var cur = opt_objectToExportTo || goog.global;
-
-  // Internet Explorer exhibits strange behavior when throwing errors from
-  // methods externed in this manner.  See the testExportSymbolExceptions in
-  // base_test.html for an example.
-  if (!(parts[0] in cur) && cur.execScript) {
-    cur.execScript('var ' + parts[0]);
-  }
-
-  // Certain browsers cannot parse code in the form for((a in b); c;);
-  // This pattern is produced by the JSCompiler when it collapses the
-  // statement above into the conditional loop below. To prevent this from
-  // happening, use a for-loop and reserve the init logic as below.
-
-  // Parentheses added to eliminate strict JS warning in Firefox.
-  for (var part; parts.length && (part = parts.shift());) {
-    if (!parts.length && goog.isDef(opt_object)) {
-      // last part and we have an object; use it
-      cur[part] = opt_object;
-    } else if (cur[part] && cur[part] !== Object.prototype[part]) {
-      cur = cur[part];
-    } else {
-      cur = cur[part] = {};
-    }
-  }
-};
-
-
-/**
- * Defines a named value. In uncompiled mode, the value is retrieved from
- * CLOSURE_DEFINES or CLOSURE_UNCOMPILED_DEFINES if the object is defined and
- * has the property specified, and otherwise used the defined defaultValue.
- * When compiled the default can be overridden using the compiler
- * options or the value set in the CLOSURE_DEFINES object.
- *
- * @param {string} name The distinguished name to provide.
- * @param {string|number|boolean} defaultValue
- */
-goog.define = function(name, defaultValue) {
-  var value = defaultValue;
-  if (!COMPILED) {
-    if (goog.global.CLOSURE_UNCOMPILED_DEFINES &&
-        Object.prototype.hasOwnProperty.call(
-            goog.global.CLOSURE_UNCOMPILED_DEFINES, name)) {
-      value = goog.global.CLOSURE_UNCOMPILED_DEFINES[name];
-    } else if (
-        goog.global.CLOSURE_DEFINES &&
-        Object.prototype.hasOwnProperty.call(
-            goog.global.CLOSURE_DEFINES, name)) {
-      value = goog.global.CLOSURE_DEFINES[name];
-    }
-  }
-  goog.exportPath_(name, value);
-};
-
-
-/**
- * @define {boolean} DEBUG is provided as a convenience so that debugging code
- * that should not be included in a production js_binary can be easily stripped
- * by specifying --define goog.DEBUG=false to the JSCompiler. For example, most
- * toString() methods should be declared inside an "if (goog.DEBUG)" conditional
- * because they are generally used for debugging purposes and it is difficult
- * for the JSCompiler to statically determine whether they are used.
- */
-goog.define('goog.DEBUG', true);
-
-
-/**
- * @define {string} LOCALE defines the locale being used for compilation. It is
- * used to select locale specific data to be compiled in js binary. BUILD rule
- * can specify this value by "--define goog.LOCALE=<locale_name>" as JSCompiler
- * option.
- *
- * Take into account that the locale code format is important. You should use
- * the canonical Unicode format with hyphen as a delimiter. Language must be
- * lowercase, Language Script - Capitalized, Region - UPPERCASE.
- * There are few examples: pt-BR, en, en-US, sr-Latin-BO, zh-Hans-CN.
- *
- * See more info about locale codes here:
- * http://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers
- *
- * For language codes you should use values defined by ISO 693-1. See it here
- * http://www.w3.org/WAI/ER/IG/ert/iso639.htm. There is only one exception from
- * this rule: the Hebrew language. For legacy reasons the old code (iw) should
- * be used instead of the new code (he), see http://wiki/Main/IIISynonyms.
- */
-goog.define('goog.LOCALE', 'en');  // default to en
-
-
-/**
- * @define {boolean} Whether this code is running on trusted sites.
- *
- * On untrusted sites, several native functions can be defined or overridden by
- * external libraries like Prototype, Datejs, and JQuery and setting this flag
- * to false forces closure to use its own implementations when possible.
- *
- * If your JavaScript can be loaded by a third party site and you are wary about
- * relying on non-standard implementations, specify
- * "--define goog.TRUSTED_SITE=false" to the JSCompiler.
- */
-goog.define('goog.TRUSTED_SITE', true);
-
-
-/**
- * @define {boolean} Whether a project is expected to be running in strict mode.
- *
- * This define can be used to trigger alternate implementations compatible with
- * running in EcmaScript Strict mode or warn about unavailable functionality.
- * @see https://goo.gl/PudQ4y
- *
- */
-goog.define('goog.STRICT_MODE_COMPATIBLE', false);
-
-
-/**
- * @define {boolean} Whether code that calls {@link goog.setTestOnly} should
- *     be disallowed in the compilation unit.
- */
-goog.define('goog.DISALLOW_TEST_ONLY_CODE', COMPILED && !goog.DEBUG);
-
-
-/**
- * @define {boolean} Whether to use a Chrome app CSP-compliant method for
- *     loading scripts via goog.require. @see appendScriptSrcNode_.
- */
-goog.define('goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING', false);
-
-
-/**
- * Defines a namespace in Closure.
- *
- * A namespace may only be defined once in a codebase. It may be defined using
- * goog.provide() or goog.module().
- *
- * The presence of one or more goog.provide() calls in a file indicates
- * that the file defines the given objects/namespaces.
- * Provided symbols must not be null or undefined.
- *
- * In addition, goog.provide() creates the object stubs for a namespace
- * (for example, goog.provide("goog.foo.bar") will create the object
- * goog.foo.bar if it does not already exist).
- *
- * Build tools also scan for provide/require/module statements
- * to discern dependencies, build dependency files (see deps.js), etc.
- *
- * @see goog.require
- * @see goog.module
- * @param {string} name Namespace provided by this file in the form
- *     "goog.package.part".
- */
-goog.provide = function(name) {
-  if (goog.isInModuleLoader_()) {
-    throw Error('goog.provide can not be used within a goog.module.');
-  }
-  if (!COMPILED) {
-    // Ensure that the same namespace isn't provided twice.
-    // A goog.module/goog.provide maps a goog.require to a specific file
-    if (goog.isProvided_(name)) {
-      throw Error('Namespace "' + name + '" already declared.');
-    }
-  }
-
-  goog.constructNamespace_(name);
-};
-
-
-/**
- * @param {string} name Namespace provided by this file in the form
- *     "goog.package.part".
- * @param {Object=} opt_obj The object to embed in the namespace.
- * @private
- */
-goog.constructNamespace_ = function(name, opt_obj) {
-  if (!COMPILED) {
-    delete goog.implicitNamespaces_[name];
-
-    var namespace = name;
-    while ((namespace = namespace.substring(0, namespace.lastIndexOf('.')))) {
-      if (goog.getObjectByName(namespace)) {
-        break;
-      }
-      goog.implicitNamespaces_[namespace] = true;
-    }
-  }
-
-  goog.exportPath_(name, opt_obj);
-};
-
-
-/**
- * Module identifier validation regexp.
- * Note: This is a conservative check, it is very possible to be more lenient,
- *   the primary exclusion here is "/" and "\" and a leading ".", these
- *   restrictions are intended to leave the door open for using goog.require
- *   with relative file paths rather than module identifiers.
- * @private
- */
-goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
-
-
-/**
- * Defines a module in Closure.
- *
- * Marks that this file must be loaded as a module and claims the namespace.
- *
- * A namespace may only be defined once in a codebase. It may be defined using
- * goog.provide() or goog.module().
- *
- * goog.module() has three requirements:
- * - goog.module may not be used in the same file as goog.provide.
- * - goog.module must be the first statement in the file.
- * - only one goog.module is allowed per file.
- *
- * When a goog.module annotated file is loaded, it is enclosed in
- * a strict function closure. This means that:
- * - any variables declared in a goog.module file are private to the file
- * (not global), though the compiler is expected to inline the module.
- * - The code must obey all the rules of "strict" JavaScript.
- * - the file will be marked as "use strict"
- *
- * NOTE: unlike goog.provide, goog.module does not declare any symbols by
- * itself. If declared symbols are desired, use
- * goog.module.declareLegacyNamespace().
- *
- *
- * See the public goog.module proposal: http://goo.gl/Va1hin
- *
- * @param {string} name Namespace provided by this file in the form
- *     "goog.package.part", is expected but not required.
- * @return {void}
- */
-goog.module = function(name) {
-  if (!goog.isString(name) || !name ||
-      name.search(goog.VALID_MODULE_RE_) == -1) {
-    throw Error('Invalid module identifier');
-  }
-  if (!goog.isInModuleLoader_()) {
-    throw Error(
-        'Module ' + name + ' has been loaded incorrectly. Note, ' +
-        'modules cannot be loaded as normal scripts. They require some kind of ' +
-        'pre-processing step. You\'re likely trying to load a module via a ' +
-        'script tag or as a part of a concatenated bundle without rewriting the ' +
-        'module. For more info see: ' +
-        'https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.');
-  }
-  if (goog.moduleLoaderState_.moduleName) {
-    throw Error('goog.module may only be called once per module.');
-  }
-
-  // Store the module name for the loader.
-  goog.moduleLoaderState_.moduleName = name;
-  if (!COMPILED) {
-    // Ensure that the same namespace isn't provided twice.
-    // A goog.module/goog.provide maps a goog.require to a specific file
-    if (goog.isProvided_(name)) {
-      throw Error('Namespace "' + name + '" already declared.');
-    }
-    delete goog.implicitNamespaces_[name];
-  }
-};
-
-
-/**
- * @param {string} name The module identifier.
- * @return {?} The module exports for an already loaded module or null.
- *
- * Note: This is not an alternative to goog.require, it does not
- * indicate a hard dependency, instead it is used to indicate
- * an optional dependency or to access the exports of a module
- * that has already been loaded.
- * @suppress {missingProvide}
- */
-goog.module.get = function(name) {
-  return goog.module.getInternal_(name);
-};
-
-
-/**
- * @param {string} name The module identifier.
- * @return {?} The module exports for an already loaded module or null.
- * @private
- */
-goog.module.getInternal_ = function(name) {
-  if (!COMPILED) {
-    if (name in goog.loadedModules_) {
-      return goog.loadedModules_[name];
-    } else if (!goog.implicitNamespaces_[name]) {
-      var ns = goog.getObjectByName(name);
-      return ns != null ? ns : null;
-    }
-  }
-  return null;
-};
-
-
-/**
- * @private {?{moduleName: (string|undefined), declareLegacyNamespace:boolean}}
- */
-goog.moduleLoaderState_ = null;
-
-
-/**
- * @private
- * @return {boolean} Whether a goog.module is currently being initialized.
- */
-goog.isInModuleLoader_ = function() {
-  return goog.moduleLoaderState_ != null;
-};
-
-
-/**
- * Provide the module's exports as a globally accessible object under the
- * module's declared name.  This is intended to ease migration to goog.module
- * for files that have existing usages.
- * @suppress {missingProvide}
- */
-goog.module.declareLegacyNamespace = function() {
-  if (!COMPILED && !goog.isInModuleLoader_()) {
-    throw new Error(
-        'goog.module.declareLegacyNamespace must be called from ' +
-        'within a goog.module');
-  }
-  if (!COMPILED && !goog.moduleLoaderState_.moduleName) {
-    throw Error(
-        'goog.module must be called prior to ' +
-        'goog.module.declareLegacyNamespace.');
-  }
-  goog.moduleLoaderState_.declareLegacyNamespace = true;
-};
-
-
-/**
- * Marks that the current file should only be used for testing, and never for
- * live code in production.
- *
- * In the case of unit tests, the message may optionally be an exact namespace
- * for the test (e.g. 'goog.stringTest'). The linter will then ignore the extra
- * provide (if not explicitly defined in the code).
- *
- * @param {string=} opt_message Optional message to add to the error that's
- *     raised when used in production code.
- */
-goog.setTestOnly = function(opt_message) {
-  if (goog.DISALLOW_TEST_ONLY_CODE) {
-    opt_message = opt_message || '';
-    throw Error(
-        'Importing test-only code into non-debug environment' +
-        (opt_message ? ': ' + opt_message : '.'));
-  }
-};
-
-
-/**
- * Forward declares a symbol. This is an indication to the compiler that the
- * symbol may be used in the source yet is not required and may not be provided
- * in compilation.
- *
- * The most common usage of forward declaration is code that takes a type as a
- * function parameter but does not need to require it. By forward declaring
- * instead of requiring, no hard dependency is made, and (if not required
- * elsewhere) the namespace may never be required and thus, not be pulled
- * into the JavaScript binary. If it is required elsewhere, it will be type
- * checked as normal.
- *
- * Before using goog.forwardDeclare, please read the documentation at
- * https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation to
- * understand the options and tradeoffs when working with forward declarations.
- *
- * @param {string} name The namespace to forward declare in the form of
- *     "goog.package.part".
- */
-goog.forwardDeclare = function(name) {};
-
-
-/**
- * Forward declare type information. Used to assign types to goog.global
- * referenced object that would otherwise result in unknown type references
- * and thus block property disambiguation.
- */
-goog.forwardDeclare('Document');
-goog.forwardDeclare('HTMLScriptElement');
-goog.forwardDeclare('XMLHttpRequest');
-
-
-if (!COMPILED) {
-  /**
-   * Check if the given name has been goog.provided. This will return false for
-   * names that are available only as implicit namespaces.
-   * @param {string} name name of the object to look for.
-   * @return {boolean} Whether the name has been provided.
-   * @private
-   */
-  goog.isProvided_ = function(name) {
-    return (name in goog.loadedModules_) ||
-        (!goog.implicitNamespaces_[name] &&
-         goog.isDefAndNotNull(goog.getObjectByName(name)));
-  };
-
-  /**
-   * Namespaces implicitly defined by goog.provide. For example,
-   * goog.provide('goog.events.Event') implicitly declares that 'goog' and
-   * 'goog.events' must be namespaces.
-   *
-   * @type {!Object<string, (boolean|undefined)>}
-   * @private
-   */
-  goog.implicitNamespaces_ = {'goog.module': true};
-
-  // NOTE: We add goog.module as an implicit namespace as goog.module is defined
-  // here and because the existing module package has not been moved yet out of
-  // the goog.module namespace. This satisifies both the debug loader and
-  // ahead-of-time dependency management.
-}
-
-
-/**
- * Returns an object based on its fully qualified external name.  The object
- * is not found if null or undefined.  If you are using a compilation pass that
- * renames property names beware that using this function will not find renamed
- * properties.
- *
- * @param {string} name The fully qualified name.
- * @param {Object=} opt_obj The object within which to look; default is
- *     |goog.global|.
- * @return {?} The value (object or primitive) or, if not found, null.
- */
-goog.getObjectByName = function(name, opt_obj) {
-  var parts = name.split('.');
-  var cur = opt_obj || goog.global;
-  for (var part; part = parts.shift();) {
-    if (goog.isDefAndNotNull(cur[part])) {
-      cur = cur[part];
-    } else {
-      return null;
-    }
-  }
-  return cur;
-};
-
-
-/**
- * Globalizes a whole namespace, such as goog or goog.lang.
- *
- * @param {!Object} obj The namespace to globalize.
- * @param {Object=} opt_global The object to add the properties to.
- * @deprecated Properties may be explicitly exported to the global scope, but
- *     this should no longer be done in bulk.
- */
-goog.globalize = function(obj, opt_global) {
-  var global = opt_global || goog.global;
-  for (var x in obj) {
-    global[x] = obj[x];
-  }
-};
-
-
-/**
- * Adds a dependency from a file to the files it requires.
- * @param {string} relPath The path to the js file.
- * @param {!Array<string>} provides An array of strings with
- *     the names of the objects this file provides.
- * @param {!Array<string>} requires An array of strings with
- *     the names of the objects this file requires.
- * @param {boolean|!Object<string>=} opt_loadFlags Parameters indicating
- *     how the file must be loaded.  The boolean 'true' is equivalent
- *     to {'module': 'goog'} for backwards-compatibility.  Valid properties
- *     and values include {'module': 'goog'} and {'lang': 'es6'}.
- */
-goog.addDependency = function(relPath, provides, requires, opt_loadFlags) {
-  if (goog.DEPENDENCIES_ENABLED) {
-    var provide, require;
-    var path = relPath.replace(/\\/g, '/');
-    var deps = goog.dependencies_;
-    if (!opt_loadFlags || typeof opt_loadFlags === 'boolean') {
-      opt_loadFlags = opt_loadFlags ? {'module': 'goog'} : {};
-    }
-    for (var i = 0; provide = provides[i]; i++) {
-      deps.nameToPath[provide] = path;
-      deps.loadFlags[path] = opt_loadFlags;
-    }
-    for (var j = 0; require = requires[j]; j++) {
-      if (!(path in deps.requires)) {
-        deps.requires[path] = {};
-      }
-      deps.requires[path][require] = true;
-    }
-  }
-};
-
-
-
-
-// NOTE(nnaze): The debug DOM loader was included in base.js as an original way
-// to do "debug-mode" development.  The dependency system can sometimes be
-// confusing, as can the debug DOM loader's asynchronous nature.
-//
-// With the DOM loader, a call to goog.require() is not blocking -- the script
-// will not load until some point after the current script.  If a namespace is
-// needed at runtime, it needs to be defined in a previous script, or loaded via
-// require() with its registered dependencies.
-//
-// User-defined namespaces may need their own deps file. For a reference on
-// creating a deps file, see:
-// Externally: https://developers.google.com/closure/library/docs/depswriter
-//
-// Because of legacy clients, the DOM loader can't be easily removed from
-// base.js.  Work is being done to make it disableable or replaceable for
-// different environments (DOM-less JavaScript interpreters like Rhino or V8,
-// for example). See bootstrap/ for more information.
-
-
-/**
- * @define {boolean} Whether to enable the debug loader.
- *
- * If enabled, a call to goog.require() will attempt to load the namespace by
- * appending a script tag to the DOM (if the namespace has been registered).
- *
- * If disabled, goog.require() will simply assert that the namespace has been
- * provided (and depend on the fact that some outside tool correctly ordered
- * the script).
- */
-goog.define('goog.ENABLE_DEBUG_LOADER', true);
-
-
-/**
- * @param {string} msg
- * @private
- */
-goog.logToConsole_ = function(msg) {
-  if (goog.global.console) {
-    goog.global.console['error'](msg);
-  }
-};
-
-
-/**
- * Implements a system for the dynamic resolution of dependencies that works in
- * parallel with the BUILD system. Note that all calls to goog.require will be
- * stripped by the JSCompiler when the --process_closure_primitives option is
- * used.
- * @see goog.provide
- * @param {string} name Namespace to include (as was given in goog.provide()) in
- *     the form "goog.package.part".
- * @return {?} If called within a goog.module file, the associated namespace or
- *     module otherwise null.
- */
-goog.require = function(name) {
-  // If the object already exists we do not need do do anything.
-  if (!COMPILED) {
-    if (goog.ENABLE_DEBUG_LOADER && goog.IS_OLD_IE_) {
-      goog.maybeProcessDeferredDep_(name);
-    }
-
-    if (goog.isProvided_(name)) {
-      if (goog.isInModuleLoader_()) {
-        return goog.module.getInternal_(name);
-      }
-    } else if (goog.ENABLE_DEBUG_LOADER) {
-      var path = goog.getPathFromDeps_(name);
-      if (path) {
-        goog.writeScripts_(path);
-      } else {
-        var errorMessage = 'goog.require could not find: ' + name;
-        goog.logToConsole_(errorMessage);
-
-        throw Error(errorMessage);
-      }
-    }
-
-    return null;
-  }
-};
-
-
-/**
- * Path for included scripts.
- * @type {string}
- */
-goog.basePath = '';
-
-
-/**
- * A hook for overriding the base path.
- * @type {string|undefined}
- */
-goog.global.CLOSURE_BASE_PATH;
-
-
-/**
- * Whether to write out Closure's deps file. By default, the deps are written.
- * @type {boolean|undefined}
- */
-goog.global.CLOSURE_NO_DEPS;
-
-
-/**
- * A function to import a single script. This is meant to be overridden when
- * Closure is being run in non-HTML contexts, such as web workers. It's defined
- * in the global scope so that it can be set before base.js is loaded, which
- * allows deps.js to be imported properly.
- *
- * The function is passed the script source, which is a relative URI. It should
- * return true if the script was imported, false otherwise.
- * @type {(function(string): boolean)|undefined}
- */
-goog.global.CLOSURE_IMPORT_SCRIPT;
-
-
-/**
- * Null function used for default values of callbacks, etc.
- * @return {void} Nothing.
- */
-goog.nullFunction = function() {};
-
-
-/**
- * When defining a class Foo with an abstract method bar(), you can do:
- * Foo.prototype.bar = goog.abstractMethod
- *
- * Now if a subclass of Foo fails to override bar(), an error will be thrown
- * when bar() is invoked.
- *
- * Note: This does not take the name of the function to override as an argument
- * because that would make it more difficult to obfuscate our JavaScript code.
- *
- * @type {!Function}
- * @throws {Error} when invoked to indicate the method should be overridden.
- */
-goog.abstractMethod = function() {
-  throw Error('unimplemented abstract method');
-};
-
-
-/**
- * Adds a {@code getInstance} static method that always returns the same
- * instance object.
- * @param {!Function} ctor The constructor for the class to add the static
- *     method to.
- */
-goog.addSingletonGetter = function(ctor) {
-  // instance_ is immediately set to prevent issues with sealed constructors
-  // such as are encountered when a constructor is returned as the export object
-  // of a goog.module in unoptimized code.
-  ctor.instance_ = undefined;
-  ctor.getInstance = function() {
-    if (ctor.instance_) {
-      return ctor.instance_;
-    }
-    if (goog.DEBUG) {
-      // NOTE: JSCompiler can't optimize away Array#push.
-      goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = ctor;
-    }
-    return ctor.instance_ = new ctor;
-  };
-};
-
-
-/**
- * All singleton classes that have been instantiated, for testing. Don't read
- * it directly, use the {@code goog.testing.singleton} module. The compiler
- * removes this variable if unused.
- * @type {!Array<!Function>}
- * @private
- */
-goog.instantiatedSingletons_ = [];
-
-
-/**
- * @define {boolean} Whether to load goog.modules using {@code eval} when using
- * the debug loader.  This provides a better debugging experience as the
- * source is unmodified and can be edited using Chrome Workspaces or similar.
- * However in some environments the use of {@code eval} is banned
- * so we provide an alternative.
- */
-goog.define('goog.LOAD_MODULE_USING_EVAL', true);
-
-
-/**
- * @define {boolean} Whether the exports of goog.modules should be sealed when
- * possible.
- */
-goog.define('goog.SEAL_MODULE_EXPORTS', goog.DEBUG);
-
-
-/**
- * The registry of initialized modules:
- * the module identifier to module exports map.
- * @private @const {!Object<string, ?>}
- */
-goog.loadedModules_ = {};
-
-
-/**
- * True if goog.dependencies_ is available.
- * @const {boolean}
- */
-goog.DEPENDENCIES_ENABLED = !COMPILED && goog.ENABLE_DEBUG_LOADER;
-
-
-/**
- * @define {string} How to decide whether to transpile.  Valid values
- * are 'always', 'never', and 'detect'.  The default ('detect') is to
- * use feature detection to determine which language levels need
- * transpilation.
- */
-// NOTE(user): we could expand this to accept a language level to bypass
-// detection: e.g. goog.TRANSPILE == 'es5' would transpile ES6 files but
-// would leave ES3 and ES5 files alone.
-goog.define('goog.TRANSPILE', 'detect');
-
-
-/**
- * @define {string} Path to the transpiler.  Executing the script at this
- * path (relative to base.js) should define a function $jscomp.transpile.
- */
-goog.define('goog.TRANSPILER', 'transpile.js');
-
-
-if (goog.DEPENDENCIES_ENABLED) {
-  /**
-   * This object is used to keep track of dependencies and other data that is
-   * used for loading scripts.
-   * @private
-   * @type {{
-   *   loadFlags: !Object<string, !Object<string, string>>,
-   *   nameToPath: !Object<string, string>,
-   *   requires: !Object<string, !Object<string, boolean>>,
-   *   visited: !Object<string, boolean>,
-   *   written: !Object<string, boolean>,
-   *   deferred: !Object<string, string>
-   * }}
-   */
-  goog.dependencies_ = {
-    loadFlags: {},  // 1 to 1
-
-    nameToPath: {},  // 1 to 1
-
-    requires: {},  // 1 to many
-
-    // Used when resolving dependencies to prevent us from visiting file twice.
-    visited: {},
-
-    written: {},  // Used to keep track of script files we have written.
-
-    deferred: {}  // Used to track deferred module evaluations in old IEs
-  };
-
-
-  /**
-   * Tries to detect whether is in the context of an HTML document.
-   * @return {boolean} True if it looks like HTML document.
-   * @private
-   */
-  goog.inHtmlDocument_ = function() {
-    /** @type {Document} */
-    var doc = goog.global.document;
-    return doc != null && 'write' in doc;  // XULDocument misses write.
-  };
-
-
-  /**
-   * Tries to detect the base path of base.js script that bootstraps Closure.
-   * @private
-   */
-  goog.findBasePath_ = function() {
-    if (goog.isDef(goog.global.CLOSURE_BASE_PATH)) {
-      goog.basePath = goog.global.CLOSURE_BASE_PATH;
-      return;
-    } else if (!goog.inHtmlDocument_()) {
-      return;
-    }
-    /** @type {Document} */
-    var doc = goog.global.document;
-    var scripts = doc.getElementsByTagName('SCRIPT');
-    // Search backwards since the current script is in almost all cases the one
-    // that has base.js.
-    for (var i = scripts.length - 1; i >= 0; --i) {
-      var script = /** @type {!HTMLScriptElement} */ (scripts[i]);
-      var src = script.src;
-      var qmark = src.lastIndexOf('?');
-      var l = qmark == -1 ? src.length : qmark;
-      if (src.substr(l - 7, 7) == 'base.js') {
-        goog.basePath = src.substr(0, l - 7);
-        return;
-      }
-    }
-  };
-
-
-  /**
-   * Imports a script if, and only if, that script hasn't already been imported.
-   * (Must be called at execution time)
-   * @param {string} src Script source.
-   * @param {string=} opt_sourceText The optionally source text to evaluate
-   * @private
-   */
-  goog.importScript_ = function(src, opt_sourceText) {
-    var importScript =
-        goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
-    if (importScript(src, opt_sourceText)) {
-      goog.dependencies_.written[src] = true;
-    }
-  };
-
-
-  /**
-   * Whether the browser is IE9 or earlier, which needs special handling
-   * for deferred modules.
-   * @const @private {boolean}
-   */
-  goog.IS_OLD_IE_ =
-      !!(!goog.global.atob && goog.global.document && goog.global.document.all);
-
-
-  /**
-   * Whether IE9 or earlier is waiting on a dependency.  This ensures that
-   * deferred modules that have no non-deferred dependencies actually get
-   * loaded, since if we defer them and then never pull in a non-deferred
-   * script, then `goog.loadQueuedModules_` will never be called.  Instead,
-   * if not waiting on anything we simply don't defer in the first place.
-   * @private {boolean}
-   */
-  goog.oldIeWaiting_ = false;
-
-
-  /**
-   * Given a URL initiate retrieval and execution of a script that needs
-   * pre-processing.
-   * @param {string} src Script source URL.
-   * @param {boolean} isModule Whether this is a goog.module.
-   * @param {boolean} needsTranspile Whether this source needs transpilation.
-   * @private
-   */
-  goog.importProcessedScript_ = function(src, isModule, needsTranspile) {
-    // In an attempt to keep browsers from timing out loading scripts using
-    // synchronous XHRs, put each load in its own script block.
-    var bootstrap = 'goog.retrieveAndExec_("' + src + '", ' + isModule + ', ' +
-        needsTranspile + ');';
-
-    goog.importScript_('', bootstrap);
-  };
-
-
-  /** @private {!Array<string>} */
-  goog.queuedModules_ = [];
-
-
-  /**
-   * Return an appropriate module text. Suitable to insert into
-   * a script tag (that is unescaped).
-   * @param {string} srcUrl
-   * @param {string} scriptText
-   * @return {string}
-   * @private
-   */
-  goog.wrapModule_ = function(srcUrl, scriptText) {
-    if (!goog.LOAD_MODULE_USING_EVAL || !goog.isDef(goog.global.JSON)) {
-      return '' +
-          'goog.loadModule(function(exports) {' +
-          '"use strict";' + scriptText +
-          '\n' +  // terminate any trailing single line comment.
-          ';return exports' +
-          '});' +
-          '\n//# sourceURL=' + srcUrl + '\n';
-    } else {
-      return '' +
-          'goog.loadModule(' +
-          goog.global.JSON.stringify(
-              scriptText + '\n//# sourceURL=' + srcUrl + '\n') +
-          ');';
-    }
-  };
-
-  // On IE9 and earlier, it is necessary to handle
-  // deferred module loads. In later browsers, the
-  // code to be evaluated is simply inserted as a script
-  // block in the correct order. To eval deferred
-  // code at the right time, we piggy back on goog.require to call
-  // goog.maybeProcessDeferredDep_.
-  //
-  // The goog.requires are used both to bootstrap
-  // the loading process (when no deps are available) and
-  // declare that they should be available.
-  //
-  // Here we eval the sources, if all the deps are available
-  // either already eval'd or goog.require'd.  This will
-  // be the case when all the dependencies have already
-  // been loaded, and the dependent module is loaded.
-  //
-  // But this alone isn't sufficient because it is also
-  // necessary to handle the case where there is no root
-  // that is not deferred.  For that there we register for an event
-  // and trigger goog.loadQueuedModules_ handle any remaining deferred
-  // evaluations.
-
-  /**
-   * Handle any remaining deferred goog.module evals.
-   * @private
-   */
-  goog.loadQueuedModules_ = function() {
-    var count = goog.queuedModules_.length;
-    if (count > 0) {
-      var queue = goog.queuedModules_;
-      goog.queuedModules_ = [];
-      for (var i = 0; i < count; i++) {
-        var path = queue[i];
-        goog.maybeProcessDeferredPath_(path);
-      }
-    }
-    goog.oldIeWaiting_ = false;
-  };
-
-
-  /**
-   * Eval the named module if its dependencies are
-   * available.
-   * @param {string} name The module to load.
-   * @private
-   */
-  goog.maybeProcessDeferredDep_ = function(name) {
-    if (goog.isDeferredModule_(name) && goog.allDepsAreAvailable_(name)) {
-      var path = goog.getPathFromDeps_(name);
-      goog.maybeProcessDeferredPath_(goog.basePath + path);
-    }
-  };
-
-  /**
-   * @param {string} name The module to check.
-   * @return {boolean} Whether the name represents a
-   *     module whose evaluation has been deferred.
-   * @private
-   */
-  goog.isDeferredModule_ = function(name) {
-    var path = goog.getPathFromDeps_(name);
-    var loadFlags = path && goog.dependencies_.loadFlags[path] || {};
-    var languageLevel = loadFlags['lang'] || 'es3';
-    if (path && (loadFlags['module'] == 'goog' ||
-                 goog.needsTranspile_(languageLevel))) {
-      var abspath = goog.basePath + path;
-      return (abspath) in goog.dependencies_.deferred;
-    }
-    return false;
-  };
-
-  /**
-   * @param {string} name The module to check.
-   * @return {boolean} Whether the name represents a
-   *     module whose declared dependencies have all been loaded
-   *     (eval'd or a deferred module load)
-   * @private
-   */
-  goog.allDepsAreAvailable_ = function(name) {
-    var path = goog.getPathFromDeps_(name);
-    if (path && (path in goog.dependencies_.requires)) {
-      for (var requireName in goog.dependencies_.requires[path]) {
-        if (!goog.isProvided_(requireName) &&
-            !goog.isDeferredModule_(requireName)) {
-          return false;
-        }
-      }
-    }
-    return true;
-  };
-
-
-  /**
-   * @param {string} abspath
-   * @private
-   */
-  goog.maybeProcessDeferredPath_ = function(abspath) {
-    if (abspath in goog.dependencies_.deferred) {
-      var src = goog.dependencies_.deferred[abspath];
-      delete goog.dependencies_.deferred[abspath];
-      goog.globalEval(src);
-    }
-  };
-
-
-  /**
-   * Load a goog.module from the provided URL.  This is not a general purpose
-   * code loader and does not support late loading code, that is it should only
-   * be used during page load. This method exists to support unit tests and
-   * "debug" loaders that would otherwise have inserted script tags. Under the
-   * hood this needs to use a synchronous XHR and is not recommeneded for
-   * production code.
-   *
-   * The module's goog.requires must have already been satisified; an exception
-   * will be thrown if this is not the case. This assumption is that no
-   * "deps.js" file exists, so there is no way to discover and locate the
-   * module-to-be-loaded's dependencies and no attempt is made to do so.
-   *
-   * There should only be one attempt to load a module.  If
-   * "goog.loadModuleFromUrl" is called for an already loaded module, an
-   * exception will be throw.
-   *
-   * @param {string} url The URL from which to attempt to load the goog.module.
-   */
-  goog.loadModuleFromUrl = function(url) {
-    // Because this executes synchronously, we don't need to do any additional
-    // bookkeeping. When "goog.loadModule" the namespace will be marked as
-    // having been provided which is sufficient.
-    goog.retrieveAndExec_(url, true, false);
-  };
-
-
-  /**
-   * Writes a new script pointing to {@code src} directly into the DOM.
-   *
-   * NOTE: This method is not CSP-compliant. @see goog.appendScriptSrcNode_ for
-   * the fallback mechanism.
-   *
-   * @param {string} src The script URL.
-   * @private
-   */
-  goog.writeScriptSrcNode_ = function(src) {
-    goog.global.document.write(
-        '<script type="text/javascript" src="' + src + '"></' +
-        'script>');
-  };
-
-
-  /**
-   * Appends a new script node to the DOM using a CSP-compliant mechanism. This
-   * method exists as a fallback for document.write (which is not allowed in a
-   * strict CSP context, e.g., Chrome apps).
-   *
-   * NOTE: This method is not analogous to using document.write to insert a
-   * <script> tag; specifically, the user agent will execute a script added by
-   * document.write immediately after the current script block finishes
-   * executing, whereas the DOM-appended script node will not be executed until
-   * the entire document is parsed and executed. That is to say, this script is
-   * added to the end of the script execution queue.
-   *
-   * The page must not attempt to call goog.required entities until after the
-   * document has loaded, e.g., in or after the window.onload callback.
-   *
-   * @param {string} src The script URL.
-   * @private
-   */
-  goog.appendScriptSrcNode_ = function(src) {
-    /** @type {Document} */
-    var doc = goog.global.document;
-    var scriptEl =
-        /** @type {HTMLScriptElement} */ (doc.createElement('script'));
-    scriptEl.type = 'text/javascript';
-    scriptEl.src = src;
-    scriptEl.defer = false;
-    scriptEl.async = false;
-    doc.head.appendChild(scriptEl);
-  };
-
-
-  /**
-   * The default implementation of the import function. Writes a script tag to
-   * import the script.
-   *
-   * @param {string} src The script url.
-   * @param {string=} opt_sourceText The optionally source text to evaluate
-   * @return {boolean} True if the script was imported, false otherwise.
-   * @private
-   */
-  goog.writeScriptTag_ = function(src, opt_sourceText) {
-    if (goog.inHtmlDocument_()) {
-      /** @type {!HTMLDocument} */
-      var doc = goog.global.document;
-
-      // If the user tries to require a new symbol after document load,
-      // something has gone terribly wrong. Doing a document.write would
-      // wipe out the page. This does not apply to the CSP-compliant method
-      // of writing script tags.
-      if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING &&
-          doc.readyState == 'complete') {
-        // Certain test frameworks load base.js multiple times, which tries
-        // to write deps.js each time. If that happens, just fail silently.
-        // These frameworks wipe the page between each load of base.js, so this
-        // is OK.
-        var isDeps = /\bdeps.js$/.test(src);
-        if (isDeps) {
-          return false;
-        } else {
-          throw Error('Cannot write "' + src + '" after document load');
-        }
-      }
-
-      if (opt_sourceText === undefined) {
-        if (!goog.IS_OLD_IE_) {
-          if (goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING) {
-            goog.appendScriptSrcNode_(src);
-          } else {
-            goog.writeScriptSrcNode_(src);
-          }
-        } else {
-          goog.oldIeWaiting_ = true;
-          var state = ' onreadystatechange=\'goog.onScriptLoad_(this, ' +
-              ++goog.lastNonModuleScriptIndex_ + ')\' ';
-          doc.write(
-              '<script type="text/javascript" src="' + src + '"' + state +
-              '></' +
-              'script>');
-        }
-      } else {
-        doc.write(
-            '<script type="text/javascript">' +
-            goog.protectScriptTag_(opt_sourceText) + '</' +
-            'script>');
-      }
-      return true;
-    } else {
-      return false;
-    }
-  };
-
-  /**
-   * Rewrites closing script tags in input to avoid ending an enclosing script
-   * tag.
-   *
-   * @param {string} str
-   * @return {string}
-   * @private
-   */
-  goog.protectScriptTag_ = function(str) {
-    return str.replace(/<\/(SCRIPT)/ig, '\\x3c/$1');
-  };
-
-  /**
-   * Determines whether the given language needs to be transpiled.
-   * @param {string} lang
-   * @return {boolean}
-   * @private
-   */
-  goog.needsTranspile_ = function(lang) {
-    if (goog.TRANSPILE == 'always') {
-      return true;
-    } else if (goog.TRANSPILE == 'never') {
-      return false;
-    } else if (!goog.requiresTranspilation_) {
-      goog.requiresTranspilation_ = goog.createRequiresTranspilation_();
-    }
-    if (lang in goog.requiresTranspilation_) {
-      return goog.requiresTranspilation_[lang];
-    } else {
-      throw new Error('Unknown language mode: ' + lang);
-    }
-  };
-
-  /** @private {?Object<string, boolean>} */
-  goog.requiresTranspilation_ = null;
-
-
-  /** @private {number} */
-  goog.lastNonModuleScriptIndex_ = 0;
-
-
-  /**
-   * A readystatechange handler for legacy IE
-   * @param {!HTMLScriptElement} script
-   * @param {number} scriptIndex
-   * @return {boolean}
-   * @private
-   */
-  goog.onScriptLoad_ = function(script, scriptIndex) {
-    // for now load the modules when we reach the last script,
-    // later allow more inter-mingling.
-    if (script.readyState == 'complete' &&
-        goog.lastNonModuleScriptIndex_ == scriptIndex) {
-      goog.loadQueuedModules_();
-    }
-    return true;
-  };
-
-  /**
-   * Resolves dependencies based on the dependencies added using addDependency
-   * and calls importScript_ in the correct order.
-   * @param {string} pathToLoad The path from which to start discovering
-   *     dependencies.
-   * @private
-   */
-  goog.writeScripts_ = function(pathToLoad) {
-    /** @type {!Array<string>} The scripts we need to write this time. */
-    var scripts = [];
-    var seenScript = {};
-    var deps = goog.dependencies_;
-
-    /** @param {string} path */
-    function visitNode(path) {
-      if (path in deps.written) {
-        return;
-      }
-
-      // We have already visited this one. We can get here if we have cyclic
-      // dependencies.
-      if (path in deps.visited) {
-        return;
-      }
-
-      deps.visited[path] = true;
-
-      if (path in deps.requires) {
-        for (var requireName in deps.requires[path]) {
-          // If the required name is defined, we assume that it was already
-          // bootstrapped by other means.
-          if (!goog.isProvided_(requireName)) {
-            if (requireName in deps.nameToPath) {
-              visitNode(deps.nameToPath[requireName]);
-            } else {
-              throw Error('Undefined nameToPath for ' + requireName);
-            }
-          }
-        }
-      }
-
-      if (!(path in seenScript)) {
-        seenScript[path] = true;
-        scripts.push(path);
-      }
-    }
-
-    visitNode(pathToLoad);
-
-    // record that we are going to load all these scripts.
-    for (var i = 0; i < scripts.length; i++) {
-      var path = scripts[i];
-      goog.dependencies_.written[path] = true;
-    }
-
-    // If a module is loaded synchronously then we need to
-    // clear the current inModuleLoader value, and restore it when we are
-    // done loading the current "requires".
-    var moduleState = goog.moduleLoaderState_;
-    goog.moduleLoaderState_ = null;
-
-    for (var i = 0; i < scripts.length; i++) {
-      var path = scripts[i];
-      if (path) {
-        var loadFlags = deps.loadFlags[path] || {};
-        var languageLevel = loadFlags['lang'] || 'es3';
-        var needsTranspile = goog.needsTranspile_(languageLevel);
-        if (loadFlags['module'] == 'goog' || needsTranspile) {
-          goog.importProcessedScript_(
-              goog.basePath + path, loadFlags['module'] == 'goog',
-              needsTranspile);
-        } else {
-          goog.importScript_(goog.basePath + path);
-        }
-      } else {
-        goog.moduleLoaderState_ = moduleState;
-        throw Error('Undefined script input');
-      }
-    }
-
-    // restore the current "module loading state"
-    goog.moduleLoaderState_ = moduleState;
-  };
-
-
-  /**
-   * Looks at the dependency rules and tries to determine the script file that
-   * fulfills a particular rule.
-   * @param {string} rule In the form goog.namespace.Class or project.script.
-   * @return {?string} Url corresponding to the rule, or null.
-   * @private
-   */
-  goog.getPathFromDeps_ = function(rule) {
-    if (rule in goog.dependencies_.nameToPath) {
-      return goog.dependencies_.nameToPath[rule];
-    } else {
-      return null;
-    }
-  };
-
-  goog.findBasePath_();
-
-  // Allow projects to manage the deps files themselves.
-  if (!goog.global.CLOSURE_NO_DEPS) {
-    goog.importScript_(goog.basePath + 'deps.js');
-  }
-}
-
-
-/**
- * @package {?boolean}
- * Visible for testing.
- */
-goog.hasBadLetScoping = null;
-
-
-/**
- * @return {boolean}
- * @package Visible for testing.
- */
-goog.useSafari10Workaround = function() {
-  if (goog.hasBadLetScoping == null) {
-    var hasBadLetScoping;
-    try {
-      hasBadLetScoping = !eval(
-          '"use strict";' +
-          'let x = 1; function f() { return typeof x; };' +
-          'f() == "number";');
-    } catch (e) {
-      // Assume that ES6 syntax isn't supported.
-      hasBadLetScoping = false;
-    }
-    goog.hasBadLetScoping = hasBadLetScoping;
-  }
-  return goog.hasBadLetScoping;
-};
-
-
-/**
- * @param {string} moduleDef
- * @return {string}
- * @package Visible for testing.
- */
-goog.workaroundSafari10EvalBug = function(moduleDef) {
-  return '(function(){' + moduleDef +
-      '\n' +  // Terminate any trailing single line comment.
-      ';' +   // Terminate any trailing expression.
-      '})();\n';
-};
-
-
-/**
- * @param {function(?):?|string} moduleDef The module definition.
- */
-goog.loadModule = function(moduleDef) {
-  // NOTE: we allow function definitions to be either in the from
-  // of a string to eval (which keeps the original source intact) or
-  // in a eval forbidden environment (CSP) we allow a function definition
-  // which in its body must call {@code goog.module}, and return the exports
-  // of the module.
-  var previousState = goog.moduleLoaderState_;
-  try {
-    goog.moduleLoaderState_ = {
-      moduleName: undefined,
-      declareLegacyNamespace: false
-    };
-    var exports;
-    if (goog.isFunction(moduleDef)) {
-      exports = moduleDef.call(undefined, {});
-    } else if (goog.isString(moduleDef)) {
-      if (goog.useSafari10Workaround()) {
-        moduleDef = goog.workaroundSafari10EvalBug(moduleDef);
-      }
-
-      exports = goog.loadModuleFromSource_.call(undefined, moduleDef);
-    } else {
-      throw Error('Invalid module definition');
-    }
-
-    var moduleName = goog.moduleLoaderState_.moduleName;
-    if (!goog.isString(moduleName) || !moduleName) {
-      throw Error('Invalid module name \"' + moduleName + '\"');
-    }
-
-    // Don't seal legacy namespaces as they may be uses as a parent of
-    // another namespace
-    if (goog.moduleLoaderState_.declareLegacyNamespace) {
-      goog.constructNamespace_(moduleName, exports);
-    } else if (
-        goog.SEAL_MODULE_EXPORTS && Object.seal && typeof exports == 'object' &&
-        exports != null) {
-      Object.seal(exports);
-    }
-
-    goog.loadedModules_[moduleName] = exports;
-  } finally {
-    goog.moduleLoaderState_ = previousState;
-  }
-};
-
-
-/**
- * @private @const
- */
-goog.loadModuleFromSource_ = /** @type {function(string):?} */ (function() {
-  // NOTE: we avoid declaring parameters or local variables here to avoid
-  // masking globals or leaking values into the module definition.
-  'use strict';
-  var exports = {};
-  eval(arguments[0]);
-  return exports;
-});
-
-
-/**
- * Normalize a file path by removing redundant ".." and extraneous "." file
- * path components.
- * @param {string} path
- * @return {string}
- * @private
- */
-goog.normalizePath_ = function(path) {
-  var components = path.split('/');
-  var i = 0;
-  while (i < components.length) {
-    if (components[i] == '.') {
-      components.splice(i, 1);
-    } else if (
-        i && components[i] == '..' && components[i - 1] &&
-        components[i - 1] != '..') {
-      components.splice(--i, 2);
-    } else {
-      i++;
-    }
-  }
-  return components.join('/');
-};
-
-
-/**
- * Provides a hook for loading a file when using Closure's goog.require() API
- * with goog.modules.  In particular this hook is provided to support Node.js.
- *
- * @type {(function(string):string)|undefined}
- */
-goog.global.CLOSURE_LOAD_FILE_SYNC;
-
-
-/**
- * Loads file by synchronous XHR. Should not be used in production environments.
- * @param {string} src Source URL.
- * @return {?string} File contents, or null if load failed.
- * @private
- */
-goog.loadFileSync_ = function(src) {
-  if (goog.global.CLOSURE_LOAD_FILE_SYNC) {
-    return goog.global.CLOSURE_LOAD_FILE_SYNC(src);
-  } else {
-    try {
-      /** @type {XMLHttpRequest} */
-      var xhr = new goog.global['XMLHttpRequest']();
-      xhr.open('get', src, false);
-      xhr.send();
-      // NOTE: Successful http: requests have a status of 200, but successful
-      // file: requests may have a status of zero.  Any other status, or a
-      // thrown exception (particularly in case of file: requests) indicates
-      // some sort of error, which we treat as a missing or unavailable file.
-      return xhr.status == 0 || xhr.status == 200 ? xhr.responseText : null;
-    } catch (err) {
-      // No need to rethrow or log, since errors should show up on their own.
-      return null;
-    }
-  }
-};
-
-
-/**
- * Retrieve and execute a script that needs some sort of wrapping.
- * @param {string} src Script source URL.
- * @param {boolean} isModule Whether to load as a module.
- * @param {boolean} needsTranspile Whether to transpile down to ES3.
- * @private
- */
-goog.retrieveAndExec_ = function(src, isModule, needsTranspile) {
-  if (!COMPILED) {
-    // The full but non-canonicalized URL for later use.
-    var originalPath = src;
-    // Canonicalize the path, removing any /./ or /../ since Chrome's debugging
-    // console doesn't auto-canonicalize XHR loads as it does <script> srcs.
-    src = goog.normalizePath_(src);
-
-    var importScript =
-        goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
-
-    var scriptText = goog.loadFileSync_(src);
-    if (scriptText == null) {
-      throw new Error('Load of "' + src + '" failed');
-    }
-
-    if (needsTranspile) {
-      scriptText = goog.transpile_.call(goog.global, scriptText, src);
-    }
-
-    if (isModule) {
-      scriptText = goog.wrapModule_(src, scriptText);
-    } else {
-      scriptText += '\n//# sourceURL=' + src;
-    }
-    var isOldIE = goog.IS_OLD_IE_;
-    if (isOldIE && goog.oldIeWaiting_) {
-      goog.dependencies_.deferred[originalPath] = scriptText;
-      goog.queuedModules_.push(originalPath);
-    } else {
-      importScript(src, scriptText);
-    }
-  }
-};
-
-
-/**
- * Lazily retrieves the transpiler and applies it to the source.
- * @param {string} code JS code.
- * @param {string} path Path to the code.
- * @return {string} The transpiled code.
- * @private
- */
-goog.transpile_ = function(code, path) {
-  var jscomp = goog.global['$jscomp'];
-  if (!jscomp) {
-    goog.global['$jscomp'] = jscomp = {};
-  }
-  var transpile = jscomp.transpile;
-  if (!transpile) {
-    var transpilerPath = goog.basePath + goog.TRANSPILER;
-    var transpilerCode = goog.loadFileSync_(transpilerPath);
-    if (transpilerCode) {
-      // This must be executed synchronously, since by the time we know we
-      // need it, we're about to load and write the ES6 code synchronously,
-      // so a normal script-tag load will be too slow.
-      eval(transpilerCode + '\n//# sourceURL=' + transpilerPath);
-      // Even though the transpiler is optional, if $gwtExport is found, it's
-      // a sign the transpiler was loaded and the $jscomp.transpile *should*
-      // be there.
-      if (goog.global['$gwtExport'] && goog.global['$gwtExport']['$jscomp'] &&
-          !goog.global['$gwtExport']['$jscomp']['transpile']) {
-        throw new Error(
-            'The transpiler did not properly export the "transpile" ' +
-            'method. $gwtExport: ' + JSON.stringify(goog.global['$gwtExport']));
-      }
-      // transpile.js only exports a single $jscomp function, transpile. We
-      // grab just that and add it to the existing definition of $jscomp which
-      // contains the polyfills.
-      goog.global['$jscomp'].transpile =
-          goog.global['$gwtExport']['$jscomp']['transpile'];
-      jscomp = goog.global['$jscomp'];
-      transpile = jscomp.transpile;
-    }
-  }
-  if (!transpile) {
-    // The transpiler is an optional component.  If it's not available then
-    // replace it with a pass-through function that simply logs.
-    var suffix = ' requires transpilation but no transpiler was found.';
-    transpile = jscomp.transpile = function(code, path) {
-      // TODO(user): figure out some way to get this error to show up
-      // in test results, noting that the failure may occur in many
-      // different ways, including in loadModule() before the test
-      // runner even comes up.
-      goog.logToConsole_(path + suffix);
-      return code;
-    };
-  }
-  // Note: any transpilation errors/warnings will be logged to the console.
-  return transpile(code, path);
-};
-
-
-//==============================================================================
-// Language Enhancements
-//==============================================================================
-
-
-/**
- * This is a "fixed" version of the typeof operator.  It differs from the typeof
- * operator in such a way that null returns 'null' and arrays return 'array'.
- * @param {?} value The value to get the type of.
- * @return {string} The name of the type.
- */
-goog.typeOf = function(value) {
-  var s = typeof value;
-  if (s == 'object') {
-    if (value) {
-      // Check these first, so we can avoid calling Object.prototype.toString if
-      // possible.
-      //
-      // IE improperly marshals typeof across execution contexts, but a
-      // cross-context object will still return false for "instanceof Object".
-      if (value instanceof Array) {
-        return 'array';
-      } else if (value instanceof Object) {
-        return s;
-      }
-
-      // HACK: In order to use an Object prototype method on the arbitrary
-      //   value, the compiler requires the value be cast to type Object,
-      //   even though the ECMA spec explicitly allows it.
-      var className = Object.prototype.toString.call(
-          /** @type {!Object} */ (value));
-      // In Firefox 3.6, attempting to access iframe window objects' length
-      // property throws an NS_ERROR_FAILURE, so we need to special-case it
-      // here.
-      if (className == '[object Window]') {
-        return 'object';
-      }
-
-      // We cannot always use constructor == Array or instanceof Array because
-      // different frames have different Array objects. In IE6, if the iframe
-      // where the array was created is destroyed, the array loses its
-      // prototype. Then dereferencing val.splice here throws an exception, so
-      // we can't use goog.isFunction. Calling typeof directly returns 'unknown'
-      // so that will work. In this case, this function will return false and
-      // most array functions will still work because the array is still
-      // array-like (supports length and []) even though it has lost its
-      // prototype.
-      // Mark Miller noticed that Object.prototype.toString
-      // allows access to the unforgeable [[Class]] property.
-      //  15.2.4.2 Object.prototype.toString ( )
-      //  When the toString method is called, the following steps are taken:
-      //      1. Get the [[Class]] property of this object.
-      //      2. Compute a string value by concatenating the three strings
-      //         "[object ", Result(1), and "]".
-      //      3. Return Result(2).
-      // and this behavior survives the destruction of the execution context.
-      if ((className == '[object Array]' ||
-           // In IE all non value types are wrapped as objects across window
-           // boundaries (not iframe though) so we have to do object detection
-           // for this edge case.
-           typeof value.length == 'number' &&
-               typeof value.splice != 'undefined' &&
-               typeof value.propertyIsEnumerable != 'undefined' &&
-               !value.propertyIsEnumerable('splice')
-
-               )) {
-        return 'array';
-      }
-      // HACK: There is still an array case that fails.
-      //     function ArrayImpostor() {}
-      //     ArrayImpostor.prototype = [];
-      //     var impostor = new ArrayImpostor;
-      // this can be fixed by getting rid of the fast path
-      // (value instanceof Array) and solely relying on
-      // (value && Object.prototype.toString.vall(value) === '[object Array]')
-      // but that would require many more function calls and is not warranted
-      // unless closure code is receiving objects from untrusted sources.
-
-      // IE in cross-window calls does not correctly marshal the function type
-      // (it appears just as an object) so we cannot use just typeof val ==
-      // 'function'. However, if the object has a call property, it is a
-      // function.
-      if ((className == '[object Function]' ||
-           typeof value.call != 'undefined' &&
-               typeof value.propertyIsEnumerable != 'undefined' &&
-               !value.propertyIsEnumerable('call'))) {
-        return 'function';
-      }
-
-    } else {
-      return 'null';
-    }
-
-  } else if (s == 'function' && typeof value.call == 'undefined') {
-    // In Safari typeof nodeList returns 'function', and on Firefox typeof
-    // behaves similarly for HTML{Applet,Embed,Object}, Elements and RegExps. We
-    // would like to return object for those and we can detect an invalid
-    // function by making sure that the function object has a call method.
-    return 'object';
-  }
-  return s;
-};
-
-
-/**
- * Returns true if the specified value is null.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is null.
- */
-goog.isNull = function(val) {
-  return val === null;
-};
-
-
-/**
- * Returns true if the specified value is defined and not null.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is defined and not null.
- */
-goog.isDefAndNotNull = function(val) {
-  // Note that undefined == null.
-  return val != null;
-};
-
-
-/**
- * Returns true if the specified value is an array.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is an array.
- */
-goog.isArray = function(val) {
-  return goog.typeOf(val) == 'array';
-};
-
-
-/**
- * Returns true if the object looks like an array. To qualify as array like
- * the value needs to be either a NodeList or an object with a Number length
- * property. As a special case, a function value is not array like, because its
- * length property is fixed to correspond to the number of expected arguments.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is an array.
- */
-goog.isArrayLike = function(val) {
-  var type = goog.typeOf(val);
-  // We do not use goog.isObject here in order to exclude function values.
-  return type == 'array' || type == 'object' && typeof val.length == 'number';
-};
-
-
-/**
- * Returns true if the object looks like a Date. To qualify as Date-like the
- * value needs to be an object and have a getFullYear() function.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is a like a Date.
- */
-goog.isDateLike = function(val) {
-  return goog.isObject(val) && typeof val.getFullYear == 'function';
-};
-
-
-/**
- * Returns true if the specified value is a string.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is a string.
- */
-goog.isString = function(val) {
-  return typeof val == 'string';
-};
-
-
-/**
- * Returns true if the specified value is a boolean.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is boolean.
- */
-goog.isBoolean = function(val) {
-  return typeof val == 'boolean';
-};
-
-
-/**
- * Returns true if the specified value is a number.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is a number.
- */
-goog.isNumber = function(val) {
-  return typeof val == 'number';
-};
-
-
-/**
- * Returns true if the specified value is a function.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is a function.
- */
-goog.isFunction = function(val) {
-  return goog.typeOf(val) == 'function';
-};
-
-
-/**
- * Returns true if the specified value is an object.  This includes arrays and
- * functions.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is an object.
- */
-goog.isObject = function(val) {
-  var type = typeof val;
-  return type == 'object' && val != null || type == 'function';
-  // return Object(val) === val also works, but is slower, especially if val is
-  // not an object.
-};
-
-
-/**
- * Gets a unique ID for an object. This mutates the object so that further calls
- * with the same object as a parameter returns the same value. The unique ID is
- * guaranteed to be unique across the current session amongst objects that are
- * passed into {@code getUid}. There is no guarantee that the ID is unique or
- * consistent across sessions. It is unsafe to generate unique ID for function
- * prototypes.
- *
- * @param {Object} obj The object to get the unique ID for.
- * @return {number} The unique ID for the object.
- */
-goog.getUid = function(obj) {
-  // TODO(arv): Make the type stricter, do not accept null.
-
-  // In Opera window.hasOwnProperty exists but always returns false so we avoid
-  // using it. As a consequence the unique ID generated for BaseClass.prototype
-  // and SubClass.prototype will be the same.
-  return obj[goog.UID_PROPERTY_] ||
-      (obj[goog.UID_PROPERTY_] = ++goog.uidCounter_);
-};
-
-
-/**
- * Whether the given object is already assigned a unique ID.
- *
- * This does not modify the object.
- *
- * @param {!Object} obj The object to check.
- * @return {boolean} Whether there is an assigned unique id for the object.
- */
-goog.hasUid = function(obj) {
-  return !!obj[goog.UID_PROPERTY_];
-};
-
-
-/**
- * Removes the unique ID from an object. This is useful if the object was
- * previously mutated using {@code goog.getUid} in which case the mutation is
- * undone.
- * @param {Object} obj The object to remove the unique ID field from.
- */
-goog.removeUid = function(obj) {
-  // TODO(arv): Make the type stricter, do not accept null.
-
-  // In IE, DOM nodes are not instances of Object and throw an exception if we
-  // try to delete.  Instead we try to use removeAttribute.
-  if (obj !== null && 'removeAttribute' in obj) {
-    obj.removeAttribute(goog.UID_PROPERTY_);
-  }
-
-  try {
-    delete obj[goog.UID_PROPERTY_];
-  } catch (ex) {
-  }
-};
-
-
-/**
- * Name for unique ID property. Initialized in a way to help avoid collisions
- * with other closure JavaScript on the same page.
- * @type {string}
- * @private
- */
-goog.UID_PROPERTY_ = 'closure_uid_' + ((Math.random() * 1e9) >>> 0);
-
-
-/**
- * Counter for UID.
- * @type {number}
- * @private
- */
-goog.uidCounter_ = 0;
-
-
-/**
- * Adds a hash code field to an object. The hash code is unique for the
- * given object.
- * @param {Object} obj The object to get the hash code for.
- * @return {number} The hash code for the object.
- * @deprecated Use goog.getUid instead.
- */
-goog.getHashCode = goog.getUid;
-
-
-/**
- * Removes the hash code field from an object.
- * @param {Object} obj The object to remove the field from.
- * @deprecated Use goog.removeUid instead.
- */
-goog.removeHashCode = goog.removeUid;
-
-
-/**
- * Clones a value. The input may be an Object, Array, or basic type. Objects and
- * arrays will be cloned recursively.
- *
- * WARNINGS:
- * <code>goog.cloneObject</code> does not detect reference loops. Objects that
- * refer to themselves will cause infinite recursion.
- *
- * <code>goog.cloneObject</code> is unaware of unique identifiers, and copies
- * UIDs created by <code>getUid</code> into cloned results.
- *
- * @param {*} obj The value to clone.
- * @return {*} A clone of the input value.
- * @deprecated goog.cloneObject is unsafe. Prefer the goog.object methods.
- */
-goog.cloneObject = function(obj) {
-  var type = goog.typeOf(obj);
-  if (type == 'object' || type == 'array') {
-    if (obj.clone) {
-      return obj.clone();
-    }
-    var clone = type == 'array' ? [] : {};
-    for (var key in obj) {
-      clone[key] = goog.cloneObject(obj[key]);
-    }
-    return clone;
-  }
-
-  return obj;
-};
-
-
-/**
- * A native implementation of goog.bind.
- * @param {?function(this:T, ...)} fn A function to partially apply.
- * @param {T} selfObj Specifies the object which this should point to when the
- *     function is run.
- * @param {...*} var_args Additional arguments that are partially applied to the
- *     function.
- * @return {!Function} A partially-applied form of the function goog.bind() was
- *     invoked as a method of.
- * @template T
- * @private
- */
-goog.bindNative_ = function(fn, selfObj, var_args) {
-  return /** @type {!Function} */ (fn.call.apply(fn.bind, arguments));
-};
-
-
-/**
- * A pure-JS implementation of goog.bind.
- * @param {?function(this:T, ...)} fn A function to partially apply.
- * @param {T} selfObj Specifies the object which this should point to when the
- *     function is run.
- * @param {...*} var_args Additional arguments that are partially applied to the
- *     function.
- * @return {!Function} A partially-applied form of the function goog.bind() was
- *     invoked as a method of.
- * @template T
- * @private
- */
-goog.bindJs_ = function(fn, selfObj, var_args) {
-  if (!fn) {
-    throw new Error();
-  }
-
-  if (arguments.length > 2) {
-    var boundArgs = Array.prototype.slice.call(arguments, 2);
-    return function() {
-      // Prepend the bound arguments to the current arguments.
-      var newArgs = Array.prototype.slice.call(arguments);
-      Array.prototype.unshift.apply(newArgs, boundArgs);
-      return fn.apply(selfObj, newArgs);
-    };
-
-  } else {
-    return function() {
-      return fn.apply(selfObj, arguments);
-    };
-  }
-};
-
-
-/**
- * Partially applies this function to a particular 'this object' and zero or
- * more arguments. The result is a new function with some arguments of the first
- * function pre-filled and the value of this 'pre-specified'.
- *
- * Remaining arguments specified at call-time are appended to the pre-specified
- * ones.
- *
- * Also see: {@link #partial}.
- *
- * Usage:
- * <pre>var barMethBound = goog.bind(myFunction, myObj, 'arg1', 'arg2');
- * barMethBound('arg3', 'arg4');</pre>
- *
- * @param {?function(this:T, ...)} fn A function to partially apply.
- * @param {T} selfObj Specifies the object which this should point to when the
- *     function is run.
- * @param {...*} var_args Additional arguments that are partially applied to the
- *     function.
- * @return {!Function} A partially-applied form of the function goog.bind() was
- *     invoked as a method of.
- * @template T
- * @suppress {deprecated} See above.
- */
-goog.bind = function(fn, selfObj, var_args) {
-  // TODO(nicksantos): narrow the type signature.
-  if (Function.prototype.bind &&
-      // NOTE(nicksantos): Somebody pulled base.js into the default Chrome
-      // extension environment. This means that for Chrome extensions, they get
-      // the implementation of Function.prototype.bind that calls goog.bind
-      // instead of the native one. Even worse, we don't want to introduce a
-      // circular dependency between goog.bind and Function.prototype.bind, so
-      // we have to hack this to make sure it works correctly.
-      Function.prototype.bind.toString().indexOf('native code') != -1) {
-    goog.bind = goog.bindNative_;
-  } else {
-    goog.bind = goog.bindJs_;
-  }
-  return goog.bind.apply(null, arguments);
-};
-
-
-/**
- * Like goog.bind(), except that a 'this object' is not required. Useful when
- * the target function is already bound.
- *
- * Usage:
- * var g = goog.partial(f, arg1, arg2);
- * g(arg3, arg4);
- *
- * @param {Function} fn A function to partially apply.
- * @param {...*} var_args Additional arguments that are partially applied to fn.
- * @return {!Function} A partially-applied form of the function goog.partial()
- *     was invoked as a method of.
- */
-goog.partial = function(fn, var_args) {
-  var args = Array.prototype.slice.call(arguments, 1);
-  return function() {
-    // Clone the array (with slice()) and append additional arguments
-    // to the existing arguments.
-    var newArgs = args.slice();
-    newArgs.push.apply(newArgs, arguments);
-    return fn.apply(this, newArgs);
-  };
-};
-
-
-/**
- * Copies all the members of a source object to a target object. This method
- * does not work on all browsers for all objects that contain keys such as
- * toString or hasOwnProperty. Use goog.object.extend for this purpose.
- * @param {Object} target Target.
- * @param {Object} source Source.
- */
-goog.mixin = function(target, source) {
-  for (var x in source) {
-    target[x] = source[x];
-  }
-
-  // For IE7 or lower, the for-in-loop does not contain any properties that are
-  // not enumerable on the prototype object (for example, isPrototypeOf from
-  // Object.prototype) but also it will not include 'replace' on objects that
-  // extend String and change 'replace' (not that it is common for anyone to
-  // extend anything except Object).
-};
-
-
-/**
- * @return {number} An integer value representing the number of milliseconds
- *     between midnight, January 1, 1970 and the current time.
- */
-goog.now = (goog.TRUSTED_SITE && Date.now) || (function() {
-             // Unary plus operator converts its operand to a number which in
-             // the case of
-             // a date is done by calling getTime().
-             return +new Date();
-           });
-
-
-/**
- * Evals JavaScript in the global scope.  In IE this uses execScript, other
- * browsers use goog.global.eval. If goog.global.eval does not evaluate in the
- * global scope (for example, in Safari), appends a script tag instead.
- * Throws an exception if neither execScript or eval is defined.
- * @param {string} script JavaScript string.
- */
-goog.globalEval = function(script) {
-  if (goog.global.execScript) {
-    goog.global.execScript(script, 'JavaScript');
-  } else if (goog.global.eval) {
-    // Test to see if eval works
-    if (goog.evalWorksForGlobals_ == null) {
-      goog.global.eval('var _evalTest_ = 1;');
-      if (typeof goog.global['_evalTest_'] != 'undefined') {
-        try {
-          delete goog.global['_evalTest_'];
-        } catch (ignore) {
-          // Microsoft edge fails the deletion above in strict mode.
-        }
-        goog.evalWorksForGlobals_ = true;
-      } else {
-        goog.evalWorksForGlobals_ = false;
-      }
-    }
-
-    if (goog.evalWorksForGlobals_) {
-      goog.global.eval(script);
-    } else {
-      /** @type {Document} */
-      var doc = goog.global.document;
-      var scriptElt =
-          /** @type {!HTMLScriptElement} */ (doc.createElement('SCRIPT'));
-      scriptElt.type = 'text/javascript';
-      scriptElt.defer = false;
-      // Note(user): can't use .innerHTML since "t('<test>')" will fail and
-      // .text doesn't work in Safari 2.  Therefore we append a text node.
-      scriptElt.appendChild(doc.createTextNode(script));
-      doc.body.appendChild(scriptElt);
-      doc.body.removeChild(scriptElt);
-    }
-  } else {
-    throw Error('goog.globalEval not available');
-  }
-};
-
-
-/**
- * Indicates whether or not we can call 'eval' directly to eval code in the
- * global scope. Set to a Boolean by the first call to goog.globalEval (which
- * empirically tests whether eval works for globals). @see goog.globalEval
- * @type {?boolean}
- * @private
- */
-goog.evalWorksForGlobals_ = null;
-
-
-/**
- * Optional map of CSS class names to obfuscated names used with
- * goog.getCssName().
- * @private {!Object<string, string>|undefined}
- * @see goog.setCssNameMapping
- */
-goog.cssNameMapping_;
-
-
-/**
- * Optional obfuscation style for CSS class names. Should be set to either
- * 'BY_WHOLE' or 'BY_PART' if defined.
- * @type {string|undefined}
- * @private
- * @see goog.setCssNameMapping
- */
-goog.cssNameMappingStyle_;
-
-
-
-/**
- * A hook for modifying the default behavior goog.getCssName. The function
- * if present, will recieve the standard output of the goog.getCssName as
- * its input.
- *
- * @type {(function(string):string)|undefined}
- */
-goog.global.CLOSURE_CSS_NAME_MAP_FN;
-
-
-/**
- * Handles strings that are intended to be used as CSS class names.
- *
- * This function works in tandem with @see goog.setCssNameMapping.
- *
- * Without any mapping set, the arguments are simple joined with a hyphen and
- * passed through unaltered.
- *
- * When there is a mapping, there are two possible styles in which these
- * mappings are used. In the BY_PART style, each part (i.e. in between hyphens)
- * of the passed in css name is rewritten according to the map. In the BY_WHOLE
- * style, the full css name is looked up in the map directly. If a rewrite is
- * not specified by the map, the compiler will output a warning.
- *
- * When the mapping is passed to the compiler, it will replace calls to
- * goog.getCssName with the strings from the mapping, e.g.
- *     var x = goog.getCssName('foo');
- *     var y = goog.getCssName(this.baseClass, 'active');
- *  becomes:
- *     var x = 'foo';
- *     var y = this.baseClass + '-active';
- *
- * If one argument is passed it will be processed, if two are passed only the
- * modifier will be processed, as it is assumed the first argument was generated
- * as a result of calling goog.getCssName.
- *
- * @param {string} className The class name.
- * @param {string=} opt_modifier A modifier to be appended to the class name.
- * @return {string} The class name or the concatenation of the class name and
- *     the modifier.
- */
-goog.getCssName = function(className, opt_modifier) {
-  // String() is used for compatibility with compiled soy where the passed
-  // className can be non-string objects.
-  if (String(className).charAt(0) == '.') {
-    throw new Error(
-        'className passed in goog.getCssName must not start with ".".' +
-        ' You passed: ' + className);
-  }
-
-  var getMapping = function(cssName) {
-    return goog.cssNameMapping_[cssName] || cssName;
-  };
-
-  var renameByParts = function(cssName) {
-    // Remap all the parts individually.
-    var parts = cssName.split('-');
-    var mapped = [];
-    for (var i = 0; i < parts.length; i++) {
-      mapped.push(getMapping(parts[i]));
-    }
-    return mapped.join('-');
-  };
-
-  var rename;
-  if (goog.cssNameMapping_) {
-    rename =
-        goog.cssNameMappingStyle_ == 'BY_WHOLE' ? getMapping : renameByParts;
-  } else {
-    rename = function(a) {
-      return a;
-    };
-  }
-
-  var result =
-      opt_modifier ? className + '-' + rename(opt_modifier) : rename(className);
-
-  // The special CLOSURE_CSS_NAME_MAP_FN allows users to specify further
-  // processing of the class name.
-  if (goog.global.CLOSURE_CSS_NAME_MAP_FN) {
-    return goog.global.CLOSURE_CSS_NAME_MAP_FN(result);
-  }
-
-  return result;
-};
-
-
-/**
- * Sets the map to check when returning a value from goog.getCssName(). Example:
- * <pre>
- * goog.setCssNameMapping({
- *   "goog": "a",
- *   "disabled": "b",
- * });
- *
- * var x = goog.getCssName('goog');
- * // The following evaluates to: "a a-b".
- * goog.getCssName('goog') + ' ' + goog.getCssName(x, 'disabled')
- * </pre>
- * When declared as a map of string literals to string literals, the JSCompiler
- * will replace all calls to goog.getCssName() using the supplied map if the
- * --process_closure_primitives flag is set.
- *
- * @param {!Object} mapping A map of strings to strings where keys are possible
- *     arguments to goog.getCssName() and values are the corresponding values
- *     that should be returned.
- * @param {string=} opt_style The style of css name mapping. There are two valid
- *     options: 'BY_PART', and 'BY_WHOLE'.
- * @see goog.getCssName for a description.
- */
-goog.setCssNameMapping = function(mapping, opt_style) {
-  goog.cssNameMapping_ = mapping;
-  goog.cssNameMappingStyle_ = opt_style;
-};
-
-
-/**
- * To use CSS renaming in compiled mode, one of the input files should have a
- * call to goog.setCssNameMapping() with an object literal that the JSCompiler
- * can extract and use to replace all calls to goog.getCssName(). In uncompiled
- * mode, JavaScript code should be loaded before this base.js file that declares
- * a global variable, CLOSURE_CSS_NAME_MAPPING, which is used below. This is
- * to ensure that the mapping is loaded before any calls to goog.getCssName()
- * are made in uncompiled mode.
- *
- * A hook for overriding the CSS name mapping.
- * @type {!Object<string, string>|undefined}
- */
-goog.global.CLOSURE_CSS_NAME_MAPPING;
-
-
-if (!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING) {
-  // This does not call goog.setCssNameMapping() because the JSCompiler
-  // requires that goog.setCssNameMapping() be called with an object literal.
-  goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING;
-}
-
-
-/**
- * Gets a localized message.
- *
- * This function is a compiler primitive. If you give the compiler a localized
- * message bundle, it will replace the string at compile-time with a localized
- * version, and expand goog.getMsg call to a concatenated string.
- *
- * Messages must be initialized in the form:
- * <code>
- * var MSG_NAME = goog.getMsg('Hello {$placeholder}', {'placeholder': 'world'});
- * </code>
- *
- * This function produces a string which should be treated as plain text. Use
- * {@link goog.html.SafeHtmlFormatter} in conjunction with goog.getMsg to
- * produce SafeHtml.
- *
- * @param {string} str Translatable string, places holders in the form {$foo}.
- * @param {Object<string, string>=} opt_values Maps place holder name to value.
- * @return {string} message with placeholders filled.
- */
-goog.getMsg = function(str, opt_values) {
-  if (opt_values) {
-    str = str.replace(/\{\$([^}]+)}/g, function(match, key) {
-      return (opt_values != null && key in opt_values) ? opt_values[key] :
-                                                         match;
-    });
-  }
-  return str;
-};
-
-
-/**
- * Gets a localized message. If the message does not have a translation, gives a
- * fallback message.
- *
- * This is useful when introducing a new message that has not yet been
- * translated into all languages.
- *
- * This function is a compiler primitive. Must be used in the form:
- * <code>var x = goog.getMsgWithFallback(MSG_A, MSG_B);</code>
- * where MSG_A and MSG_B were initialized with goog.getMsg.
- *
- * @param {string} a The preferred message.
- * @param {string} b The fallback message.
- * @return {string} The best translated message.
- */
-goog.getMsgWithFallback = function(a, b) {
-  return a;
-};
-
-
-/**
- * Exposes an unobfuscated global namespace path for the given object.
- * Note that fields of the exported object *will* be obfuscated, unless they are
- * exported in turn via this function or goog.exportProperty.
- *
- * Also handy for making public items that are defined in anonymous closures.
- *
- * ex. goog.exportSymbol('public.path.Foo', Foo);
- *
- * ex. goog.exportSymbol('public.path.Foo.staticFunction', Foo.staticFunction);
- *     public.path.Foo.staticFunction();
- *
- * ex. goog.exportSymbol('public.path.Foo.prototype.myMethod',
- *                       Foo.prototype.myMethod);
- *     new public.path.Foo().myMethod();
- *
- * @param {string} publicPath Unobfuscated name to export.
- * @param {*} object Object the name should point to.
- * @param {Object=} opt_objectToExportTo The object to add the path to; default
- *     is goog.global.
- */
-goog.exportSymbol = function(publicPath, object, opt_objectToExportTo) {
-  goog.exportPath_(publicPath, object, opt_objectToExportTo);
-};
-
-
-/**
- * Exports a property unobfuscated into the object's namespace.
- * ex. goog.exportProperty(Foo, 'staticFunction', Foo.staticFunction);
- * ex. goog.exportProperty(Foo.prototype, 'myMethod', Foo.prototype.myMethod);
- * @param {Object} object Object whose static property is being exported.
- * @param {string} publicName Unobfuscated name to export.
- * @param {*} symbol Object the name should point to.
- */
-goog.exportProperty = function(object, publicName, symbol) {
-  object[publicName] = symbol;
-};
-
-
-/**
- * Inherit the prototype methods from one constructor into another.
- *
- * Usage:
- * <pre>
- * function ParentClass(a, b) { }
- * ParentClass.prototype.foo = function(a) { };
- *
- * function ChildClass(a, b, c) {
- *   ChildClass.base(this, 'constructor', a, b);
- * }
- * goog.inherits(ChildClass, ParentClass);
- *
- * var child = new ChildClass('a', 'b', 'see');
- * child.foo(); // This works.
- * </pre>
- *
- * @param {!Function} childCtor Child class.
- * @param {!Function} parentCtor Parent class.
- */
-goog.inherits = function(childCtor, parentCtor) {
-  /** @constructor */
-  function tempCtor() {}
-  tempCtor.prototype = parentCtor.prototype;
-  childCtor.superClass_ = parentCtor.prototype;
-  childCtor.prototype = new tempCtor();
-  /** @override */
-  childCtor.prototype.constructor = childCtor;
-
-  /**
-   * Calls superclass constructor/method.
-   *
-   * This function is only available if you use goog.inherits to
-   * express inheritance relationships between classes.
-   *
-   * NOTE: This is a replacement for goog.base and for superClass_
-   * property defined in childCtor.
-   *
-   * @param {!Object} me Should always be "this".
-   * @param {string} methodName The method name to call. Calling
-   *     superclass constructor can be done with the special string
-   *     'constructor'.
-   * @param {...*} var_args The arguments to pass to superclass
-   *     method/constructor.
-   * @return {*} The return value of the superclass method/constructor.
-   */
-  childCtor.base = function(me, methodName, var_args) {
-    // Copying using loop to avoid deop due to passing arguments object to
-    // function. This is faster in many JS engines as of late 2014.
-    var args = new Array(arguments.length - 2);
-    for (var i = 2; i < arguments.length; i++) {
-      args[i - 2] = arguments[i];
-    }
-    return parentCtor.prototype[methodName].apply(me, args);
-  };
-};
-
-
-/**
- * Call up to the superclass.
- *
- * If this is called from a constructor, then this calls the superclass
- * constructor with arguments 1-N.
- *
- * If this is called from a prototype method, then you must pass the name of the
- * method as the second argument to this function. If you do not, you will get a
- * runtime error. This calls the superclass' method with arguments 2-N.
- *
- * This function only works if you use goog.inherits to express inheritance
- * relationships between your classes.
- *
- * This function is a compiler primitive. At compile-time, the compiler will do
- * macro expansion to remove a lot of the extra overhead that this function
- * introduces. The compiler will also enforce a lot of the assumptions that this
- * function makes, and treat it as a compiler error if you break them.
- *
- * @param {!Object} me Should always be "this".
- * @param {*=} opt_methodName The method name if calling a super method.
- * @param {...*} var_args The rest of the arguments.
- * @return {*} The return value of the superclass method.
- * @suppress {es5Strict} This method can not be used in strict mode, but
- *     all Closure Library consumers must depend on this file.
- */
-goog.base = function(me, opt_methodName, var_args) {
-  var caller = arguments.callee.caller;
-
-  if (goog.STRICT_MODE_COMPATIBLE || (goog.DEBUG && !caller)) {
-    throw Error(
-        'arguments.caller not defined.  goog.base() cannot be used ' +
-        'with strict mode code. See ' +
-        'http://www.ecma-international.org/ecma-262/5.1/#sec-C');
-  }
-
-  if (caller.superClass_) {
-    // Copying using loop to avoid deop due to passing arguments object to
-    // function. This is faster in many JS engines as of late 2014.
-    var ctorArgs = new Array(arguments.length - 1);
-    for (var i = 1; i < arguments.length; i++) {
-      ctorArgs[i - 1] = arguments[i];
-    }
-    // This is a constructor. Call the superclass constructor.
-    return caller.superClass_.constructor.apply(me, ctorArgs);
-  }
-
-  // Copying using loop to avoid deop due to passing arguments object to
-  // function. This is faster in many JS engines as of late 2014.
-  var args = new Array(arguments.length - 2);
-  for (var i = 2; i < arguments.length; i++) {
-    args[i - 2] = arguments[i];
-  }
-  var foundCaller = false;
-  for (var ctor = me.constructor; ctor;
-       ctor = ctor.superClass_ && ctor.superClass_.constructor) {
-    if (ctor.prototype[opt_methodName] === caller) {
-      foundCaller = true;
-    } else if (foundCaller) {
-      return ctor.prototype[opt_methodName].apply(me, args);
-    }
-  }
-
-  // If we did not find the caller in the prototype chain, then one of two
-  // things happened:
-  // 1) The caller is an instance method.
-  // 2) This method was not called by the right caller.
-  if (me[opt_methodName] === caller) {
-    return me.constructor.prototype[opt_methodName].apply(me, args);
-  } else {
-    throw Error(
-        'goog.base called from a method of one name ' +
-        'to a method of a different name');
-  }
-};
-
-
-/**
- * Allow for aliasing within scope functions.  This function exists for
- * uncompiled code - in compiled code the calls will be inlined and the aliases
- * applied.  In uncompiled code the function is simply run since the aliases as
- * written are valid JavaScript.
- *
- *
- * @param {function()} fn Function to call.  This function can contain aliases
- *     to namespaces (e.g. "var dom = goog.dom") or classes
- *     (e.g. "var Timer = goog.Timer").
- */
-goog.scope = function(fn) {
-  if (goog.isInModuleLoader_()) {
-    throw Error('goog.scope is not supported within a goog.module.');
-  }
-  fn.call(goog.global);
-};
-
-
-/*
- * To support uncompiled, strict mode bundles that use eval to divide source
- * like so:
- *    eval('someSource;//# sourceUrl sourcefile.js');
- * We need to export the globally defined symbols "goog" and "COMPILED".
- * Exporting "goog" breaks the compiler optimizations, so we required that
- * be defined externally.
- * NOTE: We don't use goog.exportSymbol here because we don't want to trigger
- * extern generation when that compiler option is enabled.
- */
-if (!COMPILED) {
-  goog.global['COMPILED'] = COMPILED;
-}
-
-
-//==============================================================================
-// goog.defineClass implementation
-//==============================================================================
-
-
-/**
- * Creates a restricted form of a Closure "class":
- *   - from the compiler's perspective, the instance returned from the
- *     constructor is sealed (no new properties may be added).  This enables
- *     better checks.
- *   - the compiler will rewrite this definition to a form that is optimal
- *     for type checking and optimization (initially this will be a more
- *     traditional form).
- *
- * @param {Function} superClass The superclass, Object or null.
- * @param {goog.defineClass.ClassDescriptor} def
- *     An object literal describing
- *     the class.  It may have the following properties:
- *     "constructor": the constructor function
- *     "statics": an object literal containing methods to add to the constructor
- *        as "static" methods or a function that will receive the constructor
- *        function as its only parameter to which static properties can
- *        be added.
- *     all other properties are added to the prototype.
- * @return {!Function} The class constructor.
- */
-goog.defineClass = function(superClass, def) {
-  // TODO(johnlenz): consider making the superClass an optional parameter.
-  var constructor = def.constructor;
-  var statics = def.statics;
-  // Wrap the constructor prior to setting up the prototype and static methods.
-  if (!constructor || constructor == Object.prototype.constructor) {
-    constructor = function() {
-      throw Error('cannot instantiate an interface (no constructor defined).');
-    };
-  }
-
-  var cls = goog.defineClass.createSealingConstructor_(constructor, superClass);
-  if (superClass) {
-    goog.inherits(cls, superClass);
-  }
-
-  // Remove all the properties that should not be copied to the prototype.
-  delete def.constructor;
-  delete def.statics;
-
-  goog.defineClass.applyProperties_(cls.prototype, def);
-  if (statics != null) {
-    if (statics instanceof Function) {
-      statics(cls);
-    } else {
-      goog.defineClass.applyProperties_(cls, statics);
-    }
-  }
-
-  return cls;
-};
-
-
-/**
- * @typedef {{
- *   constructor: (!Function|undefined),
- *   statics: (Object|undefined|function(Function):void)
- * }}
- */
-goog.defineClass.ClassDescriptor;
-
-
-/**
- * @define {boolean} Whether the instances returned by goog.defineClass should
- *     be sealed when possible.
- *
- * When sealing is disabled the constructor function will not be wrapped by
- * goog.defineClass, making it incompatible with ES6 class methods.
- */
-goog.define('goog.defineClass.SEAL_CLASS_INSTANCES', goog.DEBUG);
-
-
-/**
- * If goog.defineClass.SEAL_CLASS_INSTANCES is enabled and Object.seal is
- * defined, this function will wrap the constructor in a function that seals the
- * results of the provided constructor function.
- *
- * @param {!Function} ctr The constructor whose results maybe be sealed.
- * @param {Function} superClass The superclass constructor.
- * @return {!Function} The replacement constructor.
- * @private
- */
-goog.defineClass.createSealingConstructor_ = function(ctr, superClass) {
-  if (!goog.defineClass.SEAL_CLASS_INSTANCES) {
-    // Do now wrap the constructor when sealing is disabled. Angular code
-    // depends on this for injection to work properly.
-    return ctr;
-  }
-
-  // Compute whether the constructor is sealable at definition time, rather
-  // than when the instance is being constructed.
-  var superclassSealable = !goog.defineClass.isUnsealable_(superClass);
-
-  /**
-   * @this {Object}
-   * @return {?}
-   */
-  var wrappedCtr = function() {
-    // Don't seal an instance of a subclass when it calls the constructor of
-    // its super class as there is most likely still setup to do.
-    var instance = ctr.apply(this, arguments) || this;
-    instance[goog.UID_PROPERTY_] = instance[goog.UID_PROPERTY_];
-
-    if (this.constructor === wrappedCtr && superclassSealable &&
-        Object.seal instanceof Function) {
-      Object.seal(instance);
-    }
-    return instance;
-  };
-
-  return wrappedCtr;
-};
-
-
-/**
- * @param {Function} ctr The constructor to test.
- * @return {boolean} Whether the constructor has been tagged as unsealable
- *     using goog.tagUnsealableClass.
- * @private
- */
-goog.defineClass.isUnsealable_ = function(ctr) {
-  return ctr && ctr.prototype &&
-      ctr.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_];
-};
-
-
-// TODO(johnlenz): share these values with the goog.object
-/**
- * The names of the fields that are defined on Object.prototype.
- * @type {!Array<string>}
- * @private
- * @const
- */
-goog.defineClass.OBJECT_PROTOTYPE_FIELDS_ = [
-  'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',
-  'toLocaleString', 'toString', 'valueOf'
-];
-
-
-// TODO(johnlenz): share this function with the goog.object
-/**
- * @param {!Object} target The object to add properties to.
- * @param {!Object} source The object to copy properties from.
- * @private
- */
-goog.defineClass.applyProperties_ = function(target, source) {
-  // TODO(johnlenz): update this to support ES5 getters/setters
-
-  var key;
-  for (key in source) {
-    if (Object.prototype.hasOwnProperty.call(source, key)) {
-      target[key] = source[key];
-    }
-  }
-
-  // For IE the for-in-loop does not contain any properties that are not
-  // enumerable on the prototype object (for example isPrototypeOf from
-  // Object.prototype) and it will also not include 'replace' on objects that
-  // extend String and change 'replace' (not that it is common for anyone to
-  // extend anything except Object).
-  for (var i = 0; i < goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length; i++) {
-    key = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[i];
-    if (Object.prototype.hasOwnProperty.call(source, key)) {
-      target[key] = source[key];
-    }
-  }
-};
-
-
-/**
- * Sealing classes breaks the older idiom of assigning properties on the
- * prototype rather than in the constructor. As such, goog.defineClass
- * must not seal subclasses of these old-style classes until they are fixed.
- * Until then, this marks a class as "broken", instructing defineClass
- * not to seal subclasses.
- * @param {!Function} ctr The legacy constructor to tag as unsealable.
- */
-goog.tagUnsealableClass = function(ctr) {
-  if (!COMPILED && goog.defineClass.SEAL_CLASS_INSTANCES) {
-    ctr.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_] = true;
-  }
-};
-
-
-/**
- * Name for unsealable tag property.
- * @const @private {string}
- */
-goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_ = 'goog_defineClass_legacy_unsealable';
-
-
-/**
- * Returns a newly created map from language mode string to a boolean
- * indicating whether transpilation should be done for that mode.
- *
- * Guaranteed invariant:
- * For any two modes, l1 and l2 where l2 is a newer mode than l1,
- * `map[l1] == true` implies that `map[l2] == true`.
- * @private
- * @return {!Object<string, boolean>}
- */
-goog.createRequiresTranspilation_ = function() {
-  var /** !Object<string, boolean> */ requiresTranspilation = {'es3': false};
-  var transpilationRequiredForAllLaterModes = false;
-
-  /**
-   * Adds an entry to requiresTranspliation for the given language mode.
-   *
-   * IMPORTANT: Calls must be made in order from oldest to newest language
-   * mode.
-   * @param {string} modeName
-   * @param {function(): boolean} isSupported Returns true if the JS engine
-   *     supports the given mode.
-   */
-  function addNewerLanguageTranspilationCheck(modeName, isSupported) {
-    if (transpilationRequiredForAllLaterModes) {
-      requiresTranspilation[modeName] = true;
-    } else if (isSupported()) {
-      requiresTranspilation[modeName] = false;
-    } else {
-      requiresTranspilation[modeName] = true;
-      transpilationRequiredForAllLaterModes = true;
-    }
-  }
-
-  /**
-   * Does the given code evaluate without syntax errors and return a truthy
-   * result?
-   */
-  function /** boolean */ evalCheck(/** string */ code) {
-    try {
-      return !!eval(code);
-    } catch (ignored) {
-      return false;
-    }
-  }
-
-  var userAgent = goog.global.navigator && goog.global.navigator.userAgent ?
-      goog.global.navigator.userAgent :
-      '';
-
-  // Identify ES3-only browsers by their incorrect treatment of commas.
-  addNewerLanguageTranspilationCheck('es5', function() {
-    return evalCheck('[1,].length==1');
-  });
-  addNewerLanguageTranspilationCheck('es6', function() {
-    // Edge has a non-deterministic (i.e., not reproducible) bug with ES6:
-    // https://github.com/Microsoft/ChakraCore/issues/1496.
-    var re = /Edge\/(\d+)(\.\d)*/i;
-    var edgeUserAgent = userAgent.match(re);
-    if (edgeUserAgent && Number(edgeUserAgent[1]) < 15) {
-      return false;
-    }
-    // Test es6: [FF50 (?), Edge 14 (?), Chrome 50]
-    //   (a) default params (specifically shadowing locals),
-    //   (b) destructuring, (c) block-scoped functions,
-    //   (d) for-of (const), (e) new.target/Reflect.construct
-    var es6fullTest =
-        'class X{constructor(){if(new.target!=String)throw 1;this.x=42}}' +
-        'let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof ' +
-        'String))throw 1;for(const a of[2,3]){if(a==2)continue;function ' +
-        'f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()' +
-        '==3}';
-
-    return evalCheck('(()=>{"use strict";' + es6fullTest + '})()');
-  });
-  // TODO(joeltine): Remove es6-impl references for b/31340605.
-  // Consider es6-impl (widely-implemented es6 features) to be supported
-  // whenever es6 is supported. Technically es6-impl is a lower level of
-  // support than es6, but we don't have tests specifically for it.
-  addNewerLanguageTranspilationCheck('es6-impl', function() {
-    return true;
-  });
-  // ** and **= are the only new features in 'es7'
-  addNewerLanguageTranspilationCheck('es7', function() {
-    return evalCheck('2 ** 2 == 4');
-  });
-  // async functions are the only new features in 'es8'
-  addNewerLanguageTranspilationCheck('es8', function() {
-    return evalCheck('async () => 1, true');
-  });
-  return requiresTranspilation;
-};
-
-goog.provide('ol.array');
-
-
-/**
- * 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.
- * https://github.com/darkskyapp/binary-search
- *
- * @param {Array.<*>} haystack Items to search through.
- * @param {*} needle The item to look for.
- * @param {Function=} opt_comparator Comparator function.
- * @return {number} The index of the item if found, -1 if not.
- */
-ol.array.binarySearch = function(haystack, needle, opt_comparator) {
-  var mid, cmp;
-  var comparator = opt_comparator || ol.array.numberSafeCompareFunction;
-  var low = 0;
-  var high = haystack.length;
-  var found = false;
-
-  while (low < high) {
-    /* Note that "(low + high) >>> 1" may overflow, and results in a typecast
-     * to double (which gives the wrong results). */
-    mid = low + (high - low >> 1);
-    cmp = +comparator(haystack[mid], needle);
-
-    if (cmp < 0.0) { /* Too low. */
-      low  = mid + 1;
-
-    } else { /* Key found or too high */
-      high = mid;
-      found = !cmp;
-    }
-  }
-
-  /* Key not found. */
-  return found ? low : ~low;
-};
-
-
-/**
- * Compare function for array sort that is safe for numbers.
- * @param {*} a The first object to be compared.
- * @param {*} b The second object to be compared.
- * @return {number} A negative number, zero, or a positive number as the first
- *     argument is less than, equal to, or greater than the second.
- */
-ol.array.numberSafeCompareFunction = function(a, b) {
-  return a > b ? 1 : a < b ? -1 : 0;
-};
-
-
-/**
- * Whether the array contains the given object.
- * @param {Array.<*>} arr The array to test for the presence of the element.
- * @param {*} obj The object for which to test.
- * @return {boolean} The object is in the array.
- */
-ol.array.includes = function(arr, obj) {
-  return arr.indexOf(obj) >= 0;
-};
-
-
-/**
- * @param {Array.<number>} arr Array.
- * @param {number} target Target.
- * @param {number} direction 0 means return the nearest, > 0
- *    means return the largest nearest, < 0 means return the
- *    smallest nearest.
- * @return {number} Index.
- */
-ol.array.linearFindNearest = function(arr, target, direction) {
-  var n = arr.length;
-  if (arr[0] <= target) {
-    return 0;
-  } else if (target <= arr[n - 1]) {
-    return n - 1;
-  } else {
-    var i;
-    if (direction > 0) {
-      for (i = 1; i < n; ++i) {
-        if (arr[i] < target) {
-          return i - 1;
-        }
-      }
-    } else if (direction < 0) {
-      for (i = 1; i < n; ++i) {
-        if (arr[i] <= target) {
-          return i;
-        }
-      }
-    } else {
-      for (i = 1; i < n; ++i) {
-        if (arr[i] == target) {
-          return i;
-        } else if (arr[i] < target) {
-          if (arr[i - 1] - target < target - arr[i]) {
-            return i - 1;
-          } else {
-            return i;
-          }
-        }
-      }
-    }
-    return n - 1;
-  }
-};
-
-
-/**
- * @param {Array.<*>} arr Array.
- * @param {number} begin Begin index.
- * @param {number} end End index.
- */
-ol.array.reverseSubArray = function(arr, begin, end) {
-  while (begin < end) {
-    var tmp = arr[begin];
-    arr[begin] = arr[end];
-    arr[end] = tmp;
-    ++begin;
-    --end;
-  }
-};
-
-
-/**
- * @param {Array.<VALUE>} arr The array to modify.
- * @param {Array.<VALUE>|VALUE} data The elements or arrays of elements
- *     to add to arr.
- * @template VALUE
- */
-ol.array.extend = function(arr, data) {
-  var i;
-  var extension = Array.isArray(data) ? data : [data];
-  var length = extension.length;
-  for (i = 0; i < length; i++) {
-    arr[arr.length] = extension[i];
-  }
-};
-
-
-/**
- * @param {Array.<VALUE>} arr The array to modify.
- * @param {VALUE} obj The element to remove.
- * @template VALUE
- * @return {boolean} If the element was removed.
- */
-ol.array.remove = function(arr, obj) {
-  var i = arr.indexOf(obj);
-  var found = i > -1;
-  if (found) {
-    arr.splice(i, 1);
-  }
-  return found;
-};
-
-
-/**
- * @param {Array.<VALUE>} arr The array to search in.
- * @param {function(VALUE, number, ?) : boolean} func The function to compare.
- * @template VALUE
- * @return {VALUE} The element found.
- */
-ol.array.find = function(arr, func) {
-  var length = arr.length >>> 0;
-  var value;
-
-  for (var i = 0; i < length; i++) {
-    value = arr[i];
-    if (func(value, i, arr)) {
-      return value;
-    }
-  }
-  return null;
-};
-
-
-/**
- * @param {Array|Uint8ClampedArray} arr1 The first array to compare.
- * @param {Array|Uint8ClampedArray} arr2 The second array to compare.
- * @return {boolean} Whether the two arrays are equal.
- */
-ol.array.equals = function(arr1, arr2) {
-  var len1 = arr1.length;
-  if (len1 !== arr2.length) {
-    return false;
-  }
-  for (var i = 0; i < len1; i++) {
-    if (arr1[i] !== arr2[i]) {
-      return false;
-    }
-  }
-  return true;
-};
-
-
-/**
- * @param {Array.<*>} arr The array to sort (modifies original).
- * @param {Function} compareFnc Comparison function.
- */
-ol.array.stableSort = function(arr, compareFnc) {
-  var length = arr.length;
-  var tmp = Array(arr.length);
-  var i;
-  for (i = 0; i < length; i++) {
-    tmp[i] = {index: i, value: arr[i]};
-  }
-  tmp.sort(function(a, b) {
-    return compareFnc(a.value, b.value) || a.index - b.index;
-  });
-  for (i = 0; i < arr.length; i++) {
-    arr[i] = tmp[i].value;
-  }
-};
-
-
-/**
- * @param {Array.<*>} arr The array to search in.
- * @param {Function} func Comparison function.
- * @return {number} Return index.
- */
-ol.array.findIndex = function(arr, func) {
-  var index;
-  var found = !arr.every(function(el, idx) {
-    index = idx;
-    return !func(el, idx, arr);
-  });
-  return found ? index : -1;
-};
-
-
-/**
- * @param {Array.<*>} arr The array to test.
- * @param {Function=} opt_func Comparison function.
- * @param {boolean=} opt_strict Strictly sorted (default false).
- * @return {boolean} Return index.
- */
-ol.array.isSorted = function(arr, opt_func, opt_strict) {
-  var compare = opt_func || ol.array.numberSafeCompareFunction;
-  return arr.every(function(currentVal, index) {
-    if (index === 0) {
-      return true;
-    }
-    var res = compare(arr[index - 1], currentVal);
-    return !(res > 0 || opt_strict && res === 0);
-  });
-};
-
-goog.provide('ol');
-
-
-/**
- * Constants defined with the define tag cannot be changed in application
- * code, but can be set at compile time.
- * Some reduce the size of the build in advanced compile mode.
- */
-
-
-/**
- * @define {boolean} Assume touch.  Default is `false`.
- */
-ol.ASSUME_TOUCH = false;
-
-
-/**
- * TODO: rename this to something having to do with tile grids
- * see https://github.com/openlayers/openlayers/issues/2076
- * @define {number} Default maximum zoom for default tile grids.
- */
-ol.DEFAULT_MAX_ZOOM = 42;
-
-
-/**
- * @define {number} Default min zoom level for the map view.  Default is `0`.
- */
-ol.DEFAULT_MIN_ZOOM = 0;
-
-
-/**
- * @define {number} Default maximum allowed threshold  (in pixels) for
- *     reprojection triangulation. Default is `0.5`.
- */
-ol.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD = 0.5;
-
-
-/**
- * @define {number} Default tile size.
- */
-ol.DEFAULT_TILE_SIZE = 256;
-
-
-/**
- * @define {string} Default WMS version.
- */
-ol.DEFAULT_WMS_VERSION = '1.3.0';
-
-
-/**
- * @define {boolean} Enable the Canvas renderer.  Default is `true`. Setting
- *     this to false at compile time in advanced mode removes all code
- *     supporting the Canvas renderer from the build.
- */
-ol.ENABLE_CANVAS = true;
-
-
-/**
- * @define {boolean} Enable integration with the Proj4js library.  Default is
- *     `true`.
- */
-ol.ENABLE_PROJ4JS = true;
-
-
-/**
- * @define {boolean} Enable automatic reprojection of raster sources. Default is
- *     `true`.
- */
-ol.ENABLE_RASTER_REPROJECTION = true;
-
-
-/**
- * @define {boolean} Enable the WebGL renderer.  Default is `true`. Setting
- *     this to false at compile time in advanced mode removes all code
- *     supporting the WebGL renderer from the build.
- */
-ol.ENABLE_WEBGL = true;
-
-
-/**
- * @define {boolean} Include debuggable shader sources.  Default is `true`.
- *     This should be set to `false` for production builds (if `ol.ENABLE_WEBGL`
- *     is `true`).
- */
-ol.DEBUG_WEBGL = true;
-
-
-/**
- * @define {number} The size in pixels of the first atlas image. Default is
- * `256`.
- */
-ol.INITIAL_ATLAS_SIZE = 256;
-
-
-/**
- * @define {number} The maximum size in pixels of atlas images. Default is
- * `-1`, meaning it is not used (and `ol.WEBGL_MAX_TEXTURE_SIZE` is
- * used instead).
- */
-ol.MAX_ATLAS_SIZE = -1;
-
-
-/**
- * @define {number} Maximum mouse wheel delta.
- */
-ol.MOUSEWHEELZOOM_MAXDELTA = 1;
-
-
-/**
- * @define {number} Maximum width and/or height extent ratio that determines
- * when the overview map should be zoomed out.
- */
-ol.OVERVIEWMAP_MAX_RATIO = 0.75;
-
-
-/**
- * @define {number} Minimum width and/or height extent ratio that determines
- * when the overview map should be zoomed in.
- */
-ol.OVERVIEWMAP_MIN_RATIO = 0.1;
-
-
-/**
- * @define {number} Maximum number of source tiles for raster reprojection of
- *     a single tile.
- *     If too many source tiles are determined to be loaded to create a single
- *     reprojected tile the browser can become unresponsive or even crash.
- *     This can happen if the developer defines projections improperly and/or
- *     with unlimited extents.
- *     If too many tiles are required, no tiles are loaded and
- *     `ol.TileState.ERROR` state is set. Default is `100`.
- */
-ol.RASTER_REPROJECTION_MAX_SOURCE_TILES = 100;
-
-
-/**
- * @define {number} Maximum number of subdivision steps during raster
- *     reprojection triangulation. Prevents high memory usage and large
- *     number of proj4 calls (for certain transformations and areas).
- *     At most `2*(2^this)` triangles are created for each triangulated
- *     extent (tile/image). Default is `10`.
- */
-ol.RASTER_REPROJECTION_MAX_SUBDIVISION = 10;
-
-
-/**
- * @define {number} Maximum allowed size of triangle relative to world width.
- *     When transforming corners of world extent between certain projections,
- *     the resulting triangulation seems to have zero error and no subdivision
- *     is performed.
- *     If the triangle width is more than this (relative to world width; 0-1),
- *     subdivison is forced (up to `ol.RASTER_REPROJECTION_MAX_SUBDIVISION`).
- *     Default is `0.25`.
- */
-ol.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH = 0.25;
-
-
-/**
- * @define {number} Tolerance for geometry simplification in device pixels.
- */
-ol.SIMPLIFY_TOLERANCE = 0.5;
-
-
-/**
- * @define {number} Texture cache high water mark.
- */
-ol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024;
-
-
-/**
- * @define {string} OpenLayers version.
- */
-ol.VERSION = '';
-
-
-/**
- * The maximum supported WebGL texture size in pixels. If WebGL is not
- * supported, the value is set to `undefined`.
- * @const
- * @type {number|undefined}
- */
-ol.WEBGL_MAX_TEXTURE_SIZE; // value is set in `ol.has`
-
-
-/**
- * List of supported WebGL extensions.
- * @const
- * @type {Array.<string>}
- */
-ol.WEBGL_EXTENSIONS; // value is set in `ol.has`
-
-
-/**
- * Inherit the prototype methods from one constructor into another.
- *
- * Usage:
- *
- *     function ParentClass(a, b) { }
- *     ParentClass.prototype.foo = function(a) { }
- *
- *     function ChildClass(a, b, c) {
- *       // Call parent constructor
- *       ParentClass.call(this, a, b);
- *     }
- *     ol.inherits(ChildClass, ParentClass);
- *
- *     var child = new ChildClass('a', 'b', 'see');
- *     child.foo(); // This works.
- *
- * @param {!Function} childCtor Child constructor.
- * @param {!Function} parentCtor Parent constructor.
- * @function
- * @api
- */
-ol.inherits = function(childCtor, parentCtor) {
-  childCtor.prototype = Object.create(parentCtor.prototype);
-  childCtor.prototype.constructor = childCtor;
-};
-
-
-/**
- * A reusable function, used e.g. as a default for callbacks.
- *
- * @return {undefined} Nothing.
- */
-ol.nullFunction = function() {};
-
-
-/**
- * Gets a unique ID for an object. This mutates the object so that further calls
- * with the same object as a parameter returns the same value. Unique IDs are generated
- * as a strictly increasing sequence. Adapted from goog.getUid.
- *
- * @param {Object} obj The object to get the unique ID for.
- * @return {number} The unique ID for the object.
- */
-ol.getUid = function(obj) {
-  return obj.ol_uid ||
-      (obj.ol_uid = ++ol.uidCounter_);
-};
-
-
-/**
- * Counter for getUid.
- * @type {number}
- * @private
- */
-ol.uidCounter_ = 0;
-
-goog.provide('ol.AssertionError');
-
-goog.require('ol');
-
-/**
- * Error object thrown when an assertion failed. This is an ECMA-262 Error,
- * extended with a `code` property.
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error}
- * @constructor
- * @extends {Error}
- * @implements {oli.AssertionError}
- * @param {number} code Error code.
- */
-ol.AssertionError = function(code) {
-
-  var path = ol.VERSION ? ol.VERSION.split('-')[0] : 'latest';
-
-  /**
-   * @type {string}
-   */
-  this.message = 'Assertion failed. See https://openlayers.org/en/' + path +
-      '/doc/errors/#' + code + ' for details.';
-
-  /**
-   * Error code. The meaning of the code can be found on
-   * {@link https://openlayers.org/en/latest/doc/errors/} (replace `latest` with
-   * the version found in the OpenLayers script's header comment if a version
-   * other than the latest is used).
-   * @type {number}
-   * @api
-   */
-  this.code = code;
-
-  this.name = 'AssertionError';
-
-};
-ol.inherits(ol.AssertionError, Error);
-
-goog.provide('ol.asserts');
-
-goog.require('ol.AssertionError');
-
-
-/**
- * @param {*} assertion Assertion we expected to be truthy.
- * @param {number} errorCode Error code.
- */
-ol.asserts.assert = function(assertion, errorCode) {
-  if (!assertion) {
-    throw new ol.AssertionError(errorCode);
-  }
-};
-
-goog.provide('ol.TileRange');
-
-
-/**
- * A representation of a contiguous block of tiles.  A tile range is specified
- * by its min/max tile coordinates and is inclusive of coordinates.
- *
- * @constructor
- * @param {number} minX Minimum X.
- * @param {number} maxX Maximum X.
- * @param {number} minY Minimum Y.
- * @param {number} maxY Maximum Y.
- * @struct
- */
-ol.TileRange = function(minX, maxX, minY, maxY) {
-
-  /**
-   * @type {number}
-   */
-  this.minX = minX;
-
-  /**
-   * @type {number}
-   */
-  this.maxX = maxX;
-
-  /**
-   * @type {number}
-   */
-  this.minY = minY;
-
-  /**
-   * @type {number}
-   */
-  this.maxY = maxY;
-
-};
-
-
-/**
- * @param {number} minX Minimum X.
- * @param {number} maxX Maximum X.
- * @param {number} minY Minimum Y.
- * @param {number} maxY Maximum Y.
- * @param {ol.TileRange|undefined} tileRange TileRange.
- * @return {ol.TileRange} Tile range.
- */
-ol.TileRange.createOrUpdate = function(minX, maxX, minY, maxY, tileRange) {
-  if (tileRange !== undefined) {
-    tileRange.minX = minX;
-    tileRange.maxX = maxX;
-    tileRange.minY = minY;
-    tileRange.maxY = maxY;
-    return tileRange;
-  } else {
-    return new ol.TileRange(minX, maxX, minY, maxY);
-  }
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @return {boolean} Contains tile coordinate.
- */
-ol.TileRange.prototype.contains = function(tileCoord) {
-  return this.containsXY(tileCoord[1], tileCoord[2]);
-};
-
-
-/**
- * @param {ol.TileRange} tileRange Tile range.
- * @return {boolean} Contains.
- */
-ol.TileRange.prototype.containsTileRange = function(tileRange) {
-  return this.minX <= tileRange.minX && tileRange.maxX <= this.maxX &&
-      this.minY <= tileRange.minY && tileRange.maxY <= this.maxY;
-};
-
-
-/**
- * @param {number} x Tile coordinate x.
- * @param {number} y Tile coordinate y.
- * @return {boolean} Contains coordinate.
- */
-ol.TileRange.prototype.containsXY = function(x, y) {
-  return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;
-};
-
-
-/**
- * @param {ol.TileRange} tileRange Tile range.
- * @return {boolean} Equals.
- */
-ol.TileRange.prototype.equals = function(tileRange) {
-  return this.minX == tileRange.minX && this.minY == tileRange.minY &&
-      this.maxX == tileRange.maxX && this.maxY == tileRange.maxY;
-};
-
-
-/**
- * @param {ol.TileRange} tileRange Tile range.
- */
-ol.TileRange.prototype.extend = function(tileRange) {
-  if (tileRange.minX < this.minX) {
-    this.minX = tileRange.minX;
-  }
-  if (tileRange.maxX > this.maxX) {
-    this.maxX = tileRange.maxX;
-  }
-  if (tileRange.minY < this.minY) {
-    this.minY = tileRange.minY;
-  }
-  if (tileRange.maxY > this.maxY) {
-    this.maxY = tileRange.maxY;
-  }
-};
-
-
-/**
- * @return {number} Height.
- */
-ol.TileRange.prototype.getHeight = function() {
-  return this.maxY - this.minY + 1;
-};
-
-
-/**
- * @return {ol.Size} Size.
- */
-ol.TileRange.prototype.getSize = function() {
-  return [this.getWidth(), this.getHeight()];
-};
-
-
-/**
- * @return {number} Width.
- */
-ol.TileRange.prototype.getWidth = function() {
-  return this.maxX - this.minX + 1;
-};
-
-
-/**
- * @param {ol.TileRange} tileRange Tile range.
- * @return {boolean} Intersects.
- */
-ol.TileRange.prototype.intersects = function(tileRange) {
-  return this.minX <= tileRange.maxX &&
-      this.maxX >= tileRange.minX &&
-      this.minY <= tileRange.maxY &&
-      this.maxY >= tileRange.minY;
-};
-
-goog.provide('ol.math');
-
-goog.require('ol.asserts');
-
-
-/**
- * Takes a number and clamps it to within the provided bounds.
- * @param {number} value The input number.
- * @param {number} min The minimum value to return.
- * @param {number} max The maximum value to return.
- * @return {number} The input number if it is within bounds, or the nearest
- *     number within the bounds.
- */
-ol.math.clamp = function(value, min, max) {
-  return Math.min(Math.max(value, min), max);
-};
-
-
-/**
- * Return the hyperbolic cosine of a given number. The method will use the
- * native `Math.cosh` function if it is available, otherwise the hyperbolic
- * cosine will be calculated via the reference implementation of the Mozilla
- * developer network.
- *
- * @param {number} x X.
- * @return {number} Hyperbolic cosine of x.
- */
-ol.math.cosh = (function() {
-  // Wrapped in a iife, to save the overhead of checking for the native
-  // implementation on every invocation.
-  var cosh;
-  if ('cosh' in Math) {
-    // The environment supports the native Math.cosh function, use it…
-    cosh = Math.cosh;
-  } else {
-    // … else, use the reference implementation of MDN:
-    cosh = function(x) {
-      var y = Math.exp(x);
-      return (y + 1 / y) / 2;
-    };
-  }
-  return cosh;
-}());
-
-
-/**
- * @param {number} x X.
- * @return {number} The smallest power of two greater than or equal to x.
- */
-ol.math.roundUpToPowerOfTwo = function(x) {
-  ol.asserts.assert(0 < x, 29); // `x` must be greater than `0`
-  return Math.pow(2, Math.ceil(Math.log(x) / Math.LN2));
-};
-
-
-/**
- * Returns the square of the closest distance between the point (x, y) and the
- * line segment (x1, y1) to (x2, y2).
- * @param {number} x X.
- * @param {number} y Y.
- * @param {number} x1 X1.
- * @param {number} y1 Y1.
- * @param {number} x2 X2.
- * @param {number} y2 Y2.
- * @return {number} Squared distance.
- */
-ol.math.squaredSegmentDistance = function(x, y, x1, y1, x2, y2) {
-  var dx = x2 - x1;
-  var dy = y2 - y1;
-  if (dx !== 0 || dy !== 0) {
-    var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);
-    if (t > 1) {
-      x1 = x2;
-      y1 = y2;
-    } else if (t > 0) {
-      x1 += dx * t;
-      y1 += dy * t;
-    }
-  }
-  return ol.math.squaredDistance(x, y, x1, y1);
-};
-
-
-/**
- * Returns the square of the distance between the points (x1, y1) and (x2, y2).
- * @param {number} x1 X1.
- * @param {number} y1 Y1.
- * @param {number} x2 X2.
- * @param {number} y2 Y2.
- * @return {number} Squared distance.
- */
-ol.math.squaredDistance = function(x1, y1, x2, y2) {
-  var dx = x2 - x1;
-  var dy = y2 - y1;
-  return dx * dx + dy * dy;
-};
-
-
-/**
- * Solves system of linear equations using Gaussian elimination method.
- *
- * @param {Array.<Array.<number>>} mat Augmented matrix (n x n + 1 column)
- *                                     in row-major order.
- * @return {Array.<number>} The resulting vector.
- */
-ol.math.solveLinearSystem = function(mat) {
-  var n = mat.length;
-
-  for (var i = 0; i < n; i++) {
-    // Find max in the i-th column (ignoring i - 1 first rows)
-    var maxRow = i;
-    var maxEl = Math.abs(mat[i][i]);
-    for (var r = i + 1; r < n; r++) {
-      var absValue = Math.abs(mat[r][i]);
-      if (absValue > maxEl) {
-        maxEl = absValue;
-        maxRow = r;
-      }
-    }
-
-    if (maxEl === 0) {
-      return null; // matrix is singular
-    }
-
-    // Swap max row with i-th (current) row
-    var tmp = mat[maxRow];
-    mat[maxRow] = mat[i];
-    mat[i] = tmp;
-
-    // Subtract the i-th row to make all the remaining rows 0 in the i-th column
-    for (var j = i + 1; j < n; j++) {
-      var coef = -mat[j][i] / mat[i][i];
-      for (var k = i; k < n + 1; k++) {
-        if (i == k) {
-          mat[j][k] = 0;
-        } else {
-          mat[j][k] += coef * mat[i][k];
-        }
-      }
-    }
-  }
-
-  // Solve Ax=b for upper triangular matrix A (mat)
-  var x = new Array(n);
-  for (var l = n - 1; l >= 0; l--) {
-    x[l] = mat[l][n] / mat[l][l];
-    for (var m = l - 1; m >= 0; m--) {
-      mat[m][n] -= mat[m][l] * x[l];
-    }
-  }
-  return x;
-};
-
-
-/**
- * Converts radians to to degrees.
- *
- * @param {number} angleInRadians Angle in radians.
- * @return {number} Angle in degrees.
- */
-ol.math.toDegrees = function(angleInRadians) {
-  return angleInRadians * 180 / Math.PI;
-};
-
-
-/**
- * Converts degrees to radians.
- *
- * @param {number} angleInDegrees Angle in degrees.
- * @return {number} Angle in radians.
- */
-ol.math.toRadians = function(angleInDegrees) {
-  return angleInDegrees * Math.PI / 180;
-};
-
-/**
- * Returns the modulo of a / b, depending on the sign of b.
- *
- * @param {number} a Dividend.
- * @param {number} b Divisor.
- * @return {number} Modulo.
- */
-ol.math.modulo = function(a, b) {
-  var r = a % b;
-  return r * b < 0 ? r + b : r;
-};
-
-/**
- * Calculates the linearly interpolated value of x between a and b.
- *
- * @param {number} a Number
- * @param {number} b Number
- * @param {number} x Value to be interpolated.
- * @return {number} Interpolated value.
- */
-ol.math.lerp = function(a, b, x) {
-  return a + x * (b - a);
-};
-
-goog.provide('ol.size');
-
-
-/**
- * Returns a buffered size.
- * @param {ol.Size} size Size.
- * @param {number} buffer Buffer.
- * @param {ol.Size=} opt_size Optional reusable size array.
- * @return {ol.Size} The buffered size.
- */
-ol.size.buffer = function(size, buffer, opt_size) {
-  if (opt_size === undefined) {
-    opt_size = [0, 0];
-  }
-  opt_size[0] = size[0] + 2 * buffer;
-  opt_size[1] = size[1] + 2 * buffer;
-  return opt_size;
-};
-
-
-/**
- * Determines if a size has a positive area.
- * @param {ol.Size} size The size to test.
- * @return {boolean} The size has a positive area.
- */
-ol.size.hasArea = function(size) {
-  return size[0] > 0 && size[1] > 0;
-};
-
-
-/**
- * Returns a size scaled by a ratio. The result will be an array of integers.
- * @param {ol.Size} size Size.
- * @param {number} ratio Ratio.
- * @param {ol.Size=} opt_size Optional reusable size array.
- * @return {ol.Size} The scaled size.
- */
-ol.size.scale = function(size, ratio, opt_size) {
-  if (opt_size === undefined) {
-    opt_size = [0, 0];
-  }
-  opt_size[0] = (size[0] * ratio + 0.5) | 0;
-  opt_size[1] = (size[1] * ratio + 0.5) | 0;
-  return opt_size;
-};
-
-
-/**
- * Returns an `ol.Size` array for the passed in number (meaning: square) or
- * `ol.Size` array.
- * (meaning: non-square),
- * @param {number|ol.Size} size Width and height.
- * @param {ol.Size=} opt_size Optional reusable size array.
- * @return {ol.Size} Size.
- * @api
- */
-ol.size.toSize = function(size, opt_size) {
-  if (Array.isArray(size)) {
-    return size;
-  } else {
-    if (opt_size === undefined) {
-      opt_size = [size, size];
-    } else {
-      opt_size[0] = opt_size[1] = /** @type {number} */ (size);
-    }
-    return opt_size;
-  }
-};
-
-goog.provide('ol.extent.Corner');
-
-/**
- * Extent corner.
- * @enum {string}
- */
-ol.extent.Corner = {
-  BOTTOM_LEFT: 'bottom-left',
-  BOTTOM_RIGHT: 'bottom-right',
-  TOP_LEFT: 'top-left',
-  TOP_RIGHT: 'top-right'
-};
-
-goog.provide('ol.extent.Relationship');
-
-
-/**
- * Relationship to an extent.
- * @enum {number}
- */
-ol.extent.Relationship = {
-  UNKNOWN: 0,
-  INTERSECTING: 1,
-  ABOVE: 2,
-  RIGHT: 4,
-  BELOW: 8,
-  LEFT: 16
-};
-
-goog.provide('ol.extent');
-
-goog.require('ol.asserts');
-goog.require('ol.extent.Corner');
-goog.require('ol.extent.Relationship');
-
-
-/**
- * Build an extent that includes all given coordinates.
- *
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @return {ol.Extent} Bounding extent.
- * @api
- */
-ol.extent.boundingExtent = function(coordinates) {
-  var extent = ol.extent.createEmpty();
-  for (var i = 0, ii = coordinates.length; i < ii; ++i) {
-    ol.extent.extendCoordinate(extent, coordinates[i]);
-  }
-  return extent;
-};
-
-
-/**
- * @param {Array.<number>} xs Xs.
- * @param {Array.<number>} ys Ys.
- * @param {ol.Extent=} opt_extent Destination extent.
- * @private
- * @return {ol.Extent} Extent.
- */
-ol.extent.boundingExtentXYs_ = function(xs, ys, opt_extent) {
-  var minX = Math.min.apply(null, xs);
-  var minY = Math.min.apply(null, ys);
-  var maxX = Math.max.apply(null, xs);
-  var maxY = Math.max.apply(null, ys);
-  return ol.extent.createOrUpdate(minX, minY, maxX, maxY, opt_extent);
-};
-
-
-/**
- * Return extent increased by the provided value.
- * @param {ol.Extent} extent Extent.
- * @param {number} value The amount by which the extent should be buffered.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.extent.buffer = function(extent, value, opt_extent) {
-  if (opt_extent) {
-    opt_extent[0] = extent[0] - value;
-    opt_extent[1] = extent[1] - value;
-    opt_extent[2] = extent[2] + value;
-    opt_extent[3] = extent[3] + value;
-    return opt_extent;
-  } else {
-    return [
-      extent[0] - value,
-      extent[1] - value,
-      extent[2] + value,
-      extent[3] + value
-    ];
-  }
-};
-
-
-/**
- * Creates a clone of an extent.
- *
- * @param {ol.Extent} extent Extent to clone.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} The clone.
- */
-ol.extent.clone = function(extent, opt_extent) {
-  if (opt_extent) {
-    opt_extent[0] = extent[0];
-    opt_extent[1] = extent[1];
-    opt_extent[2] = extent[2];
-    opt_extent[3] = extent[3];
-    return opt_extent;
-  } else {
-    return extent.slice();
-  }
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {number} Closest squared distance.
- */
-ol.extent.closestSquaredDistanceXY = function(extent, x, y) {
-  var dx, dy;
-  if (x < extent[0]) {
-    dx = extent[0] - x;
-  } else if (extent[2] < x) {
-    dx = x - extent[2];
-  } else {
-    dx = 0;
-  }
-  if (y < extent[1]) {
-    dy = extent[1] - y;
-  } else if (extent[3] < y) {
-    dy = y - extent[3];
-  } else {
-    dy = 0;
-  }
-  return dx * dx + dy * dy;
-};
-
-
-/**
- * Check if the passed coordinate is contained or on the edge of the extent.
- *
- * @param {ol.Extent} extent Extent.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @return {boolean} The coordinate is contained in the extent.
- * @api
- */
-ol.extent.containsCoordinate = function(extent, coordinate) {
-  return ol.extent.containsXY(extent, coordinate[0], coordinate[1]);
-};
-
-
-/**
- * Check if one extent contains another.
- *
- * An extent is deemed contained if it lies completely within the other extent,
- * including if they share one or more edges.
- *
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent 2.
- * @return {boolean} The second extent is contained by or on the edge of the
- *     first.
- * @api
- */
-ol.extent.containsExtent = function(extent1, extent2) {
-  return extent1[0] <= extent2[0] && extent2[2] <= extent1[2] &&
-      extent1[1] <= extent2[1] && extent2[3] <= extent1[3];
-};
-
-
-/**
- * Check if the passed coordinate is contained or on the edge of the extent.
- *
- * @param {ol.Extent} extent Extent.
- * @param {number} x X coordinate.
- * @param {number} y Y coordinate.
- * @return {boolean} The x, y values are contained in the extent.
- * @api
- */
-ol.extent.containsXY = function(extent, x, y) {
-  return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];
-};
-
-
-/**
- * Get the relationship between a coordinate and extent.
- * @param {ol.Extent} extent The extent.
- * @param {ol.Coordinate} coordinate The coordinate.
- * @return {number} The relationship (bitwise compare with
- *     ol.extent.Relationship).
- */
-ol.extent.coordinateRelationship = function(extent, coordinate) {
-  var minX = extent[0];
-  var minY = extent[1];
-  var maxX = extent[2];
-  var maxY = extent[3];
-  var x = coordinate[0];
-  var y = coordinate[1];
-  var relationship = ol.extent.Relationship.UNKNOWN;
-  if (x < minX) {
-    relationship = relationship | ol.extent.Relationship.LEFT;
-  } else if (x > maxX) {
-    relationship = relationship | ol.extent.Relationship.RIGHT;
-  }
-  if (y < minY) {
-    relationship = relationship | ol.extent.Relationship.BELOW;
-  } else if (y > maxY) {
-    relationship = relationship | ol.extent.Relationship.ABOVE;
-  }
-  if (relationship === ol.extent.Relationship.UNKNOWN) {
-    relationship = ol.extent.Relationship.INTERSECTING;
-  }
-  return relationship;
-};
-
-
-/**
- * Create an empty extent.
- * @return {ol.Extent} Empty extent.
- * @api
- */
-ol.extent.createEmpty = function() {
-  return [Infinity, Infinity, -Infinity, -Infinity];
-};
-
-
-/**
- * Create a new extent or update the provided extent.
- * @param {number} minX Minimum X.
- * @param {number} minY Minimum Y.
- * @param {number} maxX Maximum X.
- * @param {number} maxY Maximum Y.
- * @param {ol.Extent=} opt_extent Destination extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdate = function(minX, minY, maxX, maxY, opt_extent) {
-  if (opt_extent) {
-    opt_extent[0] = minX;
-    opt_extent[1] = minY;
-    opt_extent[2] = maxX;
-    opt_extent[3] = maxY;
-    return opt_extent;
-  } else {
-    return [minX, minY, maxX, maxY];
-  }
-};
-
-
-/**
- * Create a new empty extent or make the provided one empty.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdateEmpty = function(opt_extent) {
-  return ol.extent.createOrUpdate(
-      Infinity, Infinity, -Infinity, -Infinity, opt_extent);
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdateFromCoordinate = function(coordinate, opt_extent) {
-  var x = coordinate[0];
-  var y = coordinate[1];
-  return ol.extent.createOrUpdate(x, y, x, y, opt_extent);
-};
-
-
-/**
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdateFromCoordinates = function(coordinates, opt_extent) {
-  var extent = ol.extent.createOrUpdateEmpty(opt_extent);
-  return ol.extent.extendCoordinates(extent, coordinates);
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdateFromFlatCoordinates = function(flatCoordinates, offset, end, stride, opt_extent) {
-  var extent = ol.extent.createOrUpdateEmpty(opt_extent);
-  return ol.extent.extendFlatCoordinates(
-      extent, flatCoordinates, offset, end, stride);
-};
-
-
-/**
- * @param {Array.<Array.<ol.Coordinate>>} rings Rings.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdateFromRings = function(rings, opt_extent) {
-  var extent = ol.extent.createOrUpdateEmpty(opt_extent);
-  return ol.extent.extendRings(extent, rings);
-};
-
-
-/**
- * Determine if two extents are equivalent.
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent 2.
- * @return {boolean} The two extents are equivalent.
- * @api
- */
-ol.extent.equals = function(extent1, extent2) {
-  return extent1[0] == extent2[0] && extent1[2] == extent2[2] &&
-      extent1[1] == extent2[1] && extent1[3] == extent2[3];
-};
-
-
-/**
- * Modify an extent to include another extent.
- * @param {ol.Extent} extent1 The extent to be modified.
- * @param {ol.Extent} extent2 The extent that will be included in the first.
- * @return {ol.Extent} A reference to the first (extended) extent.
- * @api
- */
-ol.extent.extend = function(extent1, extent2) {
-  if (extent2[0] < extent1[0]) {
-    extent1[0] = extent2[0];
-  }
-  if (extent2[2] > extent1[2]) {
-    extent1[2] = extent2[2];
-  }
-  if (extent2[1] < extent1[1]) {
-    extent1[1] = extent2[1];
-  }
-  if (extent2[3] > extent1[3]) {
-    extent1[3] = extent2[3];
-  }
-  return extent1;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {ol.Coordinate} coordinate Coordinate.
- */
-ol.extent.extendCoordinate = function(extent, coordinate) {
-  if (coordinate[0] < extent[0]) {
-    extent[0] = coordinate[0];
-  }
-  if (coordinate[0] > extent[2]) {
-    extent[2] = coordinate[0];
-  }
-  if (coordinate[1] < extent[1]) {
-    extent[1] = coordinate[1];
-  }
-  if (coordinate[1] > extent[3]) {
-    extent[3] = coordinate[1];
-  }
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @return {ol.Extent} Extent.
- */
-ol.extent.extendCoordinates = function(extent, coordinates) {
-  var i, ii;
-  for (i = 0, ii = coordinates.length; i < ii; ++i) {
-    ol.extent.extendCoordinate(extent, coordinates[i]);
-  }
-  return extent;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {ol.Extent} Extent.
- */
-ol.extent.extendFlatCoordinates = function(extent, flatCoordinates, offset, end, stride) {
-  for (; offset < end; offset += stride) {
-    ol.extent.extendXY(
-        extent, flatCoordinates[offset], flatCoordinates[offset + 1]);
-  }
-  return extent;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {Array.<Array.<ol.Coordinate>>} rings Rings.
- * @return {ol.Extent} Extent.
- */
-ol.extent.extendRings = function(extent, rings) {
-  var i, ii;
-  for (i = 0, ii = rings.length; i < ii; ++i) {
-    ol.extent.extendCoordinates(extent, rings[i]);
-  }
-  return extent;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} x X.
- * @param {number} y Y.
- */
-ol.extent.extendXY = function(extent, x, y) {
-  extent[0] = Math.min(extent[0], x);
-  extent[1] = Math.min(extent[1], y);
-  extent[2] = Math.max(extent[2], x);
-  extent[3] = Math.max(extent[3], y);
-};
-
-
-/**
- * This function calls `callback` for each corner of the extent. If the
- * callback returns a truthy value the function returns that value
- * immediately. Otherwise the function returns `false`.
- * @param {ol.Extent} extent Extent.
- * @param {function(this:T, ol.Coordinate): S} callback Callback.
- * @param {T=} opt_this Value to use as `this` when executing `callback`.
- * @return {S|boolean} Value.
- * @template S, T
- */
-ol.extent.forEachCorner = function(extent, callback, opt_this) {
-  var val;
-  val = callback.call(opt_this, ol.extent.getBottomLeft(extent));
-  if (val) {
-    return val;
-  }
-  val = callback.call(opt_this, ol.extent.getBottomRight(extent));
-  if (val) {
-    return val;
-  }
-  val = callback.call(opt_this, ol.extent.getTopRight(extent));
-  if (val) {
-    return val;
-  }
-  val = callback.call(opt_this, ol.extent.getTopLeft(extent));
-  if (val) {
-    return val;
-  }
-  return false;
-};
-
-
-/**
- * Get the size of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {number} Area.
- * @api
- */
-ol.extent.getArea = function(extent) {
-  var area = 0;
-  if (!ol.extent.isEmpty(extent)) {
-    area = ol.extent.getWidth(extent) * ol.extent.getHeight(extent);
-  }
-  return area;
-};
-
-
-/**
- * Get the bottom left coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {ol.Coordinate} Bottom left coordinate.
- * @api
- */
-ol.extent.getBottomLeft = function(extent) {
-  return [extent[0], extent[1]];
-};
-
-
-/**
- * Get the bottom right coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {ol.Coordinate} Bottom right coordinate.
- * @api
- */
-ol.extent.getBottomRight = function(extent) {
-  return [extent[2], extent[1]];
-};
-
-
-/**
- * Get the center coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {ol.Coordinate} Center.
- * @api
- */
-ol.extent.getCenter = function(extent) {
-  return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];
-};
-
-
-/**
- * Get a corner coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @param {ol.extent.Corner} corner Corner.
- * @return {ol.Coordinate} Corner coordinate.
- */
-ol.extent.getCorner = function(extent, corner) {
-  var coordinate;
-  if (corner === ol.extent.Corner.BOTTOM_LEFT) {
-    coordinate = ol.extent.getBottomLeft(extent);
-  } else if (corner === ol.extent.Corner.BOTTOM_RIGHT) {
-    coordinate = ol.extent.getBottomRight(extent);
-  } else if (corner === ol.extent.Corner.TOP_LEFT) {
-    coordinate = ol.extent.getTopLeft(extent);
-  } else if (corner === ol.extent.Corner.TOP_RIGHT) {
-    coordinate = ol.extent.getTopRight(extent);
-  } else {
-    ol.asserts.assert(false, 13); // Invalid corner
-  }
-  return /** @type {!ol.Coordinate} */ (coordinate);
-};
-
-
-/**
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent 2.
- * @return {number} Enlarged area.
- */
-ol.extent.getEnlargedArea = function(extent1, extent2) {
-  var minX = Math.min(extent1[0], extent2[0]);
-  var minY = Math.min(extent1[1], extent2[1]);
-  var maxX = Math.max(extent1[2], extent2[2]);
-  var maxY = Math.max(extent1[3], extent2[3]);
-  return (maxX - minX) * (maxY - minY);
-};
-
-
-/**
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {ol.Size} size Size.
- * @param {ol.Extent=} opt_extent Destination extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.getForViewAndSize = function(center, resolution, rotation, size, opt_extent) {
-  var dx = resolution * size[0] / 2;
-  var dy = resolution * size[1] / 2;
-  var cosRotation = Math.cos(rotation);
-  var sinRotation = Math.sin(rotation);
-  var xCos = dx * cosRotation;
-  var xSin = dx * sinRotation;
-  var yCos = dy * cosRotation;
-  var ySin = dy * sinRotation;
-  var x = center[0];
-  var y = center[1];
-  var x0 = x - xCos + ySin;
-  var x1 = x - xCos - ySin;
-  var x2 = x + xCos - ySin;
-  var x3 = x + xCos + ySin;
-  var y0 = y - xSin - yCos;
-  var y1 = y - xSin + yCos;
-  var y2 = y + xSin + yCos;
-  var y3 = y + xSin - yCos;
-  return ol.extent.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);
-};
-
-
-/**
- * Get the height of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {number} Height.
- * @api
- */
-ol.extent.getHeight = function(extent) {
-  return extent[3] - extent[1];
-};
-
-
-/**
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent 2.
- * @return {number} Intersection area.
- */
-ol.extent.getIntersectionArea = function(extent1, extent2) {
-  var intersection = ol.extent.getIntersection(extent1, extent2);
-  return ol.extent.getArea(intersection);
-};
-
-
-/**
- * Get the intersection of two extents.
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent 2.
- * @param {ol.Extent=} opt_extent Optional extent to populate with intersection.
- * @return {ol.Extent} Intersecting extent.
- * @api
- */
-ol.extent.getIntersection = function(extent1, extent2, opt_extent) {
-  var intersection = opt_extent ? opt_extent : ol.extent.createEmpty();
-  if (ol.extent.intersects(extent1, extent2)) {
-    if (extent1[0] > extent2[0]) {
-      intersection[0] = extent1[0];
-    } else {
-      intersection[0] = extent2[0];
-    }
-    if (extent1[1] > extent2[1]) {
-      intersection[1] = extent1[1];
-    } else {
-      intersection[1] = extent2[1];
-    }
-    if (extent1[2] < extent2[2]) {
-      intersection[2] = extent1[2];
-    } else {
-      intersection[2] = extent2[2];
-    }
-    if (extent1[3] < extent2[3]) {
-      intersection[3] = extent1[3];
-    } else {
-      intersection[3] = extent2[3];
-    }
-  }
-  return intersection;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @return {number} Margin.
- */
-ol.extent.getMargin = function(extent) {
-  return ol.extent.getWidth(extent) + ol.extent.getHeight(extent);
-};
-
-
-/**
- * Get the size (width, height) of an extent.
- * @param {ol.Extent} extent The extent.
- * @return {ol.Size} The extent size.
- * @api
- */
-ol.extent.getSize = function(extent) {
-  return [extent[2] - extent[0], extent[3] - extent[1]];
-};
-
-
-/**
- * Get the top left coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {ol.Coordinate} Top left coordinate.
- * @api
- */
-ol.extent.getTopLeft = function(extent) {
-  return [extent[0], extent[3]];
-};
-
-
-/**
- * Get the top right coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {ol.Coordinate} Top right coordinate.
- * @api
- */
-ol.extent.getTopRight = function(extent) {
-  return [extent[2], extent[3]];
-};
-
-
-/**
- * Get the width of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {number} Width.
- * @api
- */
-ol.extent.getWidth = function(extent) {
-  return extent[2] - extent[0];
-};
-
-
-/**
- * Determine if one extent intersects another.
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent.
- * @return {boolean} The two extents intersect.
- * @api
- */
-ol.extent.intersects = function(extent1, extent2) {
-  return extent1[0] <= extent2[2] &&
-      extent1[2] >= extent2[0] &&
-      extent1[1] <= extent2[3] &&
-      extent1[3] >= extent2[1];
-};
-
-
-/**
- * Determine if an extent is empty.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} Is empty.
- * @api
- */
-ol.extent.isEmpty = function(extent) {
-  return extent[2] < extent[0] || extent[3] < extent[1];
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.returnOrUpdate = function(extent, opt_extent) {
-  if (opt_extent) {
-    opt_extent[0] = extent[0];
-    opt_extent[1] = extent[1];
-    opt_extent[2] = extent[2];
-    opt_extent[3] = extent[3];
-    return opt_extent;
-  } else {
-    return extent;
-  }
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} value Value.
- */
-ol.extent.scaleFromCenter = function(extent, value) {
-  var deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);
-  var deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);
-  extent[0] -= deltaX;
-  extent[2] += deltaX;
-  extent[1] -= deltaY;
-  extent[3] += deltaY;
-};
-
-
-/**
- * Determine if the segment between two coordinates intersects (crosses,
- * touches, or is contained by) the provided extent.
- * @param {ol.Extent} extent The extent.
- * @param {ol.Coordinate} start Segment start coordinate.
- * @param {ol.Coordinate} end Segment end coordinate.
- * @return {boolean} The segment intersects the extent.
- */
-ol.extent.intersectsSegment = function(extent, start, end) {
-  var intersects = false;
-  var startRel = ol.extent.coordinateRelationship(extent, start);
-  var endRel = ol.extent.coordinateRelationship(extent, end);
-  if (startRel === ol.extent.Relationship.INTERSECTING ||
-      endRel === ol.extent.Relationship.INTERSECTING) {
-    intersects = true;
-  } else {
-    var minX = extent[0];
-    var minY = extent[1];
-    var maxX = extent[2];
-    var maxY = extent[3];
-    var startX = start[0];
-    var startY = start[1];
-    var endX = end[0];
-    var endY = end[1];
-    var slope = (endY - startY) / (endX - startX);
-    var x, y;
-    if (!!(endRel & ol.extent.Relationship.ABOVE) &&
-        !(startRel & ol.extent.Relationship.ABOVE)) {
-      // potentially intersects top
-      x = endX - ((endY - maxY) / slope);
-      intersects = x >= minX && x <= maxX;
-    }
-    if (!intersects && !!(endRel & ol.extent.Relationship.RIGHT) &&
-        !(startRel & ol.extent.Relationship.RIGHT)) {
-      // potentially intersects right
-      y = endY - ((endX - maxX) * slope);
-      intersects = y >= minY && y <= maxY;
-    }
-    if (!intersects && !!(endRel & ol.extent.Relationship.BELOW) &&
-        !(startRel & ol.extent.Relationship.BELOW)) {
-      // potentially intersects bottom
-      x = endX - ((endY - minY) / slope);
-      intersects = x >= minX && x <= maxX;
-    }
-    if (!intersects && !!(endRel & ol.extent.Relationship.LEFT) &&
-        !(startRel & ol.extent.Relationship.LEFT)) {
-      // potentially intersects left
-      y = endY - ((endX - minX) * slope);
-      intersects = y >= minY && y <= maxY;
-    }
-
-  }
-  return intersects;
-};
-
-
-/**
- * Apply a transform function to the extent.
- * @param {ol.Extent} extent Extent.
- * @param {ol.TransformFunction} transformFn Transform function.  Called with
- * [minX, minY, maxX, maxY] extent coordinates.
- * @param {ol.Extent=} opt_extent Destination extent.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.extent.applyTransform = function(extent, transformFn, opt_extent) {
-  var coordinates = [
-    extent[0], extent[1],
-    extent[0], extent[3],
-    extent[2], extent[1],
-    extent[2], extent[3]
-  ];
-  transformFn(coordinates, coordinates, 2);
-  var xs = [coordinates[0], coordinates[2], coordinates[4], coordinates[6]];
-  var ys = [coordinates[1], coordinates[3], coordinates[5], coordinates[7]];
-  return ol.extent.boundingExtentXYs_(xs, ys, opt_extent);
-};
-
-goog.provide('ol.obj');
-
-
-/**
- * Polyfill for Object.assign().  Assigns enumerable and own properties from
- * one or more source objects to a target object.
- *
- * @see https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
- * @param {!Object} target The target object.
- * @param {...Object} var_sources The source object(s).
- * @return {!Object} The modified target object.
- */
-ol.obj.assign = (typeof Object.assign === 'function') ? Object.assign : function(target, var_sources) {
-  if (target === undefined || target === null) {
-    throw new TypeError('Cannot convert undefined or null to object');
-  }
-
-  var output = Object(target);
-  for (var i = 1, ii = arguments.length; i < ii; ++i) {
-    var source = arguments[i];
-    if (source !== undefined && source !== null) {
-      for (var key in source) {
-        if (source.hasOwnProperty(key)) {
-          output[key] = source[key];
-        }
-      }
-    }
-  }
-  return output;
-};
-
-
-/**
- * Removes all properties from an object.
- * @param {Object} object The object to clear.
- */
-ol.obj.clear = function(object) {
-  for (var property in object) {
-    delete object[property];
-  }
-};
-
-
-/**
- * Get an array of property values from an object.
- * @param {Object<K,V>} object The object from which to get the values.
- * @return {!Array<V>} The property values.
- * @template K,V
- */
-ol.obj.getValues = function(object) {
-  var values = [];
-  for (var property in object) {
-    values.push(object[property]);
-  }
-  return values;
-};
-
-
-/**
- * Determine if an object has any properties.
- * @param {Object} object The object to check.
- * @return {boolean} The object is empty.
- */
-ol.obj.isEmpty = function(object) {
-  var property;
-  for (property in object) {
-    return false;
-  }
-  return !property;
-};
-
-/**
- * @license
- * Latitude/longitude spherical geodesy formulae taken from
- * http://www.movable-type.co.uk/scripts/latlong.html
- * Licensed under CC-BY-3.0.
- */
-
-goog.provide('ol.Sphere');
-
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * Class to create objects that can be used with {@link
- * ol.geom.Polygon.circular}.
- *
- * For example to create a sphere whose radius is equal to the semi-major
- * axis of the WGS84 ellipsoid:
- *
- * ```js
- * var wgs84Sphere= new ol.Sphere(6378137);
- * ```
- *
- * @constructor
- * @param {number} radius Radius.
- * @api
- */
-ol.Sphere = function(radius) {
-
-  /**
-   * @type {number}
-   */
-  this.radius = radius;
-
-};
-
-
-/**
- * Returns the geodesic area for a list of coordinates.
- *
- * [Reference](https://trs-new.jpl.nasa.gov/handle/2014/40409)
- * Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for
- * Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion
- * Laboratory, Pasadena, CA, June 2007
- *
- * @param {Array.<ol.Coordinate>} coordinates List of coordinates of a linear
- * ring. If the ring is oriented clockwise, the area will be positive,
- * otherwise it will be negative.
- * @return {number} Area.
- * @api
- */
-ol.Sphere.prototype.geodesicArea = function(coordinates) {
-  var area = 0, len = coordinates.length;
-  var x1 = coordinates[len - 1][0];
-  var y1 = coordinates[len - 1][1];
-  for (var i = 0; i < len; i++) {
-    var x2 = coordinates[i][0], y2 = coordinates[i][1];
-    area += ol.math.toRadians(x2 - x1) *
-        (2 + Math.sin(ol.math.toRadians(y1)) +
-        Math.sin(ol.math.toRadians(y2)));
-    x1 = x2;
-    y1 = y2;
-  }
-  return area * this.radius * this.radius / 2.0;
-};
-
-
-/**
- * Returns the distance from c1 to c2 using the haversine formula.
- *
- * @param {ol.Coordinate} c1 Coordinate 1.
- * @param {ol.Coordinate} c2 Coordinate 2.
- * @return {number} Haversine distance.
- * @api
- */
-ol.Sphere.prototype.haversineDistance = function(c1, c2) {
-  var lat1 = ol.math.toRadians(c1[1]);
-  var lat2 = ol.math.toRadians(c2[1]);
-  var deltaLatBy2 = (lat2 - lat1) / 2;
-  var deltaLonBy2 = ol.math.toRadians(c2[0] - c1[0]) / 2;
-  var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +
-      Math.sin(deltaLonBy2) * Math.sin(deltaLonBy2) *
-      Math.cos(lat1) * Math.cos(lat2);
-  return 2 * this.radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
-};
-
-
-/**
- * Returns the coordinate at the given distance and bearing from `c1`.
- *
- * @param {ol.Coordinate} c1 The origin point (`[lon, lat]` in degrees).
- * @param {number} distance The great-circle distance between the origin
- *     point and the target point.
- * @param {number} bearing The bearing (in radians).
- * @return {ol.Coordinate} The target point.
- */
-ol.Sphere.prototype.offset = function(c1, distance, bearing) {
-  var lat1 = ol.math.toRadians(c1[1]);
-  var lon1 = ol.math.toRadians(c1[0]);
-  var dByR = distance / this.radius;
-  var lat = Math.asin(
-      Math.sin(lat1) * Math.cos(dByR) +
-      Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));
-  var lon = lon1 + Math.atan2(
-      Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1),
-      Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat));
-  return [ol.math.toDegrees(lon), ol.math.toDegrees(lat)];
-};
-
-goog.provide('ol.sphere.NORMAL');
-
-goog.require('ol.Sphere');
-
-
-/**
- * The normal sphere.
- * @const
- * @type {ol.Sphere}
- */
-ol.sphere.NORMAL = new ol.Sphere(6370997);
-
-goog.provide('ol.proj.Units');
-
-goog.require('ol.sphere.NORMAL');
-
-
-/**
- * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or
- * `'us-ft'`.
- * @enum {string}
- */
-ol.proj.Units = {
-  DEGREES: 'degrees',
-  FEET: 'ft',
-  METERS: 'm',
-  PIXELS: 'pixels',
-  TILE_PIXELS: 'tile-pixels',
-  USFEET: 'us-ft'
-};
-
-
-/**
- * Meters per unit lookup table.
- * @const
- * @type {Object.<ol.proj.Units, number>}
- * @api
- */
-ol.proj.Units.METERS_PER_UNIT = {};
-ol.proj.Units.METERS_PER_UNIT[ol.proj.Units.DEGREES] =
-    2 * Math.PI * ol.sphere.NORMAL.radius / 360;
-ol.proj.Units.METERS_PER_UNIT[ol.proj.Units.FEET] = 0.3048;
-ol.proj.Units.METERS_PER_UNIT[ol.proj.Units.METERS] = 1;
-ol.proj.Units.METERS_PER_UNIT[ol.proj.Units.USFEET] = 1200 / 3937;
-
-goog.provide('ol.proj.proj4');
-
-
-/**
- * @private
- * @type {Proj4}
- */
-ol.proj.proj4.cache_ = null;
-
-
-/**
- * Store the proj4 function.
- * @param {Proj4} proj4 The proj4 function.
- */
-ol.proj.proj4.set = function(proj4) {
-  ol.proj.proj4.cache_ = proj4;
-};
-
-
-/**
- * Get proj4.
- * @return {Proj4} The proj4 function set above or available globally.
- */
-ol.proj.proj4.get = function() {
-  return ol.proj.proj4.cache_ || window['proj4'];
-};
-
-goog.provide('ol.proj.Projection');
-
-goog.require('ol');
-goog.require('ol.proj.Units');
-goog.require('ol.proj.proj4');
-
-
-/**
- * @classdesc
- * Projection definition class. One of these is created for each projection
- * supported in the application and stored in the {@link ol.proj} namespace.
- * You can use these in applications, but this is not required, as API params
- * and options use {@link ol.ProjectionLike} which means the simple string
- * code will suffice.
- *
- * You can use {@link ol.proj.get} to retrieve the object for a particular
- * projection.
- *
- * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together
- * with the following aliases:
- * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326,
- *     urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84,
- *     http://www.opengis.net/gml/srs/epsg.xml#4326,
- *     urn:x-ogc:def:crs:EPSG:4326
- * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913,
- *     urn:ogc:def:crs:EPSG:6.18:3:3857,
- *     http://www.opengis.net/gml/srs/epsg.xml#3857
- *
- * If you use proj4js, aliases can be added using `proj4.defs()`; see
- * [documentation](https://github.com/proj4js/proj4js). To set an alternative
- * namespace for proj4, use {@link ol.proj.setProj4}.
- *
- * @constructor
- * @param {olx.ProjectionOptions} options Projection options.
- * @struct
- * @api
- */
-ol.proj.Projection = function(options) {
- /**
-  * @private
-  * @type {string}
-  */
-  this.code_ = options.code;
-
- /**
-  * @private
-  * @type {ol.proj.Units}
-  */
-  this.units_ = /** @type {ol.proj.Units} */ (options.units);
-
- /**
-  * @private
-  * @type {ol.Extent}
-  */
-  this.extent_ = options.extent !== undefined ? options.extent : null;
-
- /**
-  * @private
-  * @type {ol.Extent}
-  */
-  this.worldExtent_ = options.worldExtent !== undefined ?
-     options.worldExtent : null;
-
- /**
-  * @private
-  * @type {string}
-  */
-  this.axisOrientation_ = options.axisOrientation !== undefined ?
-     options.axisOrientation : 'enu';
-
- /**
-  * @private
-  * @type {boolean}
-  */
-  this.global_ = options.global !== undefined ? options.global : false;
-
- /**
-  * @private
-  * @type {boolean}
-  */
-  this.canWrapX_ = !!(this.global_ && this.extent_);
-
- /**
- * @private
- * @type {function(number, ol.Coordinate):number|undefined}
- */
-  this.getPointResolutionFunc_ = options.getPointResolution;
-
- /**
-  * @private
-  * @type {ol.tilegrid.TileGrid}
-  */
-  this.defaultTileGrid_ = null;
-
- /**
-  * @private
-  * @type {number|undefined}
-  */
-  this.metersPerUnit_ = options.metersPerUnit;
-
-  var code = options.code;
-  if (ol.ENABLE_PROJ4JS) {
-    var proj4js = ol.proj.proj4.get();
-    if (typeof proj4js == 'function') {
-      var def = proj4js.defs(code);
-      if (def !== undefined) {
-        if (def.axis !== undefined && options.axisOrientation === undefined) {
-          this.axisOrientation_ = def.axis;
-        }
-        if (options.metersPerUnit === undefined) {
-          this.metersPerUnit_ = def.to_meter;
-        }
-        if (options.units === undefined) {
-          this.units_ = def.units;
-        }
-      }
-    }
-  }
-};
-
-
-/**
- * @return {boolean} The projection is suitable for wrapping the x-axis
- */
-ol.proj.Projection.prototype.canWrapX = function() {
-  return this.canWrapX_;
-};
-
-
-/**
- * Get the code for this projection, e.g. 'EPSG:4326'.
- * @return {string} Code.
- * @api
- */
-ol.proj.Projection.prototype.getCode = function() {
-  return this.code_;
-};
-
-
-/**
- * Get the validity extent for this projection.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.proj.Projection.prototype.getExtent = function() {
-  return this.extent_;
-};
-
-
-/**
- * Get the units of this projection.
- * @return {ol.proj.Units} Units.
- * @api
- */
-ol.proj.Projection.prototype.getUnits = function() {
-  return this.units_;
-};
-
-
-/**
- * Get the amount of meters per unit of this projection.  If the projection is
- * not configured with `metersPerUnit` or a units identifier, the return is
- * `undefined`.
- * @return {number|undefined} Meters.
- * @api
- */
-ol.proj.Projection.prototype.getMetersPerUnit = function() {
-  return this.metersPerUnit_ || ol.proj.Units.METERS_PER_UNIT[this.units_];
-};
-
-
-/**
- * Get the world extent for this projection.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.proj.Projection.prototype.getWorldExtent = function() {
-  return this.worldExtent_;
-};
-
-
-/**
- * Get the axis orientation of this projection.
- * Example values are:
- * enu - the default easting, northing, elevation.
- * neu - northing, easting, up - useful for "lat/long" geographic coordinates,
- *     or south orientated transverse mercator.
- * wnu - westing, northing, up - some planetary coordinate systems have
- *     "west positive" coordinate systems
- * @return {string} Axis orientation.
- */
-ol.proj.Projection.prototype.getAxisOrientation = function() {
-  return this.axisOrientation_;
-};
-
-
-/**
- * Is this projection a global projection which spans the whole world?
- * @return {boolean} Whether the projection is global.
- * @api
- */
-ol.proj.Projection.prototype.isGlobal = function() {
-  return this.global_;
-};
-
-
-/**
-* Set if the projection is a global projection which spans the whole world
-* @param {boolean} global Whether the projection is global.
-* @api
-*/
-ol.proj.Projection.prototype.setGlobal = function(global) {
-  this.global_ = global;
-  this.canWrapX_ = !!(global && this.extent_);
-};
-
-
-/**
- * @return {ol.tilegrid.TileGrid} The default tile grid.
- */
-ol.proj.Projection.prototype.getDefaultTileGrid = function() {
-  return this.defaultTileGrid_;
-};
-
-
-/**
- * @param {ol.tilegrid.TileGrid} tileGrid The default tile grid.
- */
-ol.proj.Projection.prototype.setDefaultTileGrid = function(tileGrid) {
-  this.defaultTileGrid_ = tileGrid;
-};
-
-
-/**
- * Set the validity extent for this projection.
- * @param {ol.Extent} extent Extent.
- * @api
- */
-ol.proj.Projection.prototype.setExtent = function(extent) {
-  this.extent_ = extent;
-  this.canWrapX_ = !!(this.global_ && extent);
-};
-
-
-/**
- * Set the world extent for this projection.
- * @param {ol.Extent} worldExtent World extent
- *     [minlon, minlat, maxlon, maxlat].
- * @api
- */
-ol.proj.Projection.prototype.setWorldExtent = function(worldExtent) {
-  this.worldExtent_ = worldExtent;
-};
-
-
-/**
- * Set the getPointResolution function (see {@link ol.proj#getPointResolution}
- * for this projection.
- * @param {function(number, ol.Coordinate):number} func Function
- * @api
- */
-ol.proj.Projection.prototype.setGetPointResolution = function(func) {
-  this.getPointResolutionFunc_ = func;
-};
-
-
-/**
- * Get the custom point resolution function for this projection (if set).
- * @return {function(number, ol.Coordinate):number|undefined} The custom point
- * resolution function (if set).
- */
-ol.proj.Projection.prototype.getPointResolutionFunc = function() {
-  return this.getPointResolutionFunc_;
-};
-
-goog.provide('ol.proj.EPSG3857');
-
-goog.require('ol');
-goog.require('ol.math');
-goog.require('ol.proj.Projection');
-goog.require('ol.proj.Units');
-
-
-/**
- * @classdesc
- * Projection object for web/spherical Mercator (EPSG:3857).
- *
- * @constructor
- * @extends {ol.proj.Projection}
- * @param {string} code Code.
- * @private
- */
-ol.proj.EPSG3857.Projection_ = function(code) {
-  ol.proj.Projection.call(this, {
-    code: code,
-    units: ol.proj.Units.METERS,
-    extent: ol.proj.EPSG3857.EXTENT,
-    global: true,
-    worldExtent: ol.proj.EPSG3857.WORLD_EXTENT,
-    getPointResolution: function(resolution, point) {
-      return resolution / ol.math.cosh(point[1] / ol.proj.EPSG3857.RADIUS);
-    }
-  });
-};
-ol.inherits(ol.proj.EPSG3857.Projection_, ol.proj.Projection);
-
-
-/**
- * @const
- * @type {number}
- */
-ol.proj.EPSG3857.RADIUS = 6378137;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.proj.EPSG3857.HALF_SIZE = Math.PI * ol.proj.EPSG3857.RADIUS;
-
-
-/**
- * @const
- * @type {ol.Extent}
- */
-ol.proj.EPSG3857.EXTENT = [
-  -ol.proj.EPSG3857.HALF_SIZE, -ol.proj.EPSG3857.HALF_SIZE,
-  ol.proj.EPSG3857.HALF_SIZE, ol.proj.EPSG3857.HALF_SIZE
-];
-
-
-/**
- * @const
- * @type {ol.Extent}
- */
-ol.proj.EPSG3857.WORLD_EXTENT = [-180, -85, 180, 85];
-
-
-/**
- * Lists several projection codes with the same meaning as EPSG:3857.
- *
- * @type {Array.<string>}
- */
-ol.proj.EPSG3857.CODES = [
-  'EPSG:3857',
-  'EPSG:102100',
-  'EPSG:102113',
-  'EPSG:900913',
-  'urn:ogc:def:crs:EPSG:6.18:3:3857',
-  'urn:ogc:def:crs:EPSG::3857',
-  'http://www.opengis.net/gml/srs/epsg.xml#3857'
-];
-
-
-/**
- * Projections equal to EPSG:3857.
- *
- * @const
- * @type {Array.<ol.proj.Projection>}
- */
-ol.proj.EPSG3857.PROJECTIONS = ol.proj.EPSG3857.CODES.map(function(code) {
-  return new ol.proj.EPSG3857.Projection_(code);
-});
-
-
-/**
- * Transformation from EPSG:4326 to EPSG:3857.
- *
- * @param {Array.<number>} input Input array of coordinate values.
- * @param {Array.<number>=} opt_output Output array of coordinate values.
- * @param {number=} opt_dimension Dimension (default is `2`).
- * @return {Array.<number>} Output array of coordinate values.
- */
-ol.proj.EPSG3857.fromEPSG4326 = function(input, opt_output, opt_dimension) {
-  var length = input.length,
-      dimension = opt_dimension > 1 ? opt_dimension : 2,
-      output = opt_output;
-  if (output === undefined) {
-    if (dimension > 2) {
-      // preserve values beyond second dimension
-      output = input.slice();
-    } else {
-      output = new Array(length);
-    }
-  }
-  var halfSize = ol.proj.EPSG3857.HALF_SIZE;
-  for (var i = 0; i < length; i += dimension) {
-    output[i] = halfSize * input[i] / 180;
-    var y = ol.proj.EPSG3857.RADIUS *
-        Math.log(Math.tan(Math.PI * (input[i + 1] + 90) / 360));
-    if (y > halfSize) {
-      y = halfSize;
-    } else if (y < -halfSize) {
-      y = -halfSize;
-    }
-    output[i + 1] = y;
-  }
-  return output;
-};
-
-
-/**
- * Transformation from EPSG:3857 to EPSG:4326.
- *
- * @param {Array.<number>} input Input array of coordinate values.
- * @param {Array.<number>=} opt_output Output array of coordinate values.
- * @param {number=} opt_dimension Dimension (default is `2`).
- * @return {Array.<number>} Output array of coordinate values.
- */
-ol.proj.EPSG3857.toEPSG4326 = function(input, opt_output, opt_dimension) {
-  var length = input.length,
-      dimension = opt_dimension > 1 ? opt_dimension : 2,
-      output = opt_output;
-  if (output === undefined) {
-    if (dimension > 2) {
-      // preserve values beyond second dimension
-      output = input.slice();
-    } else {
-      output = new Array(length);
-    }
-  }
-  for (var i = 0; i < length; i += dimension) {
-    output[i] = 180 * input[i] / ol.proj.EPSG3857.HALF_SIZE;
-    output[i + 1] = 360 * Math.atan(
-        Math.exp(input[i + 1] / ol.proj.EPSG3857.RADIUS)) / Math.PI - 90;
-  }
-  return output;
-};
-
-goog.provide('ol.sphere.WGS84');
-
-goog.require('ol.Sphere');
-
-
-/**
- * A sphere with radius equal to the semi-major axis of the WGS84 ellipsoid.
- * @const
- * @type {ol.Sphere}
- */
-ol.sphere.WGS84 = new ol.Sphere(6378137);
-
-goog.provide('ol.proj.EPSG4326');
-
-goog.require('ol');
-goog.require('ol.proj.Projection');
-goog.require('ol.proj.Units');
-goog.require('ol.sphere.WGS84');
-
-
-/**
- * @classdesc
- * Projection object for WGS84 geographic coordinates (EPSG:4326).
- *
- * Note that OpenLayers does not strictly comply with the EPSG definition.
- * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).
- * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.
- *
- * @constructor
- * @extends {ol.proj.Projection}
- * @param {string} code Code.
- * @param {string=} opt_axisOrientation Axis orientation.
- * @private
- */
-ol.proj.EPSG4326.Projection_ = function(code, opt_axisOrientation) {
-  ol.proj.Projection.call(this, {
-    code: code,
-    units: ol.proj.Units.DEGREES,
-    extent: ol.proj.EPSG4326.EXTENT,
-    axisOrientation: opt_axisOrientation,
-    global: true,
-    metersPerUnit: ol.proj.EPSG4326.METERS_PER_UNIT,
-    worldExtent: ol.proj.EPSG4326.EXTENT
-  });
-};
-ol.inherits(ol.proj.EPSG4326.Projection_, ol.proj.Projection);
-
-
-/**
- * Extent of the EPSG:4326 projection which is the whole world.
- *
- * @const
- * @type {ol.Extent}
- */
-ol.proj.EPSG4326.EXTENT = [-180, -90, 180, 90];
-
-
-/**
- * @const
- * @type {number}
- */
-ol.proj.EPSG4326.METERS_PER_UNIT = Math.PI * ol.sphere.WGS84.radius / 180;
-
-
-/**
- * Projections equal to EPSG:4326.
- *
- * @const
- * @type {Array.<ol.proj.Projection>}
- */
-ol.proj.EPSG4326.PROJECTIONS = [
-  new ol.proj.EPSG4326.Projection_('CRS:84'),
-  new ol.proj.EPSG4326.Projection_('EPSG:4326', 'neu'),
-  new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:EPSG::4326', 'neu'),
-  new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:EPSG:6.6:4326', 'neu'),
-  new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:OGC:1.3:CRS84'),
-  new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:OGC:2:84'),
-  new ol.proj.EPSG4326.Projection_('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),
-  new ol.proj.EPSG4326.Projection_('urn:x-ogc:def:crs:EPSG:4326', 'neu')
-];
-
-goog.provide('ol.proj.projections');
-
-
-/**
- * @private
- * @type {Object.<string, ol.proj.Projection>}
- */
-ol.proj.projections.cache_ = {};
-
-
-/**
- * Clear the projections cache.
- */
-ol.proj.projections.clear = function() {
-  ol.proj.projections.cache_ = {};
-};
-
-
-/**
- * Get a cached projection by code.
- * @param {string} code The code for the projection.
- * @return {ol.proj.Projection} The projection (if cached).
- */
-ol.proj.projections.get = function(code) {
-  var projections = ol.proj.projections.cache_;
-  return projections[code] || null;
-};
-
-
-/**
- * Add a projection to the cache.
- * @param {string} code The projection code.
- * @param {ol.proj.Projection} projection The projection to cache.
- */
-ol.proj.projections.add = function(code, projection) {
-  var projections = ol.proj.projections.cache_;
-  projections[code] = projection;
-};
-
-goog.provide('ol.proj.transforms');
-
-goog.require('ol.obj');
-
-
-/**
- * @private
- * @type {Object.<string, Object.<string, ol.TransformFunction>>}
- */
-ol.proj.transforms.cache_ = {};
-
-
-/**
- * Clear the transform cache.
- */
-ol.proj.transforms.clear = function() {
-  ol.proj.transforms.cache_ = {};
-};
-
-
-/**
- * Registers a conversion function to convert coordinates from the source
- * projection to the destination projection.
- *
- * @param {ol.proj.Projection} source Source.
- * @param {ol.proj.Projection} destination Destination.
- * @param {ol.TransformFunction} transformFn Transform.
- */
-ol.proj.transforms.add = function(source, destination, transformFn) {
-  var sourceCode = source.getCode();
-  var destinationCode = destination.getCode();
-  var transforms = ol.proj.transforms.cache_;
-  if (!(sourceCode in transforms)) {
-    transforms[sourceCode] = {};
-  }
-  transforms[sourceCode][destinationCode] = transformFn;
-};
-
-
-/**
- * Unregisters the conversion function to convert coordinates from the source
- * projection to the destination projection.  This method is used to clean up
- * cached transforms during testing.
- *
- * @param {ol.proj.Projection} source Source projection.
- * @param {ol.proj.Projection} destination Destination projection.
- * @return {ol.TransformFunction} transformFn The unregistered transform.
- */
-ol.proj.transforms.remove = function(source, destination) {
-  var sourceCode = source.getCode();
-  var destinationCode = destination.getCode();
-  var transforms = ol.proj.transforms.cache_;
-  var transform = transforms[sourceCode][destinationCode];
-  delete transforms[sourceCode][destinationCode];
-  if (ol.obj.isEmpty(transforms[sourceCode])) {
-    delete transforms[sourceCode];
-  }
-  return transform;
-};
-
-
-/**
- * Get a transform given a source code and a destination code.
- * @param {string} sourceCode The code for the source projection.
- * @param {string} destinationCode The code for the destination projection.
- * @return {ol.TransformFunction|undefined} The transform function (if found).
- */
-ol.proj.transforms.get = function(sourceCode, destinationCode) {
-  var transform;
-  var transforms = ol.proj.transforms.cache_;
-  if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {
-    transform = transforms[sourceCode][destinationCode];
-  }
-  return transform;
-};
-
-goog.provide('ol.proj');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.proj.EPSG3857');
-goog.require('ol.proj.EPSG4326');
-goog.require('ol.proj.Projection');
-goog.require('ol.proj.Units');
-goog.require('ol.proj.proj4');
-goog.require('ol.proj.projections');
-goog.require('ol.proj.transforms');
-goog.require('ol.sphere.NORMAL');
-
-
-/**
- * Meters per unit lookup table.
- * @const
- * @type {Object.<ol.proj.Units, number>}
- * @api
- */
-ol.proj.METERS_PER_UNIT = ol.proj.Units.METERS_PER_UNIT;
-
-
-if (ol.ENABLE_PROJ4JS) {
-  /**
-   * Register proj4. If not explicitly registered, it will be assumed that
-   * proj4js will be loaded in the global namespace. For example in a
-   * browserify ES6 environment you could use:
-   *
-   *     import ol from 'openlayers';
-   *     import proj4 from 'proj4';
-   *     ol.proj.setProj4(proj4);
-   *
-   * @param {Proj4} proj4 Proj4.
-   * @api
-   */
-  ol.proj.setProj4 = function(proj4) {
-    ol.proj.proj4.set(proj4);
-  };
-}
-
-
-/**
- * Get the resolution of the point in degrees or distance units.
- * For projections with degrees as the unit this will simply return the
- * provided resolution. For other projections the point resolution is
- * by default estimated by transforming the 'point' pixel to EPSG:4326,
- * measuring its width and height on the normal sphere,
- * and taking the average of the width and height.
- * A custom function can be provided for a specific projection, either
- * by setting the `getPointResolution` option in the
- * {@link ol.proj.Projection} constructor or by using
- * {@link ol.proj.Projection#setGetPointResolution} to change an existing
- * projection object.
- * @param {ol.ProjectionLike} projection The projection.
- * @param {number} resolution Nominal resolution in projection units.
- * @param {ol.Coordinate} point Point to find adjusted resolution at.
- * @return {number} Point resolution at point in projection units.
- * @api
- */
-ol.proj.getPointResolution = function(projection, resolution, point) {
-  projection = ol.proj.get(projection);
-  var pointResolution;
-  var getter = projection.getPointResolutionFunc();
-  if (getter) {
-    pointResolution = getter(resolution, point);
-  } else {
-    var units = projection.getUnits();
-    if (units == ol.proj.Units.DEGREES) {
-      pointResolution = resolution;
-    } else {
-      // Estimate point resolution by transforming the center pixel to EPSG:4326,
-      // measuring its width and height on the normal sphere, and taking the
-      // average of the width and height.
-      var toEPSG4326 = ol.proj.getTransformFromProjections(projection, ol.proj.get('EPSG:4326'));
-      var vertices = [
-        point[0] - resolution / 2, point[1],
-        point[0] + resolution / 2, point[1],
-        point[0], point[1] - resolution / 2,
-        point[0], point[1] + resolution / 2
-      ];
-      vertices = toEPSG4326(vertices, vertices, 2);
-      var width = ol.sphere.NORMAL.haversineDistance(
-          vertices.slice(0, 2), vertices.slice(2, 4));
-      var height = ol.sphere.NORMAL.haversineDistance(
-          vertices.slice(4, 6), vertices.slice(6, 8));
-      pointResolution = (width + height) / 2;
-      var metersPerUnit = projection.getMetersPerUnit();
-      if (metersPerUnit !== undefined) {
-        pointResolution /= metersPerUnit;
-      }
-    }
-  }
-  return pointResolution;
-};
-
-
-/**
- * Registers transformation functions that don't alter coordinates. Those allow
- * to transform between projections with equal meaning.
- *
- * @param {Array.<ol.proj.Projection>} projections Projections.
- * @api
- */
-ol.proj.addEquivalentProjections = function(projections) {
-  ol.proj.addProjections(projections);
-  projections.forEach(function(source) {
-    projections.forEach(function(destination) {
-      if (source !== destination) {
-        ol.proj.transforms.add(source, destination, ol.proj.cloneTransform);
-      }
-    });
-  });
-};
-
-
-/**
- * Registers transformation functions to convert coordinates in any projection
- * in projection1 to any projection in projection2.
- *
- * @param {Array.<ol.proj.Projection>} projections1 Projections with equal
- *     meaning.
- * @param {Array.<ol.proj.Projection>} projections2 Projections with equal
- *     meaning.
- * @param {ol.TransformFunction} forwardTransform Transformation from any
- *   projection in projection1 to any projection in projection2.
- * @param {ol.TransformFunction} inverseTransform Transform from any projection
- *   in projection2 to any projection in projection1..
- */
-ol.proj.addEquivalentTransforms = function(projections1, projections2, forwardTransform, inverseTransform) {
-  projections1.forEach(function(projection1) {
-    projections2.forEach(function(projection2) {
-      ol.proj.transforms.add(projection1, projection2, forwardTransform);
-      ol.proj.transforms.add(projection2, projection1, inverseTransform);
-    });
-  });
-};
-
-
-/**
- * Add a Projection object to the list of supported projections that can be
- * looked up by their code.
- *
- * @param {ol.proj.Projection} projection Projection instance.
- * @api
- */
-ol.proj.addProjection = function(projection) {
-  ol.proj.projections.add(projection.getCode(), projection);
-  ol.proj.transforms.add(projection, projection, ol.proj.cloneTransform);
-};
-
-
-/**
- * @param {Array.<ol.proj.Projection>} projections Projections.
- */
-ol.proj.addProjections = function(projections) {
-  projections.forEach(ol.proj.addProjection);
-};
-
-
-/**
- * Clear all cached projections and transforms.
- */
-ol.proj.clearAllProjections = function() {
-  ol.proj.projections.clear();
-  ol.proj.transforms.clear();
-};
-
-
-/**
- * @param {ol.proj.Projection|string|undefined} projection Projection.
- * @param {string} defaultCode Default code.
- * @return {ol.proj.Projection} Projection.
- */
-ol.proj.createProjection = function(projection, defaultCode) {
-  if (!projection) {
-    return ol.proj.get(defaultCode);
-  } else if (typeof projection === 'string') {
-    return ol.proj.get(projection);
-  } else {
-    return /** @type {ol.proj.Projection} */ (projection);
-  }
-};
-
-
-/**
- * Registers coordinate transform functions to convert coordinates between the
- * source projection and the destination projection.
- * The forward and inverse functions convert coordinate pairs; this function
- * converts these into the functions used internally which also handle
- * extents and coordinate arrays.
- *
- * @param {ol.ProjectionLike} source Source projection.
- * @param {ol.ProjectionLike} destination Destination projection.
- * @param {function(ol.Coordinate): ol.Coordinate} forward The forward transform
- *     function (that is, from the source projection to the destination
- *     projection) that takes a {@link ol.Coordinate} as argument and returns
- *     the transformed {@link ol.Coordinate}.
- * @param {function(ol.Coordinate): ol.Coordinate} inverse The inverse transform
- *     function (that is, from the destination projection to the source
- *     projection) that takes a {@link ol.Coordinate} as argument and returns
- *     the transformed {@link ol.Coordinate}.
- * @api
- */
-ol.proj.addCoordinateTransforms = function(source, destination, forward, inverse) {
-  var sourceProj = ol.proj.get(source);
-  var destProj = ol.proj.get(destination);
-  ol.proj.transforms.add(sourceProj, destProj,
-      ol.proj.createTransformFromCoordinateTransform(forward));
-  ol.proj.transforms.add(destProj, sourceProj,
-      ol.proj.createTransformFromCoordinateTransform(inverse));
-};
-
-
-/**
- * Creates a {@link ol.TransformFunction} from a simple 2D coordinate transform
- * function.
- * @param {function(ol.Coordinate): ol.Coordinate} transform Coordinate
- *     transform.
- * @return {ol.TransformFunction} Transform function.
- */
-ol.proj.createTransformFromCoordinateTransform = function(transform) {
-  return (
-      /**
-       * @param {Array.<number>} input Input.
-       * @param {Array.<number>=} opt_output Output.
-       * @param {number=} opt_dimension Dimension.
-       * @return {Array.<number>} Output.
-       */
-      function(input, opt_output, opt_dimension) {
-        var length = input.length;
-        var dimension = opt_dimension !== undefined ? opt_dimension : 2;
-        var output = opt_output !== undefined ? opt_output : new Array(length);
-        var point, i, j;
-        for (i = 0; i < length; i += dimension) {
-          point = transform([input[i], input[i + 1]]);
-          output[i] = point[0];
-          output[i + 1] = point[1];
-          for (j = dimension - 1; j >= 2; --j) {
-            output[i + j] = input[i + j];
-          }
-        }
-        return output;
-      });
-};
-
-
-/**
- * Transforms a coordinate from longitude/latitude to a different projection.
- * @param {ol.Coordinate} coordinate Coordinate as longitude and latitude, i.e.
- *     an array with longitude as 1st and latitude as 2nd element.
- * @param {ol.ProjectionLike=} opt_projection Target projection. The
- *     default is Web Mercator, i.e. 'EPSG:3857'.
- * @return {ol.Coordinate} Coordinate projected to the target projection.
- * @api
- */
-ol.proj.fromLonLat = function(coordinate, opt_projection) {
-  return ol.proj.transform(coordinate, 'EPSG:4326',
-      opt_projection !== undefined ? opt_projection : 'EPSG:3857');
-};
-
-
-/**
- * Transforms a coordinate to longitude/latitude.
- * @param {ol.Coordinate} coordinate Projected coordinate.
- * @param {ol.ProjectionLike=} opt_projection Projection of the coordinate.
- *     The default is Web Mercator, i.e. 'EPSG:3857'.
- * @return {ol.Coordinate} Coordinate as longitude and latitude, i.e. an array
- *     with longitude as 1st and latitude as 2nd element.
- * @api
- */
-ol.proj.toLonLat = function(coordinate, opt_projection) {
-  return ol.proj.transform(coordinate,
-      opt_projection !== undefined ? opt_projection : 'EPSG:3857', 'EPSG:4326');
-};
-
-
-/**
- * Fetches a Projection object for the code specified.
- *
- * @param {ol.ProjectionLike} projectionLike Either a code string which is
- *     a combination of authority and identifier such as "EPSG:4326", or an
- *     existing projection object, or undefined.
- * @return {ol.proj.Projection} Projection object, or null if not in list.
- * @api
- */
-ol.proj.get = function(projectionLike) {
-  var projection = null;
-  if (projectionLike instanceof ol.proj.Projection) {
-    projection = projectionLike;
-  } else if (typeof projectionLike === 'string') {
-    var code = projectionLike;
-    projection = ol.proj.projections.get(code);
-    if (ol.ENABLE_PROJ4JS) {
-      var proj4js = ol.proj.proj4.get();
-      if (!projection && typeof proj4js == 'function' &&
-          proj4js.defs(code) !== undefined) {
-        projection = new ol.proj.Projection({code: code});
-        ol.proj.addProjection(projection);
-      }
-    }
-  }
-  return projection;
-};
-
-
-/**
- * Checks if two projections are the same, that is every coordinate in one
- * projection does represent the same geographic point as the same coordinate in
- * the other projection.
- *
- * @param {ol.proj.Projection} projection1 Projection 1.
- * @param {ol.proj.Projection} projection2 Projection 2.
- * @return {boolean} Equivalent.
- * @api
- */
-ol.proj.equivalent = function(projection1, projection2) {
-  if (projection1 === projection2) {
-    return true;
-  }
-  var equalUnits = projection1.getUnits() === projection2.getUnits();
-  if (projection1.getCode() === projection2.getCode()) {
-    return equalUnits;
-  } else {
-    var transformFn = ol.proj.getTransformFromProjections(
-        projection1, projection2);
-    return transformFn === ol.proj.cloneTransform && equalUnits;
-  }
-};
-
-
-/**
- * Given the projection-like objects, searches for a transformation
- * function to convert a coordinates array from the source projection to the
- * destination projection.
- *
- * @param {ol.ProjectionLike} source Source.
- * @param {ol.ProjectionLike} destination Destination.
- * @return {ol.TransformFunction} Transform function.
- * @api
- */
-ol.proj.getTransform = function(source, destination) {
-  var sourceProjection = ol.proj.get(source);
-  var destinationProjection = ol.proj.get(destination);
-  return ol.proj.getTransformFromProjections(
-      sourceProjection, destinationProjection);
-};
-
-
-/**
- * Searches in the list of transform functions for the function for converting
- * coordinates from the source projection to the destination projection.
- *
- * @param {ol.proj.Projection} sourceProjection Source Projection object.
- * @param {ol.proj.Projection} destinationProjection Destination Projection
- *     object.
- * @return {ol.TransformFunction} Transform function.
- */
-ol.proj.getTransformFromProjections = function(sourceProjection, destinationProjection) {
-  var sourceCode = sourceProjection.getCode();
-  var destinationCode = destinationProjection.getCode();
-  var transform = ol.proj.transforms.get(sourceCode, destinationCode);
-  if (ol.ENABLE_PROJ4JS && !transform) {
-    var proj4js = ol.proj.proj4.get();
-    if (typeof proj4js == 'function') {
-      var sourceDef = proj4js.defs(sourceCode);
-      var destinationDef = proj4js.defs(destinationCode);
-
-      if (sourceDef !== undefined && destinationDef !== undefined) {
-        if (sourceDef === destinationDef) {
-          ol.proj.addEquivalentProjections([destinationProjection, sourceProjection]);
-        } else {
-          var proj4Transform = proj4js(destinationCode, sourceCode);
-          ol.proj.addCoordinateTransforms(destinationProjection, sourceProjection,
-              proj4Transform.forward, proj4Transform.inverse);
-        }
-        transform = ol.proj.transforms.get(sourceCode, destinationCode);
-      }
-    }
-  }
-  if (!transform) {
-    transform = ol.proj.identityTransform;
-  }
-  return transform;
-};
-
-
-/**
- * @param {Array.<number>} input Input coordinate array.
- * @param {Array.<number>=} opt_output Output array of coordinate values.
- * @param {number=} opt_dimension Dimension.
- * @return {Array.<number>} Input coordinate array (same array as input).
- */
-ol.proj.identityTransform = function(input, opt_output, opt_dimension) {
-  if (opt_output !== undefined && input !== opt_output) {
-    for (var i = 0, ii = input.length; i < ii; ++i) {
-      opt_output[i] = input[i];
-    }
-    input = opt_output;
-  }
-  return input;
-};
-
-
-/**
- * @param {Array.<number>} input Input coordinate array.
- * @param {Array.<number>=} opt_output Output array of coordinate values.
- * @param {number=} opt_dimension Dimension.
- * @return {Array.<number>} Output coordinate array (new array, same coordinate
- *     values).
- */
-ol.proj.cloneTransform = function(input, opt_output, opt_dimension) {
-  var output;
-  if (opt_output !== undefined) {
-    for (var i = 0, ii = input.length; i < ii; ++i) {
-      opt_output[i] = input[i];
-    }
-    output = opt_output;
-  } else {
-    output = input.slice();
-  }
-  return output;
-};
-
-
-/**
- * Transforms a coordinate from source projection to destination projection.
- * This returns a new coordinate (and does not modify the original).
- *
- * See {@link ol.proj.transformExtent} for extent transformation.
- * See the transform method of {@link ol.geom.Geometry} and its subclasses for
- * geometry transforms.
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.ProjectionLike} source Source projection-like.
- * @param {ol.ProjectionLike} destination Destination projection-like.
- * @return {ol.Coordinate} Coordinate.
- * @api
- */
-ol.proj.transform = function(coordinate, source, destination) {
-  var transformFn = ol.proj.getTransform(source, destination);
-  return transformFn(coordinate, undefined, coordinate.length);
-};
-
-
-/**
- * Transforms an extent from source projection to destination projection.  This
- * returns a new extent (and does not modify the original).
- *
- * @param {ol.Extent} extent The extent to transform.
- * @param {ol.ProjectionLike} source Source projection-like.
- * @param {ol.ProjectionLike} destination Destination projection-like.
- * @return {ol.Extent} The transformed extent.
- * @api
- */
-ol.proj.transformExtent = function(extent, source, destination) {
-  var transformFn = ol.proj.getTransform(source, destination);
-  return ol.extent.applyTransform(extent, transformFn);
-};
-
-
-/**
- * Transforms the given point to the destination projection.
- *
- * @param {ol.Coordinate} point Point.
- * @param {ol.proj.Projection} sourceProjection Source projection.
- * @param {ol.proj.Projection} destinationProjection Destination projection.
- * @return {ol.Coordinate} Point.
- */
-ol.proj.transformWithProjections = function(point, sourceProjection, destinationProjection) {
-  var transformFn = ol.proj.getTransformFromProjections(
-      sourceProjection, destinationProjection);
-  return transformFn(point);
-};
-
-/**
- * Add transforms to and from EPSG:4326 and EPSG:3857.  This function is called
- * by when this module is executed and should only need to be called again after
- * `ol.proj.clearAllProjections()` is called (e.g. in tests).
- */
-ol.proj.addCommon = function() {
-  // Add transformations that don't alter coordinates to convert within set of
-  // projections with equal meaning.
-  ol.proj.addEquivalentProjections(ol.proj.EPSG3857.PROJECTIONS);
-  ol.proj.addEquivalentProjections(ol.proj.EPSG4326.PROJECTIONS);
-  // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like
-  // coordinates and back.
-  ol.proj.addEquivalentTransforms(
-      ol.proj.EPSG4326.PROJECTIONS,
-      ol.proj.EPSG3857.PROJECTIONS,
-      ol.proj.EPSG3857.fromEPSG4326,
-      ol.proj.EPSG3857.toEPSG4326);
-};
-
-ol.proj.addCommon();
-
-goog.provide('ol.tilecoord');
-
-
-/**
- * @param {number} z Z.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {ol.TileCoord=} opt_tileCoord Tile coordinate.
- * @return {ol.TileCoord} Tile coordinate.
- */
-ol.tilecoord.createOrUpdate = function(z, x, y, opt_tileCoord) {
-  if (opt_tileCoord !== undefined) {
-    opt_tileCoord[0] = z;
-    opt_tileCoord[1] = x;
-    opt_tileCoord[2] = y;
-    return opt_tileCoord;
-  } else {
-    return [z, x, y];
-  }
-};
-
-
-/**
- * @param {number} z Z.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {string} Key.
- */
-ol.tilecoord.getKeyZXY = function(z, x, y) {
-  return z + '/' + x + '/' + y;
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coord.
- * @return {number} Hash.
- */
-ol.tilecoord.hash = function(tileCoord) {
-  return (tileCoord[1] << tileCoord[0]) + tileCoord[2];
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coord.
- * @return {string} Quad key.
- */
-ol.tilecoord.quadKey = function(tileCoord) {
-  var z = tileCoord[0];
-  var digits = new Array(z);
-  var mask = 1 << (z - 1);
-  var i, charCode;
-  for (i = 0; i < z; ++i) {
-    // 48 is charCode for 0 - '0'.charCodeAt(0)
-    charCode = 48;
-    if (tileCoord[1] & mask) {
-      charCode += 1;
-    }
-    if (tileCoord[2] & mask) {
-      charCode += 2;
-    }
-    digits[i] = String.fromCharCode(charCode);
-    mask >>= 1;
-  }
-  return digits.join('');
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {!ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @return {boolean} Tile coordinate is within extent and zoom level range.
- */
-ol.tilecoord.withinExtentAndZ = function(tileCoord, tileGrid) {
-  var z = tileCoord[0];
-  var x = tileCoord[1];
-  var y = tileCoord[2];
-
-  if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {
-    return false;
-  }
-  var extent = tileGrid.getExtent();
-  var tileRange;
-  if (!extent) {
-    tileRange = tileGrid.getFullTileRange(z);
-  } else {
-    tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);
-  }
-  if (!tileRange) {
-    return true;
-  } else {
-    return tileRange.containsXY(x, y);
-  }
-};
-
-goog.provide('ol.tilegrid.TileGrid');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.TileRange');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.size');
-goog.require('ol.tilecoord');
-
-
-/**
- * @classdesc
- * Base class for setting the grid pattern for sources accessing tiled-image
- * servers.
- *
- * @constructor
- * @param {olx.tilegrid.TileGridOptions} options Tile grid options.
- * @struct
- * @api
- */
-ol.tilegrid.TileGrid = function(options) {
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.minZoom = options.minZoom !== undefined ? options.minZoom : 0;
-
-  /**
-   * @private
-   * @type {!Array.<number>}
-   */
-  this.resolutions_ = options.resolutions;
-  ol.asserts.assert(ol.array.isSorted(this.resolutions_, function(a, b) {
-    return b - a;
-  }, true), 17); // `resolutions` must be sorted in descending order
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.maxZoom = this.resolutions_.length - 1;
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.origin_ = options.origin !== undefined ? options.origin : null;
-
-  /**
-   * @private
-   * @type {Array.<ol.Coordinate>}
-   */
-  this.origins_ = null;
-  if (options.origins !== undefined) {
-    this.origins_ = options.origins;
-    ol.asserts.assert(this.origins_.length == this.resolutions_.length,
-        20); // Number of `origins` and `resolutions` must be equal
-  }
-
-  var extent = options.extent;
-
-  if (extent !== undefined &&
-      !this.origin_ && !this.origins_) {
-    this.origin_ = ol.extent.getTopLeft(extent);
-  }
-
-  ol.asserts.assert(
-      (!this.origin_ && this.origins_) || (this.origin_ && !this.origins_),
-      18); // Either `origin` or `origins` must be configured, never both
-
-  /**
-   * @private
-   * @type {Array.<number|ol.Size>}
-   */
-  this.tileSizes_ = null;
-  if (options.tileSizes !== undefined) {
-    this.tileSizes_ = options.tileSizes;
-    ol.asserts.assert(this.tileSizes_.length == this.resolutions_.length,
-        19); // Number of `tileSizes` and `resolutions` must be equal
-  }
-
-  /**
-   * @private
-   * @type {number|ol.Size}
-   */
-  this.tileSize_ = options.tileSize !== undefined ?
-      options.tileSize :
-      !this.tileSizes_ ? ol.DEFAULT_TILE_SIZE : null;
-  ol.asserts.assert(
-      (!this.tileSize_ && this.tileSizes_) ||
-      (this.tileSize_ && !this.tileSizes_),
-      22); // Either `tileSize` or `tileSizes` must be configured, never both
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = extent !== undefined ? extent : null;
-
-
-  /**
-   * @private
-   * @type {Array.<ol.TileRange>}
-   */
-  this.fullTileRanges_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.tmpSize_ = [0, 0];
-
-  if (options.sizes !== undefined) {
-    this.fullTileRanges_ = options.sizes.map(function(size, z) {
-      var tileRange = new ol.TileRange(
-          Math.min(0, size[0]), Math.max(size[0] - 1, -1),
-          Math.min(0, size[1]), Math.max(size[1] - 1, -1));
-      return tileRange;
-    }, this);
-  } else if (extent) {
-    this.calculateTileRanges_(extent);
-  }
-
-};
-
-
-/**
- * @private
- * @type {ol.TileCoord}
- */
-ol.tilegrid.TileGrid.tmpTileCoord_ = [0, 0, 0];
-
-
-/**
- * Call a function with each tile coordinate for a given extent and zoom level.
- *
- * @param {ol.Extent} extent Extent.
- * @param {number} zoom Zoom level.
- * @param {function(ol.TileCoord)} callback Function called with each tile coordinate.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.forEachTileCoord = function(extent, zoom, callback) {
-  var tileRange = this.getTileRangeForExtentAndZ(extent, zoom);
-  for (var i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {
-    for (var j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {
-      callback([zoom, i, j]);
-    }
-  }
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {function(this: T, number, ol.TileRange): boolean} callback Callback.
- * @param {T=} opt_this The object to use as `this` in `callback`.
- * @param {ol.TileRange=} opt_tileRange Temporary ol.TileRange object.
- * @param {ol.Extent=} opt_extent Temporary ol.Extent object.
- * @return {boolean} Callback succeeded.
- * @template T
- */
-ol.tilegrid.TileGrid.prototype.forEachTileCoordParentTileRange = function(tileCoord, callback, opt_this, opt_tileRange, opt_extent) {
-  var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);
-  var z = tileCoord[0] - 1;
-  while (z >= this.minZoom) {
-    if (callback.call(opt_this, z,
-        this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange))) {
-      return true;
-    }
-    --z;
-  }
-  return false;
-};
-
-
-/**
- * Get the extent for this tile grid, if it was configured.
- * @return {ol.Extent} Extent.
- */
-ol.tilegrid.TileGrid.prototype.getExtent = function() {
-  return this.extent_;
-};
-
-
-/**
- * Get the maximum zoom level for the grid.
- * @return {number} Max zoom.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getMaxZoom = function() {
-  return this.maxZoom;
-};
-
-
-/**
- * Get the minimum zoom level for the grid.
- * @return {number} Min zoom.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getMinZoom = function() {
-  return this.minZoom;
-};
-
-
-/**
- * Get the origin for the grid at the given zoom level.
- * @param {number} z Z.
- * @return {ol.Coordinate} Origin.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getOrigin = function(z) {
-  if (this.origin_) {
-    return this.origin_;
-  } else {
-    return this.origins_[z];
-  }
-};
-
-
-/**
- * Get the resolution for the given zoom level.
- * @param {number} z Z.
- * @return {number} Resolution.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getResolution = function(z) {
-  return this.resolutions_[z];
-};
-
-
-/**
- * Get the list of resolutions for the tile grid.
- * @return {Array.<number>} Resolutions.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getResolutions = function() {
-  return this.resolutions_;
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileRange=} opt_tileRange Temporary ol.TileRange object.
- * @param {ol.Extent=} opt_extent Temporary ol.Extent object.
- * @return {ol.TileRange} Tile range.
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordChildTileRange = function(tileCoord, opt_tileRange, opt_extent) {
-  if (tileCoord[0] < this.maxZoom) {
-    var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);
-    return this.getTileRangeForExtentAndZ(
-        tileCoordExtent, tileCoord[0] + 1, opt_tileRange);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {number} z Z.
- * @param {ol.TileRange} tileRange Tile range.
- * @param {ol.Extent=} opt_extent Temporary ol.Extent object.
- * @return {ol.Extent} Extent.
- */
-ol.tilegrid.TileGrid.prototype.getTileRangeExtent = function(z, tileRange, opt_extent) {
-  var origin = this.getOrigin(z);
-  var resolution = this.getResolution(z);
-  var tileSize = ol.size.toSize(this.getTileSize(z), this.tmpSize_);
-  var minX = origin[0] + tileRange.minX * tileSize[0] * resolution;
-  var maxX = origin[0] + (tileRange.maxX + 1) * tileSize[0] * resolution;
-  var minY = origin[1] + tileRange.minY * tileSize[1] * resolution;
-  var maxY = origin[1] + (tileRange.maxY + 1) * tileSize[1] * resolution;
-  return ol.extent.createOrUpdate(minX, minY, maxX, maxY, opt_extent);
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {ol.TileRange=} opt_tileRange Temporary tile range object.
- * @return {ol.TileRange} Tile range.
- */
-ol.tilegrid.TileGrid.prototype.getTileRangeForExtentAndResolution = function(extent, resolution, opt_tileRange) {
-  var tileCoord = ol.tilegrid.TileGrid.tmpTileCoord_;
-  this.getTileCoordForXYAndResolution_(
-      extent[0], extent[1], resolution, false, tileCoord);
-  var minX = tileCoord[1];
-  var minY = tileCoord[2];
-  this.getTileCoordForXYAndResolution_(
-      extent[2], extent[3], resolution, true, tileCoord);
-  return ol.TileRange.createOrUpdate(
-      minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} z Z.
- * @param {ol.TileRange=} opt_tileRange Temporary tile range object.
- * @return {ol.TileRange} Tile range.
- */
-ol.tilegrid.TileGrid.prototype.getTileRangeForExtentAndZ = function(extent, z, opt_tileRange) {
-  var resolution = this.getResolution(z);
-  return this.getTileRangeForExtentAndResolution(
-      extent, resolution, opt_tileRange);
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @return {ol.Coordinate} Tile center.
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordCenter = function(tileCoord) {
-  var origin = this.getOrigin(tileCoord[0]);
-  var resolution = this.getResolution(tileCoord[0]);
-  var tileSize = ol.size.toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);
-  return [
-    origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,
-    origin[1] + (tileCoord[2] + 0.5) * tileSize[1] * resolution
-  ];
-};
-
-
-/**
- * Get the extent of a tile coordinate.
- *
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.Extent=} opt_extent Temporary extent object.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordExtent = function(tileCoord, opt_extent) {
-  var origin = this.getOrigin(tileCoord[0]);
-  var resolution = this.getResolution(tileCoord[0]);
-  var tileSize = ol.size.toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);
-  var minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;
-  var minY = origin[1] + tileCoord[2] * tileSize[1] * resolution;
-  var maxX = minX + tileSize[0] * resolution;
-  var maxY = minY + tileSize[1] * resolution;
-  return ol.extent.createOrUpdate(minX, minY, maxX, maxY, opt_extent);
-};
-
-
-/**
- * Get the tile coordinate for the given map coordinate and resolution.  This
- * method considers that coordinates that intersect tile boundaries should be
- * assigned the higher tile coordinate.
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {ol.TileCoord=} opt_tileCoord Destination ol.TileCoord object.
- * @return {ol.TileCoord} Tile coordinate.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndResolution = function(coordinate, resolution, opt_tileCoord) {
-  return this.getTileCoordForXYAndResolution_(
-      coordinate[0], coordinate[1], resolution, false, opt_tileCoord);
-};
-
-
-/**
- * @param {number} x X.
- * @param {number} y Y.
- * @param {number} resolution Resolution.
- * @param {boolean} reverseIntersectionPolicy Instead of letting edge
- *     intersections go to the higher tile coordinate, let edge intersections
- *     go to the lower tile coordinate.
- * @param {ol.TileCoord=} opt_tileCoord Temporary ol.TileCoord object.
- * @return {ol.TileCoord} Tile coordinate.
- * @private
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordForXYAndResolution_ = function(
-    x, y, resolution, reverseIntersectionPolicy, opt_tileCoord) {
-  var z = this.getZForResolution(resolution);
-  var scale = resolution / this.getResolution(z);
-  var origin = this.getOrigin(z);
-  var tileSize = ol.size.toSize(this.getTileSize(z), this.tmpSize_);
-
-  var adjustX = reverseIntersectionPolicy ? 0.5 : 0;
-  var adjustY = reverseIntersectionPolicy ? 0 : 0.5;
-  var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);
-  var yFromOrigin = Math.floor((y - origin[1]) / resolution + adjustY);
-  var tileCoordX = scale * xFromOrigin / tileSize[0];
-  var tileCoordY = scale * yFromOrigin / tileSize[1];
-
-  if (reverseIntersectionPolicy) {
-    tileCoordX = Math.ceil(tileCoordX) - 1;
-    tileCoordY = Math.ceil(tileCoordY) - 1;
-  } else {
-    tileCoordX = Math.floor(tileCoordX);
-    tileCoordY = Math.floor(tileCoordY);
-  }
-
-  return ol.tilecoord.createOrUpdate(z, tileCoordX, tileCoordY, opt_tileCoord);
-};
-
-
-/**
- * Get a tile coordinate given a map coordinate and zoom level.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} z Zoom level.
- * @param {ol.TileCoord=} opt_tileCoord Destination ol.TileCoord object.
- * @return {ol.TileCoord} Tile coordinate.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndZ = function(coordinate, z, opt_tileCoord) {
-  var resolution = this.getResolution(z);
-  return this.getTileCoordForXYAndResolution_(
-      coordinate[0], coordinate[1], resolution, false, opt_tileCoord);
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @return {number} Tile resolution.
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordResolution = function(tileCoord) {
-  return this.resolutions_[tileCoord[0]];
-};
-
-
-/**
- * Get the tile size for a zoom level. The type of the return value matches the
- * `tileSize` or `tileSizes` that the tile grid was configured with. To always
- * get an `ol.Size`, run the result through `ol.size.toSize()`.
- * @param {number} z Z.
- * @return {number|ol.Size} Tile size.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getTileSize = function(z) {
-  if (this.tileSize_) {
-    return this.tileSize_;
-  } else {
-    return this.tileSizes_[z];
-  }
-};
-
-
-/**
- * @param {number} z Zoom level.
- * @return {ol.TileRange} Extent tile range for the specified zoom level.
- */
-ol.tilegrid.TileGrid.prototype.getFullTileRange = function(z) {
-  if (!this.fullTileRanges_) {
-    return null;
-  } else {
-    return this.fullTileRanges_[z];
-  }
-};
-
-
-/**
- * @param {number} resolution Resolution.
- * @param {number=} opt_direction If 0, the nearest resolution will be used.
- *     If 1, the nearest lower resolution will be used. If -1, the nearest
- *     higher resolution will be used. Default is 0.
- * @return {number} Z.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getZForResolution = function(
-    resolution, opt_direction) {
-  var z = ol.array.linearFindNearest(this.resolutions_, resolution,
-      opt_direction || 0);
-  return ol.math.clamp(z, this.minZoom, this.maxZoom);
-};
-
-
-/**
- * @param {!ol.Extent} extent Extent for this tile grid.
- * @private
- */
-ol.tilegrid.TileGrid.prototype.calculateTileRanges_ = function(extent) {
-  var length = this.resolutions_.length;
-  var fullTileRanges = new Array(length);
-  for (var z = this.minZoom; z < length; ++z) {
-    fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);
-  }
-  this.fullTileRanges_ = fullTileRanges;
-};
-
-goog.provide('ol.tilegrid');
-
-goog.require('ol');
-goog.require('ol.size');
-goog.require('ol.extent');
-goog.require('ol.extent.Corner');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.proj.Units');
-goog.require('ol.tilegrid.TileGrid');
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @return {!ol.tilegrid.TileGrid} Default tile grid for the passed projection.
- */
-ol.tilegrid.getForProjection = function(projection) {
-  var tileGrid = projection.getDefaultTileGrid();
-  if (!tileGrid) {
-    tileGrid = ol.tilegrid.createForProjection(projection);
-    projection.setDefaultTileGrid(tileGrid);
-  }
-  return tileGrid;
-};
-
-
-/**
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.proj.Projection} projection Projection.
- * @return {ol.TileCoord} Tile coordinate.
- */
-ol.tilegrid.wrapX = function(tileGrid, tileCoord, projection) {
-  var z = tileCoord[0];
-  var center = tileGrid.getTileCoordCenter(tileCoord);
-  var projectionExtent = ol.tilegrid.extentFromProjection(projection);
-  if (!ol.extent.containsCoordinate(projectionExtent, center)) {
-    var worldWidth = ol.extent.getWidth(projectionExtent);
-    var worldsAway = Math.ceil((projectionExtent[0] - center[0]) / worldWidth);
-    center[0] += worldWidth * worldsAway;
-    return tileGrid.getTileCoordForCoordAndZ(center, z);
-  } else {
-    return tileCoord;
-  }
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number=} opt_maxZoom Maximum zoom level (default is
- *     ol.DEFAULT_MAX_ZOOM).
- * @param {number|ol.Size=} opt_tileSize Tile size (default uses
- *     ol.DEFAULT_TILE_SIZE).
- * @param {ol.extent.Corner=} opt_corner Extent corner (default is
- *     ol.extent.Corner.TOP_LEFT).
- * @return {!ol.tilegrid.TileGrid} TileGrid instance.
- */
-ol.tilegrid.createForExtent = function(extent, opt_maxZoom, opt_tileSize, opt_corner) {
-  var corner = opt_corner !== undefined ?
-      opt_corner : ol.extent.Corner.TOP_LEFT;
-
-  var resolutions = ol.tilegrid.resolutionsFromExtent(
-      extent, opt_maxZoom, opt_tileSize);
-
-  return new ol.tilegrid.TileGrid({
-    extent: extent,
-    origin: ol.extent.getCorner(extent, corner),
-    resolutions: resolutions,
-    tileSize: opt_tileSize
-  });
-};
-
-
-/**
- * Creates a tile grid with a standard XYZ tiling scheme.
- * @param {olx.tilegrid.XYZOptions=} opt_options Tile grid options.
- * @return {!ol.tilegrid.TileGrid} Tile grid instance.
- * @api
- */
-ol.tilegrid.createXYZ = function(opt_options) {
-  var options = /** @type {olx.tilegrid.TileGridOptions} */ ({});
-  ol.obj.assign(options, opt_options !== undefined ?
-      opt_options : /** @type {olx.tilegrid.XYZOptions} */ ({}));
-  if (options.extent === undefined) {
-    options.extent = ol.proj.get('EPSG:3857').getExtent();
-  }
-  options.resolutions = ol.tilegrid.resolutionsFromExtent(
-      options.extent, options.maxZoom, options.tileSize);
-  delete options.maxZoom;
-
-  return new ol.tilegrid.TileGrid(options);
-};
-
-
-/**
- * Create a resolutions array from an extent.  A zoom factor of 2 is assumed.
- * @param {ol.Extent} extent Extent.
- * @param {number=} opt_maxZoom Maximum zoom level (default is
- *     ol.DEFAULT_MAX_ZOOM).
- * @param {number|ol.Size=} opt_tileSize Tile size (default uses
- *     ol.DEFAULT_TILE_SIZE).
- * @return {!Array.<number>} Resolutions array.
- */
-ol.tilegrid.resolutionsFromExtent = function(extent, opt_maxZoom, opt_tileSize) {
-  var maxZoom = opt_maxZoom !== undefined ?
-      opt_maxZoom : ol.DEFAULT_MAX_ZOOM;
-
-  var height = ol.extent.getHeight(extent);
-  var width = ol.extent.getWidth(extent);
-
-  var tileSize = ol.size.toSize(opt_tileSize !== undefined ?
-      opt_tileSize : ol.DEFAULT_TILE_SIZE);
-  var maxResolution = Math.max(
-      width / tileSize[0], height / tileSize[1]);
-
-  var length = maxZoom + 1;
-  var resolutions = new Array(length);
-  for (var z = 0; z < length; ++z) {
-    resolutions[z] = maxResolution / Math.pow(2, z);
-  }
-  return resolutions;
-};
-
-
-/**
- * @param {ol.ProjectionLike} projection Projection.
- * @param {number=} opt_maxZoom Maximum zoom level (default is
- *     ol.DEFAULT_MAX_ZOOM).
- * @param {number|ol.Size=} opt_tileSize Tile size (default uses
- *     ol.DEFAULT_TILE_SIZE).
- * @param {ol.extent.Corner=} opt_corner Extent corner (default is
- *     ol.extent.Corner.BOTTOM_LEFT).
- * @return {!ol.tilegrid.TileGrid} TileGrid instance.
- */
-ol.tilegrid.createForProjection = function(projection, opt_maxZoom, opt_tileSize, opt_corner) {
-  var extent = ol.tilegrid.extentFromProjection(projection);
-  return ol.tilegrid.createForExtent(
-      extent, opt_maxZoom, opt_tileSize, opt_corner);
-};
-
-
-/**
- * Generate a tile grid extent from a projection.  If the projection has an
- * extent, it is used.  If not, a global extent is assumed.
- * @param {ol.ProjectionLike} projection Projection.
- * @return {ol.Extent} Extent.
- */
-ol.tilegrid.extentFromProjection = function(projection) {
-  projection = ol.proj.get(projection);
-  var extent = projection.getExtent();
-  if (!extent) {
-    var half = 180 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /
-        projection.getMetersPerUnit();
-    extent = ol.extent.createOrUpdate(-half, -half, half, half);
-  }
-  return extent;
-};
-
-goog.provide('ol.Attribution');
-
-goog.require('ol.TileRange');
-goog.require('ol.math');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * An attribution for a layer source.
- *
- * Example:
- *
- *     source: new ol.source.OSM({
- *       attributions: [
- *         new ol.Attribution({
- *           html: 'All maps &copy; ' +
- *               '<a href="https://www.opencyclemap.org/">OpenCycleMap</a>'
- *         }),
- *         ol.source.OSM.ATTRIBUTION
- *       ],
- *     ..
- *
- * @constructor
- * @param {olx.AttributionOptions} options Attribution options.
- * @struct
- * @api
- */
-ol.Attribution = function(options) {
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.html_ = options.html;
-
-  /**
-   * @private
-   * @type {Object.<string, Array.<ol.TileRange>>}
-   */
-  this.tileRanges_ = options.tileRanges ? options.tileRanges : null;
-
-};
-
-
-/**
- * Get the attribution markup.
- * @return {string} The attribution HTML.
- * @api
- */
-ol.Attribution.prototype.getHTML = function() {
-  return this.html_;
-};
-
-
-/**
- * @param {Object.<string, ol.TileRange>} tileRanges Tile ranges.
- * @param {!ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @param {!ol.proj.Projection} projection Projection.
- * @return {boolean} Intersects any tile range.
- */
-ol.Attribution.prototype.intersectsAnyTileRange = function(tileRanges, tileGrid, projection) {
-  if (!this.tileRanges_) {
-    return true;
-  }
-  var i, ii, tileRange, zKey;
-  for (zKey in tileRanges) {
-    if (!(zKey in this.tileRanges_)) {
-      continue;
-    }
-    tileRange = tileRanges[zKey];
-    var testTileRange;
-    for (i = 0, ii = this.tileRanges_[zKey].length; i < ii; ++i) {
-      testTileRange = this.tileRanges_[zKey][i];
-      if (testTileRange.intersects(tileRange)) {
-        return true;
-      }
-      var extentTileRange = tileGrid.getTileRangeForExtentAndZ(
-          ol.tilegrid.extentFromProjection(projection), parseInt(zKey, 10));
-      var width = extentTileRange.getWidth();
-      if (tileRange.minX < extentTileRange.minX ||
-          tileRange.maxX > extentTileRange.maxX) {
-        if (testTileRange.intersects(new ol.TileRange(
-            ol.math.modulo(tileRange.minX, width),
-            ol.math.modulo(tileRange.maxX, width),
-            tileRange.minY, tileRange.maxY))) {
-          return true;
-        }
-        if (tileRange.getWidth() > width &&
-            testTileRange.intersects(extentTileRange)) {
-          return true;
-        }
-      }
-    }
-  }
-  return false;
-};
-
-goog.provide('ol.CenterConstraint');
-
-goog.require('ol.math');
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @return {ol.CenterConstraintType} The constraint.
- */
-ol.CenterConstraint.createExtent = function(extent) {
-  return (
-      /**
-       * @param {ol.Coordinate|undefined} center Center.
-       * @return {ol.Coordinate|undefined} Center.
-       */
-      function(center) {
-        if (center) {
-          return [
-            ol.math.clamp(center[0], extent[0], extent[2]),
-            ol.math.clamp(center[1], extent[1], extent[3])
-          ];
-        } else {
-          return undefined;
-        }
-      });
-};
-
-
-/**
- * @param {ol.Coordinate|undefined} center Center.
- * @return {ol.Coordinate|undefined} Center.
- */
-ol.CenterConstraint.none = function(center) {
-  return center;
-};
-
-goog.provide('ol.CollectionEventType');
-
-/**
- * @enum {string}
- */
-ol.CollectionEventType = {
-  /**
-   * Triggered when an item is added to the collection.
-   * @event ol.Collection.Event#add
-   * @api
-   */
-  ADD: 'add',
-  /**
-   * Triggered when an item is removed from the collection.
-   * @event ol.Collection.Event#remove
-   * @api
-   */
-  REMOVE: 'remove'
-};
-
-goog.provide('ol.ObjectEventType');
-
-/**
- * @enum {string}
- */
-ol.ObjectEventType = {
-  /**
-   * Triggered when a property is changed.
-   * @event ol.Object.Event#propertychange
-   * @api
-   */
-  PROPERTYCHANGE: 'propertychange'
-};
-
-goog.provide('ol.events');
-
-goog.require('ol.obj');
-
-
-/**
- * @param {ol.EventsKey} listenerObj Listener object.
- * @return {ol.EventsListenerFunctionType} Bound listener.
- */
-ol.events.bindListener_ = function(listenerObj) {
-  var boundListener = function(evt) {
-    var listener = listenerObj.listener;
-    var bindTo = listenerObj.bindTo || listenerObj.target;
-    if (listenerObj.callOnce) {
-      ol.events.unlistenByKey(listenerObj);
-    }
-    return listener.call(bindTo, evt);
-  };
-  listenerObj.boundListener = boundListener;
-  return boundListener;
-};
-
-
-/**
- * Finds the matching {@link ol.EventsKey} in the given listener
- * array.
- *
- * @param {!Array<!ol.EventsKey>} listeners Array of listeners.
- * @param {!Function} listener The listener function.
- * @param {Object=} opt_this The `this` value inside the listener.
- * @param {boolean=} opt_setDeleteIndex Set the deleteIndex on the matching
- *     listener, for {@link ol.events.unlistenByKey}.
- * @return {ol.EventsKey|undefined} The matching listener object.
- * @private
- */
-ol.events.findListener_ = function(listeners, listener, opt_this,
-    opt_setDeleteIndex) {
-  var listenerObj;
-  for (var i = 0, ii = listeners.length; i < ii; ++i) {
-    listenerObj = listeners[i];
-    if (listenerObj.listener === listener &&
-        listenerObj.bindTo === opt_this) {
-      if (opt_setDeleteIndex) {
-        listenerObj.deleteIndex = i;
-      }
-      return listenerObj;
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @param {ol.EventTargetLike} target Target.
- * @param {string} type Type.
- * @return {Array.<ol.EventsKey>|undefined} Listeners.
- */
-ol.events.getListeners = function(target, type) {
-  var listenerMap = target.ol_lm;
-  return listenerMap ? listenerMap[type] : undefined;
-};
-
-
-/**
- * Get the lookup of listeners.  If one does not exist on the target, it is
- * created.
- * @param {ol.EventTargetLike} target Target.
- * @return {!Object.<string, Array.<ol.EventsKey>>} Map of
- *     listeners by event type.
- * @private
- */
-ol.events.getListenerMap_ = function(target) {
-  var listenerMap = target.ol_lm;
-  if (!listenerMap) {
-    listenerMap = target.ol_lm = {};
-  }
-  return listenerMap;
-};
-
-
-/**
- * Clean up all listener objects of the given type.  All properties on the
- * listener objects will be removed, and if no listeners remain in the listener
- * map, it will be removed from the target.
- * @param {ol.EventTargetLike} target Target.
- * @param {string} type Type.
- * @private
- */
-ol.events.removeListeners_ = function(target, type) {
-  var listeners = ol.events.getListeners(target, type);
-  if (listeners) {
-    for (var i = 0, ii = listeners.length; i < ii; ++i) {
-      target.removeEventListener(type, listeners[i].boundListener);
-      ol.obj.clear(listeners[i]);
-    }
-    listeners.length = 0;
-    var listenerMap = target.ol_lm;
-    if (listenerMap) {
-      delete listenerMap[type];
-      if (Object.keys(listenerMap).length === 0) {
-        delete target.ol_lm;
-      }
-    }
-  }
-};
-
-
-/**
- * Registers an event listener on an event target. Inspired by
- * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
- *
- * This function efficiently binds a `listener` to a `this` object, and returns
- * a key for use with {@link ol.events.unlistenByKey}.
- *
- * @param {ol.EventTargetLike} target Event target.
- * @param {string} type Event type.
- * @param {ol.EventsListenerFunctionType} listener Listener.
- * @param {Object=} opt_this Object referenced by the `this` keyword in the
- *     listener. Default is the `target`.
- * @param {boolean=} opt_once If true, add the listener as one-off listener.
- * @return {ol.EventsKey} Unique key for the listener.
- */
-ol.events.listen = function(target, type, listener, opt_this, opt_once) {
-  var listenerMap = ol.events.getListenerMap_(target);
-  var listeners = listenerMap[type];
-  if (!listeners) {
-    listeners = listenerMap[type] = [];
-  }
-  var listenerObj = ol.events.findListener_(listeners, listener, opt_this,
-      false);
-  if (listenerObj) {
-    if (!opt_once) {
-      // Turn one-off listener into a permanent one.
-      listenerObj.callOnce = false;
-    }
-  } else {
-    listenerObj = /** @type {ol.EventsKey} */ ({
-      bindTo: opt_this,
-      callOnce: !!opt_once,
-      listener: listener,
-      target: target,
-      type: type
-    });
-    target.addEventListener(type, ol.events.bindListener_(listenerObj));
-    listeners.push(listenerObj);
-  }
-
-  return listenerObj;
-};
-
-
-/**
- * Registers a one-off event listener on an event target. Inspired by
- * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
- *
- * This function efficiently binds a `listener` as self-unregistering listener
- * to a `this` object, and returns a key for use with
- * {@link ol.events.unlistenByKey} in case the listener needs to be unregistered
- * before it is called.
- *
- * When {@link ol.events.listen} is called with the same arguments after this
- * function, the self-unregistering listener will be turned into a permanent
- * listener.
- *
- * @param {ol.EventTargetLike} target Event target.
- * @param {string} type Event type.
- * @param {ol.EventsListenerFunctionType} listener Listener.
- * @param {Object=} opt_this Object referenced by the `this` keyword in the
- *     listener. Default is the `target`.
- * @return {ol.EventsKey} Key for unlistenByKey.
- */
-ol.events.listenOnce = function(target, type, listener, opt_this) {
-  return ol.events.listen(target, type, listener, opt_this, true);
-};
-
-
-/**
- * Unregisters an event listener on an event target. Inspired by
- * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
- *
- * To return a listener, this function needs to be called with the exact same
- * arguments that were used for a previous {@link ol.events.listen} call.
- *
- * @param {ol.EventTargetLike} target Event target.
- * @param {string} type Event type.
- * @param {ol.EventsListenerFunctionType} listener Listener.
- * @param {Object=} opt_this Object referenced by the `this` keyword in the
- *     listener. Default is the `target`.
- */
-ol.events.unlisten = function(target, type, listener, opt_this) {
-  var listeners = ol.events.getListeners(target, type);
-  if (listeners) {
-    var listenerObj = ol.events.findListener_(listeners, listener, opt_this,
-        true);
-    if (listenerObj) {
-      ol.events.unlistenByKey(listenerObj);
-    }
-  }
-};
-
-
-/**
- * Unregisters event listeners on an event target. Inspired by
- * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
- *
- * The argument passed to this function is the key returned from
- * {@link ol.events.listen} or {@link ol.events.listenOnce}.
- *
- * @param {ol.EventsKey} key The key.
- */
-ol.events.unlistenByKey = function(key) {
-  if (key && key.target) {
-    key.target.removeEventListener(key.type, key.boundListener);
-    var listeners = ol.events.getListeners(key.target, key.type);
-    if (listeners) {
-      var i = 'deleteIndex' in key ? key.deleteIndex : listeners.indexOf(key);
-      if (i !== -1) {
-        listeners.splice(i, 1);
-      }
-      if (listeners.length === 0) {
-        ol.events.removeListeners_(key.target, key.type);
-      }
-    }
-    ol.obj.clear(key);
-  }
-};
-
-
-/**
- * Unregisters all event listeners on an event target. Inspired by
- * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
- *
- * @param {ol.EventTargetLike} target Target.
- */
-ol.events.unlistenAll = function(target) {
-  var listenerMap = ol.events.getListenerMap_(target);
-  for (var type in listenerMap) {
-    ol.events.removeListeners_(target, type);
-  }
-};
-
-goog.provide('ol.Disposable');
-
-goog.require('ol');
-
-/**
- * Objects that need to clean up after themselves.
- * @constructor
- */
-ol.Disposable = function() {};
-
-/**
- * The object has already been disposed.
- * @type {boolean}
- * @private
- */
-ol.Disposable.prototype.disposed_ = false;
-
-/**
- * Clean up.
- */
-ol.Disposable.prototype.dispose = function() {
-  if (!this.disposed_) {
-    this.disposed_ = true;
-    this.disposeInternal();
-  }
-};
-
-/**
- * Extension point for disposable objects.
- * @protected
- */
-ol.Disposable.prototype.disposeInternal = ol.nullFunction;
-
-goog.provide('ol.events.Event');
-
-
-/**
- * @classdesc
- * Stripped down implementation of the W3C DOM Level 2 Event interface.
- * @see {@link https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface}
- *
- * This implementation only provides `type` and `target` properties, and
- * `stopPropagation` and `preventDefault` methods. It is meant as base class
- * for higher level events defined in the library, and works with
- * {@link ol.events.EventTarget}.
- *
- * @constructor
- * @implements {oli.events.Event}
- * @param {string} type Type.
- */
-ol.events.Event = function(type) {
-
-  /**
-   * @type {boolean}
-   */
-  this.propagationStopped;
-
-  /**
-   * The event type.
-   * @type {string}
-   * @api
-   */
-  this.type = type;
-
-  /**
-   * The event target.
-   * @type {Object}
-   * @api
-   */
-  this.target = null;
-
-};
-
-
-/**
- * Stop event propagation.
- * @function
- * @override
- * @api
- */
-ol.events.Event.prototype.preventDefault =
-
-/**
- * Stop event propagation.
- * @function
- * @override
- * @api
- */
-ol.events.Event.prototype.stopPropagation = function() {
-  this.propagationStopped = true;
-};
-
-
-/**
- * @param {Event|ol.events.Event} evt Event
- */
-ol.events.Event.stopPropagation = function(evt) {
-  evt.stopPropagation();
-};
-
-
-/**
- * @param {Event|ol.events.Event} evt Event
- */
-ol.events.Event.preventDefault = function(evt) {
-  evt.preventDefault();
-};
-
-goog.provide('ol.events.EventTarget');
-
-goog.require('ol');
-goog.require('ol.Disposable');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-
-
-/**
- * @classdesc
- * A simplified implementation of the W3C DOM Level 2 EventTarget interface.
- * @see {@link https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget}
- *
- * There are two important simplifications compared to the specification:
- *
- * 1. The handling of `useCapture` in `addEventListener` and
- *    `removeEventListener`. There is no real capture model.
- * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.
- *    There is no event target hierarchy. When a listener calls
- *    `stopPropagation` or `preventDefault` on an event object, it means that no
- *    more listeners after this one will be called. Same as when the listener
- *    returns false.
- *
- * @constructor
- * @extends {ol.Disposable}
- */
-ol.events.EventTarget = function() {
-
-  ol.Disposable.call(this);
-
-  /**
-   * @private
-   * @type {!Object.<string, number>}
-   */
-  this.pendingRemovals_ = {};
-
-  /**
-   * @private
-   * @type {!Object.<string, number>}
-   */
-  this.dispatching_ = {};
-
-  /**
-   * @private
-   * @type {!Object.<string, Array.<ol.EventsListenerFunctionType>>}
-   */
-  this.listeners_ = {};
-
-};
-ol.inherits(ol.events.EventTarget, ol.Disposable);
-
-
-/**
- * @param {string} type Type.
- * @param {ol.EventsListenerFunctionType} listener Listener.
- */
-ol.events.EventTarget.prototype.addEventListener = function(type, listener) {
-  var listeners = this.listeners_[type];
-  if (!listeners) {
-    listeners = this.listeners_[type] = [];
-  }
-  if (listeners.indexOf(listener) === -1) {
-    listeners.push(listener);
-  }
-};
-
-
-/**
- * @param {{type: string,
- *     target: (EventTarget|ol.events.EventTarget|undefined)}|ol.events.Event|
- *     string} event Event or event type.
- * @return {boolean|undefined} `false` if anyone called preventDefault on the
- *     event object or if any of the listeners returned false.
- */
-ol.events.EventTarget.prototype.dispatchEvent = function(event) {
-  var evt = typeof event === 'string' ? new ol.events.Event(event) : event;
-  var type = evt.type;
-  evt.target = this;
-  var listeners = this.listeners_[type];
-  var propagate;
-  if (listeners) {
-    if (!(type in this.dispatching_)) {
-      this.dispatching_[type] = 0;
-      this.pendingRemovals_[type] = 0;
-    }
-    ++this.dispatching_[type];
-    for (var i = 0, ii = listeners.length; i < ii; ++i) {
-      if (listeners[i].call(this, evt) === false || evt.propagationStopped) {
-        propagate = false;
-        break;
-      }
-    }
-    --this.dispatching_[type];
-    if (this.dispatching_[type] === 0) {
-      var pendingRemovals = this.pendingRemovals_[type];
-      delete this.pendingRemovals_[type];
-      while (pendingRemovals--) {
-        this.removeEventListener(type, ol.nullFunction);
-      }
-      delete this.dispatching_[type];
-    }
-    return propagate;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.events.EventTarget.prototype.disposeInternal = function() {
-  ol.events.unlistenAll(this);
-};
-
-
-/**
- * Get the listeners for a specified event type. Listeners are returned in the
- * order that they will be called in.
- *
- * @param {string} type Type.
- * @return {Array.<ol.EventsListenerFunctionType>} Listeners.
- */
-ol.events.EventTarget.prototype.getListeners = function(type) {
-  return this.listeners_[type];
-};
-
-
-/**
- * @param {string=} opt_type Type. If not provided,
- *     `true` will be returned if this EventTarget has any listeners.
- * @return {boolean} Has listeners.
- */
-ol.events.EventTarget.prototype.hasListener = function(opt_type) {
-  return opt_type ?
-      opt_type in this.listeners_ :
-      Object.keys(this.listeners_).length > 0;
-};
-
-
-/**
- * @param {string} type Type.
- * @param {ol.EventsListenerFunctionType} listener Listener.
- */
-ol.events.EventTarget.prototype.removeEventListener = function(type, listener) {
-  var listeners = this.listeners_[type];
-  if (listeners) {
-    var index = listeners.indexOf(listener);
-    if (type in this.pendingRemovals_) {
-      // make listener a no-op, and remove later in #dispatchEvent()
-      listeners[index] = ol.nullFunction;
-      ++this.pendingRemovals_[type];
-    } else {
-      listeners.splice(index, 1);
-      if (listeners.length === 0) {
-        delete this.listeners_[type];
-      }
-    }
-  }
-};
-
-goog.provide('ol.events.EventType');
-
-/**
- * @enum {string}
- * @const
- */
-ol.events.EventType = {
-  /**
-   * Generic change event. Triggered when the revision counter is increased.
-   * @event ol.events.Event#change
-   * @api
-   */
-  CHANGE: 'change',
-
-  CLICK: 'click',
-  DBLCLICK: 'dblclick',
-  DRAGENTER: 'dragenter',
-  DRAGOVER: 'dragover',
-  DROP: 'drop',
-  ERROR: 'error',
-  KEYDOWN: 'keydown',
-  KEYPRESS: 'keypress',
-  LOAD: 'load',
-  MOUSEDOWN: 'mousedown',
-  MOUSEMOVE: 'mousemove',
-  MOUSEOUT: 'mouseout',
-  MOUSEUP: 'mouseup',
-  MOUSEWHEEL: 'mousewheel',
-  MSPOINTERDOWN: 'MSPointerDown',
-  RESIZE: 'resize',
-  TOUCHSTART: 'touchstart',
-  TOUCHMOVE: 'touchmove',
-  TOUCHEND: 'touchend',
-  WHEEL: 'wheel'
-};
-
-goog.provide('ol.Observable');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventTarget');
-goog.require('ol.events.EventType');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * An event target providing convenient methods for listener registration
- * and unregistration. A generic `change` event is always available through
- * {@link ol.Observable#changed}.
- *
- * @constructor
- * @extends {ol.events.EventTarget}
- * @fires ol.events.Event
- * @struct
- * @api
- */
-ol.Observable = function() {
-
-  ol.events.EventTarget.call(this);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.revision_ = 0;
-
-};
-ol.inherits(ol.Observable, ol.events.EventTarget);
-
-
-/**
- * Removes an event listener using the key returned by `on()` or `once()`.
- * @param {ol.EventsKey|Array.<ol.EventsKey>} key The key returned by `on()`
- *     or `once()` (or an array of keys).
- * @api
- */
-ol.Observable.unByKey = function(key) {
-  if (Array.isArray(key)) {
-    for (var i = 0, ii = key.length; i < ii; ++i) {
-      ol.events.unlistenByKey(key[i]);
-    }
-  } else {
-    ol.events.unlistenByKey(/** @type {ol.EventsKey} */ (key));
-  }
-};
-
-
-/**
- * Increases the revision counter and dispatches a 'change' event.
- * @api
- */
-ol.Observable.prototype.changed = function() {
-  ++this.revision_;
-  this.dispatchEvent(ol.events.EventType.CHANGE);
-};
-
-
-/**
- * Dispatches an event and calls all listeners listening for events
- * of this type. The event parameter can either be a string or an
- * Object with a `type` property.
- *
- * @param {{type: string,
- *     target: (EventTarget|ol.events.EventTarget|undefined)}|ol.events.Event|
- *     string} event Event object.
- * @function
- * @api
- */
-ol.Observable.prototype.dispatchEvent;
-
-
-/**
- * Get the version number for this object.  Each time the object is modified,
- * its version number will be incremented.
- * @return {number} Revision.
- * @api
- */
-ol.Observable.prototype.getRevision = function() {
-  return this.revision_;
-};
-
-
-/**
- * Listen for a certain type of event.
- * @param {string|Array.<string>} type The event type or array of event types.
- * @param {function(?): ?} listener The listener function.
- * @param {Object=} opt_this The object to use as `this` in `listener`.
- * @return {ol.EventsKey|Array.<ol.EventsKey>} Unique key for the listener. If
- *     called with an array of event types as the first argument, the return
- *     will be an array of keys.
- * @api
- */
-ol.Observable.prototype.on = function(type, listener, opt_this) {
-  if (Array.isArray(type)) {
-    var len = type.length;
-    var keys = new Array(len);
-    for (var i = 0; i < len; ++i) {
-      keys[i] = ol.events.listen(this, type[i], listener, opt_this);
-    }
-    return keys;
-  } else {
-    return ol.events.listen(
-        this, /** @type {string} */ (type), listener, opt_this);
-  }
-};
-
-
-/**
- * Listen once for a certain type of event.
- * @param {string|Array.<string>} type The event type or array of event types.
- * @param {function(?): ?} listener The listener function.
- * @param {Object=} opt_this The object to use as `this` in `listener`.
- * @return {ol.EventsKey|Array.<ol.EventsKey>} Unique key for the listener. If
- *     called with an array of event types as the first argument, the return
- *     will be an array of keys.
- * @api
- */
-ol.Observable.prototype.once = function(type, listener, opt_this) {
-  if (Array.isArray(type)) {
-    var len = type.length;
-    var keys = new Array(len);
-    for (var i = 0; i < len; ++i) {
-      keys[i] = ol.events.listenOnce(this, type[i], listener, opt_this);
-    }
-    return keys;
-  } else {
-    return ol.events.listenOnce(
-        this, /** @type {string} */ (type), listener, opt_this);
-  }
-};
-
-
-/**
- * Unlisten for a certain type of event.
- * @param {string|Array.<string>} type The event type or array of event types.
- * @param {function(?): ?} listener The listener function.
- * @param {Object=} opt_this The object which was used as `this` by the
- * `listener`.
- * @api
- */
-ol.Observable.prototype.un = function(type, listener, opt_this) {
-  if (Array.isArray(type)) {
-    for (var i = 0, ii = type.length; i < ii; ++i) {
-      ol.events.unlisten(this, type[i], listener, opt_this);
-    }
-    return;
-  } else {
-    ol.events.unlisten(this, /** @type {string} */ (type), listener, opt_this);
-  }
-};
-
-goog.provide('ol.Object');
-
-goog.require('ol');
-goog.require('ol.ObjectEventType');
-goog.require('ol.Observable');
-goog.require('ol.events.Event');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Most non-trivial classes inherit from this.
- *
- * This extends {@link ol.Observable} with observable properties, where each
- * property is observable as well as the object as a whole.
- *
- * Classes that inherit from this have pre-defined properties, to which you can
- * add your owns. The pre-defined properties are listed in this documentation as
- * 'Observable Properties', and have their own accessors; for example,
- * {@link ol.Map} has a `target` property, accessed with `getTarget()`  and
- * changed with `setTarget()`. Not all properties are however settable. There
- * are also general-purpose accessors `get()` and `set()`. For example,
- * `get('target')` is equivalent to `getTarget()`.
- *
- * The `set` accessors trigger a change event, and you can monitor this by
- * registering a listener. For example, {@link ol.View} has a `center`
- * property, so `view.on('change:center', function(evt) {...});` would call the
- * function whenever the value of the center property changes. Within the
- * function, `evt.target` would be the view, so `evt.target.getCenter()` would
- * return the new center.
- *
- * You can add your own observable properties with
- * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.
- * You can listen for changes on that property value with
- * `object.on('change:prop', listener)`. You can get a list of all
- * properties with {@link ol.Object#getProperties object.getProperties()}.
- *
- * Note that the observable properties are separate from standard JS properties.
- * You can, for example, give your map object a title with
- * `map.title='New title'` and with `map.set('title', 'Another title')`. The
- * first will be a `hasOwnProperty`; the second will appear in
- * `getProperties()`. Only the second is observable.
- *
- * Properties can be deleted by using the unset method. E.g.
- * object.unset('foo').
- *
- * @constructor
- * @extends {ol.Observable}
- * @param {Object.<string, *>=} opt_values An object with key-value pairs.
- * @fires ol.Object.Event
- * @api
- */
-ol.Object = function(opt_values) {
-  ol.Observable.call(this);
-
-  // Call ol.getUid to ensure that the order of objects' ids is the same as
-  // the order in which they were created.  This also helps to ensure that
-  // object properties are always added in the same order, which helps many
-  // JavaScript engines generate faster code.
-  ol.getUid(this);
-
-  /**
-   * @private
-   * @type {!Object.<string, *>}
-   */
-  this.values_ = {};
-
-  if (opt_values !== undefined) {
-    this.setProperties(opt_values);
-  }
-};
-ol.inherits(ol.Object, ol.Observable);
-
-
-/**
- * @private
- * @type {Object.<string, string>}
- */
-ol.Object.changeEventTypeCache_ = {};
-
-
-/**
- * @param {string} key Key name.
- * @return {string} Change name.
- */
-ol.Object.getChangeEventType = function(key) {
-  return ol.Object.changeEventTypeCache_.hasOwnProperty(key) ?
-      ol.Object.changeEventTypeCache_[key] :
-      (ol.Object.changeEventTypeCache_[key] = 'change:' + key);
-};
-
-
-/**
- * Gets a value.
- * @param {string} key Key name.
- * @return {*} Value.
- * @api
- */
-ol.Object.prototype.get = function(key) {
-  var value;
-  if (this.values_.hasOwnProperty(key)) {
-    value = this.values_[key];
-  }
-  return value;
-};
-
-
-/**
- * Get a list of object property names.
- * @return {Array.<string>} List of property names.
- * @api
- */
-ol.Object.prototype.getKeys = function() {
-  return Object.keys(this.values_);
-};
-
-
-/**
- * Get an object of all property names and values.
- * @return {Object.<string, *>} Object.
- * @api
- */
-ol.Object.prototype.getProperties = function() {
-  return ol.obj.assign({}, this.values_);
-};
-
-
-/**
- * @param {string} key Key name.
- * @param {*} oldValue Old value.
- */
-ol.Object.prototype.notify = function(key, oldValue) {
-  var eventType;
-  eventType = ol.Object.getChangeEventType(key);
-  this.dispatchEvent(new ol.Object.Event(eventType, key, oldValue));
-  eventType = ol.ObjectEventType.PROPERTYCHANGE;
-  this.dispatchEvent(new ol.Object.Event(eventType, key, oldValue));
-};
-
-
-/**
- * Sets a value.
- * @param {string} key Key name.
- * @param {*} value Value.
- * @param {boolean=} opt_silent Update without triggering an event.
- * @api
- */
-ol.Object.prototype.set = function(key, value, opt_silent) {
-  if (opt_silent) {
-    this.values_[key] = value;
-  } else {
-    var oldValue = this.values_[key];
-    this.values_[key] = value;
-    if (oldValue !== value) {
-      this.notify(key, oldValue);
-    }
-  }
-};
-
-
-/**
- * Sets a collection of key-value pairs.  Note that this changes any existing
- * properties and adds new ones (it does not remove any existing properties).
- * @param {Object.<string, *>} values Values.
- * @param {boolean=} opt_silent Update without triggering an event.
- * @api
- */
-ol.Object.prototype.setProperties = function(values, opt_silent) {
-  var key;
-  for (key in values) {
-    this.set(key, values[key], opt_silent);
-  }
-};
-
-
-/**
- * Unsets a property.
- * @param {string} key Key name.
- * @param {boolean=} opt_silent Unset without triggering an event.
- * @api
- */
-ol.Object.prototype.unset = function(key, opt_silent) {
-  if (key in this.values_) {
-    var oldValue = this.values_[key];
-    delete this.values_[key];
-    if (!opt_silent) {
-      this.notify(key, oldValue);
-    }
-  }
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.Object} instances are instances of this type.
- *
- * @param {string} type The event type.
- * @param {string} key The property name.
- * @param {*} oldValue The old value for `key`.
- * @extends {ol.events.Event}
- * @implements {oli.Object.Event}
- * @constructor
- */
-ol.Object.Event = function(type, key, oldValue) {
-  ol.events.Event.call(this, type);
-
-  /**
-   * The name of the property whose value is changing.
-   * @type {string}
-   * @api
-   */
-  this.key = key;
-
-  /**
-   * The old value. To get the new value use `e.target.get(e.key)` where
-   * `e` is the event object.
-   * @type {*}
-   * @api
-   */
-  this.oldValue = oldValue;
-
-};
-ol.inherits(ol.Object.Event, ol.events.Event);
-
-/**
- * An implementation of Google Maps' MVCArray.
- * @see https://developers.google.com/maps/documentation/javascript/reference
- */
-
-goog.provide('ol.Collection');
-
-goog.require('ol');
-goog.require('ol.AssertionError');
-goog.require('ol.CollectionEventType');
-goog.require('ol.Object');
-goog.require('ol.events.Event');
-
-
-/**
- * @classdesc
- * An expanded version of standard JS Array, adding convenience methods for
- * manipulation. Add and remove changes to the Collection trigger a Collection
- * event. Note that this does not cover changes to the objects _within_ the
- * Collection; they trigger events on the appropriate object, not on the
- * Collection as a whole.
- *
- * @constructor
- * @extends {ol.Object}
- * @fires ol.Collection.Event
- * @param {!Array.<T>=} opt_array Array.
- * @param {olx.CollectionOptions=} opt_options Collection options.
- * @template T
- * @api
- */
-ol.Collection = function(opt_array, opt_options) {
-
-  ol.Object.call(this);
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.unique_ = !!options.unique;
-
-  /**
-   * @private
-   * @type {!Array.<T>}
-   */
-  this.array_ = opt_array ? opt_array : [];
-
-  if (this.unique_) {
-    for (var i = 0, ii = this.array_.length; i < ii; ++i) {
-      this.assertUnique_(this.array_[i], i);
-    }
-  }
-
-  this.updateLength_();
-
-};
-ol.inherits(ol.Collection, ol.Object);
-
-
-/**
- * Remove all elements from the collection.
- * @api
- */
-ol.Collection.prototype.clear = function() {
-  while (this.getLength() > 0) {
-    this.pop();
-  }
-};
-
-
-/**
- * Add elements to the collection.  This pushes each item in the provided array
- * to the end of the collection.
- * @param {!Array.<T>} arr Array.
- * @return {ol.Collection.<T>} This collection.
- * @api
- */
-ol.Collection.prototype.extend = function(arr) {
-  var i, ii;
-  for (i = 0, ii = arr.length; i < ii; ++i) {
-    this.push(arr[i]);
-  }
-  return this;
-};
-
-
-/**
- * Iterate over each element, calling the provided callback.
- * @param {function(this: S, T, number, Array.<T>): *} f The function to call
- *     for every element. This function takes 3 arguments (the element, the
- *     index and the array). The return value is ignored.
- * @param {S=} opt_this The object to use as `this` in `f`.
- * @template S
- * @api
- */
-ol.Collection.prototype.forEach = function(f, opt_this) {
-  this.array_.forEach(f, opt_this);
-};
-
-
-/**
- * Get a reference to the underlying Array object. Warning: if the array
- * is mutated, no events will be dispatched by the collection, and the
- * collection's "length" property won't be in sync with the actual length
- * of the array.
- * @return {!Array.<T>} Array.
- * @api
- */
-ol.Collection.prototype.getArray = function() {
-  return this.array_;
-};
-
-
-/**
- * Get the element at the provided index.
- * @param {number} index Index.
- * @return {T} Element.
- * @api
- */
-ol.Collection.prototype.item = function(index) {
-  return this.array_[index];
-};
-
-
-/**
- * Get the length of this collection.
- * @return {number} The length of the array.
- * @observable
- * @api
- */
-ol.Collection.prototype.getLength = function() {
-  return /** @type {number} */ (this.get(ol.Collection.Property_.LENGTH));
-};
-
-
-/**
- * Insert an element at the provided index.
- * @param {number} index Index.
- * @param {T} elem Element.
- * @api
- */
-ol.Collection.prototype.insertAt = function(index, elem) {
-  if (this.unique_) {
-    this.assertUnique_(elem);
-  }
-  this.array_.splice(index, 0, elem);
-  this.updateLength_();
-  this.dispatchEvent(
-      new ol.Collection.Event(ol.CollectionEventType.ADD, elem));
-};
-
-
-/**
- * Remove the last element of the collection and return it.
- * Return `undefined` if the collection is empty.
- * @return {T|undefined} Element.
- * @api
- */
-ol.Collection.prototype.pop = function() {
-  return this.removeAt(this.getLength() - 1);
-};
-
-
-/**
- * Insert the provided element at the end of the collection.
- * @param {T} elem Element.
- * @return {number} New length of the collection.
- * @api
- */
-ol.Collection.prototype.push = function(elem) {
-  if (this.unique_) {
-    this.assertUnique_(elem);
-  }
-  var n = this.getLength();
-  this.insertAt(n, elem);
-  return this.getLength();
-};
-
-
-/**
- * Remove the first occurrence of an element from the collection.
- * @param {T} elem Element.
- * @return {T|undefined} The removed element or undefined if none found.
- * @api
- */
-ol.Collection.prototype.remove = function(elem) {
-  var arr = this.array_;
-  var i, ii;
-  for (i = 0, ii = arr.length; i < ii; ++i) {
-    if (arr[i] === elem) {
-      return this.removeAt(i);
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * Remove the element at the provided index and return it.
- * Return `undefined` if the collection does not contain this index.
- * @param {number} index Index.
- * @return {T|undefined} Value.
- * @api
- */
-ol.Collection.prototype.removeAt = function(index) {
-  var prev = this.array_[index];
-  this.array_.splice(index, 1);
-  this.updateLength_();
-  this.dispatchEvent(
-      new ol.Collection.Event(ol.CollectionEventType.REMOVE, prev));
-  return prev;
-};
-
-
-/**
- * Set the element at the provided index.
- * @param {number} index Index.
- * @param {T} elem Element.
- * @api
- */
-ol.Collection.prototype.setAt = function(index, elem) {
-  var n = this.getLength();
-  if (index < n) {
-    if (this.unique_) {
-      this.assertUnique_(elem, index);
-    }
-    var prev = this.array_[index];
-    this.array_[index] = elem;
-    this.dispatchEvent(
-        new ol.Collection.Event(ol.CollectionEventType.REMOVE, prev));
-    this.dispatchEvent(
-        new ol.Collection.Event(ol.CollectionEventType.ADD, elem));
-  } else {
-    var j;
-    for (j = n; j < index; ++j) {
-      this.insertAt(j, undefined);
-    }
-    this.insertAt(index, elem);
-  }
-};
-
-
-/**
- * @private
- */
-ol.Collection.prototype.updateLength_ = function() {
-  this.set(ol.Collection.Property_.LENGTH, this.array_.length);
-};
-
-
-/**
- * @private
- * @param {T} elem Element.
- * @param {number=} opt_except Optional index to ignore.
- */
-ol.Collection.prototype.assertUnique_ = function(elem, opt_except) {
-  for (var i = 0, ii = this.array_.length; i < ii; ++i) {
-    if (this.array_[i] === elem && i !== opt_except) {
-      throw new ol.AssertionError(58);
-    }
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.Collection.Property_ = {
-  LENGTH: 'length'
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.Collection} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.Collection.Event}
- * @param {ol.CollectionEventType} type Type.
- * @param {*=} opt_element Element.
- */
-ol.Collection.Event = function(type, opt_element) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The element that is added to or removed from the collection.
-   * @type {*}
-   * @api
-   */
-  this.element = opt_element;
-
-};
-ol.inherits(ol.Collection.Event, ol.events.Event);
-
-goog.provide('ol.color');
-
-goog.require('ol.asserts');
-goog.require('ol.math');
-
-
-/**
- * This RegExp matches # followed by 3 or 6 hex digits.
- * @const
- * @type {RegExp}
- * @private
- */
-ol.color.HEX_COLOR_RE_ = /^#(?:[0-9a-f]{3}){1,2}$/i;
-
-
-/**
- * Regular expression for matching potential named color style strings.
- * @const
- * @type {RegExp}
- * @private
- */
-ol.color.NAMED_COLOR_RE_ = /^([a-z]*)$/i;
-
-
-/**
- * Return the color as an array. This function maintains a cache of calculated
- * arrays which means the result should not be modified.
- * @param {ol.Color|string} color Color.
- * @return {ol.Color} Color.
- * @api
- */
-ol.color.asArray = function(color) {
-  if (Array.isArray(color)) {
-    return color;
-  } else {
-    return ol.color.fromString(/** @type {string} */ (color));
-  }
-};
-
-
-/**
- * Return the color as an rgba string.
- * @param {ol.Color|string} color Color.
- * @return {string} Rgba string.
- * @api
- */
-ol.color.asString = function(color) {
-  if (typeof color === 'string') {
-    return color;
-  } else {
-    return ol.color.toString(color);
-  }
-};
-
-/**
- * Return named color as an rgba string.
- * @param {string} color Named color.
- * @return {string} Rgb string.
- */
-ol.color.fromNamed = function(color) {
-  var el = document.createElement('div');
-  el.style.color = color;
-  document.body.appendChild(el);
-  var rgb = getComputedStyle(el).color;
-  document.body.removeChild(el);
-  return rgb;
-};
-
-
-/**
- * @param {string} s String.
- * @return {ol.Color} Color.
- */
-ol.color.fromString = (
-    function() {
-
-      // We maintain a small cache of parsed strings.  To provide cheap LRU-like
-      // semantics, whenever the cache grows too large we simply delete an
-      // arbitrary 25% of the entries.
-
-      /**
-       * @const
-       * @type {number}
-       */
-      var MAX_CACHE_SIZE = 1024;
-
-      /**
-       * @type {Object.<string, ol.Color>}
-       */
-      var cache = {};
-
-      /**
-       * @type {number}
-       */
-      var cacheSize = 0;
-
-      return (
-          /**
-           * @param {string} s String.
-           * @return {ol.Color} Color.
-           */
-          function(s) {
-            var color;
-            if (cache.hasOwnProperty(s)) {
-              color = cache[s];
-            } else {
-              if (cacheSize >= MAX_CACHE_SIZE) {
-                var i = 0;
-                var key;
-                for (key in cache) {
-                  if ((i++ & 3) === 0) {
-                    delete cache[key];
-                    --cacheSize;
-                  }
-                }
-              }
-              color = ol.color.fromStringInternal_(s);
-              cache[s] = color;
-              ++cacheSize;
-            }
-            return color;
-          });
-
-    })();
-
-
-/**
- * @param {string} s String.
- * @private
- * @return {ol.Color} Color.
- */
-ol.color.fromStringInternal_ = function(s) {
-  var r, g, b, a, color, parts;
-
-  if (ol.color.NAMED_COLOR_RE_.exec(s)) {
-    s = ol.color.fromNamed(s);
-  }
-
-  if (ol.color.HEX_COLOR_RE_.exec(s)) { // hex
-    var n = s.length - 1; // number of hex digits
-    ol.asserts.assert(n == 3 || n == 6, 54); // Hex color should have 3 or 6 digits
-    var d = n == 3 ? 1 : 2; // number of digits per channel
-    r = parseInt(s.substr(1 + 0 * d, d), 16);
-    g = parseInt(s.substr(1 + 1 * d, d), 16);
-    b = parseInt(s.substr(1 + 2 * d, d), 16);
-    if (d == 1) {
-      r = (r << 4) + r;
-      g = (g << 4) + g;
-      b = (b << 4) + b;
-    }
-    a = 1;
-    color = [r, g, b, a];
-  } else if (s.indexOf('rgba(') == 0) { // rgba()
-    parts = s.slice(5, -1).split(',').map(Number);
-    color = ol.color.normalize(parts);
-  } else if (s.indexOf('rgb(') == 0) { // rgb()
-    parts = s.slice(4, -1).split(',').map(Number);
-    parts.push(1);
-    color = ol.color.normalize(parts);
-  } else {
-    ol.asserts.assert(false, 14); // Invalid color
-  }
-  return /** @type {ol.Color} */ (color);
-};
-
-
-/**
- * @param {ol.Color} color Color.
- * @param {ol.Color=} opt_color Color.
- * @return {ol.Color} Clamped color.
- */
-ol.color.normalize = function(color, opt_color) {
-  var result = opt_color || [];
-  result[0] = ol.math.clamp((color[0] + 0.5) | 0, 0, 255);
-  result[1] = ol.math.clamp((color[1] + 0.5) | 0, 0, 255);
-  result[2] = ol.math.clamp((color[2] + 0.5) | 0, 0, 255);
-  result[3] = ol.math.clamp(color[3], 0, 1);
-  return result;
-};
-
-
-/**
- * @param {ol.Color} color Color.
- * @return {string} String.
- */
-ol.color.toString = function(color) {
-  var r = color[0];
-  if (r != (r | 0)) {
-    r = (r + 0.5) | 0;
-  }
-  var g = color[1];
-  if (g != (g | 0)) {
-    g = (g + 0.5) | 0;
-  }
-  var b = color[2];
-  if (b != (b | 0)) {
-    b = (b + 0.5) | 0;
-  }
-  var a = color[3] === undefined ? 1 : color[3];
-  return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';
-};
-
-goog.provide('ol.colorlike');
-
-goog.require('ol.color');
-
-
-/**
- * @param {ol.Color|ol.ColorLike} color Color.
- * @return {ol.ColorLike} The color as an ol.ColorLike
- * @api
- */
-ol.colorlike.asColorLike = function(color) {
-  if (ol.colorlike.isColorLike(color)) {
-    return /** @type {string|CanvasPattern|CanvasGradient} */ (color);
-  } else {
-    return ol.color.asString(/** @type {ol.Color} */ (color));
-  }
-};
-
-
-/**
- * @param {?} color The value that is potentially an ol.ColorLike
- * @return {boolean} Whether the color is an ol.ColorLike
- */
-ol.colorlike.isColorLike = function(color) {
-  return (
-      typeof color === 'string' ||
-      color instanceof CanvasPattern ||
-      color instanceof CanvasGradient
-  );
-};
-
-goog.provide('ol.dom');
-
-
-/**
- * Create an html canvas element and returns its 2d context.
- * @param {number=} opt_width Canvas width.
- * @param {number=} opt_height Canvas height.
- * @return {CanvasRenderingContext2D} The context.
- */
-ol.dom.createCanvasContext2D = function(opt_width, opt_height) {
-  var canvas = document.createElement('CANVAS');
-  if (opt_width) {
-    canvas.width = opt_width;
-  }
-  if (opt_height) {
-    canvas.height = opt_height;
-  }
-  return canvas.getContext('2d');
-};
-
-
-/**
- * Get the current computed width for the given element including margin,
- * padding and border.
- * Equivalent to jQuery's `$(el).outerWidth(true)`.
- * @param {!Element} element Element.
- * @return {number} The width.
- */
-ol.dom.outerWidth = function(element) {
-  var width = element.offsetWidth;
-  var style = getComputedStyle(element);
-  width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);
-
-  return width;
-};
-
-
-/**
- * Get the current computed height for the given element including margin,
- * padding and border.
- * Equivalent to jQuery's `$(el).outerHeight(true)`.
- * @param {!Element} element Element.
- * @return {number} The height.
- */
-ol.dom.outerHeight = function(element) {
-  var height = element.offsetHeight;
-  var style = getComputedStyle(element);
-  height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);
-
-  return height;
-};
-
-/**
- * @param {Node} newNode Node to replace old node
- * @param {Node} oldNode The node to be replaced
- */
-ol.dom.replaceNode = function(newNode, oldNode) {
-  var parent = oldNode.parentNode;
-  if (parent) {
-    parent.replaceChild(newNode, oldNode);
-  }
-};
-
-/**
- * @param {Node} node The node to remove.
- * @returns {Node} The node that was removed or null.
- */
-ol.dom.removeNode = function(node) {
-  return node && node.parentNode ? node.parentNode.removeChild(node) : null;
-};
-
-/**
- * @param {Node} node The node to remove the children from.
- */
-ol.dom.removeChildren = function(node) {
-  while (node.lastChild) {
-    node.removeChild(node.lastChild);
-  }
-};
-
-goog.provide('ol.MapEventType');
-
-/**
- * @enum {string}
- */
-ol.MapEventType = {
-
-  /**
-   * Triggered after a map frame is rendered.
-   * @event ol.MapEvent#postrender
-   * @api
-   */
-  POSTRENDER: 'postrender',
-
-  /**
-   * Triggered when the map starts moving.
-   * @event ol.MapEvent#movestart
-   * @api
-   */
-  MOVESTART: 'movestart',
-
-  /**
-   * Triggered after the map is moved.
-   * @event ol.MapEvent#moveend
-   * @api
-   */
-  MOVEEND: 'moveend'
-
-};
-
-goog.provide('ol.control.Control');
-
-goog.require('ol');
-goog.require('ol.MapEventType');
-goog.require('ol.Object');
-goog.require('ol.dom');
-goog.require('ol.events');
-
-
-/**
- * @classdesc
- * A control is a visible widget with a DOM element in a fixed position on the
- * screen. They can involve user input (buttons), or be informational only;
- * the position is determined using CSS. By default these are placed in the
- * container with CSS class name `ol-overlaycontainer-stopevent`, but can use
- * any outside DOM element.
- *
- * This is the base class for controls. You can use it for simple custom
- * controls by creating the element with listeners, creating an instance:
- * ```js
- * var myControl = new ol.control.Control({element: myElement});
- * ```
- * and then adding this to the map.
- *
- * The main advantage of having this as a control rather than a simple separate
- * DOM element is that preventing propagation is handled for you. Controls
- * will also be `ol.Object`s in a `ol.Collection`, so you can use their
- * methods.
- *
- * You can also extend this base for your own control class. See
- * examples/custom-controls for an example of how to do this.
- *
- * @constructor
- * @extends {ol.Object}
- * @implements {oli.control.Control}
- * @param {olx.control.ControlOptions} options Control options.
- * @api
- */
-ol.control.Control = function(options) {
-
-  ol.Object.call(this);
-
-  /**
-   * @protected
-   * @type {Element}
-   */
-  this.element = options.element ? options.element : null;
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.target_ = null;
-
-  /**
-   * @private
-   * @type {ol.Map}
-   */
-  this.map_ = null;
-
-  /**
-   * @protected
-   * @type {!Array.<ol.EventsKey>}
-   */
-  this.listenerKeys = [];
-
-  /**
-   * @type {function(ol.MapEvent)}
-   */
-  this.render = options.render ? options.render : ol.nullFunction;
-
-  if (options.target) {
-    this.setTarget(options.target);
-  }
-
-};
-ol.inherits(ol.control.Control, ol.Object);
-
-
-/**
- * @inheritDoc
- */
-ol.control.Control.prototype.disposeInternal = function() {
-  ol.dom.removeNode(this.element);
-  ol.Object.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Get the map associated with this control.
- * @return {ol.Map} Map.
- * @api
- */
-ol.control.Control.prototype.getMap = function() {
-  return this.map_;
-};
-
-
-/**
- * Remove the control from its current map and attach it to the new map.
- * Subclasses may set up event handlers to get notified about changes to
- * the map here.
- * @param {ol.Map} map Map.
- * @override
- * @api
- */
-ol.control.Control.prototype.setMap = function(map) {
-  if (this.map_) {
-    ol.dom.removeNode(this.element);
-  }
-  for (var i = 0, ii = this.listenerKeys.length; i < ii; ++i) {
-    ol.events.unlistenByKey(this.listenerKeys[i]);
-  }
-  this.listenerKeys.length = 0;
-  this.map_ = map;
-  if (this.map_) {
-    var target = this.target_ ?
-        this.target_ : map.getOverlayContainerStopEvent();
-    target.appendChild(this.element);
-    if (this.render !== ol.nullFunction) {
-      this.listenerKeys.push(ol.events.listen(map,
-          ol.MapEventType.POSTRENDER, this.render, this));
-    }
-    map.render();
-  }
-};
-
-
-/**
- * This function is used to set a target element for the control. It has no
- * effect if it is called after the control has been added to the map (i.e.
- * after `setMap` is called on the control). If no `target` is set in the
- * options passed to the control constructor and if `setTarget` is not called
- * then the control is added to the map's overlay container.
- * @param {Element|string} target Target.
- * @api
- */
-ol.control.Control.prototype.setTarget = function(target) {
-  this.target_ = typeof target === 'string' ?
-    document.getElementById(target) :
-    target;
-};
-
-goog.provide('ol.css');
-
-
-/**
- * The CSS class for hidden feature.
- *
- * @const
- * @type {string}
- */
-ol.css.CLASS_HIDDEN = 'ol-hidden';
-
-
-/**
- * The CSS class that we'll give the DOM elements to have them selectable.
- *
- * @const
- * @type {string}
- */
-ol.css.CLASS_SELECTABLE = 'ol-selectable';
-
-/**
- * The CSS class that we'll give the DOM elements to have them unselectable.
- *
- * @const
- * @type {string}
- */
-ol.css.CLASS_UNSELECTABLE = 'ol-unselectable';
-
-
-/**
- * The CSS class for unsupported feature.
- *
- * @const
- * @type {string}
- */
-ol.css.CLASS_UNSUPPORTED = 'ol-unsupported';
-
-
-/**
- * The CSS class for controls.
- *
- * @const
- * @type {string}
- */
-ol.css.CLASS_CONTROL = 'ol-control';
-
-// FIXME handle date line wrap
-
-goog.provide('ol.control.Attribution');
-
-goog.require('ol');
-goog.require('ol.dom');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Control to show all the attributions associated with the layer sources
- * in the map. This control is one of the default controls included in maps.
- * By default it will show in the bottom right portion of the map, but this can
- * be changed by using a css selector for `.ol-attribution`.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.AttributionOptions=} opt_options Attribution options.
- * @api
- */
-ol.control.Attribution = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.ulElement_ = document.createElement('UL');
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.logoLi_ = document.createElement('LI');
-
-  this.ulElement_.appendChild(this.logoLi_);
-  this.logoLi_.style.display = 'none';
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.collapsible_ = options.collapsible !== undefined ?
-      options.collapsible : true;
-
-  if (!this.collapsible_) {
-    this.collapsed_ = false;
-  }
-
-  var className = options.className !== undefined ? options.className : 'ol-attribution';
-
-  var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions';
-
-  var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\u00BB';
-
-  if (typeof collapseLabel === 'string') {
-    /**
-     * @private
-     * @type {Node}
-     */
-    this.collapseLabel_ = document.createElement('span');
-    this.collapseLabel_.textContent = collapseLabel;
-  } else {
-    this.collapseLabel_ = collapseLabel;
-  }
-
-  var label = options.label !== undefined ? options.label : 'i';
-
-  if (typeof label === 'string') {
-    /**
-     * @private
-     * @type {Node}
-     */
-    this.label_ = document.createElement('span');
-    this.label_.textContent = label;
-  } else {
-    this.label_ = label;
-  }
-
-
-  var activeLabel = (this.collapsible_ && !this.collapsed_) ?
-      this.collapseLabel_ : this.label_;
-  var button = document.createElement('button');
-  button.setAttribute('type', 'button');
-  button.title = tipLabel;
-  button.appendChild(activeLabel);
-
-  ol.events.listen(button, ol.events.EventType.CLICK, this.handleClick_, this);
-
-  var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
-      ol.css.CLASS_CONTROL +
-      (this.collapsed_ && this.collapsible_ ? ' ol-collapsed' : '') +
-      (this.collapsible_ ? '' : ' ol-uncollapsible');
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(this.ulElement_);
-  element.appendChild(button);
-
-  var render = options.render ? options.render : ol.control.Attribution.render;
-
-  ol.control.Control.call(this, {
-    element: element,
-    render: render,
-    target: options.target
-  });
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderedVisible_ = true;
-
-  /**
-   * @private
-   * @type {Object.<string, Element>}
-   */
-  this.attributionElements_ = {};
-
-  /**
-   * @private
-   * @type {Object.<string, boolean>}
-   */
-  this.attributionElementRenderedVisible_ = {};
-
-  /**
-   * @private
-   * @type {Object.<string, Element>}
-   */
-  this.logoElements_ = {};
-
-};
-ol.inherits(ol.control.Attribution, ol.control.Control);
-
-
-/**
- * @param {?olx.FrameState} frameState Frame state.
- * @return {Array.<Object.<string, ol.Attribution>>} Attributions.
- */
-ol.control.Attribution.prototype.getSourceAttributions = function(frameState) {
-  var i, ii, j, jj, tileRanges, source, sourceAttribution,
-      sourceAttributionKey, sourceAttributions, sourceKey;
-  var intersectsTileRange;
-  var layerStatesArray = frameState.layerStatesArray;
-  /** @type {Object.<string, ol.Attribution>} */
-  var attributions = ol.obj.assign({}, frameState.attributions);
-  /** @type {Object.<string, ol.Attribution>} */
-  var hiddenAttributions = {};
-  var uniqueAttributions = {};
-  var projection = /** @type {!ol.proj.Projection} */ (frameState.viewState.projection);
-  for (i = 0, ii = layerStatesArray.length; i < ii; i++) {
-    source = layerStatesArray[i].layer.getSource();
-    if (!source) {
-      continue;
-    }
-    sourceKey = ol.getUid(source).toString();
-    sourceAttributions = source.getAttributions();
-    if (!sourceAttributions) {
-      continue;
-    }
-    for (j = 0, jj = sourceAttributions.length; j < jj; j++) {
-      sourceAttribution = sourceAttributions[j];
-      sourceAttributionKey = ol.getUid(sourceAttribution).toString();
-      if (sourceAttributionKey in attributions) {
-        continue;
-      }
-      tileRanges = frameState.usedTiles[sourceKey];
-      if (tileRanges) {
-        var tileGrid = /** @type {ol.source.Tile} */ (source).getTileGridForProjection(projection);
-        intersectsTileRange = sourceAttribution.intersectsAnyTileRange(
-            tileRanges, tileGrid, projection);
-      } else {
-        intersectsTileRange = false;
-      }
-      if (intersectsTileRange) {
-        if (sourceAttributionKey in hiddenAttributions) {
-          delete hiddenAttributions[sourceAttributionKey];
-        }
-        var html = sourceAttribution.getHTML();
-        if (!(html in uniqueAttributions)) {
-          uniqueAttributions[html] = true;
-          attributions[sourceAttributionKey] = sourceAttribution;
-        }
-      } else {
-        hiddenAttributions[sourceAttributionKey] = sourceAttribution;
-      }
-    }
-  }
-  return [attributions, hiddenAttributions];
-};
-
-
-/**
- * Update the attribution element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.Attribution}
- * @api
- */
-ol.control.Attribution.render = function(mapEvent) {
-  this.updateElement_(mapEvent.frameState);
-};
-
-
-/**
- * @private
- * @param {?olx.FrameState} frameState Frame state.
- */
-ol.control.Attribution.prototype.updateElement_ = function(frameState) {
-
-  if (!frameState) {
-    if (this.renderedVisible_) {
-      this.element.style.display = 'none';
-      this.renderedVisible_ = false;
-    }
-    return;
-  }
-
-  var attributions = this.getSourceAttributions(frameState);
-  /** @type {Object.<string, ol.Attribution>} */
-  var visibleAttributions = attributions[0];
-  /** @type {Object.<string, ol.Attribution>} */
-  var hiddenAttributions = attributions[1];
-
-  var attributionElement, attributionKey;
-  for (attributionKey in this.attributionElements_) {
-    if (attributionKey in visibleAttributions) {
-      if (!this.attributionElementRenderedVisible_[attributionKey]) {
-        this.attributionElements_[attributionKey].style.display = '';
-        this.attributionElementRenderedVisible_[attributionKey] = true;
-      }
-      delete visibleAttributions[attributionKey];
-    } else if (attributionKey in hiddenAttributions) {
-      if (this.attributionElementRenderedVisible_[attributionKey]) {
-        this.attributionElements_[attributionKey].style.display = 'none';
-        delete this.attributionElementRenderedVisible_[attributionKey];
-      }
-      delete hiddenAttributions[attributionKey];
-    } else {
-      ol.dom.removeNode(this.attributionElements_[attributionKey]);
-      delete this.attributionElements_[attributionKey];
-      delete this.attributionElementRenderedVisible_[attributionKey];
-    }
-  }
-  for (attributionKey in visibleAttributions) {
-    attributionElement = document.createElement('LI');
-    attributionElement.innerHTML =
-        visibleAttributions[attributionKey].getHTML();
-    this.ulElement_.appendChild(attributionElement);
-    this.attributionElements_[attributionKey] = attributionElement;
-    this.attributionElementRenderedVisible_[attributionKey] = true;
-  }
-  for (attributionKey in hiddenAttributions) {
-    attributionElement = document.createElement('LI');
-    attributionElement.innerHTML =
-        hiddenAttributions[attributionKey].getHTML();
-    attributionElement.style.display = 'none';
-    this.ulElement_.appendChild(attributionElement);
-    this.attributionElements_[attributionKey] = attributionElement;
-  }
-
-  var renderVisible =
-      !ol.obj.isEmpty(this.attributionElementRenderedVisible_) ||
-      !ol.obj.isEmpty(frameState.logos);
-  if (this.renderedVisible_ != renderVisible) {
-    this.element.style.display = renderVisible ? '' : 'none';
-    this.renderedVisible_ = renderVisible;
-  }
-  if (renderVisible &&
-      ol.obj.isEmpty(this.attributionElementRenderedVisible_)) {
-    this.element.classList.add('ol-logo-only');
-  } else {
-    this.element.classList.remove('ol-logo-only');
-  }
-
-  this.insertLogos_(frameState);
-
-};
-
-
-/**
- * @param {?olx.FrameState} frameState Frame state.
- * @private
- */
-ol.control.Attribution.prototype.insertLogos_ = function(frameState) {
-
-  var logo;
-  var logos = frameState.logos;
-  var logoElements = this.logoElements_;
-
-  for (logo in logoElements) {
-    if (!(logo in logos)) {
-      ol.dom.removeNode(logoElements[logo]);
-      delete logoElements[logo];
-    }
-  }
-
-  var image, logoElement, logoKey;
-  for (logoKey in logos) {
-    var logoValue = logos[logoKey];
-    if (logoValue instanceof HTMLElement) {
-      this.logoLi_.appendChild(logoValue);
-      logoElements[logoKey] = logoValue;
-    }
-    if (!(logoKey in logoElements)) {
-      image = new Image();
-      image.src = logoKey;
-      if (logoValue === '') {
-        logoElement = image;
-      } else {
-        logoElement = document.createElement('a');
-        logoElement.href = logoValue;
-        logoElement.appendChild(image);
-      }
-      this.logoLi_.appendChild(logoElement);
-      logoElements[logoKey] = logoElement;
-    }
-  }
-
-  this.logoLi_.style.display = !ol.obj.isEmpty(logos) ? '' : 'none';
-
-};
-
-
-/**
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.Attribution.prototype.handleClick_ = function(event) {
-  event.preventDefault();
-  this.handleToggle_();
-};
-
-
-/**
- * @private
- */
-ol.control.Attribution.prototype.handleToggle_ = function() {
-  this.element.classList.toggle('ol-collapsed');
-  if (this.collapsed_) {
-    ol.dom.replaceNode(this.collapseLabel_, this.label_);
-  } else {
-    ol.dom.replaceNode(this.label_, this.collapseLabel_);
-  }
-  this.collapsed_ = !this.collapsed_;
-};
-
-
-/**
- * Return `true` if the attribution is collapsible, `false` otherwise.
- * @return {boolean} True if the widget is collapsible.
- * @api
- */
-ol.control.Attribution.prototype.getCollapsible = function() {
-  return this.collapsible_;
-};
-
-
-/**
- * Set whether the attribution should be collapsible.
- * @param {boolean} collapsible True if the widget is collapsible.
- * @api
- */
-ol.control.Attribution.prototype.setCollapsible = function(collapsible) {
-  if (this.collapsible_ === collapsible) {
-    return;
-  }
-  this.collapsible_ = collapsible;
-  this.element.classList.toggle('ol-uncollapsible');
-  if (!collapsible && this.collapsed_) {
-    this.handleToggle_();
-  }
-};
-
-
-/**
- * Collapse or expand the attribution according to the passed parameter. Will
- * not do anything if the attribution isn't collapsible or if the current
- * collapsed state is already the one requested.
- * @param {boolean} collapsed True if the widget is collapsed.
- * @api
- */
-ol.control.Attribution.prototype.setCollapsed = function(collapsed) {
-  if (!this.collapsible_ || this.collapsed_ === collapsed) {
-    return;
-  }
-  this.handleToggle_();
-};
-
-
-/**
- * Return `true` when the attribution is currently collapsed or `false`
- * otherwise.
- * @return {boolean} True if the widget is collapsed.
- * @api
- */
-ol.control.Attribution.prototype.getCollapsed = function() {
-  return this.collapsed_;
-};
-
-goog.provide('ol.easing');
-
-
-/**
- * Start slow and speed up.
- * @param {number} t Input between 0 and 1.
- * @return {number} Output between 0 and 1.
- * @api
- */
-ol.easing.easeIn = function(t) {
-  return Math.pow(t, 3);
-};
-
-
-/**
- * Start fast and slow down.
- * @param {number} t Input between 0 and 1.
- * @return {number} Output between 0 and 1.
- * @api
- */
-ol.easing.easeOut = function(t) {
-  return 1 - ol.easing.easeIn(1 - t);
-};
-
-
-/**
- * Start slow, speed up, and then slow down again.
- * @param {number} t Input between 0 and 1.
- * @return {number} Output between 0 and 1.
- * @api
- */
-ol.easing.inAndOut = function(t) {
-  return 3 * t * t - 2 * t * t * t;
-};
-
-
-/**
- * Maintain a constant speed over time.
- * @param {number} t Input between 0 and 1.
- * @return {number} Output between 0 and 1.
- * @api
- */
-ol.easing.linear = function(t) {
-  return t;
-};
-
-
-/**
- * Start slow, speed up, and at the very end slow down again.  This has the
- * same general behavior as {@link ol.easing.inAndOut}, but the final slowdown
- * is delayed.
- * @param {number} t Input between 0 and 1.
- * @return {number} Output between 0 and 1.
- * @api
- */
-ol.easing.upAndDown = function(t) {
-  if (t < 0.5) {
-    return ol.easing.inAndOut(2 * t);
-  } else {
-    return 1 - ol.easing.inAndOut(2 * (t - 0.5));
-  }
-};
-
-goog.provide('ol.control.Rotate');
-
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-goog.require('ol.easing');
-
-
-/**
- * @classdesc
- * A button control to reset rotation to 0.
- * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css
- * selector is added to the button when the rotation is 0.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.RotateOptions=} opt_options Rotate options.
- * @api
- */
-ol.control.Rotate = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var className = options.className !== undefined ? options.className : 'ol-rotate';
-
-  var label = options.label !== undefined ? options.label : '\u21E7';
-
-  /**
-   * @type {Element}
-   * @private
-   */
-  this.label_ = null;
-
-  if (typeof label === 'string') {
-    this.label_ = document.createElement('span');
-    this.label_.className = 'ol-compass';
-    this.label_.textContent = label;
-  } else {
-    this.label_ = label;
-    this.label_.classList.add('ol-compass');
-  }
-
-  var tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';
-
-  var button = document.createElement('button');
-  button.className = className + '-reset';
-  button.setAttribute('type', 'button');
-  button.title = tipLabel;
-  button.appendChild(this.label_);
-
-  ol.events.listen(button, ol.events.EventType.CLICK,
-      ol.control.Rotate.prototype.handleClick_, this);
-
-  var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
-      ol.css.CLASS_CONTROL;
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(button);
-
-  var render = options.render ? options.render : ol.control.Rotate.render;
-
-  this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;
-
-  ol.control.Control.call(this, {
-    element: element,
-    render: render,
-    target: options.target
-  });
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.rotation_ = undefined;
-
-  if (this.autoHide_) {
-    this.element.classList.add(ol.css.CLASS_HIDDEN);
-  }
-
-};
-ol.inherits(ol.control.Rotate, ol.control.Control);
-
-
-/**
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.Rotate.prototype.handleClick_ = function(event) {
-  event.preventDefault();
-  if (this.callResetNorth_ !== undefined) {
-    this.callResetNorth_();
-  } else {
-    this.resetNorth_();
-  }
-};
-
-
-/**
- * @private
- */
-ol.control.Rotate.prototype.resetNorth_ = function() {
-  var map = this.getMap();
-  var view = map.getView();
-  if (!view) {
-    // the map does not have a view, so we can't act
-    // upon it
-    return;
-  }
-  if (view.getRotation() !== undefined) {
-    if (this.duration_ > 0) {
-      view.animate({
-        rotation: 0,
-        duration: this.duration_,
-        easing: ol.easing.easeOut
-      });
-    } else {
-      view.setRotation(0);
-    }
-  }
-};
-
-
-/**
- * Update the rotate control element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.Rotate}
- * @api
- */
-ol.control.Rotate.render = function(mapEvent) {
-  var frameState = mapEvent.frameState;
-  if (!frameState) {
-    return;
-  }
-  var rotation = frameState.viewState.rotation;
-  if (rotation != this.rotation_) {
-    var transform = 'rotate(' + rotation + 'rad)';
-    if (this.autoHide_) {
-      var contains = this.element.classList.contains(ol.css.CLASS_HIDDEN);
-      if (!contains && rotation === 0) {
-        this.element.classList.add(ol.css.CLASS_HIDDEN);
-      } else if (contains && rotation !== 0) {
-        this.element.classList.remove(ol.css.CLASS_HIDDEN);
-      }
-    }
-    this.label_.style.msTransform = transform;
-    this.label_.style.webkitTransform = transform;
-    this.label_.style.transform = transform;
-  }
-  this.rotation_ = rotation;
-};
-
-goog.provide('ol.control.Zoom');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-goog.require('ol.easing');
-
-
-/**
- * @classdesc
- * A control with 2 buttons, one for zoom in and one for zoom out.
- * This control is one of the default controls of a map. To style this control
- * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.ZoomOptions=} opt_options Zoom options.
- * @api
- */
-ol.control.Zoom = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var className = options.className !== undefined ? options.className : 'ol-zoom';
-
-  var delta = options.delta !== undefined ? options.delta : 1;
-
-  var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';
-  var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\u2212';
-
-  var zoomInTipLabel = options.zoomInTipLabel !== undefined ?
-      options.zoomInTipLabel : 'Zoom in';
-  var zoomOutTipLabel = options.zoomOutTipLabel !== undefined ?
-      options.zoomOutTipLabel : 'Zoom out';
-
-  var inElement = document.createElement('button');
-  inElement.className = className + '-in';
-  inElement.setAttribute('type', 'button');
-  inElement.title = zoomInTipLabel;
-  inElement.appendChild(
-    typeof zoomInLabel === 'string' ? document.createTextNode(zoomInLabel) : zoomInLabel
-  );
-
-  ol.events.listen(inElement, ol.events.EventType.CLICK,
-      ol.control.Zoom.prototype.handleClick_.bind(this, delta));
-
-  var outElement = document.createElement('button');
-  outElement.className = className + '-out';
-  outElement.setAttribute('type', 'button');
-  outElement.title = zoomOutTipLabel;
-  outElement.appendChild(
-    typeof zoomOutLabel === 'string' ? document.createTextNode(zoomOutLabel) : zoomOutLabel
-  );
-
-  ol.events.listen(outElement, ol.events.EventType.CLICK,
-      ol.control.Zoom.prototype.handleClick_.bind(this, -delta));
-
-  var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
-      ol.css.CLASS_CONTROL;
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(inElement);
-  element.appendChild(outElement);
-
-  ol.control.Control.call(this, {
-    element: element,
-    target: options.target
-  });
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-
-};
-ol.inherits(ol.control.Zoom, ol.control.Control);
-
-
-/**
- * @param {number} delta Zoom delta.
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.Zoom.prototype.handleClick_ = function(delta, event) {
-  event.preventDefault();
-  this.zoomByDelta_(delta);
-};
-
-
-/**
- * @param {number} delta Zoom delta.
- * @private
- */
-ol.control.Zoom.prototype.zoomByDelta_ = function(delta) {
-  var map = this.getMap();
-  var view = map.getView();
-  if (!view) {
-    // the map does not have a view, so we can't act
-    // upon it
-    return;
-  }
-  var currentResolution = view.getResolution();
-  if (currentResolution) {
-    var newResolution = view.constrainResolution(currentResolution, delta);
-    if (this.duration_ > 0) {
-      if (view.getAnimating()) {
-        view.cancelAnimations();
-      }
-      view.animate({
-        resolution: newResolution,
-        duration: this.duration_,
-        easing: ol.easing.easeOut
-      });
-    } else {
-      view.setResolution(newResolution);
-    }
-  }
-};
-
-goog.provide('ol.control');
-
-goog.require('ol.Collection');
-goog.require('ol.control.Attribution');
-goog.require('ol.control.Rotate');
-goog.require('ol.control.Zoom');
-
-
-/**
- * Set of controls included in maps by default. Unless configured otherwise,
- * this returns a collection containing an instance of each of the following
- * controls:
- * * {@link ol.control.Zoom}
- * * {@link ol.control.Rotate}
- * * {@link ol.control.Attribution}
- *
- * @param {olx.control.DefaultsOptions=} opt_options Defaults options.
- * @return {ol.Collection.<ol.control.Control>} Controls.
- * @api
- */
-ol.control.defaults = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var controls = new ol.Collection();
-
-  var zoomControl = options.zoom !== undefined ? options.zoom : true;
-  if (zoomControl) {
-    controls.push(new ol.control.Zoom(options.zoomOptions));
-  }
-
-  var rotateControl = options.rotate !== undefined ? options.rotate : true;
-  if (rotateControl) {
-    controls.push(new ol.control.Rotate(options.rotateOptions));
-  }
-
-  var attributionControl = options.attribution !== undefined ?
-      options.attribution : true;
-  if (attributionControl) {
-    controls.push(new ol.control.Attribution(options.attributionOptions));
-  }
-
-  return controls;
-
-};
-
-goog.provide('ol.control.FullScreen');
-
-goog.require('ol');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-
-
-/**
- * @classdesc
- * Provides a button that when clicked fills up the full screen with the map.
- * The full screen source element is by default the element containing the map viewport unless
- * overridden by providing the `source` option. In which case, the dom
- * element introduced using this parameter will be displayed in full screen.
- *
- * When in full screen mode, a close button is shown to exit full screen mode.
- * The [Fullscreen API](http://www.w3.org/TR/fullscreen/) is used to
- * toggle the map in full screen mode.
- *
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.FullScreenOptions=} opt_options Options.
- * @api
- */
-ol.control.FullScreen = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.cssClassName_ = options.className !== undefined ? options.className :
-      'ol-full-screen';
-
-  var label = options.label !== undefined ? options.label : '\u2922';
-
-  /**
-   * @private
-   * @type {Node}
-   */
-  this.labelNode_ = typeof label === 'string' ?
-      document.createTextNode(label) : label;
-
-  var labelActive = options.labelActive !== undefined ? options.labelActive : '\u00d7';
-
-  /**
-   * @private
-   * @type {Node}
-   */
-  this.labelActiveNode_ = typeof labelActive === 'string' ?
-      document.createTextNode(labelActive) : labelActive;
-
-  var tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';
-  var button = document.createElement('button');
-  button.className = this.cssClassName_ + '-' + ol.control.FullScreen.isFullScreen();
-  button.setAttribute('type', 'button');
-  button.title = tipLabel;
-  button.appendChild(this.labelNode_);
-
-  ol.events.listen(button, ol.events.EventType.CLICK,
-      this.handleClick_, this);
-
-  var cssClasses = this.cssClassName_ + ' ' + ol.css.CLASS_UNSELECTABLE +
-      ' ' + ol.css.CLASS_CONTROL + ' ' +
-      (!ol.control.FullScreen.isFullScreenSupported() ? ol.css.CLASS_UNSUPPORTED : '');
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(button);
-
-  ol.control.Control.call(this, {
-    element: element,
-    target: options.target
-  });
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.keys_ = options.keys !== undefined ? options.keys : false;
-
-  /**
-   * @private
-   * @type {Element|string|undefined}
-   */
-  this.source_ = options.source;
-
-};
-ol.inherits(ol.control.FullScreen, ol.control.Control);
-
-
-/**
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.FullScreen.prototype.handleClick_ = function(event) {
-  event.preventDefault();
-  this.handleFullScreen_();
-};
-
-
-/**
- * @private
- */
-ol.control.FullScreen.prototype.handleFullScreen_ = function() {
-  if (!ol.control.FullScreen.isFullScreenSupported()) {
-    return;
-  }
-  var map = this.getMap();
-  if (!map) {
-    return;
-  }
-  if (ol.control.FullScreen.isFullScreen()) {
-    ol.control.FullScreen.exitFullScreen();
-  } else {
-    var element;
-    if (this.source_) {
-      element = typeof this.source_ === 'string' ?
-        document.getElementById(this.source_) :
-        this.source_;
-    } else {
-      element = map.getTargetElement();
-    }
-    if (this.keys_) {
-      ol.control.FullScreen.requestFullScreenWithKeys(element);
-
-    } else {
-      ol.control.FullScreen.requestFullScreen(element);
-    }
-  }
-};
-
-
-/**
- * @private
- */
-ol.control.FullScreen.prototype.handleFullScreenChange_ = function() {
-  var button = this.element.firstElementChild;
-  var map = this.getMap();
-  if (ol.control.FullScreen.isFullScreen()) {
-    button.className = this.cssClassName_ + '-true';
-    ol.dom.replaceNode(this.labelActiveNode_, this.labelNode_);
-  } else {
-    button.className = this.cssClassName_ + '-false';
-    ol.dom.replaceNode(this.labelNode_, this.labelActiveNode_);
-  }
-  if (map) {
-    map.updateSize();
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.control.FullScreen.prototype.setMap = function(map) {
-  ol.control.Control.prototype.setMap.call(this, map);
-  if (map) {
-    this.listenerKeys.push(ol.events.listen(document,
-        ol.control.FullScreen.getChangeType_(),
-        this.handleFullScreenChange_, this)
-    );
-  }
-};
-
-/**
- * @return {boolean} Fullscreen is supported by the current platform.
- */
-ol.control.FullScreen.isFullScreenSupported = function() {
-  var body = document.body;
-  return !!(
-    body.webkitRequestFullscreen ||
-    (body.mozRequestFullScreen && document.mozFullScreenEnabled) ||
-    (body.msRequestFullscreen && document.msFullscreenEnabled) ||
-    (body.requestFullscreen && document.fullscreenEnabled)
-  );
-};
-
-/**
- * @return {boolean} Element is currently in fullscreen.
- */
-ol.control.FullScreen.isFullScreen = function() {
-  return !!(
-    document.webkitIsFullScreen || document.mozFullScreen ||
-    document.msFullscreenElement || document.fullscreenElement
-  );
-};
-
-/**
- * Request to fullscreen an element.
- * @param {Node} element Element to request fullscreen
- */
-ol.control.FullScreen.requestFullScreen = function(element) {
-  if (element.requestFullscreen) {
-    element.requestFullscreen();
-  } else if (element.msRequestFullscreen) {
-    element.msRequestFullscreen();
-  } else if (element.mozRequestFullScreen) {
-    element.mozRequestFullScreen();
-  } else if (element.webkitRequestFullscreen) {
-    element.webkitRequestFullscreen();
-  }
-};
-
-/**
- * Request to fullscreen an element with keyboard input.
- * @param {Node} element Element to request fullscreen
- */
-ol.control.FullScreen.requestFullScreenWithKeys = function(element) {
-  if (element.mozRequestFullScreenWithKeys) {
-    element.mozRequestFullScreenWithKeys();
-  } else if (element.webkitRequestFullscreen) {
-    element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
-  } else {
-    ol.control.FullScreen.requestFullScreen(element);
-  }
-};
-
-/**
- * Exit fullscreen.
- */
-ol.control.FullScreen.exitFullScreen = function() {
-  if (document.exitFullscreen) {
-    document.exitFullscreen();
-  } else if (document.msExitFullscreen) {
-    document.msExitFullscreen();
-  } else if (document.mozCancelFullScreen) {
-    document.mozCancelFullScreen();
-  } else if (document.webkitExitFullscreen) {
-    document.webkitExitFullscreen();
-  }
-};
-
-/**
- * @return {string} Change type.
- * @private
- */
-ol.control.FullScreen.getChangeType_ = (function() {
-  var changeType;
-  return function() {
-    if (!changeType) {
-      var body = document.body;
-      if (body.webkitRequestFullscreen) {
-        changeType = 'webkitfullscreenchange';
-      } else if (body.mozRequestFullScreen) {
-        changeType = 'mozfullscreenchange';
-      } else if (body.msRequestFullscreen) {
-        changeType = 'MSFullscreenChange';
-      } else if (body.requestFullscreen) {
-        changeType = 'fullscreenchange';
-      }
-    }
-    return changeType;
-  };
-})();
-
-// FIXME should listen on appropriate pane, once it is defined
-
-goog.provide('ol.control.MousePosition');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.Object');
-goog.require('ol.control.Control');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * A control to show the 2D coordinates of the mouse cursor. By default, these
- * are in the view projection, but can be in any supported projection.
- * By default the control is shown in the top right corner of the map, but this
- * can be changed by using the css selector `.ol-mouse-position`.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.MousePositionOptions=} opt_options Mouse position
- *     options.
- * @api
- */
-ol.control.MousePosition = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var element = document.createElement('DIV');
-  element.className = options.className !== undefined ? options.className : 'ol-mouse-position';
-
-  var render = options.render ?
-      options.render : ol.control.MousePosition.render;
-
-  ol.control.Control.call(this, {
-    element: element,
-    render: render,
-    target: options.target
-  });
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.control.MousePosition.Property_.PROJECTION),
-      this.handleProjectionChanged_, this);
-
-  if (options.coordinateFormat) {
-    this.setCoordinateFormat(options.coordinateFormat);
-  }
-  if (options.projection) {
-    this.setProjection(options.projection);
-  }
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.undefinedHTML_ = options.undefinedHTML !== undefined ? options.undefinedHTML : '';
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.renderedHTML_ = element.innerHTML;
-
-  /**
-   * @private
-   * @type {ol.proj.Projection}
-   */
-  this.mapProjection_ = null;
-
-  /**
-   * @private
-   * @type {?ol.TransformFunction}
-   */
-  this.transform_ = null;
-
-  /**
-   * @private
-   * @type {ol.Pixel}
-   */
-  this.lastMouseMovePixel_ = null;
-
-};
-ol.inherits(ol.control.MousePosition, ol.control.Control);
-
-
-/**
- * Update the mouseposition element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.MousePosition}
- * @api
- */
-ol.control.MousePosition.render = function(mapEvent) {
-  var frameState = mapEvent.frameState;
-  if (!frameState) {
-    this.mapProjection_ = null;
-  } else {
-    if (this.mapProjection_ != frameState.viewState.projection) {
-      this.mapProjection_ = frameState.viewState.projection;
-      this.transform_ = null;
-    }
-  }
-  this.updateHTML_(this.lastMouseMovePixel_);
-};
-
-
-/**
- * @private
- */
-ol.control.MousePosition.prototype.handleProjectionChanged_ = function() {
-  this.transform_ = null;
-};
-
-
-/**
- * Return the coordinate format type used to render the current position or
- * undefined.
- * @return {ol.CoordinateFormatType|undefined} The format to render the current
- *     position in.
- * @observable
- * @api
- */
-ol.control.MousePosition.prototype.getCoordinateFormat = function() {
-  return /** @type {ol.CoordinateFormatType|undefined} */ (
-      this.get(ol.control.MousePosition.Property_.COORDINATE_FORMAT));
-};
-
-
-/**
- * Return the projection that is used to report the mouse position.
- * @return {ol.proj.Projection|undefined} The projection to report mouse
- *     position in.
- * @observable
- * @api
- */
-ol.control.MousePosition.prototype.getProjection = function() {
-  return /** @type {ol.proj.Projection|undefined} */ (
-      this.get(ol.control.MousePosition.Property_.PROJECTION));
-};
-
-
-/**
- * @param {Event} event Browser event.
- * @protected
- */
-ol.control.MousePosition.prototype.handleMouseMove = function(event) {
-  var map = this.getMap();
-  this.lastMouseMovePixel_ = map.getEventPixel(event);
-  this.updateHTML_(this.lastMouseMovePixel_);
-};
-
-
-/**
- * @param {Event} event Browser event.
- * @protected
- */
-ol.control.MousePosition.prototype.handleMouseOut = function(event) {
-  this.updateHTML_(null);
-  this.lastMouseMovePixel_ = null;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.control.MousePosition.prototype.setMap = function(map) {
-  ol.control.Control.prototype.setMap.call(this, map);
-  if (map) {
-    var viewport = map.getViewport();
-    this.listenerKeys.push(
-        ol.events.listen(viewport, ol.events.EventType.MOUSEMOVE,
-            this.handleMouseMove, this),
-        ol.events.listen(viewport, ol.events.EventType.MOUSEOUT,
-            this.handleMouseOut, this)
-    );
-  }
-};
-
-
-/**
- * Set the coordinate format type used to render the current position.
- * @param {ol.CoordinateFormatType} format The format to render the current
- *     position in.
- * @observable
- * @api
- */
-ol.control.MousePosition.prototype.setCoordinateFormat = function(format) {
-  this.set(ol.control.MousePosition.Property_.COORDINATE_FORMAT, format);
-};
-
-
-/**
- * Set the projection that is used to report the mouse position.
- * @param {ol.ProjectionLike} projection The projection to report mouse
- *     position in.
- * @observable
- * @api
- */
-ol.control.MousePosition.prototype.setProjection = function(projection) {
-  this.set(ol.control.MousePosition.Property_.PROJECTION, ol.proj.get(projection));
-};
-
-
-/**
- * @param {?ol.Pixel} pixel Pixel.
- * @private
- */
-ol.control.MousePosition.prototype.updateHTML_ = function(pixel) {
-  var html = this.undefinedHTML_;
-  if (pixel && this.mapProjection_) {
-    if (!this.transform_) {
-      var projection = this.getProjection();
-      if (projection) {
-        this.transform_ = ol.proj.getTransformFromProjections(
-            this.mapProjection_, projection);
-      } else {
-        this.transform_ = ol.proj.identityTransform;
-      }
-    }
-    var map = this.getMap();
-    var coordinate = map.getCoordinateFromPixel(pixel);
-    if (coordinate) {
-      this.transform_(coordinate, coordinate);
-      var coordinateFormat = this.getCoordinateFormat();
-      if (coordinateFormat) {
-        html = coordinateFormat(coordinate);
-      } else {
-        html = coordinate.toString();
-      }
-    }
-  }
-  if (!this.renderedHTML_ || html != this.renderedHTML_) {
-    this.element.innerHTML = html;
-    this.renderedHTML_ = html;
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.control.MousePosition.Property_ = {
-  PROJECTION: 'projection',
-  COORDINATE_FORMAT: 'coordinateFormat'
-};
-
-goog.provide('ol.MapEvent');
-
-goog.require('ol');
-goog.require('ol.events.Event');
-
-
-/**
- * @classdesc
- * Events emitted as map events are instances of this type.
- * See {@link ol.Map} for which events trigger a map event.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.MapEvent}
- * @param {string} type Event type.
- * @param {ol.Map} map Map.
- * @param {?olx.FrameState=} opt_frameState Frame state.
- */
-ol.MapEvent = function(type, map, opt_frameState) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The map where the event occurred.
-   * @type {ol.Map}
-   * @api
-   */
-  this.map = map;
-
-  /**
-   * The frame state at the time of the event.
-   * @type {?olx.FrameState}
-   * @api
-   */
-  this.frameState = opt_frameState !== undefined ? opt_frameState : null;
-
-};
-ol.inherits(ol.MapEvent, ol.events.Event);
-
-goog.provide('ol.MapBrowserEvent');
-
-goog.require('ol');
-goog.require('ol.MapEvent');
-
-
-/**
- * @classdesc
- * Events emitted as map browser events are instances of this type.
- * See {@link ol.Map} for which events trigger a map browser event.
- *
- * @constructor
- * @extends {ol.MapEvent}
- * @implements {oli.MapBrowserEvent}
- * @param {string} type Event type.
- * @param {ol.Map} map Map.
- * @param {Event} browserEvent Browser event.
- * @param {boolean=} opt_dragging Is the map currently being dragged?
- * @param {?olx.FrameState=} opt_frameState Frame state.
- */
-ol.MapBrowserEvent = function(type, map, browserEvent, opt_dragging,
-    opt_frameState) {
-
-  ol.MapEvent.call(this, type, map, opt_frameState);
-
-  /**
-   * The original browser event.
-   * @const
-   * @type {Event}
-   * @api
-   */
-  this.originalEvent = browserEvent;
-
-  /**
-   * The map pixel relative to the viewport corresponding to the original browser event.
-   * @type {ol.Pixel}
-   * @api
-   */
-  this.pixel = map.getEventPixel(browserEvent);
-
-  /**
-   * The coordinate in view projection corresponding to the original browser event.
-   * @type {ol.Coordinate}
-   * @api
-   */
-  this.coordinate = map.getCoordinateFromPixel(this.pixel);
-
-  /**
-   * Indicates if the map is currently being dragged. Only set for
-   * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.
-   *
-   * @type {boolean}
-   * @api
-   */
-  this.dragging = opt_dragging !== undefined ? opt_dragging : false;
-
-};
-ol.inherits(ol.MapBrowserEvent, ol.MapEvent);
-
-
-/**
- * Prevents the default browser action.
- * @see https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault
- * @override
- * @api
- */
-ol.MapBrowserEvent.prototype.preventDefault = function() {
-  ol.MapEvent.prototype.preventDefault.call(this);
-  this.originalEvent.preventDefault();
-};
-
-
-/**
- * Prevents further propagation of the current event.
- * @see https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation
- * @override
- * @api
- */
-ol.MapBrowserEvent.prototype.stopPropagation = function() {
-  ol.MapEvent.prototype.stopPropagation.call(this);
-  this.originalEvent.stopPropagation();
-};
-
-goog.provide('ol.webgl');
-
-goog.require('ol');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /** Constants taken from goog.webgl
-   */
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.ONE = 1;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.SRC_ALPHA = 0x0302;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.COLOR_ATTACHMENT0 = 0x8CE0;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.COLOR_BUFFER_BIT = 0x00004000;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.TRIANGLES = 0x0004;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.TRIANGLE_STRIP = 0x0005;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.ONE_MINUS_SRC_ALPHA = 0x0303;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.ARRAY_BUFFER = 0x8892;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.ELEMENT_ARRAY_BUFFER = 0x8893;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.STREAM_DRAW = 0x88E0;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.STATIC_DRAW = 0x88E4;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.DYNAMIC_DRAW = 0x88E8;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.CULL_FACE = 0x0B44;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.BLEND = 0x0BE2;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.STENCIL_TEST = 0x0B90;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.DEPTH_TEST = 0x0B71;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.SCISSOR_TEST = 0x0C11;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.UNSIGNED_BYTE = 0x1401;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.UNSIGNED_SHORT = 0x1403;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.UNSIGNED_INT = 0x1405;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.FLOAT = 0x1406;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.RGBA = 0x1908;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.FRAGMENT_SHADER = 0x8B30;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.VERTEX_SHADER = 0x8B31;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.LINK_STATUS = 0x8B82;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.LINEAR = 0x2601;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.TEXTURE_MAG_FILTER = 0x2800;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.TEXTURE_MIN_FILTER = 0x2801;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.TEXTURE_WRAP_S = 0x2802;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.TEXTURE_WRAP_T = 0x2803;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.TEXTURE_2D = 0x0DE1;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.TEXTURE0 = 0x84C0;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.CLAMP_TO_EDGE = 0x812F;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.COMPILE_STATUS = 0x8B81;
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.webgl.FRAMEBUFFER = 0x8D40;
-
-
-  /** end of goog.webgl constants
-   */
-
-
-  /**
-   * @const
-   * @private
-   * @type {Array.<string>}
-   */
-  ol.webgl.CONTEXT_IDS_ = [
-    'experimental-webgl',
-    'webgl',
-    'webkit-3d',
-    'moz-webgl'
-  ];
-
-
-  /**
-   * @param {HTMLCanvasElement} canvas Canvas.
-   * @param {Object=} opt_attributes Attributes.
-   * @return {WebGLRenderingContext} WebGL rendering context.
-   */
-  ol.webgl.getContext = function(canvas, opt_attributes) {
-    var context, i, ii = ol.webgl.CONTEXT_IDS_.length;
-    for (i = 0; i < ii; ++i) {
-      try {
-        context = canvas.getContext(ol.webgl.CONTEXT_IDS_[i], opt_attributes);
-        if (context) {
-          return /** @type {!WebGLRenderingContext} */ (context);
-        }
-      } catch (e) {
-        // pass
-      }
-    }
-    return null;
-  };
-
-}
-
-goog.provide('ol.has');
-
-goog.require('ol');
-goog.require('ol.webgl');
-
-var ua = typeof navigator !== 'undefined' ?
-    navigator.userAgent.toLowerCase() : '';
-
-/**
- * User agent string says we are dealing with Firefox as browser.
- * @type {boolean}
- */
-ol.has.FIREFOX = ua.indexOf('firefox') !== -1;
-
-/**
- * User agent string says we are dealing with Safari as browser.
- * @type {boolean}
- */
-ol.has.SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;
-
-/**
- * User agent string says we are dealing with a WebKit engine.
- * @type {boolean}
- */
-ol.has.WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1;
-
-/**
- * User agent string says we are dealing with a Mac as platform.
- * @type {boolean}
- */
-ol.has.MAC = ua.indexOf('macintosh') !== -1;
-
-
-/**
- * The ratio between physical pixels and device-independent pixels
- * (dips) on the device (`window.devicePixelRatio`).
- * @const
- * @type {number}
- * @api
- */
-ol.has.DEVICE_PIXEL_RATIO = window.devicePixelRatio || 1;
-
-
-/**
- * True if the browser's Canvas implementation implements {get,set}LineDash.
- * @type {boolean}
- */
-ol.has.CANVAS_LINE_DASH = false;
-
-
-/**
- * True if both the library and browser support Canvas.  Always `false`
- * if `ol.ENABLE_CANVAS` is set to `false` at compile time.
- * @const
- * @type {boolean}
- * @api
- */
-ol.has.CANVAS = ol.ENABLE_CANVAS && (
-    /**
-     * @return {boolean} Canvas supported.
-     */
-    function() {
-      if (!('HTMLCanvasElement' in window)) {
-        return false;
-      }
-      try {
-        var context = document.createElement('CANVAS').getContext('2d');
-        if (!context) {
-          return false;
-        } else {
-          if (context.setLineDash !== undefined) {
-            ol.has.CANVAS_LINE_DASH = true;
-          }
-          return true;
-        }
-      } catch (e) {
-        return false;
-      }
-    })();
-
-
-/**
- * Indicates if DeviceOrientation is supported in the user's browser.
- * @const
- * @type {boolean}
- * @api
- */
-ol.has.DEVICE_ORIENTATION = 'DeviceOrientationEvent' in window;
-
-
-/**
- * Is HTML5 geolocation supported in the current browser?
- * @const
- * @type {boolean}
- * @api
- */
-ol.has.GEOLOCATION = 'geolocation' in navigator;
-
-
-/**
- * True if browser supports touch events.
- * @const
- * @type {boolean}
- * @api
- */
-ol.has.TOUCH = ol.ASSUME_TOUCH || 'ontouchstart' in window;
-
-
-/**
- * True if browser supports pointer events.
- * @const
- * @type {boolean}
- */
-ol.has.POINTER = 'PointerEvent' in window;
-
-
-/**
- * True if browser supports ms pointer events (IE 10).
- * @const
- * @type {boolean}
- */
-ol.has.MSPOINTER = !!(navigator.msPointerEnabled);
-
-
-/**
- * True if both OpenLayers and browser support WebGL.  Always `false`
- * if `ol.ENABLE_WEBGL` is set to `false` at compile time.
- * @const
- * @type {boolean}
- * @api
- */
-ol.has.WEBGL;
-
-
-(function() {
-  if (ol.ENABLE_WEBGL) {
-    var hasWebGL = false;
-    var textureSize;
-    var /** @type {Array.<string>} */ extensions = [];
-
-    if ('WebGLRenderingContext' in window) {
-      try {
-        var canvas = /** @type {HTMLCanvasElement} */
-            (document.createElement('CANVAS'));
-        var gl = ol.webgl.getContext(canvas, {
-          failIfMajorPerformanceCaveat: true
-        });
-        if (gl) {
-          hasWebGL = true;
-          textureSize = /** @type {number} */
-              (gl.getParameter(gl.MAX_TEXTURE_SIZE));
-          extensions = gl.getSupportedExtensions();
-        }
-      } catch (e) {
-        // pass
-      }
-    }
-    ol.has.WEBGL = hasWebGL;
-    ol.WEBGL_EXTENSIONS = extensions;
-    ol.WEBGL_MAX_TEXTURE_SIZE = textureSize;
-  }
-})();
-
-goog.provide('ol.MapBrowserEventType');
-
-goog.require('ol.events.EventType');
-
-
-/**
- * Constants for event names.
- * @enum {string}
- */
-ol.MapBrowserEventType = {
-
-  /**
-   * A true single click with no dragging and no double click. Note that this
-   * event is delayed by 250 ms to ensure that it is not a double click.
-   * @event ol.MapBrowserEvent#singleclick
-   * @api
-   */
-  SINGLECLICK: 'singleclick',
-
-  /**
-   * A click with no dragging. A double click will fire two of this.
-   * @event ol.MapBrowserEvent#click
-   * @api
-   */
-  CLICK: ol.events.EventType.CLICK,
-
-  /**
-   * A true double click, with no dragging.
-   * @event ol.MapBrowserEvent#dblclick
-   * @api
-   */
-  DBLCLICK: ol.events.EventType.DBLCLICK,
-
-  /**
-   * Triggered when a pointer is dragged.
-   * @event ol.MapBrowserEvent#pointerdrag
-   * @api
-   */
-  POINTERDRAG: 'pointerdrag',
-
-  /**
-   * Triggered when a pointer is moved. Note that on touch devices this is
-   * triggered when the map is panned, so is not the same as mousemove.
-   * @event ol.MapBrowserEvent#pointermove
-   * @api
-   */
-  POINTERMOVE: 'pointermove',
-
-  POINTERDOWN: 'pointerdown',
-  POINTERUP: 'pointerup',
-  POINTEROVER: 'pointerover',
-  POINTEROUT: 'pointerout',
-  POINTERENTER: 'pointerenter',
-  POINTERLEAVE: 'pointerleave',
-  POINTERCANCEL: 'pointercancel'
-};
-
-goog.provide('ol.MapBrowserPointerEvent');
-
-goog.require('ol');
-goog.require('ol.MapBrowserEvent');
-
-
-/**
- * @constructor
- * @extends {ol.MapBrowserEvent}
- * @param {string} type Event type.
- * @param {ol.Map} map Map.
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @param {boolean=} opt_dragging Is the map currently being dragged?
- * @param {?olx.FrameState=} opt_frameState Frame state.
- */
-ol.MapBrowserPointerEvent = function(type, map, pointerEvent, opt_dragging,
-    opt_frameState) {
-
-  ol.MapBrowserEvent.call(this, type, map, pointerEvent.originalEvent, opt_dragging,
-      opt_frameState);
-
-  /**
-   * @const
-   * @type {ol.pointer.PointerEvent}
-   */
-  this.pointerEvent = pointerEvent;
-
-};
-ol.inherits(ol.MapBrowserPointerEvent, ol.MapBrowserEvent);
-
-goog.provide('ol.pointer.EventType');
-
-
-/**
- * Constants for event names.
- * @enum {string}
- */
-ol.pointer.EventType = {
-  POINTERMOVE: 'pointermove',
-  POINTERDOWN: 'pointerdown',
-  POINTERUP: 'pointerup',
-  POINTEROVER: 'pointerover',
-  POINTEROUT: 'pointerout',
-  POINTERENTER: 'pointerenter',
-  POINTERLEAVE: 'pointerleave',
-  POINTERCANCEL: 'pointercancel'
-};
-
-goog.provide('ol.pointer.EventSource');
-
-
-/**
- * @param {ol.pointer.PointerEventHandler} dispatcher Event handler.
- * @param {!Object.<string, function(Event)>} mapping Event
- *     mapping.
- * @constructor
- */
-ol.pointer.EventSource = function(dispatcher, mapping) {
-  /**
-   * @type {ol.pointer.PointerEventHandler}
-   */
-  this.dispatcher = dispatcher;
-
-  /**
-   * @private
-   * @const
-   * @type {!Object.<string, function(Event)>}
-   */
-  this.mapping_ = mapping;
-};
-
-
-/**
- * List of events supported by this source.
- * @return {Array.<string>} Event names
- */
-ol.pointer.EventSource.prototype.getEvents = function() {
-  return Object.keys(this.mapping_);
-};
-
-
-/**
- * Returns the handler that should handle a given event type.
- * @param {string} eventType The event type.
- * @return {function(Event)} Handler
- */
-ol.pointer.EventSource.prototype.getHandlerForEvent = function(eventType) {
-  return this.mapping_[eventType];
-};
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.MouseSource');
-
-goog.require('ol');
-goog.require('ol.pointer.EventSource');
-
-
-/**
- * @param {ol.pointer.PointerEventHandler} dispatcher Event handler.
- * @constructor
- * @extends {ol.pointer.EventSource}
- */
-ol.pointer.MouseSource = function(dispatcher) {
-  var mapping = {
-    'mousedown': this.mousedown,
-    'mousemove': this.mousemove,
-    'mouseup': this.mouseup,
-    'mouseover': this.mouseover,
-    'mouseout': this.mouseout
-  };
-  ol.pointer.EventSource.call(this, dispatcher, mapping);
-
-  /**
-   * @const
-   * @type {!Object.<string, Event|Object>}
-   */
-  this.pointerMap = dispatcher.pointerMap;
-
-  /**
-   * @const
-   * @type {Array.<ol.Pixel>}
-   */
-  this.lastTouches = [];
-};
-ol.inherits(ol.pointer.MouseSource, ol.pointer.EventSource);
-
-
-/**
- * @const
- * @type {number}
- */
-ol.pointer.MouseSource.POINTER_ID = 1;
-
-
-/**
- * @const
- * @type {string}
- */
-ol.pointer.MouseSource.POINTER_TYPE = 'mouse';
-
-
-/**
- * Radius around touchend that swallows mouse events.
- *
- * @const
- * @type {number}
- */
-ol.pointer.MouseSource.DEDUP_DIST = 25;
-
-
-/**
- * Detect if a mouse event was simulated from a touch by
- * checking if previously there was a touch event at the
- * same position.
- *
- * FIXME - Known problem with the native Android browser on
- * Samsung GT-I9100 (Android 4.1.2):
- * In case the page is scrolled, this function does not work
- * correctly when a canvas is used (WebGL or canvas renderer).
- * Mouse listeners on canvas elements (for this browser), create
- * two mouse events: One 'good' and one 'bad' one (on other browsers or
- * when a div is used, there is only one event). For the 'bad' one,
- * clientX/clientY and also pageX/pageY are wrong when the page
- * is scrolled. Because of that, this function can not detect if
- * the events were simulated from a touch event. As result, a
- * pointer event at a wrong position is dispatched, which confuses
- * the map interactions.
- * It is unclear, how one can get the correct position for the event
- * or detect that the positions are invalid.
- *
- * @private
- * @param {Event} inEvent The in event.
- * @return {boolean} True, if the event was generated by a touch.
- */
-ol.pointer.MouseSource.prototype.isEventSimulatedFromTouch_ = function(inEvent) {
-  var lts = this.lastTouches;
-  var x = inEvent.clientX, y = inEvent.clientY;
-  for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {
-    // simulated mouse events will be swallowed near a primary touchend
-    var dx = Math.abs(x - t[0]), dy = Math.abs(y - t[1]);
-    if (dx <= ol.pointer.MouseSource.DEDUP_DIST &&
-        dy <= ol.pointer.MouseSource.DEDUP_DIST) {
-      return true;
-    }
-  }
-  return false;
-};
-
-
-/**
- * Creates a copy of the original event that will be used
- * for the fake pointer event.
- *
- * @param {Event} inEvent The in event.
- * @param {ol.pointer.PointerEventHandler} dispatcher Event handler.
- * @return {Object} The copied event.
- */
-ol.pointer.MouseSource.prepareEvent = function(inEvent, dispatcher) {
-  var e = dispatcher.cloneEvent(inEvent, inEvent);
-
-  // forward mouse preventDefault
-  var pd = e.preventDefault;
-  e.preventDefault = function() {
-    inEvent.preventDefault();
-    pd();
-  };
-
-  e.pointerId = ol.pointer.MouseSource.POINTER_ID;
-  e.isPrimary = true;
-  e.pointerType = ol.pointer.MouseSource.POINTER_TYPE;
-
-  return e;
-};
-
-
-/**
- * Handler for `mousedown`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.mousedown = function(inEvent) {
-  if (!this.isEventSimulatedFromTouch_(inEvent)) {
-    // TODO(dfreedman) workaround for some elements not sending mouseup
-    // http://crbug/149091
-    if (ol.pointer.MouseSource.POINTER_ID.toString() in this.pointerMap) {
-      this.cancel(inEvent);
-    }
-    var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-    this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()] = inEvent;
-    this.dispatcher.down(e, inEvent);
-  }
-};
-
-
-/**
- * Handler for `mousemove`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.mousemove = function(inEvent) {
-  if (!this.isEventSimulatedFromTouch_(inEvent)) {
-    var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-    this.dispatcher.move(e, inEvent);
-  }
-};
-
-
-/**
- * Handler for `mouseup`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.mouseup = function(inEvent) {
-  if (!this.isEventSimulatedFromTouch_(inEvent)) {
-    var p = this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()];
-
-    if (p && p.button === inEvent.button) {
-      var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-      this.dispatcher.up(e, inEvent);
-      this.cleanupMouse();
-    }
-  }
-};
-
-
-/**
- * Handler for `mouseover`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.mouseover = function(inEvent) {
-  if (!this.isEventSimulatedFromTouch_(inEvent)) {
-    var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-    this.dispatcher.enterOver(e, inEvent);
-  }
-};
-
-
-/**
- * Handler for `mouseout`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.mouseout = function(inEvent) {
-  if (!this.isEventSimulatedFromTouch_(inEvent)) {
-    var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-    this.dispatcher.leaveOut(e, inEvent);
-  }
-};
-
-
-/**
- * Dispatches a `pointercancel` event.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.cancel = function(inEvent) {
-  var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-  this.dispatcher.cancel(e, inEvent);
-  this.cleanupMouse();
-};
-
-
-/**
- * Remove the mouse from the list of active pointers.
- */
-ol.pointer.MouseSource.prototype.cleanupMouse = function() {
-  delete this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()];
-};
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.MsSource');
-
-goog.require('ol');
-goog.require('ol.pointer.EventSource');
-
-
-/**
- * @param {ol.pointer.PointerEventHandler} dispatcher Event handler.
- * @constructor
- * @extends {ol.pointer.EventSource}
- */
-ol.pointer.MsSource = function(dispatcher) {
-  var mapping = {
-    'MSPointerDown': this.msPointerDown,
-    'MSPointerMove': this.msPointerMove,
-    'MSPointerUp': this.msPointerUp,
-    'MSPointerOut': this.msPointerOut,
-    'MSPointerOver': this.msPointerOver,
-    'MSPointerCancel': this.msPointerCancel,
-    'MSGotPointerCapture': this.msGotPointerCapture,
-    'MSLostPointerCapture': this.msLostPointerCapture
-  };
-  ol.pointer.EventSource.call(this, dispatcher, mapping);
-
-  /**
-   * @const
-   * @type {!Object.<string, Event|Object>}
-   */
-  this.pointerMap = dispatcher.pointerMap;
-
-  /**
-   * @const
-   * @type {Array.<string>}
-   */
-  this.POINTER_TYPES = [
-    '',
-    'unavailable',
-    'touch',
-    'pen',
-    'mouse'
-  ];
-};
-ol.inherits(ol.pointer.MsSource, ol.pointer.EventSource);
-
-
-/**
- * Creates a copy of the original event that will be used
- * for the fake pointer event.
- *
- * @private
- * @param {Event} inEvent The in event.
- * @return {Object} The copied event.
- */
-ol.pointer.MsSource.prototype.prepareEvent_ = function(inEvent) {
-  var e = inEvent;
-  if (typeof inEvent.pointerType === 'number') {
-    e = this.dispatcher.cloneEvent(inEvent, inEvent);
-    e.pointerType = this.POINTER_TYPES[inEvent.pointerType];
-  }
-
-  return e;
-};
-
-
-/**
- * Remove this pointer from the list of active pointers.
- * @param {number} pointerId Pointer identifier.
- */
-ol.pointer.MsSource.prototype.cleanup = function(pointerId) {
-  delete this.pointerMap[pointerId.toString()];
-};
-
-
-/**
- * Handler for `msPointerDown`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerDown = function(inEvent) {
-  this.pointerMap[inEvent.pointerId.toString()] = inEvent;
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.down(e, inEvent);
-};
-
-
-/**
- * Handler for `msPointerMove`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerMove = function(inEvent) {
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.move(e, inEvent);
-};
-
-
-/**
- * Handler for `msPointerUp`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerUp = function(inEvent) {
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.up(e, inEvent);
-  this.cleanup(inEvent.pointerId);
-};
-
-
-/**
- * Handler for `msPointerOut`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerOut = function(inEvent) {
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.leaveOut(e, inEvent);
-};
-
-
-/**
- * Handler for `msPointerOver`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerOver = function(inEvent) {
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.enterOver(e, inEvent);
-};
-
-
-/**
- * Handler for `msPointerCancel`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerCancel = function(inEvent) {
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.cancel(e, inEvent);
-  this.cleanup(inEvent.pointerId);
-};
-
-
-/**
- * Handler for `msLostPointerCapture`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msLostPointerCapture = function(inEvent) {
-  var e = this.dispatcher.makeEvent('lostpointercapture',
-      inEvent, inEvent);
-  this.dispatcher.dispatchEvent(e);
-};
-
-
-/**
- * Handler for `msGotPointerCapture`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msGotPointerCapture = function(inEvent) {
-  var e = this.dispatcher.makeEvent('gotpointercapture',
-      inEvent, inEvent);
-  this.dispatcher.dispatchEvent(e);
-};
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.NativeSource');
-
-goog.require('ol');
-goog.require('ol.pointer.EventSource');
-
-
-/**
- * @param {ol.pointer.PointerEventHandler} dispatcher Event handler.
- * @constructor
- * @extends {ol.pointer.EventSource}
- */
-ol.pointer.NativeSource = function(dispatcher) {
-  var mapping = {
-    'pointerdown': this.pointerDown,
-    'pointermove': this.pointerMove,
-    'pointerup': this.pointerUp,
-    'pointerout': this.pointerOut,
-    'pointerover': this.pointerOver,
-    'pointercancel': this.pointerCancel,
-    'gotpointercapture': this.gotPointerCapture,
-    'lostpointercapture': this.lostPointerCapture
-  };
-  ol.pointer.EventSource.call(this, dispatcher, mapping);
-};
-ol.inherits(ol.pointer.NativeSource, ol.pointer.EventSource);
-
-
-/**
- * Handler for `pointerdown`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerDown = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `pointermove`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerMove = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `pointerup`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerUp = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `pointerout`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerOut = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `pointerover`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerOver = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `pointercancel`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerCancel = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `lostpointercapture`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.lostPointerCapture = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `gotpointercapture`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.gotPointerCapture = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.PointerEvent');
-
-
-goog.require('ol');
-goog.require('ol.events.Event');
-
-
-/**
- * A class for pointer events.
- *
- * This class is used as an abstraction for mouse events,
- * touch events and even native pointer events.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @param {string} type The type of the event to create.
- * @param {Event} originalEvent The event.
- * @param {Object.<string, ?>=} opt_eventDict An optional dictionary of
- *    initial event properties.
- */
-ol.pointer.PointerEvent = function(type, originalEvent, opt_eventDict) {
-  ol.events.Event.call(this, type);
-
-  /**
-   * @const
-   * @type {Event}
-   */
-  this.originalEvent = originalEvent;
-
-  var eventDict = opt_eventDict ? opt_eventDict : {};
-
-  /**
-   * @type {number}
-   */
-  this.buttons = this.getButtons_(eventDict);
-
-  /**
-   * @type {number}
-   */
-  this.pressure = this.getPressure_(eventDict, this.buttons);
-
-  // MouseEvent related properties
-
-  /**
-   * @type {boolean}
-   */
-  this.bubbles = 'bubbles' in eventDict ? eventDict['bubbles'] : false;
-
-  /**
-   * @type {boolean}
-   */
-  this.cancelable = 'cancelable' in eventDict ? eventDict['cancelable'] : false;
-
-  /**
-   * @type {Object}
-   */
-  this.view = 'view' in eventDict ? eventDict['view'] : null;
-
-  /**
-   * @type {number}
-   */
-  this.detail = 'detail' in eventDict ? eventDict['detail'] : null;
-
-  /**
-   * @type {number}
-   */
-  this.screenX = 'screenX' in eventDict ? eventDict['screenX'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.screenY = 'screenY' in eventDict ? eventDict['screenY'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.clientX = 'clientX' in eventDict ? eventDict['clientX'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.clientY = 'clientY' in eventDict ? eventDict['clientY'] : 0;
-
-  /**
-   * @type {boolean}
-   */
-  this.ctrlKey = 'ctrlKey' in eventDict ? eventDict['ctrlKey'] : false;
-
-  /**
-   * @type {boolean}
-   */
-  this.altKey = 'altKey' in eventDict ? eventDict['altKey'] : false;
-
-  /**
-   * @type {boolean}
-   */
-  this.shiftKey = 'shiftKey' in eventDict ? eventDict['shiftKey'] : false;
-
-  /**
-   * @type {boolean}
-   */
-  this.metaKey = 'metaKey' in eventDict ? eventDict['metaKey'] : false;
-
-  /**
-   * @type {number}
-   */
-  this.button = 'button' in eventDict ? eventDict['button'] : 0;
-
-  /**
-   * @type {Node}
-   */
-  this.relatedTarget = 'relatedTarget' in eventDict ?
-      eventDict['relatedTarget'] : null;
-
-  // PointerEvent related properties
-
-  /**
-   * @const
-   * @type {number}
-   */
-  this.pointerId = 'pointerId' in eventDict ? eventDict['pointerId'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.width = 'width' in eventDict ? eventDict['width'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.height = 'height' in eventDict ? eventDict['height'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.tiltX = 'tiltX' in eventDict ? eventDict['tiltX'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.tiltY = 'tiltY' in eventDict ? eventDict['tiltY'] : 0;
-
-  /**
-   * @type {string}
-   */
-  this.pointerType = 'pointerType' in eventDict ? eventDict['pointerType'] : '';
-
-  /**
-   * @type {number}
-   */
-  this.hwTimestamp = 'hwTimestamp' in eventDict ? eventDict['hwTimestamp'] : 0;
-
-  /**
-   * @type {boolean}
-   */
-  this.isPrimary = 'isPrimary' in eventDict ? eventDict['isPrimary'] : false;
-
-  // keep the semantics of preventDefault
-  if (originalEvent.preventDefault) {
-    this.preventDefault = function() {
-      originalEvent.preventDefault();
-    };
-  }
-};
-ol.inherits(ol.pointer.PointerEvent, ol.events.Event);
-
-
-/**
- * @private
- * @param {Object.<string, ?>} eventDict The event dictionary.
- * @return {number} Button indicator.
- */
-ol.pointer.PointerEvent.prototype.getButtons_ = function(eventDict) {
-  // According to the w3c spec,
-  // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-button
-  // MouseEvent.button == 0 can mean either no mouse button depressed, or the
-  // left mouse button depressed.
-  //
-  // As of now, the only way to distinguish between the two states of
-  // MouseEvent.button is by using the deprecated MouseEvent.which property, as
-  // this maps mouse buttons to positive integers > 0, and uses 0 to mean that
-  // no mouse button is held.
-  //
-  // MouseEvent.which is derived from MouseEvent.button at MouseEvent creation,
-  // but initMouseEvent does not expose an argument with which to set
-  // MouseEvent.which. Calling initMouseEvent with a buttonArg of 0 will set
-  // MouseEvent.button == 0 and MouseEvent.which == 1, breaking the expectations
-  // of app developers.
-  //
-  // The only way to propagate the correct state of MouseEvent.which and
-  // MouseEvent.button to a new MouseEvent.button == 0 and MouseEvent.which == 0
-  // is to call initMouseEvent with a buttonArg value of -1.
-  //
-  // This is fixed with DOM Level 4's use of buttons
-  var buttons;
-  if (eventDict.buttons || ol.pointer.PointerEvent.HAS_BUTTONS) {
-    buttons = eventDict.buttons;
-  } else {
-    switch (eventDict.which) {
-      case 1: buttons = 1; break;
-      case 2: buttons = 4; break;
-      case 3: buttons = 2; break;
-      default: buttons = 0;
-    }
-  }
-  return buttons;
-};
-
-
-/**
- * @private
- * @param {Object.<string, ?>} eventDict The event dictionary.
- * @param {number} buttons Button indicator.
- * @return {number} The pressure.
- */
-ol.pointer.PointerEvent.prototype.getPressure_ = function(eventDict, buttons) {
-  // Spec requires that pointers without pressure specified use 0.5 for down
-  // state and 0 for up state.
-  var pressure = 0;
-  if (eventDict.pressure) {
-    pressure = eventDict.pressure;
-  } else {
-    pressure = buttons ? 0.5 : 0;
-  }
-  return pressure;
-};
-
-
-/**
- * Is the `buttons` property supported?
- * @type {boolean}
- */
-ol.pointer.PointerEvent.HAS_BUTTONS = false;
-
-
-/**
- * Checks if the `buttons` property is supported.
- */
-(function() {
-  try {
-    var ev = new MouseEvent('click', {buttons: 1});
-    ol.pointer.PointerEvent.HAS_BUTTONS = ev.buttons === 1;
-  } catch (e) {
-    // pass
-  }
-})();
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.TouchSource');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.pointer.EventSource');
-goog.require('ol.pointer.MouseSource');
-
-
-/**
- * @constructor
- * @param {ol.pointer.PointerEventHandler} dispatcher The event handler.
- * @param {ol.pointer.MouseSource} mouseSource Mouse source.
- * @extends {ol.pointer.EventSource}
- */
-ol.pointer.TouchSource = function(dispatcher, mouseSource) {
-  var mapping = {
-    'touchstart': this.touchstart,
-    'touchmove': this.touchmove,
-    'touchend': this.touchend,
-    'touchcancel': this.touchcancel
-  };
-  ol.pointer.EventSource.call(this, dispatcher, mapping);
-
-  /**
-   * @const
-   * @type {!Object.<string, Event|Object>}
-   */
-  this.pointerMap = dispatcher.pointerMap;
-
-  /**
-   * @const
-   * @type {ol.pointer.MouseSource}
-   */
-  this.mouseSource = mouseSource;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.firstTouchId_ = undefined;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.clickCount_ = 0;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.resetId_ = undefined;
-};
-ol.inherits(ol.pointer.TouchSource, ol.pointer.EventSource);
-
-
-/**
- * Mouse event timeout: This should be long enough to
- * ignore compat mouse events made by touch.
- * @const
- * @type {number}
- */
-ol.pointer.TouchSource.DEDUP_TIMEOUT = 2500;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.pointer.TouchSource.CLICK_COUNT_TIMEOUT = 200;
-
-
-/**
- * @const
- * @type {string}
- */
-ol.pointer.TouchSource.POINTER_TYPE = 'touch';
-
-
-/**
- * @private
- * @param {Touch} inTouch The in touch.
- * @return {boolean} True, if this is the primary touch.
- */
-ol.pointer.TouchSource.prototype.isPrimaryTouch_ = function(inTouch) {
-  return this.firstTouchId_ === inTouch.identifier;
-};
-
-
-/**
- * Set primary touch if there are no pointers, or the only pointer is the mouse.
- * @param {Touch} inTouch The in touch.
- * @private
- */
-ol.pointer.TouchSource.prototype.setPrimaryTouch_ = function(inTouch) {
-  var count = Object.keys(this.pointerMap).length;
-  if (count === 0 || (count === 1 &&
-      ol.pointer.MouseSource.POINTER_ID.toString() in this.pointerMap)) {
-    this.firstTouchId_ = inTouch.identifier;
-    this.cancelResetClickCount_();
-  }
-};
-
-
-/**
- * @private
- * @param {Object} inPointer The in pointer object.
- */
-ol.pointer.TouchSource.prototype.removePrimaryPointer_ = function(inPointer) {
-  if (inPointer.isPrimary) {
-    this.firstTouchId_ = undefined;
-    this.resetClickCount_();
-  }
-};
-
-
-/**
- * @private
- */
-ol.pointer.TouchSource.prototype.resetClickCount_ = function() {
-  this.resetId_ = setTimeout(
-      this.resetClickCountHandler_.bind(this),
-      ol.pointer.TouchSource.CLICK_COUNT_TIMEOUT);
-};
-
-
-/**
- * @private
- */
-ol.pointer.TouchSource.prototype.resetClickCountHandler_ = function() {
-  this.clickCount_ = 0;
-  this.resetId_ = undefined;
-};
-
-
-/**
- * @private
- */
-ol.pointer.TouchSource.prototype.cancelResetClickCount_ = function() {
-  if (this.resetId_ !== undefined) {
-    clearTimeout(this.resetId_);
-  }
-};
-
-
-/**
- * @private
- * @param {Event} browserEvent Browser event
- * @param {Touch} inTouch Touch event
- * @return {Object} A pointer object.
- */
-ol.pointer.TouchSource.prototype.touchToPointer_ = function(browserEvent, inTouch) {
-  var e = this.dispatcher.cloneEvent(browserEvent, inTouch);
-  // Spec specifies that pointerId 1 is reserved for Mouse.
-  // Touch identifiers can start at 0.
-  // Add 2 to the touch identifier for compatibility.
-  e.pointerId = inTouch.identifier + 2;
-  // TODO: check if this is necessary?
-  //e.target = findTarget(e);
-  e.bubbles = true;
-  e.cancelable = true;
-  e.detail = this.clickCount_;
-  e.button = 0;
-  e.buttons = 1;
-  e.width = inTouch.webkitRadiusX || inTouch.radiusX || 0;
-  e.height = inTouch.webkitRadiusY || inTouch.radiusY || 0;
-  e.pressure = inTouch.webkitForce || inTouch.force || 0.5;
-  e.isPrimary = this.isPrimaryTouch_(inTouch);
-  e.pointerType = ol.pointer.TouchSource.POINTER_TYPE;
-
-  // make sure that the properties that are different for
-  // each `Touch` object are not copied from the BrowserEvent object
-  e.clientX = inTouch.clientX;
-  e.clientY = inTouch.clientY;
-  e.screenX = inTouch.screenX;
-  e.screenY = inTouch.screenY;
-
-  return e;
-};
-
-
-/**
- * @private
- * @param {Event} inEvent Touch event
- * @param {function(Event, Object)} inFunction In function.
- */
-ol.pointer.TouchSource.prototype.processTouches_ = function(inEvent, inFunction) {
-  var touches = Array.prototype.slice.call(
-      inEvent.changedTouches);
-  var count = touches.length;
-  function preventDefault() {
-    inEvent.preventDefault();
-  }
-  var i, pointer;
-  for (i = 0; i < count; ++i) {
-    pointer = this.touchToPointer_(inEvent, touches[i]);
-    // forward touch preventDefaults
-    pointer.preventDefault = preventDefault;
-    inFunction.call(this, inEvent, pointer);
-  }
-};
-
-
-/**
- * @private
- * @param {TouchList} touchList The touch list.
- * @param {number} searchId Search identifier.
- * @return {boolean} True, if the `Touch` with the given id is in the list.
- */
-ol.pointer.TouchSource.prototype.findTouch_ = function(touchList, searchId) {
-  var l = touchList.length;
-  var touch;
-  for (var i = 0; i < l; i++) {
-    touch = touchList[i];
-    if (touch.identifier === searchId) {
-      return true;
-    }
-  }
-  return false;
-};
-
-
-/**
- * In some instances, a touchstart can happen without a touchend. This
- * leaves the pointermap in a broken state.
- * Therefore, on every touchstart, we remove the touches that did not fire a
- * touchend event.
- * To keep state globally consistent, we fire a pointercancel for
- * this "abandoned" touch
- *
- * @private
- * @param {Event} inEvent The in event.
- */
-ol.pointer.TouchSource.prototype.vacuumTouches_ = function(inEvent) {
-  var touchList = inEvent.touches;
-  // pointerMap.getCount() should be < touchList.length here,
-  // as the touchstart has not been processed yet.
-  var keys = Object.keys(this.pointerMap);
-  var count = keys.length;
-  if (count >= touchList.length) {
-    var d = [];
-    var i, key, value;
-    for (i = 0; i < count; ++i) {
-      key = keys[i];
-      value = this.pointerMap[key];
-      // Never remove pointerId == 1, which is mouse.
-      // Touch identifiers are 2 smaller than their pointerId, which is the
-      // index in pointermap.
-      if (key != ol.pointer.MouseSource.POINTER_ID &&
-          !this.findTouch_(touchList, key - 2)) {
-        d.push(value.out);
-      }
-    }
-    for (i = 0; i < d.length; ++i) {
-      this.cancelOut_(inEvent, d[i]);
-    }
-  }
-};
-
-
-/**
- * Handler for `touchstart`, triggers `pointerover`,
- * `pointerenter` and `pointerdown` events.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.TouchSource.prototype.touchstart = function(inEvent) {
-  this.vacuumTouches_(inEvent);
-  this.setPrimaryTouch_(inEvent.changedTouches[0]);
-  this.dedupSynthMouse_(inEvent);
-  this.clickCount_++;
-  this.processTouches_(inEvent, this.overDown_);
-};
-
-
-/**
- * @private
- * @param {Event} browserEvent The event.
- * @param {Object} inPointer The in pointer object.
- */
-ol.pointer.TouchSource.prototype.overDown_ = function(browserEvent, inPointer) {
-  this.pointerMap[inPointer.pointerId] = {
-    target: inPointer.target,
-    out: inPointer,
-    outTarget: inPointer.target
-  };
-  this.dispatcher.over(inPointer, browserEvent);
-  this.dispatcher.enter(inPointer, browserEvent);
-  this.dispatcher.down(inPointer, browserEvent);
-};
-
-
-/**
- * Handler for `touchmove`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.TouchSource.prototype.touchmove = function(inEvent) {
-  inEvent.preventDefault();
-  this.processTouches_(inEvent, this.moveOverOut_);
-};
-
-
-/**
- * @private
- * @param {Event} browserEvent The event.
- * @param {Object} inPointer The in pointer.
- */
-ol.pointer.TouchSource.prototype.moveOverOut_ = function(browserEvent, inPointer) {
-  var event = inPointer;
-  var pointer = this.pointerMap[event.pointerId];
-  // a finger drifted off the screen, ignore it
-  if (!pointer) {
-    return;
-  }
-  var outEvent = pointer.out;
-  var outTarget = pointer.outTarget;
-  this.dispatcher.move(event, browserEvent);
-  if (outEvent && outTarget !== event.target) {
-    outEvent.relatedTarget = event.target;
-    event.relatedTarget = outTarget;
-    // recover from retargeting by shadow
-    outEvent.target = outTarget;
-    if (event.target) {
-      this.dispatcher.leaveOut(outEvent, browserEvent);
-      this.dispatcher.enterOver(event, browserEvent);
-    } else {
-      // clean up case when finger leaves the screen
-      event.target = outTarget;
-      event.relatedTarget = null;
-      this.cancelOut_(browserEvent, event);
-    }
-  }
-  pointer.out = event;
-  pointer.outTarget = event.target;
-};
-
-
-/**
- * Handler for `touchend`, triggers `pointerup`,
- * `pointerout` and `pointerleave` events.
- *
- * @param {Event} inEvent The event.
- */
-ol.pointer.TouchSource.prototype.touchend = function(inEvent) {
-  this.dedupSynthMouse_(inEvent);
-  this.processTouches_(inEvent, this.upOut_);
-};
-
-
-/**
- * @private
- * @param {Event} browserEvent An event.
- * @param {Object} inPointer The inPointer object.
- */
-ol.pointer.TouchSource.prototype.upOut_ = function(browserEvent, inPointer) {
-  this.dispatcher.up(inPointer, browserEvent);
-  this.dispatcher.out(inPointer, browserEvent);
-  this.dispatcher.leave(inPointer, browserEvent);
-  this.cleanUpPointer_(inPointer);
-};
-
-
-/**
- * Handler for `touchcancel`, triggers `pointercancel`,
- * `pointerout` and `pointerleave` events.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.TouchSource.prototype.touchcancel = function(inEvent) {
-  this.processTouches_(inEvent, this.cancelOut_);
-};
-
-
-/**
- * @private
- * @param {Event} browserEvent The event.
- * @param {Object} inPointer The in pointer.
- */
-ol.pointer.TouchSource.prototype.cancelOut_ = function(browserEvent, inPointer) {
-  this.dispatcher.cancel(inPointer, browserEvent);
-  this.dispatcher.out(inPointer, browserEvent);
-  this.dispatcher.leave(inPointer, browserEvent);
-  this.cleanUpPointer_(inPointer);
-};
-
-
-/**
- * @private
- * @param {Object} inPointer The inPointer object.
- */
-ol.pointer.TouchSource.prototype.cleanUpPointer_ = function(inPointer) {
-  delete this.pointerMap[inPointer.pointerId];
-  this.removePrimaryPointer_(inPointer);
-};
-
-
-/**
- * Prevent synth mouse events from creating pointer events.
- *
- * @private
- * @param {Event} inEvent The in event.
- */
-ol.pointer.TouchSource.prototype.dedupSynthMouse_ = function(inEvent) {
-  var lts = this.mouseSource.lastTouches;
-  var t = inEvent.changedTouches[0];
-  // only the primary finger will synth mouse events
-  if (this.isPrimaryTouch_(t)) {
-    // remember x/y of last touch
-    var lt = [t.clientX, t.clientY];
-    lts.push(lt);
-
-    setTimeout(function() {
-      // remove touch after timeout
-      ol.array.remove(lts, lt);
-    }, ol.pointer.TouchSource.DEDUP_TIMEOUT);
-  }
-};
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.PointerEventHandler');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventTarget');
-
-goog.require('ol.has');
-goog.require('ol.pointer.EventType');
-goog.require('ol.pointer.MouseSource');
-goog.require('ol.pointer.MsSource');
-goog.require('ol.pointer.NativeSource');
-goog.require('ol.pointer.PointerEvent');
-goog.require('ol.pointer.TouchSource');
-
-
-/**
- * @constructor
- * @extends {ol.events.EventTarget}
- * @param {Element|HTMLDocument} element Viewport element.
- */
-ol.pointer.PointerEventHandler = function(element) {
-  ol.events.EventTarget.call(this);
-
-  /**
-   * @const
-   * @private
-   * @type {Element|HTMLDocument}
-   */
-  this.element_ = element;
-
-  /**
-   * @const
-   * @type {!Object.<string, Event|Object>}
-   */
-  this.pointerMap = {};
-
-  /**
-   * @type {Object.<string, function(Event)>}
-   * @private
-   */
-  this.eventMap_ = {};
-
-  /**
-   * @type {Array.<ol.pointer.EventSource>}
-   * @private
-   */
-  this.eventSourceList_ = [];
-
-  this.registerSources();
-};
-ol.inherits(ol.pointer.PointerEventHandler, ol.events.EventTarget);
-
-
-/**
- * Set up the event sources (mouse, touch and native pointers)
- * that generate pointer events.
- */
-ol.pointer.PointerEventHandler.prototype.registerSources = function() {
-  if (ol.has.POINTER) {
-    this.registerSource('native', new ol.pointer.NativeSource(this));
-  } else if (ol.has.MSPOINTER) {
-    this.registerSource('ms', new ol.pointer.MsSource(this));
-  } else {
-    var mouseSource = new ol.pointer.MouseSource(this);
-    this.registerSource('mouse', mouseSource);
-
-    if (ol.has.TOUCH) {
-      this.registerSource('touch',
-          new ol.pointer.TouchSource(this, mouseSource));
-    }
-  }
-
-  // register events on the viewport element
-  this.register_();
-};
-
-
-/**
- * Add a new event source that will generate pointer events.
- *
- * @param {string} name A name for the event source
- * @param {ol.pointer.EventSource} source The source event.
- */
-ol.pointer.PointerEventHandler.prototype.registerSource = function(name, source) {
-  var s = source;
-  var newEvents = s.getEvents();
-
-  if (newEvents) {
-    newEvents.forEach(function(e) {
-      var handler = s.getHandlerForEvent(e);
-
-      if (handler) {
-        this.eventMap_[e] = handler.bind(s);
-      }
-    }, this);
-    this.eventSourceList_.push(s);
-  }
-};
-
-
-/**
- * Set up the events for all registered event sources.
- * @private
- */
-ol.pointer.PointerEventHandler.prototype.register_ = function() {
-  var l = this.eventSourceList_.length;
-  var eventSource;
-  for (var i = 0; i < l; i++) {
-    eventSource = this.eventSourceList_[i];
-    this.addEvents_(eventSource.getEvents());
-  }
-};
-
-
-/**
- * Remove all registered events.
- * @private
- */
-ol.pointer.PointerEventHandler.prototype.unregister_ = function() {
-  var l = this.eventSourceList_.length;
-  var eventSource;
-  for (var i = 0; i < l; i++) {
-    eventSource = this.eventSourceList_[i];
-    this.removeEvents_(eventSource.getEvents());
-  }
-};
-
-
-/**
- * Calls the right handler for a new event.
- * @private
- * @param {Event} inEvent Browser event.
- */
-ol.pointer.PointerEventHandler.prototype.eventHandler_ = function(inEvent) {
-  var type = inEvent.type;
-  var handler = this.eventMap_[type];
-  if (handler) {
-    handler(inEvent);
-  }
-};
-
-
-/**
- * Setup listeners for the given events.
- * @private
- * @param {Array.<string>} events List of events.
- */
-ol.pointer.PointerEventHandler.prototype.addEvents_ = function(events) {
-  events.forEach(function(eventName) {
-    ol.events.listen(this.element_, eventName, this.eventHandler_, this);
-  }, this);
-};
-
-
-/**
- * Unregister listeners for the given events.
- * @private
- * @param {Array.<string>} events List of events.
- */
-ol.pointer.PointerEventHandler.prototype.removeEvents_ = function(events) {
-  events.forEach(function(e) {
-    ol.events.unlisten(this.element_, e, this.eventHandler_, this);
-  }, this);
-};
-
-
-/**
- * Returns a snapshot of inEvent, with writable properties.
- *
- * @param {Event} event Browser event.
- * @param {Event|Touch} inEvent An event that contains
- *    properties to copy.
- * @return {Object} An object containing shallow copies of
- *    `inEvent`'s properties.
- */
-ol.pointer.PointerEventHandler.prototype.cloneEvent = function(event, inEvent) {
-  var eventCopy = {}, p;
-  for (var i = 0, ii = ol.pointer.PointerEventHandler.CLONE_PROPS.length; i < ii; i++) {
-    p = ol.pointer.PointerEventHandler.CLONE_PROPS[i][0];
-    eventCopy[p] = event[p] || inEvent[p] || ol.pointer.PointerEventHandler.CLONE_PROPS[i][1];
-  }
-
-  return eventCopy;
-};
-
-
-// EVENTS
-
-
-/**
- * Triggers a 'pointerdown' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.down = function(data, event) {
-  this.fireEvent(ol.pointer.EventType.POINTERDOWN, data, event);
-};
-
-
-/**
- * Triggers a 'pointermove' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.move = function(data, event) {
-  this.fireEvent(ol.pointer.EventType.POINTERMOVE, data, event);
-};
-
-
-/**
- * Triggers a 'pointerup' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.up = function(data, event) {
-  this.fireEvent(ol.pointer.EventType.POINTERUP, data, event);
-};
-
-
-/**
- * Triggers a 'pointerenter' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.enter = function(data, event) {
-  data.bubbles = false;
-  this.fireEvent(ol.pointer.EventType.POINTERENTER, data, event);
-};
-
-
-/**
- * Triggers a 'pointerleave' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.leave = function(data, event) {
-  data.bubbles = false;
-  this.fireEvent(ol.pointer.EventType.POINTERLEAVE, data, event);
-};
-
-
-/**
- * Triggers a 'pointerover' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.over = function(data, event) {
-  data.bubbles = true;
-  this.fireEvent(ol.pointer.EventType.POINTEROVER, data, event);
-};
-
-
-/**
- * Triggers a 'pointerout' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.out = function(data, event) {
-  data.bubbles = true;
-  this.fireEvent(ol.pointer.EventType.POINTEROUT, data, event);
-};
-
-
-/**
- * Triggers a 'pointercancel' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.cancel = function(data, event) {
-  this.fireEvent(ol.pointer.EventType.POINTERCANCEL, data, event);
-};
-
-
-/**
- * Triggers a combination of 'pointerout' and 'pointerleave' events.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.leaveOut = function(data, event) {
-  this.out(data, event);
-  if (!this.contains_(data.target, data.relatedTarget)) {
-    this.leave(data, event);
-  }
-};
-
-
-/**
- * Triggers a combination of 'pointerover' and 'pointerevents' events.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.enterOver = function(data, event) {
-  this.over(data, event);
-  if (!this.contains_(data.target, data.relatedTarget)) {
-    this.enter(data, event);
-  }
-};
-
-
-/**
- * @private
- * @param {Element} container The container element.
- * @param {Element} contained The contained element.
- * @return {boolean} Returns true if the container element
- *   contains the other element.
- */
-ol.pointer.PointerEventHandler.prototype.contains_ = function(container, contained) {
-  if (!container || !contained) {
-    return false;
-  }
-  return container.contains(contained);
-};
-
-
-// EVENT CREATION AND TRACKING
-/**
- * Creates a new Event of type `inType`, based on the information in
- * `data`.
- *
- * @param {string} inType A string representing the type of event to create.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- * @return {ol.pointer.PointerEvent} A PointerEvent of type `inType`.
- */
-ol.pointer.PointerEventHandler.prototype.makeEvent = function(inType, data, event) {
-  return new ol.pointer.PointerEvent(inType, event, data);
-};
-
-
-/**
- * Make and dispatch an event in one call.
- * @param {string} inType A string representing the type of event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.fireEvent = function(inType, data, event) {
-  var e = this.makeEvent(inType, data, event);
-  this.dispatchEvent(e);
-};
-
-
-/**
- * Creates a pointer event from a native pointer event
- * and dispatches this event.
- * @param {Event} event A platform event with a target.
- */
-ol.pointer.PointerEventHandler.prototype.fireNativeEvent = function(event) {
-  var e = this.makeEvent(event.type, event, event);
-  this.dispatchEvent(e);
-};
-
-
-/**
- * Wrap a native mouse event into a pointer event.
- * This proxy method is required for the legacy IE support.
- * @param {string} eventType The pointer event type.
- * @param {Event} event The event.
- * @return {ol.pointer.PointerEvent} The wrapped event.
- */
-ol.pointer.PointerEventHandler.prototype.wrapMouseEvent = function(eventType, event) {
-  var pointerEvent = this.makeEvent(
-      eventType, ol.pointer.MouseSource.prepareEvent(event, this), event);
-  return pointerEvent;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.pointer.PointerEventHandler.prototype.disposeInternal = function() {
-  this.unregister_();
-  ol.events.EventTarget.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Properties to copy when cloning an event, with default values.
- * @type {Array.<Array>}
- */
-ol.pointer.PointerEventHandler.CLONE_PROPS = [
-  // MouseEvent
-  ['bubbles', false],
-  ['cancelable', false],
-  ['view', null],
-  ['detail', null],
-  ['screenX', 0],
-  ['screenY', 0],
-  ['clientX', 0],
-  ['clientY', 0],
-  ['ctrlKey', false],
-  ['altKey', false],
-  ['shiftKey', false],
-  ['metaKey', false],
-  ['button', 0],
-  ['relatedTarget', null],
-  // DOM Level 3
-  ['buttons', 0],
-  // PointerEvent
-  ['pointerId', 0],
-  ['width', 0],
-  ['height', 0],
-  ['pressure', 0],
-  ['tiltX', 0],
-  ['tiltY', 0],
-  ['pointerType', ''],
-  ['hwTimestamp', 0],
-  ['isPrimary', false],
-  // event instance
-  ['type', ''],
-  ['target', null],
-  ['currentTarget', null],
-  ['which', 0]
-];
-
-goog.provide('ol.MapBrowserEventHandler');
-
-goog.require('ol');
-goog.require('ol.has');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.MapBrowserPointerEvent');
-goog.require('ol.events');
-goog.require('ol.events.EventTarget');
-goog.require('ol.pointer.EventType');
-goog.require('ol.pointer.PointerEventHandler');
-
-
-/**
- * @param {ol.Map} map The map with the viewport to listen to events on.
- * @param {number|undefined} moveTolerance The minimal distance the pointer must travel to trigger a move.
- * @constructor
- * @extends {ol.events.EventTarget}
- */
-ol.MapBrowserEventHandler = function(map, moveTolerance) {
-
-  ol.events.EventTarget.call(this);
-
-  /**
-   * This is the element that we will listen to the real events on.
-   * @type {ol.Map}
-   * @private
-   */
-  this.map_ = map;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.clickTimeoutId_ = 0;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.dragging_ = false;
-
-  /**
-   * @type {!Array.<ol.EventsKey>}
-   * @private
-   */
-  this.dragListenerKeys_ = [];
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.moveTolerance_ = moveTolerance ?
-      moveTolerance * ol.has.DEVICE_PIXEL_RATIO : ol.has.DEVICE_PIXEL_RATIO;
-
-  /**
-   * The most recent "down" type event (or null if none have occurred).
-   * Set on pointerdown.
-   * @type {ol.pointer.PointerEvent}
-   * @private
-   */
-  this.down_ = null;
-
-  var element = this.map_.getViewport();
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.activePointers_ = 0;
-
-  /**
-   * @type {!Object.<number, boolean>}
-   * @private
-   */
-  this.trackedTouches_ = {};
-
-  /**
-   * Event handler which generates pointer events for
-   * the viewport element.
-   *
-   * @type {ol.pointer.PointerEventHandler}
-   * @private
-   */
-  this.pointerEventHandler_ = new ol.pointer.PointerEventHandler(element);
-
-  /**
-   * Event handler which generates pointer events for
-   * the document (used when dragging).
-   *
-   * @type {ol.pointer.PointerEventHandler}
-   * @private
-   */
-  this.documentPointerEventHandler_ = null;
-
-  /**
-   * @type {?ol.EventsKey}
-   * @private
-   */
-  this.pointerdownListenerKey_ = ol.events.listen(this.pointerEventHandler_,
-      ol.pointer.EventType.POINTERDOWN,
-      this.handlePointerDown_, this);
-
-  /**
-   * @type {?ol.EventsKey}
-   * @private
-   */
-  this.relayedListenerKey_ = ol.events.listen(this.pointerEventHandler_,
-      ol.pointer.EventType.POINTERMOVE,
-      this.relayEvent_, this);
-
-};
-ol.inherits(ol.MapBrowserEventHandler, ol.events.EventTarget);
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.emulateClick_ = function(pointerEvent) {
-  var newEvent = new ol.MapBrowserPointerEvent(
-      ol.MapBrowserEventType.CLICK, this.map_, pointerEvent);
-  this.dispatchEvent(newEvent);
-  if (this.clickTimeoutId_ !== 0) {
-    // double-click
-    clearTimeout(this.clickTimeoutId_);
-    this.clickTimeoutId_ = 0;
-    newEvent = new ol.MapBrowserPointerEvent(
-        ol.MapBrowserEventType.DBLCLICK, this.map_, pointerEvent);
-    this.dispatchEvent(newEvent);
-  } else {
-    // click
-    this.clickTimeoutId_ = setTimeout(function() {
-      this.clickTimeoutId_ = 0;
-      var newEvent = new ol.MapBrowserPointerEvent(
-          ol.MapBrowserEventType.SINGLECLICK, this.map_, pointerEvent);
-      this.dispatchEvent(newEvent);
-    }.bind(this), 250);
-  }
-};
-
-
-/**
- * Keeps track on how many pointers are currently active.
- *
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.updateActivePointers_ = function(pointerEvent) {
-  var event = pointerEvent;
-
-  if (event.type == ol.MapBrowserEventType.POINTERUP ||
-      event.type == ol.MapBrowserEventType.POINTERCANCEL) {
-    delete this.trackedTouches_[event.pointerId];
-  } else if (event.type == ol.MapBrowserEventType.POINTERDOWN) {
-    this.trackedTouches_[event.pointerId] = true;
-  }
-  this.activePointers_ = Object.keys(this.trackedTouches_).length;
-};
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.handlePointerUp_ = function(pointerEvent) {
-  this.updateActivePointers_(pointerEvent);
-  var newEvent = new ol.MapBrowserPointerEvent(
-     ol.MapBrowserEventType.POINTERUP, this.map_, pointerEvent);
-  this.dispatchEvent(newEvent);
-
- // We emulate click events on left mouse button click, touch contact, and pen
- // contact. isMouseActionButton returns true in these cases (evt.button is set
- // to 0).
- // See http://www.w3.org/TR/pointerevents/#button-states
-  if (!this.dragging_ && this.isMouseActionButton_(pointerEvent)) {
-    this.emulateClick_(this.down_);
-  }
-
-  if (this.activePointers_ === 0) {
-    this.dragListenerKeys_.forEach(ol.events.unlistenByKey);
-    this.dragListenerKeys_.length = 0;
-    this.dragging_ = false;
-    this.down_ = null;
-    this.documentPointerEventHandler_.dispose();
-    this.documentPointerEventHandler_ = null;
-  }
-};
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @return {boolean} If the left mouse button was pressed.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.isMouseActionButton_ = function(pointerEvent) {
-  return pointerEvent.button === 0;
-};
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.handlePointerDown_ = function(pointerEvent) {
-  this.updateActivePointers_(pointerEvent);
-  var newEvent = new ol.MapBrowserPointerEvent(
-      ol.MapBrowserEventType.POINTERDOWN, this.map_, pointerEvent);
-  this.dispatchEvent(newEvent);
-
-  this.down_ = pointerEvent;
-
-  if (this.dragListenerKeys_.length === 0) {
-    /* Set up a pointer event handler on the `document`,
-     * which is required when the pointer is moved outside
-     * the viewport when dragging.
-     */
-    this.documentPointerEventHandler_ =
-        new ol.pointer.PointerEventHandler(document);
-
-    this.dragListenerKeys_.push(
-      ol.events.listen(this.documentPointerEventHandler_,
-          ol.MapBrowserEventType.POINTERMOVE,
-          this.handlePointerMove_, this),
-      ol.events.listen(this.documentPointerEventHandler_,
-          ol.MapBrowserEventType.POINTERUP,
-          this.handlePointerUp_, this),
-      /* Note that the listener for `pointercancel is set up on
-       * `pointerEventHandler_` and not `documentPointerEventHandler_` like
-       * the `pointerup` and `pointermove` listeners.
-       *
-       * The reason for this is the following: `TouchSource.vacuumTouches_()`
-       * issues `pointercancel` events, when there was no `touchend` for a
-       * `touchstart`. Now, let's say a first `touchstart` is registered on
-       * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.
-       * But `documentPointerEventHandler_` doesn't know about the first
-       * `touchstart`. If there is no `touchend` for the `touchstart`, we can
-       * only receive a `touchcancel` from `pointerEventHandler_`, because it is
-       * only registered there.
-       */
-      ol.events.listen(this.pointerEventHandler_,
-          ol.MapBrowserEventType.POINTERCANCEL,
-          this.handlePointerUp_, this)
-    );
-  }
-};
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.handlePointerMove_ = function(pointerEvent) {
-  // Between pointerdown and pointerup, pointermove events are triggered.
-  // To avoid a 'false' touchmove event to be dispatched, we test if the pointer
-  // moved a significant distance.
-  if (this.isMoving_(pointerEvent)) {
-    this.dragging_ = true;
-    var newEvent = new ol.MapBrowserPointerEvent(
-        ol.MapBrowserEventType.POINTERDRAG, this.map_, pointerEvent,
-        this.dragging_);
-    this.dispatchEvent(newEvent);
-  }
-
-  // Some native android browser triggers mousemove events during small period
-  // of time. See: https://code.google.com/p/android/issues/detail?id=5491 or
-  // https://code.google.com/p/android/issues/detail?id=19827
-  // ex: Galaxy Tab P3110 + Android 4.1.1
-  pointerEvent.preventDefault();
-};
-
-
-/**
- * Wrap and relay a pointer event.  Note that this requires that the type
- * string for the MapBrowserPointerEvent matches the PointerEvent type.
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.relayEvent_ = function(pointerEvent) {
-  var dragging = !!(this.down_ && this.isMoving_(pointerEvent));
-  this.dispatchEvent(new ol.MapBrowserPointerEvent(
-      pointerEvent.type, this.map_, pointerEvent, dragging));
-};
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @return {boolean} Is moving.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.isMoving_ = function(pointerEvent) {
-  return Math.abs(pointerEvent.clientX - this.down_.clientX) > this.moveTolerance_ ||
-      Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.MapBrowserEventHandler.prototype.disposeInternal = function() {
-  if (this.relayedListenerKey_) {
-    ol.events.unlistenByKey(this.relayedListenerKey_);
-    this.relayedListenerKey_ = null;
-  }
-  if (this.pointerdownListenerKey_) {
-    ol.events.unlistenByKey(this.pointerdownListenerKey_);
-    this.pointerdownListenerKey_ = null;
-  }
-
-  this.dragListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.dragListenerKeys_.length = 0;
-
-  if (this.documentPointerEventHandler_) {
-    this.documentPointerEventHandler_.dispose();
-    this.documentPointerEventHandler_ = null;
-  }
-  if (this.pointerEventHandler_) {
-    this.pointerEventHandler_.dispose();
-    this.pointerEventHandler_ = null;
-  }
-  ol.events.EventTarget.prototype.disposeInternal.call(this);
-};
-
-goog.provide('ol.MapProperty');
-
-/**
- * @enum {string}
- */
-ol.MapProperty = {
-  LAYERGROUP: 'layergroup',
-  SIZE: 'size',
-  TARGET: 'target',
-  VIEW: 'view'
-};
-
-goog.provide('ol.TileState');
-
-/**
- * @enum {number}
- */
-ol.TileState = {
-  IDLE: 0,
-  LOADING: 1,
-  LOADED: 2,
-  ERROR: 3,
-  EMPTY: 4,
-  ABORT: 5
-};
-
-goog.provide('ol.structs.PriorityQueue');
-
-goog.require('ol.asserts');
-goog.require('ol.obj');
-
-
-/**
- * Priority queue.
- *
- * The implementation is inspired from the Closure Library's Heap class and
- * Python's heapq module.
- *
- * @see http://closure-library.googlecode.com/svn/docs/closure_goog_structs_heap.js.source.html
- * @see http://hg.python.org/cpython/file/2.7/Lib/heapq.py
- *
- * @constructor
- * @param {function(T): number} priorityFunction Priority function.
- * @param {function(T): string} keyFunction Key function.
- * @struct
- * @template T
- */
-ol.structs.PriorityQueue = function(priorityFunction, keyFunction) {
-
-  /**
-   * @type {function(T): number}
-   * @private
-   */
-  this.priorityFunction_ = priorityFunction;
-
-  /**
-   * @type {function(T): string}
-   * @private
-   */
-  this.keyFunction_ = keyFunction;
-
-  /**
-   * @type {Array.<T>}
-   * @private
-   */
-  this.elements_ = [];
-
-  /**
-   * @type {Array.<number>}
-   * @private
-   */
-  this.priorities_ = [];
-
-  /**
-   * @type {Object.<string, boolean>}
-   * @private
-   */
-  this.queuedElements_ = {};
-
-};
-
-
-/**
- * @const
- * @type {number}
- */
-ol.structs.PriorityQueue.DROP = Infinity;
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.structs.PriorityQueue.prototype.clear = function() {
-  this.elements_.length = 0;
-  this.priorities_.length = 0;
-  ol.obj.clear(this.queuedElements_);
-};
-
-
-/**
- * Remove and return the highest-priority element. O(log N).
- * @return {T} Element.
- */
-ol.structs.PriorityQueue.prototype.dequeue = function() {
-  var elements = this.elements_;
-  var priorities = this.priorities_;
-  var element = elements[0];
-  if (elements.length == 1) {
-    elements.length = 0;
-    priorities.length = 0;
-  } else {
-    elements[0] = elements.pop();
-    priorities[0] = priorities.pop();
-    this.siftUp_(0);
-  }
-  var elementKey = this.keyFunction_(element);
-  delete this.queuedElements_[elementKey];
-  return element;
-};
-
-
-/**
- * Enqueue an element. O(log N).
- * @param {T} element Element.
- * @return {boolean} The element was added to the queue.
- */
-ol.structs.PriorityQueue.prototype.enqueue = function(element) {
-  ol.asserts.assert(!(this.keyFunction_(element) in this.queuedElements_),
-      31); // Tried to enqueue an `element` that was already added to the queue
-  var priority = this.priorityFunction_(element);
-  if (priority != ol.structs.PriorityQueue.DROP) {
-    this.elements_.push(element);
-    this.priorities_.push(priority);
-    this.queuedElements_[this.keyFunction_(element)] = true;
-    this.siftDown_(0, this.elements_.length - 1);
-    return true;
-  }
-  return false;
-};
-
-
-/**
- * @return {number} Count.
- */
-ol.structs.PriorityQueue.prototype.getCount = function() {
-  return this.elements_.length;
-};
-
-
-/**
- * Gets the index of the left child of the node at the given index.
- * @param {number} index The index of the node to get the left child for.
- * @return {number} The index of the left child.
- * @private
- */
-ol.structs.PriorityQueue.prototype.getLeftChildIndex_ = function(index) {
-  return index * 2 + 1;
-};
-
-
-/**
- * Gets the index of the right child of the node at the given index.
- * @param {number} index The index of the node to get the right child for.
- * @return {number} The index of the right child.
- * @private
- */
-ol.structs.PriorityQueue.prototype.getRightChildIndex_ = function(index) {
-  return index * 2 + 2;
-};
-
-
-/**
- * Gets the index of the parent of the node at the given index.
- * @param {number} index The index of the node to get the parent for.
- * @return {number} The index of the parent.
- * @private
- */
-ol.structs.PriorityQueue.prototype.getParentIndex_ = function(index) {
-  return (index - 1) >> 1;
-};
-
-
-/**
- * Make this a heap. O(N).
- * @private
- */
-ol.structs.PriorityQueue.prototype.heapify_ = function() {
-  var i;
-  for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {
-    this.siftUp_(i);
-  }
-};
-
-
-/**
- * @return {boolean} Is empty.
- */
-ol.structs.PriorityQueue.prototype.isEmpty = function() {
-  return this.elements_.length === 0;
-};
-
-
-/**
- * @param {string} key Key.
- * @return {boolean} Is key queued.
- */
-ol.structs.PriorityQueue.prototype.isKeyQueued = function(key) {
-  return key in this.queuedElements_;
-};
-
-
-/**
- * @param {T} element Element.
- * @return {boolean} Is queued.
- */
-ol.structs.PriorityQueue.prototype.isQueued = function(element) {
-  return this.isKeyQueued(this.keyFunction_(element));
-};
-
-
-/**
- * @param {number} index The index of the node to move down.
- * @private
- */
-ol.structs.PriorityQueue.prototype.siftUp_ = function(index) {
-  var elements = this.elements_;
-  var priorities = this.priorities_;
-  var count = elements.length;
-  var element = elements[index];
-  var priority = priorities[index];
-  var startIndex = index;
-
-  while (index < (count >> 1)) {
-    var lIndex = this.getLeftChildIndex_(index);
-    var rIndex = this.getRightChildIndex_(index);
-
-    var smallerChildIndex = rIndex < count &&
-        priorities[rIndex] < priorities[lIndex] ?
-        rIndex : lIndex;
-
-    elements[index] = elements[smallerChildIndex];
-    priorities[index] = priorities[smallerChildIndex];
-    index = smallerChildIndex;
-  }
-
-  elements[index] = element;
-  priorities[index] = priority;
-  this.siftDown_(startIndex, index);
-};
-
-
-/**
- * @param {number} startIndex The index of the root.
- * @param {number} index The index of the node to move up.
- * @private
- */
-ol.structs.PriorityQueue.prototype.siftDown_ = function(startIndex, index) {
-  var elements = this.elements_;
-  var priorities = this.priorities_;
-  var element = elements[index];
-  var priority = priorities[index];
-
-  while (index > startIndex) {
-    var parentIndex = this.getParentIndex_(index);
-    if (priorities[parentIndex] > priority) {
-      elements[index] = elements[parentIndex];
-      priorities[index] = priorities[parentIndex];
-      index = parentIndex;
-    } else {
-      break;
-    }
-  }
-  elements[index] = element;
-  priorities[index] = priority;
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.structs.PriorityQueue.prototype.reprioritize = function() {
-  var priorityFunction = this.priorityFunction_;
-  var elements = this.elements_;
-  var priorities = this.priorities_;
-  var index = 0;
-  var n = elements.length;
-  var element, i, priority;
-  for (i = 0; i < n; ++i) {
-    element = elements[i];
-    priority = priorityFunction(element);
-    if (priority == ol.structs.PriorityQueue.DROP) {
-      delete this.queuedElements_[this.keyFunction_(element)];
-    } else {
-      priorities[index] = priority;
-      elements[index++] = element;
-    }
-  }
-  elements.length = index;
-  priorities.length = index;
-  this.heapify_();
-};
-
-goog.provide('ol.TileQueue');
-
-goog.require('ol');
-goog.require('ol.TileState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.structs.PriorityQueue');
-
-
-/**
- * @constructor
- * @extends {ol.structs.PriorityQueue.<Array>}
- * @param {ol.TilePriorityFunction} tilePriorityFunction
- *     Tile priority function.
- * @param {function(): ?} tileChangeCallback
- *     Function called on each tile change event.
- * @struct
- */
-ol.TileQueue = function(tilePriorityFunction, tileChangeCallback) {
-
-  ol.structs.PriorityQueue.call(
-      this,
-      /**
-       * @param {Array} element Element.
-       * @return {number} Priority.
-       */
-      function(element) {
-        return tilePriorityFunction.apply(null, element);
-      },
-      /**
-       * @param {Array} element Element.
-       * @return {string} Key.
-       */
-      function(element) {
-        return /** @type {ol.Tile} */ (element[0]).getKey();
-      });
-
-  /**
-   * @private
-   * @type {function(): ?}
-   */
-  this.tileChangeCallback_ = tileChangeCallback;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.tilesLoading_ = 0;
-
-  /**
-   * @private
-   * @type {!Object.<string,boolean>}
-   */
-  this.tilesLoadingKeys_ = {};
-
-};
-ol.inherits(ol.TileQueue, ol.structs.PriorityQueue);
-
-
-/**
- * @inheritDoc
- */
-ol.TileQueue.prototype.enqueue = function(element) {
-  var added = ol.structs.PriorityQueue.prototype.enqueue.call(this, element);
-  if (added) {
-    var tile = element[0];
-    ol.events.listen(tile, ol.events.EventType.CHANGE,
-        this.handleTileChange, this);
-  }
-  return added;
-};
-
-
-/**
- * @return {number} Number of tiles loading.
- */
-ol.TileQueue.prototype.getTilesLoading = function() {
-  return this.tilesLoading_;
-};
-
-
-/**
- * @param {ol.events.Event} event Event.
- * @protected
- */
-ol.TileQueue.prototype.handleTileChange = function(event) {
-  var tile = /** @type {ol.Tile} */ (event.target);
-  var state = tile.getState();
-  if (state === ol.TileState.LOADED || state === ol.TileState.ERROR ||
-      state === ol.TileState.EMPTY || state === ol.TileState.ABORT) {
-    ol.events.unlisten(tile, ol.events.EventType.CHANGE,
-        this.handleTileChange, this);
-    var tileKey = tile.getKey();
-    if (tileKey in this.tilesLoadingKeys_) {
-      delete this.tilesLoadingKeys_[tileKey];
-      --this.tilesLoading_;
-    }
-    this.tileChangeCallback_();
-  }
-};
-
-
-/**
- * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.
- * @param {number} maxNewLoads Maximum number of new tiles to load.
- */
-ol.TileQueue.prototype.loadMoreTiles = function(maxTotalLoading, maxNewLoads) {
-  var newLoads = 0;
-  var tile, tileKey;
-  while (this.tilesLoading_ < maxTotalLoading && newLoads < maxNewLoads &&
-         this.getCount() > 0) {
-    tile = /** @type {ol.Tile} */ (this.dequeue()[0]);
-    tileKey = tile.getKey();
-    if (tile.getState() === ol.TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {
-      this.tilesLoadingKeys_[tileKey] = true;
-      ++this.tilesLoading_;
-      ++newLoads;
-      tile.load();
-    }
-  }
-};
-
-goog.provide('ol.ResolutionConstraint');
-
-goog.require('ol.array');
-goog.require('ol.math');
-
-
-/**
- * @param {Array.<number>} resolutions Resolutions.
- * @return {ol.ResolutionConstraintType} Zoom function.
- */
-ol.ResolutionConstraint.createSnapToResolutions = function(resolutions) {
-  return (
-      /**
-       * @param {number|undefined} resolution Resolution.
-       * @param {number} delta Delta.
-       * @param {number} direction Direction.
-       * @return {number|undefined} Resolution.
-       */
-      function(resolution, delta, direction) {
-        if (resolution !== undefined) {
-          var z =
-              ol.array.linearFindNearest(resolutions, resolution, direction);
-          z = ol.math.clamp(z + delta, 0, resolutions.length - 1);
-          var index = Math.floor(z);
-          if (z != index && index < resolutions.length - 1) {
-            var power = resolutions[index] / resolutions[index + 1];
-            return resolutions[index] / Math.pow(power, z - index);
-          } else {
-            return resolutions[index];
-          }
-        } else {
-          return undefined;
-        }
-      });
-};
-
-
-/**
- * @param {number} power Power.
- * @param {number} maxResolution Maximum resolution.
- * @param {number=} opt_maxLevel Maximum level.
- * @return {ol.ResolutionConstraintType} Zoom function.
- */
-ol.ResolutionConstraint.createSnapToPower = function(power, maxResolution, opt_maxLevel) {
-  return (
-      /**
-       * @param {number|undefined} resolution Resolution.
-       * @param {number} delta Delta.
-       * @param {number} direction Direction.
-       * @return {number|undefined} Resolution.
-       */
-      function(resolution, delta, direction) {
-        if (resolution !== undefined) {
-          var offset = -direction / 2 + 0.5;
-          var oldLevel = Math.floor(
-              Math.log(maxResolution / resolution) / Math.log(power) + offset);
-          var newLevel = Math.max(oldLevel + delta, 0);
-          if (opt_maxLevel !== undefined) {
-            newLevel = Math.min(newLevel, opt_maxLevel);
-          }
-          return maxResolution / Math.pow(power, newLevel);
-        } else {
-          return undefined;
-        }
-      });
-};
-
-goog.provide('ol.RotationConstraint');
-
-goog.require('ol.math');
-
-
-/**
- * @param {number|undefined} rotation Rotation.
- * @param {number} delta Delta.
- * @return {number|undefined} Rotation.
- */
-ol.RotationConstraint.disable = function(rotation, delta) {
-  if (rotation !== undefined) {
-    return 0;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {number|undefined} rotation Rotation.
- * @param {number} delta Delta.
- * @return {number|undefined} Rotation.
- */
-ol.RotationConstraint.none = function(rotation, delta) {
-  if (rotation !== undefined) {
-    return rotation + delta;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {number} n N.
- * @return {ol.RotationConstraintType} Rotation constraint.
- */
-ol.RotationConstraint.createSnapToN = function(n) {
-  var theta = 2 * Math.PI / n;
-  return (
-      /**
-       * @param {number|undefined} rotation Rotation.
-       * @param {number} delta Delta.
-       * @return {number|undefined} Rotation.
-       */
-      function(rotation, delta) {
-        if (rotation !== undefined) {
-          rotation = Math.floor((rotation + delta) / theta + 0.5) * theta;
-          return rotation;
-        } else {
-          return undefined;
-        }
-      });
-};
-
-
-/**
- * @param {number=} opt_tolerance Tolerance.
- * @return {ol.RotationConstraintType} Rotation constraint.
- */
-ol.RotationConstraint.createSnapToZero = function(opt_tolerance) {
-  var tolerance = opt_tolerance || ol.math.toRadians(5);
-  return (
-      /**
-       * @param {number|undefined} rotation Rotation.
-       * @param {number} delta Delta.
-       * @return {number|undefined} Rotation.
-       */
-      function(rotation, delta) {
-        if (rotation !== undefined) {
-          if (Math.abs(rotation + delta) <= tolerance) {
-            return 0;
-          } else {
-            return rotation + delta;
-          }
-        } else {
-          return undefined;
-        }
-      });
-};
-
-goog.provide('ol.ViewHint');
-
-/**
- * @enum {number}
- */
-ol.ViewHint = {
-  ANIMATING: 0,
-  INTERACTING: 1
-};
-
-goog.provide('ol.ViewProperty');
-
-/**
- * @enum {string}
- */
-ol.ViewProperty = {
-  CENTER: 'center',
-  RESOLUTION: 'resolution',
-  ROTATION: 'rotation'
-};
-
-goog.provide('ol.string');
-
-/**
- * @param {number} number Number to be formatted
- * @param {number} width The desired width
- * @param {number=} opt_precision Precision of the output string (i.e. number of decimal places)
- * @returns {string} Formatted string
-*/
-ol.string.padNumber = function(number, width, opt_precision) {
-  var numberString = opt_precision !== undefined ? number.toFixed(opt_precision) : '' + number;
-  var decimal = numberString.indexOf('.');
-  decimal = decimal === -1 ? numberString.length : decimal;
-  return decimal > width ? numberString : new Array(1 + width - decimal).join('0') + numberString;
-};
-
-/**
- * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js
- * @param {string|number} v1 First version
- * @param {string|number} v2 Second version
- * @returns {number} Value
- */
-ol.string.compareVersions = function(v1, v2) {
-  var s1 = ('' + v1).split('.');
-  var s2 = ('' + v2).split('.');
-
-  for (var i = 0; i < Math.max(s1.length, s2.length); i++) {
-    var n1 = parseInt(s1[i] || '0', 10);
-    var n2 = parseInt(s2[i] || '0', 10);
-
-    if (n1 > n2) {
-      return 1;
-    }
-    if (n2 > n1) {
-      return -1;
-    }
-  }
-
-  return 0;
-};
-
-goog.provide('ol.coordinate');
-
-goog.require('ol.math');
-goog.require('ol.string');
-
-
-/**
- * Add `delta` to `coordinate`. `coordinate` is modified in place and returned
- * by the function.
- *
- * Example:
- *
- *     var coord = [7.85, 47.983333];
- *     ol.coordinate.add(coord, [-2, 4]);
- *     // coord is now [5.85, 51.983333]
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.Coordinate} delta Delta.
- * @return {ol.Coordinate} The input coordinate adjusted by the given delta.
- * @api
- */
-ol.coordinate.add = function(coordinate, delta) {
-  coordinate[0] += delta[0];
-  coordinate[1] += delta[1];
-  return coordinate;
-};
-
-
-/**
- * Calculates the point closest to the passed coordinate on the passed circle.
- *
- * @param {ol.Coordinate} coordinate The coordinate.
- * @param {ol.geom.Circle} circle The circle.
- * @return {ol.Coordinate} Closest point on the circumference
- */
-ol.coordinate.closestOnCircle = function(coordinate, circle) {
-  var r = circle.getRadius();
-  var center = circle.getCenter();
-  var x0 = center[0];
-  var y0 = center[1];
-  var x1 = coordinate[0];
-  var y1 = coordinate[1];
-
-  var dx = x1 - x0;
-  var dy = y1 - y0;
-  if (dx === 0 && dy === 0) {
-    dx = 1;
-  }
-  var d = Math.sqrt(dx * dx + dy * dy);
-
-  var x, y;
-
-  x = x0 + r * dx / d;
-  y = y0 + r * dy / d;
-
-  return [x, y];
-};
-
-
-/**
- * Calculates the point closest to the passed coordinate on the passed segment.
- * This is the foot of the perpendicular of the coordinate to the segment when
- * the foot is on the segment, or the closest segment coordinate when the foot
- * is outside the segment.
- *
- * @param {ol.Coordinate} coordinate The coordinate.
- * @param {Array.<ol.Coordinate>} segment The two coordinates of the segment.
- * @return {ol.Coordinate} The foot of the perpendicular of the coordinate to
- *     the segment.
- */
-ol.coordinate.closestOnSegment = function(coordinate, segment) {
-  var x0 = coordinate[0];
-  var y0 = coordinate[1];
-  var start = segment[0];
-  var end = segment[1];
-  var x1 = start[0];
-  var y1 = start[1];
-  var x2 = end[0];
-  var y2 = end[1];
-  var dx = x2 - x1;
-  var dy = y2 - y1;
-  var along = (dx === 0 && dy === 0) ? 0 :
-      ((dx * (x0 - x1)) + (dy * (y0 - y1))) / ((dx * dx + dy * dy) || 0);
-  var x, y;
-  if (along <= 0) {
-    x = x1;
-    y = y1;
-  } else if (along >= 1) {
-    x = x2;
-    y = y2;
-  } else {
-    x = x1 + along * dx;
-    y = y1 + along * dy;
-  }
-  return [x, y];
-};
-
-
-/**
- * Returns a {@link ol.CoordinateFormatType} function that can be used to format
- * a {ol.Coordinate} to a string.
- *
- * Example without specifying the fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var stringifyFunc = ol.coordinate.createStringXY();
- *     var out = stringifyFunc(coord);
- *     // out is now '8, 48'
- *
- * Example with explicitly specifying 2 fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var stringifyFunc = ol.coordinate.createStringXY(2);
- *     var out = stringifyFunc(coord);
- *     // out is now '7.85, 47.98'
- *
- * @param {number=} opt_fractionDigits The number of digits to include
- *    after the decimal point. Default is `0`.
- * @return {ol.CoordinateFormatType} Coordinate format.
- * @api
- */
-ol.coordinate.createStringXY = function(opt_fractionDigits) {
-  return (
-      /**
-       * @param {ol.Coordinate|undefined} coordinate Coordinate.
-       * @return {string} String XY.
-       */
-      function(coordinate) {
-        return ol.coordinate.toStringXY(coordinate, opt_fractionDigits);
-      });
-};
-
-
-/**
- * @param {string} hemispheres Hemispheres.
- * @param {number} degrees Degrees.
- * @param {number=} opt_fractionDigits The number of digits to include
- *    after the decimal point. Default is `0`.
- * @return {string} String.
- */
-ol.coordinate.degreesToStringHDMS = function(hemispheres, degrees, opt_fractionDigits) {
-  var normalizedDegrees = ol.math.modulo(degrees + 180, 360) - 180;
-  var x = Math.abs(3600 * normalizedDegrees);
-  var dflPrecision = opt_fractionDigits || 0;
-  var precision = Math.pow(10, dflPrecision);
-
-  var deg = Math.floor(x / 3600);
-  var min = Math.floor((x - deg * 3600) / 60);
-  var sec = x - (deg * 3600) - (min * 60);
-  sec = Math.ceil(sec * precision) / precision;
-
-  if (sec >= 60) {
-    sec = 0;
-    min += 1;
-  }
-
-  if (min >= 60) {
-    min = 0;
-    deg += 1;
-  }
-
-  return deg + '\u00b0 ' + ol.string.padNumber(min, 2) + '\u2032 ' +
-    ol.string.padNumber(sec, 2, dflPrecision) + '\u2033' +
-    (normalizedDegrees == 0 ? '' : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0));
-};
-
-
-/**
- * Transforms the given {@link ol.Coordinate} to a string using the given string
- * template. The strings `{x}` and `{y}` in the template will be replaced with
- * the first and second coordinate values respectively.
- *
- * Example without specifying the fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var template = 'Coordinate is ({x}|{y}).';
- *     var out = ol.coordinate.format(coord, template);
- *     // out is now 'Coordinate is (8|48).'
- *
- * Example explicitly specifying the fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var template = 'Coordinate is ({x}|{y}).';
- *     var out = ol.coordinate.format(coord, template, 2);
- *     // out is now 'Coordinate is (7.85|47.98).'
- *
- * @param {ol.Coordinate|undefined} coordinate Coordinate.
- * @param {string} template A template string with `{x}` and `{y}` placeholders
- *     that will be replaced by first and second coordinate values.
- * @param {number=} opt_fractionDigits The number of digits to include
- *    after the decimal point. Default is `0`.
- * @return {string} Formatted coordinate.
- * @api
- */
-ol.coordinate.format = function(coordinate, template, opt_fractionDigits) {
-  if (coordinate) {
-    return template
-      .replace('{x}', coordinate[0].toFixed(opt_fractionDigits))
-      .replace('{y}', coordinate[1].toFixed(opt_fractionDigits));
-  } else {
-    return '';
-  }
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate1 First coordinate.
- * @param {ol.Coordinate} coordinate2 Second coordinate.
- * @return {boolean} Whether the passed coordinates are equal.
- */
-ol.coordinate.equals = function(coordinate1, coordinate2) {
-  var equals = true;
-  for (var i = coordinate1.length - 1; i >= 0; --i) {
-    if (coordinate1[i] != coordinate2[i]) {
-      equals = false;
-      break;
-    }
-  }
-  return equals;
-};
-
-
-/**
- * Rotate `coordinate` by `angle`. `coordinate` is modified in place and
- * returned by the function.
- *
- * Example:
- *
- *     var coord = [7.85, 47.983333];
- *     var rotateRadians = Math.PI / 2; // 90 degrees
- *     ol.coordinate.rotate(coord, rotateRadians);
- *     // coord is now [-47.983333, 7.85]
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} angle Angle in radian.
- * @return {ol.Coordinate} Coordinate.
- * @api
- */
-ol.coordinate.rotate = function(coordinate, angle) {
-  var cosAngle = Math.cos(angle);
-  var sinAngle = Math.sin(angle);
-  var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;
-  var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;
-  coordinate[0] = x;
-  coordinate[1] = y;
-  return coordinate;
-};
-
-
-/**
- * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned
- * by the function.
- *
- * Example:
- *
- *     var coord = [7.85, 47.983333];
- *     var scale = 1.2;
- *     ol.coordinate.scale(coord, scale);
- *     // coord is now [9.42, 57.5799996]
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} scale Scale factor.
- * @return {ol.Coordinate} Coordinate.
- */
-ol.coordinate.scale = function(coordinate, scale) {
-  coordinate[0] *= scale;
-  coordinate[1] *= scale;
-  return coordinate;
-};
-
-
-/**
- * Subtract `delta` to `coordinate`. `coordinate` is modified in place and
- * returned by the function.
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.Coordinate} delta Delta.
- * @return {ol.Coordinate} Coordinate.
- */
-ol.coordinate.sub = function(coordinate, delta) {
-  coordinate[0] -= delta[0];
-  coordinate[1] -= delta[1];
-  return coordinate;
-};
-
-
-/**
- * @param {ol.Coordinate} coord1 First coordinate.
- * @param {ol.Coordinate} coord2 Second coordinate.
- * @return {number} Squared distance between coord1 and coord2.
- */
-ol.coordinate.squaredDistance = function(coord1, coord2) {
-  var dx = coord1[0] - coord2[0];
-  var dy = coord1[1] - coord2[1];
-  return dx * dx + dy * dy;
-};
-
-
-/**
- * @param {ol.Coordinate} coord1 First coordinate.
- * @param {ol.Coordinate} coord2 Second coordinate.
- * @return {number} Distance between coord1 and coord2.
- */
-ol.coordinate.distance = function(coord1, coord2) {
-  return Math.sqrt(ol.coordinate.squaredDistance(coord1, coord2));
-};
-
-
-/**
- * Calculate the squared distance from a coordinate to a line segment.
- *
- * @param {ol.Coordinate} coordinate Coordinate of the point.
- * @param {Array.<ol.Coordinate>} segment Line segment (2 coordinates).
- * @return {number} Squared distance from the point to the line segment.
- */
-ol.coordinate.squaredDistanceToSegment = function(coordinate, segment) {
-  return ol.coordinate.squaredDistance(coordinate,
-      ol.coordinate.closestOnSegment(coordinate, segment));
-};
-
-
-/**
- * Format a geographic coordinate with the hemisphere, degrees, minutes, and
- * seconds.
- *
- * Example without specifying fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var out = ol.coordinate.toStringHDMS(coord);
- *     // out is now '47° 58′ 60″ N 7° 50′ 60″ E'
- *
- * Example explicitly specifying 1 fractional digit:
- *
- *     var coord = [7.85, 47.983333];
- *     var out = ol.coordinate.toStringHDMS(coord, 1);
- *     // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'
- *
- * @param {ol.Coordinate|undefined} coordinate Coordinate.
- * @param {number=} opt_fractionDigits The number of digits to include
- *    after the decimal point. Default is `0`.
- * @return {string} Hemisphere, degrees, minutes and seconds.
- * @api
- */
-ol.coordinate.toStringHDMS = function(coordinate, opt_fractionDigits) {
-  if (coordinate) {
-    return ol.coordinate.degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) + ' ' +
-        ol.coordinate.degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits);
-  } else {
-    return '';
-  }
-};
-
-
-/**
- * Format a coordinate as a comma delimited string.
- *
- * Example without specifying fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var out = ol.coordinate.toStringXY(coord);
- *     // out is now '8, 48'
- *
- * Example explicitly specifying 1 fractional digit:
- *
- *     var coord = [7.85, 47.983333];
- *     var out = ol.coordinate.toStringXY(coord, 1);
- *     // out is now '7.8, 48.0'
- *
- * @param {ol.Coordinate|undefined} coordinate Coordinate.
- * @param {number=} opt_fractionDigits The number of digits to include
- *    after the decimal point. Default is `0`.
- * @return {string} XY.
- * @api
- */
-ol.coordinate.toStringXY = function(coordinate, opt_fractionDigits) {
-  return ol.coordinate.format(coordinate, '{x}, {y}', opt_fractionDigits);
-};
-
-goog.provide('ol.geom.GeometryType');
-
-
-/**
- * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,
- * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,
- * `'GeometryCollection'`, `'Circle'`.
- * @enum {string}
- */
-ol.geom.GeometryType = {
-  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'
-};
-
-goog.provide('ol.geom.GeometryLayout');
-
-
-/**
- * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')
- * or measure ('M') coordinate is available. Supported values are `'XY'`,
- * `'XYZ'`, `'XYM'`, `'XYZM'`.
- * @enum {string}
- */
-ol.geom.GeometryLayout = {
-  XY: 'XY',
-  XYZ: 'XYZ',
-  XYM: 'XYM',
-  XYZM: 'XYZM'
-};
-
-goog.provide('ol.functions');
-
-/**
- * Always returns true.
- * @returns {boolean} true.
- */
-ol.functions.TRUE = function() {
-  return true;
-};
-
-/**
- * Always returns false.
- * @returns {boolean} false.
- */
-ol.functions.FALSE = function() {
-  return false;
-};
-
-goog.provide('ol.geom.Geometry');
-
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for vector geometries.
- *
- * To get notified of changes to the geometry, register a listener for the
- * generic `change` event on your geometry instance.
- *
- * @constructor
- * @abstract
- * @extends {ol.Object}
- * @api
- */
-ol.geom.Geometry = function() {
-
-  ol.Object.call(this);
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = ol.extent.createEmpty();
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.extentRevision_ = -1;
-
-  /**
-   * @protected
-   * @type {Object.<string, ol.geom.Geometry>}
-   */
-  this.simplifiedGeometryCache = {};
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.simplifiedGeometryMaxMinSquaredTolerance = 0;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.simplifiedGeometryRevision = 0;
-
-};
-ol.inherits(ol.geom.Geometry, ol.Object);
-
-
-/**
- * Make a complete copy of the geometry.
- * @abstract
- * @return {!ol.geom.Geometry} Clone.
- */
-ol.geom.Geometry.prototype.clone = function() {};
-
-
-/**
- * @abstract
- * @param {number} x X.
- * @param {number} y Y.
- * @param {ol.Coordinate} closestPoint Closest point.
- * @param {number} minSquaredDistance Minimum squared distance.
- * @return {number} Minimum squared distance.
- */
-ol.geom.Geometry.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {};
-
-
-/**
- * Return the closest point of the geometry to the passed point as
- * {@link ol.Coordinate coordinate}.
- * @param {ol.Coordinate} point Point.
- * @param {ol.Coordinate=} opt_closestPoint Closest point.
- * @return {ol.Coordinate} Closest point.
- * @api
- */
-ol.geom.Geometry.prototype.getClosestPoint = function(point, opt_closestPoint) {
-  var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];
-  this.closestPointXY(point[0], point[1], closestPoint, Infinity);
-  return closestPoint;
-};
-
-
-/**
- * Returns true if this geometry includes the specified coordinate. If the
- * coordinate is on the boundary of the geometry, returns false.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @return {boolean} Contains coordinate.
- * @api
- */
-ol.geom.Geometry.prototype.intersectsCoordinate = function(coordinate) {
-  return this.containsXY(coordinate[0], coordinate[1]);
-};
-
-
-/**
- * @abstract
- * @param {ol.Extent} extent Extent.
- * @protected
- * @return {ol.Extent} extent Extent.
- */
-ol.geom.Geometry.prototype.computeExtent = function(extent) {};
-
-
-/**
- * @param {number} x X.
- * @param {number} y Y.
- * @return {boolean} Contains (x, y).
- */
-ol.geom.Geometry.prototype.containsXY = ol.functions.FALSE;
-
-
-/**
- * Get the extent of the geometry.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} extent Extent.
- * @api
- */
-ol.geom.Geometry.prototype.getExtent = function(opt_extent) {
-  if (this.extentRevision_ != this.getRevision()) {
-    this.extent_ = this.computeExtent(this.extent_);
-    this.extentRevision_ = this.getRevision();
-  }
-  return ol.extent.returnOrUpdate(this.extent_, opt_extent);
-};
-
-
-/**
- * Rotate the geometry around a given coordinate. This modifies the geometry
- * coordinates in place.
- * @abstract
- * @param {number} angle Rotation angle in radians.
- * @param {ol.Coordinate} anchor The rotation center.
- * @api
- */
-ol.geom.Geometry.prototype.rotate = function(angle, anchor) {};
-
-
-/**
- * Scale the geometry (with an optional origin).  This modifies the geometry
- * coordinates in place.
- * @abstract
- * @param {number} sx The scaling factor in the x-direction.
- * @param {number=} opt_sy The scaling factor in the y-direction (defaults to
- *     sx).
- * @param {ol.Coordinate=} opt_anchor The scale origin (defaults to the center
- *     of the geometry extent).
- * @api
- */
-ol.geom.Geometry.prototype.scale = function(sx, opt_sy, opt_anchor) {};
-
-
-/**
- * Create a simplified version of this geometry.  For linestrings, this uses
- * the the {@link
- * https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
- * Douglas Peucker} algorithm.  For polygons, a quantization-based
- * simplification is used to preserve topology.
- * @function
- * @param {number} tolerance The tolerance distance for simplification.
- * @return {ol.geom.Geometry} A new, simplified version of the original
- *     geometry.
- * @api
- */
-ol.geom.Geometry.prototype.simplify = function(tolerance) {
-  return this.getSimplifiedGeometry(tolerance * tolerance);
-};
-
-
-/**
- * Create a simplified version of this geometry using the Douglas Peucker
- * algorithm.
- * @see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
- * @abstract
- * @param {number} squaredTolerance Squared tolerance.
- * @return {ol.geom.Geometry} Simplified geometry.
- */
-ol.geom.Geometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {};
-
-
-/**
- * Get the type of this geometry.
- * @abstract
- * @return {ol.geom.GeometryType} Geometry type.
- */
-ol.geom.Geometry.prototype.getType = function() {};
-
-
-/**
- * Apply a transform function to each coordinate of the geometry.
- * The geometry is modified in place.
- * If you do not want the geometry modified in place, first `clone()` it and
- * then use this function on the clone.
- * @abstract
- * @param {ol.TransformFunction} transformFn Transform.
- */
-ol.geom.Geometry.prototype.applyTransform = function(transformFn) {};
-
-
-/**
- * Test if the geometry and the passed extent intersect.
- * @abstract
- * @param {ol.Extent} extent Extent.
- * @return {boolean} `true` if the geometry and the extent intersect.
- */
-ol.geom.Geometry.prototype.intersectsExtent = function(extent) {};
-
-
-/**
- * Translate the geometry.  This modifies the geometry coordinates in place.  If
- * instead you want a new geometry, first `clone()` this geometry.
- * @abstract
- * @param {number} deltaX Delta X.
- * @param {number} deltaY Delta Y.
- */
-ol.geom.Geometry.prototype.translate = function(deltaX, deltaY) {};
-
-
-/**
- * Transform each coordinate of the geometry from one coordinate reference
- * system to another. The geometry is modified in place.
- * For example, a line will be transformed to a line and a circle to a circle.
- * If you do not want the geometry modified in place, first `clone()` it and
- * then use this function on the clone.
- *
- * @param {ol.ProjectionLike} source The current projection.  Can be a
- *     string identifier or a {@link ol.proj.Projection} object.
- * @param {ol.ProjectionLike} destination The desired projection.  Can be a
- *     string identifier or a {@link ol.proj.Projection} object.
- * @return {ol.geom.Geometry} This geometry.  Note that original geometry is
- *     modified in place.
- * @api
- */
-ol.geom.Geometry.prototype.transform = function(source, destination) {
-  this.applyTransform(ol.proj.getTransform(source, destination));
-  return this;
-};
-
-goog.provide('ol.geom.flat.transform');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.Transform} transform Transform.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Transformed coordinates.
- */
-ol.geom.flat.transform.transform2D = function(flatCoordinates, offset, end, stride, transform, opt_dest) {
-  var dest = opt_dest ? opt_dest : [];
-  var i = 0;
-  var j;
-  for (j = offset; j < end; j += stride) {
-    var x = flatCoordinates[j];
-    var y = flatCoordinates[j + 1];
-    dest[i++] = transform[0] * x + transform[2] * y + transform[4];
-    dest[i++] = transform[1] * x + transform[3] * y + transform[5];
-  }
-  if (opt_dest && dest.length != i) {
-    dest.length = i;
-  }
-  return dest;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} angle Angle.
- * @param {Array.<number>} anchor Rotation anchor point.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Transformed coordinates.
- */
-ol.geom.flat.transform.rotate = function(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) {
-  var dest = opt_dest ? opt_dest : [];
-  var cos = Math.cos(angle);
-  var sin = Math.sin(angle);
-  var anchorX = anchor[0];
-  var anchorY = anchor[1];
-  var i = 0;
-  for (var j = offset; j < end; j += stride) {
-    var deltaX = flatCoordinates[j] - anchorX;
-    var deltaY = flatCoordinates[j + 1] - anchorY;
-    dest[i++] = anchorX + deltaX * cos - deltaY * sin;
-    dest[i++] = anchorY + deltaX * sin + deltaY * cos;
-    for (var k = j + 2; k < j + stride; ++k) {
-      dest[i++] = flatCoordinates[k];
-    }
-  }
-  if (opt_dest && dest.length != i) {
-    dest.length = i;
-  }
-  return dest;
-};
-
-
-/**
- * Scale the coordinates.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} sx Scale factor in the x-direction.
- * @param {number} sy Scale factor in the y-direction.
- * @param {Array.<number>} anchor Scale anchor point.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Transformed coordinates.
- */
-ol.geom.flat.transform.scale = function(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) {
-  var dest = opt_dest ? opt_dest : [];
-  var anchorX = anchor[0];
-  var anchorY = anchor[1];
-  var i = 0;
-  for (var j = offset; j < end; j += stride) {
-    var deltaX = flatCoordinates[j] - anchorX;
-    var deltaY = flatCoordinates[j + 1] - anchorY;
-    dest[i++] = anchorX + sx * deltaX;
-    dest[i++] = anchorY + sy * deltaY;
-    for (var k = j + 2; k < j + stride; ++k) {
-      dest[i++] = flatCoordinates[k];
-    }
-  }
-  if (opt_dest && dest.length != i) {
-    dest.length = i;
-  }
-  return dest;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} deltaX Delta X.
- * @param {number} deltaY Delta Y.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Transformed coordinates.
- */
-ol.geom.flat.transform.translate = function(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {
-  var dest = opt_dest ? opt_dest : [];
-  var i = 0;
-  var j, k;
-  for (j = offset; j < end; j += stride) {
-    dest[i++] = flatCoordinates[j] + deltaX;
-    dest[i++] = flatCoordinates[j + 1] + deltaY;
-    for (k = j + 2; k < j + stride; ++k) {
-      dest[i++] = flatCoordinates[k];
-    }
-  }
-  if (opt_dest && dest.length != i) {
-    dest.length = i;
-  }
-  return dest;
-};
-
-goog.provide('ol.geom.SimpleGeometry');
-
-goog.require('ol');
-goog.require('ol.functions');
-goog.require('ol.extent');
-goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Abstract base class; only used for creating subclasses; do not instantiate
- * in apps, as cannot be rendered.
- *
- * @constructor
- * @abstract
- * @extends {ol.geom.Geometry}
- * @api
- */
-ol.geom.SimpleGeometry = function() {
-
-  ol.geom.Geometry.call(this);
-
-  /**
-   * @protected
-   * @type {ol.geom.GeometryLayout}
-   */
-  this.layout = ol.geom.GeometryLayout.XY;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.stride = 2;
-
-  /**
-   * @protected
-   * @type {Array.<number>}
-   */
-  this.flatCoordinates = null;
-
-};
-ol.inherits(ol.geom.SimpleGeometry, ol.geom.Geometry);
-
-
-/**
- * @param {number} stride Stride.
- * @private
- * @return {ol.geom.GeometryLayout} layout Layout.
- */
-ol.geom.SimpleGeometry.getLayoutForStride_ = function(stride) {
-  var layout;
-  if (stride == 2) {
-    layout = ol.geom.GeometryLayout.XY;
-  } else if (stride == 3) {
-    layout = ol.geom.GeometryLayout.XYZ;
-  } else if (stride == 4) {
-    layout = ol.geom.GeometryLayout.XYZM;
-  }
-  return /** @type {ol.geom.GeometryLayout} */ (layout);
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @return {number} Stride.
- */
-ol.geom.SimpleGeometry.getStrideForLayout = function(layout) {
-  var stride;
-  if (layout == ol.geom.GeometryLayout.XY) {
-    stride = 2;
-  } else if (layout == ol.geom.GeometryLayout.XYZ || layout == ol.geom.GeometryLayout.XYM) {
-    stride = 3;
-  } else if (layout == ol.geom.GeometryLayout.XYZM) {
-    stride = 4;
-  }
-  return /** @type {number} */ (stride);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.SimpleGeometry.prototype.containsXY = ol.functions.FALSE;
-
-
-/**
- * @inheritDoc
- */
-ol.geom.SimpleGeometry.prototype.computeExtent = function(extent) {
-  return ol.extent.createOrUpdateFromFlatCoordinates(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      extent);
-};
-
-
-/**
- * @abstract
- * @return {Array} Coordinates.
- */
-ol.geom.SimpleGeometry.prototype.getCoordinates = function() {};
-
-
-/**
- * Return the first coordinate of the geometry.
- * @return {ol.Coordinate} First coordinate.
- * @api
- */
-ol.geom.SimpleGeometry.prototype.getFirstCoordinate = function() {
-  return this.flatCoordinates.slice(0, this.stride);
-};
-
-
-/**
- * @return {Array.<number>} Flat coordinates.
- */
-ol.geom.SimpleGeometry.prototype.getFlatCoordinates = function() {
-  return this.flatCoordinates;
-};
-
-
-/**
- * Return the last coordinate of the geometry.
- * @return {ol.Coordinate} Last point.
- * @api
- */
-ol.geom.SimpleGeometry.prototype.getLastCoordinate = function() {
-  return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);
-};
-
-
-/**
- * Return the {@link ol.geom.GeometryLayout layout} of the geometry.
- * @return {ol.geom.GeometryLayout} Layout.
- * @api
- */
-ol.geom.SimpleGeometry.prototype.getLayout = function() {
-  return this.layout;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {
-  if (this.simplifiedGeometryRevision != this.getRevision()) {
-    ol.obj.clear(this.simplifiedGeometryCache);
-    this.simplifiedGeometryMaxMinSquaredTolerance = 0;
-    this.simplifiedGeometryRevision = this.getRevision();
-  }
-  // If squaredTolerance is negative or if we know that simplification will not
-  // have any effect then just return this.
-  if (squaredTolerance < 0 ||
-      (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&
-       squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)) {
-    return this;
-  }
-  var key = squaredTolerance.toString();
-  if (this.simplifiedGeometryCache.hasOwnProperty(key)) {
-    return this.simplifiedGeometryCache[key];
-  } else {
-    var simplifiedGeometry =
-        this.getSimplifiedGeometryInternal(squaredTolerance);
-    var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();
-    if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {
-      this.simplifiedGeometryCache[key] = simplifiedGeometry;
-      return simplifiedGeometry;
-    } else {
-      // Simplification did not actually remove any coordinates.  We now know
-      // that any calls to getSimplifiedGeometry with a squaredTolerance less
-      // than or equal to the current squaredTolerance will also not have any
-      // effect.  This allows us to short circuit simplification (saving CPU
-      // cycles) and prevents the cache of simplified geometries from filling
-      // up with useless identical copies of this geometry (saving memory).
-      this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;
-      return this;
-    }
-  }
-};
-
-
-/**
- * @param {number} squaredTolerance Squared tolerance.
- * @return {ol.geom.SimpleGeometry} Simplified geometry.
- * @protected
- */
-ol.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  return this;
-};
-
-
-/**
- * @return {number} Stride.
- */
-ol.geom.SimpleGeometry.prototype.getStride = function() {
-  return this.stride;
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @protected
- */
-ol.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal = function(layout, flatCoordinates) {
-  this.stride = ol.geom.SimpleGeometry.getStrideForLayout(layout);
-  this.layout = layout;
-  this.flatCoordinates = flatCoordinates;
-};
-
-
-/**
- * @abstract
- * @param {Array} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- */
-ol.geom.SimpleGeometry.prototype.setCoordinates = function(coordinates, opt_layout) {};
-
-
-/**
- * @param {ol.geom.GeometryLayout|undefined} layout Layout.
- * @param {Array} coordinates Coordinates.
- * @param {number} nesting Nesting.
- * @protected
- */
-ol.geom.SimpleGeometry.prototype.setLayout = function(layout, coordinates, nesting) {
-  /** @type {number} */
-  var stride;
-  if (layout) {
-    stride = ol.geom.SimpleGeometry.getStrideForLayout(layout);
-  } else {
-    var i;
-    for (i = 0; i < nesting; ++i) {
-      if (coordinates.length === 0) {
-        this.layout = ol.geom.GeometryLayout.XY;
-        this.stride = 2;
-        return;
-      } else {
-        coordinates = /** @type {Array} */ (coordinates[0]);
-      }
-    }
-    stride = coordinates.length;
-    layout = ol.geom.SimpleGeometry.getLayoutForStride_(stride);
-  }
-  this.layout = layout;
-  this.stride = stride;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.SimpleGeometry.prototype.applyTransform = function(transformFn) {
-  if (this.flatCoordinates) {
-    transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);
-    this.changed();
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.SimpleGeometry.prototype.rotate = function(angle, anchor) {
-  var flatCoordinates = this.getFlatCoordinates();
-  if (flatCoordinates) {
-    var stride = this.getStride();
-    ol.geom.flat.transform.rotate(
-        flatCoordinates, 0, flatCoordinates.length,
-        stride, angle, anchor, flatCoordinates);
-    this.changed();
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.SimpleGeometry.prototype.scale = function(sx, opt_sy, opt_anchor) {
-  var sy = opt_sy;
-  if (sy === undefined) {
-    sy = sx;
-  }
-  var anchor = opt_anchor;
-  if (!anchor) {
-    anchor = ol.extent.getCenter(this.getExtent());
-  }
-  var flatCoordinates = this.getFlatCoordinates();
-  if (flatCoordinates) {
-    var stride = this.getStride();
-    ol.geom.flat.transform.scale(
-        flatCoordinates, 0, flatCoordinates.length,
-        stride, sx, sy, anchor, flatCoordinates);
-    this.changed();
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.SimpleGeometry.prototype.translate = function(deltaX, deltaY) {
-  var flatCoordinates = this.getFlatCoordinates();
-  if (flatCoordinates) {
-    var stride = this.getStride();
-    ol.geom.flat.transform.translate(
-        flatCoordinates, 0, flatCoordinates.length, stride,
-        deltaX, deltaY, flatCoordinates);
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.SimpleGeometry} simpleGeometry Simple geometry.
- * @param {ol.Transform} transform Transform.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Transformed flat coordinates.
- */
-ol.geom.SimpleGeometry.transform2D = function(simpleGeometry, transform, opt_dest) {
-  var flatCoordinates = simpleGeometry.getFlatCoordinates();
-  if (!flatCoordinates) {
-    return null;
-  } else {
-    var stride = simpleGeometry.getStride();
-    return ol.geom.flat.transform.transform2D(
-        flatCoordinates, 0, flatCoordinates.length, stride,
-        transform, opt_dest);
-  }
-};
-
-goog.provide('ol.geom.flat.area');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {number} Area.
- */
-ol.geom.flat.area.linearRing = function(flatCoordinates, offset, end, stride) {
-  var twiceArea = 0;
-  var x1 = flatCoordinates[end - stride];
-  var y1 = flatCoordinates[end - stride + 1];
-  for (; offset < end; offset += stride) {
-    var x2 = flatCoordinates[offset];
-    var y2 = flatCoordinates[offset + 1];
-    twiceArea += y1 * x2 - x1 * y2;
-    x1 = x2;
-    y1 = y2;
-  }
-  return twiceArea / 2;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @return {number} Area.
- */
-ol.geom.flat.area.linearRings = function(flatCoordinates, offset, ends, stride) {
-  var area = 0;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    area += ol.geom.flat.area.linearRing(flatCoordinates, offset, end, stride);
-    offset = end;
-  }
-  return area;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @return {number} Area.
- */
-ol.geom.flat.area.linearRingss = function(flatCoordinates, offset, endss, stride) {
-  var area = 0;
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    area +=
-        ol.geom.flat.area.linearRings(flatCoordinates, offset, ends, stride);
-    offset = ends[ends.length - 1];
-  }
-  return area;
-};
-
-goog.provide('ol.geom.flat.closest');
-
-goog.require('ol.math');
-
-
-/**
- * Returns the point on the 2D line segment flatCoordinates[offset1] to
- * flatCoordinates[offset2] that is closest to the point (x, y).  Extra
- * dimensions are linearly interpolated.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset1 Offset 1.
- * @param {number} offset2 Offset 2.
- * @param {number} stride Stride.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {Array.<number>} closestPoint Closest point.
- */
-ol.geom.flat.closest.point = function(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {
-  var x1 = flatCoordinates[offset1];
-  var y1 = flatCoordinates[offset1 + 1];
-  var dx = flatCoordinates[offset2] - x1;
-  var dy = flatCoordinates[offset2 + 1] - y1;
-  var i, offset;
-  if (dx === 0 && dy === 0) {
-    offset = offset1;
-  } else {
-    var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);
-    if (t > 1) {
-      offset = offset2;
-    } else if (t > 0) {
-      for (i = 0; i < stride; ++i) {
-        closestPoint[i] = ol.math.lerp(flatCoordinates[offset1 + i],
-            flatCoordinates[offset2 + i], t);
-      }
-      closestPoint.length = stride;
-      return;
-    } else {
-      offset = offset1;
-    }
-  }
-  for (i = 0; i < stride; ++i) {
-    closestPoint[i] = flatCoordinates[offset + i];
-  }
-  closestPoint.length = stride;
-};
-
-
-/**
- * Return the squared of the largest distance between any pair of consecutive
- * coordinates.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} maxSquaredDelta Max squared delta.
- * @return {number} Max squared delta.
- */
-ol.geom.flat.closest.getMaxSquaredDelta = function(flatCoordinates, offset, end, stride, maxSquaredDelta) {
-  var x1 = flatCoordinates[offset];
-  var y1 = flatCoordinates[offset + 1];
-  for (offset += stride; offset < end; offset += stride) {
-    var x2 = flatCoordinates[offset];
-    var y2 = flatCoordinates[offset + 1];
-    var squaredDelta = ol.math.squaredDistance(x1, y1, x2, y2);
-    if (squaredDelta > maxSquaredDelta) {
-      maxSquaredDelta = squaredDelta;
-    }
-    x1 = x2;
-    y1 = y2;
-  }
-  return maxSquaredDelta;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} maxSquaredDelta Max squared delta.
- * @return {number} Max squared delta.
- */
-ol.geom.flat.closest.getsMaxSquaredDelta = function(flatCoordinates, offset, ends, stride, maxSquaredDelta) {
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    maxSquaredDelta = ol.geom.flat.closest.getMaxSquaredDelta(
-        flatCoordinates, offset, end, stride, maxSquaredDelta);
-    offset = end;
-  }
-  return maxSquaredDelta;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {number} maxSquaredDelta Max squared delta.
- * @return {number} Max squared delta.
- */
-ol.geom.flat.closest.getssMaxSquaredDelta = function(flatCoordinates, offset, endss, stride, maxSquaredDelta) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    maxSquaredDelta = ol.geom.flat.closest.getsMaxSquaredDelta(
-        flatCoordinates, offset, ends, stride, maxSquaredDelta);
-    offset = ends[ends.length - 1];
-  }
-  return maxSquaredDelta;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} maxDelta Max delta.
- * @param {boolean} isRing Is ring.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {Array.<number>} closestPoint Closest point.
- * @param {number} minSquaredDistance Minimum squared distance.
- * @param {Array.<number>=} opt_tmpPoint Temporary point object.
- * @return {number} Minimum squared distance.
- */
-ol.geom.flat.closest.getClosestPoint = function(flatCoordinates, offset, end,
-    stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,
-    opt_tmpPoint) {
-  if (offset == end) {
-    return minSquaredDistance;
-  }
-  var i, squaredDistance;
-  if (maxDelta === 0) {
-    // All points are identical, so just test the first point.
-    squaredDistance = ol.math.squaredDistance(
-        x, y, flatCoordinates[offset], flatCoordinates[offset + 1]);
-    if (squaredDistance < minSquaredDistance) {
-      for (i = 0; i < stride; ++i) {
-        closestPoint[i] = flatCoordinates[offset + i];
-      }
-      closestPoint.length = stride;
-      return squaredDistance;
-    } else {
-      return minSquaredDistance;
-    }
-  }
-  var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];
-  var index = offset + stride;
-  while (index < end) {
-    ol.geom.flat.closest.point(
-        flatCoordinates, index - stride, index, stride, x, y, tmpPoint);
-    squaredDistance = ol.math.squaredDistance(x, y, tmpPoint[0], tmpPoint[1]);
-    if (squaredDistance < minSquaredDistance) {
-      minSquaredDistance = squaredDistance;
-      for (i = 0; i < stride; ++i) {
-        closestPoint[i] = tmpPoint[i];
-      }
-      closestPoint.length = stride;
-      index += stride;
-    } else {
-      // Skip ahead multiple points, because we know that all the skipped
-      // points cannot be any closer than the closest point we have found so
-      // far.  We know this because we know how close the current point is, how
-      // close the closest point we have found so far is, and the maximum
-      // distance between consecutive points.  For example, if we're currently
-      // at distance 10, the best we've found so far is 3, and that the maximum
-      // distance between consecutive points is 2, then we'll need to skip at
-      // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of
-      // finding a closer point.  We use Math.max(..., 1) to ensure that we
-      // always advance at least one point, to avoid an infinite loop.
-      index += stride * Math.max(
-          ((Math.sqrt(squaredDistance) -
-            Math.sqrt(minSquaredDistance)) / maxDelta) | 0, 1);
-    }
-  }
-  if (isRing) {
-    // Check the closing segment.
-    ol.geom.flat.closest.point(
-        flatCoordinates, end - stride, offset, stride, x, y, tmpPoint);
-    squaredDistance = ol.math.squaredDistance(x, y, tmpPoint[0], tmpPoint[1]);
-    if (squaredDistance < minSquaredDistance) {
-      minSquaredDistance = squaredDistance;
-      for (i = 0; i < stride; ++i) {
-        closestPoint[i] = tmpPoint[i];
-      }
-      closestPoint.length = stride;
-    }
-  }
-  return minSquaredDistance;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} maxDelta Max delta.
- * @param {boolean} isRing Is ring.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {Array.<number>} closestPoint Closest point.
- * @param {number} minSquaredDistance Minimum squared distance.
- * @param {Array.<number>=} opt_tmpPoint Temporary point object.
- * @return {number} Minimum squared distance.
- */
-ol.geom.flat.closest.getsClosestPoint = function(flatCoordinates, offset, ends,
-    stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,
-    opt_tmpPoint) {
-  var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    minSquaredDistance = ol.geom.flat.closest.getClosestPoint(
-        flatCoordinates, offset, end, stride,
-        maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);
-    offset = end;
-  }
-  return minSquaredDistance;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {number} maxDelta Max delta.
- * @param {boolean} isRing Is ring.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {Array.<number>} closestPoint Closest point.
- * @param {number} minSquaredDistance Minimum squared distance.
- * @param {Array.<number>=} opt_tmpPoint Temporary point object.
- * @return {number} Minimum squared distance.
- */
-ol.geom.flat.closest.getssClosestPoint = function(flatCoordinates, offset,
-    endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,
-    opt_tmpPoint) {
-  var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    minSquaredDistance = ol.geom.flat.closest.getsClosestPoint(
-        flatCoordinates, offset, ends, stride,
-        maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);
-    offset = ends[ends.length - 1];
-  }
-  return minSquaredDistance;
-};
-
-goog.provide('ol.geom.flat.deflate');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} stride Stride.
- * @return {number} offset Offset.
- */
-ol.geom.flat.deflate.coordinate = function(flatCoordinates, offset, coordinate, stride) {
-  var i, ii;
-  for (i = 0, ii = coordinate.length; i < ii; ++i) {
-    flatCoordinates[offset++] = coordinate[i];
-  }
-  return offset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {number} stride Stride.
- * @return {number} offset Offset.
- */
-ol.geom.flat.deflate.coordinates = function(flatCoordinates, offset, coordinates, stride) {
-  var i, ii;
-  for (i = 0, ii = coordinates.length; i < ii; ++i) {
-    var coordinate = coordinates[i];
-    var j;
-    for (j = 0; j < stride; ++j) {
-      flatCoordinates[offset++] = coordinate[j];
-    }
-  }
-  return offset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<ol.Coordinate>>} coordinatess Coordinatess.
- * @param {number} stride Stride.
- * @param {Array.<number>=} opt_ends Ends.
- * @return {Array.<number>} Ends.
- */
-ol.geom.flat.deflate.coordinatess = function(flatCoordinates, offset, coordinatess, stride, opt_ends) {
-  var ends = opt_ends ? opt_ends : [];
-  var i = 0;
-  var j, jj;
-  for (j = 0, jj = coordinatess.length; j < jj; ++j) {
-    var end = ol.geom.flat.deflate.coordinates(
-        flatCoordinates, offset, coordinatess[j], stride);
-    ends[i++] = end;
-    offset = end;
-  }
-  ends.length = i;
-  return ends;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinatesss Coordinatesss.
- * @param {number} stride Stride.
- * @param {Array.<Array.<number>>=} opt_endss Endss.
- * @return {Array.<Array.<number>>} Endss.
- */
-ol.geom.flat.deflate.coordinatesss = function(flatCoordinates, offset, coordinatesss, stride, opt_endss) {
-  var endss = opt_endss ? opt_endss : [];
-  var i = 0;
-  var j, jj;
-  for (j = 0, jj = coordinatesss.length; j < jj; ++j) {
-    var ends = ol.geom.flat.deflate.coordinatess(
-        flatCoordinates, offset, coordinatesss[j], stride, endss[i]);
-    endss[i++] = ends;
-    offset = ends[ends.length - 1];
-  }
-  endss.length = i;
-  return endss;
-};
-
-goog.provide('ol.geom.flat.inflate');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {Array.<ol.Coordinate>=} opt_coordinates Coordinates.
- * @return {Array.<ol.Coordinate>} Coordinates.
- */
-ol.geom.flat.inflate.coordinates = function(flatCoordinates, offset, end, stride, opt_coordinates) {
-  var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
-  var i = 0;
-  var j;
-  for (j = offset; j < end; j += stride) {
-    coordinates[i++] = flatCoordinates.slice(j, j + stride);
-  }
-  coordinates.length = i;
-  return coordinates;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {Array.<Array.<ol.Coordinate>>=} opt_coordinatess Coordinatess.
- * @return {Array.<Array.<ol.Coordinate>>} Coordinatess.
- */
-ol.geom.flat.inflate.coordinatess = function(flatCoordinates, offset, ends, stride, opt_coordinatess) {
-  var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
-  var i = 0;
-  var j, jj;
-  for (j = 0, jj = ends.length; j < jj; ++j) {
-    var end = ends[j];
-    coordinatess[i++] = ol.geom.flat.inflate.coordinates(
-        flatCoordinates, offset, end, stride, coordinatess[i]);
-    offset = end;
-  }
-  coordinatess.length = i;
-  return coordinatess;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {Array.<Array.<Array.<ol.Coordinate>>>=} opt_coordinatesss
- *     Coordinatesss.
- * @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinatesss.
- */
-ol.geom.flat.inflate.coordinatesss = function(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
-  var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
-  var i = 0;
-  var j, jj;
-  for (j = 0, jj = endss.length; j < jj; ++j) {
-    var ends = endss[j];
-    coordinatesss[i++] = ol.geom.flat.inflate.coordinatess(
-        flatCoordinates, offset, ends, stride, coordinatesss[i]);
-    offset = ends[ends.length - 1];
-  }
-  coordinatesss.length = i;
-  return coordinatesss;
-};
-
-// Based on simplify-js https://github.com/mourner/simplify-js
-// Copyright (c) 2012, Vladimir Agafonkin
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//    1. Redistributions of source code must retain the above copyright notice,
-//       this list of conditions and the following disclaimer.
-//
-//    2. Redistributions in binary form must reproduce the above copyright
-//       notice, this list of conditions and the following disclaimer in the
-//       documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.geom.flat.simplify');
-
-goog.require('ol.math');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {boolean} highQuality Highest quality.
- * @param {Array.<number>=} opt_simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @return {Array.<number>} Simplified line string.
- */
-ol.geom.flat.simplify.lineString = function(flatCoordinates, offset, end,
-    stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) {
-  var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined ?
-      opt_simplifiedFlatCoordinates : [];
-  if (!highQuality) {
-    end = ol.geom.flat.simplify.radialDistance(flatCoordinates, offset, end,
-        stride, squaredTolerance,
-        simplifiedFlatCoordinates, 0);
-    flatCoordinates = simplifiedFlatCoordinates;
-    offset = 0;
-    stride = 2;
-  }
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
-      flatCoordinates, offset, end, stride, squaredTolerance,
-      simplifiedFlatCoordinates, 0);
-  return simplifiedFlatCoordinates;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.douglasPeucker = function(flatCoordinates, offset, end,
-    stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {
-  var n = (end - offset) / stride;
-  if (n < 3) {
-    for (; offset < end; offset += stride) {
-      simplifiedFlatCoordinates[simplifiedOffset++] =
-          flatCoordinates[offset];
-      simplifiedFlatCoordinates[simplifiedOffset++] =
-          flatCoordinates[offset + 1];
-    }
-    return simplifiedOffset;
-  }
-  /** @type {Array.<number>} */
-  var markers = new Array(n);
-  markers[0] = 1;
-  markers[n - 1] = 1;
-  /** @type {Array.<number>} */
-  var stack = [offset, end - stride];
-  var index = 0;
-  var i;
-  while (stack.length > 0) {
-    var last = stack.pop();
-    var first = stack.pop();
-    var maxSquaredDistance = 0;
-    var x1 = flatCoordinates[first];
-    var y1 = flatCoordinates[first + 1];
-    var x2 = flatCoordinates[last];
-    var y2 = flatCoordinates[last + 1];
-    for (i = first + stride; i < last; i += stride) {
-      var x = flatCoordinates[i];
-      var y = flatCoordinates[i + 1];
-      var squaredDistance = ol.math.squaredSegmentDistance(
-          x, y, x1, y1, x2, y2);
-      if (squaredDistance > maxSquaredDistance) {
-        index = i;
-        maxSquaredDistance = squaredDistance;
-      }
-    }
-    if (maxSquaredDistance > squaredTolerance) {
-      markers[(index - offset) / stride] = 1;
-      if (first + stride < index) {
-        stack.push(first, index);
-      }
-      if (index + stride < last) {
-        stack.push(index, last);
-      }
-    }
-  }
-  for (i = 0; i < n; ++i) {
-    if (markers[i]) {
-      simplifiedFlatCoordinates[simplifiedOffset++] =
-          flatCoordinates[offset + i * stride];
-      simplifiedFlatCoordinates[simplifiedOffset++] =
-          flatCoordinates[offset + i * stride + 1];
-    }
-  }
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @param {Array.<number>} simplifiedEnds Simplified ends.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.douglasPeuckers = function(flatCoordinates, offset,
-    ends, stride, squaredTolerance, simplifiedFlatCoordinates,
-    simplifiedOffset, simplifiedEnds) {
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    simplifiedOffset = ol.geom.flat.simplify.douglasPeucker(
-        flatCoordinates, offset, end, stride, squaredTolerance,
-        simplifiedFlatCoordinates, simplifiedOffset);
-    simplifiedEnds.push(simplifiedOffset);
-    offset = end;
-  }
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @param {Array.<Array.<number>>} simplifiedEndss Simplified endss.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.douglasPeuckerss = function(
-    flatCoordinates, offset, endss, stride, squaredTolerance,
-    simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    var simplifiedEnds = [];
-    simplifiedOffset = ol.geom.flat.simplify.douglasPeuckers(
-        flatCoordinates, offset, ends, stride, squaredTolerance,
-        simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);
-    simplifiedEndss.push(simplifiedEnds);
-    offset = ends[ends.length - 1];
-  }
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.radialDistance = function(flatCoordinates, offset, end,
-    stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {
-  if (end <= offset + stride) {
-    // zero or one point, no simplification possible, so copy and return
-    for (; offset < end; offset += stride) {
-      simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];
-      simplifiedFlatCoordinates[simplifiedOffset++] =
-          flatCoordinates[offset + 1];
-    }
-    return simplifiedOffset;
-  }
-  var x1 = flatCoordinates[offset];
-  var y1 = flatCoordinates[offset + 1];
-  // copy first point
-  simplifiedFlatCoordinates[simplifiedOffset++] = x1;
-  simplifiedFlatCoordinates[simplifiedOffset++] = y1;
-  var x2 = x1;
-  var y2 = y1;
-  for (offset += stride; offset < end; offset += stride) {
-    x2 = flatCoordinates[offset];
-    y2 = flatCoordinates[offset + 1];
-    if (ol.math.squaredDistance(x1, y1, x2, y2) > squaredTolerance) {
-      // copy point at offset
-      simplifiedFlatCoordinates[simplifiedOffset++] = x2;
-      simplifiedFlatCoordinates[simplifiedOffset++] = y2;
-      x1 = x2;
-      y1 = y2;
-    }
-  }
-  if (x2 != x1 || y2 != y1) {
-    // copy last point
-    simplifiedFlatCoordinates[simplifiedOffset++] = x2;
-    simplifiedFlatCoordinates[simplifiedOffset++] = y2;
-  }
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {number} value Value.
- * @param {number} tolerance Tolerance.
- * @return {number} Rounded value.
- */
-ol.geom.flat.simplify.snap = function(value, tolerance) {
-  return tolerance * Math.round(value / tolerance);
-};
-
-
-/**
- * Simplifies a line string using an algorithm designed by Tim Schaub.
- * Coordinates are snapped to the nearest value in a virtual grid and
- * consecutive duplicate coordinates are discarded.  This effectively preserves
- * topology as the simplification of any subsection of a line string is
- * independent of the rest of the line string.  This means that, for examples,
- * the common edge between two polygons will be simplified to the same line
- * string independently in both polygons.  This implementation uses a single
- * pass over the coordinates and eliminates intermediate collinear points.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} tolerance Tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.quantize = function(flatCoordinates, offset, end, stride,
-    tolerance, simplifiedFlatCoordinates, simplifiedOffset) {
-  // do nothing if the line is empty
-  if (offset == end) {
-    return simplifiedOffset;
-  }
-  // snap the first coordinate (P1)
-  var x1 = ol.geom.flat.simplify.snap(flatCoordinates[offset], tolerance);
-  var y1 = ol.geom.flat.simplify.snap(flatCoordinates[offset + 1], tolerance);
-  offset += stride;
-  // add the first coordinate to the output
-  simplifiedFlatCoordinates[simplifiedOffset++] = x1;
-  simplifiedFlatCoordinates[simplifiedOffset++] = y1;
-  // find the next coordinate that does not snap to the same value as the first
-  // coordinate (P2)
-  var x2, y2;
-  do {
-    x2 = ol.geom.flat.simplify.snap(flatCoordinates[offset], tolerance);
-    y2 = ol.geom.flat.simplify.snap(flatCoordinates[offset + 1], tolerance);
-    offset += stride;
-    if (offset == end) {
-      // all coordinates snap to the same value, the line collapses to a point
-      // push the last snapped value anyway to ensure that the output contains
-      // at least two points
-      // FIXME should we really return at least two points anyway?
-      simplifiedFlatCoordinates[simplifiedOffset++] = x2;
-      simplifiedFlatCoordinates[simplifiedOffset++] = y2;
-      return simplifiedOffset;
-    }
-  } while (x2 == x1 && y2 == y1);
-  while (offset < end) {
-    var x3, y3;
-    // snap the next coordinate (P3)
-    x3 = ol.geom.flat.simplify.snap(flatCoordinates[offset], tolerance);
-    y3 = ol.geom.flat.simplify.snap(flatCoordinates[offset + 1], tolerance);
-    offset += stride;
-    // skip P3 if it is equal to P2
-    if (x3 == x2 && y3 == y2) {
-      continue;
-    }
-    // calculate the delta between P1 and P2
-    var dx1 = x2 - x1;
-    var dy1 = y2 - y1;
-    // calculate the delta between P3 and P1
-    var dx2 = x3 - x1;
-    var dy2 = y3 - y1;
-    // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from
-    // P1 in the same direction then P2 is on the straight line between P1 and
-    // P3
-    if ((dx1 * dy2 == dy1 * dx2) &&
-        ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&
-        ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))) {
-      // discard P2 and set P2 = P3
-      x2 = x3;
-      y2 = y3;
-      continue;
-    }
-    // either P1, P2, and P3 are not colinear, or they are colinear but P3 is
-    // between P3 and P1 or on the opposite half of the line to P2.  add P2,
-    // and continue with P1 = P2 and P2 = P3
-    simplifiedFlatCoordinates[simplifiedOffset++] = x2;
-    simplifiedFlatCoordinates[simplifiedOffset++] = y2;
-    x1 = x2;
-    y1 = y2;
-    x2 = x3;
-    y2 = y3;
-  }
-  // add the last point (P2)
-  simplifiedFlatCoordinates[simplifiedOffset++] = x2;
-  simplifiedFlatCoordinates[simplifiedOffset++] = y2;
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} tolerance Tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @param {Array.<number>} simplifiedEnds Simplified ends.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.quantizes = function(
-    flatCoordinates, offset, ends, stride,
-    tolerance,
-    simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    simplifiedOffset = ol.geom.flat.simplify.quantize(
-        flatCoordinates, offset, end, stride,
-        tolerance,
-        simplifiedFlatCoordinates, simplifiedOffset);
-    simplifiedEnds.push(simplifiedOffset);
-    offset = end;
-  }
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {number} tolerance Tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @param {Array.<Array.<number>>} simplifiedEndss Simplified endss.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.quantizess = function(
-    flatCoordinates, offset, endss, stride,
-    tolerance,
-    simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    var simplifiedEnds = [];
-    simplifiedOffset = ol.geom.flat.simplify.quantizes(
-        flatCoordinates, offset, ends, stride,
-        tolerance,
-        simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);
-    simplifiedEndss.push(simplifiedEnds);
-    offset = ends[ends.length - 1];
-  }
-  return simplifiedOffset;
-};
-
-goog.provide('ol.geom.LinearRing');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.area');
-goog.require('ol.geom.flat.closest');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.simplify');
-
-
-/**
- * @classdesc
- * Linear ring geometry. Only used as part of polygon; cannot be rendered
- * on its own.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.LinearRing = function(coordinates, opt_layout) {
-
-  ol.geom.SimpleGeometry.call(this);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDelta_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDeltaRevision_ = -1;
-
-  this.setCoordinates(coordinates, opt_layout);
-
-};
-ol.inherits(ol.geom.LinearRing, ol.geom.SimpleGeometry);
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.LinearRing} Clone.
- * @override
- * @api
- */
-ol.geom.LinearRing.prototype.clone = function() {
-  var linearRing = new ol.geom.LinearRing(null);
-  linearRing.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
-  return linearRing;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.LinearRing.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  if (this.maxDeltaRevision_ != this.getRevision()) {
-    this.maxDelta_ = Math.sqrt(ol.geom.flat.closest.getMaxSquaredDelta(
-        this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));
-    this.maxDeltaRevision_ = this.getRevision();
-  }
-  return ol.geom.flat.closest.getClosestPoint(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);
-};
-
-
-/**
- * Return the area of the linear ring on projected plane.
- * @return {number} Area (on projected plane).
- * @api
- */
-ol.geom.LinearRing.prototype.getArea = function() {
-  return ol.geom.flat.area.linearRing(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
-};
-
-
-/**
- * Return the coordinates of the linear ring.
- * @return {Array.<ol.Coordinate>} Coordinates.
- * @override
- * @api
- */
-ol.geom.LinearRing.prototype.getCoordinates = function() {
-  return ol.geom.flat.inflate.coordinates(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.LinearRing.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  var simplifiedFlatCoordinates = [];
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      squaredTolerance, simplifiedFlatCoordinates, 0);
-  var simplifiedLinearRing = new ol.geom.LinearRing(null);
-  simplifiedLinearRing.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, simplifiedFlatCoordinates);
-  return simplifiedLinearRing;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.LinearRing.prototype.getType = function() {
-  return ol.geom.GeometryType.LINEAR_RING;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.LinearRing.prototype.intersectsExtent = function(extent) {};
-
-
-/**
- * Set the coordinates of the linear ring.
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.LinearRing.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
-  } else {
-    this.setLayout(opt_layout, coordinates, 1);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    this.flatCoordinates.length = ol.geom.flat.deflate.coordinates(
-        this.flatCoordinates, 0, coordinates, this.stride);
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- */
-ol.geom.LinearRing.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.changed();
-};
-
-goog.provide('ol.geom.Point');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * Point geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {ol.Coordinate} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.Point = function(coordinates, opt_layout) {
-  ol.geom.SimpleGeometry.call(this);
-  this.setCoordinates(coordinates, opt_layout);
-};
-ol.inherits(ol.geom.Point, ol.geom.SimpleGeometry);
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.Point} Clone.
- * @override
- * @api
- */
-ol.geom.Point.prototype.clone = function() {
-  var point = new ol.geom.Point(null);
-  point.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
-  return point;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Point.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  var flatCoordinates = this.flatCoordinates;
-  var squaredDistance = ol.math.squaredDistance(
-      x, y, flatCoordinates[0], flatCoordinates[1]);
-  if (squaredDistance < minSquaredDistance) {
-    var stride = this.stride;
-    var i;
-    for (i = 0; i < stride; ++i) {
-      closestPoint[i] = flatCoordinates[i];
-    }
-    closestPoint.length = stride;
-    return squaredDistance;
-  } else {
-    return minSquaredDistance;
-  }
-};
-
-
-/**
- * Return the coordinate of the point.
- * @return {ol.Coordinate} Coordinates.
- * @override
- * @api
- */
-ol.geom.Point.prototype.getCoordinates = function() {
-  return !this.flatCoordinates ? [] : this.flatCoordinates.slice();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Point.prototype.computeExtent = function(extent) {
-  return ol.extent.createOrUpdateFromCoordinate(this.flatCoordinates, extent);
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Point.prototype.getType = function() {
-  return ol.geom.GeometryType.POINT;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Point.prototype.intersectsExtent = function(extent) {
-  return ol.extent.containsXY(extent,
-      this.flatCoordinates[0], this.flatCoordinates[1]);
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Point.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
-  } else {
-    this.setLayout(opt_layout, coordinates, 0);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    this.flatCoordinates.length = ol.geom.flat.deflate.coordinate(
-        this.flatCoordinates, 0, coordinates, this.stride);
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- */
-ol.geom.Point.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.changed();
-};
-
-goog.provide('ol.geom.flat.contains');
-
-goog.require('ol.extent');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} Contains extent.
- */
-ol.geom.flat.contains.linearRingContainsExtent = function(flatCoordinates, offset, end, stride, extent) {
-  var outside = ol.extent.forEachCorner(extent,
-      /**
-       * @param {ol.Coordinate} coordinate Coordinate.
-       * @return {boolean} Contains (x, y).
-       */
-      function(coordinate) {
-        return !ol.geom.flat.contains.linearRingContainsXY(flatCoordinates,
-            offset, end, stride, coordinate[0], coordinate[1]);
-      });
-  return !outside;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {boolean} Contains (x, y).
- */
-ol.geom.flat.contains.linearRingContainsXY = function(flatCoordinates, offset, end, stride, x, y) {
-  // http://geomalgorithms.com/a03-_inclusion.html
-  // Copyright 2000 softSurfer, 2012 Dan Sunday
-  // This code may be freely used and modified for any purpose
-  // providing that this copyright notice is included with it.
-  // SoftSurfer makes no warranty for this code, and cannot be held
-  // liable for any real or imagined damage resulting from its use.
-  // Users of this code must verify correctness for their application.
-  var wn = 0;
-  var x1 = flatCoordinates[end - stride];
-  var y1 = flatCoordinates[end - stride + 1];
-  for (; offset < end; offset += stride) {
-    var x2 = flatCoordinates[offset];
-    var y2 = flatCoordinates[offset + 1];
-    if (y1 <= y) {
-      if (y2 > y && ((x2 - x1) * (y - y1)) - ((x - x1) * (y2 - y1)) > 0) {
-        wn++;
-      }
-    } else if (y2 <= y && ((x2 - x1) * (y - y1)) - ((x - x1) * (y2 - y1)) < 0) {
-      wn--;
-    }
-    x1 = x2;
-    y1 = y2;
-  }
-  return wn !== 0;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {boolean} Contains (x, y).
- */
-ol.geom.flat.contains.linearRingsContainsXY = function(flatCoordinates, offset, ends, stride, x, y) {
-  if (ends.length === 0) {
-    return false;
-  }
-  if (!ol.geom.flat.contains.linearRingContainsXY(
-      flatCoordinates, offset, ends[0], stride, x, y)) {
-    return false;
-  }
-  var i, ii;
-  for (i = 1, ii = ends.length; i < ii; ++i) {
-    if (ol.geom.flat.contains.linearRingContainsXY(
-        flatCoordinates, ends[i - 1], ends[i], stride, x, y)) {
-      return false;
-    }
-  }
-  return true;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {boolean} Contains (x, y).
- */
-ol.geom.flat.contains.linearRingssContainsXY = function(flatCoordinates, offset, endss, stride, x, y) {
-  if (endss.length === 0) {
-    return false;
-  }
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    if (ol.geom.flat.contains.linearRingsContainsXY(
-        flatCoordinates, offset, ends, stride, x, y)) {
-      return true;
-    }
-    offset = ends[ends.length - 1];
-  }
-  return false;
-};
-
-goog.provide('ol.geom.flat.interiorpoint');
-
-goog.require('ol.array');
-goog.require('ol.geom.flat.contains');
-
-
-/**
- * Calculates a point that is likely to lie in the interior of the linear rings.
- * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {Array.<number>} flatCenters Flat centers.
- * @param {number} flatCentersOffset Flat center offset.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Destination.
- */
-ol.geom.flat.interiorpoint.linearRings = function(flatCoordinates, offset,
-    ends, stride, flatCenters, flatCentersOffset, opt_dest) {
-  var i, ii, x, x1, x2, y1, y2;
-  var y = flatCenters[flatCentersOffset + 1];
-  /** @type {Array.<number>} */
-  var intersections = [];
-  // Calculate intersections with the horizontal line
-  var end = ends[0];
-  x1 = flatCoordinates[end - stride];
-  y1 = flatCoordinates[end - stride + 1];
-  for (i = offset; i < end; i += stride) {
-    x2 = flatCoordinates[i];
-    y2 = flatCoordinates[i + 1];
-    if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {
-      x = (y - y1) / (y2 - y1) * (x2 - x1) + x1;
-      intersections.push(x);
-    }
-    x1 = x2;
-    y1 = y2;
-  }
-  // Find the longest segment of the horizontal line that has its center point
-  // inside the linear ring.
-  var pointX = NaN;
-  var maxSegmentLength = -Infinity;
-  intersections.sort(ol.array.numberSafeCompareFunction);
-  x1 = intersections[0];
-  for (i = 1, ii = intersections.length; i < ii; ++i) {
-    x2 = intersections[i];
-    var segmentLength = Math.abs(x2 - x1);
-    if (segmentLength > maxSegmentLength) {
-      x = (x1 + x2) / 2;
-      if (ol.geom.flat.contains.linearRingsContainsXY(
-          flatCoordinates, offset, ends, stride, x, y)) {
-        pointX = x;
-        maxSegmentLength = segmentLength;
-      }
-    }
-    x1 = x2;
-  }
-  if (isNaN(pointX)) {
-    // There is no horizontal line that has its center point inside the linear
-    // ring.  Use the center of the the linear ring's extent.
-    pointX = flatCenters[flatCentersOffset];
-  }
-  if (opt_dest) {
-    opt_dest.push(pointX, y);
-    return opt_dest;
-  } else {
-    return [pointX, y];
-  }
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {Array.<number>} flatCenters Flat centers.
- * @return {Array.<number>} Interior points.
- */
-ol.geom.flat.interiorpoint.linearRingss = function(flatCoordinates, offset, endss, stride, flatCenters) {
-  var interiorPoints = [];
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    interiorPoints = ol.geom.flat.interiorpoint.linearRings(flatCoordinates,
-        offset, ends, stride, flatCenters, 2 * i, interiorPoints);
-    offset = ends[ends.length - 1];
-  }
-  return interiorPoints;
-};
-
-goog.provide('ol.geom.flat.segments');
-
-
-/**
- * This function calls `callback` for each segment of the flat coordinates
- * array. If the callback returns a truthy value the function returns that
- * value immediately. Otherwise the function returns `false`.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {function(this: S, ol.Coordinate, ol.Coordinate): T} callback Function
- *     called for each segment.
- * @param {S=} opt_this The object to be used as the value of 'this'
- *     within callback.
- * @return {T|boolean} Value.
- * @template T,S
- */
-ol.geom.flat.segments.forEach = function(flatCoordinates, offset, end, stride, callback, opt_this) {
-  var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];
-  var point2 = [];
-  var ret;
-  for (; (offset + stride) < end; offset += stride) {
-    point2[0] = flatCoordinates[offset + stride];
-    point2[1] = flatCoordinates[offset + stride + 1];
-    ret = callback.call(opt_this, point1, point2);
-    if (ret) {
-      return ret;
-    }
-    point1[0] = point2[0];
-    point1[1] = point2[1];
-  }
-  return false;
-};
-
-goog.provide('ol.geom.flat.intersectsextent');
-
-goog.require('ol.extent');
-goog.require('ol.geom.flat.contains');
-goog.require('ol.geom.flat.segments');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} True if the geometry and the extent intersect.
- */
-ol.geom.flat.intersectsextent.lineString = function(flatCoordinates, offset, end, stride, extent) {
-  var coordinatesExtent = ol.extent.extendFlatCoordinates(
-      ol.extent.createEmpty(), flatCoordinates, offset, end, stride);
-  if (!ol.extent.intersects(extent, coordinatesExtent)) {
-    return false;
-  }
-  if (ol.extent.containsExtent(extent, coordinatesExtent)) {
-    return true;
-  }
-  if (coordinatesExtent[0] >= extent[0] &&
-      coordinatesExtent[2] <= extent[2]) {
-    return true;
-  }
-  if (coordinatesExtent[1] >= extent[1] &&
-      coordinatesExtent[3] <= extent[3]) {
-    return true;
-  }
-  return ol.geom.flat.segments.forEach(flatCoordinates, offset, end, stride,
-      /**
-       * @param {ol.Coordinate} point1 Start point.
-       * @param {ol.Coordinate} point2 End point.
-       * @return {boolean} `true` if the segment and the extent intersect,
-       *     `false` otherwise.
-       */
-      function(point1, point2) {
-        return ol.extent.intersectsSegment(extent, point1, point2);
-      });
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} True if the geometry and the extent intersect.
- */
-ol.geom.flat.intersectsextent.lineStrings = function(flatCoordinates, offset, ends, stride, extent) {
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    if (ol.geom.flat.intersectsextent.lineString(
-        flatCoordinates, offset, ends[i], stride, extent)) {
-      return true;
-    }
-    offset = ends[i];
-  }
-  return false;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} True if the geometry and the extent intersect.
- */
-ol.geom.flat.intersectsextent.linearRing = function(flatCoordinates, offset, end, stride, extent) {
-  if (ol.geom.flat.intersectsextent.lineString(
-      flatCoordinates, offset, end, stride, extent)) {
-    return true;
-  }
-  if (ol.geom.flat.contains.linearRingContainsXY(
-      flatCoordinates, offset, end, stride, extent[0], extent[1])) {
-    return true;
-  }
-  if (ol.geom.flat.contains.linearRingContainsXY(
-      flatCoordinates, offset, end, stride, extent[0], extent[3])) {
-    return true;
-  }
-  if (ol.geom.flat.contains.linearRingContainsXY(
-      flatCoordinates, offset, end, stride, extent[2], extent[1])) {
-    return true;
-  }
-  if (ol.geom.flat.contains.linearRingContainsXY(
-      flatCoordinates, offset, end, stride, extent[2], extent[3])) {
-    return true;
-  }
-  return false;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} True if the geometry and the extent intersect.
- */
-ol.geom.flat.intersectsextent.linearRings = function(flatCoordinates, offset, ends, stride, extent) {
-  if (!ol.geom.flat.intersectsextent.linearRing(
-      flatCoordinates, offset, ends[0], stride, extent)) {
-    return false;
-  }
-  if (ends.length === 1) {
-    return true;
-  }
-  var i, ii;
-  for (i = 1, ii = ends.length; i < ii; ++i) {
-    if (ol.geom.flat.contains.linearRingContainsExtent(
-        flatCoordinates, ends[i - 1], ends[i], stride, extent)) {
-      return false;
-    }
-  }
-  return true;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} True if the geometry and the extent intersect.
- */
-ol.geom.flat.intersectsextent.linearRingss = function(flatCoordinates, offset, endss, stride, extent) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    if (ol.geom.flat.intersectsextent.linearRings(
-        flatCoordinates, offset, ends, stride, extent)) {
-      return true;
-    }
-    offset = ends[ends.length - 1];
-  }
-  return false;
-};
-
-goog.provide('ol.geom.flat.reverse');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- */
-ol.geom.flat.reverse.coordinates = function(flatCoordinates, offset, end, stride) {
-  while (offset < end - stride) {
-    var i;
-    for (i = 0; i < stride; ++i) {
-      var tmp = flatCoordinates[offset + i];
-      flatCoordinates[offset + i] = flatCoordinates[end - stride + i];
-      flatCoordinates[end - stride + i] = tmp;
-    }
-    offset += stride;
-    end -= stride;
-  }
-};
-
-goog.provide('ol.geom.flat.orient');
-
-goog.require('ol.geom.flat.reverse');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {boolean} Is clockwise.
- */
-ol.geom.flat.orient.linearRingIsClockwise = function(flatCoordinates, offset, end, stride) {
-  // http://tinyurl.com/clockwise-method
-  // https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrlinearring.cpp
-  var edge = 0;
-  var x1 = flatCoordinates[end - stride];
-  var y1 = flatCoordinates[end - stride + 1];
-  for (; offset < end; offset += stride) {
-    var x2 = flatCoordinates[offset];
-    var y2 = flatCoordinates[offset + 1];
-    edge += (x2 - x1) * (y2 + y1);
-    x1 = x2;
-    y1 = y2;
-  }
-  return edge > 0;
-};
-
-
-/**
- * Determines if linear rings are oriented.  By default, left-hand orientation
- * is tested (first ring must be clockwise, remaining rings counter-clockwise).
- * To test for right-hand orientation, use the `opt_right` argument.
- *
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Array of end indexes.
- * @param {number} stride Stride.
- * @param {boolean=} opt_right Test for right-hand orientation
- *     (counter-clockwise exterior ring and clockwise interior rings).
- * @return {boolean} Rings are correctly oriented.
- */
-ol.geom.flat.orient.linearRingsAreOriented = function(flatCoordinates, offset, ends, stride, opt_right) {
-  var right = opt_right !== undefined ? opt_right : false;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var isClockwise = ol.geom.flat.orient.linearRingIsClockwise(
-        flatCoordinates, offset, end, stride);
-    if (i === 0) {
-      if ((right && isClockwise) || (!right && !isClockwise)) {
-        return false;
-      }
-    } else {
-      if ((right && !isClockwise) || (!right && isClockwise)) {
-        return false;
-      }
-    }
-    offset = end;
-  }
-  return true;
-};
-
-
-/**
- * Determines if linear rings are oriented.  By default, left-hand orientation
- * is tested (first ring must be clockwise, remaining rings counter-clockwise).
- * To test for right-hand orientation, use the `opt_right` argument.
- *
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Array of array of end indexes.
- * @param {number} stride Stride.
- * @param {boolean=} opt_right Test for right-hand orientation
- *     (counter-clockwise exterior ring and clockwise interior rings).
- * @return {boolean} Rings are correctly oriented.
- */
-ol.geom.flat.orient.linearRingssAreOriented = function(flatCoordinates, offset, endss, stride, opt_right) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    if (!ol.geom.flat.orient.linearRingsAreOriented(
-        flatCoordinates, offset, endss[i], stride, opt_right)) {
-      return false;
-    }
-  }
-  return true;
-};
-
-
-/**
- * Orient coordinates in a flat array of linear rings.  By default, rings
- * are oriented following the left-hand rule (clockwise for exterior and
- * counter-clockwise for interior rings).  To orient according to the
- * right-hand rule, use the `opt_right` argument.
- *
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {boolean=} opt_right Follow the right-hand rule for orientation.
- * @return {number} End.
- */
-ol.geom.flat.orient.orientLinearRings = function(flatCoordinates, offset, ends, stride, opt_right) {
-  var right = opt_right !== undefined ? opt_right : false;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var isClockwise = ol.geom.flat.orient.linearRingIsClockwise(
-        flatCoordinates, offset, end, stride);
-    var reverse = i === 0 ?
-        (right && isClockwise) || (!right && !isClockwise) :
-        (right && !isClockwise) || (!right && isClockwise);
-    if (reverse) {
-      ol.geom.flat.reverse.coordinates(flatCoordinates, offset, end, stride);
-    }
-    offset = end;
-  }
-  return offset;
-};
-
-
-/**
- * Orient coordinates in a flat array of linear rings.  By default, rings
- * are oriented following the left-hand rule (clockwise for exterior and
- * counter-clockwise for interior rings).  To orient according to the
- * right-hand rule, use the `opt_right` argument.
- *
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Array of array of end indexes.
- * @param {number} stride Stride.
- * @param {boolean=} opt_right Follow the right-hand rule for orientation.
- * @return {number} End.
- */
-ol.geom.flat.orient.orientLinearRingss = function(flatCoordinates, offset, endss, stride, opt_right) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    offset = ol.geom.flat.orient.orientLinearRings(
-        flatCoordinates, offset, endss[i], stride, opt_right);
-  }
-  return offset;
-};
-
-goog.provide('ol.geom.Polygon');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LinearRing');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.area');
-goog.require('ol.geom.flat.closest');
-goog.require('ol.geom.flat.contains');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.interiorpoint');
-goog.require('ol.geom.flat.intersectsextent');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.geom.flat.simplify');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * Polygon geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<Array.<ol.Coordinate>>} coordinates Array of linear
- *     rings that define the polygon. The first linear ring of the array
- *     defines the outer-boundary or surface of the polygon. Each subsequent
- *     linear ring defines a hole in the surface of the polygon. A linear ring
- *     is an array of vertices' coordinates where the first coordinate and the
- *     last are equivalent.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.Polygon = function(coordinates, opt_layout) {
-
-  ol.geom.SimpleGeometry.call(this);
-
-  /**
-   * @type {Array.<number>}
-   * @private
-   */
-  this.ends_ = [];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.flatInteriorPointRevision_ = -1;
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.flatInteriorPoint_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDelta_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDeltaRevision_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.orientedRevision_ = -1;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.orientedFlatCoordinates_ = null;
-
-  this.setCoordinates(coordinates, opt_layout);
-
-};
-ol.inherits(ol.geom.Polygon, ol.geom.SimpleGeometry);
-
-
-/**
- * Append the passed linear ring to this polygon.
- * @param {ol.geom.LinearRing} linearRing Linear ring.
- * @api
- */
-ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) {
-  if (!this.flatCoordinates) {
-    this.flatCoordinates = linearRing.getFlatCoordinates().slice();
-  } else {
-    ol.array.extend(this.flatCoordinates, linearRing.getFlatCoordinates());
-  }
-  this.ends_.push(this.flatCoordinates.length);
-  this.changed();
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.Polygon} Clone.
- * @override
- * @api
- */
-ol.geom.Polygon.prototype.clone = function() {
-  var polygon = new ol.geom.Polygon(null);
-  polygon.setFlatCoordinates(
-      this.layout, this.flatCoordinates.slice(), this.ends_.slice());
-  return polygon;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Polygon.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  if (this.maxDeltaRevision_ != this.getRevision()) {
-    this.maxDelta_ = Math.sqrt(ol.geom.flat.closest.getsMaxSquaredDelta(
-        this.flatCoordinates, 0, this.ends_, this.stride, 0));
-    this.maxDeltaRevision_ = this.getRevision();
-  }
-  return ol.geom.flat.closest.getsClosestPoint(
-      this.flatCoordinates, 0, this.ends_, this.stride,
-      this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Polygon.prototype.containsXY = function(x, y) {
-  return ol.geom.flat.contains.linearRingsContainsXY(
-      this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);
-};
-
-
-/**
- * Return the area of the polygon on projected plane.
- * @return {number} Area (on projected plane).
- * @api
- */
-ol.geom.Polygon.prototype.getArea = function() {
-  return ol.geom.flat.area.linearRings(
-      this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);
-};
-
-
-/**
- * Get the coordinate array for this geometry.  This array has the structure
- * of a GeoJSON coordinate array for polygons.
- *
- * @param {boolean=} opt_right Orient coordinates according to the right-hand
- *     rule (counter-clockwise for exterior and clockwise for interior rings).
- *     If `false`, coordinates will be oriented according to the left-hand rule
- *     (clockwise for exterior and counter-clockwise for interior rings).
- *     By default, coordinate orientation will depend on how the geometry was
- *     constructed.
- * @return {Array.<Array.<ol.Coordinate>>} Coordinates.
- * @override
- * @api
- */
-ol.geom.Polygon.prototype.getCoordinates = function(opt_right) {
-  var flatCoordinates;
-  if (opt_right !== undefined) {
-    flatCoordinates = this.getOrientedFlatCoordinates().slice();
-    ol.geom.flat.orient.orientLinearRings(
-        flatCoordinates, 0, this.ends_, this.stride, opt_right);
-  } else {
-    flatCoordinates = this.flatCoordinates;
-  }
-
-  return ol.geom.flat.inflate.coordinatess(
-      flatCoordinates, 0, this.ends_, this.stride);
-};
-
-
-/**
- * @return {Array.<number>} Ends.
- */
-ol.geom.Polygon.prototype.getEnds = function() {
-  return this.ends_;
-};
-
-
-/**
- * @return {Array.<number>} Interior point.
- */
-ol.geom.Polygon.prototype.getFlatInteriorPoint = function() {
-  if (this.flatInteriorPointRevision_ != this.getRevision()) {
-    var flatCenter = ol.extent.getCenter(this.getExtent());
-    this.flatInteriorPoint_ = ol.geom.flat.interiorpoint.linearRings(
-        this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride,
-        flatCenter, 0);
-    this.flatInteriorPointRevision_ = this.getRevision();
-  }
-  return this.flatInteriorPoint_;
-};
-
-
-/**
- * Return an interior point of the polygon.
- * @return {ol.geom.Point} Interior point.
- * @api
- */
-ol.geom.Polygon.prototype.getInteriorPoint = function() {
-  return new ol.geom.Point(this.getFlatInteriorPoint());
-};
-
-
-/**
- * Return the number of rings of the polygon,  this includes the exterior
- * ring and any interior rings.
- *
- * @return {number} Number of rings.
- * @api
- */
-ol.geom.Polygon.prototype.getLinearRingCount = function() {
-  return this.ends_.length;
-};
-
-
-/**
- * Return the Nth linear ring of the polygon geometry. Return `null` if the
- * given index is out of range.
- * The exterior linear ring is available at index `0` and the interior rings
- * at index `1` and beyond.
- *
- * @param {number} index Index.
- * @return {ol.geom.LinearRing} Linear ring.
- * @api
- */
-ol.geom.Polygon.prototype.getLinearRing = function(index) {
-  if (index < 0 || this.ends_.length <= index) {
-    return null;
-  }
-  var linearRing = new ol.geom.LinearRing(null);
-  linearRing.setFlatCoordinates(this.layout, this.flatCoordinates.slice(
-      index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]));
-  return linearRing;
-};
-
-
-/**
- * Return the linear rings of the polygon.
- * @return {Array.<ol.geom.LinearRing>} Linear rings.
- * @api
- */
-ol.geom.Polygon.prototype.getLinearRings = function() {
-  var layout = this.layout;
-  var flatCoordinates = this.flatCoordinates;
-  var ends = this.ends_;
-  var linearRings = [];
-  var offset = 0;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var linearRing = new ol.geom.LinearRing(null);
-    linearRing.setFlatCoordinates(layout, flatCoordinates.slice(offset, end));
-    linearRings.push(linearRing);
-    offset = end;
-  }
-  return linearRings;
-};
-
-
-/**
- * @return {Array.<number>} Oriented flat coordinates.
- */
-ol.geom.Polygon.prototype.getOrientedFlatCoordinates = function() {
-  if (this.orientedRevision_ != this.getRevision()) {
-    var flatCoordinates = this.flatCoordinates;
-    if (ol.geom.flat.orient.linearRingsAreOriented(
-        flatCoordinates, 0, this.ends_, this.stride)) {
-      this.orientedFlatCoordinates_ = flatCoordinates;
-    } else {
-      this.orientedFlatCoordinates_ = flatCoordinates.slice();
-      this.orientedFlatCoordinates_.length =
-          ol.geom.flat.orient.orientLinearRings(
-              this.orientedFlatCoordinates_, 0, this.ends_, this.stride);
-    }
-    this.orientedRevision_ = this.getRevision();
-  }
-  return this.orientedFlatCoordinates_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Polygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  var simplifiedFlatCoordinates = [];
-  var simplifiedEnds = [];
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.quantizes(
-      this.flatCoordinates, 0, this.ends_, this.stride,
-      Math.sqrt(squaredTolerance),
-      simplifiedFlatCoordinates, 0, simplifiedEnds);
-  var simplifiedPolygon = new ol.geom.Polygon(null);
-  simplifiedPolygon.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, simplifiedFlatCoordinates, simplifiedEnds);
-  return simplifiedPolygon;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Polygon.prototype.getType = function() {
-  return ol.geom.GeometryType.POLYGON;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Polygon.prototype.intersectsExtent = function(extent) {
-  return ol.geom.flat.intersectsextent.linearRings(
-      this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);
-};
-
-
-/**
- * Set the coordinates of the polygon.
- * @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.ends_);
-  } else {
-    this.setLayout(opt_layout, coordinates, 2);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    var ends = ol.geom.flat.deflate.coordinatess(
-        this.flatCoordinates, 0, coordinates, this.stride, this.ends_);
-    this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {Array.<number>} ends Ends.
- */
-ol.geom.Polygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, ends) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.ends_ = ends;
-  this.changed();
-};
-
-
-/**
- * Create an approximation of a circle on the surface of a sphere.
- * @param {ol.Sphere} sphere The sphere.
- * @param {ol.Coordinate} center Center (`[lon, lat]` in degrees).
- * @param {number} radius The great-circle distance from the center to
- *     the polygon vertices.
- * @param {number=} opt_n Optional number of vertices for the resulting
- *     polygon. Default is `32`.
- * @return {ol.geom.Polygon} The "circular" polygon.
- * @api
- */
-ol.geom.Polygon.circular = function(sphere, center, radius, opt_n) {
-  var n = opt_n ? opt_n : 32;
-  /** @type {Array.<number>} */
-  var flatCoordinates = [];
-  var i;
-  for (i = 0; i < n; ++i) {
-    ol.array.extend(
-        flatCoordinates, sphere.offset(center, radius, 2 * Math.PI * i / n));
-  }
-  flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);
-  var polygon = new ol.geom.Polygon(null);
-  polygon.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, flatCoordinates, [flatCoordinates.length]);
-  return polygon;
-};
-
-
-/**
- * Create a polygon from an extent. The layout used is `XY`.
- * @param {ol.Extent} extent The extent.
- * @return {ol.geom.Polygon} The polygon.
- * @api
- */
-ol.geom.Polygon.fromExtent = function(extent) {
-  var minX = extent[0];
-  var minY = extent[1];
-  var maxX = extent[2];
-  var maxY = extent[3];
-  var flatCoordinates =
-      [minX, minY, minX, maxY, maxX, maxY, maxX, minY, minX, minY];
-  var polygon = new ol.geom.Polygon(null);
-  polygon.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, flatCoordinates, [flatCoordinates.length]);
-  return polygon;
-};
-
-
-/**
- * Create a regular polygon from a circle.
- * @param {ol.geom.Circle} circle Circle geometry.
- * @param {number=} opt_sides Number of sides of the polygon. Default is 32.
- * @param {number=} opt_angle Start angle for the first vertex of the polygon in
- *     radians. Default is 0.
- * @return {ol.geom.Polygon} Polygon geometry.
- * @api
- */
-ol.geom.Polygon.fromCircle = function(circle, opt_sides, opt_angle) {
-  var sides = opt_sides ? opt_sides : 32;
-  var stride = circle.getStride();
-  var layout = circle.getLayout();
-  var polygon = new ol.geom.Polygon(null, layout);
-  var arrayLength = stride * (sides + 1);
-  var flatCoordinates = new Array(arrayLength);
-  for (var i = 0; i < arrayLength; i++) {
-    flatCoordinates[i] = 0;
-  }
-  var ends = [flatCoordinates.length];
-  polygon.setFlatCoordinates(layout, flatCoordinates, ends);
-  ol.geom.Polygon.makeRegular(
-      polygon, circle.getCenter(), circle.getRadius(), opt_angle);
-  return polygon;
-};
-
-
-/**
- * Modify the coordinates of a polygon to make it a regular polygon.
- * @param {ol.geom.Polygon} polygon Polygon geometry.
- * @param {ol.Coordinate} center Center of the regular polygon.
- * @param {number} radius Radius of the regular polygon.
- * @param {number=} opt_angle Start angle for the first vertex of the polygon in
- *     radians. Default is 0.
- */
-ol.geom.Polygon.makeRegular = function(polygon, center, radius, opt_angle) {
-  var flatCoordinates = polygon.getFlatCoordinates();
-  var layout = polygon.getLayout();
-  var stride = polygon.getStride();
-  var ends = polygon.getEnds();
-  var sides = flatCoordinates.length / stride - 1;
-  var startAngle = opt_angle ? opt_angle : 0;
-  var angle, offset;
-  for (var i = 0; i <= sides; ++i) {
-    offset = i * stride;
-    angle = startAngle + (ol.math.modulo(i, sides) * 2 * Math.PI / sides);
-    flatCoordinates[offset] = center[0] + (radius * Math.cos(angle));
-    flatCoordinates[offset + 1] = center[1] + (radius * Math.sin(angle));
-  }
-  polygon.setFlatCoordinates(layout, flatCoordinates, ends);
-};
-
-goog.provide('ol.View');
-
-goog.require('ol');
-goog.require('ol.CenterConstraint');
-goog.require('ol.Object');
-goog.require('ol.ResolutionConstraint');
-goog.require('ol.RotationConstraint');
-goog.require('ol.ViewHint');
-goog.require('ol.ViewProperty');
-goog.require('ol.array');
-goog.require('ol.asserts');
-goog.require('ol.coordinate');
-goog.require('ol.easing');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.proj.Units');
-
-
-/**
- * @classdesc
- * An ol.View object represents a simple 2D view of the map.
- *
- * This is the object to act upon to change the center, resolution,
- * and rotation of the map.
- *
- * ### The view states
- *
- * An `ol.View` is determined by three states: `center`, `resolution`,
- * and `rotation`. Each state has a corresponding getter and setter, e.g.
- * `getCenter` and `setCenter` for the `center` state.
- *
- * An `ol.View` has a `projection`. The projection determines the
- * coordinate system of the center, and its units determine the units of the
- * resolution (projection units per pixel). The default projection is
- * Spherical Mercator (EPSG:3857).
- *
- * ### The constraints
- *
- * `setCenter`, `setResolution` and `setRotation` can be used to change the
- * states of the view. Any value can be passed to the setters. And the value
- * that is passed to a setter will effectively be the value set in the view,
- * and returned by the corresponding getter.
- *
- * But an `ol.View` object also has a *resolution constraint*, a
- * *rotation constraint* and a *center constraint*.
- *
- * As said above, no constraints are applied when the setters are used to set
- * new states for the view. Applying constraints is done explicitly through
- * the use of the `constrain*` functions (`constrainResolution` and
- * `constrainRotation` and `constrainCenter`).
- *
- * The main users of the constraints are the interactions and the
- * controls. For example, double-clicking on the map changes the view to
- * the "next" resolution. And releasing the fingers after pinch-zooming
- * snaps to the closest resolution (with an animation).
- *
- * The *resolution constraint* snaps to specific resolutions. It is
- * determined by the following options: `resolutions`, `maxResolution`,
- * `maxZoom`, and `zoomFactor`. If `resolutions` is set, the other three
- * options are ignored. See documentation for each option for more
- * information.
- *
- * The *rotation constraint* snaps to specific angles. It is determined
- * by the following options: `enableRotation` and `constrainRotation`.
- * By default the rotation value is snapped to zero when approaching the
- * horizontal.
- *
- * The *center constraint* is determined by the `extent` option. By
- * default the center is not constrained at all.
- *
- * @constructor
- * @extends {ol.Object}
- * @param {olx.ViewOptions=} opt_options View options.
- * @api
- */
-ol.View = function(opt_options) {
-  ol.Object.call(this);
-
-  var options = ol.obj.assign({}, opt_options);
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.hints_ = [0, 0];
-
-  /**
-   * @private
-   * @type {Array.<Array.<ol.ViewAnimation>>}
-   */
-  this.animations_ = [];
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.updateAnimationKey_;
-
-  this.updateAnimations_ = this.updateAnimations_.bind(this);
-
-  /**
-   * @private
-   * @const
-   * @type {ol.proj.Projection}
-   */
-  this.projection_ = ol.proj.createProjection(options.projection, 'EPSG:3857');
-
-  this.applyOptions_(options);
-};
-ol.inherits(ol.View, ol.Object);
-
-
-/**
- * Set up the view with the given options.
- * @param {olx.ViewOptions} options View options.
- */
-ol.View.prototype.applyOptions_ = function(options) {
-
-  /**
-   * @type {Object.<string, *>}
-   */
-  var properties = {};
-  properties[ol.ViewProperty.CENTER] = options.center !== undefined ?
-      options.center : null;
-
-  var resolutionConstraintInfo = ol.View.createResolutionConstraint_(
-      options);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxResolution_ = resolutionConstraintInfo.maxResolution;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.minResolution_ = resolutionConstraintInfo.minResolution;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;
-
-  /**
-   * @private
-   * @type {Array.<number>|undefined}
-   */
-  this.resolutions_ = options.resolutions;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.minZoom_ = resolutionConstraintInfo.minZoom;
-
-  var centerConstraint = ol.View.createCenterConstraint_(options);
-  var resolutionConstraint = resolutionConstraintInfo.constraint;
-  var rotationConstraint = ol.View.createRotationConstraint_(options);
-
-  /**
-   * @private
-   * @type {ol.Constraints}
-   */
-  this.constraints_ = {
-    center: centerConstraint,
-    resolution: resolutionConstraint,
-    rotation: rotationConstraint
-  };
-
-  if (options.resolution !== undefined) {
-    properties[ol.ViewProperty.RESOLUTION] = options.resolution;
-  } else if (options.zoom !== undefined) {
-    properties[ol.ViewProperty.RESOLUTION] = this.constrainResolution(
-        this.maxResolution_, options.zoom - this.minZoom_);
-  }
-  properties[ol.ViewProperty.ROTATION] =
-      options.rotation !== undefined ? options.rotation : 0;
-  this.setProperties(properties);
-
-  /**
-   * @private
-   * @type {olx.ViewOptions}
-   */
-  this.options_ = options;
-
-};
-
-/**
- * Get an updated version of the view options used to construct the view.  The
- * current resolution (or zoom), center, and rotation are applied to any stored
- * options.  The provided options can be uesd to apply new min/max zoom or
- * resolution limits.
- * @param {olx.ViewOptions} newOptions New options to be applied.
- * @return {olx.ViewOptions} New options updated with the current view state.
- */
-ol.View.prototype.getUpdatedOptions_ = function(newOptions) {
-  var options = ol.obj.assign({}, this.options_);
-
-  // preserve resolution (or zoom)
-  if (options.resolution !== undefined) {
-    options.resolution = this.getResolution();
-  } else {
-    options.zoom = this.getZoom();
-  }
-
-  // preserve center
-  options.center = this.getCenter();
-
-  // preserve rotation
-  options.rotation = this.getRotation();
-
-  return ol.obj.assign({}, options, newOptions);
-};
-
-
-/**
- * Animate the view.  The view's center, zoom (or resolution), and rotation
- * can be animated for smooth transitions between view states.  For example,
- * to animate the view to a new zoom level:
- *
- *     view.animate({zoom: view.getZoom() + 1});
- *
- * By default, the animation lasts one second and uses in-and-out easing.  You
- * can customize this behavior by including `duration` (in milliseconds) and
- * `easing` options (see {@link ol.easing}).
- *
- * To chain together multiple animations, call the method with multiple
- * animation objects.  For example, to first zoom and then pan:
- *
- *     view.animate({zoom: 10}, {center: [0, 0]});
- *
- * If you provide a function as the last argument to the animate method, it
- * will get called at the end of an animation series.  The callback will be
- * called with `true` if the animation series completed on its own or `false`
- * if it was cancelled.
- *
- * Animations are cancelled by user interactions (e.g. dragging the map) or by
- * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`
- * (or another method that calls one of these).
- *
- * @param {...(olx.AnimationOptions|function(boolean))} var_args Animation
- *     options.  Multiple animations can be run in series by passing multiple
- *     options objects.  To run multiple animations in parallel, call the method
- *     multiple times.  An optional callback can be provided as a final
- *     argument.  The callback will be called with a boolean indicating whether
- *     the animation completed without being cancelled.
- * @api
- */
-ol.View.prototype.animate = function(var_args) {
-  var start = Date.now();
-  var center = this.getCenter().slice();
-  var resolution = this.getResolution();
-  var rotation = this.getRotation();
-  var animationCount = arguments.length;
-  var callback;
-  if (animationCount > 1 && typeof arguments[animationCount - 1] === 'function') {
-    callback = arguments[animationCount - 1];
-    --animationCount;
-  }
-  var series = [];
-  for (var i = 0; i < animationCount; ++i) {
-    var options = /** @type {olx.AnimationOptions} */ (arguments[i]);
-
-    var animation = /** @type {ol.ViewAnimation} */ ({
-      start: start,
-      complete: false,
-      anchor: options.anchor,
-      duration: options.duration !== undefined ? options.duration : 1000,
-      easing: options.easing || ol.easing.inAndOut
-    });
-
-    if (options.center) {
-      animation.sourceCenter = center;
-      animation.targetCenter = options.center;
-      center = animation.targetCenter;
-    }
-
-    if (options.zoom !== undefined) {
-      animation.sourceResolution = resolution;
-      animation.targetResolution = this.constrainResolution(
-            this.maxResolution_, options.zoom - this.minZoom_, 0);
-      resolution = animation.targetResolution;
-    } else if (options.resolution) {
-      animation.sourceResolution = resolution;
-      animation.targetResolution = options.resolution;
-      resolution = animation.targetResolution;
-    }
-
-    if (options.rotation !== undefined) {
-      animation.sourceRotation = rotation;
-      animation.targetRotation = options.rotation;
-      rotation = animation.targetRotation;
-    }
-
-    animation.callback = callback;
-    start += animation.duration;
-    series.push(animation);
-  }
-  this.animations_.push(series);
-  this.setHint(ol.ViewHint.ANIMATING, 1);
-  this.updateAnimations_();
-};
-
-
-/**
- * Determine if the view is being animated.
- * @return {boolean} The view is being animated.
- * @api
- */
-ol.View.prototype.getAnimating = function() {
-  return this.getHints()[ol.ViewHint.ANIMATING] > 0;
-};
-
-
-/**
- * Determine if the user is interacting with the view, such as panning or zooming.
- * @return {boolean} The view is being interacted with.
- * @api
- */
-ol.View.prototype.getInteracting = function() {
-  return this.getHints()[ol.ViewHint.INTERACTING] > 0;
-};
-
-
-/**
- * Cancel any ongoing animations.
- * @api
- */
-ol.View.prototype.cancelAnimations = function() {
-  this.setHint(ol.ViewHint.ANIMATING, -this.getHints()[ol.ViewHint.ANIMATING]);
-  for (var i = 0, ii = this.animations_.length; i < ii; ++i) {
-    var series = this.animations_[i];
-    if (series[0].callback) {
-      series[0].callback(false);
-    }
-  }
-  this.animations_.length = 0;
-};
-
-/**
- * Update all animations.
- */
-ol.View.prototype.updateAnimations_ = function() {
-  if (this.updateAnimationKey_ !== undefined) {
-    cancelAnimationFrame(this.updateAnimationKey_);
-    this.updateAnimationKey_ = undefined;
-  }
-  if (!this.getAnimating()) {
-    return;
-  }
-  var now = Date.now();
-  var more = false;
-  for (var i = this.animations_.length - 1; i >= 0; --i) {
-    var series = this.animations_[i];
-    var seriesComplete = true;
-    for (var j = 0, jj = series.length; j < jj; ++j) {
-      var animation = series[j];
-      if (animation.complete) {
-        continue;
-      }
-      var elapsed = now - animation.start;
-      var fraction = animation.duration > 0 ? elapsed / animation.duration : 1;
-      if (fraction >= 1) {
-        animation.complete = true;
-        fraction = 1;
-      } else {
-        seriesComplete = false;
-      }
-      var progress = animation.easing(fraction);
-      if (animation.sourceCenter) {
-        var x0 = animation.sourceCenter[0];
-        var y0 = animation.sourceCenter[1];
-        var x1 = animation.targetCenter[0];
-        var y1 = animation.targetCenter[1];
-        var x = x0 + progress * (x1 - x0);
-        var y = y0 + progress * (y1 - y0);
-        this.set(ol.ViewProperty.CENTER, [x, y]);
-      }
-      if (animation.sourceResolution && animation.targetResolution) {
-        var resolution = progress === 1 ?
-            animation.targetResolution :
-            animation.sourceResolution + progress * (animation.targetResolution - animation.sourceResolution);
-        if (animation.anchor) {
-          this.set(ol.ViewProperty.CENTER,
-              this.calculateCenterZoom(resolution, animation.anchor));
-        }
-        this.set(ol.ViewProperty.RESOLUTION, resolution);
-      }
-      if (animation.sourceRotation !== undefined && animation.targetRotation !== undefined) {
-        var rotation = progress === 1 ?
-            animation.targetRotation :
-            animation.sourceRotation + progress * (animation.targetRotation - animation.sourceRotation);
-        if (animation.anchor) {
-          this.set(ol.ViewProperty.CENTER,
-              this.calculateCenterRotate(rotation, animation.anchor));
-        }
-        this.set(ol.ViewProperty.ROTATION, rotation);
-      }
-      more = true;
-      if (!animation.complete) {
-        break;
-      }
-    }
-    if (seriesComplete) {
-      this.animations_[i] = null;
-      this.setHint(ol.ViewHint.ANIMATING, -1);
-      var callback = series[0].callback;
-      if (callback) {
-        callback(true);
-      }
-    }
-  }
-  // prune completed series
-  this.animations_ = this.animations_.filter(Boolean);
-  if (more && this.updateAnimationKey_ === undefined) {
-    this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_);
-  }
-};
-
-/**
- * @param {number} rotation Target rotation.
- * @param {ol.Coordinate} anchor Rotation anchor.
- * @return {ol.Coordinate|undefined} Center for rotation and anchor.
- */
-ol.View.prototype.calculateCenterRotate = function(rotation, anchor) {
-  var center;
-  var currentCenter = this.getCenter();
-  if (currentCenter !== undefined) {
-    center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];
-    ol.coordinate.rotate(center, rotation - this.getRotation());
-    ol.coordinate.add(center, anchor);
-  }
-  return center;
-};
-
-
-/**
- * @param {number} resolution Target resolution.
- * @param {ol.Coordinate} anchor Zoom anchor.
- * @return {ol.Coordinate|undefined} Center for resolution and anchor.
- */
-ol.View.prototype.calculateCenterZoom = function(resolution, anchor) {
-  var center;
-  var currentCenter = this.getCenter();
-  var currentResolution = this.getResolution();
-  if (currentCenter !== undefined && currentResolution !== undefined) {
-    var x = anchor[0] -
-        resolution * (anchor[0] - currentCenter[0]) / currentResolution;
-    var y = anchor[1] -
-        resolution * (anchor[1] - currentCenter[1]) / currentResolution;
-    center = [x, y];
-  }
-  return center;
-};
-
-
-/**
- * @private
- * @return {ol.Size} Viewport size or `[100, 100]` when no viewport is found.
- */
-ol.View.prototype.getSizeFromViewport_ = function() {
-  var size = [100, 100];
-  var selector = '.ol-viewport[data-view="' + ol.getUid(this) + '"]';
-  var element = document.querySelector(selector);
-  if (element) {
-    var metrics = getComputedStyle(element);
-    size[0] = parseInt(metrics.width, 10);
-    size[1] = parseInt(metrics.height, 10);
-  }
-  return size;
-};
-
-
-/**
- * Get the constrained center of this view.
- * @param {ol.Coordinate|undefined} center Center.
- * @return {ol.Coordinate|undefined} Constrained center.
- * @api
- */
-ol.View.prototype.constrainCenter = function(center) {
-  return this.constraints_.center(center);
-};
-
-
-/**
- * Get the constrained resolution of this view.
- * @param {number|undefined} resolution Resolution.
- * @param {number=} opt_delta Delta. Default is `0`.
- * @param {number=} opt_direction Direction. Default is `0`.
- * @return {number|undefined} Constrained resolution.
- * @api
- */
-ol.View.prototype.constrainResolution = function(
-    resolution, opt_delta, opt_direction) {
-  var delta = opt_delta || 0;
-  var direction = opt_direction || 0;
-  return this.constraints_.resolution(resolution, delta, direction);
-};
-
-
-/**
- * Get the constrained rotation of this view.
- * @param {number|undefined} rotation Rotation.
- * @param {number=} opt_delta Delta. Default is `0`.
- * @return {number|undefined} Constrained rotation.
- * @api
- */
-ol.View.prototype.constrainRotation = function(rotation, opt_delta) {
-  var delta = opt_delta || 0;
-  return this.constraints_.rotation(rotation, delta);
-};
-
-
-/**
- * Get the view center.
- * @return {ol.Coordinate|undefined} The center of the view.
- * @observable
- * @api
- */
-ol.View.prototype.getCenter = function() {
-  return /** @type {ol.Coordinate|undefined} */ (
-      this.get(ol.ViewProperty.CENTER));
-};
-
-
-/**
- * @return {ol.Constraints} Constraints.
- */
-ol.View.prototype.getConstraints = function() {
-  return this.constraints_;
-};
-
-
-/**
- * @param {Array.<number>=} opt_hints Destination array.
- * @return {Array.<number>} Hint.
- */
-ol.View.prototype.getHints = function(opt_hints) {
-  if (opt_hints !== undefined) {
-    opt_hints[0] = this.hints_[0];
-    opt_hints[1] = this.hints_[1];
-    return opt_hints;
-  } else {
-    return this.hints_.slice();
-  }
-};
-
-
-/**
- * Calculate the extent for the current view state and the passed size.
- * The size is the pixel dimensions of the box into which the calculated extent
- * should fit. In most cases you want to get the extent of the entire map,
- * that is `map.getSize()`.
- * @param {ol.Size=} opt_size Box pixel size. If not provided, the size of the
- * first map that uses this view will be used.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.View.prototype.calculateExtent = function(opt_size) {
-  var size = opt_size || this.getSizeFromViewport_();
-  var center = /** @type {!ol.Coordinate} */ (this.getCenter());
-  ol.asserts.assert(center, 1); // The view center is not defined
-  var resolution = /** @type {!number} */ (this.getResolution());
-  ol.asserts.assert(resolution !== undefined, 2); // The view resolution is not defined
-  var rotation = /** @type {!number} */ (this.getRotation());
-  ol.asserts.assert(rotation !== undefined, 3); // The view rotation is not defined
-
-  return ol.extent.getForViewAndSize(center, resolution, rotation, size);
-};
-
-
-/**
- * Get the maximum resolution of the view.
- * @return {number} The maximum resolution of the view.
- * @api
- */
-ol.View.prototype.getMaxResolution = function() {
-  return this.maxResolution_;
-};
-
-
-/**
- * Get the minimum resolution of the view.
- * @return {number} The minimum resolution of the view.
- * @api
- */
-ol.View.prototype.getMinResolution = function() {
-  return this.minResolution_;
-};
-
-
-/**
- * Get the maximum zoom level for the view.
- * @return {number} The maximum zoom level.
- * @api
- */
-ol.View.prototype.getMaxZoom = function() {
-  return /** @type {number} */ (this.getZoomForResolution(this.minResolution_));
-};
-
-
-/**
- * Set a new maximum zoom level for the view.
- * @param {number} zoom The maximum zoom level.
- * @api
- */
-ol.View.prototype.setMaxZoom = function(zoom) {
-  this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom}));
-};
-
-
-/**
- * Get the minimum zoom level for the view.
- * @return {number} The minimum zoom level.
- * @api
- */
-ol.View.prototype.getMinZoom = function() {
-  return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_));
-};
-
-
-/**
- * Set a new minimum zoom level for the view.
- * @param {number} zoom The minimum zoom level.
- * @api
- */
-ol.View.prototype.setMinZoom = function(zoom) {
-  this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));
-};
-
-
-/**
- * Get the view projection.
- * @return {ol.proj.Projection} The projection of the view.
- * @api
- */
-ol.View.prototype.getProjection = function() {
-  return this.projection_;
-};
-
-
-/**
- * Get the view resolution.
- * @return {number|undefined} The resolution of the view.
- * @observable
- * @api
- */
-ol.View.prototype.getResolution = function() {
-  return /** @type {number|undefined} */ (
-      this.get(ol.ViewProperty.RESOLUTION));
-};
-
-
-/**
- * Get the resolutions for the view. This returns the array of resolutions
- * passed to the constructor of the {ol.View}, or undefined if none were given.
- * @return {Array.<number>|undefined} The resolutions of the view.
- * @api
- */
-ol.View.prototype.getResolutions = function() {
-  return this.resolutions_;
-};
-
-
-/**
- * Get the resolution for a provided extent (in map units) and size (in pixels).
- * @param {ol.Extent} extent Extent.
- * @param {ol.Size=} opt_size Box pixel size.
- * @return {number} The resolution at which the provided extent will render at
- *     the given size.
- * @api
- */
-ol.View.prototype.getResolutionForExtent = function(extent, opt_size) {
-  var size = opt_size || this.getSizeFromViewport_();
-  var xResolution = ol.extent.getWidth(extent) / size[0];
-  var yResolution = ol.extent.getHeight(extent) / size[1];
-  return Math.max(xResolution, yResolution);
-};
-
-
-/**
- * Return a function that returns a value between 0 and 1 for a
- * resolution. Exponential scaling is assumed.
- * @param {number=} opt_power Power.
- * @return {function(number): number} Resolution for value function.
- */
-ol.View.prototype.getResolutionForValueFunction = function(opt_power) {
-  var power = opt_power || 2;
-  var maxResolution = this.maxResolution_;
-  var minResolution = this.minResolution_;
-  var max = Math.log(maxResolution / minResolution) / Math.log(power);
-  return (
-      /**
-       * @param {number} value Value.
-       * @return {number} Resolution.
-       */
-      function(value) {
-        var resolution = maxResolution / Math.pow(power, value * max);
-        return resolution;
-      });
-};
-
-
-/**
- * Get the view rotation.
- * @return {number} The rotation of the view in radians.
- * @observable
- * @api
- */
-ol.View.prototype.getRotation = function() {
-  return /** @type {number} */ (this.get(ol.ViewProperty.ROTATION));
-};
-
-
-/**
- * Return a function that returns a resolution for a value between
- * 0 and 1. Exponential scaling is assumed.
- * @param {number=} opt_power Power.
- * @return {function(number): number} Value for resolution function.
- */
-ol.View.prototype.getValueForResolutionFunction = function(opt_power) {
-  var power = opt_power || 2;
-  var maxResolution = this.maxResolution_;
-  var minResolution = this.minResolution_;
-  var max = Math.log(maxResolution / minResolution) / Math.log(power);
-  return (
-      /**
-       * @param {number} resolution Resolution.
-       * @return {number} Value.
-       */
-      function(resolution) {
-        var value =
-            (Math.log(maxResolution / resolution) / Math.log(power)) / max;
-        return value;
-      });
-};
-
-
-/**
- * @return {olx.ViewState} View state.
- */
-ol.View.prototype.getState = function() {
-  var center = /** @type {ol.Coordinate} */ (this.getCenter());
-  var projection = this.getProjection();
-  var resolution = /** @type {number} */ (this.getResolution());
-  var rotation = this.getRotation();
-  return /** @type {olx.ViewState} */ ({
-    center: center.slice(),
-    projection: projection !== undefined ? projection : null,
-    resolution: resolution,
-    rotation: rotation
-  });
-};
-
-
-/**
- * Get the current zoom level. Return undefined if the current
- * resolution is undefined or not within the "resolution constraints".
- * @return {number|undefined} Zoom.
- * @api
- */
-ol.View.prototype.getZoom = function() {
-  var zoom;
-  var resolution = this.getResolution();
-  if (resolution !== undefined) {
-    zoom = this.getZoomForResolution(resolution);
-  }
-  return zoom;
-};
-
-
-/**
- * Get the zoom level for a resolution.
- * @param {number} resolution The resolution.
- * @return {number|undefined} The zoom level for the provided resolution.
- * @api
- */
-ol.View.prototype.getZoomForResolution = function(resolution) {
-  var zoom;
-  if (resolution >= this.minResolution_ && resolution <= this.maxResolution_) {
-    var offset = this.minZoom_ || 0;
-    var max, zoomFactor;
-    if (this.resolutions_) {
-      var nearest = ol.array.linearFindNearest(this.resolutions_, resolution, 1);
-      offset += nearest;
-      if (nearest == this.resolutions_.length - 1) {
-        return offset;
-      }
-      max = this.resolutions_[nearest];
-      zoomFactor = max / this.resolutions_[nearest + 1];
-    } else {
-      max = this.maxResolution_;
-      zoomFactor = this.zoomFactor_;
-    }
-    zoom = offset + Math.log(max / resolution) / Math.log(zoomFactor);
-  }
-  return zoom;
-};
-
-
-/**
- * Fit the given geometry or extent based on the given map size and border.
- * The size is pixel dimensions of the box to fit the extent into.
- * In most cases you will want to use the map size, that is `map.getSize()`.
- * Takes care of the map angle.
- * @param {ol.geom.SimpleGeometry|ol.Extent} geometryOrExtent The geometry or
- *     extent to fit the view to.
- * @param {olx.view.FitOptions=} opt_options Options.
- * @api
- */
-ol.View.prototype.fit = function(geometryOrExtent, opt_options) {
-  var options = opt_options || {};
-  var size = options.size;
-  if (!size) {
-    size = this.getSizeFromViewport_();
-  }
-  /** @type {ol.geom.SimpleGeometry} */
-  var geometry;
-  if (!(geometryOrExtent instanceof ol.geom.SimpleGeometry)) {
-    ol.asserts.assert(Array.isArray(geometryOrExtent),
-        24); // Invalid extent or geometry provided as `geometry`
-    ol.asserts.assert(!ol.extent.isEmpty(geometryOrExtent),
-        25); // Cannot fit empty extent provided as `geometry`
-    geometry = ol.geom.Polygon.fromExtent(geometryOrExtent);
-  } else if (geometryOrExtent.getType() === ol.geom.GeometryType.CIRCLE) {
-    geometryOrExtent = geometryOrExtent.getExtent();
-    geometry = ol.geom.Polygon.fromExtent(geometryOrExtent);
-    geometry.rotate(this.getRotation(), ol.extent.getCenter(geometryOrExtent));
-  } else {
-    geometry = geometryOrExtent;
-  }
-
-  var padding = options.padding !== undefined ? options.padding : [0, 0, 0, 0];
-  var constrainResolution = options.constrainResolution !== undefined ?
-      options.constrainResolution : true;
-  var nearest = options.nearest !== undefined ? options.nearest : false;
-  var minResolution;
-  if (options.minResolution !== undefined) {
-    minResolution = options.minResolution;
-  } else if (options.maxZoom !== undefined) {
-    minResolution = this.constrainResolution(
-        this.maxResolution_, options.maxZoom - this.minZoom_, 0);
-  } else {
-    minResolution = 0;
-  }
-  var coords = geometry.getFlatCoordinates();
-
-  // calculate rotated extent
-  var rotation = this.getRotation();
-  var cosAngle = Math.cos(-rotation);
-  var sinAngle = Math.sin(-rotation);
-  var minRotX = +Infinity;
-  var minRotY = +Infinity;
-  var maxRotX = -Infinity;
-  var maxRotY = -Infinity;
-  var stride = geometry.getStride();
-  for (var i = 0, ii = coords.length; i < ii; i += stride) {
-    var rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;
-    var rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;
-    minRotX = Math.min(minRotX, rotX);
-    minRotY = Math.min(minRotY, rotY);
-    maxRotX = Math.max(maxRotX, rotX);
-    maxRotY = Math.max(maxRotY, rotY);
-  }
-
-  // calculate resolution
-  var resolution = this.getResolutionForExtent(
-      [minRotX, minRotY, maxRotX, maxRotY],
-      [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]);
-  resolution = isNaN(resolution) ? minResolution :
-      Math.max(resolution, minResolution);
-  if (constrainResolution) {
-    var constrainedResolution = this.constrainResolution(resolution, 0, 0);
-    if (!nearest && constrainedResolution < resolution) {
-      constrainedResolution = this.constrainResolution(
-          constrainedResolution, -1, 0);
-    }
-    resolution = constrainedResolution;
-  }
-
-  // calculate center
-  sinAngle = -sinAngle; // go back to original rotation
-  var centerRotX = (minRotX + maxRotX) / 2;
-  var centerRotY = (minRotY + maxRotY) / 2;
-  centerRotX += (padding[1] - padding[3]) / 2 * resolution;
-  centerRotY += (padding[0] - padding[2]) / 2 * resolution;
-  var centerX = centerRotX * cosAngle - centerRotY * sinAngle;
-  var centerY = centerRotY * cosAngle + centerRotX * sinAngle;
-  var center = [centerX, centerY];
-  var callback = options.callback ? options.callback : ol.nullFunction;
-
-  if (options.duration !== undefined) {
-    this.animate({
-      resolution: resolution,
-      center: center,
-      duration: options.duration,
-      easing: options.easing
-    }, callback);
-  } else {
-    this.setResolution(resolution);
-    this.setCenter(center);
-    setTimeout(callback.bind(undefined, true), 0);
-  }
-};
-
-
-/**
- * Center on coordinate and view position.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.Size} size Box pixel size.
- * @param {ol.Pixel} position Position on the view to center on.
- * @api
- */
-ol.View.prototype.centerOn = function(coordinate, size, position) {
-  // calculate rotated position
-  var rotation = this.getRotation();
-  var cosAngle = Math.cos(-rotation);
-  var sinAngle = Math.sin(-rotation);
-  var rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;
-  var rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;
-  var resolution = this.getResolution();
-  rotX += (size[0] / 2 - position[0]) * resolution;
-  rotY += (position[1] - size[1] / 2) * resolution;
-
-  // go back to original angle
-  sinAngle = -sinAngle; // go back to original rotation
-  var centerX = rotX * cosAngle - rotY * sinAngle;
-  var centerY = rotY * cosAngle + rotX * sinAngle;
-
-  this.setCenter([centerX, centerY]);
-};
-
-
-/**
- * @return {boolean} Is defined.
- */
-ol.View.prototype.isDef = function() {
-  return !!this.getCenter() && this.getResolution() !== undefined;
-};
-
-
-/**
- * Rotate the view around a given coordinate.
- * @param {number} rotation New rotation value for the view.
- * @param {ol.Coordinate=} opt_anchor The rotation center.
- * @api
- */
-ol.View.prototype.rotate = function(rotation, opt_anchor) {
-  if (opt_anchor !== undefined) {
-    var center = this.calculateCenterRotate(rotation, opt_anchor);
-    this.setCenter(center);
-  }
-  this.setRotation(rotation);
-};
-
-
-/**
- * Set the center of the current view.
- * @param {ol.Coordinate|undefined} center The center of the view.
- * @observable
- * @api
- */
-ol.View.prototype.setCenter = function(center) {
-  this.set(ol.ViewProperty.CENTER, center);
-  if (this.getAnimating()) {
-    this.cancelAnimations();
-  }
-};
-
-
-/**
- * @param {ol.ViewHint} hint Hint.
- * @param {number} delta Delta.
- * @return {number} New value.
- */
-ol.View.prototype.setHint = function(hint, delta) {
-  this.hints_[hint] += delta;
-  this.changed();
-  return this.hints_[hint];
-};
-
-
-/**
- * Set the resolution for this view.
- * @param {number|undefined} resolution The resolution of the view.
- * @observable
- * @api
- */
-ol.View.prototype.setResolution = function(resolution) {
-  this.set(ol.ViewProperty.RESOLUTION, resolution);
-  if (this.getAnimating()) {
-    this.cancelAnimations();
-  }
-};
-
-
-/**
- * Set the rotation for this view.
- * @param {number} rotation The rotation of the view in radians.
- * @observable
- * @api
- */
-ol.View.prototype.setRotation = function(rotation) {
-  this.set(ol.ViewProperty.ROTATION, rotation);
-  if (this.getAnimating()) {
-    this.cancelAnimations();
-  }
-};
-
-
-/**
- * Zoom to a specific zoom level.
- * @param {number} zoom Zoom level.
- * @api
- */
-ol.View.prototype.setZoom = function(zoom) {
-  var resolution = this.constrainResolution(
-      this.maxResolution_, zoom - this.minZoom_, 0);
-  this.setResolution(resolution);
-};
-
-
-/**
- * @param {olx.ViewOptions} options View options.
- * @private
- * @return {ol.CenterConstraintType} The constraint.
- */
-ol.View.createCenterConstraint_ = function(options) {
-  if (options.extent !== undefined) {
-    return ol.CenterConstraint.createExtent(options.extent);
-  } else {
-    return ol.CenterConstraint.none;
-  }
-};
-
-
-/**
- * @private
- * @param {olx.ViewOptions} options View options.
- * @return {{constraint: ol.ResolutionConstraintType, maxResolution: number,
- *     minResolution: number, zoomFactor: number}} The constraint.
- */
-ol.View.createResolutionConstraint_ = function(options) {
-  var resolutionConstraint;
-  var maxResolution;
-  var minResolution;
-
-  // TODO: move these to be ol constants
-  // see https://github.com/openlayers/openlayers/issues/2076
-  var defaultMaxZoom = 28;
-  var defaultZoomFactor = 2;
-
-  var minZoom = options.minZoom !== undefined ?
-      options.minZoom : ol.DEFAULT_MIN_ZOOM;
-
-  var maxZoom = options.maxZoom !== undefined ?
-      options.maxZoom : defaultMaxZoom;
-
-  var zoomFactor = options.zoomFactor !== undefined ?
-      options.zoomFactor : defaultZoomFactor;
-
-  if (options.resolutions !== undefined) {
-    var resolutions = options.resolutions;
-    maxResolution = resolutions[0];
-    minResolution = resolutions[resolutions.length - 1];
-    resolutionConstraint = ol.ResolutionConstraint.createSnapToResolutions(
-        resolutions);
-  } else {
-    // calculate the default min and max resolution
-    var projection = ol.proj.createProjection(options.projection, 'EPSG:3857');
-    var extent = projection.getExtent();
-    var size = !extent ?
-        // use an extent that can fit the whole world if need be
-        360 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /
-            projection.getMetersPerUnit() :
-        Math.max(ol.extent.getWidth(extent), ol.extent.getHeight(extent));
-
-    var defaultMaxResolution = size / ol.DEFAULT_TILE_SIZE / Math.pow(
-        defaultZoomFactor, ol.DEFAULT_MIN_ZOOM);
-
-    var defaultMinResolution = defaultMaxResolution / Math.pow(
-        defaultZoomFactor, defaultMaxZoom - ol.DEFAULT_MIN_ZOOM);
-
-    // user provided maxResolution takes precedence
-    maxResolution = options.maxResolution;
-    if (maxResolution !== undefined) {
-      minZoom = 0;
-    } else {
-      maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);
-    }
-
-    // user provided minResolution takes precedence
-    minResolution = options.minResolution;
-    if (minResolution === undefined) {
-      if (options.maxZoom !== undefined) {
-        if (options.maxResolution !== undefined) {
-          minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);
-        } else {
-          minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);
-        }
-      } else {
-        minResolution = defaultMinResolution;
-      }
-    }
-
-    // given discrete zoom levels, minResolution may be different than provided
-    maxZoom = minZoom + Math.floor(
-        Math.log(maxResolution / minResolution) / Math.log(zoomFactor));
-    minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);
-
-    resolutionConstraint = ol.ResolutionConstraint.createSnapToPower(
-        zoomFactor, maxResolution, maxZoom - minZoom);
-  }
-  return {constraint: resolutionConstraint, maxResolution: maxResolution,
-    minResolution: minResolution, minZoom: minZoom, zoomFactor: zoomFactor};
-};
-
-
-/**
- * @private
- * @param {olx.ViewOptions} options View options.
- * @return {ol.RotationConstraintType} Rotation constraint.
- */
-ol.View.createRotationConstraint_ = function(options) {
-  var enableRotation = options.enableRotation !== undefined ?
-      options.enableRotation : true;
-  if (enableRotation) {
-    var constrainRotation = options.constrainRotation;
-    if (constrainRotation === undefined || constrainRotation === true) {
-      return ol.RotationConstraint.createSnapToZero();
-    } else if (constrainRotation === false) {
-      return ol.RotationConstraint.none;
-    } else if (typeof constrainRotation === 'number') {
-      return ol.RotationConstraint.createSnapToN(constrainRotation);
-    } else {
-      return ol.RotationConstraint.none;
-    }
-  } else {
-    return ol.RotationConstraint.disable;
-  }
-};
-
-goog.provide('ol.Kinetic');
-
-
-/**
- * @classdesc
- * Implementation of inertial deceleration for map movement.
- *
- * @constructor
- * @param {number} decay Rate of decay (must be negative).
- * @param {number} minVelocity Minimum velocity (pixels/millisecond).
- * @param {number} delay Delay to consider to calculate the kinetic
- *     initial values (milliseconds).
- * @struct
- * @api
- */
-ol.Kinetic = function(decay, minVelocity, delay) {
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.decay_ = decay;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.minVelocity_ = minVelocity;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.delay_ = delay;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.points_ = [];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.angle_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.initialVelocity_ = 0;
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.Kinetic.prototype.begin = function() {
-  this.points_.length = 0;
-  this.angle_ = 0;
-  this.initialVelocity_ = 0;
-};
-
-
-/**
- * @param {number} x X.
- * @param {number} y Y.
- */
-ol.Kinetic.prototype.update = function(x, y) {
-  this.points_.push(x, y, Date.now());
-};
-
-
-/**
- * @return {boolean} Whether we should do kinetic animation.
- */
-ol.Kinetic.prototype.end = function() {
-  if (this.points_.length < 6) {
-    // at least 2 points are required (i.e. there must be at least 6 elements
-    // in the array)
-    return false;
-  }
-  var delay = Date.now() - this.delay_;
-  var lastIndex = this.points_.length - 3;
-  if (this.points_[lastIndex + 2] < delay) {
-    // the last tracked point is too old, which means that the user stopped
-    // panning before releasing the map
-    return false;
-  }
-
-  // get the first point which still falls into the delay time
-  var firstIndex = lastIndex - 3;
-  while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {
-    firstIndex -= 3;
-  }
-
-  var duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];
-  // we don't want a duration of 0 (divide by zero)
-  // we also make sure the user panned for a duration of at least one frame
-  // (1/60s) to compute sane displacement values
-  if (duration < 1000 / 60) {
-    return false;
-  }
-
-  var dx = this.points_[lastIndex] - this.points_[firstIndex];
-  var dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];
-  this.angle_ = Math.atan2(dy, dx);
-  this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;
-  return this.initialVelocity_ > this.minVelocity_;
-};
-
-
-/**
- * @return {number} Total distance travelled (pixels).
- */
-ol.Kinetic.prototype.getDistance = function() {
-  return (this.minVelocity_ - this.initialVelocity_) / this.decay_;
-};
-
-
-/**
- * @return {number} Angle of the kinetic panning animation (radians).
- */
-ol.Kinetic.prototype.getAngle = function() {
-  return this.angle_;
-};
-
-goog.provide('ol.interaction.Property');
-
-/**
- * @enum {string}
- */
-ol.interaction.Property = {
-  ACTIVE: 'active'
-};
-
-// FIXME factor out key precondition (shift et. al)
-
-goog.provide('ol.interaction.Interaction');
-
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.easing');
-goog.require('ol.interaction.Property');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * User actions that change the state of the map. Some are similar to controls,
- * but are not associated with a DOM element.
- * For example, {@link ol.interaction.KeyboardZoom} is functionally the same as
- * {@link ol.control.Zoom}, but triggered by a keyboard event not a button
- * element event.
- * Although interactions do not have a DOM element, some of them do render
- * vectors and so are visible on the screen.
- *
- * @constructor
- * @param {olx.interaction.InteractionOptions} options Options.
- * @extends {ol.Object}
- * @api
- */
-ol.interaction.Interaction = function(options) {
-
-  ol.Object.call(this);
-
-  /**
-   * @private
-   * @type {ol.Map}
-   */
-  this.map_ = null;
-
-  this.setActive(true);
-
-  /**
-   * @type {function(ol.MapBrowserEvent):boolean}
-   */
-  this.handleEvent = options.handleEvent;
-
-};
-ol.inherits(ol.interaction.Interaction, ol.Object);
-
-
-/**
- * Return whether the interaction is currently active.
- * @return {boolean} `true` if the interaction is active, `false` otherwise.
- * @observable
- * @api
- */
-ol.interaction.Interaction.prototype.getActive = function() {
-  return /** @type {boolean} */ (
-      this.get(ol.interaction.Property.ACTIVE));
-};
-
-
-/**
- * Get the map associated with this interaction.
- * @return {ol.Map} Map.
- * @api
- */
-ol.interaction.Interaction.prototype.getMap = function() {
-  return this.map_;
-};
-
-
-/**
- * Activate or deactivate the interaction.
- * @param {boolean} active Active.
- * @observable
- * @api
- */
-ol.interaction.Interaction.prototype.setActive = function(active) {
-  this.set(ol.interaction.Property.ACTIVE, active);
-};
-
-
-/**
- * Remove the interaction from its current map and attach it to the new map.
- * Subclasses may set up event handlers to get notified about changes to
- * the map here.
- * @param {ol.Map} map Map.
- */
-ol.interaction.Interaction.prototype.setMap = function(map) {
-  this.map_ = map;
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {ol.Coordinate} delta Delta.
- * @param {number=} opt_duration Duration.
- */
-ol.interaction.Interaction.pan = function(view, delta, opt_duration) {
-  var currentCenter = view.getCenter();
-  if (currentCenter) {
-    var center = view.constrainCenter(
-        [currentCenter[0] + delta[0], currentCenter[1] + delta[1]]);
-    if (opt_duration) {
-      view.animate({
-        duration: opt_duration,
-        easing: ol.easing.linear,
-        center: center
-      });
-    } else {
-      view.setCenter(center);
-    }
-  }
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {number|undefined} rotation Rotation.
- * @param {ol.Coordinate=} opt_anchor Anchor coordinate.
- * @param {number=} opt_duration Duration.
- */
-ol.interaction.Interaction.rotate = function(view, rotation, opt_anchor, opt_duration) {
-  rotation = view.constrainRotation(rotation, 0);
-  ol.interaction.Interaction.rotateWithoutConstraints(
-      view, rotation, opt_anchor, opt_duration);
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {number|undefined} rotation Rotation.
- * @param {ol.Coordinate=} opt_anchor Anchor coordinate.
- * @param {number=} opt_duration Duration.
- */
-ol.interaction.Interaction.rotateWithoutConstraints = function(view, rotation, opt_anchor, opt_duration) {
-  if (rotation !== undefined) {
-    var currentRotation = view.getRotation();
-    var currentCenter = view.getCenter();
-    if (currentRotation !== undefined && currentCenter && opt_duration > 0) {
-      view.animate({
-        rotation: rotation,
-        anchor: opt_anchor,
-        duration: opt_duration,
-        easing: ol.easing.easeOut
-      });
-    } else {
-      view.rotate(rotation, opt_anchor);
-    }
-  }
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {number|undefined} resolution Resolution to go to.
- * @param {ol.Coordinate=} opt_anchor Anchor coordinate.
- * @param {number=} opt_duration Duration.
- * @param {number=} opt_direction Zooming direction; > 0 indicates
- *     zooming out, in which case the constraints system will select
- *     the largest nearest resolution; < 0 indicates zooming in, in
- *     which case the constraints system will select the smallest
- *     nearest resolution; == 0 indicates that the zooming direction
- *     is unknown/not relevant, in which case the constraints system
- *     will select the nearest resolution. If not defined 0 is
- *     assumed.
- */
-ol.interaction.Interaction.zoom = function(view, resolution, opt_anchor, opt_duration, opt_direction) {
-  resolution = view.constrainResolution(resolution, 0, opt_direction);
-  ol.interaction.Interaction.zoomWithoutConstraints(
-      view, resolution, opt_anchor, opt_duration);
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {number} delta Delta from previous zoom level.
- * @param {ol.Coordinate=} opt_anchor Anchor coordinate.
- * @param {number=} opt_duration Duration.
- */
-ol.interaction.Interaction.zoomByDelta = function(view, delta, opt_anchor, opt_duration) {
-  var currentResolution = view.getResolution();
-  var resolution = view.constrainResolution(currentResolution, delta, 0);
-
-  // If we have a constraint on center, we need to change the anchor so that the
-  // new center is within the extent. We first calculate the new center, apply
-  // the constraint to it, and then calculate back the anchor
-  if (opt_anchor && resolution !== undefined && resolution !== currentResolution) {
-    var currentCenter = view.getCenter();
-    var center = view.calculateCenterZoom(resolution, opt_anchor);
-    center = view.constrainCenter(center);
-
-    opt_anchor = [
-      (resolution * currentCenter[0] - currentResolution * center[0]) /
-          (resolution - currentResolution),
-      (resolution * currentCenter[1] - currentResolution * center[1]) /
-          (resolution - currentResolution)
-    ];
-  }
-
-  ol.interaction.Interaction.zoomWithoutConstraints(
-      view, resolution, opt_anchor, opt_duration);
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {number|undefined} resolution Resolution to go to.
- * @param {ol.Coordinate=} opt_anchor Anchor coordinate.
- * @param {number=} opt_duration Duration.
- */
-ol.interaction.Interaction.zoomWithoutConstraints = function(view, resolution, opt_anchor, opt_duration) {
-  if (resolution) {
-    var currentResolution = view.getResolution();
-    var currentCenter = view.getCenter();
-    if (currentResolution !== undefined && currentCenter &&
-        resolution !== currentResolution && opt_duration) {
-      view.animate({
-        resolution: resolution,
-        anchor: opt_anchor,
-        duration: opt_duration,
-        easing: ol.easing.easeOut
-      });
-    } else {
-      if (opt_anchor) {
-        var center = view.calculateCenterZoom(resolution, opt_anchor);
-        view.setCenter(center);
-      }
-      view.setResolution(resolution);
-    }
-  }
-};
-
-goog.provide('ol.interaction.DoubleClickZoom');
-
-goog.require('ol');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.interaction.Interaction');
-
-
-/**
- * @classdesc
- * Allows the user to zoom by double-clicking on the map.
- *
- * @constructor
- * @extends {ol.interaction.Interaction}
- * @param {olx.interaction.DoubleClickZoomOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DoubleClickZoom = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.delta_ = options.delta ? options.delta : 1;
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.DoubleClickZoom.handleEvent
-  });
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-
-};
-ol.inherits(ol.interaction.DoubleClickZoom, ol.interaction.Interaction);
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} (if it was a
- * doubleclick) and eventually zooms the map.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.DoubleClickZoom}
- * @api
- */
-ol.interaction.DoubleClickZoom.handleEvent = function(mapBrowserEvent) {
-  var stopEvent = false;
-  var browserEvent = mapBrowserEvent.originalEvent;
-  if (mapBrowserEvent.type == ol.MapBrowserEventType.DBLCLICK) {
-    var map = mapBrowserEvent.map;
-    var anchor = mapBrowserEvent.coordinate;
-    var delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;
-    var view = map.getView();
-    ol.interaction.Interaction.zoomByDelta(
-        view, delta, anchor, this.duration_);
-    mapBrowserEvent.preventDefault();
-    stopEvent = true;
-  }
-  return !stopEvent;
-};
-
-goog.provide('ol.events.condition');
-
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.asserts');
-goog.require('ol.functions');
-goog.require('ol.has');
-
-
-/**
- * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when
- * additionally the shift-key is pressed).
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if only the alt key is pressed.
- * @api
- */
-ol.events.condition.altKeyOnly = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return (
-      originalEvent.altKey &&
-      !(originalEvent.metaKey || originalEvent.ctrlKey) &&
-      !originalEvent.shiftKey);
-};
-
-
-/**
- * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise
- * (e.g. when additionally the platform-modifier-key is pressed).
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if only the alt and shift keys are pressed.
- * @api
- */
-ol.events.condition.altShiftKeysOnly = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return (
-      originalEvent.altKey &&
-      !(originalEvent.metaKey || originalEvent.ctrlKey) &&
-      originalEvent.shiftKey);
-};
-
-
-/**
- * Return always true.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True.
- * @function
- * @api
- */
-ol.events.condition.always = ol.functions.TRUE;
-
-
-/**
- * Return `true` if the event is a `click` event, `false` otherwise.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the event is a map `click` event.
- * @api
- */
-ol.events.condition.click = function(mapBrowserEvent) {
-  return mapBrowserEvent.type == ol.MapBrowserEventType.CLICK;
-};
-
-
-/**
- * Return `true` if the event has an "action"-producing mouse button.
- *
- * By definition, this includes left-click on windows/linux, and left-click
- * without the ctrl key on Macs.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} The result.
- */
-ol.events.condition.mouseActionButton = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return originalEvent.button == 0 &&
-      !(ol.has.WEBKIT && ol.has.MAC && originalEvent.ctrlKey);
-};
-
-
-/**
- * Return always false.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} False.
- * @function
- * @api
- */
-ol.events.condition.never = ol.functions.FALSE;
-
-
-/**
- * Return `true` if the browser event is a `pointermove` event, `false`
- * otherwise.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the browser event is a `pointermove` event.
- * @api
- */
-ol.events.condition.pointerMove = function(mapBrowserEvent) {
-  return mapBrowserEvent.type == 'pointermove';
-};
-
-
-/**
- * Return `true` if the event is a map `singleclick` event, `false` otherwise.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the event is a map `singleclick` event.
- * @api
- */
-ol.events.condition.singleClick = function(mapBrowserEvent) {
-  return mapBrowserEvent.type == ol.MapBrowserEventType.SINGLECLICK;
-};
-
-
-/**
- * Return `true` if the event is a map `dblclick` event, `false` otherwise.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the event is a map `dblclick` event.
- * @api
- */
-ol.events.condition.doubleClick = function(mapBrowserEvent) {
-  return mapBrowserEvent.type == ol.MapBrowserEventType.DBLCLICK;
-};
-
-
-/**
- * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is
- * pressed.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True only if there no modifier keys are pressed.
- * @api
- */
-ol.events.condition.noModifierKeys = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return (
-      !originalEvent.altKey &&
-      !(originalEvent.metaKey || originalEvent.ctrlKey) &&
-      !originalEvent.shiftKey);
-};
-
-
-/**
- * Return `true` if only the platform-modifier-key (the meta-key on Mac,
- * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally
- * the shift-key is pressed).
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if only the platform modifier key is pressed.
- * @api
- */
-ol.events.condition.platformModifierKeyOnly = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return (
-      !originalEvent.altKey &&
-      (ol.has.MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&
-      !originalEvent.shiftKey);
-};
-
-
-/**
- * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when
- * additionally the alt-key is pressed).
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if only the shift key is pressed.
- * @api
- */
-ol.events.condition.shiftKeyOnly = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return (
-      !originalEvent.altKey &&
-      !(originalEvent.metaKey || originalEvent.ctrlKey) &&
-      originalEvent.shiftKey);
-};
-
-
-/**
- * Return `true` if the target element is not editable, i.e. not a `<input>`-,
- * `<select>`- or `<textarea>`-element, `false` otherwise.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True only if the target element is not editable.
- * @api
- */
-ol.events.condition.targetNotEditable = function(mapBrowserEvent) {
-  var target = mapBrowserEvent.originalEvent.target;
-  var tagName = target.tagName;
-  return (
-      tagName !== 'INPUT' &&
-      tagName !== 'SELECT' &&
-      tagName !== 'TEXTAREA');
-};
-
-
-/**
- * Return `true` if the event originates from a mouse device.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the event originates from a mouse device.
- * @api
- */
-ol.events.condition.mouseOnly = function(mapBrowserEvent) {
-  ol.asserts.assert(mapBrowserEvent.pointerEvent, 56); // mapBrowserEvent must originate from a pointer event
-  // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType
-  return /** @type {ol.MapBrowserEvent} */ (mapBrowserEvent).pointerEvent.pointerType == 'mouse';
-};
-
-
-/**
- * Return `true` if the event originates from a primary pointer in
- * contact with the surface or if the left mouse button is pressed.
- * @see http://www.w3.org/TR/pointerevents/#button-states
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the event originates from a primary pointer.
- * @api
- */
-ol.events.condition.primaryAction = function(mapBrowserEvent) {
-  var pointerEvent = mapBrowserEvent.pointerEvent;
-  return pointerEvent.isPrimary && pointerEvent.button === 0;
-};
-
-goog.provide('ol.interaction.Pointer');
-
-goog.require('ol');
-goog.require('ol.functions');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.MapBrowserPointerEvent');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Base class that calls user-defined functions on `down`, `move` and `up`
- * events. This class also manages "drag sequences".
- *
- * When the `handleDownEvent` user function returns `true` a drag sequence is
- * started. During a drag sequence the `handleDragEvent` user function is
- * called on `move` events. The drag sequence ends when the `handleUpEvent`
- * user function is called and returns `false`.
- *
- * @constructor
- * @param {olx.interaction.PointerOptions=} opt_options Options.
- * @extends {ol.interaction.Interaction}
- * @api
- */
-ol.interaction.Pointer = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var handleEvent = options.handleEvent ?
-      options.handleEvent : ol.interaction.Pointer.handleEvent;
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: handleEvent
-  });
-
-  /**
-   * @type {function(ol.MapBrowserPointerEvent):boolean}
-   * @private
-   */
-  this.handleDownEvent_ = options.handleDownEvent ?
-      options.handleDownEvent : ol.interaction.Pointer.handleDownEvent;
-
-  /**
-   * @type {function(ol.MapBrowserPointerEvent)}
-   * @private
-   */
-  this.handleDragEvent_ = options.handleDragEvent ?
-      options.handleDragEvent : ol.interaction.Pointer.handleDragEvent;
-
-  /**
-   * @type {function(ol.MapBrowserPointerEvent)}
-   * @private
-   */
-  this.handleMoveEvent_ = options.handleMoveEvent ?
-      options.handleMoveEvent : ol.interaction.Pointer.handleMoveEvent;
-
-  /**
-   * @type {function(ol.MapBrowserPointerEvent):boolean}
-   * @private
-   */
-  this.handleUpEvent_ = options.handleUpEvent ?
-      options.handleUpEvent : ol.interaction.Pointer.handleUpEvent;
-
-  /**
-   * @type {boolean}
-   * @protected
-   */
-  this.handlingDownUpSequence = false;
-
-  /**
-   * @type {Object.<number, ol.pointer.PointerEvent>}
-   * @private
-   */
-  this.trackedPointers_ = {};
-
-  /**
-   * @type {Array.<ol.pointer.PointerEvent>}
-   * @protected
-   */
-  this.targetPointers = [];
-
-};
-ol.inherits(ol.interaction.Pointer, ol.interaction.Interaction);
-
-
-/**
- * @param {Array.<ol.pointer.PointerEvent>} pointerEvents List of events.
- * @return {ol.Pixel} Centroid pixel.
- */
-ol.interaction.Pointer.centroid = function(pointerEvents) {
-  var length = pointerEvents.length;
-  var clientX = 0;
-  var clientY = 0;
-  for (var i = 0; i < length; i++) {
-    clientX += pointerEvents[i].clientX;
-    clientY += pointerEvents[i].clientY;
-  }
-  return [clientX / length, clientY / length];
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Whether the event is a pointerdown, pointerdrag
- *     or pointerup event.
- * @private
- */
-ol.interaction.Pointer.prototype.isPointerDraggingEvent_ = function(mapBrowserEvent) {
-  var type = mapBrowserEvent.type;
-  return (
-      type === ol.MapBrowserEventType.POINTERDOWN ||
-      type === ol.MapBrowserEventType.POINTERDRAG ||
-      type === ol.MapBrowserEventType.POINTERUP);
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @private
- */
-ol.interaction.Pointer.prototype.updateTrackedPointers_ = function(mapBrowserEvent) {
-  if (this.isPointerDraggingEvent_(mapBrowserEvent)) {
-    var event = mapBrowserEvent.pointerEvent;
-
-    if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERUP) {
-      delete this.trackedPointers_[event.pointerId];
-    } else if (mapBrowserEvent.type ==
-        ol.MapBrowserEventType.POINTERDOWN) {
-      this.trackedPointers_[event.pointerId] = event;
-    } else if (event.pointerId in this.trackedPointers_) {
-      // update only when there was a pointerdown event for this pointer
-      this.trackedPointers_[event.pointerId] = event;
-    }
-    this.targetPointers = ol.obj.getValues(this.trackedPointers_);
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.Pointer}
- */
-ol.interaction.Pointer.handleDragEvent = ol.nullFunction;
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Capture dragging.
- * @this {ol.interaction.Pointer}
- */
-ol.interaction.Pointer.handleUpEvent = ol.functions.FALSE;
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Capture dragging.
- * @this {ol.interaction.Pointer}
- */
-ol.interaction.Pointer.handleDownEvent = ol.functions.FALSE;
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.Pointer}
- */
-ol.interaction.Pointer.handleMoveEvent = ol.nullFunction;
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} and may call into
- * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are
- * detected.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.Pointer}
- * @api
- */
-ol.interaction.Pointer.handleEvent = function(mapBrowserEvent) {
-  if (!(mapBrowserEvent instanceof ol.MapBrowserPointerEvent)) {
-    return true;
-  }
-
-  var stopEvent = false;
-  this.updateTrackedPointers_(mapBrowserEvent);
-  if (this.handlingDownUpSequence) {
-    if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERDRAG) {
-      this.handleDragEvent_(mapBrowserEvent);
-    } else if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERUP) {
-      var handledUp = this.handleUpEvent_(mapBrowserEvent);
-      this.handlingDownUpSequence = handledUp && this.targetPointers.length > 0;
-    }
-  } else {
-    if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERDOWN) {
-      var handled = this.handleDownEvent_(mapBrowserEvent);
-      this.handlingDownUpSequence = handled;
-      stopEvent = this.shouldStopEvent(handled);
-    } else if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE) {
-      this.handleMoveEvent_(mapBrowserEvent);
-    }
-  }
-  return !stopEvent;
-};
-
-
-/**
- * This method is used to determine if "down" events should be propagated to
- * other interactions or should be stopped.
- *
- * The method receives the return code of the "handleDownEvent" function.
- *
- * By default this function is the "identity" function. It's overidden in
- * child classes.
- *
- * @param {boolean} handled Was the event handled by the interaction?
- * @return {boolean} Should the event be stopped?
- * @protected
- */
-ol.interaction.Pointer.prototype.shouldStopEvent = function(handled) {
-  return handled;
-};
-
-goog.provide('ol.interaction.DragPan');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.coordinate');
-goog.require('ol.easing');
-goog.require('ol.events.condition');
-goog.require('ol.functions');
-goog.require('ol.interaction.Pointer');
-
-
-/**
- * @classdesc
- * Allows the user to pan the map by dragging the map.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.DragPanOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragPan = function(opt_options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.DragPan.handleDownEvent_,
-    handleDragEvent: ol.interaction.DragPan.handleDragEvent_,
-    handleUpEvent: ol.interaction.DragPan.handleUpEvent_
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {ol.Kinetic|undefined}
-   */
-  this.kinetic_ = options.kinetic;
-
-  /**
-   * @type {ol.Pixel}
-   */
-  this.lastCentroid = null;
-
-  /**
-   * @type {number}
-   */
-  this.lastPointersCount_;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-      options.condition : ol.events.condition.noModifierKeys;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.noKinetic_ = false;
-
-};
-ol.inherits(ol.interaction.DragPan, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.DragPan}
- * @private
- */
-ol.interaction.DragPan.handleDragEvent_ = function(mapBrowserEvent) {
-  var targetPointers = this.targetPointers;
-  var centroid =
-      ol.interaction.Pointer.centroid(targetPointers);
-  if (targetPointers.length == this.lastPointersCount_) {
-    if (this.kinetic_) {
-      this.kinetic_.update(centroid[0], centroid[1]);
-    }
-    if (this.lastCentroid) {
-      var deltaX = this.lastCentroid[0] - centroid[0];
-      var deltaY = centroid[1] - this.lastCentroid[1];
-      var map = mapBrowserEvent.map;
-      var view = map.getView();
-      var viewState = view.getState();
-      var center = [deltaX, deltaY];
-      ol.coordinate.scale(center, viewState.resolution);
-      ol.coordinate.rotate(center, viewState.rotation);
-      ol.coordinate.add(center, viewState.center);
-      center = view.constrainCenter(center);
-      view.setCenter(center);
-    }
-  } else if (this.kinetic_) {
-    // reset so we don't overestimate the kinetic energy after
-    // after one finger down, tiny drag, second finger down
-    this.kinetic_.begin();
-  }
-  this.lastCentroid = centroid;
-  this.lastPointersCount_ = targetPointers.length;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.DragPan}
- * @private
- */
-ol.interaction.DragPan.handleUpEvent_ = function(mapBrowserEvent) {
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  if (this.targetPointers.length === 0) {
-    if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {
-      var distance = this.kinetic_.getDistance();
-      var angle = this.kinetic_.getAngle();
-      var center = /** @type {!ol.Coordinate} */ (view.getCenter());
-      var centerpx = map.getPixelFromCoordinate(center);
-      var dest = map.getCoordinateFromPixel([
-        centerpx[0] - distance * Math.cos(angle),
-        centerpx[1] - distance * Math.sin(angle)
-      ]);
-      view.animate({
-        center: view.constrainCenter(dest),
-        duration: 500,
-        easing: ol.easing.easeOut
-      });
-    }
-    view.setHint(ol.ViewHint.INTERACTING, -1);
-    return false;
-  } else {
-    if (this.kinetic_) {
-      // reset so we don't overestimate the kinetic energy after
-      // after one finger up, tiny drag, second finger up
-      this.kinetic_.begin();
-    }
-    this.lastCentroid = null;
-    return true;
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.DragPan}
- * @private
- */
-ol.interaction.DragPan.handleDownEvent_ = function(mapBrowserEvent) {
-  if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {
-    var map = mapBrowserEvent.map;
-    var view = map.getView();
-    this.lastCentroid = null;
-    if (!this.handlingDownUpSequence) {
-      view.setHint(ol.ViewHint.INTERACTING, 1);
-    }
-    // stop any current animation
-    if (view.getHints()[ol.ViewHint.ANIMATING]) {
-      view.setCenter(mapBrowserEvent.frameState.viewState.center);
-    }
-    if (this.kinetic_) {
-      this.kinetic_.begin();
-    }
-    // No kinetic as soon as more than one pointer on the screen is
-    // detected. This is to prevent nasty pans after pinch.
-    this.noKinetic_ = this.targetPointers.length > 1;
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.DragPan.prototype.shouldStopEvent = ol.functions.FALSE;
-
-goog.provide('ol.interaction.DragRotate');
-
-goog.require('ol');
-goog.require('ol.RotationConstraint');
-goog.require('ol.ViewHint');
-goog.require('ol.events.condition');
-goog.require('ol.functions');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.interaction.Pointer');
-
-
-/**
- * @classdesc
- * Allows the user to rotate the map by clicking and dragging on the map,
- * normally combined with an {@link ol.events.condition} that limits
- * it to when the alt and shift keys are held down.
- *
- * This interaction is only supported for mouse devices.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.DragRotateOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragRotate = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.DragRotate.handleDownEvent_,
-    handleDragEvent: ol.interaction.DragRotate.handleDragEvent_,
-    handleUpEvent: ol.interaction.DragRotate.handleUpEvent_
-  });
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-      options.condition : ol.events.condition.altShiftKeysOnly;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lastAngle_ = undefined;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-};
-ol.inherits(ol.interaction.DragRotate, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.DragRotate}
- * @private
- */
-ol.interaction.DragRotate.handleDragEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return;
-  }
-
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  if (view.getConstraints().rotation === ol.RotationConstraint.disable) {
-    return;
-  }
-  var size = map.getSize();
-  var offset = mapBrowserEvent.pixel;
-  var theta =
-      Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);
-  if (this.lastAngle_ !== undefined) {
-    var delta = theta - this.lastAngle_;
-    var rotation = view.getRotation();
-    ol.interaction.Interaction.rotateWithoutConstraints(
-        view, rotation - delta);
-  }
-  this.lastAngle_ = theta;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.DragRotate}
- * @private
- */
-ol.interaction.DragRotate.handleUpEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return true;
-  }
-
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  view.setHint(ol.ViewHint.INTERACTING, -1);
-  var rotation = view.getRotation();
-  ol.interaction.Interaction.rotate(view, rotation,
-      undefined, this.duration_);
-  return false;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.DragRotate}
- * @private
- */
-ol.interaction.DragRotate.handleDownEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return false;
-  }
-
-  if (ol.events.condition.mouseActionButton(mapBrowserEvent) &&
-      this.condition_(mapBrowserEvent)) {
-    var map = mapBrowserEvent.map;
-    map.getView().setHint(ol.ViewHint.INTERACTING, 1);
-    this.lastAngle_ = undefined;
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.DragRotate.prototype.shouldStopEvent = ol.functions.FALSE;
-
-// FIXME add rotation
-
-goog.provide('ol.render.Box');
-
-goog.require('ol');
-goog.require('ol.Disposable');
-goog.require('ol.geom.Polygon');
-
-
-/**
- * @constructor
- * @extends {ol.Disposable}
- * @param {string} className CSS class name.
- */
-ol.render.Box = function(className) {
-
-  /**
-   * @type {ol.geom.Polygon}
-   * @private
-   */
-  this.geometry_ = null;
-
-  /**
-   * @type {HTMLDivElement}
-   * @private
-   */
-  this.element_ = /** @type {HTMLDivElement} */ (document.createElement('div'));
-  this.element_.style.position = 'absolute';
-  this.element_.className = 'ol-box ' + className;
-
-  /**
-   * @private
-   * @type {ol.Map}
-   */
-  this.map_ = null;
-
-  /**
-   * @private
-   * @type {ol.Pixel}
-   */
-  this.startPixel_ = null;
-
-  /**
-   * @private
-   * @type {ol.Pixel}
-   */
-  this.endPixel_ = null;
-
-};
-ol.inherits(ol.render.Box, ol.Disposable);
-
-
-/**
- * @inheritDoc
- */
-ol.render.Box.prototype.disposeInternal = function() {
-  this.setMap(null);
-};
-
-
-/**
- * @private
- */
-ol.render.Box.prototype.render_ = function() {
-  var startPixel = this.startPixel_;
-  var endPixel = this.endPixel_;
-  var px = 'px';
-  var style = this.element_.style;
-  style.left = Math.min(startPixel[0], endPixel[0]) + px;
-  style.top = Math.min(startPixel[1], endPixel[1]) + px;
-  style.width = Math.abs(endPixel[0] - startPixel[0]) + px;
-  style.height = Math.abs(endPixel[1] - startPixel[1]) + px;
-};
-
-
-/**
- * @param {ol.Map} map Map.
- */
-ol.render.Box.prototype.setMap = function(map) {
-  if (this.map_) {
-    this.map_.getOverlayContainer().removeChild(this.element_);
-    var style = this.element_.style;
-    style.left = style.top = style.width = style.height = 'inherit';
-  }
-  this.map_ = map;
-  if (this.map_) {
-    this.map_.getOverlayContainer().appendChild(this.element_);
-  }
-};
-
-
-/**
- * @param {ol.Pixel} startPixel Start pixel.
- * @param {ol.Pixel} endPixel End pixel.
- */
-ol.render.Box.prototype.setPixels = function(startPixel, endPixel) {
-  this.startPixel_ = startPixel;
-  this.endPixel_ = endPixel;
-  this.createOrUpdateGeometry();
-  this.render_();
-};
-
-
-/**
- * Creates or updates the cached geometry.
- */
-ol.render.Box.prototype.createOrUpdateGeometry = function() {
-  var startPixel = this.startPixel_;
-  var endPixel = this.endPixel_;
-  var pixels = [
-    startPixel,
-    [startPixel[0], endPixel[1]],
-    endPixel,
-    [endPixel[0], startPixel[1]]
-  ];
-  var coordinates = pixels.map(this.map_.getCoordinateFromPixel, this.map_);
-  // close the polygon
-  coordinates[4] = coordinates[0].slice();
-  if (!this.geometry_) {
-    this.geometry_ = new ol.geom.Polygon([coordinates]);
-  } else {
-    this.geometry_.setCoordinates([coordinates]);
-  }
-};
-
-
-/**
- * @return {ol.geom.Polygon} Geometry.
- */
-ol.render.Box.prototype.getGeometry = function() {
-  return this.geometry_;
-};
-
-// FIXME draw drag box
-goog.provide('ol.interaction.DragBox');
-
-goog.require('ol.events.Event');
-goog.require('ol');
-goog.require('ol.events.condition');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.render.Box');
-
-
-/**
- * @classdesc
- * Allows the user to draw a vector box by clicking and dragging on the map,
- * normally combined with an {@link ol.events.condition} that limits
- * it to when the shift or other key is held down. This is used, for example,
- * for zooming to a specific area of the map
- * (see {@link ol.interaction.DragZoom} and
- * {@link ol.interaction.DragRotateAndZoom}).
- *
- * This interaction is only supported for mouse devices.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @fires ol.interaction.DragBox.Event
- * @param {olx.interaction.DragBoxOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragBox = function(opt_options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.DragBox.handleDownEvent_,
-    handleDragEvent: ol.interaction.DragBox.handleDragEvent_,
-    handleUpEvent: ol.interaction.DragBox.handleUpEvent_
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {ol.render.Box}
-   * @private
-   */
-  this.box_ = new ol.render.Box(options.className || 'ol-dragbox');
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.minArea_ = options.minArea !== undefined ? options.minArea : 64;
-
-  /**
-   * @type {ol.Pixel}
-   * @private
-   */
-  this.startPixel_ = null;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-      options.condition : ol.events.condition.always;
-
-  /**
-   * @private
-   * @type {ol.DragBoxEndConditionType}
-   */
-  this.boxEndCondition_ = options.boxEndCondition ?
-      options.boxEndCondition : ol.interaction.DragBox.defaultBoxEndCondition;
-};
-ol.inherits(ol.interaction.DragBox, ol.interaction.Pointer);
-
-
-/**
- * The default condition for determining whether the boxend event
- * should fire.
- * @param {ol.MapBrowserEvent} mapBrowserEvent The originating MapBrowserEvent
- *     leading to the box end.
- * @param {ol.Pixel} startPixel The starting pixel of the box.
- * @param {ol.Pixel} endPixel The end pixel of the box.
- * @return {boolean} Whether or not the boxend condition should be fired.
- * @this {ol.interaction.DragBox}
- */
-ol.interaction.DragBox.defaultBoxEndCondition = function(mapBrowserEvent, startPixel, endPixel) {
-  var width = endPixel[0] - startPixel[0];
-  var height = endPixel[1] - startPixel[1];
-  return width * width + height * height >= this.minArea_;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.DragBox}
- * @private
- */
-ol.interaction.DragBox.handleDragEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return;
-  }
-
-  this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);
-
-  this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType_.BOXDRAG,
-    mapBrowserEvent.coordinate, mapBrowserEvent));
-};
-
-
-/**
- * Returns geometry of last drawn box.
- * @return {ol.geom.Polygon} Geometry.
- * @api
- */
-ol.interaction.DragBox.prototype.getGeometry = function() {
-  return this.box_.getGeometry();
-};
-
-
-/**
- * To be overridden by child classes.
- * FIXME: use constructor option instead of relying on overriding.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @protected
- */
-ol.interaction.DragBox.prototype.onBoxEnd = ol.nullFunction;
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.DragBox}
- * @private
- */
-ol.interaction.DragBox.handleUpEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return true;
-  }
-
-  this.box_.setMap(null);
-
-  if (this.boxEndCondition_(mapBrowserEvent,
-      this.startPixel_, mapBrowserEvent.pixel)) {
-    this.onBoxEnd(mapBrowserEvent);
-    this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType_.BOXEND,
-        mapBrowserEvent.coordinate, mapBrowserEvent));
-  }
-  return false;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.DragBox}
- * @private
- */
-ol.interaction.DragBox.handleDownEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return false;
-  }
-
-  if (ol.events.condition.mouseActionButton(mapBrowserEvent) &&
-      this.condition_(mapBrowserEvent)) {
-    this.startPixel_ = mapBrowserEvent.pixel;
-    this.box_.setMap(mapBrowserEvent.map);
-    this.box_.setPixels(this.startPixel_, this.startPixel_);
-    this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType_.BOXSTART,
-        mapBrowserEvent.coordinate, mapBrowserEvent));
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.interaction.DragBox.EventType_ = {
-  /**
-   * Triggered upon drag box start.
-   * @event ol.interaction.DragBox.Event#boxstart
-   * @api
-   */
-  BOXSTART: 'boxstart',
-
-  /**
-   * Triggered on drag when box is active.
-   * @event ol.interaction.DragBox.Event#boxdrag
-   * @api
-   */
-  BOXDRAG: 'boxdrag',
-
-  /**
-   * Triggered upon drag box end.
-   * @event ol.interaction.DragBox.Event#boxend
-   * @api
-   */
-  BOXEND: 'boxend'
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.DragBox} instances are instances of
- * this type.
- *
- * @param {string} type The event type.
- * @param {ol.Coordinate} coordinate The event coordinate.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Originating event.
- * @extends {ol.events.Event}
- * @constructor
- * @implements {oli.DragBoxEvent}
- */
-ol.interaction.DragBox.Event = function(type, coordinate, mapBrowserEvent) {
-  ol.events.Event.call(this, type);
-
-  /**
-   * The coordinate of the drag event.
-   * @const
-   * @type {ol.Coordinate}
-   * @api
-   */
-  this.coordinate = coordinate;
-
-  /**
-   * @const
-   * @type {ol.MapBrowserEvent}
-   * @api
-   */
-  this.mapBrowserEvent = mapBrowserEvent;
-
-};
-ol.inherits(ol.interaction.DragBox.Event, ol.events.Event);
-
-goog.provide('ol.interaction.DragZoom');
-
-goog.require('ol');
-goog.require('ol.easing');
-goog.require('ol.events.condition');
-goog.require('ol.extent');
-goog.require('ol.interaction.DragBox');
-
-
-/**
- * @classdesc
- * Allows the user to zoom the map by clicking and dragging on the map,
- * normally combined with an {@link ol.events.condition} that limits
- * it to when a key, shift by default, is held down.
- *
- * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or
- * your custom one configured with `className`.
- *
- * @constructor
- * @extends {ol.interaction.DragBox}
- * @param {olx.interaction.DragZoomOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragZoom = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  var condition = options.condition ?
-      options.condition : ol.events.condition.shiftKeyOnly;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 200;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.out_ = options.out !== undefined ? options.out : false;
-
-  ol.interaction.DragBox.call(this, {
-    condition: condition,
-    className: options.className || 'ol-dragzoom'
-  });
-
-};
-ol.inherits(ol.interaction.DragZoom, ol.interaction.DragBox);
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.DragZoom.prototype.onBoxEnd = function() {
-  var map = this.getMap();
-
-  var view = /** @type {!ol.View} */ (map.getView());
-
-  var size = /** @type {!ol.Size} */ (map.getSize());
-
-  var extent = this.getGeometry().getExtent();
-
-  if (this.out_) {
-    var mapExtent = view.calculateExtent(size);
-    var boxPixelExtent = ol.extent.createOrUpdateFromCoordinates([
-      map.getPixelFromCoordinate(ol.extent.getBottomLeft(extent)),
-      map.getPixelFromCoordinate(ol.extent.getTopRight(extent))]);
-    var factor = view.getResolutionForExtent(boxPixelExtent, size);
-
-    ol.extent.scaleFromCenter(mapExtent, 1 / factor);
-    extent = mapExtent;
-  }
-
-  var resolution = view.constrainResolution(
-      view.getResolutionForExtent(extent, size));
-
-  var center = ol.extent.getCenter(extent);
-  center = view.constrainCenter(center);
-
-  view.animate({
-    resolution: resolution,
-    center: center,
-    duration: this.duration_,
-    easing: ol.easing.easeOut
-  });
-
-};
-
-goog.provide('ol.events.KeyCode');
-
-/**
- * @enum {number}
- * @const
- */
-ol.events.KeyCode = {
-  LEFT: 37,
-  UP: 38,
-  RIGHT: 39,
-  DOWN: 40
-};
-
-goog.provide('ol.interaction.KeyboardPan');
-
-goog.require('ol');
-goog.require('ol.coordinate');
-goog.require('ol.events.EventType');
-goog.require('ol.events.KeyCode');
-goog.require('ol.events.condition');
-goog.require('ol.interaction.Interaction');
-
-
-/**
- * @classdesc
- * Allows the user to pan the map using keyboard arrows.
- * Note that, although this interaction is by default included in maps,
- * the keys can only be used when browser focus is on the element to which
- * the keyboard events are attached. By default, this is the map div,
- * though you can change this with the `keyboardEventTarget` in
- * {@link ol.Map}. `document` never loses focus but, for any other element,
- * focus will have to be on, and returned to, this element if the keys are to
- * function.
- * See also {@link ol.interaction.KeyboardZoom}.
- *
- * @constructor
- * @extends {ol.interaction.Interaction}
- * @param {olx.interaction.KeyboardPanOptions=} opt_options Options.
- * @api
- */
-ol.interaction.KeyboardPan = function(opt_options) {
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.KeyboardPan.handleEvent
-  });
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @param {ol.MapBrowserEvent} mapBrowserEvent Browser event.
-   * @return {boolean} Combined condition result.
-   */
-  this.defaultCondition_ = function(mapBrowserEvent) {
-    return ol.events.condition.noModifierKeys(mapBrowserEvent) &&
-      ol.events.condition.targetNotEditable(mapBrowserEvent);
-  };
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition !== undefined ?
-      options.condition : this.defaultCondition_;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 100;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelDelta_ = options.pixelDelta !== undefined ?
-      options.pixelDelta : 128;
-
-};
-ol.inherits(ol.interaction.KeyboardPan, ol.interaction.Interaction);
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} if it was a
- * `KeyEvent`, and decides the direction to pan to (if an arrow key was
- * pressed).
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.KeyboardPan}
- * @api
- */
-ol.interaction.KeyboardPan.handleEvent = function(mapBrowserEvent) {
-  var stopEvent = false;
-  if (mapBrowserEvent.type == ol.events.EventType.KEYDOWN) {
-    var keyEvent = mapBrowserEvent.originalEvent;
-    var keyCode = keyEvent.keyCode;
-    if (this.condition_(mapBrowserEvent) &&
-        (keyCode == ol.events.KeyCode.DOWN ||
-        keyCode == ol.events.KeyCode.LEFT ||
-        keyCode == ol.events.KeyCode.RIGHT ||
-        keyCode == ol.events.KeyCode.UP)) {
-      var map = mapBrowserEvent.map;
-      var view = map.getView();
-      var mapUnitsDelta = view.getResolution() * this.pixelDelta_;
-      var deltaX = 0, deltaY = 0;
-      if (keyCode == ol.events.KeyCode.DOWN) {
-        deltaY = -mapUnitsDelta;
-      } else if (keyCode == ol.events.KeyCode.LEFT) {
-        deltaX = -mapUnitsDelta;
-      } else if (keyCode == ol.events.KeyCode.RIGHT) {
-        deltaX = mapUnitsDelta;
-      } else {
-        deltaY = mapUnitsDelta;
-      }
-      var delta = [deltaX, deltaY];
-      ol.coordinate.rotate(delta, view.getRotation());
-      ol.interaction.Interaction.pan(view, delta, this.duration_);
-      mapBrowserEvent.preventDefault();
-      stopEvent = true;
-    }
-  }
-  return !stopEvent;
-};
-
-goog.provide('ol.interaction.KeyboardZoom');
-
-goog.require('ol');
-goog.require('ol.events.EventType');
-goog.require('ol.events.condition');
-goog.require('ol.interaction.Interaction');
-
-
-/**
- * @classdesc
- * Allows the user to zoom the map using keyboard + and -.
- * Note that, although this interaction is by default included in maps,
- * the keys can only be used when browser focus is on the element to which
- * the keyboard events are attached. By default, this is the map div,
- * though you can change this with the `keyboardEventTarget` in
- * {@link ol.Map}. `document` never loses focus but, for any other element,
- * focus will have to be on, and returned to, this element if the keys are to
- * function.
- * See also {@link ol.interaction.KeyboardPan}.
- *
- * @constructor
- * @param {olx.interaction.KeyboardZoomOptions=} opt_options Options.
- * @extends {ol.interaction.Interaction}
- * @api
- */
-ol.interaction.KeyboardZoom = function(opt_options) {
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.KeyboardZoom.handleEvent
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ? options.condition :
-          ol.events.condition.targetNotEditable;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.delta_ = options.delta ? options.delta : 1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 100;
-
-};
-ol.inherits(ol.interaction.KeyboardZoom, ol.interaction.Interaction);
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} if it was a
- * `KeyEvent`, and decides whether to zoom in or out (depending on whether the
- * key pressed was '+' or '-').
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.KeyboardZoom}
- * @api
- */
-ol.interaction.KeyboardZoom.handleEvent = function(mapBrowserEvent) {
-  var stopEvent = false;
-  if (mapBrowserEvent.type == ol.events.EventType.KEYDOWN ||
-      mapBrowserEvent.type == ol.events.EventType.KEYPRESS) {
-    var keyEvent = mapBrowserEvent.originalEvent;
-    var charCode = keyEvent.charCode;
-    if (this.condition_(mapBrowserEvent) &&
-        (charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))) {
-      var map = mapBrowserEvent.map;
-      var delta = (charCode == '+'.charCodeAt(0)) ? this.delta_ : -this.delta_;
-      var view = map.getView();
-      ol.interaction.Interaction.zoomByDelta(
-          view, delta, undefined, this.duration_);
-      mapBrowserEvent.preventDefault();
-      stopEvent = true;
-    }
-  }
-  return !stopEvent;
-};
-
-goog.provide('ol.interaction.MouseWheelZoom');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.easing');
-goog.require('ol.events.EventType');
-goog.require('ol.has');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * Allows the user to zoom the map by scrolling the mouse wheel.
- *
- * @constructor
- * @extends {ol.interaction.Interaction}
- * @param {olx.interaction.MouseWheelZoomOptions=} opt_options Options.
- * @api
- */
-ol.interaction.MouseWheelZoom = function(opt_options) {
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.MouseWheelZoom.handleEvent
-  });
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.delta_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.timeout_ = options.timeout !== undefined ? options.timeout : 80;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.useAnchor_ = options.useAnchor !== undefined ? options.useAnchor : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.constrainResolution_ = options.constrainResolution || false;
-
-  /**
-   * @private
-   * @type {?ol.Coordinate}
-   */
-  this.lastAnchor_ = null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.startTime_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.timeoutId_ = undefined;
-
-  /**
-   * @private
-   * @type {ol.interaction.MouseWheelZoom.Mode_|undefined}
-   */
-  this.mode_ = undefined;
-
-  /**
-   * Trackpad events separated by this delay will be considered separate
-   * interactions.
-   * @type {number}
-   */
-  this.trackpadEventGap_ = 400;
-
-  /**
-   * @type {number|undefined}
-   */
-  this.trackpadTimeoutId_ = undefined;
-
-  /**
-   * The number of delta values per zoom level
-   * @private
-   * @type {number}
-   */
-  this.trackpadDeltaPerZoom_ = 300;
-
-  /**
-   * The zoom factor by which scroll zooming is allowed to exceed the limits.
-   * @private
-   * @type {number}
-   */
-  this.trackpadZoomBuffer_ = 1.5;
-
-};
-ol.inherits(ol.interaction.MouseWheelZoom, ol.interaction.Interaction);
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} (if it was a
- * mousewheel-event) and eventually zooms the map.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} Allow event propagation.
- * @this {ol.interaction.MouseWheelZoom}
- * @api
- */
-ol.interaction.MouseWheelZoom.handleEvent = function(mapBrowserEvent) {
-  var type = mapBrowserEvent.type;
-  if (type !== ol.events.EventType.WHEEL && type !== ol.events.EventType.MOUSEWHEEL) {
-    return true;
-  }
-
-  mapBrowserEvent.preventDefault();
-
-  var map = mapBrowserEvent.map;
-  var wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);
-
-  if (this.useAnchor_) {
-    this.lastAnchor_ = mapBrowserEvent.coordinate;
-  }
-
-  // Delta normalisation inspired by
-  // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js
-  var delta;
-  if (mapBrowserEvent.type == ol.events.EventType.WHEEL) {
-    delta = wheelEvent.deltaY;
-    if (ol.has.FIREFOX &&
-        wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {
-      delta /= ol.has.DEVICE_PIXEL_RATIO;
-    }
-    if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {
-      delta *= 40;
-    }
-  } else if (mapBrowserEvent.type == ol.events.EventType.MOUSEWHEEL) {
-    delta = -wheelEvent.wheelDeltaY;
-    if (ol.has.SAFARI) {
-      delta /= 3;
-    }
-  }
-
-  if (delta === 0) {
-    return false;
-  }
-
-  var now = Date.now();
-
-  if (this.startTime_ === undefined) {
-    this.startTime_ = now;
-  }
-
-  if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {
-    this.mode_ = Math.abs(delta) < 4 ?
-        ol.interaction.MouseWheelZoom.Mode_.TRACKPAD :
-        ol.interaction.MouseWheelZoom.Mode_.WHEEL;
-  }
-
-  if (this.mode_ === ol.interaction.MouseWheelZoom.Mode_.TRACKPAD) {
-    var view = map.getView();
-    if (this.trackpadTimeoutId_) {
-      clearTimeout(this.trackpadTimeoutId_);
-    } else {
-      view.setHint(ol.ViewHint.INTERACTING, 1);
-    }
-    this.trackpadTimeoutId_ = setTimeout(this.decrementInteractingHint_.bind(this), this.trackpadEventGap_);
-    var resolution = view.getResolution() * Math.pow(2, delta / this.trackpadDeltaPerZoom_);
-    var minResolution = view.getMinResolution();
-    var maxResolution = view.getMaxResolution();
-    var rebound = 0;
-    if (resolution < minResolution) {
-      resolution = Math.max(resolution, minResolution / this.trackpadZoomBuffer_);
-      rebound = 1;
-    } else if (resolution > maxResolution) {
-      resolution = Math.min(resolution, maxResolution * this.trackpadZoomBuffer_);
-      rebound = -1;
-    }
-    if (this.lastAnchor_) {
-      var center = view.calculateCenterZoom(resolution, this.lastAnchor_);
-      view.setCenter(view.constrainCenter(center));
-    }
-    view.setResolution(resolution);
-
-    if (rebound === 0 && this.constrainResolution_) {
-      view.animate({
-        resolution: view.constrainResolution(resolution, delta > 0 ? -1 : 1),
-        easing: ol.easing.easeOut,
-        anchor: this.lastAnchor_,
-        duration: this.duration_
-      });
-    }
-
-    if (rebound > 0) {
-      view.animate({
-        resolution: minResolution,
-        easing: ol.easing.easeOut,
-        anchor: this.lastAnchor_,
-        duration: 500
-      });
-    } else if (rebound < 0) {
-      view.animate({
-        resolution: maxResolution,
-        easing: ol.easing.easeOut,
-        anchor: this.lastAnchor_,
-        duration: 500
-      });
-    }
-    this.startTime_ = now;
-    return false;
-  }
-
-  this.delta_ += delta;
-
-  var timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);
-
-  clearTimeout(this.timeoutId_);
-  this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, map), timeLeft);
-
-  return false;
-};
-
-
-/**
- * @private
- */
-ol.interaction.MouseWheelZoom.prototype.decrementInteractingHint_ = function() {
-  this.trackpadTimeoutId_ = undefined;
-  var view = this.getMap().getView();
-  view.setHint(ol.ViewHint.INTERACTING, -1);
-};
-
-
-/**
- * @private
- * @param {ol.Map} map Map.
- */
-ol.interaction.MouseWheelZoom.prototype.handleWheelZoom_ = function(map) {
-  var view = map.getView();
-  if (view.getAnimating()) {
-    view.cancelAnimations();
-  }
-  var maxDelta = ol.MOUSEWHEELZOOM_MAXDELTA;
-  var delta = ol.math.clamp(this.delta_, -maxDelta, maxDelta);
-  ol.interaction.Interaction.zoomByDelta(view, -delta, this.lastAnchor_,
-      this.duration_);
-  this.mode_ = undefined;
-  this.delta_ = 0;
-  this.lastAnchor_ = null;
-  this.startTime_ = undefined;
-  this.timeoutId_ = undefined;
-};
-
-
-/**
- * Enable or disable using the mouse's location as an anchor when zooming
- * @param {boolean} useAnchor true to zoom to the mouse's location, false
- * to zoom to the center of the map
- * @api
- */
-ol.interaction.MouseWheelZoom.prototype.setMouseAnchor = function(useAnchor) {
-  this.useAnchor_ = useAnchor;
-  if (!useAnchor) {
-    this.lastAnchor_ = null;
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.interaction.MouseWheelZoom.Mode_ = {
-  TRACKPAD: 'trackpad',
-  WHEEL: 'wheel'
-};
-
-goog.provide('ol.interaction.PinchRotate');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.functions');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.RotationConstraint');
-
-
-/**
- * @classdesc
- * Allows the user to rotate the map by twisting with two fingers
- * on a touch screen.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.PinchRotateOptions=} opt_options Options.
- * @api
- */
-ol.interaction.PinchRotate = function(opt_options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.PinchRotate.handleDownEvent_,
-    handleDragEvent: ol.interaction.PinchRotate.handleDragEvent_,
-    handleUpEvent: ol.interaction.PinchRotate.handleUpEvent_
-  });
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.anchor_ = null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lastAngle_ = undefined;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.rotating_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.rotationDelta_ = 0.0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-
-};
-ol.inherits(ol.interaction.PinchRotate, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.PinchRotate}
- * @private
- */
-ol.interaction.PinchRotate.handleDragEvent_ = function(mapBrowserEvent) {
-  var rotationDelta = 0.0;
-
-  var touch0 = this.targetPointers[0];
-  var touch1 = this.targetPointers[1];
-
-  // angle between touches
-  var angle = Math.atan2(
-      touch1.clientY - touch0.clientY,
-      touch1.clientX - touch0.clientX);
-
-  if (this.lastAngle_ !== undefined) {
-    var delta = angle - this.lastAngle_;
-    this.rotationDelta_ += delta;
-    if (!this.rotating_ &&
-        Math.abs(this.rotationDelta_) > this.threshold_) {
-      this.rotating_ = true;
-    }
-    rotationDelta = delta;
-  }
-  this.lastAngle_ = angle;
-
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  if (view.getConstraints().rotation === ol.RotationConstraint.disable) {
-    return;
-  }
-
-  // rotate anchor point.
-  // FIXME: should be the intersection point between the lines:
-  //     touch0,touch1 and previousTouch0,previousTouch1
-  var viewportPosition = map.getViewport().getBoundingClientRect();
-  var centroid = ol.interaction.Pointer.centroid(this.targetPointers);
-  centroid[0] -= viewportPosition.left;
-  centroid[1] -= viewportPosition.top;
-  this.anchor_ = map.getCoordinateFromPixel(centroid);
-
-  // rotate
-  if (this.rotating_) {
-    var rotation = view.getRotation();
-    map.render();
-    ol.interaction.Interaction.rotateWithoutConstraints(view,
-        rotation + rotationDelta, this.anchor_);
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.PinchRotate}
- * @private
- */
-ol.interaction.PinchRotate.handleUpEvent_ = function(mapBrowserEvent) {
-  if (this.targetPointers.length < 2) {
-    var map = mapBrowserEvent.map;
-    var view = map.getView();
-    view.setHint(ol.ViewHint.INTERACTING, -1);
-    if (this.rotating_) {
-      var rotation = view.getRotation();
-      ol.interaction.Interaction.rotate(
-          view, rotation, this.anchor_, this.duration_);
-    }
-    return false;
-  } else {
-    return true;
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.PinchRotate}
- * @private
- */
-ol.interaction.PinchRotate.handleDownEvent_ = function(mapBrowserEvent) {
-  if (this.targetPointers.length >= 2) {
-    var map = mapBrowserEvent.map;
-    this.anchor_ = null;
-    this.lastAngle_ = undefined;
-    this.rotating_ = false;
-    this.rotationDelta_ = 0.0;
-    if (!this.handlingDownUpSequence) {
-      map.getView().setHint(ol.ViewHint.INTERACTING, 1);
-    }
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.PinchRotate.prototype.shouldStopEvent = ol.functions.FALSE;
-
-goog.provide('ol.interaction.PinchZoom');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.functions');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.interaction.Pointer');
-
-
-/**
- * @classdesc
- * Allows the user to zoom the map by pinching with two fingers
- * on a touch screen.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.PinchZoomOptions=} opt_options Options.
- * @api
- */
-ol.interaction.PinchZoom = function(opt_options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.PinchZoom.handleDownEvent_,
-    handleDragEvent: ol.interaction.PinchZoom.handleDragEvent_,
-    handleUpEvent: ol.interaction.PinchZoom.handleUpEvent_
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.constrainResolution_ = options.constrainResolution || false;
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.anchor_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 400;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lastDistance_ = undefined;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.lastScaleDelta_ = 1;
-
-};
-ol.inherits(ol.interaction.PinchZoom, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.PinchZoom}
- * @private
- */
-ol.interaction.PinchZoom.handleDragEvent_ = function(mapBrowserEvent) {
-  var scaleDelta = 1.0;
-
-  var touch0 = this.targetPointers[0];
-  var touch1 = this.targetPointers[1];
-  var dx = touch0.clientX - touch1.clientX;
-  var dy = touch0.clientY - touch1.clientY;
-
-  // distance between touches
-  var distance = Math.sqrt(dx * dx + dy * dy);
-
-  if (this.lastDistance_ !== undefined) {
-    scaleDelta = this.lastDistance_ / distance;
-  }
-  this.lastDistance_ = distance;
-
-
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  var resolution = view.getResolution();
-  var maxResolution = view.getMaxResolution();
-  var minResolution = view.getMinResolution();
-  var newResolution = resolution * scaleDelta;
-  if (newResolution > maxResolution) {
-    scaleDelta = maxResolution / resolution;
-    newResolution = maxResolution;
-  } else if (newResolution < minResolution) {
-    scaleDelta = minResolution / resolution;
-    newResolution = minResolution;
-  }
-
-  if (scaleDelta != 1.0) {
-    this.lastScaleDelta_ = scaleDelta;
-  }
-
-  // scale anchor point.
-  var viewportPosition = map.getViewport().getBoundingClientRect();
-  var centroid = ol.interaction.Pointer.centroid(this.targetPointers);
-  centroid[0] -= viewportPosition.left;
-  centroid[1] -= viewportPosition.top;
-  this.anchor_ = map.getCoordinateFromPixel(centroid);
-
-  // scale, bypass the resolution constraint
-  map.render();
-  ol.interaction.Interaction.zoomWithoutConstraints(view, newResolution, this.anchor_);
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.PinchZoom}
- * @private
- */
-ol.interaction.PinchZoom.handleUpEvent_ = function(mapBrowserEvent) {
-  if (this.targetPointers.length < 2) {
-    var map = mapBrowserEvent.map;
-    var view = map.getView();
-    view.setHint(ol.ViewHint.INTERACTING, -1);
-    var resolution = view.getResolution();
-    if (this.constrainResolution_ ||
-        resolution < view.getMinResolution() ||
-        resolution > view.getMaxResolution()) {
-      // Zoom to final resolution, with an animation, and provide a
-      // direction not to zoom out/in if user was pinching in/out.
-      // Direction is > 0 if pinching out, and < 0 if pinching in.
-      var direction = this.lastScaleDelta_ - 1;
-      ol.interaction.Interaction.zoom(view, resolution,
-          this.anchor_, this.duration_, direction);
-    }
-    return false;
-  } else {
-    return true;
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.PinchZoom}
- * @private
- */
-ol.interaction.PinchZoom.handleDownEvent_ = function(mapBrowserEvent) {
-  if (this.targetPointers.length >= 2) {
-    var map = mapBrowserEvent.map;
-    this.anchor_ = null;
-    this.lastDistance_ = undefined;
-    this.lastScaleDelta_ = 1;
-    if (!this.handlingDownUpSequence) {
-      map.getView().setHint(ol.ViewHint.INTERACTING, 1);
-    }
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.PinchZoom.prototype.shouldStopEvent = ol.functions.FALSE;
-
-goog.provide('ol.interaction');
-
-goog.require('ol.Collection');
-goog.require('ol.Kinetic');
-goog.require('ol.interaction.DoubleClickZoom');
-goog.require('ol.interaction.DragPan');
-goog.require('ol.interaction.DragRotate');
-goog.require('ol.interaction.DragZoom');
-goog.require('ol.interaction.KeyboardPan');
-goog.require('ol.interaction.KeyboardZoom');
-goog.require('ol.interaction.MouseWheelZoom');
-goog.require('ol.interaction.PinchRotate');
-goog.require('ol.interaction.PinchZoom');
-
-
-/**
- * Set of interactions included in maps by default. Specific interactions can be
- * excluded by setting the appropriate option to false in the constructor
- * options, but the order of the interactions is fixed.  If you want to specify
- * a different order for interactions, you will need to create your own
- * {@link ol.interaction.Interaction} instances and insert them into a
- * {@link ol.Collection} in the order you want before creating your
- * {@link ol.Map} instance. The default set of interactions, in sequence, is:
- * * {@link ol.interaction.DragRotate}
- * * {@link ol.interaction.DoubleClickZoom}
- * * {@link ol.interaction.DragPan}
- * * {@link ol.interaction.PinchRotate}
- * * {@link ol.interaction.PinchZoom}
- * * {@link ol.interaction.KeyboardPan}
- * * {@link ol.interaction.KeyboardZoom}
- * * {@link ol.interaction.MouseWheelZoom}
- * * {@link ol.interaction.DragZoom}
- *
- * @param {olx.interaction.DefaultsOptions=} opt_options Defaults options.
- * @return {ol.Collection.<ol.interaction.Interaction>} A collection of
- * interactions to be used with the ol.Map constructor's interactions option.
- * @api
- */
-ol.interaction.defaults = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var interactions = new ol.Collection();
-
-  var kinetic = new ol.Kinetic(-0.005, 0.05, 100);
-
-  var altShiftDragRotate = options.altShiftDragRotate !== undefined ?
-      options.altShiftDragRotate : true;
-  if (altShiftDragRotate) {
-    interactions.push(new ol.interaction.DragRotate());
-  }
-
-  var doubleClickZoom = options.doubleClickZoom !== undefined ?
-      options.doubleClickZoom : true;
-  if (doubleClickZoom) {
-    interactions.push(new ol.interaction.DoubleClickZoom({
-      delta: options.zoomDelta,
-      duration: options.zoomDuration
-    }));
-  }
-
-  var dragPan = options.dragPan !== undefined ? options.dragPan : true;
-  if (dragPan) {
-    interactions.push(new ol.interaction.DragPan({
-      kinetic: kinetic
-    }));
-  }
-
-  var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate :
-      true;
-  if (pinchRotate) {
-    interactions.push(new ol.interaction.PinchRotate());
-  }
-
-  var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;
-  if (pinchZoom) {
-    interactions.push(new ol.interaction.PinchZoom({
-      constrainResolution: options.constrainResolution,
-      duration: options.zoomDuration
-    }));
-  }
-
-  var keyboard = options.keyboard !== undefined ? options.keyboard : true;
-  if (keyboard) {
-    interactions.push(new ol.interaction.KeyboardPan());
-    interactions.push(new ol.interaction.KeyboardZoom({
-      delta: options.zoomDelta,
-      duration: options.zoomDuration
-    }));
-  }
-
-  var mouseWheelZoom = options.mouseWheelZoom !== undefined ?
-      options.mouseWheelZoom : true;
-  if (mouseWheelZoom) {
-    interactions.push(new ol.interaction.MouseWheelZoom({
-      constrainResolution: options.constrainResolution,
-      duration: options.zoomDuration
-    }));
-  }
-
-  var shiftDragZoom = options.shiftDragZoom !== undefined ?
-      options.shiftDragZoom : true;
-  if (shiftDragZoom) {
-    interactions.push(new ol.interaction.DragZoom({
-      duration: options.zoomDuration
-    }));
-  }
-
-  return interactions;
-
-};
-
-goog.provide('ol.layer.Property');
-
-/**
- * @enum {string}
- */
-ol.layer.Property = {
-  OPACITY: 'opacity',
-  VISIBLE: 'visible',
-  EXTENT: 'extent',
-  Z_INDEX: 'zIndex',
-  MAX_RESOLUTION: 'maxResolution',
-  MIN_RESOLUTION: 'minResolution',
-  SOURCE: 'source'
-};
-
-goog.provide('ol.layer.Base');
-
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.layer.Property');
-goog.require('ol.math');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Note that with `ol.layer.Base` and all its subclasses, any property set in
- * the options is set as a {@link ol.Object} property on the layer object, so
- * is observable, and has get/set accessors.
- *
- * @constructor
- * @abstract
- * @extends {ol.Object}
- * @param {olx.layer.BaseOptions} options Layer options.
- * @api
- */
-ol.layer.Base = function(options) {
-
-  ol.Object.call(this);
-
-  /**
-   * @type {Object.<string, *>}
-   */
-  var properties = ol.obj.assign({}, options);
-  properties[ol.layer.Property.OPACITY] =
-      options.opacity !== undefined ? options.opacity : 1;
-  properties[ol.layer.Property.VISIBLE] =
-      options.visible !== undefined ? options.visible : true;
-  properties[ol.layer.Property.Z_INDEX] =
-      options.zIndex !== undefined ? options.zIndex : 0;
-  properties[ol.layer.Property.MAX_RESOLUTION] =
-      options.maxResolution !== undefined ? options.maxResolution : Infinity;
-  properties[ol.layer.Property.MIN_RESOLUTION] =
-      options.minResolution !== undefined ? options.minResolution : 0;
-
-  this.setProperties(properties);
-
-  /**
-   * @type {ol.LayerState}
-   * @private
-   */
-  this.state_ = /** @type {ol.LayerState} */ ({
-    layer: /** @type {ol.layer.Layer} */ (this),
-    managed: true
-  });
-
-};
-ol.inherits(ol.layer.Base, ol.Object);
-
-
-/**
- * Create a renderer for this layer.
- * @abstract
- * @param {ol.renderer.Map} mapRenderer The map renderer.
- * @return {ol.renderer.Layer} A layer renderer.
- */
-ol.layer.Base.prototype.createRenderer = function(mapRenderer) {};
-
-
-/**
- * @return {ol.LayerState} Layer state.
- */
-ol.layer.Base.prototype.getLayerState = function() {
-  this.state_.opacity = ol.math.clamp(this.getOpacity(), 0, 1);
-  this.state_.sourceState = this.getSourceState();
-  this.state_.visible = this.getVisible();
-  this.state_.extent = this.getExtent();
-  this.state_.zIndex = this.getZIndex();
-  this.state_.maxResolution = this.getMaxResolution();
-  this.state_.minResolution = Math.max(this.getMinResolution(), 0);
-
-  return this.state_;
-};
-
-
-/**
- * @abstract
- * @param {Array.<ol.layer.Layer>=} opt_array Array of layers (to be
- *     modified in place).
- * @return {Array.<ol.layer.Layer>} Array of layers.
- */
-ol.layer.Base.prototype.getLayersArray = function(opt_array) {};
-
-
-/**
- * @abstract
- * @param {Array.<ol.LayerState>=} opt_states Optional list of layer
- *     states (to be modified in place).
- * @return {Array.<ol.LayerState>} List of layer states.
- */
-ol.layer.Base.prototype.getLayerStatesArray = function(opt_states) {};
-
-
-/**
- * Return the {@link ol.Extent extent} of the layer or `undefined` if it
- * will be visible regardless of extent.
- * @return {ol.Extent|undefined} The layer extent.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getExtent = function() {
-  return /** @type {ol.Extent|undefined} */ (
-      this.get(ol.layer.Property.EXTENT));
-};
-
-
-/**
- * Return the maximum resolution of the layer.
- * @return {number} The maximum resolution of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getMaxResolution = function() {
-  return /** @type {number} */ (
-      this.get(ol.layer.Property.MAX_RESOLUTION));
-};
-
-
-/**
- * Return the minimum resolution of the layer.
- * @return {number} The minimum resolution of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getMinResolution = function() {
-  return /** @type {number} */ (
-      this.get(ol.layer.Property.MIN_RESOLUTION));
-};
-
-
-/**
- * Return the opacity of the layer (between 0 and 1).
- * @return {number} The opacity of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getOpacity = function() {
-  return /** @type {number} */ (this.get(ol.layer.Property.OPACITY));
-};
-
-
-/**
- * @abstract
- * @return {ol.source.State} Source state.
- */
-ol.layer.Base.prototype.getSourceState = function() {};
-
-
-/**
- * Return the visibility of the layer (`true` or `false`).
- * @return {boolean} The visibility of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getVisible = function() {
-  return /** @type {boolean} */ (this.get(ol.layer.Property.VISIBLE));
-};
-
-
-/**
- * Return the Z-index of the layer, which is used to order layers before
- * rendering. The default Z-index is 0.
- * @return {number} The Z-index of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getZIndex = function() {
-  return /** @type {number} */ (this.get(ol.layer.Property.Z_INDEX));
-};
-
-
-/**
- * Set the extent at which the layer is visible.  If `undefined`, the layer
- * will be visible at all extents.
- * @param {ol.Extent|undefined} extent The extent of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setExtent = function(extent) {
-  this.set(ol.layer.Property.EXTENT, extent);
-};
-
-
-/**
- * Set the maximum resolution at which the layer is visible.
- * @param {number} maxResolution The maximum resolution of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setMaxResolution = function(maxResolution) {
-  this.set(ol.layer.Property.MAX_RESOLUTION, maxResolution);
-};
-
-
-/**
- * Set the minimum resolution at which the layer is visible.
- * @param {number} minResolution The minimum resolution of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setMinResolution = function(minResolution) {
-  this.set(ol.layer.Property.MIN_RESOLUTION, minResolution);
-};
-
-
-/**
- * Set the opacity of the layer, allowed values range from 0 to 1.
- * @param {number} opacity The opacity of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setOpacity = function(opacity) {
-  this.set(ol.layer.Property.OPACITY, opacity);
-};
-
-
-/**
- * Set the visibility of the layer (`true` or `false`).
- * @param {boolean} visible The visibility of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setVisible = function(visible) {
-  this.set(ol.layer.Property.VISIBLE, visible);
-};
-
-
-/**
- * Set Z-index of the layer, which is used to order layers before rendering.
- * The default Z-index is 0.
- * @param {number} zindex The z-index of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setZIndex = function(zindex) {
-  this.set(ol.layer.Property.Z_INDEX, zindex);
-};
-
-goog.provide('ol.source.State');
-
-
-/**
- * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.
- * @enum {string}
- */
-ol.source.State = {
-  UNDEFINED: 'undefined',
-  LOADING: 'loading',
-  READY: 'ready',
-  ERROR: 'error'
-};
-
-
-goog.provide('ol.layer.Group');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.CollectionEventType');
-goog.require('ol.Object');
-goog.require('ol.ObjectEventType');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.layer.Base');
-goog.require('ol.obj');
-goog.require('ol.source.State');
-
-
-/**
- * @classdesc
- * A {@link ol.Collection} of layers that are handled together.
- *
- * A generic `change` event is triggered when the group/Collection changes.
- *
- * @constructor
- * @extends {ol.layer.Base}
- * @param {olx.layer.GroupOptions=} opt_options Layer options.
- * @api
- */
-ol.layer.Group = function(opt_options) {
-
-  var options = opt_options || {};
-  var baseOptions = /** @type {olx.layer.GroupOptions} */
-      (ol.obj.assign({}, options));
-  delete baseOptions.layers;
-
-  var layers = options.layers;
-
-  ol.layer.Base.call(this, baseOptions);
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.layersListenerKeys_ = [];
-
-  /**
-   * @private
-   * @type {Object.<string, Array.<ol.EventsKey>>}
-   */
-  this.listenerKeys_ = {};
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.layer.Group.Property_.LAYERS),
-      this.handleLayersChanged_, this);
-
-  if (layers) {
-    if (Array.isArray(layers)) {
-      layers = new ol.Collection(layers.slice(), {unique: true});
-    } else {
-      ol.asserts.assert(layers instanceof ol.Collection,
-          43); // Expected `layers` to be an array or an `ol.Collection`
-      layers = layers;
-    }
-  } else {
-    layers = new ol.Collection(undefined, {unique: true});
-  }
-
-  this.setLayers(layers);
-
-};
-ol.inherits(ol.layer.Group, ol.layer.Base);
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Group.prototype.createRenderer = function(mapRenderer) {};
-
-
-/**
- * @private
- */
-ol.layer.Group.prototype.handleLayerChange_ = function() {
-  if (this.getVisible()) {
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.events.Event} event Event.
- * @private
- */
-ol.layer.Group.prototype.handleLayersChanged_ = function(event) {
-  this.layersListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.layersListenerKeys_.length = 0;
-
-  var layers = this.getLayers();
-  this.layersListenerKeys_.push(
-      ol.events.listen(layers, ol.CollectionEventType.ADD,
-          this.handleLayersAdd_, this),
-      ol.events.listen(layers, ol.CollectionEventType.REMOVE,
-          this.handleLayersRemove_, this));
-
-  for (var id in this.listenerKeys_) {
-    this.listenerKeys_[id].forEach(ol.events.unlistenByKey);
-  }
-  ol.obj.clear(this.listenerKeys_);
-
-  var layersArray = layers.getArray();
-  var i, ii, layer;
-  for (i = 0, ii = layersArray.length; i < ii; i++) {
-    layer = layersArray[i];
-    this.listenerKeys_[ol.getUid(layer).toString()] = [
-      ol.events.listen(layer, ol.ObjectEventType.PROPERTYCHANGE,
-          this.handleLayerChange_, this),
-      ol.events.listen(layer, ol.events.EventType.CHANGE,
-          this.handleLayerChange_, this)
-    ];
-  }
-
-  this.changed();
-};
-
-
-/**
- * @param {ol.Collection.Event} collectionEvent Collection event.
- * @private
- */
-ol.layer.Group.prototype.handleLayersAdd_ = function(collectionEvent) {
-  var layer = /** @type {ol.layer.Base} */ (collectionEvent.element);
-  var key = ol.getUid(layer).toString();
-  this.listenerKeys_[key] = [
-    ol.events.listen(layer, ol.ObjectEventType.PROPERTYCHANGE,
-        this.handleLayerChange_, this),
-    ol.events.listen(layer, ol.events.EventType.CHANGE,
-        this.handleLayerChange_, this)
-  ];
-  this.changed();
-};
-
-
-/**
- * @param {ol.Collection.Event} collectionEvent Collection event.
- * @private
- */
-ol.layer.Group.prototype.handleLayersRemove_ = function(collectionEvent) {
-  var layer = /** @type {ol.layer.Base} */ (collectionEvent.element);
-  var key = ol.getUid(layer).toString();
-  this.listenerKeys_[key].forEach(ol.events.unlistenByKey);
-  delete this.listenerKeys_[key];
-  this.changed();
-};
-
-
-/**
- * Returns the {@link ol.Collection collection} of {@link ol.layer.Layer layers}
- * in this group.
- * @return {!ol.Collection.<ol.layer.Base>} Collection of
- *   {@link ol.layer.Base layers} that are part of this group.
- * @observable
- * @api
- */
-ol.layer.Group.prototype.getLayers = function() {
-  return /** @type {!ol.Collection.<ol.layer.Base>} */ (this.get(
-      ol.layer.Group.Property_.LAYERS));
-};
-
-
-/**
- * Set the {@link ol.Collection collection} of {@link ol.layer.Layer layers}
- * in this group.
- * @param {!ol.Collection.<ol.layer.Base>} layers Collection of
- *   {@link ol.layer.Base layers} that are part of this group.
- * @observable
- * @api
- */
-ol.layer.Group.prototype.setLayers = function(layers) {
-  this.set(ol.layer.Group.Property_.LAYERS, layers);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Group.prototype.getLayersArray = function(opt_array) {
-  var array = opt_array !== undefined ? opt_array : [];
-  this.getLayers().forEach(function(layer) {
-    layer.getLayersArray(array);
-  });
-  return array;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Group.prototype.getLayerStatesArray = function(opt_states) {
-  var states = opt_states !== undefined ? opt_states : [];
-
-  var pos = states.length;
-
-  this.getLayers().forEach(function(layer) {
-    layer.getLayerStatesArray(states);
-  });
-
-  var ownLayerState = this.getLayerState();
-  var i, ii, layerState;
-  for (i = pos, ii = states.length; i < ii; i++) {
-    layerState = states[i];
-    layerState.opacity *= ownLayerState.opacity;
-    layerState.visible = layerState.visible && ownLayerState.visible;
-    layerState.maxResolution = Math.min(
-        layerState.maxResolution, ownLayerState.maxResolution);
-    layerState.minResolution = Math.max(
-        layerState.minResolution, ownLayerState.minResolution);
-    if (ownLayerState.extent !== undefined) {
-      if (layerState.extent !== undefined) {
-        layerState.extent = ol.extent.getIntersection(
-            layerState.extent, ownLayerState.extent);
-      } else {
-        layerState.extent = ownLayerState.extent;
-      }
-    }
-  }
-
-  return states;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Group.prototype.getSourceState = function() {
-  return ol.source.State.READY;
-};
-
-/**
- * @enum {string}
- * @private
- */
-ol.layer.Group.Property_ = {
-  LAYERS: 'layers'
-};
-
-goog.provide('ol.render.EventType');
-
-/**
- * @enum {string}
- */
-ol.render.EventType = {
-  /**
-   * @event ol.render.Event#postcompose
-   * @api
-   */
-  POSTCOMPOSE: 'postcompose',
-  /**
-   * @event ol.render.Event#precompose
-   * @api
-   */
-  PRECOMPOSE: 'precompose',
-  /**
-   * @event ol.render.Event#render
-   * @api
-   */
-  RENDER: 'render'
-};
-
-goog.provide('ol.layer.Layer');
-
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.layer.Base');
-goog.require('ol.layer.Property');
-goog.require('ol.obj');
-goog.require('ol.render.EventType');
-goog.require('ol.source.State');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * A visual representation of raster or vector map data.
- * Layers group together those properties that pertain to how the data is to be
- * displayed, irrespective of the source of that data.
- *
- * Layers are usually added to a map with {@link ol.Map#addLayer}. Components
- * like {@link ol.interaction.Select} use unmanaged layers internally. These
- * unmanaged layers are associated with the map using
- * {@link ol.layer.Layer#setMap} instead.
- *
- * A generic `change` event is fired when the state of the source changes.
- *
- * @constructor
- * @abstract
- * @extends {ol.layer.Base}
- * @fires ol.render.Event
- * @param {olx.layer.LayerOptions} options Layer options.
- * @api
- */
-ol.layer.Layer = function(options) {
-
-  var baseOptions = ol.obj.assign({}, options);
-  delete baseOptions.source;
-
-  ol.layer.Base.call(this, /** @type {olx.layer.BaseOptions} */ (baseOptions));
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.mapPrecomposeKey_ = null;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.mapRenderKey_ = null;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.sourceChangeKey_ = null;
-
-  if (options.map) {
-    this.setMap(options.map);
-  }
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.layer.Property.SOURCE),
-      this.handleSourcePropertyChange_, this);
-
-  var source = options.source ? options.source : null;
-  this.setSource(source);
-};
-ol.inherits(ol.layer.Layer, ol.layer.Base);
-
-
-/**
- * Return `true` if the layer is visible, and if the passed resolution is
- * between the layer's minResolution and maxResolution. The comparison is
- * inclusive for `minResolution` and exclusive for `maxResolution`.
- * @param {ol.LayerState} layerState Layer state.
- * @param {number} resolution Resolution.
- * @return {boolean} The layer is visible at the given resolution.
- */
-ol.layer.Layer.visibleAtResolution = function(layerState, resolution) {
-  return layerState.visible && resolution >= layerState.minResolution &&
-      resolution < layerState.maxResolution;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Layer.prototype.getLayersArray = function(opt_array) {
-  var array = opt_array ? opt_array : [];
-  array.push(this);
-  return array;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) {
-  var states = opt_states ? opt_states : [];
-  states.push(this.getLayerState());
-  return states;
-};
-
-
-/**
- * Get the layer source.
- * @return {ol.source.Source} The layer source (or `null` if not yet set).
- * @observable
- * @api
- */
-ol.layer.Layer.prototype.getSource = function() {
-  var source = this.get(ol.layer.Property.SOURCE);
-  return /** @type {ol.source.Source} */ (source) || null;
-};
-
-
-/**
-  * @inheritDoc
-  */
-ol.layer.Layer.prototype.getSourceState = function() {
-  var source = this.getSource();
-  return !source ? ol.source.State.UNDEFINED : source.getState();
-};
-
-
-/**
- * @private
- */
-ol.layer.Layer.prototype.handleSourceChange_ = function() {
-  this.changed();
-};
-
-
-/**
- * @private
- */
-ol.layer.Layer.prototype.handleSourcePropertyChange_ = function() {
-  if (this.sourceChangeKey_) {
-    ol.events.unlistenByKey(this.sourceChangeKey_);
-    this.sourceChangeKey_ = null;
-  }
-  var source = this.getSource();
-  if (source) {
-    this.sourceChangeKey_ = ol.events.listen(source,
-        ol.events.EventType.CHANGE, this.handleSourceChange_, this);
-  }
-  this.changed();
-};
-
-
-/**
- * Sets the layer to be rendered on top of other layers on a map. The map will
- * not manage this layer in its layers collection, and the callback in
- * {@link ol.Map#forEachLayerAtPixel} will receive `null` as layer. This
- * is useful for temporary layers. To remove an unmanaged layer from the map,
- * use `#setMap(null)`.
- *
- * To add the layer to a map and have it managed by the map, use
- * {@link ol.Map#addLayer} instead.
- * @param {ol.Map} map Map.
- * @api
- */
-ol.layer.Layer.prototype.setMap = function(map) {
-  if (this.mapPrecomposeKey_) {
-    ol.events.unlistenByKey(this.mapPrecomposeKey_);
-    this.mapPrecomposeKey_ = null;
-  }
-  if (!map) {
-    this.changed();
-  }
-  if (this.mapRenderKey_) {
-    ol.events.unlistenByKey(this.mapRenderKey_);
-    this.mapRenderKey_ = null;
-  }
-  if (map) {
-    this.mapPrecomposeKey_ = ol.events.listen(
-        map, ol.render.EventType.PRECOMPOSE, function(evt) {
-          var layerState = this.getLayerState();
-          layerState.managed = false;
-          layerState.zIndex = Infinity;
-          evt.frameState.layerStatesArray.push(layerState);
-          evt.frameState.layerStates[ol.getUid(this)] = layerState;
-        }, this);
-    this.mapRenderKey_ = ol.events.listen(
-        this, ol.events.EventType.CHANGE, map.render, map);
-    this.changed();
-  }
-};
-
-
-/**
- * Set the layer source.
- * @param {ol.source.Source} source The layer source.
- * @observable
- * @api
- */
-ol.layer.Layer.prototype.setSource = function(source) {
-  this.set(ol.layer.Property.SOURCE, source);
-};
-
-goog.provide('ol.style.IconImageCache');
-
-goog.require('ol.color');
-
-
-/**
- * @constructor
- */
-ol.style.IconImageCache = function() {
-
-  /**
-   * @type {Object.<string, ol.style.IconImage>}
-   * @private
-   */
-  this.cache_ = {};
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.cacheSize_ = 0;
-
-  /**
-   * @const
-   * @type {number}
-   * @private
-   */
-  this.maxCacheSize_ = 32;
-};
-
-
-/**
- * @param {string} src Src.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.Color} color Color.
- * @return {string} Cache key.
- */
-ol.style.IconImageCache.getKey = function(src, crossOrigin, color) {
-  var colorString = color ? ol.color.asString(color) : 'null';
-  return crossOrigin + ':' + src + ':' + colorString;
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.style.IconImageCache.prototype.clear = function() {
-  this.cache_ = {};
-  this.cacheSize_ = 0;
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.style.IconImageCache.prototype.expire = function() {
-  if (this.cacheSize_ > this.maxCacheSize_) {
-    var i = 0;
-    var key, iconImage;
-    for (key in this.cache_) {
-      iconImage = this.cache_[key];
-      if ((i++ & 3) === 0 && !iconImage.hasListener()) {
-        delete this.cache_[key];
-        --this.cacheSize_;
-      }
-    }
-  }
-};
-
-
-/**
- * @param {string} src Src.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.Color} color Color.
- * @return {ol.style.IconImage} Icon image.
- */
-ol.style.IconImageCache.prototype.get = function(src, crossOrigin, color) {
-  var key = ol.style.IconImageCache.getKey(src, crossOrigin, color);
-  return key in this.cache_ ? this.cache_[key] : null;
-};
-
-
-/**
- * @param {string} src Src.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.Color} color Color.
- * @param {ol.style.IconImage} iconImage Icon image.
- */
-ol.style.IconImageCache.prototype.set = function(src, crossOrigin, color, iconImage) {
-  var key = ol.style.IconImageCache.getKey(src, crossOrigin, color);
-  this.cache_[key] = iconImage;
-  ++this.cacheSize_;
-};
-
-goog.provide('ol.style');
-
-goog.require('ol.style.IconImageCache');
-
-ol.style.iconImageCache = new ol.style.IconImageCache();
-
-goog.provide('ol.transform');
-
-goog.require('ol.asserts');
-
-
-/**
- * Collection of affine 2d transformation functions. The functions work on an
- * array of 6 elements. The element order is compatible with the [SVGMatrix
- * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is
- * a subset (elements a to f) of a 3x3 martrix:
- * ```
- * [ a c e ]
- * [ b d f ]
- * [ 0 0 1 ]
- * ```
- */
-
-
-/**
- * @private
- * @type {ol.Transform}
- */
-ol.transform.tmp_ = new Array(6);
-
-
-/**
- * Create an identity transform.
- * @return {!ol.Transform} Identity transform.
- */
-ol.transform.create = function() {
-  return [1, 0, 0, 1, 0, 0];
-};
-
-
-/**
- * Resets the given transform to an identity transform.
- * @param {!ol.Transform} transform Transform.
- * @return {!ol.Transform} Transform.
- */
-ol.transform.reset = function(transform) {
-  return ol.transform.set(transform, 1, 0, 0, 1, 0, 0);
-};
-
-
-/**
- * Multiply the underlying matrices of two transforms and return the result in
- * the first transform.
- * @param {!ol.Transform} transform1 Transform parameters of matrix 1.
- * @param {!ol.Transform} transform2 Transform parameters of matrix 2.
- * @return {!ol.Transform} transform1 multiplied with transform2.
- */
-ol.transform.multiply = function(transform1, transform2) {
-  var a1 = transform1[0];
-  var b1 = transform1[1];
-  var c1 = transform1[2];
-  var d1 = transform1[3];
-  var e1 = transform1[4];
-  var f1 = transform1[5];
-  var a2 = transform2[0];
-  var b2 = transform2[1];
-  var c2 = transform2[2];
-  var d2 = transform2[3];
-  var e2 = transform2[4];
-  var f2 = transform2[5];
-
-  transform1[0] = a1 * a2 + c1 * b2;
-  transform1[1] = b1 * a2 + d1 * b2;
-  transform1[2] = a1 * c2 + c1 * d2;
-  transform1[3] = b1 * c2 + d1 * d2;
-  transform1[4] = a1 * e2 + c1 * f2 + e1;
-  transform1[5] = b1 * e2 + d1 * f2 + f1;
-
-  return transform1;
-};
-
-/**
- * Set the transform components a-f on a given transform.
- * @param {!ol.Transform} transform Transform.
- * @param {number} a The a component of the transform.
- * @param {number} b The b component of the transform.
- * @param {number} c The c component of the transform.
- * @param {number} d The d component of the transform.
- * @param {number} e The e component of the transform.
- * @param {number} f The f component of the transform.
- * @return {!ol.Transform} Matrix with transform applied.
- */
-ol.transform.set = function(transform, a, b, c, d, e, f) {
-  transform[0] = a;
-  transform[1] = b;
-  transform[2] = c;
-  transform[3] = d;
-  transform[4] = e;
-  transform[5] = f;
-  return transform;
-};
-
-
-/**
- * Set transform on one matrix from another matrix.
- * @param {!ol.Transform} transform1 Matrix to set transform to.
- * @param {!ol.Transform} transform2 Matrix to set transform from.
- * @return {!ol.Transform} transform1 with transform from transform2 applied.
- */
-ol.transform.setFromArray = function(transform1, transform2) {
-  transform1[0] = transform2[0];
-  transform1[1] = transform2[1];
-  transform1[2] = transform2[2];
-  transform1[3] = transform2[3];
-  transform1[4] = transform2[4];
-  transform1[5] = transform2[5];
-  return transform1;
-};
-
-
-/**
- * Transforms the given coordinate with the given transform returning the
- * resulting, transformed coordinate. The coordinate will be modified in-place.
- *
- * @param {ol.Transform} transform The transformation.
- * @param {ol.Coordinate|ol.Pixel} coordinate The coordinate to transform.
- * @return {ol.Coordinate|ol.Pixel} return coordinate so that operations can be
- *     chained together.
- */
-ol.transform.apply = function(transform, coordinate) {
-  var x = coordinate[0], y = coordinate[1];
-  coordinate[0] = transform[0] * x + transform[2] * y + transform[4];
-  coordinate[1] = transform[1] * x + transform[3] * y + transform[5];
-  return coordinate;
-};
-
-
-/**
- * Applies rotation to the given transform.
- * @param {!ol.Transform} transform Transform.
- * @param {number} angle Angle in radians.
- * @return {!ol.Transform} The rotated transform.
- */
-ol.transform.rotate = function(transform, angle) {
-  var cos = Math.cos(angle);
-  var sin = Math.sin(angle);
-  return ol.transform.multiply(transform,
-      ol.transform.set(ol.transform.tmp_, cos, sin, -sin, cos, 0, 0));
-};
-
-
-/**
- * Applies scale to a given transform.
- * @param {!ol.Transform} transform Transform.
- * @param {number} x Scale factor x.
- * @param {number} y Scale factor y.
- * @return {!ol.Transform} The scaled transform.
- */
-ol.transform.scale = function(transform, x, y) {
-  return ol.transform.multiply(transform,
-      ol.transform.set(ol.transform.tmp_, x, 0, 0, y, 0, 0));
-};
-
-
-/**
- * Applies translation to the given transform.
- * @param {!ol.Transform} transform Transform.
- * @param {number} dx Translation x.
- * @param {number} dy Translation y.
- * @return {!ol.Transform} The translated transform.
- */
-ol.transform.translate = function(transform, dx, dy) {
-  return ol.transform.multiply(transform,
-      ol.transform.set(ol.transform.tmp_, 1, 0, 0, 1, dx, dy));
-};
-
-
-/**
- * Creates a composite transform given an initial translation, scale, rotation, and
- * final translation (in that order only, not commutative).
- * @param {!ol.Transform} transform The transform (will be modified in place).
- * @param {number} dx1 Initial translation x.
- * @param {number} dy1 Initial translation y.
- * @param {number} sx Scale factor x.
- * @param {number} sy Scale factor y.
- * @param {number} angle Rotation (in counter-clockwise radians).
- * @param {number} dx2 Final translation x.
- * @param {number} dy2 Final translation y.
- * @return {!ol.Transform} The composite transform.
- */
-ol.transform.compose = function(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {
-  var sin = Math.sin(angle);
-  var cos = Math.cos(angle);
-  transform[0] = sx * cos;
-  transform[1] = sy * sin;
-  transform[2] = -sx * sin;
-  transform[3] = sy * cos;
-  transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;
-  transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;
-  return transform;
-};
-
-
-/**
- * Invert the given transform.
- * @param {!ol.Transform} transform Transform.
- * @return {!ol.Transform} Inverse of the transform.
- */
-ol.transform.invert = function(transform) {
-  var det = ol.transform.determinant(transform);
-  ol.asserts.assert(det !== 0, 32); // Transformation matrix cannot be inverted
-
-  var a = transform[0];
-  var b = transform[1];
-  var c = transform[2];
-  var d = transform[3];
-  var e = transform[4];
-  var f = transform[5];
-
-  transform[0] = d / det;
-  transform[1] = -b / det;
-  transform[2] = -c / det;
-  transform[3] = a / det;
-  transform[4] = (c * f - d * e) / det;
-  transform[5] = -(a * f - b * e) / det;
-
-  return transform;
-};
-
-
-/**
- * Returns the determinant of the given matrix.
- * @param {!ol.Transform} mat Matrix.
- * @return {number} Determinant.
- */
-ol.transform.determinant = function(mat) {
-  return mat[0] * mat[3] - mat[1] * mat[2];
-};
-
-goog.provide('ol.renderer.Map');
-
-goog.require('ol');
-goog.require('ol.Disposable');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.layer.Layer');
-goog.require('ol.style');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.Disposable}
- * @param {Element} container Container.
- * @param {ol.Map} map Map.
- * @struct
- */
-ol.renderer.Map = function(container, map) {
-
-  ol.Disposable.call(this);
-
-
-  /**
-   * @private
-   * @type {ol.Map}
-   */
-  this.map_ = map;
-
-  /**
-   * @private
-   * @type {Object.<string, ol.renderer.Layer>}
-   */
-  this.layerRenderers_ = {};
-
-  /**
-   * @private
-   * @type {Object.<string, ol.EventsKey>}
-   */
-  this.layerRendererListeners_ = {};
-
-};
-ol.inherits(ol.renderer.Map, ol.Disposable);
-
-
-/**
- * @param {olx.FrameState} frameState FrameState.
- * @protected
- */
-ol.renderer.Map.prototype.calculateMatrices2D = function(frameState) {
-  var viewState = frameState.viewState;
-  var coordinateToPixelTransform = frameState.coordinateToPixelTransform;
-  var pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;
-
-  ol.transform.compose(coordinateToPixelTransform,
-      frameState.size[0] / 2, frameState.size[1] / 2,
-      1 / viewState.resolution, -1 / viewState.resolution,
-      -viewState.rotation,
-      -viewState.center[0], -viewState.center[1]);
-
-  ol.transform.invert(
-      ol.transform.setFromArray(pixelToCoordinateTransform, coordinateToPixelTransform));
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.Map.prototype.disposeInternal = function() {
-  for (var id in this.layerRenderers_) {
-    this.layerRenderers_[id].dispose();
-  }
-};
-
-
-/**
- * @param {ol.Map} map Map.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.Map.expireIconCache_ = function(map, frameState) {
-  var cache = ol.style.iconImageCache;
-  cache.expire();
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {olx.FrameState} frameState FrameState.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @param {function(this: S, (ol.Feature|ol.render.Feature),
- *     ol.layer.Layer): T} callback Feature callback.
- * @param {S} thisArg Value to use as `this` when executing `callback`.
- * @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter
- *     function, only layers which are visible and for which this function
- *     returns `true` will be tested for features.  By default, all visible
- *     layers will be tested.
- * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.
- * @return {T|undefined} Callback result.
- * @template S,T,U
- */
-ol.renderer.Map.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg,
-        layerFilter, thisArg2) {
-  var result;
-  var viewState = frameState.viewState;
-  var viewResolution = viewState.resolution;
-
-  /**
-   * @param {ol.Feature|ol.render.Feature} feature Feature.
-   * @param {ol.layer.Layer} layer Layer.
-   * @return {?} Callback result.
-   */
-  function forEachFeatureAtCoordinate(feature, layer) {
-    var key = ol.getUid(feature).toString();
-    var managed = frameState.layerStates[ol.getUid(layer)].managed;
-    if (!(key in frameState.skippedFeatureUids && !managed)) {
-      return callback.call(thisArg, feature, managed ? layer : null);
-    }
-  }
-
-  var projection = viewState.projection;
-
-  var translatedCoordinate = coordinate;
-  if (projection.canWrapX()) {
-    var projectionExtent = projection.getExtent();
-    var worldWidth = ol.extent.getWidth(projectionExtent);
-    var x = coordinate[0];
-    if (x < projectionExtent[0] || x > projectionExtent[2]) {
-      var worldsAway = Math.ceil((projectionExtent[0] - x) / worldWidth);
-      translatedCoordinate = [x + worldWidth * worldsAway, coordinate[1]];
-    }
-  }
-
-  var layerStates = frameState.layerStatesArray;
-  var numLayers = layerStates.length;
-  var i;
-  for (i = numLayers - 1; i >= 0; --i) {
-    var layerState = layerStates[i];
-    var layer = layerState.layer;
-    if (ol.layer.Layer.visibleAtResolution(layerState, viewResolution) &&
-        layerFilter.call(thisArg2, layer)) {
-      var layerRenderer = this.getLayerRenderer(layer);
-      if (layer.getSource()) {
-        result = layerRenderer.forEachFeatureAtCoordinate(
-            layer.getSource().getWrapX() ? translatedCoordinate : coordinate,
-            frameState, hitTolerance, forEachFeatureAtCoordinate, thisArg);
-      }
-      if (result) {
-        return result;
-      }
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @abstract
- * @param {ol.Pixel} pixel Pixel.
- * @param {olx.FrameState} frameState FrameState.
- * @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
- *     callback.
- * @param {S} thisArg Value to use as `this` when executing `callback`.
- * @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter
- *     function, only layers which are visible and for which this function
- *     returns `true` will be tested for features.  By default, all visible
- *     layers will be tested.
- * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.
- * @return {T|undefined} Callback result.
- * @template S,T,U
- */
-ol.renderer.Map.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg,
-        layerFilter, thisArg2) {};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {olx.FrameState} frameState FrameState.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter
- *     function, only layers which are visible and for which this function
- *     returns `true` will be tested for features.  By default, all visible
- *     layers will be tested.
- * @param {U} thisArg Value to use as `this` when executing `layerFilter`.
- * @return {boolean} Is there a feature at the given coordinate?
- * @template U
- */
-ol.renderer.Map.prototype.hasFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, layerFilter, thisArg) {
-  var hasFeature = this.forEachFeatureAtCoordinate(
-      coordinate, frameState, hitTolerance, ol.functions.TRUE, this, layerFilter, thisArg);
-
-  return hasFeature !== undefined;
-};
-
-
-/**
- * @param {ol.layer.Layer} layer Layer.
- * @protected
- * @return {ol.renderer.Layer} Layer renderer.
- */
-ol.renderer.Map.prototype.getLayerRenderer = function(layer) {
-  var layerKey = ol.getUid(layer).toString();
-  if (layerKey in this.layerRenderers_) {
-    return this.layerRenderers_[layerKey];
-  } else {
-    var layerRenderer = layer.createRenderer(this);
-    this.layerRenderers_[layerKey] = layerRenderer;
-    this.layerRendererListeners_[layerKey] = ol.events.listen(layerRenderer,
-        ol.events.EventType.CHANGE, this.handleLayerRendererChange_, this);
-
-    return layerRenderer;
-  }
-};
-
-
-/**
- * @param {string} layerKey Layer key.
- * @protected
- * @return {ol.renderer.Layer} Layer renderer.
- */
-ol.renderer.Map.prototype.getLayerRendererByKey = function(layerKey) {
-  return this.layerRenderers_[layerKey];
-};
-
-
-/**
- * @protected
- * @return {Object.<string, ol.renderer.Layer>} Layer renderers.
- */
-ol.renderer.Map.prototype.getLayerRenderers = function() {
-  return this.layerRenderers_;
-};
-
-
-/**
- * @return {ol.Map} Map.
- */
-ol.renderer.Map.prototype.getMap = function() {
-  return this.map_;
-};
-
-
-/**
- * @abstract
- * @return {string} Type
- */
-ol.renderer.Map.prototype.getType = function() {};
-
-
-/**
- * Handle changes in a layer renderer.
- * @private
- */
-ol.renderer.Map.prototype.handleLayerRendererChange_ = function() {
-  this.map_.render();
-};
-
-
-/**
- * @param {string} layerKey Layer key.
- * @return {ol.renderer.Layer} Layer renderer.
- * @private
- */
-ol.renderer.Map.prototype.removeLayerRendererByKey_ = function(layerKey) {
-  var layerRenderer = this.layerRenderers_[layerKey];
-  delete this.layerRenderers_[layerKey];
-
-  ol.events.unlistenByKey(this.layerRendererListeners_[layerKey]);
-  delete this.layerRendererListeners_[layerKey];
-
-  return layerRenderer;
-};
-
-
-/**
- * Render.
- * @param {?olx.FrameState} frameState Frame state.
- */
-ol.renderer.Map.prototype.renderFrame = ol.nullFunction;
-
-
-/**
- * @param {ol.Map} map Map.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.Map.prototype.removeUnusedLayerRenderers_ = function(map, frameState) {
-  var layerKey;
-  for (layerKey in this.layerRenderers_) {
-    if (!frameState || !(layerKey in frameState.layerStates)) {
-      this.removeLayerRendererByKey_(layerKey).dispose();
-    }
-  }
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @protected
- */
-ol.renderer.Map.prototype.scheduleExpireIconCache = function(frameState) {
-  frameState.postRenderFunctions.push(
-    /** @type {ol.PostRenderFunction} */ (ol.renderer.Map.expireIconCache_)
-  );
-};
-
-
-/**
- * @param {!olx.FrameState} frameState Frame state.
- * @protected
- */
-ol.renderer.Map.prototype.scheduleRemoveUnusedLayerRenderers = function(frameState) {
-  var layerKey;
-  for (layerKey in this.layerRenderers_) {
-    if (!(layerKey in frameState.layerStates)) {
-      frameState.postRenderFunctions.push(
-        /** @type {ol.PostRenderFunction} */ (this.removeUnusedLayerRenderers_.bind(this))
-      );
-      return;
-    }
-  }
-};
-
-
-/**
- * @param {ol.LayerState} state1 First layer state.
- * @param {ol.LayerState} state2 Second layer state.
- * @return {number} The zIndex difference.
- */
-ol.renderer.Map.sortByZIndex = function(state1, state2) {
-  return state1.zIndex - state2.zIndex;
-};
-
-goog.provide('ol.renderer.Type');
-
-
-/**
- * Available renderers: `'canvas'` or `'webgl'`.
- * @enum {string}
- */
-ol.renderer.Type = {
-  CANVAS: 'canvas',
-  WEBGL: 'webgl'
-};
-
-goog.provide('ol.render.Event');
-
-goog.require('ol');
-goog.require('ol.events.Event');
-
-
-/**
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.render.Event}
- * @param {ol.render.EventType} type Type.
- * @param {ol.render.VectorContext=} opt_vectorContext Vector context.
- * @param {olx.FrameState=} opt_frameState Frame state.
- * @param {?CanvasRenderingContext2D=} opt_context Context.
- * @param {?ol.webgl.Context=} opt_glContext WebGL Context.
- */
-ol.render.Event = function(
-    type, opt_vectorContext, opt_frameState, opt_context,
-    opt_glContext) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * For canvas, this is an instance of {@link ol.render.canvas.Immediate}.
-   * @type {ol.render.VectorContext|undefined}
-   * @api
-   */
-  this.vectorContext = opt_vectorContext;
-
-  /**
-   * An object representing the current render frame state.
-   * @type {olx.FrameState|undefined}
-   * @api
-   */
-  this.frameState = opt_frameState;
-
-  /**
-   * Canvas context. Only available when a Canvas renderer is used, null
-   * otherwise.
-   * @type {CanvasRenderingContext2D|null|undefined}
-   * @api
-   */
-  this.context = opt_context;
-
-  /**
-   * WebGL context. Only available when a WebGL renderer is used, null
-   * otherwise.
-   * @type {ol.webgl.Context|null|undefined}
-   * @api
-   */
-  this.glContext = opt_glContext;
-
-};
-ol.inherits(ol.render.Event, ol.events.Event);
-
-goog.provide('ol.render.canvas');
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.canvas.defaultFont = '10px sans-serif';
-
-
-/**
- * @const
- * @type {ol.Color}
- */
-ol.render.canvas.defaultFillStyle = [0, 0, 0, 1];
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.canvas.defaultLineCap = 'round';
-
-
-/**
- * @const
- * @type {Array.<number>}
- */
-ol.render.canvas.defaultLineDash = [];
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.canvas.defaultLineDashOffset = 0;
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.canvas.defaultLineJoin = 'round';
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.canvas.defaultMiterLimit = 10;
-
-
-/**
- * @const
- * @type {ol.Color}
- */
-ol.render.canvas.defaultStrokeStyle = [0, 0, 0, 1];
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.canvas.defaultTextAlign = 'center';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.canvas.defaultTextBaseline = 'middle';
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.canvas.defaultLineWidth = 1;
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {number} rotation Rotation.
- * @param {number} offsetX X offset.
- * @param {number} offsetY Y offset.
- */
-ol.render.canvas.rotateAtOffset = function(context, rotation, offsetX, offsetY) {
-  if (rotation !== 0) {
-    context.translate(offsetX, offsetY);
-    context.rotate(rotation);
-    context.translate(-offsetX, -offsetY);
-  }
-};
-
-goog.provide('ol.render.VectorContext');
-
-
-/**
- * Context for drawing geometries.  A vector context is available on render
- * events and does not need to be constructed directly.
- * @constructor
- * @abstract
- * @struct
- * @api
- */
-ol.render.VectorContext = function() {
-};
-
-
-/**
- * Render a geometry.
- *
- * @param {ol.geom.Geometry} geometry The geometry to render.
- */
-ol.render.VectorContext.prototype.drawGeometry = function(geometry) {};
-
-
-/**
- * Set the rendering style.
- *
- * @param {ol.style.Style} style The rendering style.
- */
-ol.render.VectorContext.prototype.setStyle = function(style) {};
-
-
-/**
- * @param {ol.geom.Circle} circleGeometry Circle geometry.
- * @param {ol.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawCircle = function(circleGeometry, feature) {};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @param {ol.style.Style} style Style.
- */
-ol.render.VectorContext.prototype.drawFeature = function(feature, style) {};
-
-
-/**
- * @param {ol.geom.GeometryCollection} geometryCollectionGeometry Geometry
- *     collection.
- * @param {ol.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawGeometryCollection = function(geometryCollectionGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.LineString|ol.render.Feature} lineStringGeometry Line
- *     string geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawLineString = function(lineStringGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.MultiLineString|ol.render.Feature} multiLineStringGeometry
- *     MultiLineString geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.MultiPoint|ol.render.Feature} multiPointGeometry MultiPoint
- *     geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawMultiPoint = function(multiPointGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.Point|ol.render.Feature} pointGeometry Point geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawPoint = function(pointGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.Polygon|ol.render.Feature} polygonGeometry Polygon
- *     geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawPolygon = function(polygonGeometry, feature) {};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawText = function(flatCoordinates, offset, end, stride, geometry, feature) {};
-
-
-/**
- * @param {ol.style.Fill} fillStyle Fill style.
- * @param {ol.style.Stroke} strokeStyle Stroke style.
- */
-ol.render.VectorContext.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {};
-
-
-/**
- * @param {ol.style.Image} imageStyle Image style.
- */
-ol.render.VectorContext.prototype.setImageStyle = function(imageStyle) {};
-
-
-/**
- * @param {ol.style.Text} textStyle Text style.
- */
-ol.render.VectorContext.prototype.setTextStyle = function(textStyle) {};
-
-// FIXME test, especially polygons with holes and multipolygons
-// FIXME need to handle large thick features (where pixel size matters)
-// FIXME add offset and end to ol.geom.flat.transform.transform2D?
-
-goog.provide('ol.render.canvas.Immediate');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.colorlike');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.has');
-goog.require('ol.render.VectorContext');
-goog.require('ol.render.canvas');
-goog.require('ol.transform');
-
-
-/**
- * @classdesc
- * A concrete subclass of {@link ol.render.VectorContext} that implements
- * direct rendering of features and geometries to an HTML5 Canvas context.
- * Instances of this class are created internally by the library and
- * provided to application code as vectorContext member of the
- * {@link ol.render.Event} object associated with postcompose, precompose and
- * render events emitted by layers and maps.
- *
- * @constructor
- * @extends {ol.render.VectorContext}
- * @param {CanvasRenderingContext2D} context Context.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.Extent} extent Extent.
- * @param {ol.Transform} transform Transform.
- * @param {number} viewRotation View rotation.
- * @struct
- */
-ol.render.canvas.Immediate = function(context, pixelRatio, extent, transform, viewRotation) {
-  ol.render.VectorContext.call(this);
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context_ = context;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelRatio_ = pixelRatio;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = extent;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.transform_ = transform;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.viewRotation_ = viewRotation;
-
-  /**
-   * @private
-   * @type {?ol.CanvasFillState}
-   */
-  this.contextFillState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasStrokeState}
-   */
-  this.contextStrokeState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasTextState}
-   */
-  this.contextTextState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasFillState}
-   */
-  this.fillState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasStrokeState}
-   */
-  this.strokeState_ = null;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement|HTMLVideoElement|Image}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageAnchorX_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageAnchorY_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageHeight_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageOpacity_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageOriginX_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageOriginY_ = 0;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.imageRotateWithView_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageRotation_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageScale_ = 0;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.imageSnapToPixel_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageWidth_ = 0;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.text_ = '';
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textOffsetX_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textOffsetY_ = 0;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.textRotateWithView_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textRotation_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textScale_ = 0;
-
-  /**
-   * @private
-   * @type {?ol.CanvasFillState}
-   */
-  this.textFillState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasStrokeState}
-   */
-  this.textStrokeState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasTextState}
-   */
-  this.textState_ = null;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.pixelCoordinates_ = [];
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.tmpLocalTransform_ = ol.transform.create();
-
-};
-ol.inherits(ol.render.canvas.Immediate, ol.render.VectorContext);
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @private
- */
-ol.render.canvas.Immediate.prototype.drawImages_ = function(flatCoordinates, offset, end, stride) {
-  if (!this.image_) {
-    return;
-  }
-  var pixelCoordinates = ol.geom.flat.transform.transform2D(
-      flatCoordinates, offset, end, 2, this.transform_,
-      this.pixelCoordinates_);
-  var context = this.context_;
-  var localTransform = this.tmpLocalTransform_;
-  var alpha = context.globalAlpha;
-  if (this.imageOpacity_ != 1) {
-    context.globalAlpha = alpha * this.imageOpacity_;
-  }
-  var rotation = this.imageRotation_;
-  if (this.imageRotateWithView_) {
-    rotation += this.viewRotation_;
-  }
-  var i, ii;
-  for (i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {
-    var x = pixelCoordinates[i] - this.imageAnchorX_;
-    var y = pixelCoordinates[i + 1] - this.imageAnchorY_;
-    if (this.imageSnapToPixel_) {
-      x = Math.round(x);
-      y = Math.round(y);
-    }
-    if (rotation !== 0 || this.imageScale_ != 1) {
-      var centerX = x + this.imageAnchorX_;
-      var centerY = y + this.imageAnchorY_;
-      ol.transform.compose(localTransform,
-          centerX, centerY,
-          this.imageScale_, this.imageScale_,
-          rotation,
-          -centerX, -centerY);
-      context.setTransform.apply(context, localTransform);
-    }
-    context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_,
-        this.imageWidth_, this.imageHeight_, x, y,
-        this.imageWidth_, this.imageHeight_);
-  }
-  if (rotation !== 0 || this.imageScale_ != 1) {
-    context.setTransform(1, 0, 0, 1, 0, 0);
-  }
-  if (this.imageOpacity_ != 1) {
-    context.globalAlpha = alpha;
-  }
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @private
- */
-ol.render.canvas.Immediate.prototype.drawText_ = function(flatCoordinates, offset, end, stride) {
-  if (!this.textState_ || this.text_ === '') {
-    return;
-  }
-  if (this.textFillState_) {
-    this.setContextFillState_(this.textFillState_);
-  }
-  if (this.textStrokeState_) {
-    this.setContextStrokeState_(this.textStrokeState_);
-  }
-  this.setContextTextState_(this.textState_);
-  var pixelCoordinates = ol.geom.flat.transform.transform2D(
-      flatCoordinates, offset, end, stride, this.transform_,
-      this.pixelCoordinates_);
-  var context = this.context_;
-  var rotation = this.textRotation_;
-  if (this.textRotateWithView_) {
-    rotation += this.viewRotation_;
-  }
-  for (; offset < end; offset += stride) {
-    var x = pixelCoordinates[offset] + this.textOffsetX_;
-    var y = pixelCoordinates[offset + 1] + this.textOffsetY_;
-    if (rotation !== 0 || this.textScale_ != 1) {
-      var localTransform = ol.transform.compose(this.tmpLocalTransform_,
-          x, y,
-          this.textScale_, this.textScale_,
-          rotation,
-          -x, -y);
-      context.setTransform.apply(context, localTransform);
-    }
-    if (this.textStrokeState_) {
-      context.strokeText(this.text_, x, y);
-    }
-    if (this.textFillState_) {
-      context.fillText(this.text_, x, y);
-    }
-  }
-  if (rotation !== 0 || this.textScale_ != 1) {
-    context.setTransform(1, 0, 0, 1, 0, 0);
-  }
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {boolean} close Close.
- * @private
- * @return {number} end End.
- */
-ol.render.canvas.Immediate.prototype.moveToLineTo_ = function(flatCoordinates, offset, end, stride, close) {
-  var context = this.context_;
-  var pixelCoordinates = ol.geom.flat.transform.transform2D(
-      flatCoordinates, offset, end, stride, this.transform_,
-      this.pixelCoordinates_);
-  context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);
-  var length = pixelCoordinates.length;
-  if (close) {
-    length -= 2;
-  }
-  for (var i = 2; i < length; i += 2) {
-    context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);
-  }
-  if (close) {
-    context.closePath();
-  }
-  return end;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @private
- * @return {number} End.
- */
-ol.render.canvas.Immediate.prototype.drawRings_ = function(flatCoordinates, offset, ends, stride) {
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    offset = this.moveToLineTo_(
-        flatCoordinates, offset, ends[i], stride, true);
-  }
-  return offset;
-};
-
-
-/**
- * Render a circle geometry into the canvas.  Rendering is immediate and uses
- * the current fill and stroke styles.
- *
- * @param {ol.geom.Circle} geometry Circle geometry.
- * @override
- * @api
- */
-ol.render.canvas.Immediate.prototype.drawCircle = function(geometry) {
-  if (!ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  if (this.fillState_ || this.strokeState_) {
-    if (this.fillState_) {
-      this.setContextFillState_(this.fillState_);
-    }
-    if (this.strokeState_) {
-      this.setContextStrokeState_(this.strokeState_);
-    }
-    var pixelCoordinates = ol.geom.SimpleGeometry.transform2D(
-        geometry, this.transform_, this.pixelCoordinates_);
-    var dx = pixelCoordinates[2] - pixelCoordinates[0];
-    var dy = pixelCoordinates[3] - pixelCoordinates[1];
-    var radius = Math.sqrt(dx * dx + dy * dy);
-    var context = this.context_;
-    context.beginPath();
-    context.arc(
-        pixelCoordinates[0], pixelCoordinates[1], radius, 0, 2 * Math.PI);
-    if (this.fillState_) {
-      context.fill();
-    }
-    if (this.strokeState_) {
-      context.stroke();
-    }
-  }
-  if (this.text_ !== '') {
-    this.drawText_(geometry.getCenter(), 0, 2, 2);
-  }
-};
-
-
-/**
- * Set the rendering style.  Note that since this is an immediate rendering API,
- * any `zIndex` on the provided style will be ignored.
- *
- * @param {ol.style.Style} style The rendering style.
- * @override
- * @api
- */
-ol.render.canvas.Immediate.prototype.setStyle = function(style) {
-  this.setFillStrokeStyle(style.getFill(), style.getStroke());
-  this.setImageStyle(style.getImage());
-  this.setTextStyle(style.getText());
-};
-
-
-/**
- * Render a geometry into the canvas.  Call
- * {@link ol.render.canvas.Immediate#setStyle} first to set the rendering style.
- *
- * @param {ol.geom.Geometry|ol.render.Feature} geometry The geometry to render.
- * @override
- * @api
- */
-ol.render.canvas.Immediate.prototype.drawGeometry = function(geometry) {
-  var type = geometry.getType();
-  switch (type) {
-    case ol.geom.GeometryType.POINT:
-      this.drawPoint(/** @type {ol.geom.Point} */ (geometry));
-      break;
-    case ol.geom.GeometryType.LINE_STRING:
-      this.drawLineString(/** @type {ol.geom.LineString} */ (geometry));
-      break;
-    case ol.geom.GeometryType.POLYGON:
-      this.drawPolygon(/** @type {ol.geom.Polygon} */ (geometry));
-      break;
-    case ol.geom.GeometryType.MULTI_POINT:
-      this.drawMultiPoint(/** @type {ol.geom.MultiPoint} */ (geometry));
-      break;
-    case ol.geom.GeometryType.MULTI_LINE_STRING:
-      this.drawMultiLineString(/** @type {ol.geom.MultiLineString} */ (geometry));
-      break;
-    case ol.geom.GeometryType.MULTI_POLYGON:
-      this.drawMultiPolygon(/** @type {ol.geom.MultiPolygon} */ (geometry));
-      break;
-    case ol.geom.GeometryType.GEOMETRY_COLLECTION:
-      this.drawGeometryCollection(/** @type {ol.geom.GeometryCollection} */ (geometry));
-      break;
-    case ol.geom.GeometryType.CIRCLE:
-      this.drawCircle(/** @type {ol.geom.Circle} */ (geometry));
-      break;
-    default:
-  }
-};
-
-
-/**
- * Render a feature into the canvas.  Note that any `zIndex` on the provided
- * style will be ignored - features are rendered immediately in the order that
- * this method is called.  If you need `zIndex` support, you should be using an
- * {@link ol.layer.Vector} instead.
- *
- * @param {ol.Feature} feature Feature.
- * @param {ol.style.Style} style Style.
- * @override
- * @api
- */
-ol.render.canvas.Immediate.prototype.drawFeature = function(feature, style) {
-  var geometry = style.getGeometryFunction()(feature);
-  if (!geometry ||
-      !ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  this.setStyle(style);
-  this.drawGeometry(geometry);
-};
-
-
-/**
- * Render a GeometryCollection to the canvas.  Rendering is immediate and
- * uses the current styles appropriate for each geometry in the collection.
- *
- * @param {ol.geom.GeometryCollection} geometry Geometry collection.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawGeometryCollection = function(geometry) {
-  var geometries = geometry.getGeometriesArray();
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    this.drawGeometry(geometries[i]);
-  }
-};
-
-
-/**
- * Render a Point geometry into the canvas.  Rendering is immediate and uses
- * the current style.
- *
- * @param {ol.geom.Point|ol.render.Feature} geometry Point geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawPoint = function(geometry) {
-  var flatCoordinates = geometry.getFlatCoordinates();
-  var stride = geometry.getStride();
-  if (this.image_) {
-    this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);
-  }
-  if (this.text_ !== '') {
-    this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);
-  }
-};
-
-
-/**
- * Render a MultiPoint geometry  into the canvas.  Rendering is immediate and
- * uses the current style.
- *
- * @param {ol.geom.MultiPoint|ol.render.Feature} geometry MultiPoint geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawMultiPoint = function(geometry) {
-  var flatCoordinates = geometry.getFlatCoordinates();
-  var stride = geometry.getStride();
-  if (this.image_) {
-    this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);
-  }
-  if (this.text_ !== '') {
-    this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);
-  }
-};
-
-
-/**
- * Render a LineString into the canvas.  Rendering is immediate and uses
- * the current style.
- *
- * @param {ol.geom.LineString|ol.render.Feature} geometry LineString geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawLineString = function(geometry) {
-  if (!ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  if (this.strokeState_) {
-    this.setContextStrokeState_(this.strokeState_);
-    var context = this.context_;
-    var flatCoordinates = geometry.getFlatCoordinates();
-    context.beginPath();
-    this.moveToLineTo_(flatCoordinates, 0, flatCoordinates.length,
-        geometry.getStride(), false);
-    context.stroke();
-  }
-  if (this.text_ !== '') {
-    var flatMidpoint = geometry.getFlatMidpoint();
-    this.drawText_(flatMidpoint, 0, 2, 2);
-  }
-};
-
-
-/**
- * Render a MultiLineString geometry into the canvas.  Rendering is immediate
- * and uses the current style.
- *
- * @param {ol.geom.MultiLineString|ol.render.Feature} geometry MultiLineString
- *     geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawMultiLineString = function(geometry) {
-  var geometryExtent = geometry.getExtent();
-  if (!ol.extent.intersects(this.extent_, geometryExtent)) {
-    return;
-  }
-  if (this.strokeState_) {
-    this.setContextStrokeState_(this.strokeState_);
-    var context = this.context_;
-    var flatCoordinates = geometry.getFlatCoordinates();
-    var offset = 0;
-    var ends = geometry.getEnds();
-    var stride = geometry.getStride();
-    context.beginPath();
-    var i, ii;
-    for (i = 0, ii = ends.length; i < ii; ++i) {
-      offset = this.moveToLineTo_(
-          flatCoordinates, offset, ends[i], stride, false);
-    }
-    context.stroke();
-  }
-  if (this.text_ !== '') {
-    var flatMidpoints = geometry.getFlatMidpoints();
-    this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);
-  }
-};
-
-
-/**
- * Render a Polygon geometry into the canvas.  Rendering is immediate and uses
- * the current style.
- *
- * @param {ol.geom.Polygon|ol.render.Feature} geometry Polygon geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawPolygon = function(geometry) {
-  if (!ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  if (this.strokeState_ || this.fillState_) {
-    if (this.fillState_) {
-      this.setContextFillState_(this.fillState_);
-    }
-    if (this.strokeState_) {
-      this.setContextStrokeState_(this.strokeState_);
-    }
-    var context = this.context_;
-    context.beginPath();
-    this.drawRings_(geometry.getOrientedFlatCoordinates(),
-        0, geometry.getEnds(), geometry.getStride());
-    if (this.fillState_) {
-      context.fill();
-    }
-    if (this.strokeState_) {
-      context.stroke();
-    }
-  }
-  if (this.text_ !== '') {
-    var flatInteriorPoint = geometry.getFlatInteriorPoint();
-    this.drawText_(flatInteriorPoint, 0, 2, 2);
-  }
-};
-
-
-/**
- * Render MultiPolygon geometry into the canvas.  Rendering is immediate and
- * uses the current style.
- * @param {ol.geom.MultiPolygon} geometry MultiPolygon geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawMultiPolygon = function(geometry) {
-  if (!ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  if (this.strokeState_ || this.fillState_) {
-    if (this.fillState_) {
-      this.setContextFillState_(this.fillState_);
-    }
-    if (this.strokeState_) {
-      this.setContextStrokeState_(this.strokeState_);
-    }
-    var context = this.context_;
-    var flatCoordinates = geometry.getOrientedFlatCoordinates();
-    var offset = 0;
-    var endss = geometry.getEndss();
-    var stride = geometry.getStride();
-    var i, ii;
-    context.beginPath();
-    for (i = 0, ii = endss.length; i < ii; ++i) {
-      var ends = endss[i];
-      offset = this.drawRings_(flatCoordinates, offset, ends, stride);
-    }
-    if (this.fillState_) {
-      context.fill();
-    }
-    if (this.strokeState_) {
-      context.stroke();
-    }
-  }
-  if (this.text_ !== '') {
-    var flatInteriorPoints = geometry.getFlatInteriorPoints();
-    this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);
-  }
-};
-
-
-/**
- * @param {ol.CanvasFillState} fillState Fill state.
- * @private
- */
-ol.render.canvas.Immediate.prototype.setContextFillState_ = function(fillState) {
-  var context = this.context_;
-  var contextFillState = this.contextFillState_;
-  if (!contextFillState) {
-    context.fillStyle = fillState.fillStyle;
-    this.contextFillState_ = {
-      fillStyle: fillState.fillStyle
-    };
-  } else {
-    if (contextFillState.fillStyle != fillState.fillStyle) {
-      contextFillState.fillStyle = context.fillStyle = fillState.fillStyle;
-    }
-  }
-};
-
-
-/**
- * @param {ol.CanvasStrokeState} strokeState Stroke state.
- * @private
- */
-ol.render.canvas.Immediate.prototype.setContextStrokeState_ = function(strokeState) {
-  var context = this.context_;
-  var contextStrokeState = this.contextStrokeState_;
-  if (!contextStrokeState) {
-    context.lineCap = strokeState.lineCap;
-    if (ol.has.CANVAS_LINE_DASH) {
-      context.setLineDash(strokeState.lineDash);
-    }
-    context.lineJoin = strokeState.lineJoin;
-    context.lineWidth = strokeState.lineWidth;
-    context.miterLimit = strokeState.miterLimit;
-    context.strokeStyle = strokeState.strokeStyle;
-    this.contextStrokeState_ = {
-      lineCap: strokeState.lineCap,
-      lineDash: strokeState.lineDash,
-      lineJoin: strokeState.lineJoin,
-      lineWidth: strokeState.lineWidth,
-      miterLimit: strokeState.miterLimit,
-      strokeStyle: strokeState.strokeStyle
-    };
-  } else {
-    if (contextStrokeState.lineCap != strokeState.lineCap) {
-      contextStrokeState.lineCap = context.lineCap = strokeState.lineCap;
-    }
-    if (ol.has.CANVAS_LINE_DASH) {
-      if (!ol.array.equals(
-          contextStrokeState.lineDash, strokeState.lineDash)) {
-        context.setLineDash(contextStrokeState.lineDash = strokeState.lineDash);
-      }
-    }
-    if (contextStrokeState.lineJoin != strokeState.lineJoin) {
-      contextStrokeState.lineJoin = context.lineJoin = strokeState.lineJoin;
-    }
-    if (contextStrokeState.lineWidth != strokeState.lineWidth) {
-      contextStrokeState.lineWidth = context.lineWidth = strokeState.lineWidth;
-    }
-    if (contextStrokeState.miterLimit != strokeState.miterLimit) {
-      contextStrokeState.miterLimit = context.miterLimit =
-          strokeState.miterLimit;
-    }
-    if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {
-      contextStrokeState.strokeStyle = context.strokeStyle =
-          strokeState.strokeStyle;
-    }
-  }
-};
-
-
-/**
- * @param {ol.CanvasTextState} textState Text state.
- * @private
- */
-ol.render.canvas.Immediate.prototype.setContextTextState_ = function(textState) {
-  var context = this.context_;
-  var contextTextState = this.contextTextState_;
-  if (!contextTextState) {
-    context.font = textState.font;
-    context.textAlign = textState.textAlign;
-    context.textBaseline = textState.textBaseline;
-    this.contextTextState_ = {
-      font: textState.font,
-      textAlign: textState.textAlign,
-      textBaseline: textState.textBaseline
-    };
-  } else {
-    if (contextTextState.font != textState.font) {
-      contextTextState.font = context.font = textState.font;
-    }
-    if (contextTextState.textAlign != textState.textAlign) {
-      contextTextState.textAlign = context.textAlign = textState.textAlign;
-    }
-    if (contextTextState.textBaseline != textState.textBaseline) {
-      contextTextState.textBaseline = context.textBaseline =
-          textState.textBaseline;
-    }
-  }
-};
-
-
-/**
- * Set the fill and stroke style for subsequent draw operations.  To clear
- * either fill or stroke styles, pass null for the appropriate parameter.
- *
- * @param {ol.style.Fill} fillStyle Fill style.
- * @param {ol.style.Stroke} strokeStyle Stroke style.
- * @override
- */
-ol.render.canvas.Immediate.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-  if (!fillStyle) {
-    this.fillState_ = null;
-  } else {
-    var fillStyleColor = fillStyle.getColor();
-    this.fillState_ = {
-      fillStyle: ol.colorlike.asColorLike(fillStyleColor ?
-          fillStyleColor : ol.render.canvas.defaultFillStyle)
-    };
-  }
-  if (!strokeStyle) {
-    this.strokeState_ = null;
-  } else {
-    var strokeStyleColor = strokeStyle.getColor();
-    var strokeStyleLineCap = strokeStyle.getLineCap();
-    var strokeStyleLineDash = strokeStyle.getLineDash();
-    var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
-    var strokeStyleLineJoin = strokeStyle.getLineJoin();
-    var strokeStyleWidth = strokeStyle.getWidth();
-    var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
-    this.strokeState_ = {
-      lineCap: strokeStyleLineCap !== undefined ?
-          strokeStyleLineCap : ol.render.canvas.defaultLineCap,
-      lineDash: strokeStyleLineDash ?
-          strokeStyleLineDash : ol.render.canvas.defaultLineDash,
-      lineDashOffset: strokeStyleLineDashOffset ?
-          strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset,
-      lineJoin: strokeStyleLineJoin !== undefined ?
-          strokeStyleLineJoin : ol.render.canvas.defaultLineJoin,
-      lineWidth: this.pixelRatio_ * (strokeStyleWidth !== undefined ?
-          strokeStyleWidth : ol.render.canvas.defaultLineWidth),
-      miterLimit: strokeStyleMiterLimit !== undefined ?
-          strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit,
-      strokeStyle: ol.colorlike.asColorLike(strokeStyleColor ?
-          strokeStyleColor : ol.render.canvas.defaultStrokeStyle)
-    };
-  }
-};
-
-
-/**
- * Set the image style for subsequent draw operations.  Pass null to remove
- * the image style.
- *
- * @param {ol.style.Image} imageStyle Image style.
- * @override
- */
-ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) {
-  if (!imageStyle) {
-    this.image_ = null;
-  } else {
-    var imageAnchor = imageStyle.getAnchor();
-    // FIXME pixel ratio
-    var imageImage = imageStyle.getImage(1);
-    var imageOrigin = imageStyle.getOrigin();
-    var imageSize = imageStyle.getSize();
-    this.imageAnchorX_ = imageAnchor[0];
-    this.imageAnchorY_ = imageAnchor[1];
-    this.imageHeight_ = imageSize[1];
-    this.image_ = imageImage;
-    this.imageOpacity_ = imageStyle.getOpacity();
-    this.imageOriginX_ = imageOrigin[0];
-    this.imageOriginY_ = imageOrigin[1];
-    this.imageRotateWithView_ = imageStyle.getRotateWithView();
-    this.imageRotation_ = imageStyle.getRotation();
-    this.imageScale_ = imageStyle.getScale();
-    this.imageSnapToPixel_ = imageStyle.getSnapToPixel();
-    this.imageWidth_ = imageSize[0];
-  }
-};
-
-
-/**
- * Set the text style for subsequent draw operations.  Pass null to
- * remove the text style.
- *
- * @param {ol.style.Text} textStyle Text style.
- * @override
- */
-ol.render.canvas.Immediate.prototype.setTextStyle = function(textStyle) {
-  if (!textStyle) {
-    this.text_ = '';
-  } else {
-    var textFillStyle = textStyle.getFill();
-    if (!textFillStyle) {
-      this.textFillState_ = null;
-    } else {
-      var textFillStyleColor = textFillStyle.getColor();
-      this.textFillState_ = {
-        fillStyle: ol.colorlike.asColorLike(textFillStyleColor ?
-            textFillStyleColor : ol.render.canvas.defaultFillStyle)
-      };
-    }
-    var textStrokeStyle = textStyle.getStroke();
-    if (!textStrokeStyle) {
-      this.textStrokeState_ = null;
-    } else {
-      var textStrokeStyleColor = textStrokeStyle.getColor();
-      var textStrokeStyleLineCap = textStrokeStyle.getLineCap();
-      var textStrokeStyleLineDash = textStrokeStyle.getLineDash();
-      var textStrokeStyleLineDashOffset = textStrokeStyle.getLineDashOffset();
-      var textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();
-      var textStrokeStyleWidth = textStrokeStyle.getWidth();
-      var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();
-      this.textStrokeState_ = {
-        lineCap: textStrokeStyleLineCap !== undefined ?
-            textStrokeStyleLineCap : ol.render.canvas.defaultLineCap,
-        lineDash: textStrokeStyleLineDash ?
-            textStrokeStyleLineDash : ol.render.canvas.defaultLineDash,
-        lineDashOffset: textStrokeStyleLineDashOffset ?
-            textStrokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset,
-        lineJoin: textStrokeStyleLineJoin !== undefined ?
-            textStrokeStyleLineJoin : ol.render.canvas.defaultLineJoin,
-        lineWidth: textStrokeStyleWidth !== undefined ?
-            textStrokeStyleWidth : ol.render.canvas.defaultLineWidth,
-        miterLimit: textStrokeStyleMiterLimit !== undefined ?
-            textStrokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit,
-        strokeStyle: ol.colorlike.asColorLike(textStrokeStyleColor ?
-            textStrokeStyleColor : ol.render.canvas.defaultStrokeStyle)
-      };
-    }
-    var textFont = textStyle.getFont();
-    var textOffsetX = textStyle.getOffsetX();
-    var textOffsetY = textStyle.getOffsetY();
-    var textRotateWithView = textStyle.getRotateWithView();
-    var textRotation = textStyle.getRotation();
-    var textScale = textStyle.getScale();
-    var textText = textStyle.getText();
-    var textTextAlign = textStyle.getTextAlign();
-    var textTextBaseline = textStyle.getTextBaseline();
-    this.textState_ = {
-      font: textFont !== undefined ?
-          textFont : ol.render.canvas.defaultFont,
-      textAlign: textTextAlign !== undefined ?
-          textTextAlign : ol.render.canvas.defaultTextAlign,
-      textBaseline: textTextBaseline !== undefined ?
-          textTextBaseline : ol.render.canvas.defaultTextBaseline
-    };
-    this.text_ = textText !== undefined ? textText : '';
-    this.textOffsetX_ =
-        textOffsetX !== undefined ? (this.pixelRatio_ * textOffsetX) : 0;
-    this.textOffsetY_ =
-        textOffsetY !== undefined ? (this.pixelRatio_ * textOffsetY) : 0;
-    this.textRotateWithView_ = textRotateWithView !== undefined ? textRotateWithView : false;
-    this.textRotation_ = textRotation !== undefined ? textRotation : 0;
-    this.textScale_ = this.pixelRatio_ * (textScale !== undefined ?
-        textScale : 1);
-  }
-};
-
-// FIXME offset panning
-
-goog.provide('ol.renderer.canvas.Map');
-
-goog.require('ol.transform');
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.layer.Layer');
-goog.require('ol.render.Event');
-goog.require('ol.render.EventType');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.Immediate');
-goog.require('ol.renderer.Map');
-goog.require('ol.renderer.Type');
-goog.require('ol.source.State');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.Map}
- * @param {Element} container Container.
- * @param {ol.Map} map Map.
- */
-ol.renderer.canvas.Map = function(container, map) {
-
-  ol.renderer.Map.call(this, container, map);
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context_ = ol.dom.createCanvasContext2D();
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = this.context_.canvas;
-
-  this.canvas_.style.width = '100%';
-  this.canvas_.style.height = '100%';
-  this.canvas_.style.display = 'block';
-  this.canvas_.className = ol.css.CLASS_UNSELECTABLE;
-  container.insertBefore(this.canvas_, container.childNodes[0] || null);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderedVisible_ = true;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.transform_ = ol.transform.create();
-
-};
-ol.inherits(ol.renderer.canvas.Map, ol.renderer.Map);
-
-
-/**
- * @param {ol.render.EventType} type Event type.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.canvas.Map.prototype.dispatchComposeEvent_ = function(type, frameState) {
-  var map = this.getMap();
-  var context = this.context_;
-  if (map.hasListener(type)) {
-    var extent = frameState.extent;
-    var pixelRatio = frameState.pixelRatio;
-    var viewState = frameState.viewState;
-    var rotation = viewState.rotation;
-
-    var transform = this.getTransform(frameState);
-
-    var vectorContext = new ol.render.canvas.Immediate(context, pixelRatio,
-        extent, transform, rotation);
-    var composeEvent = new ol.render.Event(type, vectorContext,
-        frameState, context, null);
-    map.dispatchEvent(composeEvent);
-  }
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @protected
- * @return {!ol.Transform} Transform.
- */
-ol.renderer.canvas.Map.prototype.getTransform = function(frameState) {
-  var viewState = frameState.viewState;
-  var dx1 = this.canvas_.width / 2;
-  var dy1 = this.canvas_.height / 2;
-  var sx = frameState.pixelRatio / viewState.resolution;
-  var sy = -sx;
-  var angle = -viewState.rotation;
-  var dx2 = -viewState.center[0];
-  var dy2 = -viewState.center[1];
-  return ol.transform.compose(this.transform_, dx1, dy1, sx, sy, angle, dx2, dy2);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.Map.prototype.getType = function() {
-  return ol.renderer.Type.CANVAS;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) {
-
-  if (!frameState) {
-    if (this.renderedVisible_) {
-      this.canvas_.style.display = 'none';
-      this.renderedVisible_ = false;
-    }
-    return;
-  }
-
-  var context = this.context_;
-  var pixelRatio = frameState.pixelRatio;
-  var width = Math.round(frameState.size[0] * pixelRatio);
-  var height = Math.round(frameState.size[1] * pixelRatio);
-  if (this.canvas_.width != width || this.canvas_.height != height) {
-    this.canvas_.width = width;
-    this.canvas_.height = height;
-  } else {
-    context.clearRect(0, 0, width, height);
-  }
-
-  var rotation = frameState.viewState.rotation;
-
-  this.calculateMatrices2D(frameState);
-
-  this.dispatchComposeEvent_(ol.render.EventType.PRECOMPOSE, frameState);
-
-  var layerStatesArray = frameState.layerStatesArray;
-  ol.array.stableSort(layerStatesArray, ol.renderer.Map.sortByZIndex);
-
-  if (rotation) {
-    context.save();
-    ol.render.canvas.rotateAtOffset(context, rotation, width / 2, height / 2);
-  }
-
-  var viewResolution = frameState.viewState.resolution;
-  var i, ii, layer, layerRenderer, layerState;
-  for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {
-    layerState = layerStatesArray[i];
-    layer = layerState.layer;
-    layerRenderer = /** @type {ol.renderer.canvas.Layer} */ (this.getLayerRenderer(layer));
-    if (!ol.layer.Layer.visibleAtResolution(layerState, viewResolution) ||
-        layerState.sourceState != ol.source.State.READY) {
-      continue;
-    }
-    if (layerRenderer.prepareFrame(frameState, layerState)) {
-      layerRenderer.composeFrame(frameState, layerState, context);
-    }
-  }
-
-  if (rotation) {
-    context.restore();
-  }
-
-  this.dispatchComposeEvent_(
-      ol.render.EventType.POSTCOMPOSE, frameState);
-
-  if (!this.renderedVisible_) {
-    this.canvas_.style.display = '';
-    this.renderedVisible_ = true;
-  }
-
-  this.scheduleRemoveUnusedLayerRenderers(frameState);
-  this.scheduleExpireIconCache(frameState);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.Map.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg,
-        layerFilter, thisArg2) {
-  var result;
-  var viewState = frameState.viewState;
-  var viewResolution = viewState.resolution;
-
-  var layerStates = frameState.layerStatesArray;
-  var numLayers = layerStates.length;
-
-  var coordinate = ol.transform.apply(
-      frameState.pixelToCoordinateTransform, pixel.slice());
-
-  var i;
-  for (i = numLayers - 1; i >= 0; --i) {
-    var layerState = layerStates[i];
-    var layer = layerState.layer;
-    if (ol.layer.Layer.visibleAtResolution(layerState, viewResolution) &&
-        layerFilter.call(thisArg2, layer)) {
-      var layerRenderer = /** @type {ol.renderer.canvas.Layer} */ (this.getLayerRenderer(layer));
-      result = layerRenderer.forEachLayerAtCoordinate(
-          coordinate, frameState, callback, thisArg);
-      if (result) {
-        return result;
-      }
-    }
-  }
-  return undefined;
-};
-
-goog.provide('ol.render.ReplayType');
-
-
-/**
- * @enum {string}
- */
-ol.render.ReplayType = {
-  CIRCLE: 'Circle',
-  IMAGE: 'Image',
-  LINE_STRING: 'LineString',
-  POLYGON: 'Polygon',
-  TEXT: 'Text'
-};
-
-goog.provide('ol.render.replay');
-
-goog.require('ol.render.ReplayType');
-
-
-/**
- * @const
- * @type {Array.<ol.render.ReplayType>}
- */
-ol.render.replay.ORDER = [
-  ol.render.ReplayType.POLYGON,
-  ol.render.ReplayType.CIRCLE,
-  ol.render.ReplayType.LINE_STRING,
-  ol.render.ReplayType.IMAGE,
-  ol.render.ReplayType.TEXT
-];
-
-goog.provide('ol.render.ReplayGroup');
-
-
-/**
- * Base class for replay groups.
- * @constructor
- * @abstract
- */
-ol.render.ReplayGroup = function() {};
-
-
-/**
- * @abstract
- * @param {number|undefined} zIndex Z index.
- * @param {ol.render.ReplayType} replayType Replay type.
- * @return {ol.render.VectorContext} Replay.
- */
-ol.render.ReplayGroup.prototype.getReplay = function(zIndex, replayType) {};
-
-
-/**
- * @abstract
- * @return {boolean} Is empty.
- */
-ol.render.ReplayGroup.prototype.isEmpty = function() {};
-
-goog.provide('ol.webgl.Shader');
-
-goog.require('ol');
-goog.require('ol.functions');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @abstract
-   * @param {string} source Source.
-   * @struct
-   */
-  ol.webgl.Shader = function(source) {
-
-    /**
-     * @private
-     * @type {string}
-     */
-    this.source_ = source;
-
-  };
-
-
-  /**
-   * @abstract
-   * @return {number} Type.
-   */
-  ol.webgl.Shader.prototype.getType = function() {};
-
-
-  /**
-   * @return {string} Source.
-   */
-  ol.webgl.Shader.prototype.getSource = function() {
-    return this.source_;
-  };
-
-
-  /**
-   * @return {boolean} Is animated?
-   */
-  ol.webgl.Shader.prototype.isAnimated = ol.functions.FALSE;
-
-}
-
-goog.provide('ol.webgl.Fragment');
-
-goog.require('ol');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Shader');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Shader}
-   * @param {string} source Source.
-   * @struct
-   */
-  ol.webgl.Fragment = function(source) {
-    ol.webgl.Shader.call(this, source);
-  };
-  ol.inherits(ol.webgl.Fragment, ol.webgl.Shader);
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.webgl.Fragment.prototype.getType = function() {
-    return ol.webgl.FRAGMENT_SHADER;
-  };
-
-}
-
-goog.provide('ol.webgl.Vertex');
-
-goog.require('ol');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Shader');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Shader}
-   * @param {string} source Source.
-   * @struct
-   */
-  ol.webgl.Vertex = function(source) {
-    ol.webgl.Shader.call(this, source);
-  };
-  ol.inherits(ol.webgl.Vertex, ol.webgl.Shader);
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.webgl.Vertex.prototype.getType = function() {
-    return ol.webgl.VERTEX_SHADER;
-  };
-
-}
-
-// This file is automatically generated, do not edit
-/* eslint openlayers-internal/no-missing-requires: 0 */
-goog.provide('ol.render.webgl.circlereplay.defaultshader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Fragment}
-   * @struct
-   */
-  ol.render.webgl.circlereplay.defaultshader.Fragment = function() {
-    ol.webgl.Fragment.call(this, ol.render.webgl.circlereplay.defaultshader.Fragment.SOURCE);
-  };
-  ol.inherits(ol.render.webgl.circlereplay.defaultshader.Fragment, ol.webgl.Fragment);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.circlereplay.defaultshader.Fragment.DEBUG_SOURCE = 'precision mediump float;\nvarying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_fillColor;\nuniform vec4 u_strokeColor;\nuniform vec2 u_size;\n\nvoid main(void) {\n  vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n      (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n  vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n      (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n  float radius = length(windowCenter - windowOffset);\n  float dist = length(windowCenter - gl_FragCoord.xy);\n  if (dist > radius + v_halfWidth) {\n    if (u_strokeColor.a == 0.0) {\n      gl_FragColor = u_fillColor;\n    } else {\n      gl_FragColor = u_strokeColor;\n    }\n    gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\n  } else if (u_fillColor.a == 0.0) {\n    // Hooray, no fill, just stroke. We can use real antialiasing.\n    gl_FragColor = u_strokeColor;\n    if (dist < radius - v_halfWidth) {\n      gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\n    }\n  } else {\n    gl_FragColor = u_fillColor;\n    float strokeDist = radius - v_halfWidth;\n    float antialias = 2.0 * v_pixelRatio;\n    if (dist > strokeDist) {\n      gl_FragColor = u_strokeColor;\n    } else if (dist >= strokeDist - antialias) {\n      float step = smoothstep(strokeDist - antialias, strokeDist, dist);\n      gl_FragColor = mix(u_fillColor, u_strokeColor, step);\n    }\n  }\n  gl_FragColor.a = gl_FragColor.a * u_opacity;\n  if (gl_FragColor.a <= 0.0) {\n    discard;\n  }\n}\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.circlereplay.defaultshader.Fragment.OPTIMIZED_SOURCE = 'precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.circlereplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
-      ol.render.webgl.circlereplay.defaultshader.Fragment.DEBUG_SOURCE :
-      ol.render.webgl.circlereplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
-
-
-  ol.render.webgl.circlereplay.defaultshader.fragment = new ol.render.webgl.circlereplay.defaultshader.Fragment();
-
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Vertex}
-   * @struct
-   */
-  ol.render.webgl.circlereplay.defaultshader.Vertex = function() {
-    ol.webgl.Vertex.call(this, ol.render.webgl.circlereplay.defaultshader.Vertex.SOURCE);
-  };
-  ol.inherits(ol.render.webgl.circlereplay.defaultshader.Vertex, ol.webgl.Vertex);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.circlereplay.defaultshader.Vertex.DEBUG_SOURCE = 'varying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\nattribute vec2 a_position;\nattribute float a_instruction;\nattribute float a_radius;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\n  v_pixelRatio = u_pixelRatio;\n  float lineWidth = u_lineWidth * u_pixelRatio;\n  v_halfWidth = lineWidth / 2.0;\n  if (lineWidth == 0.0) {\n    lineWidth = 2.0 * u_pixelRatio;\n  }\n  vec2 offset;\n  // Radius with anitaliasing (roughly).\n  float radius = a_radius + 3.0 * u_pixelRatio;\n  // Until we get gl_VertexID in WebGL, we store an instruction.\n  if (a_instruction == 0.0) {\n    // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\n    // we should also leave some space for the antialiasing, thus we offset by lineWidth.\n    offset = vec2(-1.0, 1.0);\n  } else if (a_instruction == 1.0) {\n    offset = vec2(-1.0, -1.0);\n  } else if (a_instruction == 2.0) {\n    offset = vec2(1.0, -1.0);\n  } else {\n    offset = vec2(1.0, 1.0);\n  }\n\n  gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\n      offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\n  v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\n      0.0, 1.0)).xy;\n\n  if (distance(v_center, v_offset) > 20000.0) {\n    gl_Position = vec4(v_center, 0.0, 1.0);\n  }\n}\n\n\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.circlereplay.defaultshader.Vertex.OPTIMIZED_SOURCE = 'varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;if(f==0.0){offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.circlereplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
-      ol.render.webgl.circlereplay.defaultshader.Vertex.DEBUG_SOURCE :
-      ol.render.webgl.circlereplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
-
-
-  ol.render.webgl.circlereplay.defaultshader.vertex = new ol.render.webgl.circlereplay.defaultshader.Vertex();
-
-
-  /**
-   * @constructor
-   * @param {WebGLRenderingContext} gl GL.
-   * @param {WebGLProgram} program Program.
-   * @struct
-   */
-  ol.render.webgl.circlereplay.defaultshader.Locations = function(gl, program) {
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_fillColor = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_fillColor' : 'n');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_lineWidth = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_lineWidth' : 'k');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_offsetRotateMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_offsetScaleMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_opacity = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_opacity' : 'm');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_pixelRatio = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_pixelRatio' : 'l');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_projectionMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_size = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_size' : 'p');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_strokeColor = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_strokeColor' : 'o');
-
-    /**
-     * @type {number}
-     */
-    this.a_instruction = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_instruction' : 'f');
-
-    /**
-     * @type {number}
-     */
-    this.a_position = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_position' : 'e');
-
-    /**
-     * @type {number}
-     */
-    this.a_radius = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_radius' : 'g');
-  };
-
-}
-
-goog.provide('ol.vec.Mat4');
-
-
-/**
- * @return {Array.<number>} 4x4 matrix representing a 3D identity transform.
- */
-ol.vec.Mat4.create = function() {
-  return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
-};
-
-
-/**
- * @param {Array.<number>} mat4 Flattened 4x4 matrix receiving the result.
- * @param {ol.Transform} transform Transformation matrix.
- * @return {Array.<number>} 2D transformation matrix as flattened 4x4 matrix.
- */
-ol.vec.Mat4.fromTransform = function(mat4, transform) {
-  mat4[0] = transform[0];
-  mat4[1] = transform[1];
-  mat4[4] = transform[2];
-  mat4[5] = transform[3];
-  mat4[12] = transform[4];
-  mat4[13] = transform[5];
-  return mat4;
-};
-
-goog.provide('ol.render.webgl.Replay');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.render.VectorContext');
-goog.require('ol.transform');
-goog.require('ol.vec.Mat4');
-goog.require('ol.webgl');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @abstract
-   * @extends {ol.render.VectorContext}
-   * @param {number} tolerance Tolerance.
-   * @param {ol.Extent} maxExtent Max extent.
-   * @struct
-   */
-  ol.render.webgl.Replay = function(tolerance, maxExtent) {
-    ol.render.VectorContext.call(this);
-
-    /**
-     * @protected
-     * @type {number}
-     */
-    this.tolerance = tolerance;
-
-    /**
-     * @protected
-     * @const
-     * @type {ol.Extent}
-     */
-    this.maxExtent = maxExtent;
-
-    /**
-     * The origin of the coordinate system for the point coordinates sent to
-     * the GPU. To eliminate jitter caused by precision problems in the GPU
-     * we use the "Rendering Relative to Eye" technique described in the "3D
-     * Engine Design for Virtual Globes" book.
-     * @protected
-     * @type {ol.Coordinate}
-     */
-    this.origin = ol.extent.getCenter(maxExtent);
-
-    /**
-     * @private
-     * @type {ol.Transform}
-     */
-    this.projectionMatrix_ = ol.transform.create();
-
-    /**
-     * @private
-     * @type {ol.Transform}
-     */
-    this.offsetRotateMatrix_ = ol.transform.create();
-
-    /**
-     * @private
-     * @type {ol.Transform}
-     */
-    this.offsetScaleMatrix_ = ol.transform.create();
-
-    /**
-     * @private
-     * @type {Array.<number>}
-     */
-    this.tmpMat4_ = ol.vec.Mat4.create();
-
-    /**
-     * @protected
-     * @type {Array.<number>}
-     */
-    this.indices = [];
-
-    /**
-     * @protected
-     * @type {?ol.webgl.Buffer}
-     */
-    this.indicesBuffer = null;
-
-    /**
-     * Start index per feature (the index).
-     * @protected
-     * @type {Array.<number>}
-     */
-    this.startIndices = [];
-
-    /**
-     * Start index per feature (the feature).
-     * @protected
-     * @type {Array.<ol.Feature|ol.render.Feature>}
-     */
-    this.startIndicesFeature = [];
-
-    /**
-     * @protected
-     * @type {Array.<number>}
-     */
-    this.vertices = [];
-
-    /**
-     * @protected
-     * @type {?ol.webgl.Buffer}
-     */
-    this.verticesBuffer = null;
-
-    /**
-     * Optional parameter for PolygonReplay instances.
-     * @protected
-     * @type {ol.render.webgl.LineStringReplay|undefined}
-     */
-    this.lineStringReplay = undefined;
-
-  };
-  ol.inherits(ol.render.webgl.Replay, ol.render.VectorContext);
-
-
-  /**
-   * @abstract
-   * @param {ol.webgl.Context} context WebGL context.
-   * @return {function()} Delete resources function.
-   */
-  ol.render.webgl.Replay.prototype.getDeleteResourcesFunction = function(context) {};
-
-
-  /**
-   * @abstract
-   * @param {ol.webgl.Context} context Context.
-   */
-  ol.render.webgl.Replay.prototype.finish = function(context) {};
-
-
-  /**
-   * @abstract
-   * @protected
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.webgl.Context} context Context.
-   * @param {ol.Size} size Size.
-   * @param {number} pixelRatio Pixel ratio.
-   * @return {ol.render.webgl.circlereplay.defaultshader.Locations|
-              ol.render.webgl.imagereplay.defaultshader.Locations|
-              ol.render.webgl.linestringreplay.defaultshader.Locations|
-              ol.render.webgl.polygonreplay.defaultshader.Locations} Locations.
-   */
-  ol.render.webgl.Replay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {};
-
-
-  /**
-   * @abstract
-   * @protected
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.render.webgl.circlereplay.defaultshader.Locations|
-             ol.render.webgl.imagereplay.defaultshader.Locations|
-             ol.render.webgl.linestringreplay.defaultshader.Locations|
-             ol.render.webgl.polygonreplay.defaultshader.Locations} locations Locations.
-   */
-  ol.render.webgl.Replay.prototype.shutDownProgram = function(gl, locations) {};
-
-
-  /**
-   * @abstract
-   * @protected
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.webgl.Context} context Context.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   * @param {boolean} hitDetection Hit detection mode.
-   */
-  ol.render.webgl.Replay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {};
-
-
-  /**
-   * @abstract
-   * @protected
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.webgl.Context} context Context.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
-   * @param {ol.Extent=} opt_hitExtent Hit extent: Only features intersecting
-   *  this extent are checked.
-   * @return {T|undefined} Callback result.
-   * @template T
-   */
-  ol.render.webgl.Replay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {};
-
-
-  /**
-   * @protected
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.webgl.Context} context Context.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
-   * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
-   * @param {ol.Extent=} opt_hitExtent Hit extent: Only features intersecting
-   *  this extent are checked.
-   * @return {T|undefined} Callback result.
-   * @template T
-   */
-  ol.render.webgl.Replay.prototype.drawHitDetectionReplay = function(gl, context, skippedFeaturesHash,
-      featureCallback, oneByOne, opt_hitExtent) {
-    if (!oneByOne) {
-      // draw all hit-detection features in "once" (by texture group)
-      return this.drawHitDetectionReplayAll(gl, context,
-          skippedFeaturesHash, featureCallback);
-    } else {
-      // draw hit-detection features one by one
-      return this.drawHitDetectionReplayOneByOne(gl, context,
-          skippedFeaturesHash, featureCallback, opt_hitExtent);
-    }
-  };
-
-
-  /**
-   * @protected
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.webgl.Context} context Context.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
-   * @return {T|undefined} Callback result.
-   * @template T
-   */
-  ol.render.webgl.Replay.prototype.drawHitDetectionReplayAll = function(gl, context, skippedFeaturesHash,
-      featureCallback) {
-    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-    this.drawReplay(gl, context, skippedFeaturesHash, true);
-
-    var result = featureCallback(null);
-    if (result) {
-      return result;
-    } else {
-      return undefined;
-    }
-  };
-
-
-  /**
-   * @param {ol.webgl.Context} context Context.
-   * @param {ol.Coordinate} center Center.
-   * @param {number} resolution Resolution.
-   * @param {number} rotation Rotation.
-   * @param {ol.Size} size Size.
-   * @param {number} pixelRatio Pixel ratio.
-   * @param {number} opacity Global opacity.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
-   * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
-   * @param {ol.Extent=} opt_hitExtent Hit extent: Only features intersecting
-   *  this extent are checked.
-   * @return {T|undefined} Callback result.
-   * @template T
-   */
-  ol.render.webgl.Replay.prototype.replay = function(context,
-      center, resolution, rotation, size, pixelRatio,
-      opacity, skippedFeaturesHash,
-      featureCallback, oneByOne, opt_hitExtent) {
-    var gl = context.getGL();
-    var tmpStencil, tmpStencilFunc, tmpStencilMaskVal, tmpStencilRef, tmpStencilMask,
-        tmpStencilOpFail, tmpStencilOpPass, tmpStencilOpZFail;
-
-    if (this.lineStringReplay) {
-      tmpStencil = gl.isEnabled(gl.STENCIL_TEST);
-      tmpStencilFunc = gl.getParameter(gl.STENCIL_FUNC);
-      tmpStencilMaskVal = gl.getParameter(gl.STENCIL_VALUE_MASK);
-      tmpStencilRef = gl.getParameter(gl.STENCIL_REF);
-      tmpStencilMask = gl.getParameter(gl.STENCIL_WRITEMASK);
-      tmpStencilOpFail = gl.getParameter(gl.STENCIL_FAIL);
-      tmpStencilOpPass = gl.getParameter(gl.STENCIL_PASS_DEPTH_PASS);
-      tmpStencilOpZFail = gl.getParameter(gl.STENCIL_PASS_DEPTH_FAIL);
-
-      gl.enable(gl.STENCIL_TEST);
-      gl.clear(gl.STENCIL_BUFFER_BIT);
-      gl.stencilMask(255);
-      gl.stencilFunc(gl.ALWAYS, 1, 255);
-      gl.stencilOp(gl.KEEP, gl.KEEP, gl.REPLACE);
-
-      this.lineStringReplay.replay(context,
-          center, resolution, rotation, size, pixelRatio,
-          opacity, skippedFeaturesHash,
-          featureCallback, oneByOne, opt_hitExtent);
-
-      gl.stencilMask(0);
-      gl.stencilFunc(gl.NOTEQUAL, 1, 255);
-    }
-
-    context.bindBuffer(ol.webgl.ARRAY_BUFFER, this.verticesBuffer);
-
-    context.bindBuffer(ol.webgl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);
-
-    var locations = this.setUpProgram(gl, context, size, pixelRatio);
-
-    // set the "uniform" values
-    var projectionMatrix = ol.transform.reset(this.projectionMatrix_);
-    ol.transform.scale(projectionMatrix, 2 / (resolution * size[0]), 2 / (resolution * size[1]));
-    ol.transform.rotate(projectionMatrix, -rotation);
-    ol.transform.translate(projectionMatrix, -(center[0] - this.origin[0]), -(center[1] - this.origin[1]));
-
-    var offsetScaleMatrix = ol.transform.reset(this.offsetScaleMatrix_);
-    ol.transform.scale(offsetScaleMatrix, 2 / size[0], 2 / size[1]);
-
-    var offsetRotateMatrix = ol.transform.reset(this.offsetRotateMatrix_);
-    if (rotation !== 0) {
-      ol.transform.rotate(offsetRotateMatrix, -rotation);
-    }
-
-    gl.uniformMatrix4fv(locations.u_projectionMatrix, false,
-       ol.vec.Mat4.fromTransform(this.tmpMat4_, projectionMatrix));
-    gl.uniformMatrix4fv(locations.u_offsetScaleMatrix, false,
-       ol.vec.Mat4.fromTransform(this.tmpMat4_, offsetScaleMatrix));
-    gl.uniformMatrix4fv(locations.u_offsetRotateMatrix, false,
-       ol.vec.Mat4.fromTransform(this.tmpMat4_, offsetRotateMatrix));
-    gl.uniform1f(locations.u_opacity, opacity);
-
-    // draw!
-    var result;
-    if (featureCallback === undefined) {
-      this.drawReplay(gl, context, skippedFeaturesHash, false);
-    } else {
-      // draw feature by feature for the hit-detection
-      result = this.drawHitDetectionReplay(gl, context, skippedFeaturesHash,
-          featureCallback, oneByOne, opt_hitExtent);
-    }
-
-    // disable the vertex attrib arrays
-    this.shutDownProgram(gl, locations);
-
-    if (this.lineStringReplay) {
-      if (!tmpStencil) {
-        gl.disable(gl.STENCIL_TEST);
-      }
-      gl.clear(gl.STENCIL_BUFFER_BIT);
-      gl.stencilFunc(/** @type {number} */ (tmpStencilFunc),
-         /** @type {number} */ (tmpStencilRef), /** @type {number} */ (tmpStencilMaskVal));
-      gl.stencilMask(/** @type {number} */ (tmpStencilMask));
-      gl.stencilOp(/** @type {number} */ (tmpStencilOpFail),
-         /** @type {number} */ (tmpStencilOpZFail), /** @type {number} */ (tmpStencilOpPass));
-    }
-
-    return result;
-  };
-
-  /**
-   * @protected
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.webgl.Context} context Context.
-   * @param {number} start Start index.
-   * @param {number} end End index.
-   */
-  ol.render.webgl.Replay.prototype.drawElements = function(
-      gl, context, start, end) {
-    var elementType = context.hasOESElementIndexUint ?
-        ol.webgl.UNSIGNED_INT : ol.webgl.UNSIGNED_SHORT;
-    var elementSize = context.hasOESElementIndexUint ? 4 : 2;
-
-    var numItems = end - start;
-    var offsetInBytes = start * elementSize;
-    gl.drawElements(ol.webgl.TRIANGLES, numItems, elementType, offsetInBytes);
-  };
-
-}
-
-goog.provide('ol.render.webgl');
-
-goog.require('ol');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @const
-   * @type {ol.Color}
-   */
-  ol.render.webgl.defaultFillStyle = [0.0, 0.0, 0.0, 1.0];
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.defaultLineCap = 'round';
-
-
-  /**
-   * @const
-   * @type {Array.<number>}
-   */
-  ol.render.webgl.defaultLineDash = [];
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.render.webgl.defaultLineDashOffset = 0;
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.defaultLineJoin = 'round';
-
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.render.webgl.defaultMiterLimit = 10;
-
-  /**
-   * @const
-   * @type {ol.Color}
-   */
-  ol.render.webgl.defaultStrokeStyle = [0.0, 0.0, 0.0, 1.0];
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.render.webgl.defaultLineWidth = 1;
-
-  /**
-   * Calculates the orientation of a triangle based on the determinant method.
-   * @param {number} x1 First X coordinate.
-   * @param {number} y1 First Y coordinate.
-   * @param {number} x2 Second X coordinate.
-   * @param {number} y2 Second Y coordinate.
-   * @param {number} x3 Third X coordinate.
-   * @param {number} y3 Third Y coordinate.
-   * @return {boolean|undefined} Triangle is clockwise.
-   */
-  ol.render.webgl.triangleIsCounterClockwise = function(x1, y1, x2, y2, x3, y3) {
-    var area = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);
-    return (area <= ol.render.webgl.EPSILON && area >= -ol.render.webgl.EPSILON) ?
-        undefined : area > 0;
-  };
-
-  /**
-   * @const
-   * @type {number}
-   */
-  ol.render.webgl.EPSILON = Number.EPSILON || 2.220446049250313e-16;
-
-}
-
-goog.provide('ol.webgl.Buffer');
-
-goog.require('ol');
-goog.require('ol.webgl');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @param {Array.<number>=} opt_arr Array.
-   * @param {number=} opt_usage Usage.
-   * @struct
-   */
-  ol.webgl.Buffer = function(opt_arr, opt_usage) {
-
-    /**
-     * @private
-     * @type {Array.<number>}
-     */
-    this.arr_ = opt_arr !== undefined ? opt_arr : [];
-
-    /**
-     * @private
-     * @type {number}
-     */
-    this.usage_ = opt_usage !== undefined ?
-        opt_usage : ol.webgl.Buffer.Usage_.STATIC_DRAW;
-
-  };
-
-
-  /**
-   * @return {Array.<number>} Array.
-   */
-  ol.webgl.Buffer.prototype.getArray = function() {
-    return this.arr_;
-  };
-
-
-  /**
-   * @return {number} Usage.
-   */
-  ol.webgl.Buffer.prototype.getUsage = function() {
-    return this.usage_;
-  };
-
-
-  /**
-   * @enum {number}
-   * @private
-   */
-  ol.webgl.Buffer.Usage_ = {
-    STATIC_DRAW: ol.webgl.STATIC_DRAW,
-    STREAM_DRAW: ol.webgl.STREAM_DRAW,
-    DYNAMIC_DRAW: ol.webgl.DYNAMIC_DRAW
-  };
-
-}
-
-goog.provide('ol.render.webgl.CircleReplay');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.color');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.render.webgl.circlereplay.defaultshader');
-goog.require('ol.render.webgl.Replay');
-goog.require('ol.render.webgl');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.render.webgl.Replay}
-   * @param {number} tolerance Tolerance.
-   * @param {ol.Extent} maxExtent Max extent.
-   * @struct
-   */
-  ol.render.webgl.CircleReplay = function(tolerance, maxExtent) {
-    ol.render.webgl.Replay.call(this, tolerance, maxExtent);
-
-    /**
-     * @private
-     * @type {ol.render.webgl.circlereplay.defaultshader.Locations}
-     */
-    this.defaultLocations_ = null;
-
-    /**
-     * @private
-     * @type {Array.<Array.<Array.<number>|number>>}
-     */
-    this.styles_ = [];
-
-    /**
-     * @private
-     * @type {Array.<number>}
-     */
-    this.styleIndices_ = [];
-
-    /**
-     * @private
-     * @type {number}
-     */
-    this.radius_ = 0;
-
-    /**
-     * @private
-     * @type {{fillColor: (Array.<number>|null),
-     *         strokeColor: (Array.<number>|null),
-     *         lineDash: Array.<number>,
-     *         lineDashOffset: (number|undefined),
-     *         lineWidth: (number|undefined),
-     *         changed: boolean}|null}
-     */
-    this.state_ = {
-      fillColor: null,
-      strokeColor: null,
-      lineDash: null,
-      lineDashOffset: undefined,
-      lineWidth: undefined,
-      changed: false
-    };
-
-  };
-  ol.inherits(ol.render.webgl.CircleReplay, ol.render.webgl.Replay);
-
-
-  /**
-   * @private
-   * @param {Array.<number>} flatCoordinates Flat coordinates.
-   * @param {number} offset Offset.
-   * @param {number} end End.
-   * @param {number} stride Stride.
-   */
-  ol.render.webgl.CircleReplay.prototype.drawCoordinates_ = function(
-      flatCoordinates, offset, end, stride) {
-    var numVertices = this.vertices.length;
-    var numIndices = this.indices.length;
-    var n = numVertices / 4;
-    var i, ii;
-    for (i = offset, ii = end; i < ii; i += stride) {
-      this.vertices[numVertices++] = flatCoordinates[i];
-      this.vertices[numVertices++] = flatCoordinates[i + 1];
-      this.vertices[numVertices++] = 0;
-      this.vertices[numVertices++] = this.radius_;
-
-      this.vertices[numVertices++] = flatCoordinates[i];
-      this.vertices[numVertices++] = flatCoordinates[i + 1];
-      this.vertices[numVertices++] = 1;
-      this.vertices[numVertices++] = this.radius_;
-
-      this.vertices[numVertices++] = flatCoordinates[i];
-      this.vertices[numVertices++] = flatCoordinates[i + 1];
-      this.vertices[numVertices++] = 2;
-      this.vertices[numVertices++] = this.radius_;
-
-      this.vertices[numVertices++] = flatCoordinates[i];
-      this.vertices[numVertices++] = flatCoordinates[i + 1];
-      this.vertices[numVertices++] = 3;
-      this.vertices[numVertices++] = this.radius_;
-
-      this.indices[numIndices++] = n;
-      this.indices[numIndices++] = n + 1;
-      this.indices[numIndices++] = n + 2;
-
-      this.indices[numIndices++] = n + 2;
-      this.indices[numIndices++] = n + 3;
-      this.indices[numIndices++] = n;
-
-      n += 4;
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.CircleReplay.prototype.drawCircle = function(circleGeometry, feature) {
-    var radius = circleGeometry.getRadius();
-    var stride = circleGeometry.getStride();
-    if (radius) {
-      this.startIndices.push(this.indices.length);
-      this.startIndicesFeature.push(feature);
-      if (this.state_.changed) {
-        this.styleIndices_.push(this.indices.length);
-        this.state_.changed = false;
-      }
-
-      this.radius_ = radius;
-      var flatCoordinates = circleGeometry.getFlatCoordinates();
-      flatCoordinates = ol.geom.flat.transform.translate(flatCoordinates, 0, 2,
-          stride, -this.origin[0], -this.origin[1]);
-      this.drawCoordinates_(flatCoordinates, 0, 2, stride);
-    } else {
-      if (this.state_.changed) {
-        this.styles_.pop();
-        if (this.styles_.length) {
-          var lastState = this.styles_[this.styles_.length - 1];
-          this.state_.fillColor =  /** @type {Array.<number>} */ (lastState[0]);
-          this.state_.strokeColor = /** @type {Array.<number>} */ (lastState[1]);
-          this.state_.lineWidth = /** @type {number} */ (lastState[2]);
-          this.state_.changed = false;
-        }
-      }
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   **/
-  ol.render.webgl.CircleReplay.prototype.finish = function(context) {
-    // create, bind, and populate the vertices buffer
-    this.verticesBuffer = new ol.webgl.Buffer(this.vertices);
-
-    // create, bind, and populate the indices buffer
-    this.indicesBuffer = new ol.webgl.Buffer(this.indices);
-
-    this.startIndices.push(this.indices.length);
-
-    //Clean up, if there is nothing to draw
-    if (this.styleIndices_.length === 0 && this.styles_.length > 0) {
-      this.styles_ = [];
-    }
-
-    this.vertices = null;
-    this.indices = null;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.CircleReplay.prototype.getDeleteResourcesFunction = function(context) {
-    // We only delete our stuff here. The shaders and the program may
-    // be used by other CircleReplay instances (for other layers). And
-    // they will be deleted when disposing of the ol.webgl.Context
-    // object.
-    var verticesBuffer = this.verticesBuffer;
-    var indicesBuffer = this.indicesBuffer;
-    return function() {
-      context.deleteBuffer(verticesBuffer);
-      context.deleteBuffer(indicesBuffer);
-    };
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.CircleReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
-    // get the program
-    var fragmentShader, vertexShader;
-    fragmentShader = ol.render.webgl.circlereplay.defaultshader.fragment;
-    vertexShader = ol.render.webgl.circlereplay.defaultshader.vertex;
-    var program = context.getProgram(fragmentShader, vertexShader);
-
-    // get the locations
-    var locations;
-    if (!this.defaultLocations_) {
-      // eslint-disable-next-line openlayers-internal/no-missing-requires
-      locations = new ol.render.webgl.circlereplay.defaultshader.Locations(gl, program);
-      this.defaultLocations_ = locations;
-    } else {
-      locations = this.defaultLocations_;
-    }
-
-    context.useProgram(program);
-
-    // enable the vertex attrib arrays
-    gl.enableVertexAttribArray(locations.a_position);
-    gl.vertexAttribPointer(locations.a_position, 2, ol.webgl.FLOAT,
-        false, 16, 0);
-
-    gl.enableVertexAttribArray(locations.a_instruction);
-    gl.vertexAttribPointer(locations.a_instruction, 1, ol.webgl.FLOAT,
-        false, 16, 8);
-
-    gl.enableVertexAttribArray(locations.a_radius);
-    gl.vertexAttribPointer(locations.a_radius, 1, ol.webgl.FLOAT,
-        false, 16, 12);
-
-    // Enable renderer specific uniforms.
-    gl.uniform2fv(locations.u_size, size);
-    gl.uniform1f(locations.u_pixelRatio, pixelRatio);
-
-    return locations;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.CircleReplay.prototype.shutDownProgram = function(gl, locations) {
-    gl.disableVertexAttribArray(locations.a_position);
-    gl.disableVertexAttribArray(locations.a_instruction);
-    gl.disableVertexAttribArray(locations.a_radius);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.CircleReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {
-    if (!ol.obj.isEmpty(skippedFeaturesHash)) {
-      this.drawReplaySkipping_(gl, context, skippedFeaturesHash);
-    } else {
-      //Draw by style groups to minimize drawElements() calls.
-      var i, start, end, nextStyle;
-      end = this.startIndices[this.startIndices.length - 1];
-      for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-        start = this.styleIndices_[i];
-        nextStyle = this.styles_[i];
-        this.setFillStyle_(gl, /** @type {Array.<number>} */ (nextStyle[0]));
-        this.setStrokeStyle_(gl, /** @type {Array.<number>} */ (nextStyle[1]),
-            /** @type {number} */ (nextStyle[2]));
-        this.drawElements(gl, context, start, end);
-        end = start;
-      }
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.CircleReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash,
-      featureCallback, opt_hitExtent) {
-    var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex;
-    featureIndex = this.startIndices.length - 2;
-    end = this.startIndices[featureIndex + 1];
-    for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-      nextStyle = this.styles_[i];
-      this.setFillStyle_(gl, /** @type {Array.<number>} */ (nextStyle[0]));
-      this.setStrokeStyle_(gl, /** @type {Array.<number>} */ (nextStyle[1]),
-          /** @type {number} */ (nextStyle[2]));
-      groupStart = this.styleIndices_[i];
-
-      while (featureIndex >= 0 &&
-          this.startIndices[featureIndex] >= groupStart) {
-        start = this.startIndices[featureIndex];
-        feature = this.startIndicesFeature[featureIndex];
-        featureUid = ol.getUid(feature).toString();
-
-        if (skippedFeaturesHash[featureUid] === undefined &&
-            feature.getGeometry() &&
-            (opt_hitExtent === undefined || ol.extent.intersects(
-                /** @type {Array<number>} */ (opt_hitExtent),
-                feature.getGeometry().getExtent()))) {
-          gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-          this.drawElements(gl, context, start, end);
-
-          var result = featureCallback(feature);
-
-          if (result) {
-            return result;
-          }
-
-        }
-        featureIndex--;
-        end = start;
-      }
-    }
-    return undefined;
-  };
-
-
-  /**
-   * @private
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.webgl.Context} context Context.
-   * @param {Object} skippedFeaturesHash Ids of features to skip.
-   */
-  ol.render.webgl.CircleReplay.prototype.drawReplaySkipping_ = function(gl, context, skippedFeaturesHash) {
-    var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex, featureStart;
-    featureIndex = this.startIndices.length - 2;
-    end = start = this.startIndices[featureIndex + 1];
-    for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-      nextStyle = this.styles_[i];
-      this.setFillStyle_(gl, /** @type {Array.<number>} */ (nextStyle[0]));
-      this.setStrokeStyle_(gl, /** @type {Array.<number>} */ (nextStyle[1]),
-          /** @type {number} */ (nextStyle[2]));
-      groupStart = this.styleIndices_[i];
-
-      while (featureIndex >= 0 &&
-          this.startIndices[featureIndex] >= groupStart) {
-        featureStart = this.startIndices[featureIndex];
-        feature = this.startIndicesFeature[featureIndex];
-        featureUid = ol.getUid(feature).toString();
-
-        if (skippedFeaturesHash[featureUid]) {
-          if (start !== end) {
-            this.drawElements(gl, context, start, end);
-          }
-          end = featureStart;
-        }
-        featureIndex--;
-        start = featureStart;
-      }
-      if (start !== end) {
-        this.drawElements(gl, context, start, end);
-      }
-      start = end = groupStart;
-    }
-  };
-
-
-  /**
-   * @private
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {Array.<number>} color Color.
-   */
-  ol.render.webgl.CircleReplay.prototype.setFillStyle_ = function(gl, color) {
-    gl.uniform4fv(this.defaultLocations_.u_fillColor, color);
-  };
-
-
-  /**
-   * @private
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {Array.<number>} color Color.
-   * @param {number} lineWidth Line width.
-   */
-  ol.render.webgl.CircleReplay.prototype.setStrokeStyle_ = function(gl, color, lineWidth) {
-    gl.uniform4fv(this.defaultLocations_.u_strokeColor, color);
-    gl.uniform1f(this.defaultLocations_.u_lineWidth, lineWidth);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.CircleReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-    var strokeStyleColor, strokeStyleWidth;
-    if (strokeStyle) {
-      var strokeStyleLineDash = strokeStyle.getLineDash();
-      this.state_.lineDash = strokeStyleLineDash ?
-          strokeStyleLineDash : ol.render.webgl.defaultLineDash;
-      var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
-      this.state_.lineDashOffset = strokeStyleLineDashOffset ?
-          strokeStyleLineDashOffset : ol.render.webgl.defaultLineDashOffset;
-      strokeStyleColor = strokeStyle.getColor();
-      if (!(strokeStyleColor instanceof CanvasGradient) &&
-          !(strokeStyleColor instanceof CanvasPattern)) {
-        strokeStyleColor = ol.color.asArray(strokeStyleColor).map(function(c, i) {
-          return i != 3 ? c / 255 : c;
-        }) || ol.render.webgl.defaultStrokeStyle;
-      } else {
-        strokeStyleColor = ol.render.webgl.defaultStrokeStyle;
-      }
-      strokeStyleWidth = strokeStyle.getWidth();
-      strokeStyleWidth = strokeStyleWidth !== undefined ?
-          strokeStyleWidth : ol.render.webgl.defaultLineWidth;
-    } else {
-      strokeStyleColor = [0, 0, 0, 0];
-      strokeStyleWidth = 0;
-    }
-    var fillStyleColor = fillStyle ? fillStyle.getColor() : [0, 0, 0, 0];
-    if (!(fillStyleColor instanceof CanvasGradient) &&
-        !(fillStyleColor instanceof CanvasPattern)) {
-      fillStyleColor = ol.color.asArray(fillStyleColor).map(function(c, i) {
-        return i != 3 ? c / 255 : c;
-      }) || ol.render.webgl.defaultFillStyle;
-    } else {
-      fillStyleColor = ol.render.webgl.defaultFillStyle;
-    }
-    if (!this.state_.strokeColor || !ol.array.equals(this.state_.strokeColor, strokeStyleColor) ||
-        !this.state_.fillColor || !ol.array.equals(this.state_.fillColor, fillStyleColor) ||
-        this.state_.lineWidth !== strokeStyleWidth) {
-      this.state_.changed = true;
-      this.state_.fillColor = fillStyleColor;
-      this.state_.strokeColor = strokeStyleColor;
-      this.state_.lineWidth = strokeStyleWidth;
-      this.styles_.push([fillStyleColor, strokeStyleColor, strokeStyleWidth]);
-    }
-  };
-
-}
-
-// This file is automatically generated, do not edit
-/* eslint openlayers-internal/no-missing-requires: 0 */
-goog.provide('ol.render.webgl.imagereplay.defaultshader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Fragment}
-   * @struct
-   */
-  ol.render.webgl.imagereplay.defaultshader.Fragment = function() {
-    ol.webgl.Fragment.call(this, ol.render.webgl.imagereplay.defaultshader.Fragment.SOURCE);
-  };
-  ol.inherits(ol.render.webgl.imagereplay.defaultshader.Fragment, ol.webgl.Fragment);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.imagereplay.defaultshader.Fragment.DEBUG_SOURCE = 'precision mediump float;\nvarying vec2 v_texCoord;\nvarying float v_opacity;\n\nuniform float u_opacity;\nuniform sampler2D u_image;\n\nvoid main(void) {\n  vec4 texColor = texture2D(u_image, v_texCoord);\n  gl_FragColor.rgb = texColor.rgb;\n  float alpha = texColor.a * v_opacity * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.imagereplay.defaultshader.Fragment.OPTIMIZED_SOURCE = 'precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.imagereplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
-      ol.render.webgl.imagereplay.defaultshader.Fragment.DEBUG_SOURCE :
-      ol.render.webgl.imagereplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
-
-
-  ol.render.webgl.imagereplay.defaultshader.fragment = new ol.render.webgl.imagereplay.defaultshader.Fragment();
-
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Vertex}
-   * @struct
-   */
-  ol.render.webgl.imagereplay.defaultshader.Vertex = function() {
-    ol.webgl.Vertex.call(this, ol.render.webgl.imagereplay.defaultshader.Vertex.SOURCE);
-  };
-  ol.inherits(ol.render.webgl.imagereplay.defaultshader.Vertex, ol.webgl.Vertex);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.imagereplay.defaultshader.Vertex.DEBUG_SOURCE = 'varying vec2 v_texCoord;\nvarying float v_opacity;\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec2 a_offsets;\nattribute float a_opacity;\nattribute float a_rotateWithView;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n  mat4 offsetMatrix = u_offsetScaleMatrix;\n  if (a_rotateWithView == 1.0) {\n    offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  }\n  vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n  v_texCoord = a_texCoord;\n  v_opacity = a_opacity;\n}\n\n\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.imagereplay.defaultshader.Vertex.OPTIMIZED_SOURCE = 'varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.imagereplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
-      ol.render.webgl.imagereplay.defaultshader.Vertex.DEBUG_SOURCE :
-      ol.render.webgl.imagereplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
-
-
-  ol.render.webgl.imagereplay.defaultshader.vertex = new ol.render.webgl.imagereplay.defaultshader.Vertex();
-
-
-  /**
-   * @constructor
-   * @param {WebGLRenderingContext} gl GL.
-   * @param {WebGLProgram} program Program.
-   * @struct
-   */
-  ol.render.webgl.imagereplay.defaultshader.Locations = function(gl, program) {
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_image = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_image' : 'l');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_offsetRotateMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_offsetScaleMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_opacity = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_opacity' : 'k');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_projectionMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
-
-    /**
-     * @type {number}
-     */
-    this.a_offsets = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_offsets' : 'e');
-
-    /**
-     * @type {number}
-     */
-    this.a_opacity = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_opacity' : 'f');
-
-    /**
-     * @type {number}
-     */
-    this.a_position = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_position' : 'c');
-
-    /**
-     * @type {number}
-     */
-    this.a_rotateWithView = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_rotateWithView' : 'g');
-
-    /**
-     * @type {number}
-     */
-    this.a_texCoord = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'd');
-  };
-
-}
-
-goog.provide('ol.webgl.ContextEventType');
-
-
-/**
- * @enum {string}
- */
-ol.webgl.ContextEventType = {
-  LOST: 'webglcontextlost',
-  RESTORED: 'webglcontextrestored'
-};
-
-goog.provide('ol.webgl.Context');
-
-goog.require('ol');
-goog.require('ol.Disposable');
-goog.require('ol.array');
-goog.require('ol.events');
-goog.require('ol.obj');
-goog.require('ol.webgl');
-goog.require('ol.webgl.ContextEventType');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @classdesc
-   * A WebGL context for accessing low-level WebGL capabilities.
-   *
-   * @constructor
-   * @extends {ol.Disposable}
-   * @param {HTMLCanvasElement} canvas Canvas.
-   * @param {WebGLRenderingContext} gl GL.
-   */
-  ol.webgl.Context = function(canvas, gl) {
-
-    /**
-     * @private
-     * @type {HTMLCanvasElement}
-     */
-    this.canvas_ = canvas;
-
-    /**
-     * @private
-     * @type {WebGLRenderingContext}
-     */
-    this.gl_ = gl;
-
-    /**
-     * @private
-     * @type {Object.<string, ol.WebglBufferCacheEntry>}
-     */
-    this.bufferCache_ = {};
-
-    /**
-     * @private
-     * @type {Object.<string, WebGLShader>}
-     */
-    this.shaderCache_ = {};
-
-    /**
-     * @private
-     * @type {Object.<string, WebGLProgram>}
-     */
-    this.programCache_ = {};
-
-    /**
-     * @private
-     * @type {WebGLProgram}
-     */
-    this.currentProgram_ = null;
-
-    /**
-     * @private
-     * @type {WebGLFramebuffer}
-     */
-    this.hitDetectionFramebuffer_ = null;
-
-    /**
-     * @private
-     * @type {WebGLTexture}
-     */
-    this.hitDetectionTexture_ = null;
-
-    /**
-     * @private
-     * @type {WebGLRenderbuffer}
-     */
-    this.hitDetectionRenderbuffer_ = null;
-
-    /**
-     * @type {boolean}
-     */
-    this.hasOESElementIndexUint = ol.array.includes(
-        ol.WEBGL_EXTENSIONS, 'OES_element_index_uint');
-
-    // use the OES_element_index_uint extension if available
-    if (this.hasOESElementIndexUint) {
-      gl.getExtension('OES_element_index_uint');
-    }
-
-    ol.events.listen(this.canvas_, ol.webgl.ContextEventType.LOST,
-        this.handleWebGLContextLost, this);
-    ol.events.listen(this.canvas_, ol.webgl.ContextEventType.RESTORED,
-        this.handleWebGLContextRestored, this);
-
-  };
-  ol.inherits(ol.webgl.Context, ol.Disposable);
-
-
-  /**
-   * Just bind the buffer if it's in the cache. Otherwise create
-   * the WebGL buffer, bind it, populate it, and add an entry to
-   * the cache.
-   * @param {number} target Target.
-   * @param {ol.webgl.Buffer} buf Buffer.
-   */
-  ol.webgl.Context.prototype.bindBuffer = function(target, buf) {
-    var gl = this.getGL();
-    var arr = buf.getArray();
-    var bufferKey = String(ol.getUid(buf));
-    if (bufferKey in this.bufferCache_) {
-      var bufferCacheEntry = this.bufferCache_[bufferKey];
-      gl.bindBuffer(target, bufferCacheEntry.buffer);
-    } else {
-      var buffer = gl.createBuffer();
-      gl.bindBuffer(target, buffer);
-      var /** @type {ArrayBufferView} */ arrayBuffer;
-      if (target == ol.webgl.ARRAY_BUFFER) {
-        arrayBuffer = new Float32Array(arr);
-      } else if (target == ol.webgl.ELEMENT_ARRAY_BUFFER) {
-        arrayBuffer = this.hasOESElementIndexUint ?
-            new Uint32Array(arr) : new Uint16Array(arr);
-      }
-      gl.bufferData(target, arrayBuffer, buf.getUsage());
-      this.bufferCache_[bufferKey] = {
-        buf: buf,
-        buffer: buffer
-      };
-    }
-  };
-
-
-  /**
-   * @param {ol.webgl.Buffer} buf Buffer.
-   */
-  ol.webgl.Context.prototype.deleteBuffer = function(buf) {
-    var gl = this.getGL();
-    var bufferKey = String(ol.getUid(buf));
-    var bufferCacheEntry = this.bufferCache_[bufferKey];
-    if (!gl.isContextLost()) {
-      gl.deleteBuffer(bufferCacheEntry.buffer);
-    }
-    delete this.bufferCache_[bufferKey];
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.webgl.Context.prototype.disposeInternal = function() {
-    ol.events.unlistenAll(this.canvas_);
-    var gl = this.getGL();
-    if (!gl.isContextLost()) {
-      var key;
-      for (key in this.bufferCache_) {
-        gl.deleteBuffer(this.bufferCache_[key].buffer);
-      }
-      for (key in this.programCache_) {
-        gl.deleteProgram(this.programCache_[key]);
-      }
-      for (key in this.shaderCache_) {
-        gl.deleteShader(this.shaderCache_[key]);
-      }
-      // delete objects for hit-detection
-      gl.deleteFramebuffer(this.hitDetectionFramebuffer_);
-      gl.deleteRenderbuffer(this.hitDetectionRenderbuffer_);
-      gl.deleteTexture(this.hitDetectionTexture_);
-    }
-  };
-
-
-  /**
-   * @return {HTMLCanvasElement} Canvas.
-   */
-  ol.webgl.Context.prototype.getCanvas = function() {
-    return this.canvas_;
-  };
-
-
-  /**
-   * Get the WebGL rendering context
-   * @return {WebGLRenderingContext} The rendering context.
-   * @api
-   */
-  ol.webgl.Context.prototype.getGL = function() {
-    return this.gl_;
-  };
-
-
-  /**
-   * Get the frame buffer for hit detection.
-   * @return {WebGLFramebuffer} The hit detection frame buffer.
-   */
-  ol.webgl.Context.prototype.getHitDetectionFramebuffer = function() {
-    if (!this.hitDetectionFramebuffer_) {
-      this.initHitDetectionFramebuffer_();
-    }
-    return this.hitDetectionFramebuffer_;
-  };
-
-
-  /**
-   * Get shader from the cache if it's in the cache. Otherwise, create
-   * the WebGL shader, compile it, and add entry to cache.
-   * @param {ol.webgl.Shader} shaderObject Shader object.
-   * @return {WebGLShader} Shader.
-   */
-  ol.webgl.Context.prototype.getShader = function(shaderObject) {
-    var shaderKey = String(ol.getUid(shaderObject));
-    if (shaderKey in this.shaderCache_) {
-      return this.shaderCache_[shaderKey];
-    } else {
-      var gl = this.getGL();
-      var shader = gl.createShader(shaderObject.getType());
-      gl.shaderSource(shader, shaderObject.getSource());
-      gl.compileShader(shader);
-      this.shaderCache_[shaderKey] = shader;
-      return shader;
-    }
-  };
-
-
-  /**
-   * Get the program from the cache if it's in the cache. Otherwise create
-   * the WebGL program, attach the shaders to it, and add an entry to the
-   * cache.
-   * @param {ol.webgl.Fragment} fragmentShaderObject Fragment shader.
-   * @param {ol.webgl.Vertex} vertexShaderObject Vertex shader.
-   * @return {WebGLProgram} Program.
-   */
-  ol.webgl.Context.prototype.getProgram = function(
-      fragmentShaderObject, vertexShaderObject) {
-    var programKey =
-        ol.getUid(fragmentShaderObject) + '/' + ol.getUid(vertexShaderObject);
-    if (programKey in this.programCache_) {
-      return this.programCache_[programKey];
-    } else {
-      var gl = this.getGL();
-      var program = gl.createProgram();
-      gl.attachShader(program, this.getShader(fragmentShaderObject));
-      gl.attachShader(program, this.getShader(vertexShaderObject));
-      gl.linkProgram(program);
-      this.programCache_[programKey] = program;
-      return program;
-    }
-  };
-
-
-  /**
-   * FIXME empy description for jsdoc
-   */
-  ol.webgl.Context.prototype.handleWebGLContextLost = function() {
-    ol.obj.clear(this.bufferCache_);
-    ol.obj.clear(this.shaderCache_);
-    ol.obj.clear(this.programCache_);
-    this.currentProgram_ = null;
-    this.hitDetectionFramebuffer_ = null;
-    this.hitDetectionTexture_ = null;
-    this.hitDetectionRenderbuffer_ = null;
-  };
-
-
-  /**
-   * FIXME empy description for jsdoc
-   */
-  ol.webgl.Context.prototype.handleWebGLContextRestored = function() {
-  };
-
-
-  /**
-   * Creates a 1x1 pixel framebuffer for the hit-detection.
-   * @private
-   */
-  ol.webgl.Context.prototype.initHitDetectionFramebuffer_ = function() {
-    var gl = this.gl_;
-    var framebuffer = gl.createFramebuffer();
-    gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
-
-    var texture = ol.webgl.Context.createEmptyTexture(gl, 1, 1);
-    var renderbuffer = gl.createRenderbuffer();
-    gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);
-    gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, 1, 1);
-    gl.framebufferTexture2D(
-        gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
-    gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT,
-        gl.RENDERBUFFER, renderbuffer);
-
-    gl.bindTexture(gl.TEXTURE_2D, null);
-    gl.bindRenderbuffer(gl.RENDERBUFFER, null);
-    gl.bindFramebuffer(gl.FRAMEBUFFER, null);
-
-    this.hitDetectionFramebuffer_ = framebuffer;
-    this.hitDetectionTexture_ = texture;
-    this.hitDetectionRenderbuffer_ = renderbuffer;
-  };
-
-
-  /**
-   * Use a program.  If the program is already in use, this will return `false`.
-   * @param {WebGLProgram} program Program.
-   * @return {boolean} Changed.
-   * @api
-   */
-  ol.webgl.Context.prototype.useProgram = function(program) {
-    if (program == this.currentProgram_) {
-      return false;
-    } else {
-      var gl = this.getGL();
-      gl.useProgram(program);
-      this.currentProgram_ = program;
-      return true;
-    }
-  };
-
-
-  /**
-   * @param {WebGLRenderingContext} gl WebGL rendering context.
-   * @param {number=} opt_wrapS wrapS.
-   * @param {number=} opt_wrapT wrapT.
-   * @return {WebGLTexture} The texture.
-   * @private
-   */
-  ol.webgl.Context.createTexture_ = function(gl, opt_wrapS, opt_wrapT) {
-    var texture = gl.createTexture();
-    gl.bindTexture(gl.TEXTURE_2D, texture);
-    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
-    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
-
-    if (opt_wrapS !== undefined) {
-      gl.texParameteri(
-          ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_WRAP_S, opt_wrapS);
-    }
-    if (opt_wrapT !== undefined) {
-      gl.texParameteri(
-          ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_WRAP_T, opt_wrapT);
-    }
-
-    return texture;
-  };
-
-
-  /**
-   * @param {WebGLRenderingContext} gl WebGL rendering context.
-   * @param {number} width Width.
-   * @param {number} height Height.
-   * @param {number=} opt_wrapS wrapS.
-   * @param {number=} opt_wrapT wrapT.
-   * @return {WebGLTexture} The texture.
-   */
-  ol.webgl.Context.createEmptyTexture = function(
-      gl, width, height, opt_wrapS, opt_wrapT) {
-    var texture = ol.webgl.Context.createTexture_(gl, opt_wrapS, opt_wrapT);
-    gl.texImage2D(
-        gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE,
-        null);
-
-    return texture;
-  };
-
-
-  /**
-   * @param {WebGLRenderingContext} gl WebGL rendering context.
-   * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.
-   * @param {number=} opt_wrapS wrapS.
-   * @param {number=} opt_wrapT wrapT.
-   * @return {WebGLTexture} The texture.
-   */
-  ol.webgl.Context.createTexture = function(gl, image, opt_wrapS, opt_wrapT) {
-    var texture = ol.webgl.Context.createTexture_(gl, opt_wrapS, opt_wrapT);
-    gl.texImage2D(
-        gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
-
-    return texture;
-  };
-
-}
-
-goog.provide('ol.render.webgl.ImageReplay');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.render.webgl.imagereplay.defaultshader');
-goog.require('ol.render.webgl.Replay');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-goog.require('ol.webgl.Context');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.render.webgl.Replay}
-   * @param {number} tolerance Tolerance.
-   * @param {ol.Extent} maxExtent Max extent.
-   * @struct
-   */
-  ol.render.webgl.ImageReplay = function(tolerance, maxExtent) {
-    ol.render.webgl.Replay.call(this, tolerance, maxExtent);
-
-    /**
-     * @type {number|undefined}
-     * @private
-     */
-    this.anchorX_ = undefined;
-
-    /**
-     * @type {number|undefined}
-     * @private
-     */
-    this.anchorY_ = undefined;
-
-    /**
-     * @type {Array.<number>}
-     * @private
-     */
-    this.groupIndices_ = [];
-
-    /**
-     * @type {Array.<number>}
-     * @private
-     */
-    this.hitDetectionGroupIndices_ = [];
-
-    /**
-     * @type {number|undefined}
-     * @private
-     */
-    this.height_ = undefined;
-
-    /**
-     * @type {Array.<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}
-     * @private
-     */
-    this.images_ = [];
-
-    /**
-     * @type {Array.<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}
-     * @private
-     */
-    this.hitDetectionImages_ = [];
-
-    /**
-     * @type {number|undefined}
-     * @private
-     */
-    this.imageHeight_ = undefined;
-
-    /**
-     * @type {number|undefined}
-     * @private
-     */
-    this.imageWidth_ = undefined;
-
-    /**
-     * @private
-     * @type {ol.render.webgl.imagereplay.defaultshader.Locations}
-     */
-    this.defaultLocations_ = null;
-
-    /**
-     * @private
-     * @type {number|undefined}
-     */
-    this.opacity_ = undefined;
-
-    /**
-     * @type {number|undefined}
-     * @private
-     */
-    this.originX_ = undefined;
-
-    /**
-     * @type {number|undefined}
-     * @private
-     */
-    this.originY_ = undefined;
-
-    /**
-     * @private
-     * @type {boolean|undefined}
-     */
-    this.rotateWithView_ = undefined;
-
-    /**
-     * @private
-     * @type {number|undefined}
-     */
-    this.rotation_ = undefined;
-
-    /**
-     * @private
-     * @type {number|undefined}
-     */
-    this.scale_ = undefined;
-
-    /**
-     * @type {Array.<WebGLTexture>}
-     * @private
-     */
-    this.textures_ = [];
-
-    /**
-     * @type {Array.<WebGLTexture>}
-     * @private
-     */
-    this.hitDetectionTextures_ = [];
-
-    /**
-     * @type {number|undefined}
-     * @private
-     */
-    this.width_ = undefined;
-  };
-  ol.inherits(ol.render.webgl.ImageReplay, ol.render.webgl.Replay);
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ImageReplay.prototype.getDeleteResourcesFunction = function(context) {
-    var verticesBuffer = this.verticesBuffer;
-    var indicesBuffer = this.indicesBuffer;
-    var textures = this.textures_;
-    var hitDetectionTextures = this.hitDetectionTextures_;
-    var gl = context.getGL();
-    return function() {
-      if (!gl.isContextLost()) {
-        var i, ii;
-        for (i = 0, ii = textures.length; i < ii; ++i) {
-          gl.deleteTexture(textures[i]);
-        }
-        for (i = 0, ii = hitDetectionTextures.length; i < ii; ++i) {
-          gl.deleteTexture(hitDetectionTextures[i]);
-        }
-      }
-      context.deleteBuffer(verticesBuffer);
-      context.deleteBuffer(indicesBuffer);
-    };
-  };
-
-
-  /**
-   * @param {Array.<number>} flatCoordinates Flat coordinates.
-   * @param {number} offset Offset.
-   * @param {number} end End.
-   * @param {number} stride Stride.
-   * @return {number} My end.
-   * @private
-   */
-  ol.render.webgl.ImageReplay.prototype.drawCoordinates_ = function(flatCoordinates, offset, end, stride) {
-    var anchorX = /** @type {number} */ (this.anchorX_);
-    var anchorY = /** @type {number} */ (this.anchorY_);
-    var height = /** @type {number} */ (this.height_);
-    var imageHeight = /** @type {number} */ (this.imageHeight_);
-    var imageWidth = /** @type {number} */ (this.imageWidth_);
-    var opacity = /** @type {number} */ (this.opacity_);
-    var originX = /** @type {number} */ (this.originX_);
-    var originY = /** @type {number} */ (this.originY_);
-    var rotateWithView = this.rotateWithView_ ? 1.0 : 0.0;
-    // this.rotation_ is anti-clockwise, but rotation is clockwise
-    var rotation = /** @type {number} */ (-this.rotation_);
-    var scale = /** @type {number} */ (this.scale_);
-    var width = /** @type {number} */ (this.width_);
-    var cos = Math.cos(rotation);
-    var sin = Math.sin(rotation);
-    var numIndices = this.indices.length;
-    var numVertices = this.vertices.length;
-    var i, n, offsetX, offsetY, x, y;
-    for (i = offset; i < end; i += stride) {
-      x = flatCoordinates[i] - this.origin[0];
-      y = flatCoordinates[i + 1] - this.origin[1];
-
-      // There are 4 vertices per [x, y] point, one for each corner of the
-      // rectangle we're going to draw. We'd use 1 vertex per [x, y] point if
-      // WebGL supported Geometry Shaders (which can emit new vertices), but that
-      // is not currently the case.
-      //
-      // And each vertex includes 8 values: the x and y coordinates, the x and
-      // y offsets used to calculate the position of the corner, the u and
-      // v texture coordinates for the corner, the opacity, and whether the
-      // the image should be rotated with the view (rotateWithView).
-
-      n = numVertices / 8;
-
-      // bottom-left corner
-      offsetX = -scale * anchorX;
-      offsetY = -scale * (height - anchorY);
-      this.vertices[numVertices++] = x;
-      this.vertices[numVertices++] = y;
-      this.vertices[numVertices++] = offsetX * cos - offsetY * sin;
-      this.vertices[numVertices++] = offsetX * sin + offsetY * cos;
-      this.vertices[numVertices++] = originX / imageWidth;
-      this.vertices[numVertices++] = (originY + height) / imageHeight;
-      this.vertices[numVertices++] = opacity;
-      this.vertices[numVertices++] = rotateWithView;
-
-      // bottom-right corner
-      offsetX = scale * (width - anchorX);
-      offsetY = -scale * (height - anchorY);
-      this.vertices[numVertices++] = x;
-      this.vertices[numVertices++] = y;
-      this.vertices[numVertices++] = offsetX * cos - offsetY * sin;
-      this.vertices[numVertices++] = offsetX * sin + offsetY * cos;
-      this.vertices[numVertices++] = (originX + width) / imageWidth;
-      this.vertices[numVertices++] = (originY + height) / imageHeight;
-      this.vertices[numVertices++] = opacity;
-      this.vertices[numVertices++] = rotateWithView;
-
-      // top-right corner
-      offsetX = scale * (width - anchorX);
-      offsetY = scale * anchorY;
-      this.vertices[numVertices++] = x;
-      this.vertices[numVertices++] = y;
-      this.vertices[numVertices++] = offsetX * cos - offsetY * sin;
-      this.vertices[numVertices++] = offsetX * sin + offsetY * cos;
-      this.vertices[numVertices++] = (originX + width) / imageWidth;
-      this.vertices[numVertices++] = originY / imageHeight;
-      this.vertices[numVertices++] = opacity;
-      this.vertices[numVertices++] = rotateWithView;
-
-      // top-left corner
-      offsetX = -scale * anchorX;
-      offsetY = scale * anchorY;
-      this.vertices[numVertices++] = x;
-      this.vertices[numVertices++] = y;
-      this.vertices[numVertices++] = offsetX * cos - offsetY * sin;
-      this.vertices[numVertices++] = offsetX * sin + offsetY * cos;
-      this.vertices[numVertices++] = originX / imageWidth;
-      this.vertices[numVertices++] = originY / imageHeight;
-      this.vertices[numVertices++] = opacity;
-      this.vertices[numVertices++] = rotateWithView;
-
-      this.indices[numIndices++] = n;
-      this.indices[numIndices++] = n + 1;
-      this.indices[numIndices++] = n + 2;
-      this.indices[numIndices++] = n;
-      this.indices[numIndices++] = n + 2;
-      this.indices[numIndices++] = n + 3;
-    }
-
-    return numVertices;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ImageReplay.prototype.drawMultiPoint = function(multiPointGeometry, feature) {
-    this.startIndices.push(this.indices.length);
-    this.startIndicesFeature.push(feature);
-    var flatCoordinates = multiPointGeometry.getFlatCoordinates();
-    var stride = multiPointGeometry.getStride();
-    this.drawCoordinates_(
-        flatCoordinates, 0, flatCoordinates.length, stride);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ImageReplay.prototype.drawPoint = function(pointGeometry, feature) {
-    this.startIndices.push(this.indices.length);
-    this.startIndicesFeature.push(feature);
-    var flatCoordinates = pointGeometry.getFlatCoordinates();
-    var stride = pointGeometry.getStride();
-    this.drawCoordinates_(
-        flatCoordinates, 0, flatCoordinates.length, stride);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ImageReplay.prototype.finish = function(context) {
-    var gl = context.getGL();
-
-    this.groupIndices_.push(this.indices.length);
-    this.hitDetectionGroupIndices_.push(this.indices.length);
-
-    // create, bind, and populate the vertices buffer
-    this.verticesBuffer = new ol.webgl.Buffer(this.vertices);
-
-    var indices = this.indices;
-
-    // create, bind, and populate the indices buffer
-    this.indicesBuffer = new ol.webgl.Buffer(indices);
-
-    // create textures
-    /** @type {Object.<string, WebGLTexture>} */
-    var texturePerImage = {};
-
-    this.createTextures_(this.textures_, this.images_, texturePerImage, gl);
-
-    this.createTextures_(this.hitDetectionTextures_, this.hitDetectionImages_,
-        texturePerImage, gl);
-
-    this.anchorX_ = undefined;
-    this.anchorY_ = undefined;
-    this.height_ = undefined;
-    this.images_ = null;
-    this.hitDetectionImages_ = null;
-    this.imageHeight_ = undefined;
-    this.imageWidth_ = undefined;
-    this.indices = null;
-    this.opacity_ = undefined;
-    this.originX_ = undefined;
-    this.originY_ = undefined;
-    this.rotateWithView_ = undefined;
-    this.rotation_ = undefined;
-    this.scale_ = undefined;
-    this.vertices = null;
-    this.width_ = undefined;
-  };
-
-
-  /**
-   * @private
-   * @param {Array.<WebGLTexture>} textures Textures.
-   * @param {Array.<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>} images
-   *    Images.
-   * @param {Object.<string, WebGLTexture>} texturePerImage Texture cache.
-   * @param {WebGLRenderingContext} gl Gl.
-   */
-  ol.render.webgl.ImageReplay.prototype.createTextures_ = function(textures, images, texturePerImage, gl) {
-    var texture, image, uid, i;
-    var ii = images.length;
-    for (i = 0; i < ii; ++i) {
-      image = images[i];
-
-      uid = ol.getUid(image).toString();
-      if (uid in texturePerImage) {
-        texture = texturePerImage[uid];
-      } else {
-        texture = ol.webgl.Context.createTexture(
-            gl, image, ol.webgl.CLAMP_TO_EDGE, ol.webgl.CLAMP_TO_EDGE);
-        texturePerImage[uid] = texture;
-      }
-      textures[i] = texture;
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ImageReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
-    // get the program
-    var fragmentShader = ol.render.webgl.imagereplay.defaultshader.fragment;
-    var vertexShader = ol.render.webgl.imagereplay.defaultshader.vertex;
-    var program = context.getProgram(fragmentShader, vertexShader);
-
-    // get the locations
-    var locations;
-    if (!this.defaultLocations_) {
-      // eslint-disable-next-line openlayers-internal/no-missing-requires
-      locations = new ol.render.webgl.imagereplay.defaultshader.Locations(gl, program);
-      this.defaultLocations_ = locations;
-    } else {
-      locations = this.defaultLocations_;
-    }
-
-    // use the program (FIXME: use the return value)
-    context.useProgram(program);
-
-    // enable the vertex attrib arrays
-    gl.enableVertexAttribArray(locations.a_position);
-    gl.vertexAttribPointer(locations.a_position, 2, ol.webgl.FLOAT,
-        false, 32, 0);
-
-    gl.enableVertexAttribArray(locations.a_offsets);
-    gl.vertexAttribPointer(locations.a_offsets, 2, ol.webgl.FLOAT,
-        false, 32, 8);
-
-    gl.enableVertexAttribArray(locations.a_texCoord);
-    gl.vertexAttribPointer(locations.a_texCoord, 2, ol.webgl.FLOAT,
-        false, 32, 16);
-
-    gl.enableVertexAttribArray(locations.a_opacity);
-    gl.vertexAttribPointer(locations.a_opacity, 1, ol.webgl.FLOAT,
-        false, 32, 24);
-
-    gl.enableVertexAttribArray(locations.a_rotateWithView);
-    gl.vertexAttribPointer(locations.a_rotateWithView, 1, ol.webgl.FLOAT,
-        false, 32, 28);
-
-    return locations;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ImageReplay.prototype.shutDownProgram = function(gl, locations) {
-    gl.disableVertexAttribArray(locations.a_position);
-    gl.disableVertexAttribArray(locations.a_offsets);
-    gl.disableVertexAttribArray(locations.a_texCoord);
-    gl.disableVertexAttribArray(locations.a_opacity);
-    gl.disableVertexAttribArray(locations.a_rotateWithView);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ImageReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {
-    var textures = hitDetection ? this.hitDetectionTextures_ : this.textures_;
-    var groupIndices = hitDetection ? this.hitDetectionGroupIndices_ : this.groupIndices_;
-
-    if (!ol.obj.isEmpty(skippedFeaturesHash)) {
-      this.drawReplaySkipping_(
-          gl, context, skippedFeaturesHash, textures, groupIndices);
-    } else {
-      var i, ii, start;
-      for (i = 0, ii = textures.length, start = 0; i < ii; ++i) {
-        gl.bindTexture(ol.webgl.TEXTURE_2D, textures[i]);
-        var end = groupIndices[i];
-        this.drawElements(gl, context, start, end);
-        start = end;
-      }
-    }
-  };
-
-
-  /**
-   * Draw the replay while paying attention to skipped features.
-   *
-   * This functions creates groups of features that can be drawn to together,
-   * so that the number of `drawElements` calls is minimized.
-   *
-   * For example given the following texture groups:
-   *
-   *    Group 1: A B C
-   *    Group 2: D [E] F G
-   *
-   * If feature E should be skipped, the following `drawElements` calls will be
-   * made:
-   *
-   *    drawElements with feature A, B and C
-   *    drawElements with feature D
-   *    drawElements with feature F and G
-   *
-   * @private
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.webgl.Context} context Context.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   * @param {Array.<WebGLTexture>} textures Textures.
-   * @param {Array.<number>} groupIndices Texture group indices.
-   */
-  ol.render.webgl.ImageReplay.prototype.drawReplaySkipping_ = function(gl, context, skippedFeaturesHash, textures,
-      groupIndices) {
-    var featureIndex = 0;
-
-    var i, ii;
-    for (i = 0, ii = textures.length; i < ii; ++i) {
-      gl.bindTexture(ol.webgl.TEXTURE_2D, textures[i]);
-      var groupStart = (i > 0) ? groupIndices[i - 1] : 0;
-      var groupEnd = groupIndices[i];
-
-      var start = groupStart;
-      var end = groupStart;
-      while (featureIndex < this.startIndices.length &&
-          this.startIndices[featureIndex] <= groupEnd) {
-        var feature = this.startIndicesFeature[featureIndex];
-
-        var featureUid = ol.getUid(feature).toString();
-        if (skippedFeaturesHash[featureUid] !== undefined) {
-          // feature should be skipped
-          if (start !== end) {
-            // draw the features so far
-            this.drawElements(gl, context, start, end);
-          }
-          // continue with the next feature
-          start = (featureIndex === this.startIndices.length - 1) ?
-              groupEnd : this.startIndices[featureIndex + 1];
-          end = start;
-        } else {
-          // the feature is not skipped, augment the end index
-          end = (featureIndex === this.startIndices.length - 1) ?
-              groupEnd : this.startIndices[featureIndex + 1];
-        }
-        featureIndex++;
-      }
-
-      if (start !== end) {
-        // draw the remaining features (in case there was no skipped feature
-        // in this texture group, all features of a group are drawn together)
-        this.drawElements(gl, context, start, end);
-      }
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ImageReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash,
-      featureCallback, opt_hitExtent) {
-    var i, groupStart, start, end, feature, featureUid;
-    var featureIndex = this.startIndices.length - 1;
-    for (i = this.hitDetectionTextures_.length - 1; i >= 0; --i) {
-      gl.bindTexture(ol.webgl.TEXTURE_2D, this.hitDetectionTextures_[i]);
-      groupStart = (i > 0) ? this.hitDetectionGroupIndices_[i - 1] : 0;
-      end = this.hitDetectionGroupIndices_[i];
-
-      // draw all features for this texture group
-      while (featureIndex >= 0 &&
-          this.startIndices[featureIndex] >= groupStart) {
-        start = this.startIndices[featureIndex];
-        feature = this.startIndicesFeature[featureIndex];
-        featureUid = ol.getUid(feature).toString();
-
-        if (skippedFeaturesHash[featureUid] === undefined &&
-            feature.getGeometry() &&
-            (opt_hitExtent === undefined || ol.extent.intersects(
-                /** @type {Array<number>} */ (opt_hitExtent),
-                feature.getGeometry().getExtent()))) {
-          gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-          this.drawElements(gl, context, start, end);
-
-          var result = featureCallback(feature);
-          if (result) {
-            return result;
-          }
-        }
-
-        end = start;
-        featureIndex--;
-      }
-    }
-    return undefined;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ImageReplay.prototype.setImageStyle = function(imageStyle) {
-    var anchor = imageStyle.getAnchor();
-    var image = imageStyle.getImage(1);
-    var imageSize = imageStyle.getImageSize();
-    var hitDetectionImage = imageStyle.getHitDetectionImage(1);
-    var opacity = imageStyle.getOpacity();
-    var origin = imageStyle.getOrigin();
-    var rotateWithView = imageStyle.getRotateWithView();
-    var rotation = imageStyle.getRotation();
-    var size = imageStyle.getSize();
-    var scale = imageStyle.getScale();
-
-    var currentImage;
-    if (this.images_.length === 0) {
-      this.images_.push(image);
-    } else {
-      currentImage = this.images_[this.images_.length - 1];
-      if (ol.getUid(currentImage) != ol.getUid(image)) {
-        this.groupIndices_.push(this.indices.length);
-        this.images_.push(image);
-      }
-    }
-
-    if (this.hitDetectionImages_.length === 0) {
-      this.hitDetectionImages_.push(hitDetectionImage);
-    } else {
-      currentImage =
-          this.hitDetectionImages_[this.hitDetectionImages_.length - 1];
-      if (ol.getUid(currentImage) != ol.getUid(hitDetectionImage)) {
-        this.hitDetectionGroupIndices_.push(this.indices.length);
-        this.hitDetectionImages_.push(hitDetectionImage);
-      }
-    }
-
-    this.anchorX_ = anchor[0];
-    this.anchorY_ = anchor[1];
-    this.height_ = size[1];
-    this.imageHeight_ = imageSize[1];
-    this.imageWidth_ = imageSize[0];
-    this.opacity_ = opacity;
-    this.originX_ = origin[0];
-    this.originY_ = origin[1];
-    this.rotation_ = rotation;
-    this.rotateWithView_ = rotateWithView;
-    this.scale_ = scale;
-    this.width_ = size[0];
-  };
-
-}
-
-goog.provide('ol.geom.flat.topology');
-
-goog.require('ol.geom.flat.area');
-
-/**
- * Check if the linestring is a boundary.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {boolean} The linestring is a boundary.
- */
-ol.geom.flat.topology.lineStringIsClosed = function(flatCoordinates, offset, end, stride) {
-  var lastCoord = end - stride;
-  if (flatCoordinates[offset] === flatCoordinates[lastCoord] &&
-      flatCoordinates[offset + 1] === flatCoordinates[lastCoord + 1] && (end - offset) / stride > 3) {
-    return !!ol.geom.flat.area.linearRing(flatCoordinates, offset, end, stride);
-  }
-  return false;
-};
-
-// This file is automatically generated, do not edit
-/* eslint openlayers-internal/no-missing-requires: 0 */
-goog.provide('ol.render.webgl.linestringreplay.defaultshader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Fragment}
-   * @struct
-   */
-  ol.render.webgl.linestringreplay.defaultshader.Fragment = function() {
-    ol.webgl.Fragment.call(this, ol.render.webgl.linestringreplay.defaultshader.Fragment.SOURCE);
-  };
-  ol.inherits(ol.render.webgl.linestringreplay.defaultshader.Fragment, ol.webgl.Fragment);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.linestringreplay.defaultshader.Fragment.DEBUG_SOURCE = 'precision mediump float;\nvarying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_color;\nuniform vec2 u_size;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n  if (v_round > 0.0) {\n    vec2 windowCoords = vec2((v_roundVertex.x + 1.0) / 2.0 * u_size.x * u_pixelRatio,\n        (v_roundVertex.y + 1.0) / 2.0 * u_size.y * u_pixelRatio);\n    if (length(windowCoords - gl_FragCoord.xy) > v_halfWidth * u_pixelRatio) {\n      discard;\n    }\n  }\n  gl_FragColor = u_color;\n  float alpha = u_color.a * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.linestringreplay.defaultshader.Fragment.OPTIMIZED_SOURCE = 'precision mediump float;varying float a;varying vec2 b;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((b.x+1.0)/2.0*o.x*p,(b.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.linestringreplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
-      ol.render.webgl.linestringreplay.defaultshader.Fragment.DEBUG_SOURCE :
-      ol.render.webgl.linestringreplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
-
-
-  ol.render.webgl.linestringreplay.defaultshader.fragment = new ol.render.webgl.linestringreplay.defaultshader.Fragment();
-
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Vertex}
-   * @struct
-   */
-  ol.render.webgl.linestringreplay.defaultshader.Vertex = function() {
-    ol.webgl.Vertex.call(this, ol.render.webgl.linestringreplay.defaultshader.Vertex.SOURCE);
-  };
-  ol.inherits(ol.render.webgl.linestringreplay.defaultshader.Vertex, ol.webgl.Vertex);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.linestringreplay.defaultshader.Vertex.DEBUG_SOURCE = 'varying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\nattribute vec2 a_lastPos;\nattribute vec2 a_position;\nattribute vec2 a_nextPos;\nattribute float a_direction;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_miterLimit;\n\nbool nearlyEquals(in float value, in float ref) {\n  float epsilon = 0.000000000001;\n  return value >= ref - epsilon && value <= ref + epsilon;\n}\n\nvoid alongNormal(out vec2 offset, in vec2 nextP, in float turnDir, in float direction) {\n  vec2 dirVect = nextP - a_position;\n  vec2 normal = normalize(vec2(-turnDir * dirVect.y, turnDir * dirVect.x));\n  offset = u_lineWidth / 2.0 * normal * direction;\n}\n\nvoid miterUp(out vec2 offset, out float round, in bool isRound, in float direction) {\n  float halfWidth = u_lineWidth / 2.0;\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 dirVect = a_nextPos - a_position;\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n  float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n  offset = normal * direction * miterLength;\n  round = 0.0;\n  if (isRound) {\n    round = 1.0;\n  } else if (miterLength > u_miterLimit + u_lineWidth) {\n    offset = halfWidth * tmpNormal * direction;\n  }\n}\n\nbool miterDown(out vec2 offset, in vec4 projPos, in mat4 offsetMatrix, in float direction) {\n  bool degenerate = false;\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 dirVect = a_lastPos - a_position;\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n  vec2 longOffset, shortOffset, longVertex;\n  vec4 shortProjVertex;\n  float halfWidth = u_lineWidth / 2.0;\n  if (length(a_nextPos - a_position) > length(a_lastPos - a_position)) {\n    longOffset = tmpNormal * direction * halfWidth;\n    shortOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n    longVertex = a_nextPos;\n    shortProjVertex = u_projectionMatrix * vec4(a_lastPos, 0.0, 1.0);\n  } else {\n    shortOffset = tmpNormal * direction * halfWidth;\n    longOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n    longVertex = a_lastPos;\n    shortProjVertex = u_projectionMatrix * vec4(a_nextPos, 0.0, 1.0);\n  }\n  //Intersection algorithm based on theory by Paul Bourke (http://paulbourke.net/geometry/pointlineplane/).\n  vec4 p1 = u_projectionMatrix * vec4(longVertex, 0.0, 1.0) + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n  vec4 p2 = projPos + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n  vec4 p3 = shortProjVertex + offsetMatrix * vec4(-shortOffset, 0.0, 0.0);\n  vec4 p4 = shortProjVertex + offsetMatrix * vec4(shortOffset, 0.0, 0.0);\n  float denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y);\n  float firstU = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x)) / denom;\n  float secondU = ((p2.x - p1.x) * (p1.y - p3.y) - (p2.y - p1.y) * (p1.x - p3.x)) / denom;\n  float epsilon = 0.000000000001;\n  if (firstU > epsilon && firstU < 1.0 - epsilon && secondU > epsilon && secondU < 1.0 - epsilon) {\n    shortProjVertex.x = p1.x + firstU * (p2.x - p1.x);\n    shortProjVertex.y = p1.y + firstU * (p2.y - p1.y);\n    offset = shortProjVertex.xy;\n    degenerate = true;\n  } else {\n    float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n    offset = normal * direction * miterLength;\n  }\n  return degenerate;\n}\n\nvoid squareCap(out vec2 offset, out float round, in bool isRound, in vec2 nextP,\n    in float turnDir, in float direction) {\n  round = 0.0;\n  vec2 dirVect = a_position - nextP;\n  vec2 firstNormal = normalize(dirVect);\n  vec2 secondNormal = vec2(turnDir * firstNormal.y * direction, -turnDir * firstNormal.x * direction);\n  vec2 hypotenuse = normalize(firstNormal - secondNormal);\n  vec2 normal = vec2(turnDir * hypotenuse.y * direction, -turnDir * hypotenuse.x * direction);\n  float length = sqrt(v_halfWidth * v_halfWidth * 2.0);\n  offset = normal * length;\n  if (isRound) {\n    round = 1.0;\n  }\n}\n\nvoid main(void) {\n  bool degenerate = false;\n  float direction = float(sign(a_direction));\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  vec2 offset;\n  vec4 projPos = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n  bool round = nearlyEquals(mod(a_direction, 2.0), 0.0);\n\n  v_round = 0.0;\n  v_halfWidth = u_lineWidth / 2.0;\n  v_roundVertex = projPos.xy;\n\n  if (nearlyEquals(mod(a_direction, 3.0), 0.0) || nearlyEquals(mod(a_direction, 17.0), 0.0)) {\n    alongNormal(offset, a_nextPos, 1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 5.0), 0.0) || nearlyEquals(mod(a_direction, 13.0), 0.0)) {\n    alongNormal(offset, a_lastPos, -1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 23.0), 0.0)) {\n    miterUp(offset, v_round, round, direction);\n  } else if (nearlyEquals(mod(a_direction, 19.0), 0.0)) {\n    degenerate = miterDown(offset, projPos, offsetMatrix, direction);\n  } else if (nearlyEquals(mod(a_direction, 7.0), 0.0)) {\n    squareCap(offset, v_round, round, a_nextPos, 1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 11.0), 0.0)) {\n    squareCap(offset, v_round, round, a_lastPos, -1.0, direction);\n  }\n  if (!degenerate) {\n    vec4 offsets = offsetMatrix * vec4(offset, 0.0, 0.0);\n    gl_Position = projPos + offsets;\n  } else {\n    gl_Position = vec4(offset, 0.0, 1.0);\n  }\n}\n\n\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.linestringreplay.defaultshader.Vertex.OPTIMIZED_SOURCE = 'varying float a;varying vec2 b;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;b=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.linestringreplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
-      ol.render.webgl.linestringreplay.defaultshader.Vertex.DEBUG_SOURCE :
-      ol.render.webgl.linestringreplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
-
-
-  ol.render.webgl.linestringreplay.defaultshader.vertex = new ol.render.webgl.linestringreplay.defaultshader.Vertex();
-
-
-  /**
-   * @constructor
-   * @param {WebGLRenderingContext} gl GL.
-   * @param {WebGLProgram} program Program.
-   * @struct
-   */
-  ol.render.webgl.linestringreplay.defaultshader.Locations = function(gl, program) {
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_color = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_color' : 'n');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_lineWidth = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_lineWidth' : 'k');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_miterLimit = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_miterLimit' : 'l');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_offsetRotateMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_offsetScaleMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_opacity = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_opacity' : 'm');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_pixelRatio = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_pixelRatio' : 'p');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_projectionMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_size = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_size' : 'o');
-
-    /**
-     * @type {number}
-     */
-    this.a_direction = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_direction' : 'g');
-
-    /**
-     * @type {number}
-     */
-    this.a_lastPos = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_lastPos' : 'd');
-
-    /**
-     * @type {number}
-     */
-    this.a_nextPos = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_nextPos' : 'f');
-
-    /**
-     * @type {number}
-     */
-    this.a_position = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_position' : 'e');
-  };
-
-}
-
-goog.provide('ol.render.webgl.LineStringReplay');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.color');
-goog.require('ol.extent');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.geom.flat.topology');
-goog.require('ol.obj');
-goog.require('ol.render.webgl');
-goog.require('ol.render.webgl.Replay');
-goog.require('ol.render.webgl.linestringreplay.defaultshader');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.render.webgl.Replay}
-   * @param {number} tolerance Tolerance.
-   * @param {ol.Extent} maxExtent Max extent.
-   * @struct
-   */
-  ol.render.webgl.LineStringReplay = function(tolerance, maxExtent) {
-    ol.render.webgl.Replay.call(this, tolerance, maxExtent);
-
-    /**
-     * @private
-     * @type {ol.render.webgl.linestringreplay.defaultshader.Locations}
-     */
-    this.defaultLocations_ = null;
-
-    /**
-     * @private
-     * @type {Array.<Array.<?>>}
-     */
-    this.styles_ = [];
-
-    /**
-     * @private
-     * @type {Array.<number>}
-     */
-    this.styleIndices_ = [];
-
-    /**
-     * @private
-     * @type {{strokeColor: (Array.<number>|null),
-     *         lineCap: (string|undefined),
-     *         lineDash: Array.<number>,
-     *         lineDashOffset: (number|undefined),
-     *         lineJoin: (string|undefined),
-     *         lineWidth: (number|undefined),
-     *         miterLimit: (number|undefined),
-     *         changed: boolean}|null}
-     */
-    this.state_ = {
-      strokeColor: null,
-      lineCap: undefined,
-      lineDash: null,
-      lineDashOffset: undefined,
-      lineJoin: undefined,
-      lineWidth: undefined,
-      miterLimit: undefined,
-      changed: false
-    };
-
-  };
-  ol.inherits(ol.render.webgl.LineStringReplay, ol.render.webgl.Replay);
-
-
-  /**
-   * Draw one segment.
-   * @private
-   * @param {Array.<number>} flatCoordinates Flat coordinates.
-   * @param {number} offset Offset.
-   * @param {number} end End.
-   * @param {number} stride Stride.
-   */
-  ol.render.webgl.LineStringReplay.prototype.drawCoordinates_ = function(flatCoordinates, offset, end, stride) {
-
-    var i, ii;
-    var numVertices = this.vertices.length;
-    var numIndices = this.indices.length;
-    //To save a vertex, the direction of a point is a product of the sign (1 or -1), a prime from
-    //ol.render.webgl.LineStringReplay.Instruction_, and a rounding factor (1 or 2). If the product is even,
-    //we round it. If it is odd, we don't.
-    var lineJoin = this.state_.lineJoin === 'bevel' ? 0 :
-        this.state_.lineJoin === 'miter' ? 1 : 2;
-    var lineCap = this.state_.lineCap === 'butt' ? 0 :
-        this.state_.lineCap === 'square' ? 1 : 2;
-    var closed = ol.geom.flat.topology.lineStringIsClosed(flatCoordinates, offset, end, stride);
-    var startCoords, sign, n;
-    var lastIndex = numIndices;
-    var lastSign = 1;
-    //We need the adjacent vertices to define normals in joins. p0 = last, p1 = current, p2 = next.
-    var p0, p1, p2;
-
-    for (i = offset, ii = end; i < ii; i += stride) {
-
-      n = numVertices / 7;
-
-      p0 = p1;
-      p1 = p2 || [flatCoordinates[i], flatCoordinates[i + 1]];
-      //First vertex.
-      if (i === offset) {
-        p2 = [flatCoordinates[i + stride], flatCoordinates[i + stride + 1]];
-        if (end - offset === stride * 2 && ol.array.equals(p1, p2)) {
-          break;
-        }
-        if (closed) {
-          //A closed line! Complete the circle.
-          p0 = [flatCoordinates[end - stride * 2],
-            flatCoordinates[end - stride * 2 + 1]];
-
-          startCoords = p2;
-        } else {
-          //Add the first two/four vertices.
-
-          if (lineCap) {
-            numVertices = this.addVertices_([0, 0], p1, p2,
-                lastSign * ol.render.webgl.LineStringReplay.Instruction_.BEGIN_LINE_CAP * lineCap, numVertices);
-
-            numVertices = this.addVertices_([0, 0], p1, p2,
-                -lastSign * ol.render.webgl.LineStringReplay.Instruction_.BEGIN_LINE_CAP * lineCap, numVertices);
-
-            this.indices[numIndices++] = n + 2;
-            this.indices[numIndices++] = n;
-            this.indices[numIndices++] = n + 1;
-
-            this.indices[numIndices++] = n + 1;
-            this.indices[numIndices++] = n + 3;
-            this.indices[numIndices++] = n + 2;
-
-          }
-
-          numVertices = this.addVertices_([0, 0], p1, p2,
-              lastSign * ol.render.webgl.LineStringReplay.Instruction_.BEGIN_LINE * (lineCap || 1), numVertices);
-
-          numVertices = this.addVertices_([0, 0], p1, p2,
-              -lastSign * ol.render.webgl.LineStringReplay.Instruction_.BEGIN_LINE * (lineCap || 1), numVertices);
-
-          lastIndex = numVertices / 7 - 1;
-
-          continue;
-        }
-      } else if (i === end - stride) {
-        //Last vertex.
-        if (closed) {
-          //Same as the first vertex.
-          p2 = startCoords;
-          break;
-        } else {
-          p0 = p0 || [0, 0];
-
-          numVertices = this.addVertices_(p0, p1, [0, 0],
-              lastSign * ol.render.webgl.LineStringReplay.Instruction_.END_LINE * (lineCap || 1), numVertices);
-
-          numVertices = this.addVertices_(p0, p1, [0, 0],
-              -lastSign * ol.render.webgl.LineStringReplay.Instruction_.END_LINE * (lineCap || 1), numVertices);
-
-          this.indices[numIndices++] = n;
-          this.indices[numIndices++] = lastIndex - 1;
-          this.indices[numIndices++] = lastIndex;
-
-          this.indices[numIndices++] = lastIndex;
-          this.indices[numIndices++] = n + 1;
-          this.indices[numIndices++] = n;
-
-          if (lineCap) {
-            numVertices = this.addVertices_(p0, p1, [0, 0],
-                lastSign * ol.render.webgl.LineStringReplay.Instruction_.END_LINE_CAP * lineCap, numVertices);
-
-            numVertices = this.addVertices_(p0, p1, [0, 0],
-                -lastSign * ol.render.webgl.LineStringReplay.Instruction_.END_LINE_CAP * lineCap, numVertices);
-
-            this.indices[numIndices++] = n + 2;
-            this.indices[numIndices++] = n;
-            this.indices[numIndices++] = n + 1;
-
-            this.indices[numIndices++] = n + 1;
-            this.indices[numIndices++] = n + 3;
-            this.indices[numIndices++] = n + 2;
-
-          }
-
-          break;
-        }
-      } else {
-        p2 = [flatCoordinates[i + stride], flatCoordinates[i + stride + 1]];
-      }
-
-      // We group CW and straight lines, thus the not so inituitive CCW checking function.
-      sign = ol.render.webgl.triangleIsCounterClockwise(p0[0], p0[1], p1[0], p1[1], p2[0], p2[1])
-          ? -1 : 1;
-
-      numVertices = this.addVertices_(p0, p1, p2,
-          sign * ol.render.webgl.LineStringReplay.Instruction_.BEVEL_FIRST * (lineJoin || 1), numVertices);
-
-      numVertices = this.addVertices_(p0, p1, p2,
-          sign * ol.render.webgl.LineStringReplay.Instruction_.BEVEL_SECOND * (lineJoin || 1), numVertices);
-
-      numVertices = this.addVertices_(p0, p1, p2,
-          -sign * ol.render.webgl.LineStringReplay.Instruction_.MITER_BOTTOM * (lineJoin || 1), numVertices);
-
-      if (i > offset) {
-        this.indices[numIndices++] = n;
-        this.indices[numIndices++] = lastIndex - 1;
-        this.indices[numIndices++] = lastIndex;
-
-        this.indices[numIndices++] = n + 2;
-        this.indices[numIndices++] = n;
-        this.indices[numIndices++] = lastSign * sign > 0 ? lastIndex : lastIndex - 1;
-      }
-
-      this.indices[numIndices++] = n;
-      this.indices[numIndices++] = n + 2;
-      this.indices[numIndices++] = n + 1;
-
-      lastIndex = n + 2;
-      lastSign = sign;
-
-      //Add miter
-      if (lineJoin) {
-        numVertices = this.addVertices_(p0, p1, p2,
-            sign * ol.render.webgl.LineStringReplay.Instruction_.MITER_TOP * lineJoin, numVertices);
-
-        this.indices[numIndices++] = n + 1;
-        this.indices[numIndices++] = n + 3;
-        this.indices[numIndices++] = n;
-      }
-    }
-
-    if (closed) {
-      n = n || numVertices / 7;
-      sign = ol.geom.flat.orient.linearRingIsClockwise([p0[0], p0[1], p1[0], p1[1], p2[0], p2[1]], 0, 6, 2)
-          ? 1 : -1;
-
-      numVertices = this.addVertices_(p0, p1, p2,
-          sign * ol.render.webgl.LineStringReplay.Instruction_.BEVEL_FIRST * (lineJoin || 1), numVertices);
-
-      numVertices = this.addVertices_(p0, p1, p2,
-          -sign * ol.render.webgl.LineStringReplay.Instruction_.MITER_BOTTOM * (lineJoin || 1), numVertices);
-
-      this.indices[numIndices++] = n;
-      this.indices[numIndices++] = lastIndex - 1;
-      this.indices[numIndices++] = lastIndex;
-
-      this.indices[numIndices++] = n + 1;
-      this.indices[numIndices++] = n;
-      this.indices[numIndices++] = lastSign * sign > 0 ? lastIndex : lastIndex - 1;
-    }
-  };
-
-  /**
-   * @param {Array.<number>} p0 Last coordinates.
-   * @param {Array.<number>} p1 Current coordinates.
-   * @param {Array.<number>} p2 Next coordinates.
-   * @param {number} product Sign, instruction, and rounding product.
-   * @param {number} numVertices Vertex counter.
-   * @return {number} Vertex counter.
-   * @private
-   */
-  ol.render.webgl.LineStringReplay.prototype.addVertices_ = function(p0, p1, p2, product, numVertices) {
-    this.vertices[numVertices++] = p0[0];
-    this.vertices[numVertices++] = p0[1];
-    this.vertices[numVertices++] = p1[0];
-    this.vertices[numVertices++] = p1[1];
-    this.vertices[numVertices++] = p2[0];
-    this.vertices[numVertices++] = p2[1];
-    this.vertices[numVertices++] = product;
-
-    return numVertices;
-  };
-
-  /**
-   * Check if the linestring can be drawn (i. e. valid).
-   * @param {Array.<number>} flatCoordinates Flat coordinates.
-   * @param {number} offset Offset.
-   * @param {number} end End.
-   * @param {number} stride Stride.
-   * @return {boolean} The linestring can be drawn.
-   * @private
-   */
-  ol.render.webgl.LineStringReplay.prototype.isValid_ = function(flatCoordinates, offset, end, stride) {
-    var range = end - offset;
-    if (range < stride * 2) {
-      return false;
-    } else if (range === stride * 2) {
-      var firstP = [flatCoordinates[offset], flatCoordinates[offset + 1]];
-      var lastP = [flatCoordinates[offset + stride], flatCoordinates[offset + stride + 1]];
-      return !ol.array.equals(firstP, lastP);
-    }
-
-    return true;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.LineStringReplay.prototype.drawLineString = function(lineStringGeometry, feature) {
-    var flatCoordinates = lineStringGeometry.getFlatCoordinates();
-    var stride = lineStringGeometry.getStride();
-    if (this.isValid_(flatCoordinates, 0, flatCoordinates.length, stride)) {
-      flatCoordinates = ol.geom.flat.transform.translate(flatCoordinates, 0, flatCoordinates.length,
-          stride, -this.origin[0], -this.origin[1]);
-      if (this.state_.changed) {
-        this.styleIndices_.push(this.indices.length);
-        this.state_.changed = false;
-      }
-      this.startIndices.push(this.indices.length);
-      this.startIndicesFeature.push(feature);
-      this.drawCoordinates_(
-          flatCoordinates, 0, flatCoordinates.length, stride);
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.LineStringReplay.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {
-    var indexCount = this.indices.length;
-    var ends = multiLineStringGeometry.getEnds();
-    ends.unshift(0);
-    var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();
-    var stride = multiLineStringGeometry.getStride();
-    var i, ii;
-    if (ends.length > 1) {
-      for (i = 1, ii = ends.length; i < ii; ++i) {
-        if (this.isValid_(flatCoordinates, ends[i - 1], ends[i], stride)) {
-          var lineString = ol.geom.flat.transform.translate(flatCoordinates, ends[i - 1], ends[i],
-              stride, -this.origin[0], -this.origin[1]);
-          this.drawCoordinates_(
-              lineString, 0, lineString.length, stride);
-        }
-      }
-    }
-    if (this.indices.length > indexCount) {
-      this.startIndices.push(indexCount);
-      this.startIndicesFeature.push(feature);
-      if (this.state_.changed) {
-        this.styleIndices_.push(indexCount);
-        this.state_.changed = false;
-      }
-    }
-  };
-
-
-  /**
-   * @param {Array.<number>} flatCoordinates Flat coordinates.
-   * @param {Array.<Array.<number>>} holeFlatCoordinates Hole flat coordinates.
-   * @param {number} stride Stride.
-   */
-  ol.render.webgl.LineStringReplay.prototype.drawPolygonCoordinates = function(
-      flatCoordinates, holeFlatCoordinates, stride) {
-    if (!ol.geom.flat.topology.lineStringIsClosed(flatCoordinates, 0,
-        flatCoordinates.length, stride)) {
-      flatCoordinates.push(flatCoordinates[0]);
-      flatCoordinates.push(flatCoordinates[1]);
-    }
-    this.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);
-    if (holeFlatCoordinates.length) {
-      var i, ii;
-      for (i = 0, ii = holeFlatCoordinates.length; i < ii; ++i) {
-        if (!ol.geom.flat.topology.lineStringIsClosed(holeFlatCoordinates[i], 0,
-            holeFlatCoordinates[i].length, stride)) {
-          holeFlatCoordinates[i].push(holeFlatCoordinates[i][0]);
-          holeFlatCoordinates[i].push(holeFlatCoordinates[i][1]);
-        }
-        this.drawCoordinates_(holeFlatCoordinates[i], 0,
-            holeFlatCoordinates[i].length, stride);
-      }
-    }
-  };
-
-
-  /**
-   * @param {ol.Feature|ol.render.Feature} feature Feature.
-   * @param {number=} opt_index Index count.
-   */
-  ol.render.webgl.LineStringReplay.prototype.setPolygonStyle = function(feature, opt_index) {
-    var index = opt_index === undefined ? this.indices.length : opt_index;
-    this.startIndices.push(index);
-    this.startIndicesFeature.push(feature);
-    if (this.state_.changed) {
-      this.styleIndices_.push(index);
-      this.state_.changed = false;
-    }
-  };
-
-
-  /**
-   * @return {number} Current index.
-   */
-  ol.render.webgl.LineStringReplay.prototype.getCurrentIndex = function() {
-    return this.indices.length;
-  };
-
-
-  /**
-   * @inheritDoc
-   **/
-  ol.render.webgl.LineStringReplay.prototype.finish = function(context) {
-    // create, bind, and populate the vertices buffer
-    this.verticesBuffer = new ol.webgl.Buffer(this.vertices);
-
-    // create, bind, and populate the indices buffer
-    this.indicesBuffer = new ol.webgl.Buffer(this.indices);
-
-    this.startIndices.push(this.indices.length);
-
-    //Clean up, if there is nothing to draw
-    if (this.styleIndices_.length === 0 && this.styles_.length > 0) {
-      this.styles_ = [];
-    }
-
-    this.vertices = null;
-    this.indices = null;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.LineStringReplay.prototype.getDeleteResourcesFunction = function(context) {
-    var verticesBuffer = this.verticesBuffer;
-    var indicesBuffer = this.indicesBuffer;
-    return function() {
-      context.deleteBuffer(verticesBuffer);
-      context.deleteBuffer(indicesBuffer);
-    };
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.LineStringReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
-    // get the program
-    var fragmentShader, vertexShader;
-    fragmentShader = ol.render.webgl.linestringreplay.defaultshader.fragment;
-    vertexShader = ol.render.webgl.linestringreplay.defaultshader.vertex;
-    var program = context.getProgram(fragmentShader, vertexShader);
-
-    // get the locations
-    var locations;
-    if (!this.defaultLocations_) {
-      // eslint-disable-next-line openlayers-internal/no-missing-requires
-      locations = new ol.render.webgl.linestringreplay.defaultshader.Locations(gl, program);
-      this.defaultLocations_ = locations;
-    } else {
-      locations = this.defaultLocations_;
-    }
-
-    context.useProgram(program);
-
-    // enable the vertex attrib arrays
-    gl.enableVertexAttribArray(locations.a_lastPos);
-    gl.vertexAttribPointer(locations.a_lastPos, 2, ol.webgl.FLOAT,
-        false, 28, 0);
-
-    gl.enableVertexAttribArray(locations.a_position);
-    gl.vertexAttribPointer(locations.a_position, 2, ol.webgl.FLOAT,
-        false, 28, 8);
-
-    gl.enableVertexAttribArray(locations.a_nextPos);
-    gl.vertexAttribPointer(locations.a_nextPos, 2, ol.webgl.FLOAT,
-        false, 28, 16);
-
-    gl.enableVertexAttribArray(locations.a_direction);
-    gl.vertexAttribPointer(locations.a_direction, 1, ol.webgl.FLOAT,
-        false, 28, 24);
-
-    // Enable renderer specific uniforms.
-    gl.uniform2fv(locations.u_size, size);
-    gl.uniform1f(locations.u_pixelRatio, pixelRatio);
-
-    return locations;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.LineStringReplay.prototype.shutDownProgram = function(gl, locations) {
-    gl.disableVertexAttribArray(locations.a_lastPos);
-    gl.disableVertexAttribArray(locations.a_position);
-    gl.disableVertexAttribArray(locations.a_nextPos);
-    gl.disableVertexAttribArray(locations.a_direction);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.LineStringReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {
-    //Save GL parameters.
-    var tmpDepthFunc = /** @type {number} */ (gl.getParameter(gl.DEPTH_FUNC));
-    var tmpDepthMask = /** @type {boolean} */ (gl.getParameter(gl.DEPTH_WRITEMASK));
-
-    if (!hitDetection) {
-      gl.enable(gl.DEPTH_TEST);
-      gl.depthMask(true);
-      gl.depthFunc(gl.NOTEQUAL);
-    }
-
-    if (!ol.obj.isEmpty(skippedFeaturesHash)) {
-      this.drawReplaySkipping_(gl, context, skippedFeaturesHash);
-    } else {
-      //Draw by style groups to minimize drawElements() calls.
-      var i, start, end, nextStyle;
-      end = this.startIndices[this.startIndices.length - 1];
-      for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-        start = this.styleIndices_[i];
-        nextStyle = this.styles_[i];
-        this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);
-        this.drawElements(gl, context, start, end);
-        gl.clear(gl.DEPTH_BUFFER_BIT);
-        end = start;
-      }
-    }
-    if (!hitDetection) {
-      gl.disable(gl.DEPTH_TEST);
-      gl.clear(gl.DEPTH_BUFFER_BIT);
-      //Restore GL parameters.
-      gl.depthMask(tmpDepthMask);
-      gl.depthFunc(tmpDepthFunc);
-    }
-  };
-
-
-  /**
-   * @private
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.webgl.Context} context Context.
-   * @param {Object} skippedFeaturesHash Ids of features to skip.
-   */
-  ol.render.webgl.LineStringReplay.prototype.drawReplaySkipping_ = function(gl, context, skippedFeaturesHash) {
-    var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex, featureStart;
-    featureIndex = this.startIndices.length - 2;
-    end = start = this.startIndices[featureIndex + 1];
-    for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-      nextStyle = this.styles_[i];
-      this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);
-      groupStart = this.styleIndices_[i];
-
-      while (featureIndex >= 0 &&
-          this.startIndices[featureIndex] >= groupStart) {
-        featureStart = this.startIndices[featureIndex];
-        feature = this.startIndicesFeature[featureIndex];
-        featureUid = ol.getUid(feature).toString();
-
-        if (skippedFeaturesHash[featureUid]) {
-          if (start !== end) {
-            this.drawElements(gl, context, start, end);
-            gl.clear(gl.DEPTH_BUFFER_BIT);
-          }
-          end = featureStart;
-        }
-        featureIndex--;
-        start = featureStart;
-      }
-      if (start !== end) {
-        this.drawElements(gl, context, start, end);
-        gl.clear(gl.DEPTH_BUFFER_BIT);
-      }
-      start = end = groupStart;
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.LineStringReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash,
-      featureCallback, opt_hitExtent) {
-    var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex;
-    featureIndex = this.startIndices.length - 2;
-    end = this.startIndices[featureIndex + 1];
-    for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-      nextStyle = this.styles_[i];
-      this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);
-      groupStart = this.styleIndices_[i];
-
-      while (featureIndex >= 0 &&
-          this.startIndices[featureIndex] >= groupStart) {
-        start = this.startIndices[featureIndex];
-        feature = this.startIndicesFeature[featureIndex];
-        featureUid = ol.getUid(feature).toString();
-
-        if (skippedFeaturesHash[featureUid] === undefined &&
-            feature.getGeometry() &&
-            (opt_hitExtent === undefined || ol.extent.intersects(
-                /** @type {Array<number>} */ (opt_hitExtent),
-                feature.getGeometry().getExtent()))) {
-          gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-          this.drawElements(gl, context, start, end);
-
-          var result = featureCallback(feature);
-
-          if (result) {
-            return result;
-          }
-
-        }
-        featureIndex--;
-        end = start;
-      }
-    }
-    return undefined;
-  };
-
-
-  /**
-   * @private
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {Array.<number>} color Color.
-   * @param {number} lineWidth Line width.
-   * @param {number} miterLimit Miter limit.
-   */
-  ol.render.webgl.LineStringReplay.prototype.setStrokeStyle_ = function(gl, color, lineWidth, miterLimit) {
-    gl.uniform4fv(this.defaultLocations_.u_color, color);
-    gl.uniform1f(this.defaultLocations_.u_lineWidth, lineWidth);
-    gl.uniform1f(this.defaultLocations_.u_miterLimit, miterLimit);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.LineStringReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-    var strokeStyleLineCap = strokeStyle.getLineCap();
-    this.state_.lineCap = strokeStyleLineCap !== undefined ?
-        strokeStyleLineCap : ol.render.webgl.defaultLineCap;
-    var strokeStyleLineDash = strokeStyle.getLineDash();
-    this.state_.lineDash = strokeStyleLineDash ?
-        strokeStyleLineDash : ol.render.webgl.defaultLineDash;
-    var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
-    this.state_.lineDashOffset = strokeStyleLineDashOffset ?
-        strokeStyleLineDashOffset : ol.render.webgl.defaultLineDashOffset;
-    var strokeStyleLineJoin = strokeStyle.getLineJoin();
-    this.state_.lineJoin = strokeStyleLineJoin !== undefined ?
-        strokeStyleLineJoin : ol.render.webgl.defaultLineJoin;
-    var strokeStyleColor = strokeStyle.getColor();
-    if (!(strokeStyleColor instanceof CanvasGradient) &&
-        !(strokeStyleColor instanceof CanvasPattern)) {
-      strokeStyleColor = ol.color.asArray(strokeStyleColor).map(function(c, i) {
-        return i != 3 ? c / 255 : c;
-      }) || ol.render.webgl.defaultStrokeStyle;
-    } else {
-      strokeStyleColor = ol.render.webgl.defaultStrokeStyle;
-    }
-    var strokeStyleWidth = strokeStyle.getWidth();
-    strokeStyleWidth = strokeStyleWidth !== undefined ?
-        strokeStyleWidth : ol.render.webgl.defaultLineWidth;
-    var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
-    strokeStyleMiterLimit = strokeStyleMiterLimit !== undefined ?
-        strokeStyleMiterLimit : ol.render.webgl.defaultMiterLimit;
-    if (!this.state_.strokeColor || !ol.array.equals(this.state_.strokeColor, strokeStyleColor) ||
-        this.state_.lineWidth !== strokeStyleWidth || this.state_.miterLimit !== strokeStyleMiterLimit) {
-      this.state_.changed = true;
-      this.state_.strokeColor = strokeStyleColor;
-      this.state_.lineWidth = strokeStyleWidth;
-      this.state_.miterLimit = strokeStyleMiterLimit;
-      this.styles_.push([strokeStyleColor, strokeStyleWidth, strokeStyleMiterLimit]);
-    }
-  };
-
-  /**
-   * @enum {number}
-   * @private
-   */
-  ol.render.webgl.LineStringReplay.Instruction_ = {
-    ROUND: 2,
-    BEGIN_LINE: 3,
-    END_LINE: 5,
-    BEGIN_LINE_CAP: 7,
-    END_LINE_CAP: 11,
-    BEVEL_FIRST: 13,
-    BEVEL_SECOND: 17,
-    MITER_BOTTOM: 19,
-    MITER_TOP: 23
-  };
-
-}
-
-// This file is automatically generated, do not edit
-/* eslint openlayers-internal/no-missing-requires: 0 */
-goog.provide('ol.render.webgl.polygonreplay.defaultshader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Fragment}
-   * @struct
-   */
-  ol.render.webgl.polygonreplay.defaultshader.Fragment = function() {
-    ol.webgl.Fragment.call(this, ol.render.webgl.polygonreplay.defaultshader.Fragment.SOURCE);
-  };
-  ol.inherits(ol.render.webgl.polygonreplay.defaultshader.Fragment, ol.webgl.Fragment);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.polygonreplay.defaultshader.Fragment.DEBUG_SOURCE = 'precision mediump float;\n\n\n\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main(void) {\n  gl_FragColor = u_color;\n  float alpha = u_color.a * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.polygonreplay.defaultshader.Fragment.OPTIMIZED_SOURCE = 'precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.polygonreplay.defaultshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
-      ol.render.webgl.polygonreplay.defaultshader.Fragment.DEBUG_SOURCE :
-      ol.render.webgl.polygonreplay.defaultshader.Fragment.OPTIMIZED_SOURCE;
-
-
-  ol.render.webgl.polygonreplay.defaultshader.fragment = new ol.render.webgl.polygonreplay.defaultshader.Fragment();
-
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Vertex}
-   * @struct
-   */
-  ol.render.webgl.polygonreplay.defaultshader.Vertex = function() {
-    ol.webgl.Vertex.call(this, ol.render.webgl.polygonreplay.defaultshader.Vertex.SOURCE);
-  };
-  ol.inherits(ol.render.webgl.polygonreplay.defaultshader.Vertex, ol.webgl.Vertex);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.polygonreplay.defaultshader.Vertex.DEBUG_SOURCE = '\n\nattribute vec2 a_position;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n}\n\n\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.polygonreplay.defaultshader.Vertex.OPTIMIZED_SOURCE = 'attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.render.webgl.polygonreplay.defaultshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
-      ol.render.webgl.polygonreplay.defaultshader.Vertex.DEBUG_SOURCE :
-      ol.render.webgl.polygonreplay.defaultshader.Vertex.OPTIMIZED_SOURCE;
-
-
-  ol.render.webgl.polygonreplay.defaultshader.vertex = new ol.render.webgl.polygonreplay.defaultshader.Vertex();
-
-
-  /**
-   * @constructor
-   * @param {WebGLRenderingContext} gl GL.
-   * @param {WebGLProgram} program Program.
-   * @struct
-   */
-  ol.render.webgl.polygonreplay.defaultshader.Locations = function(gl, program) {
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_color = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_color' : 'e');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_offsetRotateMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'd');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_offsetScaleMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'c');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_opacity = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_opacity' : 'f');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_projectionMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'b');
-
-    /**
-     * @type {number}
-     */
-    this.a_position = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_position' : 'a');
-  };
-
-}
-
-goog.provide('ol.style.Stroke');
-
-goog.require('ol');
-
-
-/**
- * @classdesc
- * Set stroke style for vector features.
- * Note that the defaults given are the Canvas defaults, which will be used if
- * option is not defined. The `get` functions return whatever was entered in
- * the options; they will not return the default.
- *
- * @constructor
- * @param {olx.style.StrokeOptions=} opt_options Options.
- * @api
- */
-ol.style.Stroke = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {ol.Color|ol.ColorLike}
-   */
-  this.color_ = options.color !== undefined ? options.color : null;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.lineCap_ = options.lineCap;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lineDashOffset_ = options.lineDashOffset;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.lineJoin_ = options.lineJoin;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.miterLimit_ = options.miterLimit;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.width_ = options.width;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Clones the style.
- * @return {ol.style.Stroke} The cloned style.
- * @api
- */
-ol.style.Stroke.prototype.clone = function() {
-  var color = this.getColor();
-  return new ol.style.Stroke({
-    color: (color && color.slice) ? color.slice() : color || undefined,
-    lineCap: this.getLineCap(),
-    lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,
-    lineDashOffset: this.getLineDashOffset(),
-    lineJoin: this.getLineJoin(),
-    miterLimit: this.getMiterLimit(),
-    width: this.getWidth()
-  });
-};
-
-
-/**
- * Get the stroke color.
- * @return {ol.Color|ol.ColorLike} Color.
- * @api
- */
-ol.style.Stroke.prototype.getColor = function() {
-  return this.color_;
-};
-
-
-/**
- * Get the line cap type for the stroke.
- * @return {string|undefined} Line cap.
- * @api
- */
-ol.style.Stroke.prototype.getLineCap = function() {
-  return this.lineCap_;
-};
-
-
-/**
- * Get the line dash style for the stroke.
- * @return {Array.<number>} Line dash.
- * @api
- */
-ol.style.Stroke.prototype.getLineDash = function() {
-  return this.lineDash_;
-};
-
-
-/**
- * Get the line dash offset for the stroke.
- * @return {number|undefined} Line dash offset.
- * @api
- */
-ol.style.Stroke.prototype.getLineDashOffset = function() {
-  return this.lineDashOffset_;
-};
-
-
-/**
- * Get the line join type for the stroke.
- * @return {string|undefined} Line join.
- * @api
- */
-ol.style.Stroke.prototype.getLineJoin = function() {
-  return this.lineJoin_;
-};
-
-
-/**
- * Get the miter limit for the stroke.
- * @return {number|undefined} Miter limit.
- * @api
- */
-ol.style.Stroke.prototype.getMiterLimit = function() {
-  return this.miterLimit_;
-};
-
-
-/**
- * Get the stroke width.
- * @return {number|undefined} Width.
- * @api
- */
-ol.style.Stroke.prototype.getWidth = function() {
-  return this.width_;
-};
-
-
-/**
- * Set the color.
- *
- * @param {ol.Color|ol.ColorLike} color Color.
- * @api
- */
-ol.style.Stroke.prototype.setColor = function(color) {
-  this.color_ = color;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the line cap.
- *
- * @param {string|undefined} lineCap Line cap.
- * @api
- */
-ol.style.Stroke.prototype.setLineCap = function(lineCap) {
-  this.lineCap_ = lineCap;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the line dash.
- *
- * Please note that Internet Explorer 10 and lower [do not support][mdn] the
- * `setLineDash` method on the `CanvasRenderingContext2D` and therefore this
- * property will have no visual effect in these browsers.
- *
- * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility
- *
- * @param {Array.<number>} lineDash Line dash.
- * @api
- */
-ol.style.Stroke.prototype.setLineDash = function(lineDash) {
-  this.lineDash_ = lineDash;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the line dash offset.
- *
- * @param {number|undefined} lineDashOffset Line dash offset.
- * @api
- */
-ol.style.Stroke.prototype.setLineDashOffset = function(lineDashOffset) {
-  this.lineDashOffset_ = lineDashOffset;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the line join.
- *
- * @param {string|undefined} lineJoin Line join.
- * @api
- */
-ol.style.Stroke.prototype.setLineJoin = function(lineJoin) {
-  this.lineJoin_ = lineJoin;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the miter limit.
- *
- * @param {number|undefined} miterLimit Miter limit.
- * @api
- */
-ol.style.Stroke.prototype.setMiterLimit = function(miterLimit) {
-  this.miterLimit_ = miterLimit;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the width.
- *
- * @param {number|undefined} width Width.
- * @api
- */
-ol.style.Stroke.prototype.setWidth = function(width) {
-  this.width_ = width;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * @return {string} The checksum.
- */
-ol.style.Stroke.prototype.getChecksum = function() {
-  if (this.checksum_ === undefined) {
-    this.checksum_ = 's';
-    if (this.color_) {
-      if (typeof this.color_ === 'string') {
-        this.checksum_ += this.color_;
-      } else {
-        this.checksum_ += ol.getUid(this.color_).toString();
-      }
-    } else {
-      this.checksum_ += '-';
-    }
-    this.checksum_ += ',' +
-        (this.lineCap_ !== undefined ?
-            this.lineCap_.toString() : '-') + ',' +
-        (this.lineDash_ ?
-            this.lineDash_.toString() : '-') + ',' +
-        (this.lineDashOffset_ !== undefined ?
-            this.lineDashOffset_ : '-') + ',' +
-        (this.lineJoin_ !== undefined ?
-            this.lineJoin_ : '-') + ',' +
-        (this.miterLimit_ !== undefined ?
-            this.miterLimit_.toString() : '-') + ',' +
-        (this.width_ !== undefined ?
-            this.width_.toString() : '-');
-  }
-
-  return this.checksum_;
-};
-
-goog.provide('ol.structs.LinkedList');
-
-/**
- * Creates an empty linked list structure.
- *
- * @constructor
- * @struct
- * @param {boolean=} opt_circular The last item is connected to the first one,
- * and the first item to the last one. Default is true.
- */
-ol.structs.LinkedList = function(opt_circular) {
-
-  /**
-   * @private
-   * @type {ol.LinkedListItem|undefined}
-   */
-  this.first_ = undefined;
-
-  /**
-   * @private
-   * @type {ol.LinkedListItem|undefined}
-   */
-  this.last_ = undefined;
-
-  /**
-   * @private
-   * @type {ol.LinkedListItem|undefined}
-   */
-  this.head_ = undefined;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.circular_ = opt_circular === undefined ? true : opt_circular;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.length_ = 0;
-};
-
-/**
- * Inserts an item into the linked list right after the current one.
- *
- * @param {?} data Item data.
- */
-ol.structs.LinkedList.prototype.insertItem = function(data) {
-
-  /** @type {ol.LinkedListItem} */
-  var item = {
-    prev: undefined,
-    next: undefined,
-    data: data
-  };
-
-  var head = this.head_;
-
-  //Initialize the list.
-  if (!head) {
-    this.first_ = item;
-    this.last_ = item;
-    if (this.circular_) {
-      item.next = item;
-      item.prev = item;
-    }
-  } else {
-    //Link the new item to the adjacent ones.
-    var next = head.next;
-    item.prev = head;
-    item.next = next;
-    head.next = item;
-    if (next) {
-      next.prev = item;
-    }
-
-    if (head === this.last_) {
-      this.last_ = item;
-    }
-  }
-  this.head_ = item;
-  this.length_++;
-};
-
-/**
- * Removes the current item from the list. Sets the cursor to the next item,
- * if possible.
- */
-ol.structs.LinkedList.prototype.removeItem = function() {
-  var head = this.head_;
-  if (head) {
-    var next = head.next;
-    var prev = head.prev;
-    if (next) {
-      next.prev = prev;
-    }
-    if (prev) {
-      prev.next = next;
-    }
-    this.head_ = next || prev;
-
-    if (this.first_ === this.last_) {
-      this.head_ = undefined;
-      this.first_ = undefined;
-      this.last_ = undefined;
-    } else if (this.first_ === head) {
-      this.first_ = this.head_;
-    } else if (this.last_ === head) {
-      this.last_ = prev ? this.head_.prev : this.head_;
-    }
-    this.length_--;
-  }
-};
-
-/**
- * Sets the cursor to the first item, and returns the associated data.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.firstItem = function() {
-  this.head_ = this.first_;
-  if (this.head_) {
-    return this.head_.data;
-  }
-  return undefined;
-};
-
-/**
-* Sets the cursor to the last item, and returns the associated data.
-*
-* @return {?} Item data.
-*/
-ol.structs.LinkedList.prototype.lastItem = function() {
-  this.head_ = this.last_;
-  if (this.head_) {
-    return this.head_.data;
-  }
-  return undefined;
-};
-
-/**
- * Sets the cursor to the next item, and returns the associated data.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.nextItem = function() {
-  if (this.head_ && this.head_.next) {
-    this.head_ = this.head_.next;
-    return this.head_.data;
-  }
-  return undefined;
-};
-
-/**
- * Returns the next item's data without moving the cursor.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.getNextItem = function() {
-  if (this.head_ && this.head_.next) {
-    return this.head_.next.data;
-  }
-  return undefined;
-};
-
-/**
- * Sets the cursor to the previous item, and returns the associated data.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.prevItem = function() {
-  if (this.head_ && this.head_.prev) {
-    this.head_ = this.head_.prev;
-    return this.head_.data;
-  }
-  return undefined;
-};
-
-/**
- * Returns the previous item's data without moving the cursor.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.getPrevItem = function() {
-  if (this.head_ && this.head_.prev) {
-    return this.head_.prev.data;
-  }
-  return undefined;
-};
-
-/**
- * Returns the current item's data.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.getCurrItem = function() {
-  if (this.head_) {
-    return this.head_.data;
-  }
-  return undefined;
-};
-
-/**
- * Sets the first item of the list. This only works for circular lists, and sets
- * the last item accordingly.
- */
-ol.structs.LinkedList.prototype.setFirstItem = function() {
-  if (this.circular_ && this.head_) {
-    this.first_ = this.head_;
-    this.last_ = this.head_.prev;
-  }
-};
-
-/**
- * Concatenates two lists.
- * @param {ol.structs.LinkedList} list List to merge into the current list.
- */
-ol.structs.LinkedList.prototype.concat = function(list) {
-  if (list.head_) {
-    if (this.head_) {
-      var end = this.head_.next;
-      this.head_.next = list.first_;
-      list.first_.prev = this.head_;
-      end.prev = list.last_;
-      list.last_.next = end;
-      this.length_ += list.length_;
-    } else {
-      this.head_ = list.head_;
-      this.first_ = list.first_;
-      this.last_ = list.last_;
-      this.length_ = list.length_;
-    }
-    list.head_ = undefined;
-    list.first_ = undefined;
-    list.last_ = undefined;
-    list.length_ = 0;
-  }
-};
-
-/**
- * Returns the current length of the list.
- *
- * @return {number} Length.
- */
-ol.structs.LinkedList.prototype.getLength = function() {
-  return this.length_;
-};
-
-
-/**
- * @fileoverview
- * @suppress {accessControls, ambiguousFunctionDecl, checkDebuggerStatement, checkRegExp, checkTypes, checkVars, const, constantProperty, deprecated, duplicate, es5Strict, fileoverviewTags, missingProperties, nonStandardJsDocs, strictModuleDepCheck, suspiciousCode, undefinedNames, undefinedVars, unknownDefines, unusedLocalVariables, uselessCode, visibility}
- */
-goog.provide('ol.ext.rbush');
-
-/** @typedef {function(*)} */
-ol.ext.rbush = function() {};
-
-(function() {(function (exports) {
-'use strict';
-
-var index$2 = partialSort;
-function partialSort(arr, k, left, right, compare) {
-    left = left || 0;
-    right = right || (arr.length - 1);
-    compare = compare || defaultCompare;
-    while (right > left) {
-        if (right - left > 600) {
-            var n = right - left + 1;
-            var m = k - left + 1;
-            var z = Math.log(n);
-            var s = 0.5 * Math.exp(2 * z / 3);
-            var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);
-            var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));
-            var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));
-            partialSort(arr, k, newLeft, newRight, compare);
-        }
-        var t = arr[k];
-        var i = left;
-        var j = right;
-        swap(arr, left, k);
-        if (compare(arr[right], t) > 0) swap(arr, left, right);
-        while (i < j) {
-            swap(arr, i, j);
-            i++;
-            j--;
-            while (compare(arr[i], t) < 0) i++;
-            while (compare(arr[j], t) > 0) j--;
-        }
-        if (compare(arr[left], t) === 0) swap(arr, left, j);
-        else {
-            j++;
-            swap(arr, j, right);
-        }
-        if (j <= k) left = j + 1;
-        if (k <= j) right = j - 1;
-    }
-}
-function swap(arr, i, j) {
-    var tmp = arr[i];
-    arr[i] = arr[j];
-    arr[j] = tmp;
-}
-function defaultCompare(a, b) {
-    return a < b ? -1 : a > b ? 1 : 0;
-}
-
-var index = rbush;
-function rbush(maxEntries, format) {
-    if (!(this instanceof rbush)) return new rbush(maxEntries, format);
-    this._maxEntries = Math.max(4, maxEntries || 9);
-    this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));
-    if (format) {
-        this._initFormat(format);
-    }
-    this.clear();
-}
-rbush.prototype = {
-    all: function () {
-        return this._all(this.data, []);
-    },
-    search: function (bbox) {
-        var node = this.data,
-            result = [],
-            toBBox = this.toBBox;
-        if (!intersects(bbox, node)) return result;
-        var nodesToSearch = [],
-            i, len, child, childBBox;
-        while (node) {
-            for (i = 0, len = node.children.length; i < len; i++) {
-                child = node.children[i];
-                childBBox = node.leaf ? toBBox(child) : child;
-                if (intersects(bbox, childBBox)) {
-                    if (node.leaf) result.push(child);
-                    else if (contains(bbox, childBBox)) this._all(child, result);
-                    else nodesToSearch.push(child);
-                }
-            }
-            node = nodesToSearch.pop();
-        }
-        return result;
-    },
-    collides: function (bbox) {
-        var node = this.data,
-            toBBox = this.toBBox;
-        if (!intersects(bbox, node)) return false;
-        var nodesToSearch = [],
-            i, len, child, childBBox;
-        while (node) {
-            for (i = 0, len = node.children.length; i < len; i++) {
-                child = node.children[i];
-                childBBox = node.leaf ? toBBox(child) : child;
-                if (intersects(bbox, childBBox)) {
-                    if (node.leaf || contains(bbox, childBBox)) return true;
-                    nodesToSearch.push(child);
-                }
-            }
-            node = nodesToSearch.pop();
-        }
-        return false;
-    },
-    load: function (data) {
-        if (!(data && data.length)) return this;
-        if (data.length < this._minEntries) {
-            for (var i = 0, len = data.length; i < len; i++) {
-                this.insert(data[i]);
-            }
-            return this;
-        }
-        var node = this._build(data.slice(), 0, data.length - 1, 0);
-        if (!this.data.children.length) {
-            this.data = node;
-        } else if (this.data.height === node.height) {
-            this._splitRoot(this.data, node);
-        } else {
-            if (this.data.height < node.height) {
-                var tmpNode = this.data;
-                this.data = node;
-                node = tmpNode;
-            }
-            this._insert(node, this.data.height - node.height - 1, true);
-        }
-        return this;
-    },
-    insert: function (item) {
-        if (item) this._insert(item, this.data.height - 1);
-        return this;
-    },
-    clear: function () {
-        this.data = createNode([]);
-        return this;
-    },
-    remove: function (item, equalsFn) {
-        if (!item) return this;
-        var node = this.data,
-            bbox = this.toBBox(item),
-            path = [],
-            indexes = [],
-            i, parent, index, goingUp;
-        while (node || path.length) {
-            if (!node) {
-                node = path.pop();
-                parent = path[path.length - 1];
-                i = indexes.pop();
-                goingUp = true;
-            }
-            if (node.leaf) {
-                index = findItem(item, node.children, equalsFn);
-                if (index !== -1) {
-                    node.children.splice(index, 1);
-                    path.push(node);
-                    this._condense(path);
-                    return this;
-                }
-            }
-            if (!goingUp && !node.leaf && contains(node, bbox)) {
-                path.push(node);
-                indexes.push(i);
-                i = 0;
-                parent = node;
-                node = node.children[0];
-            } else if (parent) {
-                i++;
-                node = parent.children[i];
-                goingUp = false;
-            } else node = null;
-        }
-        return this;
-    },
-    toBBox: function (item) { return item; },
-    compareMinX: compareNodeMinX,
-    compareMinY: compareNodeMinY,
-    toJSON: function () { return this.data; },
-    fromJSON: function (data) {
-        this.data = data;
-        return this;
-    },
-    _all: function (node, result) {
-        var nodesToSearch = [];
-        while (node) {
-            if (node.leaf) result.push.apply(result, node.children);
-            else nodesToSearch.push.apply(nodesToSearch, node.children);
-            node = nodesToSearch.pop();
-        }
-        return result;
-    },
-    _build: function (items, left, right, height) {
-        var N = right - left + 1,
-            M = this._maxEntries,
-            node;
-        if (N <= M) {
-            node = createNode(items.slice(left, right + 1));
-            calcBBox(node, this.toBBox);
-            return node;
-        }
-        if (!height) {
-            height = Math.ceil(Math.log(N) / Math.log(M));
-            M = Math.ceil(N / Math.pow(M, height - 1));
-        }
-        node = createNode([]);
-        node.leaf = false;
-        node.height = height;
-        var N2 = Math.ceil(N / M),
-            N1 = N2 * Math.ceil(Math.sqrt(M)),
-            i, j, right2, right3;
-        multiSelect(items, left, right, N1, this.compareMinX);
-        for (i = left; i <= right; i += N1) {
-            right2 = Math.min(i + N1 - 1, right);
-            multiSelect(items, i, right2, N2, this.compareMinY);
-            for (j = i; j <= right2; j += N2) {
-                right3 = Math.min(j + N2 - 1, right2);
-                node.children.push(this._build(items, j, right3, height - 1));
-            }
-        }
-        calcBBox(node, this.toBBox);
-        return node;
-    },
-    _chooseSubtree: function (bbox, node, level, path) {
-        var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;
-        while (true) {
-            path.push(node);
-            if (node.leaf || path.length - 1 === level) break;
-            minArea = minEnlargement = Infinity;
-            for (i = 0, len = node.children.length; i < len; i++) {
-                child = node.children[i];
-                area = bboxArea(child);
-                enlargement = enlargedArea(bbox, child) - area;
-                if (enlargement < minEnlargement) {
-                    minEnlargement = enlargement;
-                    minArea = area < minArea ? area : minArea;
-                    targetNode = child;
-                } else if (enlargement === minEnlargement) {
-                    if (area < minArea) {
-                        minArea = area;
-                        targetNode = child;
-                    }
-                }
-            }
-            node = targetNode || node.children[0];
-        }
-        return node;
-    },
-    _insert: function (item, level, isNode) {
-        var toBBox = this.toBBox,
-            bbox = isNode ? item : toBBox(item),
-            insertPath = [];
-        var node = this._chooseSubtree(bbox, this.data, level, insertPath);
-        node.children.push(item);
-        extend(node, bbox);
-        while (level >= 0) {
-            if (insertPath[level].children.length > this._maxEntries) {
-                this._split(insertPath, level);
-                level--;
-            } else break;
-        }
-        this._adjustParentBBoxes(bbox, insertPath, level);
-    },
-    _split: function (insertPath, level) {
-        var node = insertPath[level],
-            M = node.children.length,
-            m = this._minEntries;
-        this._chooseSplitAxis(node, m, M);
-        var splitIndex = this._chooseSplitIndex(node, m, M);
-        var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));
-        newNode.height = node.height;
-        newNode.leaf = node.leaf;
-        calcBBox(node, this.toBBox);
-        calcBBox(newNode, this.toBBox);
-        if (level) insertPath[level - 1].children.push(newNode);
-        else this._splitRoot(node, newNode);
-    },
-    _splitRoot: function (node, newNode) {
-        this.data = createNode([node, newNode]);
-        this.data.height = node.height + 1;
-        this.data.leaf = false;
-        calcBBox(this.data, this.toBBox);
-    },
-    _chooseSplitIndex: function (node, m, M) {
-        var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;
-        minOverlap = minArea = Infinity;
-        for (i = m; i <= M - m; i++) {
-            bbox1 = distBBox(node, 0, i, this.toBBox);
-            bbox2 = distBBox(node, i, M, this.toBBox);
-            overlap = intersectionArea(bbox1, bbox2);
-            area = bboxArea(bbox1) + bboxArea(bbox2);
-            if (overlap < minOverlap) {
-                minOverlap = overlap;
-                index = i;
-                minArea = area < minArea ? area : minArea;
-            } else if (overlap === minOverlap) {
-                if (area < minArea) {
-                    minArea = area;
-                    index = i;
-                }
-            }
-        }
-        return index;
-    },
-    _chooseSplitAxis: function (node, m, M) {
-        var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,
-            compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,
-            xMargin = this._allDistMargin(node, m, M, compareMinX),
-            yMargin = this._allDistMargin(node, m, M, compareMinY);
-        if (xMargin < yMargin) node.children.sort(compareMinX);
-    },
-    _allDistMargin: function (node, m, M, compare) {
-        node.children.sort(compare);
-        var toBBox = this.toBBox,
-            leftBBox = distBBox(node, 0, m, toBBox),
-            rightBBox = distBBox(node, M - m, M, toBBox),
-            margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),
-            i, child;
-        for (i = m; i < M - m; i++) {
-            child = node.children[i];
-            extend(leftBBox, node.leaf ? toBBox(child) : child);
-            margin += bboxMargin(leftBBox);
-        }
-        for (i = M - m - 1; i >= m; i--) {
-            child = node.children[i];
-            extend(rightBBox, node.leaf ? toBBox(child) : child);
-            margin += bboxMargin(rightBBox);
-        }
-        return margin;
-    },
-    _adjustParentBBoxes: function (bbox, path, level) {
-        for (var i = level; i >= 0; i--) {
-            extend(path[i], bbox);
-        }
-    },
-    _condense: function (path) {
-        for (var i = path.length - 1, siblings; i >= 0; i--) {
-            if (path[i].children.length === 0) {
-                if (i > 0) {
-                    siblings = path[i - 1].children;
-                    siblings.splice(siblings.indexOf(path[i]), 1);
-                } else this.clear();
-            } else calcBBox(path[i], this.toBBox);
-        }
-    },
-    _initFormat: function (format) {
-        var compareArr = ['return a', ' - b', ';'];
-        this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));
-        this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));
-        this.toBBox = new Function('a',
-            'return {minX: a' + format[0] +
-            ', minY: a' + format[1] +
-            ', maxX: a' + format[2] +
-            ', maxY: a' + format[3] + '};');
-    }
-};
-function findItem(item, items, equalsFn) {
-    if (!equalsFn) return items.indexOf(item);
-    for (var i = 0; i < items.length; i++) {
-        if (equalsFn(item, items[i])) return i;
-    }
-    return -1;
-}
-function calcBBox(node, toBBox) {
-    distBBox(node, 0, node.children.length, toBBox, node);
-}
-function distBBox(node, k, p, toBBox, destNode) {
-    if (!destNode) destNode = createNode(null);
-    destNode.minX = Infinity;
-    destNode.minY = Infinity;
-    destNode.maxX = -Infinity;
-    destNode.maxY = -Infinity;
-    for (var i = k, child; i < p; i++) {
-        child = node.children[i];
-        extend(destNode, node.leaf ? toBBox(child) : child);
-    }
-    return destNode;
-}
-function extend(a, b) {
-    a.minX = Math.min(a.minX, b.minX);
-    a.minY = Math.min(a.minY, b.minY);
-    a.maxX = Math.max(a.maxX, b.maxX);
-    a.maxY = Math.max(a.maxY, b.maxY);
-    return a;
-}
-function compareNodeMinX(a, b) { return a.minX - b.minX; }
-function compareNodeMinY(a, b) { return a.minY - b.minY; }
-function bboxArea(a)   { return (a.maxX - a.minX) * (a.maxY - a.minY); }
-function bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }
-function enlargedArea(a, b) {
-    return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *
-           (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));
-}
-function intersectionArea(a, b) {
-    var minX = Math.max(a.minX, b.minX),
-        minY = Math.max(a.minY, b.minY),
-        maxX = Math.min(a.maxX, b.maxX),
-        maxY = Math.min(a.maxY, b.maxY);
-    return Math.max(0, maxX - minX) *
-           Math.max(0, maxY - minY);
-}
-function contains(a, b) {
-    return a.minX <= b.minX &&
-           a.minY <= b.minY &&
-           b.maxX <= a.maxX &&
-           b.maxY <= a.maxY;
-}
-function intersects(a, b) {
-    return b.minX <= a.maxX &&
-           b.minY <= a.maxY &&
-           b.maxX >= a.minX &&
-           b.maxY >= a.minY;
-}
-function createNode(children) {
-    return {
-        children: children,
-        height: 1,
-        leaf: true,
-        minX: Infinity,
-        minY: Infinity,
-        maxX: -Infinity,
-        maxY: -Infinity
-    };
-}
-function multiSelect(arr, left, right, n, compare) {
-    var stack = [left, right],
-        mid;
-    while (stack.length) {
-        right = stack.pop();
-        left = stack.pop();
-        if (right - left <= n) continue;
-        mid = left + Math.ceil((right - left) / n / 2) * n;
-        index$2(arr, mid, left, right, compare);
-        stack.push(left, mid, mid, right);
-    }
-}
-
-exports['default'] = index;
-
-}((this.rbush = this.rbush || {})));}).call(ol.ext);
-ol.ext.rbush = ol.ext.rbush.default;
-
-goog.provide('ol.structs.RBush');
-
-goog.require('ol');
-goog.require('ol.ext.rbush');
-goog.require('ol.extent');
-goog.require('ol.obj');
-
-
-/**
- * Wrapper around the RBush by Vladimir Agafonkin.
- *
- * @constructor
- * @param {number=} opt_maxEntries Max entries.
- * @see https://github.com/mourner/rbush
- * @struct
- * @template T
- */
-ol.structs.RBush = function(opt_maxEntries) {
-
-  /**
-   * @private
-   */
-  this.rbush_ = ol.ext.rbush(opt_maxEntries);
-
-  /**
-   * A mapping between the objects added to this rbush wrapper
-   * and the objects that are actually added to the internal rbush.
-   * @private
-   * @type {Object.<number, ol.RBushEntry>}
-   */
-  this.items_ = {};
-
-};
-
-
-/**
- * Insert a value into the RBush.
- * @param {ol.Extent} extent Extent.
- * @param {T} value Value.
- */
-ol.structs.RBush.prototype.insert = function(extent, value) {
-  /** @type {ol.RBushEntry} */
-  var item = {
-    minX: extent[0],
-    minY: extent[1],
-    maxX: extent[2],
-    maxY: extent[3],
-    value: value
-  };
-
-  this.rbush_.insert(item);
-  this.items_[ol.getUid(value)] = item;
-};
-
-
-/**
- * Bulk-insert values into the RBush.
- * @param {Array.<ol.Extent>} extents Extents.
- * @param {Array.<T>} values Values.
- */
-ol.structs.RBush.prototype.load = function(extents, values) {
-  var items = new Array(values.length);
-  for (var i = 0, l = values.length; i < l; i++) {
-    var extent = extents[i];
-    var value = values[i];
-
-    /** @type {ol.RBushEntry} */
-    var item = {
-      minX: extent[0],
-      minY: extent[1],
-      maxX: extent[2],
-      maxY: extent[3],
-      value: value
-    };
-    items[i] = item;
-    this.items_[ol.getUid(value)] = item;
-  }
-  this.rbush_.load(items);
-};
-
-
-/**
- * Remove a value from the RBush.
- * @param {T} value Value.
- * @return {boolean} Removed.
- */
-ol.structs.RBush.prototype.remove = function(value) {
-  var uid = ol.getUid(value);
-
-  // get the object in which the value was wrapped when adding to the
-  // internal rbush. then use that object to do the removal.
-  var item = this.items_[uid];
-  delete this.items_[uid];
-  return this.rbush_.remove(item) !== null;
-};
-
-
-/**
- * Update the extent of a value in the RBush.
- * @param {ol.Extent} extent Extent.
- * @param {T} value Value.
- */
-ol.structs.RBush.prototype.update = function(extent, value) {
-  var item = this.items_[ol.getUid(value)];
-  var bbox = [item.minX, item.minY, item.maxX, item.maxY];
-  if (!ol.extent.equals(bbox, extent)) {
-    this.remove(value);
-    this.insert(extent, value);
-  }
-};
-
-
-/**
- * Return all values in the RBush.
- * @return {Array.<T>} All.
- */
-ol.structs.RBush.prototype.getAll = function() {
-  var items = this.rbush_.all();
-  return items.map(function(item) {
-    return item.value;
-  });
-};
-
-
-/**
- * Return all values in the given extent.
- * @param {ol.Extent} extent Extent.
- * @return {Array.<T>} All in extent.
- */
-ol.structs.RBush.prototype.getInExtent = function(extent) {
-  /** @type {ol.RBushEntry} */
-  var bbox = {
-    minX: extent[0],
-    minY: extent[1],
-    maxX: extent[2],
-    maxY: extent[3]
-  };
-  var items = this.rbush_.search(bbox);
-  return items.map(function(item) {
-    return item.value;
-  });
-};
-
-
-/**
- * Calls a callback function with each value in the tree.
- * If the callback returns a truthy value, this value is returned without
- * checking the rest of the tree.
- * @param {function(this: S, T): *} callback Callback.
- * @param {S=} opt_this The object to use as `this` in `callback`.
- * @return {*} Callback return value.
- * @template S
- */
-ol.structs.RBush.prototype.forEach = function(callback, opt_this) {
-  return this.forEach_(this.getAll(), callback, opt_this);
-};
-
-
-/**
- * Calls a callback function with each value in the provided extent.
- * @param {ol.Extent} extent Extent.
- * @param {function(this: S, T): *} callback Callback.
- * @param {S=} opt_this The object to use as `this` in `callback`.
- * @return {*} Callback return value.
- * @template S
- */
-ol.structs.RBush.prototype.forEachInExtent = function(extent, callback, opt_this) {
-  return this.forEach_(this.getInExtent(extent), callback, opt_this);
-};
-
-
-/**
- * @param {Array.<T>} values Values.
- * @param {function(this: S, T): *} callback Callback.
- * @param {S=} opt_this The object to use as `this` in `callback`.
- * @private
- * @return {*} Callback return value.
- * @template S
- */
-ol.structs.RBush.prototype.forEach_ = function(values, callback, opt_this) {
-  var result;
-  for (var i = 0, l = values.length; i < l; i++) {
-    result = callback.call(opt_this, values[i]);
-    if (result) {
-      return result;
-    }
-  }
-  return result;
-};
-
-
-/**
- * @return {boolean} Is empty.
- */
-ol.structs.RBush.prototype.isEmpty = function() {
-  return ol.obj.isEmpty(this.items_);
-};
-
-
-/**
- * Remove all values from the RBush.
- */
-ol.structs.RBush.prototype.clear = function() {
-  this.rbush_.clear();
-  this.items_ = {};
-};
-
-
-/**
- * @param {ol.Extent=} opt_extent Extent.
- * @return {!ol.Extent} Extent.
- */
-ol.structs.RBush.prototype.getExtent = function(opt_extent) {
-  // FIXME add getExtent() to rbush
-  var data = this.rbush_.data;
-  return ol.extent.createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, opt_extent);
-};
-
-
-/**
- * @param {ol.structs.RBush} rbush R-Tree.
- */
-ol.structs.RBush.prototype.concat = function(rbush) {
-  this.rbush_.load(rbush.rbush_.all());
-  for (var i in rbush.items_) {
-    this.items_[i | 0] = rbush.items_[i | 0];
-  }
-};
-
-goog.provide('ol.render.webgl.PolygonReplay');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.color');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.geom.flat.contains');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.render.webgl.polygonreplay.defaultshader');
-goog.require('ol.render.webgl.LineStringReplay');
-goog.require('ol.render.webgl.Replay');
-goog.require('ol.render.webgl');
-goog.require('ol.style.Stroke');
-goog.require('ol.structs.LinkedList');
-goog.require('ol.structs.RBush');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.render.webgl.Replay}
-   * @param {number} tolerance Tolerance.
-   * @param {ol.Extent} maxExtent Max extent.
-   * @struct
-   */
-  ol.render.webgl.PolygonReplay = function(tolerance, maxExtent) {
-    ol.render.webgl.Replay.call(this, tolerance, maxExtent);
-
-    this.lineStringReplay = new ol.render.webgl.LineStringReplay(
-        tolerance, maxExtent);
-
-    /**
-     * @private
-     * @type {ol.render.webgl.polygonreplay.defaultshader.Locations}
-     */
-    this.defaultLocations_ = null;
-
-    /**
-     * @private
-     * @type {Array.<Array.<number>>}
-     */
-    this.styles_ = [];
-
-    /**
-     * @private
-     * @type {Array.<number>}
-     */
-    this.styleIndices_ = [];
-
-    /**
-     * @private
-     * @type {{fillColor: (Array.<number>|null),
-     *         changed: boolean}|null}
-     */
-    this.state_ = {
-      fillColor: null,
-      changed: false
-    };
-
-  };
-  ol.inherits(ol.render.webgl.PolygonReplay, ol.render.webgl.Replay);
-
-
-  /**
-   * Draw one polygon.
-   * @param {Array.<number>} flatCoordinates Flat coordinates.
-   * @param {Array.<Array.<number>>} holeFlatCoordinates Hole flat coordinates.
-   * @param {number} stride Stride.
-   * @private
-   */
-  ol.render.webgl.PolygonReplay.prototype.drawCoordinates_ = function(
-      flatCoordinates, holeFlatCoordinates, stride) {
-    // Triangulate the polygon
-    var outerRing = new ol.structs.LinkedList();
-    var rtree = new ol.structs.RBush();
-    // Initialize the outer ring
-    var maxX = this.processFlatCoordinates_(flatCoordinates, stride, outerRing, rtree, true);
-
-    // Eliminate holes, if there are any
-    if (holeFlatCoordinates.length) {
-      var i, ii;
-      var holeLists = [];
-      for (i = 0, ii = holeFlatCoordinates.length; i < ii; ++i) {
-        var holeList = {
-          list: new ol.structs.LinkedList(),
-          maxX: undefined,
-          rtree: new ol.structs.RBush()
-        };
-        holeLists.push(holeList);
-        holeList.maxX = this.processFlatCoordinates_(holeFlatCoordinates[i],
-            stride, holeList.list, holeList.rtree, false);
-      }
-      holeLists.sort(function(a, b) {
-        return b.maxX[0] === a.maxX[0] ? a.maxX[1] - b.maxX[1] : b.maxX[0] - a.maxX[0];
-      });
-      for (i = 0; i < holeLists.length; ++i) {
-        var currList = holeLists[i].list;
-        var start = currList.firstItem();
-        var currItem = start;
-        var intersection;
-        do {
-          if (this.getIntersections_(currItem, rtree).length) {
-            intersection = true;
-            break;
-          }
-          currItem = currList.nextItem();
-        } while (start !== currItem);
-        if (!intersection) {
-          this.classifyPoints_(currList, holeLists[i].rtree, true);
-          if (this.bridgeHole_(currList, holeLists[i].maxX[0], outerRing, maxX[0], rtree)) {
-            rtree.concat(holeLists[i].rtree);
-            this.classifyPoints_(outerRing, rtree, false);
-          }
-        }
-      }
-    } else {
-      this.classifyPoints_(outerRing, rtree, false);
-    }
-    this.triangulate_(outerRing, rtree);
-  };
-
-
-  /**
-   * Inserts flat coordinates in a linked list and adds them to the vertex buffer.
-   * @private
-   * @param {Array.<number>} flatCoordinates Flat coordinates.
-   * @param {number} stride Stride.
-   * @param {ol.structs.LinkedList} list Linked list.
-   * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-   * @param {boolean} clockwise Coordinate order should be clockwise.
-   * @return {Array.<number>} X and Y coords of maximum X value.
-   */
-  ol.render.webgl.PolygonReplay.prototype.processFlatCoordinates_ = function(
-      flatCoordinates, stride, list, rtree, clockwise) {
-    var isClockwise = ol.geom.flat.orient.linearRingIsClockwise(flatCoordinates,
-        0, flatCoordinates.length, stride);
-    var i, ii, maxXX, maxXY;
-    var n = this.vertices.length / 2;
-    /** @type {ol.WebglPolygonVertex} */
-    var start;
-    /** @type {ol.WebglPolygonVertex} */
-    var p0;
-    /** @type {ol.WebglPolygonVertex} */
-    var p1;
-    var extents = [];
-    var segments = [];
-    if (clockwise === isClockwise) {
-      start = this.createPoint_(flatCoordinates[0], flatCoordinates[1], n++);
-      p0 = start;
-      maxXX = flatCoordinates[0];
-      maxXY = flatCoordinates[1];
-      for (i = stride, ii = flatCoordinates.length; i < ii; i += stride) {
-        p1 = this.createPoint_(flatCoordinates[i], flatCoordinates[i + 1], n++);
-        segments.push(this.insertItem_(p0, p1, list));
-        extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),
-          Math.max(p0.y, p1.y)]);
-        if (flatCoordinates[i] > maxXX) {
-          maxXX = flatCoordinates[i];
-          maxXY = flatCoordinates[i + 1];
-        }
-        p0 = p1;
-      }
-      segments.push(this.insertItem_(p1, start, list));
-      extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),
-        Math.max(p0.y, p1.y)]);
-    } else {
-      var end = flatCoordinates.length - stride;
-      start = this.createPoint_(flatCoordinates[end], flatCoordinates[end + 1], n++);
-      p0 = start;
-      maxXX = flatCoordinates[end];
-      maxXY = flatCoordinates[end + 1];
-      for (i = end - stride, ii = 0; i >= ii; i -= stride) {
-        p1 = this.createPoint_(flatCoordinates[i], flatCoordinates[i + 1], n++);
-        segments.push(this.insertItem_(p0, p1, list));
-        extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),
-          Math.max(p0.y, p1.y)]);
-        if (flatCoordinates[i] > maxXX) {
-          maxXX = flatCoordinates[i];
-          maxXY = flatCoordinates[i + 1];
-        }
-        p0 = p1;
-      }
-      segments.push(this.insertItem_(p1, start, list));
-      extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),
-        Math.max(p0.y, p1.y)]);
-    }
-    rtree.load(extents, segments);
-
-    return [maxXX, maxXY];
-  };
-
-
-  /**
-   * Classifies the points of a polygon list as convex, reflex. Removes collinear vertices.
-   * @private
-   * @param {ol.structs.LinkedList} list Polygon ring.
-   * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-   * @param {boolean} ccw The orientation of the polygon is counter-clockwise.
-   * @return {boolean} There were reclassified points.
-   */
-  ol.render.webgl.PolygonReplay.prototype.classifyPoints_ = function(list, rtree, ccw) {
-    var start = list.firstItem();
-    var s0 = start;
-    var s1 = list.nextItem();
-    var pointsReclassified = false;
-    do {
-      var reflex = ccw ? ol.render.webgl.triangleIsCounterClockwise(s1.p1.x,
-          s1.p1.y, s0.p1.x, s0.p1.y, s0.p0.x, s0.p0.y) :
-          ol.render.webgl.triangleIsCounterClockwise(s0.p0.x, s0.p0.y, s0.p1.x,
-          s0.p1.y, s1.p1.x, s1.p1.y);
-      if (reflex === undefined) {
-        this.removeItem_(s0, s1, list, rtree);
-        pointsReclassified = true;
-        if (s1 === start) {
-          start = list.getNextItem();
-        }
-        s1 = s0;
-        list.prevItem();
-      } else if (s0.p1.reflex !== reflex) {
-        s0.p1.reflex = reflex;
-        pointsReclassified = true;
-      }
-      s0 = s1;
-      s1 = list.nextItem();
-    } while (s0 !== start);
-    return pointsReclassified;
-  };
-
-
-  /**
-   * @private
-   * @param {ol.structs.LinkedList} hole Linked list of the hole.
-   * @param {number} holeMaxX Maximum X value of the hole.
-   * @param {ol.structs.LinkedList} list Linked list of the polygon.
-   * @param {number} listMaxX Maximum X value of the polygon.
-   * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-   * @return {boolean} Bridging was successful.
-   */
-  ol.render.webgl.PolygonReplay.prototype.bridgeHole_ = function(hole, holeMaxX,
-      list, listMaxX, rtree) {
-    var seg = hole.firstItem();
-    while (seg.p1.x !== holeMaxX) {
-      seg = hole.nextItem();
-    }
-
-    var p1 = seg.p1;
-    /** @type {ol.WebglPolygonVertex} */
-    var p2 = {x: listMaxX, y: p1.y, i: -1};
-    var minDist = Infinity;
-    var i, ii, bestPoint;
-    /** @type {ol.WebglPolygonVertex} */
-    var p5;
-
-    var intersectingSegments = this.getIntersections_({p0: p1, p1: p2}, rtree, true);
-    for (i = 0, ii = intersectingSegments.length; i < ii; ++i) {
-      var currSeg = intersectingSegments[i];
-      var intersection = this.calculateIntersection_(p1, p2, currSeg.p0,
-          currSeg.p1, true);
-      var dist = Math.abs(p1.x - intersection[0]);
-      if (dist < minDist && ol.render.webgl.triangleIsCounterClockwise(p1.x, p1.y,
-          currSeg.p0.x, currSeg.p0.y, currSeg.p1.x, currSeg.p1.y) !== undefined) {
-        minDist = dist;
-        p5 = {x: intersection[0], y: intersection[1], i: -1};
-        seg = currSeg;
-      }
-    }
-    if (minDist === Infinity) {
-      return false;
-    }
-    bestPoint = seg.p1;
-
-    if (minDist > 0) {
-      var pointsInTriangle = this.getPointsInTriangle_(p1, p5, seg.p1, rtree);
-      if (pointsInTriangle.length) {
-        var theta = Infinity;
-        for (i = 0, ii = pointsInTriangle.length; i < ii; ++i) {
-          var currPoint = pointsInTriangle[i];
-          var currTheta = Math.atan2(p1.y - currPoint.y, p2.x - currPoint.x);
-          if (currTheta < theta || (currTheta === theta && currPoint.x < bestPoint.x)) {
-            theta = currTheta;
-            bestPoint = currPoint;
-          }
-        }
-      }
-    }
-
-    seg = list.firstItem();
-    while (seg.p1.x !== bestPoint.x || seg.p1.y !== bestPoint.y) {
-      seg = list.nextItem();
-    }
-
-    //We clone the bridge points as they can have different convexity.
-    var p0Bridge = {x: p1.x, y: p1.y, i: p1.i, reflex: undefined};
-    var p1Bridge = {x: seg.p1.x, y: seg.p1.y, i: seg.p1.i, reflex: undefined};
-
-    hole.getNextItem().p0 = p0Bridge;
-    this.insertItem_(p1, seg.p1, hole, rtree);
-    this.insertItem_(p1Bridge, p0Bridge, hole, rtree);
-    seg.p1 = p1Bridge;
-    hole.setFirstItem();
-    list.concat(hole);
-
-    return true;
-  };
-
-
-  /**
-   * @private
-   * @param {ol.structs.LinkedList} list Linked list of the polygon.
-   * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-   */
-  ol.render.webgl.PolygonReplay.prototype.triangulate_ = function(list, rtree) {
-    var ccw = false;
-    var simple = this.isSimple_(list, rtree);
-
-    // Start clipping ears
-    while (list.getLength() > 3) {
-      if (simple) {
-        if (!this.clipEars_(list, rtree, simple, ccw)) {
-          if (!this.classifyPoints_(list, rtree, ccw)) {
-            // Due to the behavior of OL's PIP algorithm, the ear clipping cannot
-            // introduce touching segments. However, the original data may have some.
-            if (!this.resolveLocalSelfIntersections_(list, rtree, true)) {
-              break;
-            }
-          }
-        }
-      } else {
-        if (!this.clipEars_(list, rtree, simple, ccw)) {
-          // We ran out of ears, try to reclassify.
-          if (!this.classifyPoints_(list, rtree, ccw)) {
-            // We have a bad polygon, try to resolve local self-intersections.
-            if (!this.resolveLocalSelfIntersections_(list, rtree)) {
-              simple = this.isSimple_(list, rtree);
-              if (!simple) {
-                // We have a really bad polygon, try more time consuming methods.
-                this.splitPolygon_(list, rtree);
-                break;
-              } else {
-                ccw = !this.isClockwise_(list);
-                this.classifyPoints_(list, rtree, ccw);
-              }
-            }
-          }
-        }
-      }
-    }
-    if (list.getLength() === 3) {
-      var numIndices = this.indices.length;
-      this.indices[numIndices++] = list.getPrevItem().p0.i;
-      this.indices[numIndices++] = list.getCurrItem().p0.i;
-      this.indices[numIndices++] = list.getNextItem().p0.i;
-    }
-  };
-
-
-  /**
-   * @private
-   * @param {ol.structs.LinkedList} list Linked list of the polygon.
-   * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-   * @param {boolean} simple The polygon is simple.
-   * @param {boolean} ccw Orientation of the polygon is counter-clockwise.
-   * @return {boolean} There were processed ears.
-   */
-  ol.render.webgl.PolygonReplay.prototype.clipEars_ = function(list, rtree, simple, ccw) {
-    var numIndices = this.indices.length;
-    var start = list.firstItem();
-    var s0 = list.getPrevItem();
-    var s1 = start;
-    var s2 = list.nextItem();
-    var s3 = list.getNextItem();
-    var p0, p1, p2;
-    var processedEars = false;
-    do {
-      p0 = s1.p0;
-      p1 = s1.p1;
-      p2 = s2.p1;
-      if (p1.reflex === false) {
-        // We might have a valid ear
-        var diagonalIsInside = ccw ? this.diagonalIsInside_(s3.p1, p2, p1, p0,
-            s0.p0) : this.diagonalIsInside_(s0.p0, p0, p1, p2, s3.p1);
-        if ((simple || this.getIntersections_({p0: p0, p1: p2}, rtree).length === 0) &&
-            diagonalIsInside && this.getPointsInTriangle_(p0, p1, p2, rtree, true).length === 0) {
-          //The diagonal is completely inside the polygon
-          if (simple || p0.reflex === false || p2.reflex === false ||
-              ol.geom.flat.orient.linearRingIsClockwise([s0.p0.x, s0.p0.y, p0.x,
-                p0.y, p1.x, p1.y, p2.x, p2.y, s3.p1.x, s3.p1.y], 0, 10, 2) === !ccw) {
-            //The diagonal is persumably valid, we have an ear
-            this.indices[numIndices++] = p0.i;
-            this.indices[numIndices++] = p1.i;
-            this.indices[numIndices++] = p2.i;
-            this.removeItem_(s1, s2, list, rtree);
-            if (s2 === start) {
-              start = s3;
-            }
-            processedEars = true;
-          }
-        }
-      }
-      // Else we have a reflex point.
-      s0 = list.getPrevItem();
-      s1 = list.getCurrItem();
-      s2 = list.nextItem();
-      s3 = list.getNextItem();
-    } while (s1 !== start && list.getLength() > 3);
-
-    return processedEars;
-  };
-
-
-  /**
-   * @private
-   * @param {ol.structs.LinkedList} list Linked list of the polygon.
-   * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-   * @param {boolean=} opt_touch Resolve touching segments.
-   * @return {boolean} There were resolved intersections.
-  */
-  ol.render.webgl.PolygonReplay.prototype.resolveLocalSelfIntersections_ = function(
-      list, rtree, opt_touch) {
-    var start = list.firstItem();
-    list.nextItem();
-    var s0 = start;
-    var s1 = list.nextItem();
-    var resolvedIntersections = false;
-
-    do {
-      var intersection = this.calculateIntersection_(s0.p0, s0.p1, s1.p0, s1.p1,
-          opt_touch);
-      if (intersection) {
-        var breakCond = false;
-        var numVertices = this.vertices.length;
-        var numIndices = this.indices.length;
-        var n = numVertices / 2;
-        var seg = list.prevItem();
-        list.removeItem();
-        rtree.remove(seg);
-        breakCond = (seg === start);
-        var p;
-        if (opt_touch) {
-          if (intersection[0] === s0.p0.x && intersection[1] === s0.p0.y) {
-            list.prevItem();
-            p = s0.p0;
-            s1.p0 = p;
-            rtree.remove(s0);
-            breakCond = breakCond || (s0 === start);
-          } else {
-            p = s1.p1;
-            s0.p1 = p;
-            rtree.remove(s1);
-            breakCond = breakCond || (s1 === start);
-          }
-          list.removeItem();
-        } else {
-          p = this.createPoint_(intersection[0], intersection[1], n);
-          s0.p1 = p;
-          s1.p0 = p;
-          rtree.update([Math.min(s0.p0.x, s0.p1.x), Math.min(s0.p0.y, s0.p1.y),
-            Math.max(s0.p0.x, s0.p1.x), Math.max(s0.p0.y, s0.p1.y)], s0);
-          rtree.update([Math.min(s1.p0.x, s1.p1.x), Math.min(s1.p0.y, s1.p1.y),
-            Math.max(s1.p0.x, s1.p1.x), Math.max(s1.p0.y, s1.p1.y)], s1);
-        }
-
-        this.indices[numIndices++] = seg.p0.i;
-        this.indices[numIndices++] = seg.p1.i;
-        this.indices[numIndices++] = p.i;
-
-        resolvedIntersections = true;
-        if (breakCond) {
-          break;
-        }
-      }
-
-      s0 = list.getPrevItem();
-      s1 = list.nextItem();
-    } while (s0 !== start);
-    return resolvedIntersections;
-  };
-
-
-  /**
-   * @private
-   * @param {ol.structs.LinkedList} list Linked list of the polygon.
-   * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-   * @return {boolean} The polygon is simple.
-   */
-  ol.render.webgl.PolygonReplay.prototype.isSimple_ = function(list, rtree) {
-    var start = list.firstItem();
-    var seg = start;
-    do {
-      if (this.getIntersections_(seg, rtree).length) {
-        return false;
-      }
-      seg = list.nextItem();
-    } while (seg !== start);
-    return true;
-  };
-
-
-  /**
-   * @private
-   * @param {ol.structs.LinkedList} list Linked list of the polygon.
-   * @return {boolean} Orientation is clockwise.
-   */
-  ol.render.webgl.PolygonReplay.prototype.isClockwise_ = function(list) {
-    var length = list.getLength() * 2;
-    var flatCoordinates = new Array(length);
-    var start = list.firstItem();
-    var seg = start;
-    var i = 0;
-    do {
-      flatCoordinates[i++] = seg.p0.x;
-      flatCoordinates[i++] = seg.p0.y;
-      seg = list.nextItem();
-    } while (seg !== start);
-    return ol.geom.flat.orient.linearRingIsClockwise(flatCoordinates, 0, length, 2);
-  };
-
-
-  /**
-   * @private
-   * @param {ol.structs.LinkedList} list Linked list of the polygon.
-   * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-   */
-  ol.render.webgl.PolygonReplay.prototype.splitPolygon_ = function(list, rtree) {
-    var start = list.firstItem();
-    var s0 = start;
-    do {
-      var intersections = this.getIntersections_(s0, rtree);
-      if (intersections.length) {
-        var s1 = intersections[0];
-        var n = this.vertices.length / 2;
-        var intersection = this.calculateIntersection_(s0.p0,
-            s0.p1, s1.p0, s1.p1);
-        var p = this.createPoint_(intersection[0], intersection[1], n);
-        var newPolygon = new ol.structs.LinkedList();
-        var newRtree = new ol.structs.RBush();
-        this.insertItem_(p, s0.p1, newPolygon, newRtree);
-        s0.p1 = p;
-        rtree.update([Math.min(s0.p0.x, p.x), Math.min(s0.p0.y, p.y),
-          Math.max(s0.p0.x, p.x), Math.max(s0.p0.y, p.y)], s0);
-        var currItem = list.nextItem();
-        while (currItem !== s1) {
-          this.insertItem_(currItem.p0, currItem.p1, newPolygon, newRtree);
-          rtree.remove(currItem);
-          list.removeItem();
-          currItem = list.getCurrItem();
-        }
-        this.insertItem_(s1.p0, p, newPolygon, newRtree);
-        s1.p0 = p;
-        rtree.update([Math.min(s1.p1.x, p.x), Math.min(s1.p1.y, p.y),
-          Math.max(s1.p1.x, p.x), Math.max(s1.p1.y, p.y)], s1);
-        this.classifyPoints_(list, rtree, false);
-        this.triangulate_(list, rtree);
-        this.classifyPoints_(newPolygon, newRtree, false);
-        this.triangulate_(newPolygon, newRtree);
-        break;
-      }
-      s0 = list.nextItem();
-    } while (s0 !== start);
-  };
-
-
-  /**
-   * @private
-   * @param {number} x X coordinate.
-   * @param {number} y Y coordinate.
-   * @param {number} i Index.
-   * @return {ol.WebglPolygonVertex} List item.
-   */
-  ol.render.webgl.PolygonReplay.prototype.createPoint_ = function(x, y, i) {
-    var numVertices = this.vertices.length;
-    this.vertices[numVertices++] = x;
-    this.vertices[numVertices++] = y;
-    /** @type {ol.WebglPolygonVertex} */
-    var p = {
-      x: x,
-      y: y,
-      i: i,
-      reflex: undefined
-    };
-    return p;
-  };
-
-
-  /**
-   * @private
-   * @param {ol.WebglPolygonVertex} p0 First point of segment.
-   * @param {ol.WebglPolygonVertex} p1 Second point of segment.
-   * @param {ol.structs.LinkedList} list Polygon ring.
-   * @param {ol.structs.RBush=} opt_rtree Insert the segment into the R-Tree.
-   * @return {ol.WebglPolygonSegment} segment.
-   */
-  ol.render.webgl.PolygonReplay.prototype.insertItem_ = function(p0, p1, list, opt_rtree) {
-    var seg = {
-      p0: p0,
-      p1: p1
-    };
-    list.insertItem(seg);
-    if (opt_rtree) {
-      opt_rtree.insert([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y),
-        Math.max(p0.x, p1.x), Math.max(p0.y, p1.y)], seg);
-    }
-    return seg;
-  };
-
-
-   /**
-    * @private
-    * @param {ol.WebglPolygonSegment} s0 Segment before the remove candidate.
-    * @param {ol.WebglPolygonSegment} s1 Remove candidate segment.
-    * @param {ol.structs.LinkedList} list Polygon ring.
-    * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-    */
-  ol.render.webgl.PolygonReplay.prototype.removeItem_ = function(s0, s1, list, rtree) {
-    if (list.getCurrItem() === s1) {
-      list.removeItem();
-      s0.p1 = s1.p1;
-      rtree.remove(s1);
-      rtree.update([Math.min(s0.p0.x, s0.p1.x), Math.min(s0.p0.y, s0.p1.y),
-        Math.max(s0.p0.x, s0.p1.x), Math.max(s0.p0.y, s0.p1.y)], s0);
-    }
-  };
-
-
-  /**
-   * @private
-   * @param {ol.WebglPolygonVertex} p0 First point.
-   * @param {ol.WebglPolygonVertex} p1 Second point.
-   * @param {ol.WebglPolygonVertex} p2 Third point.
-   * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-   * @param {boolean=} opt_reflex Only include reflex points.
-   * @return {Array.<ol.WebglPolygonVertex>} Points in the triangle.
-   */
-  ol.render.webgl.PolygonReplay.prototype.getPointsInTriangle_ = function(p0, p1,
-      p2, rtree, opt_reflex) {
-    var i, ii, j, p;
-    var result = [];
-    var segmentsInExtent = rtree.getInExtent([Math.min(p0.x, p1.x, p2.x),
-      Math.min(p0.y, p1.y, p2.y), Math.max(p0.x, p1.x, p2.x), Math.max(p0.y,
-        p1.y, p2.y)]);
-    for (i = 0, ii = segmentsInExtent.length; i < ii; ++i) {
-      for (j in segmentsInExtent[i]) {
-        p = segmentsInExtent[i][j];
-        if (typeof p === 'object' && (!opt_reflex || p.reflex)) {
-          if ((p.x !== p0.x || p.y !== p0.y) && (p.x !== p1.x || p.y !== p1.y) &&
-              (p.x !== p2.x || p.y !== p2.y) && result.indexOf(p) === -1 &&
-              ol.geom.flat.contains.linearRingContainsXY([p0.x, p0.y, p1.x, p1.y,
-                p2.x, p2.y], 0, 6, 2, p.x, p.y)) {
-            result.push(p);
-          }
-        }
-      }
-    }
-    return result;
-  };
-
-
-  /**
-   * @private
-   * @param {ol.WebglPolygonSegment} segment Segment.
-   * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-   * @param {boolean=} opt_touch Touching segments should be considered an intersection.
-   * @return {Array.<ol.WebglPolygonSegment>} Intersecting segments.
-   */
-  ol.render.webgl.PolygonReplay.prototype.getIntersections_ = function(segment, rtree, opt_touch) {
-    var p0 = segment.p0;
-    var p1 = segment.p1;
-    var segmentsInExtent = rtree.getInExtent([Math.min(p0.x, p1.x),
-      Math.min(p0.y, p1.y), Math.max(p0.x, p1.x), Math.max(p0.y, p1.y)]);
-    var result = [];
-    var i, ii;
-    for (i = 0, ii = segmentsInExtent.length; i < ii; ++i) {
-      var currSeg = segmentsInExtent[i];
-      if (segment !== currSeg && (opt_touch || currSeg.p0 !== p1 || currSeg.p1 !== p0) &&
-          this.calculateIntersection_(p0, p1, currSeg.p0, currSeg.p1, opt_touch)) {
-        result.push(currSeg);
-      }
-    }
-    return result;
-  };
-
-
-  /**
-   * Line intersection algorithm by Paul Bourke.
-   * @see http://paulbourke.net/geometry/pointlineplane/
-   *
-   * @private
-   * @param {ol.WebglPolygonVertex} p0 First point.
-   * @param {ol.WebglPolygonVertex} p1 Second point.
-   * @param {ol.WebglPolygonVertex} p2 Third point.
-   * @param {ol.WebglPolygonVertex} p3 Fourth point.
-   * @param {boolean=} opt_touch Touching segments should be considered an intersection.
-   * @return {Array.<number>|undefined} Intersection coordinates.
-   */
-  ol.render.webgl.PolygonReplay.prototype.calculateIntersection_ = function(p0,
-      p1, p2, p3, opt_touch) {
-    var denom = (p3.y - p2.y) * (p1.x - p0.x) - (p3.x - p2.x) * (p1.y - p0.y);
-    if (denom !== 0) {
-      var ua = ((p3.x - p2.x) * (p0.y - p2.y) - (p3.y - p2.y) * (p0.x - p2.x)) / denom;
-      var ub = ((p1.x - p0.x) * (p0.y - p2.y) - (p1.y - p0.y) * (p0.x - p2.x)) / denom;
-      if ((!opt_touch && ua > ol.render.webgl.EPSILON && ua < 1 - ol.render.webgl.EPSILON &&
-          ub > ol.render.webgl.EPSILON && ub < 1 - ol.render.webgl.EPSILON) || (opt_touch &&
-          ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1)) {
-        return [p0.x + ua * (p1.x - p0.x), p0.y + ua * (p1.y - p0.y)];
-      }
-    }
-    return undefined;
-  };
-
-
-  /**
-   * @private
-   * @param {ol.WebglPolygonVertex} p0 Point before the start of the diagonal.
-   * @param {ol.WebglPolygonVertex} p1 Start point of the diagonal.
-   * @param {ol.WebglPolygonVertex} p2 Ear candidate.
-   * @param {ol.WebglPolygonVertex} p3 End point of the diagonal.
-   * @param {ol.WebglPolygonVertex} p4 Point after the end of the diagonal.
-   * @return {boolean} Diagonal is inside the polygon.
-   */
-  ol.render.webgl.PolygonReplay.prototype.diagonalIsInside_ = function(p0, p1, p2, p3, p4) {
-    if (p1.reflex === undefined || p3.reflex === undefined) {
-      return false;
-    }
-    var p1IsLeftOf = (p2.x - p3.x) * (p1.y - p3.y) > (p2.y - p3.y) * (p1.x - p3.x);
-    var p1IsRightOf = (p4.x - p3.x) * (p1.y - p3.y) < (p4.y - p3.y) * (p1.x - p3.x);
-    var p3IsLeftOf = (p0.x - p1.x) * (p3.y - p1.y) > (p0.y - p1.y) * (p3.x - p1.x);
-    var p3IsRightOf = (p2.x - p1.x) * (p3.y - p1.y) < (p2.y - p1.y) * (p3.x - p1.x);
-    var p1InCone = p3.reflex ? p1IsRightOf || p1IsLeftOf : p1IsRightOf && p1IsLeftOf;
-    var p3InCone = p1.reflex ? p3IsRightOf || p3IsLeftOf : p3IsRightOf && p3IsLeftOf;
-    return p1InCone && p3InCone;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.PolygonReplay.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {
-    var endss = multiPolygonGeometry.getEndss();
-    var stride = multiPolygonGeometry.getStride();
-    var currIndex = this.indices.length;
-    var currLineIndex = this.lineStringReplay.getCurrentIndex();
-    var flatCoordinates = multiPolygonGeometry.getFlatCoordinates();
-    var i, ii, j, jj;
-    var start = 0;
-    for (i = 0, ii = endss.length; i < ii; ++i) {
-      var ends = endss[i];
-      if (ends.length > 0) {
-        var outerRing = ol.geom.flat.transform.translate(flatCoordinates, start, ends[0],
-            stride, -this.origin[0], -this.origin[1]);
-        if (outerRing.length) {
-          var holes = [];
-          var holeFlatCoords;
-          for (j = 1, jj = ends.length; j < jj; ++j) {
-            if (ends[j] !== ends[j - 1]) {
-              holeFlatCoords = ol.geom.flat.transform.translate(flatCoordinates, ends[j - 1],
-                  ends[j], stride, -this.origin[0], -this.origin[1]);
-              holes.push(holeFlatCoords);
-            }
-          }
-          this.lineStringReplay.drawPolygonCoordinates(outerRing, holes, stride);
-          this.drawCoordinates_(outerRing, holes, stride);
-        }
-      }
-      start = ends[ends.length - 1];
-    }
-    if (this.indices.length > currIndex) {
-      this.startIndices.push(currIndex);
-      this.startIndicesFeature.push(feature);
-      if (this.state_.changed) {
-        this.styleIndices_.push(currIndex);
-        this.state_.changed = false;
-      }
-    }
-    if (this.lineStringReplay.getCurrentIndex() > currLineIndex) {
-      this.lineStringReplay.setPolygonStyle(feature, currLineIndex);
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.PolygonReplay.prototype.drawPolygon = function(polygonGeometry, feature) {
-    var ends = polygonGeometry.getEnds();
-    var stride = polygonGeometry.getStride();
-    if (ends.length > 0) {
-      var flatCoordinates = polygonGeometry.getFlatCoordinates().map(Number);
-      var outerRing = ol.geom.flat.transform.translate(flatCoordinates, 0, ends[0],
-          stride, -this.origin[0], -this.origin[1]);
-      if (outerRing.length) {
-        var holes = [];
-        var i, ii, holeFlatCoords;
-        for (i = 1, ii = ends.length; i < ii; ++i) {
-          if (ends[i] !== ends[i - 1]) {
-            holeFlatCoords = ol.geom.flat.transform.translate(flatCoordinates, ends[i - 1],
-                ends[i], stride, -this.origin[0], -this.origin[1]);
-            holes.push(holeFlatCoords);
-          }
-        }
-
-        this.startIndices.push(this.indices.length);
-        this.startIndicesFeature.push(feature);
-        if (this.state_.changed) {
-          this.styleIndices_.push(this.indices.length);
-          this.state_.changed = false;
-        }
-        this.lineStringReplay.setPolygonStyle(feature);
-
-        this.lineStringReplay.drawPolygonCoordinates(outerRing, holes, stride);
-        this.drawCoordinates_(outerRing, holes, stride);
-      }
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   **/
-  ol.render.webgl.PolygonReplay.prototype.finish = function(context) {
-    // create, bind, and populate the vertices buffer
-    this.verticesBuffer = new ol.webgl.Buffer(this.vertices);
-
-    // create, bind, and populate the indices buffer
-    this.indicesBuffer = new ol.webgl.Buffer(this.indices);
-
-    this.startIndices.push(this.indices.length);
-
-    this.lineStringReplay.finish(context);
-
-    //Clean up, if there is nothing to draw
-    if (this.styleIndices_.length === 0 && this.styles_.length > 0) {
-      this.styles_ = [];
-    }
-
-    this.vertices = null;
-    this.indices = null;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.PolygonReplay.prototype.getDeleteResourcesFunction = function(context) {
-    var verticesBuffer = this.verticesBuffer;
-    var indicesBuffer = this.indicesBuffer;
-    var lineDeleter = this.lineStringReplay.getDeleteResourcesFunction(context);
-    return function() {
-      context.deleteBuffer(verticesBuffer);
-      context.deleteBuffer(indicesBuffer);
-      lineDeleter();
-    };
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.PolygonReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
-    // get the program
-    var fragmentShader, vertexShader;
-    fragmentShader = ol.render.webgl.polygonreplay.defaultshader.fragment;
-    vertexShader = ol.render.webgl.polygonreplay.defaultshader.vertex;
-    var program = context.getProgram(fragmentShader, vertexShader);
-
-    // get the locations
-    var locations;
-    if (!this.defaultLocations_) {
-      // eslint-disable-next-line openlayers-internal/no-missing-requires
-      locations = new ol.render.webgl.polygonreplay.defaultshader.Locations(gl, program);
-      this.defaultLocations_ = locations;
-    } else {
-      locations = this.defaultLocations_;
-    }
-
-    context.useProgram(program);
-
-    // enable the vertex attrib arrays
-    gl.enableVertexAttribArray(locations.a_position);
-    gl.vertexAttribPointer(locations.a_position, 2, ol.webgl.FLOAT,
-        false, 8, 0);
-
-    return locations;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.PolygonReplay.prototype.shutDownProgram = function(gl, locations) {
-    gl.disableVertexAttribArray(locations.a_position);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.PolygonReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {
-    //Save GL parameters.
-    var tmpDepthFunc = /** @type {number} */ (gl.getParameter(gl.DEPTH_FUNC));
-    var tmpDepthMask = /** @type {boolean} */ (gl.getParameter(gl.DEPTH_WRITEMASK));
-
-    if (!hitDetection) {
-      gl.enable(gl.DEPTH_TEST);
-      gl.depthMask(true);
-      gl.depthFunc(gl.NOTEQUAL);
-    }
-
-    if (!ol.obj.isEmpty(skippedFeaturesHash)) {
-      this.drawReplaySkipping_(gl, context, skippedFeaturesHash);
-    } else {
-      //Draw by style groups to minimize drawElements() calls.
-      var i, start, end, nextStyle;
-      end = this.startIndices[this.startIndices.length - 1];
-      for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-        start = this.styleIndices_[i];
-        nextStyle = this.styles_[i];
-        this.setFillStyle_(gl, nextStyle);
-        this.drawElements(gl, context, start, end);
-        end = start;
-      }
-    }
-    if (!hitDetection) {
-      gl.disable(gl.DEPTH_TEST);
-      gl.clear(gl.DEPTH_BUFFER_BIT);
-      //Restore GL parameters.
-      gl.depthMask(tmpDepthMask);
-      gl.depthFunc(tmpDepthFunc);
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.PolygonReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash,
-      featureCallback, opt_hitExtent) {
-    var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex;
-    featureIndex = this.startIndices.length - 2;
-    end = this.startIndices[featureIndex + 1];
-    for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-      nextStyle = this.styles_[i];
-      this.setFillStyle_(gl, nextStyle);
-      groupStart = this.styleIndices_[i];
-
-      while (featureIndex >= 0 &&
-          this.startIndices[featureIndex] >= groupStart) {
-        start = this.startIndices[featureIndex];
-        feature = this.startIndicesFeature[featureIndex];
-        featureUid = ol.getUid(feature).toString();
-
-        if (skippedFeaturesHash[featureUid] === undefined &&
-            feature.getGeometry() &&
-            (opt_hitExtent === undefined || ol.extent.intersects(
-                /** @type {Array<number>} */ (opt_hitExtent),
-                feature.getGeometry().getExtent()))) {
-          gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-          this.drawElements(gl, context, start, end);
-
-          var result = featureCallback(feature);
-
-          if (result) {
-            return result;
-          }
-
-        }
-        featureIndex--;
-        end = start;
-      }
-    }
-    return undefined;
-  };
-
-
-  /**
-   * @private
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {ol.webgl.Context} context Context.
-   * @param {Object} skippedFeaturesHash Ids of features to skip.
-   */
-  ol.render.webgl.PolygonReplay.prototype.drawReplaySkipping_ = function(gl, context, skippedFeaturesHash) {
-    var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex, featureStart;
-    featureIndex = this.startIndices.length - 2;
-    end = start = this.startIndices[featureIndex + 1];
-    for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-      nextStyle = this.styles_[i];
-      this.setFillStyle_(gl, nextStyle);
-      groupStart = this.styleIndices_[i];
-
-      while (featureIndex >= 0 &&
-          this.startIndices[featureIndex] >= groupStart) {
-        featureStart = this.startIndices[featureIndex];
-        feature = this.startIndicesFeature[featureIndex];
-        featureUid = ol.getUid(feature).toString();
-
-        if (skippedFeaturesHash[featureUid]) {
-          if (start !== end) {
-            this.drawElements(gl, context, start, end);
-            gl.clear(gl.DEPTH_BUFFER_BIT);
-          }
-          end = featureStart;
-        }
-        featureIndex--;
-        start = featureStart;
-      }
-      if (start !== end) {
-        this.drawElements(gl, context, start, end);
-        gl.clear(gl.DEPTH_BUFFER_BIT);
-      }
-      start = end = groupStart;
-    }
-  };
-
-
-  /**
-   * @private
-   * @param {WebGLRenderingContext} gl gl.
-   * @param {Array.<number>} color Color.
-   */
-  ol.render.webgl.PolygonReplay.prototype.setFillStyle_ = function(gl, color) {
-    gl.uniform4fv(this.defaultLocations_.u_color, color);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.PolygonReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-    var fillStyleColor = fillStyle ? fillStyle.getColor() : [0, 0, 0, 0];
-    if (!(fillStyleColor instanceof CanvasGradient) &&
-        !(fillStyleColor instanceof CanvasPattern)) {
-      fillStyleColor = ol.color.asArray(fillStyleColor).map(function(c, i) {
-        return i != 3 ? c / 255 : c;
-      }) || ol.render.webgl.defaultFillStyle;
-    } else {
-      fillStyleColor = ol.render.webgl.defaultFillStyle;
-    }
-    if (!this.state_.fillColor || !ol.array.equals(fillStyleColor, this.state_.fillColor)) {
-      this.state_.fillColor = fillStyleColor;
-      this.state_.changed = true;
-      this.styles_.push(fillStyleColor);
-    }
-    //Provide a null stroke style, if no strokeStyle is provided. Required for the draw interaction to work.
-    if (strokeStyle) {
-      this.lineStringReplay.setFillStrokeStyle(null, strokeStyle);
-    } else {
-      var nullStrokeStyle = new ol.style.Stroke({
-        color: [0, 0, 0, 0],
-        lineWidth: 0
-      });
-      this.lineStringReplay.setFillStrokeStyle(null, nullStrokeStyle);
-    }
-  };
-
-}
-
-goog.provide('ol.render.webgl.TextReplay');
-
-goog.require('ol');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @abstract
-   * @param {number} tolerance Tolerance.
-   * @param {ol.Extent} maxExtent Max extent.
-   * @struct
-   */
-  ol.render.webgl.TextReplay = function(tolerance, maxExtent) {};
-
-  /**
-   * @param {ol.style.Text} textStyle Text style.
-   */
-  ol.render.webgl.TextReplay.prototype.setTextStyle = function(textStyle) {};
-
-  /**
-   * @param {ol.webgl.Context} context Context.
-   * @param {ol.Coordinate} center Center.
-   * @param {number} resolution Resolution.
-   * @param {number} rotation Rotation.
-   * @param {ol.Size} size Size.
-   * @param {number} pixelRatio Pixel ratio.
-   * @param {number} opacity Global opacity.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
-   * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
-   * @param {ol.Extent=} opt_hitExtent Hit extent: Only features intersecting
-   *  this extent are checked.
-   * @return {T|undefined} Callback result.
-   * @template T
-   */
-  ol.render.webgl.TextReplay.prototype.replay = function(context,
-      center, resolution, rotation, size, pixelRatio,
-      opacity, skippedFeaturesHash,
-      featureCallback, oneByOne, opt_hitExtent) {
-    return undefined;
-  };
-
-  /**
-   * @param {Array.<number>} flatCoordinates Flat coordinates.
-   * @param {number} offset Offset.
-   * @param {number} end End.
-   * @param {number} stride Stride.
-   * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
-   * @param {ol.Feature|ol.render.Feature} feature Feature.
-   */
-  ol.render.webgl.TextReplay.prototype.drawText = function(flatCoordinates, offset,
-      end, stride, geometry, feature) {};
-
-  /**
-   * @abstract
-   * @param {ol.webgl.Context} context Context.
-   */
-  ol.render.webgl.TextReplay.prototype.finish = function(context) {};
-
-  /**
-   * @param {ol.webgl.Context} context WebGL context.
-   * @return {function()} Delete resources function.
-   */
-  ol.render.webgl.TextReplay.prototype.getDeleteResourcesFunction = function(context) {
-    return ol.nullFunction;
-  };
-
-}
-
-goog.provide('ol.render.webgl.ReplayGroup');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.render.replay');
-goog.require('ol.render.ReplayGroup');
-goog.require('ol.render.webgl.CircleReplay');
-goog.require('ol.render.webgl.ImageReplay');
-goog.require('ol.render.webgl.LineStringReplay');
-goog.require('ol.render.webgl.PolygonReplay');
-goog.require('ol.render.webgl.TextReplay');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.render.ReplayGroup}
-   * @param {number} tolerance Tolerance.
-   * @param {ol.Extent} maxExtent Max extent.
-   * @param {number=} opt_renderBuffer Render buffer.
-   * @struct
-   */
-  ol.render.webgl.ReplayGroup = function(tolerance, maxExtent, opt_renderBuffer) {
-    ol.render.ReplayGroup.call(this);
-
-    /**
-     * @type {ol.Extent}
-     * @private
-     */
-    this.maxExtent_ = maxExtent;
-
-    /**
-     * @type {number}
-     * @private
-     */
-    this.tolerance_ = tolerance;
-
-    /**
-     * @type {number|undefined}
-     * @private
-     */
-    this.renderBuffer_ = opt_renderBuffer;
-
-    /**
-     * @private
-     * @type {!Object.<string,
-     *        Object.<ol.render.ReplayType, ol.render.webgl.Replay>>}
-     */
-    this.replaysByZIndex_ = {};
-
-  };
-  ol.inherits(ol.render.webgl.ReplayGroup, ol.render.ReplayGroup);
-
-
-  /**
-   * @param {ol.webgl.Context} context WebGL context.
-   * @return {function()} Delete resources function.
-   */
-  ol.render.webgl.ReplayGroup.prototype.getDeleteResourcesFunction = function(context) {
-    var functions = [];
-    var zKey;
-    for (zKey in this.replaysByZIndex_) {
-      var replays = this.replaysByZIndex_[zKey];
-      var replayKey;
-      for (replayKey in replays) {
-        functions.push(
-            replays[replayKey].getDeleteResourcesFunction(context));
-      }
-    }
-    return function() {
-      var length = functions.length;
-      var result;
-      for (var i = 0; i < length; i++) {
-        result = functions[i].apply(this, arguments);
-      }
-      return result;
-    };
-  };
-
-
-  /**
-   * @param {ol.webgl.Context} context Context.
-   */
-  ol.render.webgl.ReplayGroup.prototype.finish = function(context) {
-    var zKey;
-    for (zKey in this.replaysByZIndex_) {
-      var replays = this.replaysByZIndex_[zKey];
-      var replayKey;
-      for (replayKey in replays) {
-        replays[replayKey].finish(context);
-      }
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ReplayGroup.prototype.getReplay = function(zIndex, replayType) {
-    var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';
-    var replays = this.replaysByZIndex_[zIndexKey];
-    if (replays === undefined) {
-      replays = {};
-      this.replaysByZIndex_[zIndexKey] = replays;
-    }
-    var replay = replays[replayType];
-    if (replay === undefined) {
-      /**
-       * @type {Function}
-       */
-      var Constructor = ol.render.webgl.ReplayGroup.BATCH_CONSTRUCTORS_[replayType];
-      replay = new Constructor(this.tolerance_, this.maxExtent_);
-      replays[replayType] = replay;
-    }
-    return replay;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.ReplayGroup.prototype.isEmpty = function() {
-    return ol.obj.isEmpty(this.replaysByZIndex_);
-  };
-
-
-  /**
-   * @param {ol.webgl.Context} context Context.
-   * @param {ol.Coordinate} center Center.
-   * @param {number} resolution Resolution.
-   * @param {number} rotation Rotation.
-   * @param {ol.Size} size Size.
-   * @param {number} pixelRatio Pixel ratio.
-   * @param {number} opacity Global opacity.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   */
-  ol.render.webgl.ReplayGroup.prototype.replay = function(context,
-      center, resolution, rotation, size, pixelRatio,
-      opacity, skippedFeaturesHash) {
-    /** @type {Array.<number>} */
-    var zs = Object.keys(this.replaysByZIndex_).map(Number);
-    zs.sort(ol.array.numberSafeCompareFunction);
-
-    var i, ii, j, jj, replays, replay;
-    for (i = 0, ii = zs.length; i < ii; ++i) {
-      replays = this.replaysByZIndex_[zs[i].toString()];
-      for (j = 0, jj = ol.render.replay.ORDER.length; j < jj; ++j) {
-        replay = replays[ol.render.replay.ORDER[j]];
-        if (replay !== undefined) {
-          replay.replay(context,
-              center, resolution, rotation, size, pixelRatio,
-              opacity, skippedFeaturesHash,
-              undefined, false);
-        }
-      }
-    }
-  };
-
-
-  /**
-   * @private
-   * @param {ol.webgl.Context} context Context.
-   * @param {ol.Coordinate} center Center.
-   * @param {number} resolution Resolution.
-   * @param {number} rotation Rotation.
-   * @param {ol.Size} size Size.
-   * @param {number} pixelRatio Pixel ratio.
-   * @param {number} opacity Global opacity.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
-   * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
-   * @param {ol.Extent=} opt_hitExtent Hit extent: Only features intersecting
-   *  this extent are checked.
-   * @return {T|undefined} Callback result.
-   * @template T
-   */
-  ol.render.webgl.ReplayGroup.prototype.replayHitDetection_ = function(context,
-      center, resolution, rotation, size, pixelRatio, opacity,
-      skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent) {
-    /** @type {Array.<number>} */
-    var zs = Object.keys(this.replaysByZIndex_).map(Number);
-    zs.sort(function(a, b) {
-      return b - a;
-    });
-
-    var i, ii, j, replays, replay, result;
-    for (i = 0, ii = zs.length; i < ii; ++i) {
-      replays = this.replaysByZIndex_[zs[i].toString()];
-      for (j = ol.render.replay.ORDER.length - 1; j >= 0; --j) {
-        replay = replays[ol.render.replay.ORDER[j]];
-        if (replay !== undefined) {
-          result = replay.replay(context,
-              center, resolution, rotation, size, pixelRatio, opacity,
-              skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent);
-          if (result) {
-            return result;
-          }
-        }
-      }
-    }
-    return undefined;
-  };
-
-
-  /**
-   * @param {ol.Coordinate} coordinate Coordinate.
-   * @param {ol.webgl.Context} context Context.
-   * @param {ol.Coordinate} center Center.
-   * @param {number} resolution Resolution.
-   * @param {number} rotation Rotation.
-   * @param {ol.Size} size Size.
-   * @param {number} pixelRatio Pixel ratio.
-   * @param {number} opacity Global opacity.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   * @param {function((ol.Feature|ol.render.Feature)): T|undefined} callback Feature callback.
-   * @return {T|undefined} Callback result.
-   * @template T
-   */
-  ol.render.webgl.ReplayGroup.prototype.forEachFeatureAtCoordinate = function(
-      coordinate, context, center, resolution, rotation, size, pixelRatio,
-      opacity, skippedFeaturesHash,
-      callback) {
-    var gl = context.getGL();
-    gl.bindFramebuffer(
-        gl.FRAMEBUFFER, context.getHitDetectionFramebuffer());
-
-
-    /**
-     * @type {ol.Extent}
-     */
-    var hitExtent;
-    if (this.renderBuffer_ !== undefined) {
-      // build an extent around the coordinate, so that only features that
-      // intersect this extent are checked
-      hitExtent = ol.extent.buffer(
-          ol.extent.createOrUpdateFromCoordinate(coordinate),
-          resolution * this.renderBuffer_);
-    }
-
-    return this.replayHitDetection_(context,
-        coordinate, resolution, rotation, ol.render.webgl.ReplayGroup.HIT_DETECTION_SIZE_,
-        pixelRatio, opacity, skippedFeaturesHash,
-        /**
-         * @param {ol.Feature|ol.render.Feature} feature Feature.
-         * @return {?} Callback result.
-         */
-        function(feature) {
-          var imageData = new Uint8Array(4);
-          gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, imageData);
-
-          if (imageData[3] > 0) {
-            var result = callback(feature);
-            if (result) {
-              return result;
-            }
-          }
-        }, true, hitExtent);
-  };
-
-
-  /**
-   * @param {ol.Coordinate} coordinate Coordinate.
-   * @param {ol.webgl.Context} context Context.
-   * @param {ol.Coordinate} center Center.
-   * @param {number} resolution Resolution.
-   * @param {number} rotation Rotation.
-   * @param {ol.Size} size Size.
-   * @param {number} pixelRatio Pixel ratio.
-   * @param {number} opacity Global opacity.
-   * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
-   *  to skip.
-   * @return {boolean} Is there a feature at the given coordinate?
-   */
-  ol.render.webgl.ReplayGroup.prototype.hasFeatureAtCoordinate = function(
-      coordinate, context, center, resolution, rotation, size, pixelRatio,
-      opacity, skippedFeaturesHash) {
-    var gl = context.getGL();
-    gl.bindFramebuffer(
-        gl.FRAMEBUFFER, context.getHitDetectionFramebuffer());
-
-    var hasFeature = this.replayHitDetection_(context,
-        coordinate, resolution, rotation, ol.render.webgl.ReplayGroup.HIT_DETECTION_SIZE_,
-        pixelRatio, opacity, skippedFeaturesHash,
-        /**
-         * @param {ol.Feature|ol.render.Feature} feature Feature.
-         * @return {boolean} Is there a feature?
-         */
-        function(feature) {
-          var imageData = new Uint8Array(4);
-          gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, imageData);
-          return imageData[3] > 0;
-        }, false);
-
-    return hasFeature !== undefined;
-  };
-
-  /**
-   * @const
-   * @private
-   * @type {Array.<number>}
-   */
-  ol.render.webgl.ReplayGroup.HIT_DETECTION_SIZE_ = [1, 1];
-
-  /**
-   * @const
-   * @private
-   * @type {Object.<ol.render.ReplayType,
-   *                function(new: ol.render.webgl.Replay, number,
-   *                ol.Extent)>}
-   */
-  ol.render.webgl.ReplayGroup.BATCH_CONSTRUCTORS_ = {
-    'Circle': ol.render.webgl.CircleReplay,
-    'Image': ol.render.webgl.ImageReplay,
-    'LineString': ol.render.webgl.LineStringReplay,
-    'Polygon': ol.render.webgl.PolygonReplay,
-    'Text': ol.render.webgl.TextReplay
-  };
-
-}
-
-goog.provide('ol.render.webgl.Immediate');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.render.ReplayType');
-goog.require('ol.render.VectorContext');
-goog.require('ol.render.webgl.ReplayGroup');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.render.VectorContext}
-   * @param {ol.webgl.Context} context Context.
-   * @param {ol.Coordinate} center Center.
-   * @param {number} resolution Resolution.
-   * @param {number} rotation Rotation.
-   * @param {ol.Size} size Size.
-   * @param {ol.Extent} extent Extent.
-   * @param {number} pixelRatio Pixel ratio.
-   * @struct
-   */
-  ol.render.webgl.Immediate = function(context, center, resolution, rotation, size, extent, pixelRatio) {
-    ol.render.VectorContext.call(this);
-
-    /**
-     * @private
-     */
-    this.context_ = context;
-
-    /**
-     * @private
-     */
-    this.center_ = center;
-
-    /**
-     * @private
-     */
-    this.extent_ = extent;
-
-    /**
-     * @private
-     */
-    this.pixelRatio_ = pixelRatio;
-
-    /**
-     * @private
-     */
-    this.size_ = size;
-
-    /**
-     * @private
-     */
-    this.rotation_ = rotation;
-
-    /**
-     * @private
-     */
-    this.resolution_ = resolution;
-
-    /**
-     * @private
-     * @type {ol.style.Image}
-     */
-    this.imageStyle_ = null;
-
-    /**
-     * @private
-     * @type {ol.style.Fill}
-     */
-    this.fillStyle_ = null;
-
-    /**
-     * @private
-     * @type {ol.style.Stroke}
-     */
-    this.strokeStyle_ = null;
-
-  };
-  ol.inherits(ol.render.webgl.Immediate, ol.render.VectorContext);
-
-
-  /**
-   * Set the rendering style.  Note that since this is an immediate rendering API,
-   * any `zIndex` on the provided style will be ignored.
-   *
-   * @param {ol.style.Style} style The rendering style.
-   * @override
-   * @api
-   */
-  ol.render.webgl.Immediate.prototype.setStyle = function(style) {
-    this.setFillStrokeStyle(style.getFill(), style.getStroke());
-    this.setImageStyle(style.getImage());
-  };
-
-
-  /**
-   * Render a geometry into the canvas.  Call
-   * {@link ol.render.webgl.Immediate#setStyle} first to set the rendering style.
-   *
-   * @param {ol.geom.Geometry|ol.render.Feature} geometry The geometry to render.
-   * @override
-   * @api
-   */
-  ol.render.webgl.Immediate.prototype.drawGeometry = function(geometry) {
-    var type = geometry.getType();
-    switch (type) {
-      case ol.geom.GeometryType.POINT:
-        this.drawPoint(/** @type {ol.geom.Point} */ (geometry), null);
-        break;
-      case ol.geom.GeometryType.LINE_STRING:
-        this.drawLineString(/** @type {ol.geom.LineString} */ (geometry), null);
-        break;
-      case ol.geom.GeometryType.POLYGON:
-        this.drawPolygon(/** @type {ol.geom.Polygon} */ (geometry), null);
-        break;
-      case ol.geom.GeometryType.MULTI_POINT:
-        this.drawMultiPoint(/** @type {ol.geom.MultiPoint} */ (geometry), null);
-        break;
-      case ol.geom.GeometryType.MULTI_LINE_STRING:
-        this.drawMultiLineString(/** @type {ol.geom.MultiLineString} */ (geometry), null);
-        break;
-      case ol.geom.GeometryType.MULTI_POLYGON:
-        this.drawMultiPolygon(/** @type {ol.geom.MultiPolygon} */ (geometry), null);
-        break;
-      case ol.geom.GeometryType.GEOMETRY_COLLECTION:
-        this.drawGeometryCollection(/** @type {ol.geom.GeometryCollection} */ (geometry), null);
-        break;
-      case ol.geom.GeometryType.CIRCLE:
-        this.drawCircle(/** @type {ol.geom.Circle} */ (geometry), null);
-        break;
-      default:
-        // pass
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   * @api
-   */
-  ol.render.webgl.Immediate.prototype.drawFeature = function(feature, style) {
-    var geometry = style.getGeometryFunction()(feature);
-    if (!geometry ||
-        !ol.extent.intersects(this.extent_, geometry.getExtent())) {
-      return;
-    }
-    this.setStyle(style);
-    this.drawGeometry(geometry);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.Immediate.prototype.drawGeometryCollection = function(geometry, data) {
-    var geometries = geometry.getGeometriesArray();
-    var i, ii;
-    for (i = 0, ii = geometries.length; i < ii; ++i) {
-      this.drawGeometry(geometries[i]);
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.Immediate.prototype.drawPoint = function(geometry, data) {
-    var context = this.context_;
-    var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-    var replay = /** @type {ol.render.webgl.ImageReplay} */ (
-        replayGroup.getReplay(0, ol.render.ReplayType.IMAGE));
-    replay.setImageStyle(this.imageStyle_);
-    replay.drawPoint(geometry, data);
-    replay.finish(context);
-    // default colors
-    var opacity = 1;
-    var skippedFeatures = {};
-    var featureCallback;
-    var oneByOne = false;
-    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-        this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-        oneByOne);
-    replay.getDeleteResourcesFunction(context)();
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.Immediate.prototype.drawMultiPoint = function(geometry, data) {
-    var context = this.context_;
-    var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-    var replay = /** @type {ol.render.webgl.ImageReplay} */ (
-        replayGroup.getReplay(0, ol.render.ReplayType.IMAGE));
-    replay.setImageStyle(this.imageStyle_);
-    replay.drawMultiPoint(geometry, data);
-    replay.finish(context);
-    var opacity = 1;
-    var skippedFeatures = {};
-    var featureCallback;
-    var oneByOne = false;
-    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-        this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-        oneByOne);
-    replay.getDeleteResourcesFunction(context)();
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.Immediate.prototype.drawLineString = function(geometry, data) {
-    var context = this.context_;
-    var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-    var replay = /** @type {ol.render.webgl.LineStringReplay} */ (
-        replayGroup.getReplay(0, ol.render.ReplayType.LINE_STRING));
-    replay.setFillStrokeStyle(null, this.strokeStyle_);
-    replay.drawLineString(geometry, data);
-    replay.finish(context);
-    var opacity = 1;
-    var skippedFeatures = {};
-    var featureCallback;
-    var oneByOne = false;
-    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-        this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-        oneByOne);
-    replay.getDeleteResourcesFunction(context)();
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.Immediate.prototype.drawMultiLineString = function(geometry, data) {
-    var context = this.context_;
-    var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-    var replay = /** @type {ol.render.webgl.LineStringReplay} */ (
-        replayGroup.getReplay(0, ol.render.ReplayType.LINE_STRING));
-    replay.setFillStrokeStyle(null, this.strokeStyle_);
-    replay.drawMultiLineString(geometry, data);
-    replay.finish(context);
-    var opacity = 1;
-    var skippedFeatures = {};
-    var featureCallback;
-    var oneByOne = false;
-    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-        this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-        oneByOne);
-    replay.getDeleteResourcesFunction(context)();
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.Immediate.prototype.drawPolygon = function(geometry, data) {
-    var context = this.context_;
-    var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-    var replay = /** @type {ol.render.webgl.PolygonReplay} */ (
-        replayGroup.getReplay(0, ol.render.ReplayType.POLYGON));
-    replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
-    replay.drawPolygon(geometry, data);
-    replay.finish(context);
-    var opacity = 1;
-    var skippedFeatures = {};
-    var featureCallback;
-    var oneByOne = false;
-    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-        this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-        oneByOne);
-    replay.getDeleteResourcesFunction(context)();
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.Immediate.prototype.drawMultiPolygon = function(geometry, data) {
-    var context = this.context_;
-    var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-    var replay = /** @type {ol.render.webgl.PolygonReplay} */ (
-        replayGroup.getReplay(0, ol.render.ReplayType.POLYGON));
-    replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
-    replay.drawMultiPolygon(geometry, data);
-    replay.finish(context);
-    var opacity = 1;
-    var skippedFeatures = {};
-    var featureCallback;
-    var oneByOne = false;
-    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-        this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-        oneByOne);
-    replay.getDeleteResourcesFunction(context)();
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.Immediate.prototype.drawCircle = function(geometry, data) {
-    var context = this.context_;
-    var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-    var replay = /** @type {ol.render.webgl.CircleReplay} */ (
-        replayGroup.getReplay(0, ol.render.ReplayType.CIRCLE));
-    replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
-    replay.drawCircle(geometry, data);
-    replay.finish(context);
-    var opacity = 1;
-    var skippedFeatures = {};
-    var featureCallback;
-    var oneByOne = false;
-    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-        this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-        oneByOne);
-    replay.getDeleteResourcesFunction(context)();
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.Immediate.prototype.setImageStyle = function(imageStyle) {
-    this.imageStyle_ = imageStyle;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.render.webgl.Immediate.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-    this.fillStyle_ = fillStyle;
-    this.strokeStyle_ = strokeStyle;
-  };
-
-}
-
-goog.provide('ol.structs.LRUCache');
-
-goog.require('ol.asserts');
-
-
-/**
- * Implements a Least-Recently-Used cache where the keys do not conflict with
- * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring
- * items from the cache is the responsibility of the user.
- * @constructor
- * @struct
- * @template T
- */
-ol.structs.LRUCache = function() {
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.count_ = 0;
-
-  /**
-   * @private
-   * @type {!Object.<string, ol.LRUCacheEntry>}
-   */
-  this.entries_ = {};
-
-  /**
-   * @private
-   * @type {?ol.LRUCacheEntry}
-   */
-  this.oldest_ = null;
-
-  /**
-   * @private
-   * @type {?ol.LRUCacheEntry}
-   */
-  this.newest_ = null;
-
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.structs.LRUCache.prototype.clear = function() {
-  this.count_ = 0;
-  this.entries_ = {};
-  this.oldest_ = null;
-  this.newest_ = null;
-};
-
-
-/**
- * @param {string} key Key.
- * @return {boolean} Contains key.
- */
-ol.structs.LRUCache.prototype.containsKey = function(key) {
-  return this.entries_.hasOwnProperty(key);
-};
-
-
-/**
- * @param {function(this: S, T, string, ol.structs.LRUCache): ?} f The function
- *     to call for every entry from the oldest to the newer. This function takes
- *     3 arguments (the entry value, the entry key and the LRUCache object).
- *     The return value is ignored.
- * @param {S=} opt_this The object to use as `this` in `f`.
- * @template S
- */
-ol.structs.LRUCache.prototype.forEach = function(f, opt_this) {
-  var entry = this.oldest_;
-  while (entry) {
-    f.call(opt_this, entry.value_, entry.key_, this);
-    entry = entry.newer;
-  }
-};
-
-
-/**
- * @param {string} key Key.
- * @return {T} Value.
- */
-ol.structs.LRUCache.prototype.get = function(key) {
-  var entry = this.entries_[key];
-  ol.asserts.assert(entry !== undefined,
-      15); // Tried to get a value for a key that does not exist in the cache
-  if (entry === this.newest_) {
-    return entry.value_;
-  } else if (entry === this.oldest_) {
-    this.oldest_ = /** @type {ol.LRUCacheEntry} */ (this.oldest_.newer);
-    this.oldest_.older = null;
-  } else {
-    entry.newer.older = entry.older;
-    entry.older.newer = entry.newer;
-  }
-  entry.newer = null;
-  entry.older = this.newest_;
-  this.newest_.newer = entry;
-  this.newest_ = entry;
-  return entry.value_;
-};
-
-
-/**
- * @return {number} Count.
- */
-ol.structs.LRUCache.prototype.getCount = function() {
-  return this.count_;
-};
-
-
-/**
- * @return {Array.<string>} Keys.
- */
-ol.structs.LRUCache.prototype.getKeys = function() {
-  var keys = new Array(this.count_);
-  var i = 0;
-  var entry;
-  for (entry = this.newest_; entry; entry = entry.older) {
-    keys[i++] = entry.key_;
-  }
-  return keys;
-};
-
-
-/**
- * @return {Array.<T>} Values.
- */
-ol.structs.LRUCache.prototype.getValues = function() {
-  var values = new Array(this.count_);
-  var i = 0;
-  var entry;
-  for (entry = this.newest_; entry; entry = entry.older) {
-    values[i++] = entry.value_;
-  }
-  return values;
-};
-
-
-/**
- * @return {T} Last value.
- */
-ol.structs.LRUCache.prototype.peekLast = function() {
-  return this.oldest_.value_;
-};
-
-
-/**
- * @return {string} Last key.
- */
-ol.structs.LRUCache.prototype.peekLastKey = function() {
-  return this.oldest_.key_;
-};
-
-
-/**
- * @return {T} value Value.
- */
-ol.structs.LRUCache.prototype.pop = function() {
-  var entry = this.oldest_;
-  delete this.entries_[entry.key_];
-  if (entry.newer) {
-    entry.newer.older = null;
-  }
-  this.oldest_ = /** @type {ol.LRUCacheEntry} */ (entry.newer);
-  if (!this.oldest_) {
-    this.newest_ = null;
-  }
-  --this.count_;
-  return entry.value_;
-};
-
-
-/**
- * @param {string} key Key.
- * @param {T} value Value.
- */
-ol.structs.LRUCache.prototype.replace = function(key, value) {
-  this.get(key);  // update `newest_`
-  this.entries_[key].value_ = value;
-};
-
-
-/**
- * @param {string} key Key.
- * @param {T} value Value.
- */
-ol.structs.LRUCache.prototype.set = function(key, value) {
-  ol.asserts.assert(!(key in this.entries_),
-      16); // Tried to set a value for a key that is used already
-  var entry = /** @type {ol.LRUCacheEntry} */ ({
-    key_: key,
-    newer: null,
-    older: this.newest_,
-    value_: value
-  });
-  if (!this.newest_) {
-    this.oldest_ = entry;
-  } else {
-    this.newest_.newer = entry;
-  }
-  this.newest_ = entry;
-  this.entries_[key] = entry;
-  ++this.count_;
-};
-
-// FIXME check against gl.getParameter(webgl.MAX_TEXTURE_SIZE)
-
-goog.provide('ol.renderer.webgl.Map');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.layer.Layer');
-goog.require('ol.render.Event');
-goog.require('ol.render.EventType');
-goog.require('ol.render.webgl.Immediate');
-goog.require('ol.renderer.Map');
-goog.require('ol.renderer.Type');
-goog.require('ol.source.State');
-goog.require('ol.structs.LRUCache');
-goog.require('ol.structs.PriorityQueue');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Context');
-goog.require('ol.webgl.ContextEventType');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.renderer.Map}
-   * @param {Element} container Container.
-   * @param {ol.Map} map Map.
-   */
-  ol.renderer.webgl.Map = function(container, map) {
-    ol.renderer.Map.call(this, container, map);
-
-    /**
-     * @private
-     * @type {HTMLCanvasElement}
-     */
-    this.canvas_ = /** @type {HTMLCanvasElement} */
-        (document.createElement('CANVAS'));
-    this.canvas_.style.width = '100%';
-    this.canvas_.style.height = '100%';
-    this.canvas_.style.display = 'block';
-    this.canvas_.className = ol.css.CLASS_UNSELECTABLE;
-    container.insertBefore(this.canvas_, container.childNodes[0] || null);
-
-    /**
-     * @private
-     * @type {number}
-     */
-    this.clipTileCanvasWidth_ = 0;
-
-    /**
-     * @private
-     * @type {number}
-     */
-    this.clipTileCanvasHeight_ = 0;
-
-    /**
-     * @private
-     * @type {CanvasRenderingContext2D}
-     */
-    this.clipTileContext_ = ol.dom.createCanvasContext2D();
-
-    /**
-     * @private
-     * @type {boolean}
-     */
-    this.renderedVisible_ = true;
-
-    /**
-     * @private
-     * @type {WebGLRenderingContext}
-     */
-    this.gl_ = ol.webgl.getContext(this.canvas_, {
-      antialias: true,
-      depth: true,
-      failIfMajorPerformanceCaveat: true,
-      preserveDrawingBuffer: false,
-      stencil: true
-    });
-
-    /**
-     * @private
-     * @type {ol.webgl.Context}
-     */
-    this.context_ = new ol.webgl.Context(this.canvas_, this.gl_);
-
-    ol.events.listen(this.canvas_, ol.webgl.ContextEventType.LOST,
-        this.handleWebGLContextLost, this);
-    ol.events.listen(this.canvas_, ol.webgl.ContextEventType.RESTORED,
-        this.handleWebGLContextRestored, this);
-
-    /**
-     * @private
-     * @type {ol.structs.LRUCache.<ol.WebglTextureCacheEntry|null>}
-     */
-    this.textureCache_ = new ol.structs.LRUCache();
-
-    /**
-     * @private
-     * @type {ol.Coordinate}
-     */
-    this.focus_ = null;
-
-    /**
-     * @private
-     * @type {ol.structs.PriorityQueue.<Array>}
-     */
-    this.tileTextureQueue_ = new ol.structs.PriorityQueue(
-        /**
-         * @param {Array.<*>} element Element.
-         * @return {number} Priority.
-         * @this {ol.renderer.webgl.Map}
-         */
-        (function(element) {
-          var tileCenter = /** @type {ol.Coordinate} */ (element[1]);
-          var tileResolution = /** @type {number} */ (element[2]);
-          var deltaX = tileCenter[0] - this.focus_[0];
-          var deltaY = tileCenter[1] - this.focus_[1];
-          return 65536 * Math.log(tileResolution) +
-              Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;
-        }).bind(this),
-        /**
-         * @param {Array.<*>} element Element.
-         * @return {string} Key.
-         */
-        function(element) {
-          return /** @type {ol.Tile} */ (element[0]).getKey();
-        });
-
-
-    /**
-     * @param {ol.Map} map Map.
-     * @param {?olx.FrameState} frameState Frame state.
-     * @return {boolean} false.
-     * @this {ol.renderer.webgl.Map}
-     */
-    this.loadNextTileTexture_ =
-        function(map, frameState) {
-          if (!this.tileTextureQueue_.isEmpty()) {
-            this.tileTextureQueue_.reprioritize();
-            var element = this.tileTextureQueue_.dequeue();
-            var tile = /** @type {ol.Tile} */ (element[0]);
-            var tileSize = /** @type {ol.Size} */ (element[3]);
-            var tileGutter = /** @type {number} */ (element[4]);
-            this.bindTileTexture(
-                tile, tileSize, tileGutter, ol.webgl.LINEAR, ol.webgl.LINEAR);
-          }
-          return false;
-        }.bind(this);
-
-
-    /**
-     * @private
-     * @type {number}
-     */
-    this.textureCacheFrameMarkerCount_ = 0;
-
-    this.initializeGL_();
-  };
-  ol.inherits(ol.renderer.webgl.Map, ol.renderer.Map);
-
-
-  /**
-   * @param {ol.Tile} tile Tile.
-   * @param {ol.Size} tileSize Tile size.
-   * @param {number} tileGutter Tile gutter.
-   * @param {number} magFilter Mag filter.
-   * @param {number} minFilter Min filter.
-   */
-  ol.renderer.webgl.Map.prototype.bindTileTexture = function(tile, tileSize, tileGutter, magFilter, minFilter) {
-    var gl = this.getGL();
-    var tileKey = tile.getKey();
-    if (this.textureCache_.containsKey(tileKey)) {
-      var textureCacheEntry = this.textureCache_.get(tileKey);
-      gl.bindTexture(ol.webgl.TEXTURE_2D, textureCacheEntry.texture);
-      if (textureCacheEntry.magFilter != magFilter) {
-        gl.texParameteri(
-            ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_MAG_FILTER, magFilter);
-        textureCacheEntry.magFilter = magFilter;
-      }
-      if (textureCacheEntry.minFilter != minFilter) {
-        gl.texParameteri(
-            ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_MIN_FILTER, minFilter);
-        textureCacheEntry.minFilter = minFilter;
-      }
-    } else {
-      var texture = gl.createTexture();
-      gl.bindTexture(ol.webgl.TEXTURE_2D, texture);
-      if (tileGutter > 0) {
-        var clipTileCanvas = this.clipTileContext_.canvas;
-        var clipTileContext = this.clipTileContext_;
-        if (this.clipTileCanvasWidth_ !== tileSize[0] ||
-            this.clipTileCanvasHeight_ !== tileSize[1]) {
-          clipTileCanvas.width = tileSize[0];
-          clipTileCanvas.height = tileSize[1];
-          this.clipTileCanvasWidth_ = tileSize[0];
-          this.clipTileCanvasHeight_ = tileSize[1];
-        } else {
-          clipTileContext.clearRect(0, 0, tileSize[0], tileSize[1]);
-        }
-        clipTileContext.drawImage(tile.getImage(), tileGutter, tileGutter,
-            tileSize[0], tileSize[1], 0, 0, tileSize[0], tileSize[1]);
-        gl.texImage2D(ol.webgl.TEXTURE_2D, 0,
-            ol.webgl.RGBA, ol.webgl.RGBA,
-            ol.webgl.UNSIGNED_BYTE, clipTileCanvas);
-      } else {
-        gl.texImage2D(ol.webgl.TEXTURE_2D, 0,
-            ol.webgl.RGBA, ol.webgl.RGBA,
-            ol.webgl.UNSIGNED_BYTE, tile.getImage());
-      }
-      gl.texParameteri(
-          ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_MAG_FILTER, magFilter);
-      gl.texParameteri(
-          ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_MIN_FILTER, minFilter);
-      gl.texParameteri(ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_WRAP_S,
-          ol.webgl.CLAMP_TO_EDGE);
-      gl.texParameteri(ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_WRAP_T,
-          ol.webgl.CLAMP_TO_EDGE);
-      this.textureCache_.set(tileKey, {
-        texture: texture,
-        magFilter: magFilter,
-        minFilter: minFilter
-      });
-    }
-  };
-
-
-  /**
-   * @param {ol.render.EventType} type Event type.
-   * @param {olx.FrameState} frameState Frame state.
-   * @private
-   */
-  ol.renderer.webgl.Map.prototype.dispatchComposeEvent_ = function(type, frameState) {
-    var map = this.getMap();
-    if (map.hasListener(type)) {
-      var context = this.context_;
-
-      var extent = frameState.extent;
-      var size = frameState.size;
-      var viewState = frameState.viewState;
-      var pixelRatio = frameState.pixelRatio;
-
-      var resolution = viewState.resolution;
-      var center = viewState.center;
-      var rotation = viewState.rotation;
-
-      var vectorContext = new ol.render.webgl.Immediate(context,
-          center, resolution, rotation, size, extent, pixelRatio);
-      var composeEvent = new ol.render.Event(type, vectorContext,
-          frameState, null, context);
-      map.dispatchEvent(composeEvent);
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.Map.prototype.disposeInternal = function() {
-    var gl = this.getGL();
-    if (!gl.isContextLost()) {
-      this.textureCache_.forEach(
-          /**
-           * @param {?ol.WebglTextureCacheEntry} textureCacheEntry
-           *     Texture cache entry.
-           */
-          function(textureCacheEntry) {
-            if (textureCacheEntry) {
-              gl.deleteTexture(textureCacheEntry.texture);
-            }
-          });
-    }
-    this.context_.dispose();
-    ol.renderer.Map.prototype.disposeInternal.call(this);
-  };
-
-
-  /**
-   * @param {ol.Map} map Map.
-   * @param {olx.FrameState} frameState Frame state.
-   * @private
-   */
-  ol.renderer.webgl.Map.prototype.expireCache_ = function(map, frameState) {
-    var gl = this.getGL();
-    var textureCacheEntry;
-    while (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >
-        ol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {
-      textureCacheEntry = this.textureCache_.peekLast();
-      if (!textureCacheEntry) {
-        if (+this.textureCache_.peekLastKey() == frameState.index) {
-          break;
-        } else {
-          --this.textureCacheFrameMarkerCount_;
-        }
-      } else {
-        gl.deleteTexture(textureCacheEntry.texture);
-      }
-      this.textureCache_.pop();
-    }
-  };
-
-
-  /**
-   * @return {ol.webgl.Context} The context.
-   */
-  ol.renderer.webgl.Map.prototype.getContext = function() {
-    return this.context_;
-  };
-
-
-  /**
-   * @return {WebGLRenderingContext} GL.
-   */
-  ol.renderer.webgl.Map.prototype.getGL = function() {
-    return this.gl_;
-  };
-
-
-  /**
-   * @return {ol.structs.PriorityQueue.<Array>} Tile texture queue.
-   */
-  ol.renderer.webgl.Map.prototype.getTileTextureQueue = function() {
-    return this.tileTextureQueue_;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.Map.prototype.getType = function() {
-    return ol.renderer.Type.WEBGL;
-  };
-
-
-  /**
-   * @param {ol.events.Event} event Event.
-   * @protected
-   */
-  ol.renderer.webgl.Map.prototype.handleWebGLContextLost = function(event) {
-    event.preventDefault();
-    this.textureCache_.clear();
-    this.textureCacheFrameMarkerCount_ = 0;
-
-    var renderers = this.getLayerRenderers();
-    for (var id in renderers) {
-      var renderer = /** @type {ol.renderer.webgl.Layer} */ (renderers[id]);
-      renderer.handleWebGLContextLost();
-    }
-  };
-
-
-  /**
-   * @protected
-   */
-  ol.renderer.webgl.Map.prototype.handleWebGLContextRestored = function() {
-    this.initializeGL_();
-    this.getMap().render();
-  };
-
-
-  /**
-   * @private
-   */
-  ol.renderer.webgl.Map.prototype.initializeGL_ = function() {
-    var gl = this.gl_;
-    gl.activeTexture(ol.webgl.TEXTURE0);
-    gl.blendFuncSeparate(
-        ol.webgl.SRC_ALPHA, ol.webgl.ONE_MINUS_SRC_ALPHA,
-        ol.webgl.ONE, ol.webgl.ONE_MINUS_SRC_ALPHA);
-    gl.disable(ol.webgl.CULL_FACE);
-    gl.disable(ol.webgl.DEPTH_TEST);
-    gl.disable(ol.webgl.SCISSOR_TEST);
-    gl.disable(ol.webgl.STENCIL_TEST);
-  };
-
-
-  /**
-   * @param {ol.Tile} tile Tile.
-   * @return {boolean} Is tile texture loaded.
-   */
-  ol.renderer.webgl.Map.prototype.isTileTextureLoaded = function(tile) {
-    return this.textureCache_.containsKey(tile.getKey());
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) {
-
-    var context = this.getContext();
-    var gl = this.getGL();
-
-    if (gl.isContextLost()) {
-      return false;
-    }
-
-    if (!frameState) {
-      if (this.renderedVisible_) {
-        this.canvas_.style.display = 'none';
-        this.renderedVisible_ = false;
-      }
-      return false;
-    }
-
-    this.focus_ = frameState.focus;
-
-    this.textureCache_.set((-frameState.index).toString(), null);
-    ++this.textureCacheFrameMarkerCount_;
-
-    this.dispatchComposeEvent_(ol.render.EventType.PRECOMPOSE, frameState);
-
-    /** @type {Array.<ol.LayerState>} */
-    var layerStatesToDraw = [];
-    var layerStatesArray = frameState.layerStatesArray;
-    ol.array.stableSort(layerStatesArray, ol.renderer.Map.sortByZIndex);
-
-    var viewResolution = frameState.viewState.resolution;
-    var i, ii, layerRenderer, layerState;
-    for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {
-      layerState = layerStatesArray[i];
-      if (ol.layer.Layer.visibleAtResolution(layerState, viewResolution) &&
-          layerState.sourceState == ol.source.State.READY) {
-        layerRenderer = /** @type {ol.renderer.webgl.Layer} */ (this.getLayerRenderer(layerState.layer));
-        if (layerRenderer.prepareFrame(frameState, layerState, context)) {
-          layerStatesToDraw.push(layerState);
-        }
-      }
-    }
-
-    var width = frameState.size[0] * frameState.pixelRatio;
-    var height = frameState.size[1] * frameState.pixelRatio;
-    if (this.canvas_.width != width || this.canvas_.height != height) {
-      this.canvas_.width = width;
-      this.canvas_.height = height;
-    }
-
-    gl.bindFramebuffer(ol.webgl.FRAMEBUFFER, null);
-
-    gl.clearColor(0, 0, 0, 0);
-    gl.clear(ol.webgl.COLOR_BUFFER_BIT);
-    gl.enable(ol.webgl.BLEND);
-    gl.viewport(0, 0, this.canvas_.width, this.canvas_.height);
-
-    for (i = 0, ii = layerStatesToDraw.length; i < ii; ++i) {
-      layerState = layerStatesToDraw[i];
-      layerRenderer = /** @type {ol.renderer.webgl.Layer} */ (this.getLayerRenderer(layerState.layer));
-      layerRenderer.composeFrame(frameState, layerState, context);
-    }
-
-    if (!this.renderedVisible_) {
-      this.canvas_.style.display = '';
-      this.renderedVisible_ = true;
-    }
-
-    this.calculateMatrices2D(frameState);
-
-    if (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >
-        ol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {
-      frameState.postRenderFunctions.push(
-        /** @type {ol.PostRenderFunction} */ (this.expireCache_.bind(this))
-      );
-    }
-
-    if (!this.tileTextureQueue_.isEmpty()) {
-      frameState.postRenderFunctions.push(this.loadNextTileTexture_);
-      frameState.animate = true;
-    }
-
-    this.dispatchComposeEvent_(ol.render.EventType.POSTCOMPOSE, frameState);
-
-    this.scheduleRemoveUnusedLayerRenderers(frameState);
-    this.scheduleExpireIconCache(frameState);
-
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.Map.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg,
-          layerFilter, thisArg2) {
-    var result;
-
-    if (this.getGL().isContextLost()) {
-      return false;
-    }
-
-    var viewState = frameState.viewState;
-
-    var layerStates = frameState.layerStatesArray;
-    var numLayers = layerStates.length;
-    var i;
-    for (i = numLayers - 1; i >= 0; --i) {
-      var layerState = layerStates[i];
-      var layer = layerState.layer;
-      if (ol.layer.Layer.visibleAtResolution(layerState, viewState.resolution) &&
-          layerFilter.call(thisArg2, layer)) {
-        var layerRenderer = this.getLayerRenderer(layer);
-        result = layerRenderer.forEachFeatureAtCoordinate(
-            coordinate, frameState, hitTolerance, callback, thisArg);
-        if (result) {
-          return result;
-        }
-      }
-    }
-    return undefined;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.Map.prototype.hasFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, layerFilter, thisArg) {
-    var hasFeature = false;
-
-    if (this.getGL().isContextLost()) {
-      return false;
-    }
-
-    var viewState = frameState.viewState;
-
-    var layerStates = frameState.layerStatesArray;
-    var numLayers = layerStates.length;
-    var i;
-    for (i = numLayers - 1; i >= 0; --i) {
-      var layerState = layerStates[i];
-      var layer = layerState.layer;
-      if (ol.layer.Layer.visibleAtResolution(layerState, viewState.resolution) &&
-          layerFilter.call(thisArg, layer)) {
-        var layerRenderer = this.getLayerRenderer(layer);
-        hasFeature =
-            layerRenderer.hasFeatureAtCoordinate(coordinate, frameState);
-        if (hasFeature) {
-          return true;
-        }
-      }
-    }
-    return hasFeature;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.Map.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg,
-          layerFilter, thisArg2) {
-    if (this.getGL().isContextLost()) {
-      return false;
-    }
-
-    var viewState = frameState.viewState;
-    var result;
-
-    var layerStates = frameState.layerStatesArray;
-    var numLayers = layerStates.length;
-    var i;
-    for (i = numLayers - 1; i >= 0; --i) {
-      var layerState = layerStates[i];
-      var layer = layerState.layer;
-      if (ol.layer.Layer.visibleAtResolution(layerState, viewState.resolution) &&
-          layerFilter.call(thisArg, layer)) {
-        var layerRenderer = /** @type {ol.renderer.webgl.Layer} */ (this.getLayerRenderer(layer));
-        result = layerRenderer.forEachLayerAtPixel(
-            pixel, frameState, callback, thisArg);
-        if (result) {
-          return result;
-        }
-      }
-    }
-    return undefined;
-  };
-
-}
-
-// FIXME recheck layer/map projection compatibility when projection changes
-// FIXME layer renderers should skip when they can't reproject
-// FIXME add tilt and height?
-
-goog.provide('ol.Map');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.CollectionEventType');
-goog.require('ol.MapBrowserEvent');
-goog.require('ol.MapBrowserEventHandler');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.MapEvent');
-goog.require('ol.MapEventType');
-goog.require('ol.MapProperty');
-goog.require('ol.Object');
-goog.require('ol.ObjectEventType');
-goog.require('ol.TileQueue');
-goog.require('ol.View');
-goog.require('ol.ViewHint');
-goog.require('ol.asserts');
-goog.require('ol.control');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.has');
-goog.require('ol.interaction');
-goog.require('ol.layer.Group');
-goog.require('ol.obj');
-goog.require('ol.renderer.Map');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.canvas.Map');
-goog.require('ol.renderer.webgl.Map');
-goog.require('ol.size');
-goog.require('ol.structs.PriorityQueue');
-goog.require('ol.transform');
-
-
-/**
- * @const
- * @type {string}
- */
-ol.OL_URL = 'https://openlayers.org/';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.OL_LOGO_URL = 'data:image/png;base64,' +
-    'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBI' +
-    'WXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAA' +
-    'AhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszW' +
-    'WMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvY' +
-    'asvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZ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4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCn' +
-    'B3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDg' +
-    'q82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC';
-
-
-/**
- * @type {Array.<ol.renderer.Type>}
- * @const
- */
-ol.DEFAULT_RENDERER_TYPES = [
-  ol.renderer.Type.CANVAS,
-  ol.renderer.Type.WEBGL
-];
-
-
-/**
- * @classdesc
- * The map is the core component of OpenLayers. For a map to render, a view,
- * one or more layers, and a target container are needed:
- *
- *     var map = new ol.Map({
- *       view: new ol.View({
- *         center: [0, 0],
- *         zoom: 1
- *       }),
- *       layers: [
- *         new ol.layer.Tile({
- *           source: new ol.source.OSM()
- *         })
- *       ],
- *       target: 'map'
- *     });
- *
- * The above snippet creates a map using a {@link ol.layer.Tile} to display
- * {@link ol.source.OSM} OSM data and render it to a DOM element with the
- * id `map`.
- *
- * The constructor places a viewport container (with CSS class name
- * `ol-viewport`) in the target element (see `getViewport()`), and then two
- * further elements within the viewport: one with CSS class name
- * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with
- * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`
- * option of {@link ol.Overlay} for the difference). The map itself is placed in
- * a further element within the viewport.
- *
- * Layers are stored as a `ol.Collection` in layerGroups. A top-level group is
- * provided by the library. This is what is accessed by `getLayerGroup` and
- * `setLayerGroup`. Layers entered in the options are added to this group, and
- * `addLayer` and `removeLayer` change the layer collection in the group.
- * `getLayers` is a convenience function for `getLayerGroup().getLayers()`.
- * Note that `ol.layer.Group` is a subclass of `ol.layer.Base`, so layers
- * entered in the options or added with `addLayer` can be groups, which can
- * contain further groups, and so on.
- *
- * @constructor
- * @extends {ol.Object}
- * @param {olx.MapOptions} options Map options.
- * @fires ol.MapBrowserEvent
- * @fires ol.MapEvent
- * @fires ol.render.Event#postcompose
- * @fires ol.render.Event#precompose
- * @api
- */
-ol.Map = function(options) {
-
-  ol.Object.call(this);
-
-  var optionsInternal = ol.Map.createOptionsInternal(options);
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.loadTilesWhileAnimating_ =
-      options.loadTilesWhileAnimating !== undefined ?
-          options.loadTilesWhileAnimating : false;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.loadTilesWhileInteracting_ =
-      options.loadTilesWhileInteracting !== undefined ?
-          options.loadTilesWhileInteracting : false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelRatio_ = options.pixelRatio !== undefined ?
-      options.pixelRatio : ol.has.DEVICE_PIXEL_RATIO;
-
-  /**
-   * @private
-   * @type {Object.<string, string>}
-   */
-  this.logos_ = optionsInternal.logos;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.animationDelayKey_;
-
-  /**
-   * @private
-   */
-  this.animationDelay_ = function() {
-    this.animationDelayKey_ = undefined;
-    this.renderFrame_.call(this, Date.now());
-  }.bind(this);
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.coordinateToPixelTransform_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.pixelToCoordinateTransform_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.frameIndex_ = 0;
-
-  /**
-   * @private
-   * @type {?olx.FrameState}
-   */
-  this.frameState_ = null;
-
-  /**
-   * The extent at the previous 'moveend' event.
-   * @private
-   * @type {ol.Extent}
-   */
-  this.previousExtent_ = null;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.viewPropertyListenerKey_ = null;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.viewChangeListenerKey_ = null;
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.layerGroupPropertyListenerKeys_ = null;
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.viewport_ = document.createElement('DIV');
-  this.viewport_.className = 'ol-viewport' + (ol.has.TOUCH ? ' ol-touch' : '');
-  this.viewport_.style.position = 'relative';
-  this.viewport_.style.overflow = 'hidden';
-  this.viewport_.style.width = '100%';
-  this.viewport_.style.height = '100%';
-  // prevent page zoom on IE >= 10 browsers
-  this.viewport_.style.msTouchAction = 'none';
-  this.viewport_.style.touchAction = 'none';
-
-  /**
-   * @private
-   * @type {!Element}
-   */
-  this.overlayContainer_ = document.createElement('DIV');
-  this.overlayContainer_.className = 'ol-overlaycontainer';
-  this.viewport_.appendChild(this.overlayContainer_);
-
-  /**
-   * @private
-   * @type {!Element}
-   */
-  this.overlayContainerStopEvent_ = document.createElement('DIV');
-  this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent';
-  var overlayEvents = [
-    ol.events.EventType.CLICK,
-    ol.events.EventType.DBLCLICK,
-    ol.events.EventType.MOUSEDOWN,
-    ol.events.EventType.TOUCHSTART,
-    ol.events.EventType.MSPOINTERDOWN,
-    ol.MapBrowserEventType.POINTERDOWN,
-    ol.events.EventType.MOUSEWHEEL,
-    ol.events.EventType.WHEEL
-  ];
-  for (var i = 0, ii = overlayEvents.length; i < ii; ++i) {
-    ol.events.listen(this.overlayContainerStopEvent_, overlayEvents[i],
-        ol.events.Event.stopPropagation);
-  }
-  this.viewport_.appendChild(this.overlayContainerStopEvent_);
-
-  /**
-   * @private
-   * @type {ol.MapBrowserEventHandler}
-   */
-  this.mapBrowserEventHandler_ = new ol.MapBrowserEventHandler(this, options.moveTolerance);
-  for (var key in ol.MapBrowserEventType) {
-    ol.events.listen(this.mapBrowserEventHandler_, ol.MapBrowserEventType[key],
-        this.handleMapBrowserEvent, this);
-  }
-
-  /**
-   * @private
-   * @type {Element|Document}
-   */
-  this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.keyHandlerKeys_ = null;
-
-  ol.events.listen(this.viewport_, ol.events.EventType.WHEEL,
-      this.handleBrowserEvent, this);
-  ol.events.listen(this.viewport_, ol.events.EventType.MOUSEWHEEL,
-      this.handleBrowserEvent, this);
-
-  /**
-   * @type {ol.Collection.<ol.control.Control>}
-   * @private
-   */
-  this.controls_ = optionsInternal.controls;
-
-  /**
-   * @type {ol.Collection.<ol.interaction.Interaction>}
-   * @private
-   */
-  this.interactions_ = optionsInternal.interactions;
-
-  /**
-   * @type {ol.Collection.<ol.Overlay>}
-   * @private
-   */
-  this.overlays_ = optionsInternal.overlays;
-
-  /**
-   * A lookup of overlays by id.
-   * @private
-   * @type {Object.<string, ol.Overlay>}
-   */
-  this.overlayIdIndex_ = {};
-
-  /**
-   * @type {ol.renderer.Map}
-   * @private
-   */
-  this.renderer_ = new /** @type {Function} */ (optionsInternal.rendererConstructor)(this.viewport_, this);
-
-  /**
-   * @type {function(Event)|undefined}
-   * @private
-   */
-  this.handleResize_;
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.focus_ = null;
-
-  /**
-   * @private
-   * @type {Array.<ol.PostRenderFunction>}
-   */
-  this.postRenderFunctions_ = [];
-
-  /**
-   * @private
-   * @type {ol.TileQueue}
-   */
-  this.tileQueue_ = new ol.TileQueue(
-      this.getTilePriority.bind(this),
-      this.handleTileChange_.bind(this));
-
-  /**
-   * Uids of features to skip at rendering time.
-   * @type {Object.<string, boolean>}
-   * @private
-   */
-  this.skippedFeatureUids_ = {};
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.MapProperty.LAYERGROUP),
-      this.handleLayerGroupChanged_, this);
-  ol.events.listen(this, ol.Object.getChangeEventType(ol.MapProperty.VIEW),
-      this.handleViewChanged_, this);
-  ol.events.listen(this, ol.Object.getChangeEventType(ol.MapProperty.SIZE),
-      this.handleSizeChanged_, this);
-  ol.events.listen(this, ol.Object.getChangeEventType(ol.MapProperty.TARGET),
-      this.handleTargetChanged_, this);
-
-  // setProperties will trigger the rendering of the map if the map
-  // is "defined" already.
-  this.setProperties(optionsInternal.values);
-
-  this.controls_.forEach(
-      /**
-       * @param {ol.control.Control} control Control.
-       * @this {ol.Map}
-       */
-      function(control) {
-        control.setMap(this);
-      }, this);
-
-  ol.events.listen(this.controls_, ol.CollectionEventType.ADD,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        event.element.setMap(this);
-      }, this);
-
-  ol.events.listen(this.controls_, ol.CollectionEventType.REMOVE,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        event.element.setMap(null);
-      }, this);
-
-  this.interactions_.forEach(
-      /**
-       * @param {ol.interaction.Interaction} interaction Interaction.
-       * @this {ol.Map}
-       */
-      function(interaction) {
-        interaction.setMap(this);
-      }, this);
-
-  ol.events.listen(this.interactions_, ol.CollectionEventType.ADD,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        event.element.setMap(this);
-      }, this);
-
-  ol.events.listen(this.interactions_, ol.CollectionEventType.REMOVE,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        event.element.setMap(null);
-      }, this);
-
-  this.overlays_.forEach(this.addOverlayInternal_, this);
-
-  ol.events.listen(this.overlays_, ol.CollectionEventType.ADD,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        this.addOverlayInternal_(/** @type {ol.Overlay} */ (event.element));
-      }, this);
-
-  ol.events.listen(this.overlays_, ol.CollectionEventType.REMOVE,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        var overlay = /** @type {ol.Overlay} */ (event.element);
-        var id = overlay.getId();
-        if (id !== undefined) {
-          delete this.overlayIdIndex_[id.toString()];
-        }
-        event.element.setMap(null);
-      }, this);
-
-};
-ol.inherits(ol.Map, ol.Object);
-
-
-/**
- * Add the given control to the map.
- * @param {ol.control.Control} control Control.
- * @api
- */
-ol.Map.prototype.addControl = function(control) {
-  this.getControls().push(control);
-};
-
-
-/**
- * Add the given interaction to the map.
- * @param {ol.interaction.Interaction} interaction Interaction to add.
- * @api
- */
-ol.Map.prototype.addInteraction = function(interaction) {
-  this.getInteractions().push(interaction);
-};
-
-
-/**
- * Adds the given layer to the top of this map. If you want to add a layer
- * elsewhere in the stack, use `getLayers()` and the methods available on
- * {@link ol.Collection}.
- * @param {ol.layer.Base} layer Layer.
- * @api
- */
-ol.Map.prototype.addLayer = function(layer) {
-  var layers = this.getLayerGroup().getLayers();
-  layers.push(layer);
-};
-
-
-/**
- * Add the given overlay to the map.
- * @param {ol.Overlay} overlay Overlay.
- * @api
- */
-ol.Map.prototype.addOverlay = function(overlay) {
-  this.getOverlays().push(overlay);
-};
-
-
-/**
- * This deals with map's overlay collection changes.
- * @param {ol.Overlay} overlay Overlay.
- * @private
- */
-ol.Map.prototype.addOverlayInternal_ = function(overlay) {
-  var id = overlay.getId();
-  if (id !== undefined) {
-    this.overlayIdIndex_[id.toString()] = overlay;
-  }
-  overlay.setMap(this);
-};
-
-
-/**
- *
- * @inheritDoc
- */
-ol.Map.prototype.disposeInternal = function() {
-  this.mapBrowserEventHandler_.dispose();
-  this.renderer_.dispose();
-  ol.events.unlisten(this.viewport_, ol.events.EventType.WHEEL,
-      this.handleBrowserEvent, this);
-  ol.events.unlisten(this.viewport_, ol.events.EventType.MOUSEWHEEL,
-      this.handleBrowserEvent, this);
-  if (this.handleResize_ !== undefined) {
-    window.removeEventListener(ol.events.EventType.RESIZE,
-        this.handleResize_, false);
-    this.handleResize_ = undefined;
-  }
-  if (this.animationDelayKey_) {
-    cancelAnimationFrame(this.animationDelayKey_);
-    this.animationDelayKey_ = undefined;
-  }
-  this.setTarget(null);
-  ol.Object.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Detect features that intersect a pixel on the viewport, and execute a
- * callback with each intersecting feature. Layers included in the detection can
- * be configured through `opt_layerFilter`.
- * @param {ol.Pixel} pixel Pixel.
- * @param {function(this: S, (ol.Feature|ol.render.Feature),
- *     ol.layer.Layer): T} callback Feature callback. The callback will be
- *     called with two arguments. The first argument is one
- *     {@link ol.Feature feature} or
- *     {@link ol.render.Feature render feature} at the pixel, the second is
- *     the {@link ol.layer.Layer layer} of the feature and will be null for
- *     unmanaged layers. To stop detection, callback functions can return a
- *     truthy value.
- * @param {olx.AtPixelOptions=} opt_options Optional options.
- * @return {T|undefined} Callback result, i.e. the return value of last
- * callback execution, or the first truthy callback return value.
- * @template S,T
- * @api
- */
-ol.Map.prototype.forEachFeatureAtPixel = function(pixel, callback, opt_options) {
-  if (!this.frameState_) {
-    return;
-  }
-  var coordinate = this.getCoordinateFromPixel(pixel);
-  opt_options = opt_options !== undefined ? opt_options : {};
-  var hitTolerance = opt_options.hitTolerance !== undefined ?
-    opt_options.hitTolerance * this.frameState_.pixelRatio : 0;
-  var layerFilter = opt_options.layerFilter !== undefined ?
-    opt_options.layerFilter : ol.functions.TRUE;
-  return this.renderer_.forEachFeatureAtCoordinate(
-      coordinate, this.frameState_, hitTolerance, callback, null,
-      layerFilter, null);
-};
-
-
-/**
- * Detect layers that have a color value at a pixel on the viewport, and
- * execute a callback with each matching layer. Layers included in the
- * detection can be configured through `opt_layerFilter`.
- * @param {ol.Pixel} pixel Pixel.
- * @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback
- *     Layer callback. This callback will receive two arguments: first is the
- *     {@link ol.layer.Layer layer}, second argument is an array representing
- *     [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types
- *     that do not currently support this argument. To stop detection, callback
- *     functions can return a truthy value.
- * @param {S=} opt_this Value to use as `this` when executing `callback`.
- * @param {(function(this: U, ol.layer.Layer): boolean)=} opt_layerFilter Layer
- *     filter function. The filter function will receive one argument, the
- *     {@link ol.layer.Layer layer-candidate} and it should return a boolean
- *     value. Only layers which are visible and for which this function returns
- *     `true` will be tested for features. By default, all visible layers will
- *     be tested.
- * @param {U=} opt_this2 Value to use as `this` when executing `layerFilter`.
- * @return {T|undefined} Callback result, i.e. the return value of last
- * callback execution, or the first truthy callback return value.
- * @template S,T,U
- * @api
- */
-ol.Map.prototype.forEachLayerAtPixel = function(pixel, callback, opt_this, opt_layerFilter, opt_this2) {
-  if (!this.frameState_) {
-    return;
-  }
-  var thisArg = opt_this !== undefined ? opt_this : null;
-  var layerFilter = opt_layerFilter !== undefined ?
-      opt_layerFilter : ol.functions.TRUE;
-  var thisArg2 = opt_this2 !== undefined ? opt_this2 : null;
-  return this.renderer_.forEachLayerAtPixel(
-      pixel, this.frameState_, callback, thisArg,
-      layerFilter, thisArg2);
-};
-
-
-/**
- * Detect if features intersect a pixel on the viewport. Layers included in the
- * detection can be configured through `opt_layerFilter`.
- * @param {ol.Pixel} pixel Pixel.
- * @param {olx.AtPixelOptions=} opt_options Optional options.
- * @return {boolean} Is there a feature at the given pixel?
- * @template U
- * @api
- */
-ol.Map.prototype.hasFeatureAtPixel = function(pixel, opt_options) {
-  if (!this.frameState_) {
-    return false;
-  }
-  var coordinate = this.getCoordinateFromPixel(pixel);
-  opt_options = opt_options !== undefined ? opt_options : {};
-  var layerFilter = opt_options.layerFilter !== undefined ?
-      opt_options.layerFilter : ol.functions.TRUE;
-  var hitTolerance = opt_options.hitTolerance !== undefined ?
-    opt_options.hitTolerance * this.frameState_.pixelRatio : 0;
-  return this.renderer_.hasFeatureAtCoordinate(
-      coordinate, this.frameState_, hitTolerance, layerFilter, null);
-};
-
-
-/**
- * Returns the coordinate in view projection for a browser event.
- * @param {Event} event Event.
- * @return {ol.Coordinate} Coordinate.
- * @api
- */
-ol.Map.prototype.getEventCoordinate = function(event) {
-  return this.getCoordinateFromPixel(this.getEventPixel(event));
-};
-
-
-/**
- * Returns the map pixel position for a browser event relative to the viewport.
- * @param {Event} event Event.
- * @return {ol.Pixel} Pixel.
- * @api
- */
-ol.Map.prototype.getEventPixel = function(event) {
-  var viewportPosition = this.viewport_.getBoundingClientRect();
-  var eventPosition = event.changedTouches ? event.changedTouches[0] : event;
-  return [
-    eventPosition.clientX - viewportPosition.left,
-    eventPosition.clientY - viewportPosition.top
-  ];
-};
-
-
-/**
- * Get the target in which this map is rendered.
- * Note that this returns what is entered as an option or in setTarget:
- * if that was an element, it returns an element; if a string, it returns that.
- * @return {Element|string|undefined} The Element or id of the Element that the
- *     map is rendered in.
- * @observable
- * @api
- */
-ol.Map.prototype.getTarget = function() {
-  return /** @type {Element|string|undefined} */ (
-      this.get(ol.MapProperty.TARGET));
-};
-
-
-/**
- * Get the DOM element into which this map is rendered. In contrast to
- * `getTarget` this method always return an `Element`, or `null` if the
- * map has no target.
- * @return {Element} The element that the map is rendered in.
- * @api
- */
-ol.Map.prototype.getTargetElement = function() {
-  var target = this.getTarget();
-  if (target !== undefined) {
-    return typeof target === 'string' ?
-      document.getElementById(target) :
-      target;
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * Get the coordinate for a given pixel.  This returns a coordinate in the
- * map view projection.
- * @param {ol.Pixel} pixel Pixel position in the map viewport.
- * @return {ol.Coordinate} The coordinate for the pixel position.
- * @api
- */
-ol.Map.prototype.getCoordinateFromPixel = function(pixel) {
-  var frameState = this.frameState_;
-  if (!frameState) {
-    return null;
-  } else {
-    return ol.transform.apply(frameState.pixelToCoordinateTransform, pixel.slice());
-  }
-};
-
-
-/**
- * Get the map controls. Modifying this collection changes the controls
- * associated with the map.
- * @return {ol.Collection.<ol.control.Control>} Controls.
- * @api
- */
-ol.Map.prototype.getControls = function() {
-  return this.controls_;
-};
-
-
-/**
- * Get the map overlays. Modifying this collection changes the overlays
- * associated with the map.
- * @return {ol.Collection.<ol.Overlay>} Overlays.
- * @api
- */
-ol.Map.prototype.getOverlays = function() {
-  return this.overlays_;
-};
-
-
-/**
- * Get an overlay by its identifier (the value returned by overlay.getId()).
- * Note that the index treats string and numeric identifiers as the same. So
- * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.
- * @param {string|number} id Overlay identifier.
- * @return {ol.Overlay} Overlay.
- * @api
- */
-ol.Map.prototype.getOverlayById = function(id) {
-  var overlay = this.overlayIdIndex_[id.toString()];
-  return overlay !== undefined ? overlay : null;
-};
-
-
-/**
- * Get the map interactions. Modifying this collection changes the interactions
- * associated with the map.
- *
- * Interactions are used for e.g. pan, zoom and rotate.
- * @return {ol.Collection.<ol.interaction.Interaction>} Interactions.
- * @api
- */
-ol.Map.prototype.getInteractions = function() {
-  return this.interactions_;
-};
-
-
-/**
- * Get the layergroup associated with this map.
- * @return {ol.layer.Group} A layer group containing the layers in this map.
- * @observable
- * @api
- */
-ol.Map.prototype.getLayerGroup = function() {
-  return /** @type {ol.layer.Group} */ (this.get(ol.MapProperty.LAYERGROUP));
-};
-
-
-/**
- * Get the collection of layers associated with this map.
- * @return {!ol.Collection.<ol.layer.Base>} Layers.
- * @api
- */
-ol.Map.prototype.getLayers = function() {
-  var layers = this.getLayerGroup().getLayers();
-  return layers;
-};
-
-
-/**
- * Get the pixel for a coordinate.  This takes a coordinate in the map view
- * projection and returns the corresponding pixel.
- * @param {ol.Coordinate} coordinate A map coordinate.
- * @return {ol.Pixel} A pixel position in the map viewport.
- * @api
- */
-ol.Map.prototype.getPixelFromCoordinate = function(coordinate) {
-  var frameState = this.frameState_;
-  if (!frameState) {
-    return null;
-  } else {
-    return ol.transform.apply(frameState.coordinateToPixelTransform,
-        coordinate.slice(0, 2));
-  }
-};
-
-
-/**
- * Get the map renderer.
- * @return {ol.renderer.Map} Renderer
- */
-ol.Map.prototype.getRenderer = function() {
-  return this.renderer_;
-};
-
-
-/**
- * Get the size of this map.
- * @return {ol.Size|undefined} The size in pixels of the map in the DOM.
- * @observable
- * @api
- */
-ol.Map.prototype.getSize = function() {
-  return /** @type {ol.Size|undefined} */ (this.get(ol.MapProperty.SIZE));
-};
-
-
-/**
- * Get the view associated with this map. A view manages properties such as
- * center and resolution.
- * @return {ol.View} The view that controls this map.
- * @observable
- * @api
- */
-ol.Map.prototype.getView = function() {
-  return /** @type {ol.View} */ (this.get(ol.MapProperty.VIEW));
-};
-
-
-/**
- * Get the element that serves as the map viewport.
- * @return {Element} Viewport.
- * @api
- */
-ol.Map.prototype.getViewport = function() {
-  return this.viewport_;
-};
-
-
-/**
- * Get the element that serves as the container for overlays.  Elements added to
- * this container will let mousedown and touchstart events through to the map,
- * so clicks and gestures on an overlay will trigger {@link ol.MapBrowserEvent}
- * events.
- * @return {!Element} The map's overlay container.
- */
-ol.Map.prototype.getOverlayContainer = function() {
-  return this.overlayContainer_;
-};
-
-
-/**
- * Get the element that serves as a container for overlays that don't allow
- * event propagation. Elements added to this container won't let mousedown and
- * touchstart events through to the map, so clicks and gestures on an overlay
- * don't trigger any {@link ol.MapBrowserEvent}.
- * @return {!Element} The map's overlay container that stops events.
- */
-ol.Map.prototype.getOverlayContainerStopEvent = function() {
-  return this.overlayContainerStopEvent_;
-};
-
-
-/**
- * @param {ol.Tile} tile Tile.
- * @param {string} tileSourceKey Tile source key.
- * @param {ol.Coordinate} tileCenter Tile center.
- * @param {number} tileResolution Tile resolution.
- * @return {number} Tile priority.
- */
-ol.Map.prototype.getTilePriority = function(tile, tileSourceKey, tileCenter, tileResolution) {
-  // Filter out tiles at higher zoom levels than the current zoom level, or that
-  // are outside the visible extent.
-  var frameState = this.frameState_;
-  if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {
-    return ol.structs.PriorityQueue.DROP;
-  }
-  if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {
-    return ol.structs.PriorityQueue.DROP;
-  }
-  // Prioritize the highest zoom level tiles closest to the focus.
-  // Tiles at higher zoom levels are prioritized using Math.log(tileResolution).
-  // Within a zoom level, tiles are prioritized by the distance in pixels
-  // between the center of the tile and the focus.  The factor of 65536 means
-  // that the prioritization should behave as desired for tiles up to
-  // 65536 * Math.log(2) = 45426 pixels from the focus.
-  var deltaX = tileCenter[0] - frameState.focus[0];
-  var deltaY = tileCenter[1] - frameState.focus[1];
-  return 65536 * Math.log(tileResolution) +
-      Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;
-};
-
-
-/**
- * @param {Event} browserEvent Browser event.
- * @param {string=} opt_type Type.
- */
-ol.Map.prototype.handleBrowserEvent = function(browserEvent, opt_type) {
-  var type = opt_type || browserEvent.type;
-  var mapBrowserEvent = new ol.MapBrowserEvent(type, this, browserEvent);
-  this.handleMapBrowserEvent(mapBrowserEvent);
-};
-
-
-/**
- * @param {ol.MapBrowserEvent} mapBrowserEvent The event to handle.
- */
-ol.Map.prototype.handleMapBrowserEvent = function(mapBrowserEvent) {
-  if (!this.frameState_) {
-    // With no view defined, we cannot translate pixels into geographical
-    // coordinates so interactions cannot be used.
-    return;
-  }
-  this.focus_ = mapBrowserEvent.coordinate;
-  mapBrowserEvent.frameState = this.frameState_;
-  var interactionsArray = this.getInteractions().getArray();
-  var i;
-  if (this.dispatchEvent(mapBrowserEvent) !== false) {
-    for (i = interactionsArray.length - 1; i >= 0; i--) {
-      var interaction = interactionsArray[i];
-      if (!interaction.getActive()) {
-        continue;
-      }
-      var cont = interaction.handleEvent(mapBrowserEvent);
-      if (!cont) {
-        break;
-      }
-    }
-  }
-};
-
-
-/**
- * @protected
- */
-ol.Map.prototype.handlePostRender = function() {
-
-  var frameState = this.frameState_;
-
-  // Manage the tile queue
-  // Image loads are expensive and a limited resource, so try to use them
-  // efficiently:
-  // * When the view is static we allow a large number of parallel tile loads
-  //   to complete the frame as quickly as possible.
-  // * When animating or interacting, image loads can cause janks, so we reduce
-  //   the maximum number of loads per frame and limit the number of parallel
-  //   tile loads to remain reactive to view changes and to reduce the chance of
-  //   loading tiles that will quickly disappear from view.
-  var tileQueue = this.tileQueue_;
-  if (!tileQueue.isEmpty()) {
-    var maxTotalLoading = 16;
-    var maxNewLoads = maxTotalLoading;
-    if (frameState) {
-      var hints = frameState.viewHints;
-      if (hints[ol.ViewHint.ANIMATING]) {
-        maxTotalLoading = this.loadTilesWhileAnimating_ ? 8 : 0;
-        maxNewLoads = 2;
-      }
-      if (hints[ol.ViewHint.INTERACTING]) {
-        maxTotalLoading = this.loadTilesWhileInteracting_ ? 8 : 0;
-        maxNewLoads = 2;
-      }
-    }
-    if (tileQueue.getTilesLoading() < maxTotalLoading) {
-      tileQueue.reprioritize(); // FIXME only call if view has changed
-      tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);
-    }
-  }
-
-  var postRenderFunctions = this.postRenderFunctions_;
-  var i, ii;
-  for (i = 0, ii = postRenderFunctions.length; i < ii; ++i) {
-    postRenderFunctions[i](this, frameState);
-  }
-  postRenderFunctions.length = 0;
-};
-
-
-/**
- * @private
- */
-ol.Map.prototype.handleSizeChanged_ = function() {
-  this.render();
-};
-
-
-/**
- * @private
- */
-ol.Map.prototype.handleTargetChanged_ = function() {
-  // target may be undefined, null, a string or an Element.
-  // If it's a string we convert it to an Element before proceeding.
-  // If it's not now an Element we remove the viewport from the DOM.
-  // If it's an Element we append the viewport element to it.
-
-  var targetElement;
-  if (this.getTarget()) {
-    targetElement = this.getTargetElement();
-  }
-
-  if (this.keyHandlerKeys_) {
-    for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {
-      ol.events.unlistenByKey(this.keyHandlerKeys_[i]);
-    }
-    this.keyHandlerKeys_ = null;
-  }
-
-  if (!targetElement) {
-    ol.dom.removeNode(this.viewport_);
-    if (this.handleResize_ !== undefined) {
-      window.removeEventListener(ol.events.EventType.RESIZE,
-          this.handleResize_, false);
-      this.handleResize_ = undefined;
-    }
-  } else {
-    targetElement.appendChild(this.viewport_);
-
-    var keyboardEventTarget = !this.keyboardEventTarget_ ?
-        targetElement : this.keyboardEventTarget_;
-    this.keyHandlerKeys_ = [
-      ol.events.listen(keyboardEventTarget, ol.events.EventType.KEYDOWN,
-          this.handleBrowserEvent, this),
-      ol.events.listen(keyboardEventTarget, ol.events.EventType.KEYPRESS,
-          this.handleBrowserEvent, this)
-    ];
-
-    if (!this.handleResize_) {
-      this.handleResize_ = this.updateSize.bind(this);
-      window.addEventListener(ol.events.EventType.RESIZE,
-          this.handleResize_, false);
-    }
-  }
-
-  this.updateSize();
-  // updateSize calls setSize, so no need to call this.render
-  // ourselves here.
-};
-
-
-/**
- * @private
- */
-ol.Map.prototype.handleTileChange_ = function() {
-  this.render();
-};
-
-
-/**
- * @private
- */
-ol.Map.prototype.handleViewPropertyChanged_ = function() {
-  this.render();
-};
-
-
-/**
- * @private
- */
-ol.Map.prototype.handleViewChanged_ = function() {
-  if (this.viewPropertyListenerKey_) {
-    ol.events.unlistenByKey(this.viewPropertyListenerKey_);
-    this.viewPropertyListenerKey_ = null;
-  }
-  if (this.viewChangeListenerKey_) {
-    ol.events.unlistenByKey(this.viewChangeListenerKey_);
-    this.viewChangeListenerKey_ = null;
-  }
-  var view = this.getView();
-  if (view) {
-    this.viewport_.setAttribute('data-view', ol.getUid(view));
-    this.viewPropertyListenerKey_ = ol.events.listen(
-        view, ol.ObjectEventType.PROPERTYCHANGE,
-        this.handleViewPropertyChanged_, this);
-    this.viewChangeListenerKey_ = ol.events.listen(
-        view, ol.events.EventType.CHANGE,
-        this.handleViewPropertyChanged_, this);
-  }
-  this.render();
-};
-
-
-/**
- * @private
- */
-ol.Map.prototype.handleLayerGroupChanged_ = function() {
-  if (this.layerGroupPropertyListenerKeys_) {
-    this.layerGroupPropertyListenerKeys_.forEach(ol.events.unlistenByKey);
-    this.layerGroupPropertyListenerKeys_ = null;
-  }
-  var layerGroup = this.getLayerGroup();
-  if (layerGroup) {
-    this.layerGroupPropertyListenerKeys_ = [
-      ol.events.listen(
-          layerGroup, ol.ObjectEventType.PROPERTYCHANGE,
-          this.render, this),
-      ol.events.listen(
-          layerGroup, ol.events.EventType.CHANGE,
-          this.render, this)
-    ];
-  }
-  this.render();
-};
-
-
-/**
- * @return {boolean} Is rendered.
- */
-ol.Map.prototype.isRendered = function() {
-  return !!this.frameState_;
-};
-
-
-/**
- * Requests an immediate render in a synchronous manner.
- * @api
- */
-ol.Map.prototype.renderSync = function() {
-  if (this.animationDelayKey_) {
-    cancelAnimationFrame(this.animationDelayKey_);
-  }
-  this.animationDelay_();
-};
-
-
-/**
- * Request a map rendering (at the next animation frame).
- * @api
- */
-ol.Map.prototype.render = function() {
-  if (this.animationDelayKey_ === undefined) {
-    this.animationDelayKey_ = requestAnimationFrame(
-        this.animationDelay_);
-  }
-};
-
-
-/**
- * Remove the given control from the map.
- * @param {ol.control.Control} control Control.
- * @return {ol.control.Control|undefined} The removed control (or undefined
- *     if the control was not found).
- * @api
- */
-ol.Map.prototype.removeControl = function(control) {
-  return this.getControls().remove(control);
-};
-
-
-/**
- * Remove the given interaction from the map.
- * @param {ol.interaction.Interaction} interaction Interaction to remove.
- * @return {ol.interaction.Interaction|undefined} The removed interaction (or
- *     undefined if the interaction was not found).
- * @api
- */
-ol.Map.prototype.removeInteraction = function(interaction) {
-  return this.getInteractions().remove(interaction);
-};
-
-
-/**
- * Removes the given layer from the map.
- * @param {ol.layer.Base} layer Layer.
- * @return {ol.layer.Base|undefined} The removed layer (or undefined if the
- *     layer was not found).
- * @api
- */
-ol.Map.prototype.removeLayer = function(layer) {
-  var layers = this.getLayerGroup().getLayers();
-  return layers.remove(layer);
-};
-
-
-/**
- * Remove the given overlay from the map.
- * @param {ol.Overlay} overlay Overlay.
- * @return {ol.Overlay|undefined} The removed overlay (or undefined
- *     if the overlay was not found).
- * @api
- */
-ol.Map.prototype.removeOverlay = function(overlay) {
-  return this.getOverlays().remove(overlay);
-};
-
-
-/**
- * @param {number} time Time.
- * @private
- */
-ol.Map.prototype.renderFrame_ = function(time) {
-  var i, ii, viewState;
-
-  var size = this.getSize();
-  var view = this.getView();
-  var extent = ol.extent.createEmpty();
-  var previousFrameState = this.frameState_;
-  /** @type {?olx.FrameState} */
-  var frameState = null;
-  if (size !== undefined && ol.size.hasArea(size) && view && view.isDef()) {
-    var viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined);
-    var layerStatesArray = this.getLayerGroup().getLayerStatesArray();
-    var layerStates = {};
-    for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {
-      layerStates[ol.getUid(layerStatesArray[i].layer)] = layerStatesArray[i];
-    }
-    viewState = view.getState();
-    frameState = /** @type {olx.FrameState} */ ({
-      animate: false,
-      attributions: {},
-      coordinateToPixelTransform: this.coordinateToPixelTransform_,
-      extent: extent,
-      focus: !this.focus_ ? viewState.center : this.focus_,
-      index: this.frameIndex_++,
-      layerStates: layerStates,
-      layerStatesArray: layerStatesArray,
-      logos: ol.obj.assign({}, this.logos_),
-      pixelRatio: this.pixelRatio_,
-      pixelToCoordinateTransform: this.pixelToCoordinateTransform_,
-      postRenderFunctions: [],
-      size: size,
-      skippedFeatureUids: this.skippedFeatureUids_,
-      tileQueue: this.tileQueue_,
-      time: time,
-      usedTiles: {},
-      viewState: viewState,
-      viewHints: viewHints,
-      wantedTiles: {}
-    });
-  }
-
-  if (frameState) {
-    frameState.extent = ol.extent.getForViewAndSize(viewState.center,
-        viewState.resolution, viewState.rotation, frameState.size, extent);
-  }
-
-  this.frameState_ = frameState;
-  this.renderer_.renderFrame(frameState);
-
-  if (frameState) {
-    if (frameState.animate) {
-      this.render();
-    }
-    Array.prototype.push.apply(
-        this.postRenderFunctions_, frameState.postRenderFunctions);
-
-    if (previousFrameState) {
-      var moveStart = !this.previousExtent_ ||
-          (!ol.extent.isEmpty(this.previousExtent_) &&
-          !ol.extent.equals(frameState.extent, this.previousExtent_));
-      if (moveStart) {
-        this.dispatchEvent(
-            new ol.MapEvent(ol.MapEventType.MOVESTART, this, previousFrameState));
-        this.previousExtent_ = ol.extent.createOrUpdateEmpty(this.previousExtent_);
-      }
-    }
-
-    var idle = this.previousExtent_ &&
-        !frameState.viewHints[ol.ViewHint.ANIMATING] &&
-        !frameState.viewHints[ol.ViewHint.INTERACTING] &&
-        !ol.extent.equals(frameState.extent, this.previousExtent_);
-
-    if (idle) {
-      this.dispatchEvent(
-          new ol.MapEvent(ol.MapEventType.MOVEEND, this, frameState));
-      ol.extent.clone(frameState.extent, this.previousExtent_);
-    }
-  }
-
-  this.dispatchEvent(
-      new ol.MapEvent(ol.MapEventType.POSTRENDER, this, frameState));
-
-  setTimeout(this.handlePostRender.bind(this), 0);
-
-};
-
-
-/**
- * Sets the layergroup of this map.
- * @param {ol.layer.Group} layerGroup A layer group containing the layers in
- *     this map.
- * @observable
- * @api
- */
-ol.Map.prototype.setLayerGroup = function(layerGroup) {
-  this.set(ol.MapProperty.LAYERGROUP, layerGroup);
-};
-
-
-/**
- * Set the size of this map.
- * @param {ol.Size|undefined} size The size in pixels of the map in the DOM.
- * @observable
- * @api
- */
-ol.Map.prototype.setSize = function(size) {
-  this.set(ol.MapProperty.SIZE, size);
-};
-
-
-/**
- * Set the target element to render this map into.
- * @param {Element|string|undefined} target The Element or id of the Element
- *     that the map is rendered in.
- * @observable
- * @api
- */
-ol.Map.prototype.setTarget = function(target) {
-  this.set(ol.MapProperty.TARGET, target);
-};
-
-
-/**
- * Set the view for this map.
- * @param {ol.View} view The view that controls this map.
- * @observable
- * @api
- */
-ol.Map.prototype.setView = function(view) {
-  this.set(ol.MapProperty.VIEW, view);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- */
-ol.Map.prototype.skipFeature = function(feature) {
-  var featureUid = ol.getUid(feature).toString();
-  this.skippedFeatureUids_[featureUid] = true;
-  this.render();
-};
-
-
-/**
- * Force a recalculation of the map viewport size.  This should be called when
- * third-party code changes the size of the map viewport.
- * @api
- */
-ol.Map.prototype.updateSize = function() {
-  var targetElement = this.getTargetElement();
-
-  if (!targetElement) {
-    this.setSize(undefined);
-  } else {
-    var computedStyle = getComputedStyle(targetElement);
-    this.setSize([
-      targetElement.offsetWidth -
-          parseFloat(computedStyle['borderLeftWidth']) -
-          parseFloat(computedStyle['paddingLeft']) -
-          parseFloat(computedStyle['paddingRight']) -
-          parseFloat(computedStyle['borderRightWidth']),
-      targetElement.offsetHeight -
-          parseFloat(computedStyle['borderTopWidth']) -
-          parseFloat(computedStyle['paddingTop']) -
-          parseFloat(computedStyle['paddingBottom']) -
-          parseFloat(computedStyle['borderBottomWidth'])
-    ]);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- */
-ol.Map.prototype.unskipFeature = function(feature) {
-  var featureUid = ol.getUid(feature).toString();
-  delete this.skippedFeatureUids_[featureUid];
-  this.render();
-};
-
-
-/**
- * @param {olx.MapOptions} options Map options.
- * @return {ol.MapOptionsInternal} Internal map options.
- */
-ol.Map.createOptionsInternal = function(options) {
-
-  /**
-   * @type {Element|Document}
-   */
-  var keyboardEventTarget = null;
-  if (options.keyboardEventTarget !== undefined) {
-    keyboardEventTarget = typeof options.keyboardEventTarget === 'string' ?
-        document.getElementById(options.keyboardEventTarget) :
-        options.keyboardEventTarget;
-  }
-
-  /**
-   * @type {Object.<string, *>}
-   */
-  var values = {};
-
-  var logos = {};
-  if (options.logo === undefined ||
-      (typeof options.logo === 'boolean' && options.logo)) {
-    logos[ol.OL_LOGO_URL] = ol.OL_URL;
-  } else {
-    var logo = options.logo;
-    if (typeof logo === 'string') {
-      logos[logo] = '';
-    } else if (logo instanceof HTMLElement) {
-      logos[ol.getUid(logo).toString()] = logo;
-    } else if (logo) {
-      ol.asserts.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string.
-      ol.asserts.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string.
-      logos[logo.src] = logo.href;
-    }
-  }
-
-  var layerGroup = (options.layers instanceof ol.layer.Group) ?
-      options.layers : new ol.layer.Group({layers: options.layers});
-  values[ol.MapProperty.LAYERGROUP] = layerGroup;
-
-  values[ol.MapProperty.TARGET] = options.target;
-
-  values[ol.MapProperty.VIEW] = options.view !== undefined ?
-      options.view : new ol.View();
-
-  /**
-   * @type {function(new: ol.renderer.Map, Element, ol.Map)}
-   */
-  var rendererConstructor = ol.renderer.Map;
-
-  /**
-   * @type {Array.<ol.renderer.Type>}
-   */
-  var rendererTypes;
-  if (options.renderer !== undefined) {
-    if (Array.isArray(options.renderer)) {
-      rendererTypes = options.renderer;
-    } else if (typeof options.renderer === 'string') {
-      rendererTypes = [options.renderer];
-    } else {
-      ol.asserts.assert(false, 46); // Incorrect format for `renderer` option
-    }
-    if (rendererTypes.indexOf(/** @type {ol.renderer.Type} */ ('dom')) >= 0) {
-      rendererTypes = rendererTypes.concat(ol.DEFAULT_RENDERER_TYPES);
-    }
-  } else {
-    rendererTypes = ol.DEFAULT_RENDERER_TYPES;
-  }
-
-  var i, ii;
-  for (i = 0, ii = rendererTypes.length; i < ii; ++i) {
-    /** @type {ol.renderer.Type} */
-    var rendererType = rendererTypes[i];
-    if (ol.ENABLE_CANVAS && rendererType == ol.renderer.Type.CANVAS) {
-      if (ol.has.CANVAS) {
-        rendererConstructor = ol.renderer.canvas.Map;
-        break;
-      }
-    } else if (ol.ENABLE_WEBGL && rendererType == ol.renderer.Type.WEBGL) {
-      if (ol.has.WEBGL) {
-        rendererConstructor = ol.renderer.webgl.Map;
-        break;
-      }
-    }
-  }
-
-  var controls;
-  if (options.controls !== undefined) {
-    if (Array.isArray(options.controls)) {
-      controls = new ol.Collection(options.controls.slice());
-    } else {
-      ol.asserts.assert(options.controls instanceof ol.Collection,
-          47); // Expected `controls` to be an array or an `ol.Collection`
-      controls = options.controls;
-    }
-  } else {
-    controls = ol.control.defaults();
-  }
-
-  var interactions;
-  if (options.interactions !== undefined) {
-    if (Array.isArray(options.interactions)) {
-      interactions = new ol.Collection(options.interactions.slice());
-    } else {
-      ol.asserts.assert(options.interactions instanceof ol.Collection,
-          48); // Expected `interactions` to be an array or an `ol.Collection`
-      interactions = options.interactions;
-    }
-  } else {
-    interactions = ol.interaction.defaults();
-  }
-
-  var overlays;
-  if (options.overlays !== undefined) {
-    if (Array.isArray(options.overlays)) {
-      overlays = new ol.Collection(options.overlays.slice());
-    } else {
-      ol.asserts.assert(options.overlays instanceof ol.Collection,
-          49); // Expected `overlays` to be an array or an `ol.Collection`
-      overlays = options.overlays;
-    }
-  } else {
-    overlays = new ol.Collection();
-  }
-
-  return {
-    controls: controls,
-    interactions: interactions,
-    keyboardEventTarget: keyboardEventTarget,
-    logos: logos,
-    overlays: overlays,
-    rendererConstructor: rendererConstructor,
-    values: values
-  };
-
-};
-
-goog.provide('ol.OverlayPositioning');
-
-/**
- * Overlay position: `'bottom-left'`, `'bottom-center'`,  `'bottom-right'`,
- * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,
- * `'top-center'`, `'top-right'`
- * @enum {string}
- */
-ol.OverlayPositioning = {
-  BOTTOM_LEFT: 'bottom-left',
-  BOTTOM_CENTER: 'bottom-center',
-  BOTTOM_RIGHT: 'bottom-right',
-  CENTER_LEFT: 'center-left',
-  CENTER_CENTER: 'center-center',
-  CENTER_RIGHT: 'center-right',
-  TOP_LEFT: 'top-left',
-  TOP_CENTER: 'top-center',
-  TOP_RIGHT: 'top-right'
-};
-
-goog.provide('ol.Overlay');
-
-goog.require('ol');
-goog.require('ol.MapEventType');
-goog.require('ol.Object');
-goog.require('ol.OverlayPositioning');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.extent');
-
-
-/**
- * @classdesc
- * An element to be displayed over the map and attached to a single map
- * location.  Like {@link ol.control.Control}, Overlays are visible widgets.
- * Unlike Controls, they are not in a fixed position on the screen, but are tied
- * to a geographical coordinate, so panning the map will move an Overlay but not
- * a Control.
- *
- * Example:
- *
- *     var popup = new ol.Overlay({
- *       element: document.getElementById('popup')
- *     });
- *     popup.setPosition(coordinate);
- *     map.addOverlay(popup);
- *
- * @constructor
- * @extends {ol.Object}
- * @param {olx.OverlayOptions} options Overlay options.
- * @api
- */
-ol.Overlay = function(options) {
-
-  ol.Object.call(this);
-
-  /**
-   * @private
-   * @type {number|string|undefined}
-   */
-  this.id_ = options.id;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.insertFirst_ = options.insertFirst !== undefined ?
-      options.insertFirst : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.stopEvent_ = options.stopEvent !== undefined ? options.stopEvent : true;
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.element_ = document.createElement('DIV');
-  this.element_.className = 'ol-overlay-container ' + ol.css.CLASS_SELECTABLE;
-  this.element_.style.position = 'absolute';
-
-  /**
-   * @protected
-   * @type {boolean}
-   */
-  this.autoPan = options.autoPan !== undefined ? options.autoPan : false;
-
-  /**
-   * @private
-   * @type {olx.OverlayPanOptions}
-   */
-  this.autoPanAnimation_ = options.autoPanAnimation ||
-      /** @type {olx.OverlayPanOptions} */ ({});
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.autoPanMargin_ = options.autoPanMargin !== undefined ?
-      options.autoPanMargin : 20;
-
-  /**
-   * @private
-   * @type {{bottom_: string,
-   *         left_: string,
-   *         right_: string,
-   *         top_: string,
-   *         visible: boolean}}
-   */
-  this.rendered_ = {
-    bottom_: '',
-    left_: '',
-    right_: '',
-    top_: '',
-    visible: true
-  };
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.mapPostrenderListenerKey_ = null;
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.Overlay.Property_.ELEMENT),
-      this.handleElementChanged, this);
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.Overlay.Property_.MAP),
-      this.handleMapChanged, this);
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.Overlay.Property_.OFFSET),
-      this.handleOffsetChanged, this);
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.Overlay.Property_.POSITION),
-      this.handlePositionChanged, this);
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.Overlay.Property_.POSITIONING),
-      this.handlePositioningChanged, this);
-
-  if (options.element !== undefined) {
-    this.setElement(options.element);
-  }
-
-  this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);
-
-  this.setPositioning(options.positioning !== undefined ?
-      /** @type {ol.OverlayPositioning} */ (options.positioning) :
-      ol.OverlayPositioning.TOP_LEFT);
-
-  if (options.position !== undefined) {
-    this.setPosition(options.position);
-  }
-
-};
-ol.inherits(ol.Overlay, ol.Object);
-
-
-/**
- * Get the DOM element of this overlay.
- * @return {Element|undefined} The Element containing the overlay.
- * @observable
- * @api
- */
-ol.Overlay.prototype.getElement = function() {
-  return /** @type {Element|undefined} */ (
-      this.get(ol.Overlay.Property_.ELEMENT));
-};
-
-
-/**
- * Get the overlay identifier which is set on constructor.
- * @return {number|string|undefined} Id.
- * @api
- */
-ol.Overlay.prototype.getId = function() {
-  return this.id_;
-};
-
-
-/**
- * Get the map associated with this overlay.
- * @return {ol.Map|undefined} The map that the overlay is part of.
- * @observable
- * @api
- */
-ol.Overlay.prototype.getMap = function() {
-  return /** @type {ol.Map|undefined} */ (
-      this.get(ol.Overlay.Property_.MAP));
-};
-
-
-/**
- * Get the offset of this overlay.
- * @return {Array.<number>} The offset.
- * @observable
- * @api
- */
-ol.Overlay.prototype.getOffset = function() {
-  return /** @type {Array.<number>} */ (
-      this.get(ol.Overlay.Property_.OFFSET));
-};
-
-
-/**
- * Get the current position of this overlay.
- * @return {ol.Coordinate|undefined} The spatial point that the overlay is
- *     anchored at.
- * @observable
- * @api
- */
-ol.Overlay.prototype.getPosition = function() {
-  return /** @type {ol.Coordinate|undefined} */ (
-      this.get(ol.Overlay.Property_.POSITION));
-};
-
-
-/**
- * Get the current positioning of this overlay.
- * @return {ol.OverlayPositioning} How the overlay is positioned
- *     relative to its point on the map.
- * @observable
- * @api
- */
-ol.Overlay.prototype.getPositioning = function() {
-  return /** @type {ol.OverlayPositioning} */ (
-      this.get(ol.Overlay.Property_.POSITIONING));
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.handleElementChanged = function() {
-  ol.dom.removeChildren(this.element_);
-  var element = this.getElement();
-  if (element) {
-    this.element_.appendChild(element);
-  }
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.handleMapChanged = function() {
-  if (this.mapPostrenderListenerKey_) {
-    ol.dom.removeNode(this.element_);
-    ol.events.unlistenByKey(this.mapPostrenderListenerKey_);
-    this.mapPostrenderListenerKey_ = null;
-  }
-  var map = this.getMap();
-  if (map) {
-    this.mapPostrenderListenerKey_ = ol.events.listen(map,
-        ol.MapEventType.POSTRENDER, this.render, this);
-    this.updatePixelPosition();
-    var container = this.stopEvent_ ?
-        map.getOverlayContainerStopEvent() : map.getOverlayContainer();
-    if (this.insertFirst_) {
-      container.insertBefore(this.element_, container.childNodes[0] || null);
-    } else {
-      container.appendChild(this.element_);
-    }
-  }
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.render = function() {
-  this.updatePixelPosition();
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.handleOffsetChanged = function() {
-  this.updatePixelPosition();
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.handlePositionChanged = function() {
-  this.updatePixelPosition();
-  if (this.get(ol.Overlay.Property_.POSITION) && this.autoPan) {
-    this.panIntoView_();
-  }
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.handlePositioningChanged = function() {
-  this.updatePixelPosition();
-};
-
-
-/**
- * Set the DOM element to be associated with this overlay.
- * @param {Element|undefined} element The Element containing the overlay.
- * @observable
- * @api
- */
-ol.Overlay.prototype.setElement = function(element) {
-  this.set(ol.Overlay.Property_.ELEMENT, element);
-};
-
-
-/**
- * Set the map to be associated with this overlay.
- * @param {ol.Map|undefined} map The map that the overlay is part of.
- * @observable
- * @api
- */
-ol.Overlay.prototype.setMap = function(map) {
-  this.set(ol.Overlay.Property_.MAP, map);
-};
-
-
-/**
- * Set the offset for this overlay.
- * @param {Array.<number>} offset Offset.
- * @observable
- * @api
- */
-ol.Overlay.prototype.setOffset = function(offset) {
-  this.set(ol.Overlay.Property_.OFFSET, offset);
-};
-
-
-/**
- * Set the position for this overlay. If the position is `undefined` the
- * overlay is hidden.
- * @param {ol.Coordinate|undefined} position The spatial point that the overlay
- *     is anchored at.
- * @observable
- * @api
- */
-ol.Overlay.prototype.setPosition = function(position) {
-  this.set(ol.Overlay.Property_.POSITION, position);
-};
-
-
-/**
- * Pan the map so that the overlay is entirely visible in the current viewport
- * (if necessary).
- * @private
- */
-ol.Overlay.prototype.panIntoView_ = function() {
-  var map = this.getMap();
-
-  if (!map || !map.getTargetElement()) {
-    return;
-  }
-
-  var mapRect = this.getRect_(map.getTargetElement(), map.getSize());
-  var element = /** @type {!Element} */ (this.getElement());
-  var overlayRect = this.getRect_(element,
-      [ol.dom.outerWidth(element), ol.dom.outerHeight(element)]);
-
-  var margin = this.autoPanMargin_;
-  if (!ol.extent.containsExtent(mapRect, overlayRect)) {
-    // the overlay is not completely inside the viewport, so pan the map
-    var offsetLeft = overlayRect[0] - mapRect[0];
-    var offsetRight = mapRect[2] - overlayRect[2];
-    var offsetTop = overlayRect[1] - mapRect[1];
-    var offsetBottom = mapRect[3] - overlayRect[3];
-
-    var delta = [0, 0];
-    if (offsetLeft < 0) {
-      // move map to the left
-      delta[0] = offsetLeft - margin;
-    } else if (offsetRight < 0) {
-      // move map to the right
-      delta[0] = Math.abs(offsetRight) + margin;
-    }
-    if (offsetTop < 0) {
-      // move map up
-      delta[1] = offsetTop - margin;
-    } else if (offsetBottom < 0) {
-      // move map down
-      delta[1] = Math.abs(offsetBottom) + margin;
-    }
-
-    if (delta[0] !== 0 || delta[1] !== 0) {
-      var center = /** @type {ol.Coordinate} */ (map.getView().getCenter());
-      var centerPx = map.getPixelFromCoordinate(center);
-      var newCenterPx = [
-        centerPx[0] + delta[0],
-        centerPx[1] + delta[1]
-      ];
-
-      map.getView().animate({
-        center: map.getCoordinateFromPixel(newCenterPx),
-        duration: this.autoPanAnimation_.duration,
-        easing: this.autoPanAnimation_.easing
-      });
-    }
-  }
-};
-
-
-/**
- * Get the extent of an element relative to the document
- * @param {Element|undefined} element The element.
- * @param {ol.Size|undefined} size The size of the element.
- * @return {ol.Extent} The extent.
- * @private
- */
-ol.Overlay.prototype.getRect_ = function(element, size) {
-  var box = element.getBoundingClientRect();
-  var offsetX = box.left + window.pageXOffset;
-  var offsetY = box.top + window.pageYOffset;
-  return [
-    offsetX,
-    offsetY,
-    offsetX + size[0],
-    offsetY + size[1]
-  ];
-};
-
-
-/**
- * Set the positioning for this overlay.
- * @param {ol.OverlayPositioning} positioning how the overlay is
- *     positioned relative to its point on the map.
- * @observable
- * @api
- */
-ol.Overlay.prototype.setPositioning = function(positioning) {
-  this.set(ol.Overlay.Property_.POSITIONING, positioning);
-};
-
-
-/**
- * Modify the visibility of the element.
- * @param {boolean} visible Element visibility.
- * @protected
- */
-ol.Overlay.prototype.setVisible = function(visible) {
-  if (this.rendered_.visible !== visible) {
-    this.element_.style.display = visible ? '' : 'none';
-    this.rendered_.visible = visible;
-  }
-};
-
-
-/**
- * Update pixel position.
- * @protected
- */
-ol.Overlay.prototype.updatePixelPosition = function() {
-  var map = this.getMap();
-  var position = this.getPosition();
-  if (!map || !map.isRendered() || !position) {
-    this.setVisible(false);
-    return;
-  }
-
-  var pixel = map.getPixelFromCoordinate(position);
-  var mapSize = map.getSize();
-  this.updateRenderedPosition(pixel, mapSize);
-};
-
-
-/**
- * @param {ol.Pixel} pixel The pixel location.
- * @param {ol.Size|undefined} mapSize The map size.
- * @protected
- */
-ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
-  var style = this.element_.style;
-  var offset = this.getOffset();
-
-  var positioning = this.getPositioning();
-
-  this.setVisible(true);
-
-  var offsetX = offset[0];
-  var offsetY = offset[1];
-  if (positioning == ol.OverlayPositioning.BOTTOM_RIGHT ||
-      positioning == ol.OverlayPositioning.CENTER_RIGHT ||
-      positioning == ol.OverlayPositioning.TOP_RIGHT) {
-    if (this.rendered_.left_ !== '') {
-      this.rendered_.left_ = style.left = '';
-    }
-    var right = Math.round(mapSize[0] - pixel[0] - offsetX) + 'px';
-    if (this.rendered_.right_ != right) {
-      this.rendered_.right_ = style.right = right;
-    }
-  } else {
-    if (this.rendered_.right_ !== '') {
-      this.rendered_.right_ = style.right = '';
-    }
-    if (positioning == ol.OverlayPositioning.BOTTOM_CENTER ||
-        positioning == ol.OverlayPositioning.CENTER_CENTER ||
-        positioning == ol.OverlayPositioning.TOP_CENTER) {
-      offsetX -= this.element_.offsetWidth / 2;
-    }
-    var left = Math.round(pixel[0] + offsetX) + 'px';
-    if (this.rendered_.left_ != left) {
-      this.rendered_.left_ = style.left = left;
-    }
-  }
-  if (positioning == ol.OverlayPositioning.BOTTOM_LEFT ||
-      positioning == ol.OverlayPositioning.BOTTOM_CENTER ||
-      positioning == ol.OverlayPositioning.BOTTOM_RIGHT) {
-    if (this.rendered_.top_ !== '') {
-      this.rendered_.top_ = style.top = '';
-    }
-    var bottom = Math.round(mapSize[1] - pixel[1] - offsetY) + 'px';
-    if (this.rendered_.bottom_ != bottom) {
-      this.rendered_.bottom_ = style.bottom = bottom;
-    }
-  } else {
-    if (this.rendered_.bottom_ !== '') {
-      this.rendered_.bottom_ = style.bottom = '';
-    }
-    if (positioning == ol.OverlayPositioning.CENTER_LEFT ||
-        positioning == ol.OverlayPositioning.CENTER_CENTER ||
-        positioning == ol.OverlayPositioning.CENTER_RIGHT) {
-      offsetY -= this.element_.offsetHeight / 2;
-    }
-    var top = Math.round(pixel[1] + offsetY) + 'px';
-    if (this.rendered_.top_ != top) {
-      this.rendered_.top_ = style.top = top;
-    }
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.Overlay.Property_ = {
-  ELEMENT: 'element',
-  MAP: 'map',
-  OFFSET: 'offset',
-  POSITION: 'position',
-  POSITIONING: 'positioning'
-};
-
-goog.provide('ol.control.OverviewMap');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.Map');
-goog.require('ol.MapEventType');
-goog.require('ol.MapProperty');
-goog.require('ol.Object');
-goog.require('ol.ObjectEventType');
-goog.require('ol.Overlay');
-goog.require('ol.OverlayPositioning');
-goog.require('ol.ViewProperty');
-goog.require('ol.control.Control');
-goog.require('ol.coordinate');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-
-
-/**
- * Create a new control with a map acting as an overview map for an other
- * defined map.
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.OverviewMapOptions=} opt_options OverviewMap options.
- * @api
- */
-ol.control.OverviewMap = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.collapsible_ = options.collapsible !== undefined ?
-      options.collapsible : true;
-
-  if (!this.collapsible_) {
-    this.collapsed_ = false;
-  }
-
-  var className = options.className !== undefined ? options.className : 'ol-overviewmap';
-
-  var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Overview map';
-
-  var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\u00AB';
-
-  if (typeof collapseLabel === 'string') {
-    /**
-     * @private
-     * @type {Node}
-     */
-    this.collapseLabel_ = document.createElement('span');
-    this.collapseLabel_.textContent = collapseLabel;
-  } else {
-    this.collapseLabel_ = collapseLabel;
-  }
-
-  var label = options.label !== undefined ? options.label : '\u00BB';
-
-
-  if (typeof label === 'string') {
-    /**
-     * @private
-     * @type {Node}
-     */
-    this.label_ = document.createElement('span');
-    this.label_.textContent = label;
-  } else {
-    this.label_ = label;
-  }
-
-  var activeLabel = (this.collapsible_ && !this.collapsed_) ?
-      this.collapseLabel_ : this.label_;
-  var button = document.createElement('button');
-  button.setAttribute('type', 'button');
-  button.title = tipLabel;
-  button.appendChild(activeLabel);
-
-  ol.events.listen(button, ol.events.EventType.CLICK,
-      this.handleClick_, this);
-
-  /**
-   * @type {Element}
-   * @private
-   */
-  this.ovmapDiv_ = document.createElement('DIV');
-  this.ovmapDiv_.className = 'ol-overviewmap-map';
-
-  /**
-   * @type {ol.Map}
-   * @private
-   */
-  this.ovmap_ = new ol.Map({
-    controls: new ol.Collection(),
-    interactions: new ol.Collection(),
-    view: options.view
-  });
-  var ovmap = this.ovmap_;
-
-  if (options.layers) {
-    options.layers.forEach(
-        /**
-       * @param {ol.layer.Layer} layer Layer.
-       */
-        function(layer) {
-          ovmap.addLayer(layer);
-        }, this);
-  }
-
-  var box = document.createElement('DIV');
-  box.className = 'ol-overviewmap-box';
-  box.style.boxSizing = 'border-box';
-
-  /**
-   * @type {ol.Overlay}
-   * @private
-   */
-  this.boxOverlay_ = new ol.Overlay({
-    position: [0, 0],
-    positioning: ol.OverlayPositioning.BOTTOM_LEFT,
-    element: box
-  });
-  this.ovmap_.addOverlay(this.boxOverlay_);
-
-  var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
-      ol.css.CLASS_CONTROL +
-      (this.collapsed_ && this.collapsible_ ? ' ol-collapsed' : '') +
-      (this.collapsible_ ? '' : ' ol-uncollapsible');
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(this.ovmapDiv_);
-  element.appendChild(button);
-
-  var render = options.render ? options.render : ol.control.OverviewMap.render;
-
-  ol.control.Control.call(this, {
-    element: element,
-    render: render,
-    target: options.target
-  });
-
-  /* Interactive map */
-
-  var scope = this;
-
-  var overlay = this.boxOverlay_;
-  var overlayBox = this.boxOverlay_.getElement();
-
-  /* Functions definition */
-
-  var computeDesiredMousePosition = function(mousePosition) {
-    return {
-      clientX: mousePosition.clientX - (overlayBox.offsetWidth / 2),
-      clientY: mousePosition.clientY + (overlayBox.offsetHeight / 2)
-    };
-  };
-
-  var move = function(event) {
-    var coordinates = ovmap.getEventCoordinate(computeDesiredMousePosition(event));
-
-    overlay.setPosition(coordinates);
-  };
-
-  var endMoving = function(event) {
-    var coordinates = ovmap.getEventCoordinate(event);
-
-    scope.getMap().getView().setCenter(coordinates);
-
-    window.removeEventListener('mousemove', move);
-    window.removeEventListener('mouseup', endMoving);
-  };
-
-  /* Binding */
-
-  overlayBox.addEventListener('mousedown', function() {
-    window.addEventListener('mousemove', move);
-    window.addEventListener('mouseup', endMoving);
-  });
-};
-ol.inherits(ol.control.OverviewMap, ol.control.Control);
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.control.OverviewMap.prototype.setMap = function(map) {
-  var oldMap = this.getMap();
-  if (map === oldMap) {
-    return;
-  }
-  if (oldMap) {
-    var oldView = oldMap.getView();
-    if (oldView) {
-      this.unbindView_(oldView);
-    }
-    this.ovmap_.setTarget(null);
-  }
-  ol.control.Control.prototype.setMap.call(this, map);
-
-  if (map) {
-    this.ovmap_.setTarget(this.ovmapDiv_);
-    this.listenerKeys.push(ol.events.listen(
-        map, ol.ObjectEventType.PROPERTYCHANGE,
-        this.handleMapPropertyChange_, this));
-
-    // TODO: to really support map switching, this would need to be reworked
-    if (this.ovmap_.getLayers().getLength() === 0) {
-      this.ovmap_.setLayerGroup(map.getLayerGroup());
-    }
-
-    var view = map.getView();
-    if (view) {
-      this.bindView_(view);
-      if (view.isDef()) {
-        this.ovmap_.updateSize();
-        this.resetExtent_();
-      }
-    }
-  }
-};
-
-
-/**
- * Handle map property changes.  This only deals with changes to the map's view.
- * @param {ol.Object.Event} event The propertychange event.
- * @private
- */
-ol.control.OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
-  if (event.key === ol.MapProperty.VIEW) {
-    var oldView = /** @type {ol.View} */ (event.oldValue);
-    if (oldView) {
-      this.unbindView_(oldView);
-    }
-    var newView = this.getMap().getView();
-    this.bindView_(newView);
-  }
-};
-
-
-/**
- * Register listeners for view property changes.
- * @param {ol.View} view The view.
- * @private
- */
-ol.control.OverviewMap.prototype.bindView_ = function(view) {
-  ol.events.listen(view,
-      ol.Object.getChangeEventType(ol.ViewProperty.ROTATION),
-      this.handleRotationChanged_, this);
-};
-
-
-/**
- * Unregister listeners for view property changes.
- * @param {ol.View} view The view.
- * @private
- */
-ol.control.OverviewMap.prototype.unbindView_ = function(view) {
-  ol.events.unlisten(view,
-      ol.Object.getChangeEventType(ol.ViewProperty.ROTATION),
-      this.handleRotationChanged_, this);
-};
-
-
-/**
- * Handle rotation changes to the main map.
- * TODO: This should rotate the extent rectrangle instead of the
- * overview map's view.
- * @private
- */
-ol.control.OverviewMap.prototype.handleRotationChanged_ = function() {
-  this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());
-};
-
-
-/**
- * Update the overview map element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.OverviewMap}
- * @api
- */
-ol.control.OverviewMap.render = function(mapEvent) {
-  this.validateExtent_();
-  this.updateBox_();
-};
-
-
-/**
- * Reset the overview map extent if the box size (width or
- * height) is less than the size of the overview map size times minRatio
- * or is greater than the size of the overview size times maxRatio.
- *
- * If the map extent was not reset, the box size can fits in the defined
- * ratio sizes. This method then checks if is contained inside the overview
- * map current extent. If not, recenter the overview map to the current
- * main map center location.
- * @private
- */
-ol.control.OverviewMap.prototype.validateExtent_ = function() {
-  var map = this.getMap();
-  var ovmap = this.ovmap_;
-
-  if (!map.isRendered() || !ovmap.isRendered()) {
-    return;
-  }
-
-  var mapSize = /** @type {ol.Size} */ (map.getSize());
-
-  var view = map.getView();
-  var extent = view.calculateExtent(mapSize);
-
-  var ovmapSize = /** @type {ol.Size} */ (ovmap.getSize());
-
-  var ovview = ovmap.getView();
-  var ovextent = ovview.calculateExtent(ovmapSize);
-
-  var topLeftPixel =
-      ovmap.getPixelFromCoordinate(ol.extent.getTopLeft(extent));
-  var bottomRightPixel =
-      ovmap.getPixelFromCoordinate(ol.extent.getBottomRight(extent));
-
-  var boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);
-  var boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);
-
-  var ovmapWidth = ovmapSize[0];
-  var ovmapHeight = ovmapSize[1];
-
-  if (boxWidth < ovmapWidth * ol.OVERVIEWMAP_MIN_RATIO ||
-      boxHeight < ovmapHeight * ol.OVERVIEWMAP_MIN_RATIO ||
-      boxWidth > ovmapWidth * ol.OVERVIEWMAP_MAX_RATIO ||
-      boxHeight > ovmapHeight * ol.OVERVIEWMAP_MAX_RATIO) {
-    this.resetExtent_();
-  } else if (!ol.extent.containsExtent(ovextent, extent)) {
-    this.recenter_();
-  }
-};
-
-
-/**
- * Reset the overview map extent to half calculated min and max ratio times
- * the extent of the main map.
- * @private
- */
-ol.control.OverviewMap.prototype.resetExtent_ = function() {
-  if (ol.OVERVIEWMAP_MAX_RATIO === 0 || ol.OVERVIEWMAP_MIN_RATIO === 0) {
-    return;
-  }
-
-  var map = this.getMap();
-  var ovmap = this.ovmap_;
-
-  var mapSize = /** @type {ol.Size} */ (map.getSize());
-
-  var view = map.getView();
-  var extent = view.calculateExtent(mapSize);
-
-  var ovview = ovmap.getView();
-
-  // get how many times the current map overview could hold different
-  // box sizes using the min and max ratio, pick the step in the middle used
-  // to calculate the extent from the main map to set it to the overview map,
-  var steps = Math.log(
-      ol.OVERVIEWMAP_MAX_RATIO / ol.OVERVIEWMAP_MIN_RATIO) / Math.LN2;
-  var ratio = 1 / (Math.pow(2, steps / 2) * ol.OVERVIEWMAP_MIN_RATIO);
-  ol.extent.scaleFromCenter(extent, ratio);
-  ovview.fit(extent);
-};
-
-
-/**
- * Set the center of the overview map to the map center without changing its
- * resolution.
- * @private
- */
-ol.control.OverviewMap.prototype.recenter_ = function() {
-  var map = this.getMap();
-  var ovmap = this.ovmap_;
-
-  var view = map.getView();
-
-  var ovview = ovmap.getView();
-
-  ovview.setCenter(view.getCenter());
-};
-
-
-/**
- * Update the box using the main map extent
- * @private
- */
-ol.control.OverviewMap.prototype.updateBox_ = function() {
-  var map = this.getMap();
-  var ovmap = this.ovmap_;
-
-  if (!map.isRendered() || !ovmap.isRendered()) {
-    return;
-  }
-
-  var mapSize = /** @type {ol.Size} */ (map.getSize());
-
-  var view = map.getView();
-
-  var ovview = ovmap.getView();
-
-  var rotation = view.getRotation();
-
-  var overlay = this.boxOverlay_;
-  var box = this.boxOverlay_.getElement();
-  var extent = view.calculateExtent(mapSize);
-  var ovresolution = ovview.getResolution();
-  var bottomLeft = ol.extent.getBottomLeft(extent);
-  var topRight = ol.extent.getTopRight(extent);
-
-  // set position using bottom left coordinates
-  var rotateBottomLeft = this.calculateCoordinateRotate_(rotation, bottomLeft);
-  overlay.setPosition(rotateBottomLeft);
-
-  // set box size calculated from map extent size and overview map resolution
-  if (box) {
-    box.style.width = Math.abs((bottomLeft[0] - topRight[0]) / ovresolution) + 'px';
-    box.style.height = Math.abs((topRight[1] - bottomLeft[1]) / ovresolution) + 'px';
-  }
-};
-
-
-/**
- * @param {number} rotation Target rotation.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @return {ol.Coordinate|undefined} Coordinate for rotation and center anchor.
- * @private
- */
-ol.control.OverviewMap.prototype.calculateCoordinateRotate_ = function(
-    rotation, coordinate) {
-  var coordinateRotate;
-
-  var map = this.getMap();
-  var view = map.getView();
-
-  var currentCenter = view.getCenter();
-
-  if (currentCenter) {
-    coordinateRotate = [
-      coordinate[0] - currentCenter[0],
-      coordinate[1] - currentCenter[1]
-    ];
-    ol.coordinate.rotate(coordinateRotate, rotation);
-    ol.coordinate.add(coordinateRotate, currentCenter);
-  }
-  return coordinateRotate;
-};
-
-
-/**
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.OverviewMap.prototype.handleClick_ = function(event) {
-  event.preventDefault();
-  this.handleToggle_();
-};
-
-
-/**
- * @private
- */
-ol.control.OverviewMap.prototype.handleToggle_ = function() {
-  this.element.classList.toggle('ol-collapsed');
-  if (this.collapsed_) {
-    ol.dom.replaceNode(this.collapseLabel_, this.label_);
-  } else {
-    ol.dom.replaceNode(this.label_, this.collapseLabel_);
-  }
-  this.collapsed_ = !this.collapsed_;
-
-  // manage overview map if it had not been rendered before and control
-  // is expanded
-  var ovmap = this.ovmap_;
-  if (!this.collapsed_ && !ovmap.isRendered()) {
-    ovmap.updateSize();
-    this.resetExtent_();
-    ol.events.listenOnce(ovmap, ol.MapEventType.POSTRENDER,
-        function(event) {
-          this.updateBox_();
-        },
-        this);
-  }
-};
-
-
-/**
- * Return `true` if the overview map is collapsible, `false` otherwise.
- * @return {boolean} True if the widget is collapsible.
- * @api
- */
-ol.control.OverviewMap.prototype.getCollapsible = function() {
-  return this.collapsible_;
-};
-
-
-/**
- * Set whether the overview map should be collapsible.
- * @param {boolean} collapsible True if the widget is collapsible.
- * @api
- */
-ol.control.OverviewMap.prototype.setCollapsible = function(collapsible) {
-  if (this.collapsible_ === collapsible) {
-    return;
-  }
-  this.collapsible_ = collapsible;
-  this.element.classList.toggle('ol-uncollapsible');
-  if (!collapsible && this.collapsed_) {
-    this.handleToggle_();
-  }
-};
-
-
-/**
- * Collapse or expand the overview map according to the passed parameter. Will
- * not do anything if the overview map isn't collapsible or if the current
- * collapsed state is already the one requested.
- * @param {boolean} collapsed True if the widget is collapsed.
- * @api
- */
-ol.control.OverviewMap.prototype.setCollapsed = function(collapsed) {
-  if (!this.collapsible_ || this.collapsed_ === collapsed) {
-    return;
-  }
-  this.handleToggle_();
-};
-
-
-/**
- * Determine if the overview map is collapsed.
- * @return {boolean} The overview map is collapsed.
- * @api
- */
-ol.control.OverviewMap.prototype.getCollapsed = function() {
-  return this.collapsed_;
-};
-
-
-/**
- * Return the overview map.
- * @return {ol.Map} Overview map.
- * @api
- */
-ol.control.OverviewMap.prototype.getOverviewMap = function() {
-  return this.ovmap_;
-};
-
-goog.provide('ol.control.ScaleLineUnits');
-
-/**
- * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,
- * `'nautical'`, `'metric'`, `'us'`.
- * @enum {string}
- */
-ol.control.ScaleLineUnits = {
-  DEGREES: 'degrees',
-  IMPERIAL: 'imperial',
-  NAUTICAL: 'nautical',
-  METRIC: 'metric',
-  US: 'us'
-};
-
-goog.provide('ol.control.ScaleLine');
-
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.asserts');
-goog.require('ol.control.Control');
-goog.require('ol.control.ScaleLineUnits');
-goog.require('ol.css');
-goog.require('ol.events');
-goog.require('ol.proj');
-goog.require('ol.proj.Units');
-
-
-/**
- * @classdesc
- * A control displaying rough y-axis distances, calculated for the center of the
- * viewport. For conformal projections (e.g. EPSG:3857, the default view
- * projection in OpenLayers), the scale is valid for all directions.
- * No scale line will be shown when the y-axis distance of a pixel at the
- * viewport center cannot be calculated in the view projection.
- * By default the scale line will show in the bottom left portion of the map,
- * but this can be changed by using the css selector `.ol-scale-line`.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.ScaleLineOptions=} opt_options Scale line options.
- * @api
- */
-ol.control.ScaleLine = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var className = options.className !== undefined ? options.className : 'ol-scale-line';
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.innerElement_ = document.createElement('DIV');
-  this.innerElement_.className = className + '-inner';
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.element_ = document.createElement('DIV');
-  this.element_.className = className + ' ' + ol.css.CLASS_UNSELECTABLE;
-  this.element_.appendChild(this.innerElement_);
-
-  /**
-   * @private
-   * @type {?olx.ViewState}
-   */
-  this.viewState_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderedVisible_ = false;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.renderedWidth_ = undefined;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.renderedHTML_ = '';
-
-  var render = options.render ? options.render : ol.control.ScaleLine.render;
-
-  ol.control.Control.call(this, {
-    element: this.element_,
-    render: render,
-    target: options.target
-  });
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.control.ScaleLine.Property_.UNITS),
-      this.handleUnitsChanged_, this);
-
-  this.setUnits(/** @type {ol.control.ScaleLineUnits} */ (options.units) ||
-      ol.control.ScaleLineUnits.METRIC);
-
-};
-ol.inherits(ol.control.ScaleLine, ol.control.Control);
-
-
-/**
- * @const
- * @type {Array.<number>}
- */
-ol.control.ScaleLine.LEADING_DIGITS = [1, 2, 5];
-
-
-/**
- * Return the units to use in the scale line.
- * @return {ol.control.ScaleLineUnits|undefined} The units to use in the scale
- *     line.
- * @observable
- * @api
- */
-ol.control.ScaleLine.prototype.getUnits = function() {
-  return /** @type {ol.control.ScaleLineUnits|undefined} */ (
-      this.get(ol.control.ScaleLine.Property_.UNITS));
-};
-
-
-/**
- * Update the scale line element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.ScaleLine}
- * @api
- */
-ol.control.ScaleLine.render = function(mapEvent) {
-  var frameState = mapEvent.frameState;
-  if (!frameState) {
-    this.viewState_ = null;
-  } else {
-    this.viewState_ = frameState.viewState;
-  }
-  this.updateElement_();
-};
-
-
-/**
- * @private
- */
-ol.control.ScaleLine.prototype.handleUnitsChanged_ = function() {
-  this.updateElement_();
-};
-
-
-/**
- * Set the units to use in the scale line.
- * @param {ol.control.ScaleLineUnits} units The units to use in the scale line.
- * @observable
- * @api
- */
-ol.control.ScaleLine.prototype.setUnits = function(units) {
-  this.set(ol.control.ScaleLine.Property_.UNITS, units);
-};
-
-
-/**
- * @private
- */
-ol.control.ScaleLine.prototype.updateElement_ = function() {
-  var viewState = this.viewState_;
-
-  if (!viewState) {
-    if (this.renderedVisible_) {
-      this.element_.style.display = 'none';
-      this.renderedVisible_ = false;
-    }
-    return;
-  }
-
-  var center = viewState.center;
-  var projection = viewState.projection;
-  var metersPerUnit = projection.getMetersPerUnit();
-  var pointResolution =
-      ol.proj.getPointResolution(projection, viewState.resolution, center) *
-      metersPerUnit;
-
-  var nominalCount = this.minWidth_ * pointResolution;
-  var suffix = '';
-  var units = this.getUnits();
-  if (units == ol.control.ScaleLineUnits.DEGREES) {
-    var metersPerDegree = ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES];
-    pointResolution /= metersPerDegree;
-    if (nominalCount < metersPerDegree / 60) {
-      suffix = '\u2033'; // seconds
-      pointResolution *= 3600;
-    } else if (nominalCount < metersPerDegree) {
-      suffix = '\u2032'; // minutes
-      pointResolution *= 60;
-    } else {
-      suffix = '\u00b0'; // degrees
-    }
-  } else if (units == ol.control.ScaleLineUnits.IMPERIAL) {
-    if (nominalCount < 0.9144) {
-      suffix = 'in';
-      pointResolution /= 0.0254;
-    } else if (nominalCount < 1609.344) {
-      suffix = 'ft';
-      pointResolution /= 0.3048;
-    } else {
-      suffix = 'mi';
-      pointResolution /= 1609.344;
-    }
-  } else if (units == ol.control.ScaleLineUnits.NAUTICAL) {
-    pointResolution /= 1852;
-    suffix = 'nm';
-  } else if (units == ol.control.ScaleLineUnits.METRIC) {
-    if (nominalCount < 0.001) {
-      suffix = 'μm';
-      pointResolution *= 1000000;
-    } else if (nominalCount < 1) {
-      suffix = 'mm';
-      pointResolution *= 1000;
-    } else if (nominalCount < 1000) {
-      suffix = 'm';
-    } else {
-      suffix = 'km';
-      pointResolution /= 1000;
-    }
-  } else if (units == ol.control.ScaleLineUnits.US) {
-    if (nominalCount < 0.9144) {
-      suffix = 'in';
-      pointResolution *= 39.37;
-    } else if (nominalCount < 1609.344) {
-      suffix = 'ft';
-      pointResolution /= 0.30480061;
-    } else {
-      suffix = 'mi';
-      pointResolution /= 1609.3472;
-    }
-  } else {
-    ol.asserts.assert(false, 33); // Invalid units
-  }
-
-  var i = 3 * Math.floor(
-      Math.log(this.minWidth_ * pointResolution) / Math.log(10));
-  var count, width;
-  while (true) {
-    count = ol.control.ScaleLine.LEADING_DIGITS[((i % 3) + 3) % 3] *
-        Math.pow(10, Math.floor(i / 3));
-    width = Math.round(count / pointResolution);
-    if (isNaN(width)) {
-      this.element_.style.display = 'none';
-      this.renderedVisible_ = false;
-      return;
-    } else if (width >= this.minWidth_) {
-      break;
-    }
-    ++i;
-  }
-
-  var html = count + ' ' + suffix;
-  if (this.renderedHTML_ != html) {
-    this.innerElement_.innerHTML = html;
-    this.renderedHTML_ = html;
-  }
-
-  if (this.renderedWidth_ != width) {
-    this.innerElement_.style.width = width + 'px';
-    this.renderedWidth_ = width;
-  }
-
-  if (!this.renderedVisible_) {
-    this.element_.style.display = '';
-    this.renderedVisible_ = true;
-  }
-
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.control.ScaleLine.Property_ = {
-  UNITS: 'units'
-};
-
-// FIXME should possibly show tooltip when dragging?
-
-goog.provide('ol.control.ZoomSlider');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-goog.require('ol.easing');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.math');
-goog.require('ol.pointer.EventType');
-goog.require('ol.pointer.PointerEventHandler');
-
-
-/**
- * @classdesc
- * A slider type of control for zooming.
- *
- * Example:
- *
- *     map.addControl(new ol.control.ZoomSlider());
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.ZoomSliderOptions=} opt_options Zoom slider options.
- * @api
- */
-ol.control.ZoomSlider = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * Will hold the current resolution of the view.
-   *
-   * @type {number|undefined}
-   * @private
-   */
-  this.currentResolution_ = undefined;
-
-  /**
-   * The direction of the slider. Will be determined from actual display of the
-   * container and defaults to ol.control.ZoomSlider.Direction_.VERTICAL.
-   *
-   * @type {ol.control.ZoomSlider.Direction_}
-   * @private
-   */
-  this.direction_ = ol.control.ZoomSlider.Direction_.VERTICAL;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.dragging_;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.heightLimit_ = 0;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.widthLimit_ = 0;
-
-  /**
-   * @type {number|undefined}
-   * @private
-   */
-  this.previousX_;
-
-  /**
-   * @type {number|undefined}
-   * @private
-   */
-  this.previousY_;
-
-  /**
-   * The calculated thumb size (border box plus margins).  Set when initSlider_
-   * is called.
-   * @type {ol.Size}
-   * @private
-   */
-  this.thumbSize_ = null;
-
-  /**
-   * Whether the slider is initialized.
-   * @type {boolean}
-   * @private
-   */
-  this.sliderInitialized_ = false;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 200;
-
-  var className = options.className !== undefined ? options.className : 'ol-zoomslider';
-  var thumbElement = document.createElement('button');
-  thumbElement.setAttribute('type', 'button');
-  thumbElement.className = className + '-thumb ' + ol.css.CLASS_UNSELECTABLE;
-  var containerElement = document.createElement('div');
-  containerElement.className = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' + ol.css.CLASS_CONTROL;
-  containerElement.appendChild(thumbElement);
-  /**
-   * @type {ol.pointer.PointerEventHandler}
-   * @private
-   */
-  this.dragger_ = new ol.pointer.PointerEventHandler(containerElement);
-
-  ol.events.listen(this.dragger_, ol.pointer.EventType.POINTERDOWN,
-      this.handleDraggerStart_, this);
-  ol.events.listen(this.dragger_, ol.pointer.EventType.POINTERMOVE,
-      this.handleDraggerDrag_, this);
-  ol.events.listen(this.dragger_, ol.pointer.EventType.POINTERUP,
-      this.handleDraggerEnd_, this);
-
-  ol.events.listen(containerElement, ol.events.EventType.CLICK,
-      this.handleContainerClick_, this);
-  ol.events.listen(thumbElement, ol.events.EventType.CLICK,
-      ol.events.Event.stopPropagation);
-
-  var render = options.render ? options.render : ol.control.ZoomSlider.render;
-
-  ol.control.Control.call(this, {
-    element: containerElement,
-    render: render
-  });
-};
-ol.inherits(ol.control.ZoomSlider, ol.control.Control);
-
-
-/**
- * @inheritDoc
- */
-ol.control.ZoomSlider.prototype.disposeInternal = function() {
-  this.dragger_.dispose();
-  ol.control.Control.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * The enum for available directions.
- *
- * @enum {number}
- * @private
- */
-ol.control.ZoomSlider.Direction_ = {
-  VERTICAL: 0,
-  HORIZONTAL: 1
-};
-
-
-/**
- * @inheritDoc
- */
-ol.control.ZoomSlider.prototype.setMap = function(map) {
-  ol.control.Control.prototype.setMap.call(this, map);
-  if (map) {
-    map.render();
-  }
-};
-
-
-/**
- * Initializes the slider element. This will determine and set this controls
- * direction_ and also constrain the dragging of the thumb to always be within
- * the bounds of the container.
- *
- * @private
- */
-ol.control.ZoomSlider.prototype.initSlider_ = function() {
-  var container = this.element;
-  var containerSize = {
-    width: container.offsetWidth, height: container.offsetHeight
-  };
-
-  var thumb = container.firstElementChild;
-  var computedStyle = getComputedStyle(thumb);
-  var thumbWidth = thumb.offsetWidth +
-      parseFloat(computedStyle['marginRight']) +
-      parseFloat(computedStyle['marginLeft']);
-  var thumbHeight = thumb.offsetHeight +
-      parseFloat(computedStyle['marginTop']) +
-      parseFloat(computedStyle['marginBottom']);
-  this.thumbSize_ = [thumbWidth, thumbHeight];
-
-  if (containerSize.width > containerSize.height) {
-    this.direction_ = ol.control.ZoomSlider.Direction_.HORIZONTAL;
-    this.widthLimit_ = containerSize.width - thumbWidth;
-  } else {
-    this.direction_ = ol.control.ZoomSlider.Direction_.VERTICAL;
-    this.heightLimit_ = containerSize.height - thumbHeight;
-  }
-  this.sliderInitialized_ = true;
-};
-
-
-/**
- * Update the zoomslider element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.ZoomSlider}
- * @api
- */
-ol.control.ZoomSlider.render = function(mapEvent) {
-  if (!mapEvent.frameState) {
-    return;
-  }
-  if (!this.sliderInitialized_) {
-    this.initSlider_();
-  }
-  var res = mapEvent.frameState.viewState.resolution;
-  if (res !== this.currentResolution_) {
-    this.currentResolution_ = res;
-    this.setThumbPosition_(res);
-  }
-};
-
-
-/**
- * @param {Event} event The browser event to handle.
- * @private
- */
-ol.control.ZoomSlider.prototype.handleContainerClick_ = function(event) {
-  var view = this.getMap().getView();
-
-  var relativePosition = this.getRelativePosition_(
-      event.offsetX - this.thumbSize_[0] / 2,
-      event.offsetY - this.thumbSize_[1] / 2);
-
-  var resolution = this.getResolutionForPosition_(relativePosition);
-
-  view.animate({
-    resolution: view.constrainResolution(resolution),
-    duration: this.duration_,
-    easing: ol.easing.easeOut
-  });
-};
-
-
-/**
- * Handle dragger start events.
- * @param {ol.pointer.PointerEvent} event The drag event.
- * @private
- */
-ol.control.ZoomSlider.prototype.handleDraggerStart_ = function(event) {
-  if (!this.dragging_ && event.originalEvent.target === this.element.firstElementChild) {
-    this.getMap().getView().setHint(ol.ViewHint.INTERACTING, 1);
-    this.previousX_ = event.clientX;
-    this.previousY_ = event.clientY;
-    this.dragging_ = true;
-  }
-};
-
-
-/**
- * Handle dragger drag events.
- *
- * @param {ol.pointer.PointerEvent|Event} event The drag event.
- * @private
- */
-ol.control.ZoomSlider.prototype.handleDraggerDrag_ = function(event) {
-  if (this.dragging_) {
-    var element = this.element.firstElementChild;
-    var deltaX = event.clientX - this.previousX_ + parseInt(element.style.left, 10);
-    var deltaY = event.clientY - this.previousY_ + parseInt(element.style.top, 10);
-    var relativePosition = this.getRelativePosition_(deltaX, deltaY);
-    this.currentResolution_ = this.getResolutionForPosition_(relativePosition);
-    this.getMap().getView().setResolution(this.currentResolution_);
-    this.setThumbPosition_(this.currentResolution_);
-    this.previousX_ = event.clientX;
-    this.previousY_ = event.clientY;
-  }
-};
-
-
-/**
- * Handle dragger end events.
- * @param {ol.pointer.PointerEvent|Event} event The drag event.
- * @private
- */
-ol.control.ZoomSlider.prototype.handleDraggerEnd_ = function(event) {
-  if (this.dragging_) {
-    var view = this.getMap().getView();
-    view.setHint(ol.ViewHint.INTERACTING, -1);
-
-    view.animate({
-      resolution: view.constrainResolution(this.currentResolution_),
-      duration: this.duration_,
-      easing: ol.easing.easeOut
-    });
-
-    this.dragging_ = false;
-    this.previousX_ = undefined;
-    this.previousY_ = undefined;
-  }
-};
-
-
-/**
- * Positions the thumb inside its container according to the given resolution.
- *
- * @param {number} res The res.
- * @private
- */
-ol.control.ZoomSlider.prototype.setThumbPosition_ = function(res) {
-  var position = this.getPositionForResolution_(res);
-  var thumb = this.element.firstElementChild;
-
-  if (this.direction_ == ol.control.ZoomSlider.Direction_.HORIZONTAL) {
-    thumb.style.left = this.widthLimit_ * position + 'px';
-  } else {
-    thumb.style.top = this.heightLimit_ * position + 'px';
-  }
-};
-
-
-/**
- * Calculates the relative position of the thumb given x and y offsets.  The
- * relative position scales from 0 to 1.  The x and y offsets are assumed to be
- * in pixel units within the dragger limits.
- *
- * @param {number} x Pixel position relative to the left of the slider.
- * @param {number} y Pixel position relative to the top of the slider.
- * @return {number} The relative position of the thumb.
- * @private
- */
-ol.control.ZoomSlider.prototype.getRelativePosition_ = function(x, y) {
-  var amount;
-  if (this.direction_ === ol.control.ZoomSlider.Direction_.HORIZONTAL) {
-    amount = x / this.widthLimit_;
-  } else {
-    amount = y / this.heightLimit_;
-  }
-  return ol.math.clamp(amount, 0, 1);
-};
-
-
-/**
- * Calculates the corresponding resolution of the thumb given its relative
- * position (where 0 is the minimum and 1 is the maximum).
- *
- * @param {number} position The relative position of the thumb.
- * @return {number} The corresponding resolution.
- * @private
- */
-ol.control.ZoomSlider.prototype.getResolutionForPosition_ = function(position) {
-  var fn = this.getMap().getView().getResolutionForValueFunction();
-  return fn(1 - position);
-};
-
-
-/**
- * Determines the relative position of the slider for the given resolution.  A
- * relative position of 0 corresponds to the minimum view resolution.  A
- * relative position of 1 corresponds to the maximum view resolution.
- *
- * @param {number} res The resolution.
- * @return {number} The relative position value (between 0 and 1).
- * @private
- */
-ol.control.ZoomSlider.prototype.getPositionForResolution_ = function(res) {
-  var fn = this.getMap().getView().getValueForResolutionFunction();
-  return 1 - fn(res);
-};
-
-goog.provide('ol.control.ZoomToExtent');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-
-
-/**
- * @classdesc
- * A button control which, when pressed, changes the map view to a specific
- * extent. To style this control use the css selector `.ol-zoom-extent`.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.ZoomToExtentOptions=} opt_options Options.
- * @api
- */
-ol.control.ZoomToExtent = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {ol.Extent}
-   * @private
-   */
-  this.extent_ = options.extent ? options.extent : null;
-
-  var className = options.className !== undefined ? options.className :
-      'ol-zoom-extent';
-
-  var label = options.label !== undefined ? options.label : 'E';
-  var tipLabel = options.tipLabel !== undefined ?
-      options.tipLabel : 'Fit to extent';
-  var button = document.createElement('button');
-  button.setAttribute('type', 'button');
-  button.title = tipLabel;
-  button.appendChild(
-    typeof label === 'string' ? document.createTextNode(label) : label
-  );
-
-  ol.events.listen(button, ol.events.EventType.CLICK,
-      this.handleClick_, this);
-
-  var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
-      ol.css.CLASS_CONTROL;
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(button);
-
-  ol.control.Control.call(this, {
-    element: element,
-    target: options.target
-  });
-};
-ol.inherits(ol.control.ZoomToExtent, ol.control.Control);
-
-
-/**
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.ZoomToExtent.prototype.handleClick_ = function(event) {
-  event.preventDefault();
-  this.handleZoomToExtent_();
-};
-
-
-/**
- * @private
- */
-ol.control.ZoomToExtent.prototype.handleZoomToExtent_ = function() {
-  var map = this.getMap();
-  var view = map.getView();
-  var extent = !this.extent_ ? view.getProjection().getExtent() : this.extent_;
-  view.fit(extent);
-};
-
-goog.provide('ol.DeviceOrientation');
-
-goog.require('ol.events');
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.has');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * The ol.DeviceOrientation class provides access to information from
- * DeviceOrientation events.  See the [HTML 5 DeviceOrientation Specification](
- * http://www.w3.org/TR/orientation-event/) for more details.
- *
- * Many new computers, and especially mobile phones
- * and tablets, provide hardware support for device orientation. Web
- * developers targeting mobile devices will be especially interested in this
- * class.
- *
- * Device orientation data are relative to a common starting point. For mobile
- * devices, the starting point is to lay your phone face up on a table with the
- * top of the phone pointing north. This represents the zero state. All
- * angles are then relative to this state. For computers, it is the same except
- * the screen is open at 90 degrees.
- *
- * Device orientation is reported as three angles - `alpha`, `beta`, and
- * `gamma` - relative to the starting position along the three planar axes X, Y
- * and Z. The X axis runs from the left edge to the right edge through the
- * middle of the device. Similarly, the Y axis runs from the bottom to the top
- * of the device through the middle. The Z axis runs from the back to the front
- * through the middle. In the starting position, the X axis points to the
- * right, the Y axis points away from you and the Z axis points straight up
- * from the device lying flat.
- *
- * The three angles representing the device orientation are relative to the
- * three axes. `alpha` indicates how much the device has been rotated around the
- * Z axis, which is commonly interpreted as the compass heading (see note
- * below). `beta` indicates how much the device has been rotated around the X
- * axis, or how much it is tilted from front to back.  `gamma` indicates how
- * much the device has been rotated around the Y axis, or how much it is tilted
- * from left to right.
- *
- * For most browsers, the `alpha` value returns the compass heading so if the
- * device points north, it will be 0.  With Safari on iOS, the 0 value of
- * `alpha` is calculated from when device orientation was first requested.
- * ol.DeviceOrientation provides the `heading` property which normalizes this
- * behavior across all browsers for you.
- *
- * It is important to note that the HTML 5 DeviceOrientation specification
- * indicates that `alpha`, `beta` and `gamma` are in degrees while the
- * equivalent properties in ol.DeviceOrientation are in radians for consistency
- * with all other uses of angles throughout OpenLayers.
- *
- * To get notified of device orientation changes, register a listener for the
- * generic `change` event on your `ol.DeviceOrientation` instance.
- *
- * @see {@link http://www.w3.org/TR/orientation-event/}
- *
- * @constructor
- * @extends {ol.Object}
- * @param {olx.DeviceOrientationOptions=} opt_options Options.
- * @api
- */
-ol.DeviceOrientation = function(opt_options) {
-
-  ol.Object.call(this);
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.listenerKey_ = null;
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.DeviceOrientation.Property_.TRACKING),
-      this.handleTrackingChanged_, this);
-
-  this.setTracking(options.tracking !== undefined ? options.tracking : false);
-
-};
-ol.inherits(ol.DeviceOrientation, ol.Object);
-
-
-/**
- * @inheritDoc
- */
-ol.DeviceOrientation.prototype.disposeInternal = function() {
-  this.setTracking(false);
-  ol.Object.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @private
- * @param {Event} originalEvent Event.
- */
-ol.DeviceOrientation.prototype.orientationChange_ = function(originalEvent) {
-  var event = /** @type {DeviceOrientationEvent} */ (originalEvent);
-  if (event.alpha !== null) {
-    var alpha = ol.math.toRadians(event.alpha);
-    this.set(ol.DeviceOrientation.Property_.ALPHA, alpha);
-    // event.absolute is undefined in iOS.
-    if (typeof event.absolute === 'boolean' && event.absolute) {
-      this.set(ol.DeviceOrientation.Property_.HEADING, alpha);
-    } else if (typeof event.webkitCompassHeading === 'number' &&
-               event.webkitCompassAccuracy != -1) {
-      var heading = ol.math.toRadians(event.webkitCompassHeading);
-      this.set(ol.DeviceOrientation.Property_.HEADING, heading);
-    }
-  }
-  if (event.beta !== null) {
-    this.set(ol.DeviceOrientation.Property_.BETA,
-        ol.math.toRadians(event.beta));
-  }
-  if (event.gamma !== null) {
-    this.set(ol.DeviceOrientation.Property_.GAMMA,
-        ol.math.toRadians(event.gamma));
-  }
-  this.changed();
-};
-
-
-/**
- * Rotation around the device z-axis (in radians).
- * @return {number|undefined} The euler angle in radians of the device from the
- *     standard Z axis.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.getAlpha = function() {
-  return /** @type {number|undefined} */ (
-      this.get(ol.DeviceOrientation.Property_.ALPHA));
-};
-
-
-/**
- * Rotation around the device x-axis (in radians).
- * @return {number|undefined} The euler angle in radians of the device from the
- *     planar X axis.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.getBeta = function() {
-  return /** @type {number|undefined} */ (
-      this.get(ol.DeviceOrientation.Property_.BETA));
-};
-
-
-/**
- * Rotation around the device y-axis (in radians).
- * @return {number|undefined} The euler angle in radians of the device from the
- *     planar Y axis.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.getGamma = function() {
-  return /** @type {number|undefined} */ (
-      this.get(ol.DeviceOrientation.Property_.GAMMA));
-};
-
-
-/**
- * The heading of the device relative to north (in radians).
- * @return {number|undefined} The heading of the device relative to north, in
- *     radians, normalizing for different browser behavior.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.getHeading = function() {
-  return /** @type {number|undefined} */ (
-      this.get(ol.DeviceOrientation.Property_.HEADING));
-};
-
-
-/**
- * Determine if orientation is being tracked.
- * @return {boolean} Changes in device orientation are being tracked.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.getTracking = function() {
-  return /** @type {boolean} */ (
-      this.get(ol.DeviceOrientation.Property_.TRACKING));
-};
-
-
-/**
- * @private
- */
-ol.DeviceOrientation.prototype.handleTrackingChanged_ = function() {
-  if (ol.has.DEVICE_ORIENTATION) {
-    var tracking = this.getTracking();
-    if (tracking && !this.listenerKey_) {
-      this.listenerKey_ = ol.events.listen(window, 'deviceorientation',
-          this.orientationChange_, this);
-    } else if (!tracking && this.listenerKey_ !== null) {
-      ol.events.unlistenByKey(this.listenerKey_);
-      this.listenerKey_ = null;
-    }
-  }
-};
-
-
-/**
- * Enable or disable tracking of device orientation events.
- * @param {boolean} tracking The status of tracking changes to alpha, beta and
- *     gamma. If true, changes are tracked and reported immediately.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.setTracking = function(tracking) {
-  this.set(ol.DeviceOrientation.Property_.TRACKING, tracking);
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.DeviceOrientation.Property_ = {
-  ALPHA: 'alpha',
-  BETA: 'beta',
-  GAMMA: 'gamma',
-  HEADING: 'heading',
-  TRACKING: 'tracking'
-};
-
-goog.provide('ol.ImageState');
-
-/**
- * @enum {number}
- */
-ol.ImageState = {
-  IDLE: 0,
-  LOADING: 1,
-  LOADED: 2,
-  ERROR: 3
-};
-
-goog.provide('ol.style.Image');
-
-
-/**
- * @classdesc
- * A base class used for creating subclasses and not instantiated in
- * apps. Base class for {@link ol.style.Icon}, {@link ol.style.Circle} and
- * {@link ol.style.RegularShape}.
- *
- * @constructor
- * @abstract
- * @param {ol.StyleImageOptions} options Options.
- * @api
- */
-ol.style.Image = function(options) {
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.opacity_ = options.opacity;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.rotateWithView_ = options.rotateWithView;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.rotation_ = options.rotation;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.scale_ = options.scale;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.snapToPixel_ = options.snapToPixel;
-
-};
-
-
-/**
- * Get the symbolizer opacity.
- * @return {number} Opacity.
- * @api
- */
-ol.style.Image.prototype.getOpacity = function() {
-  return this.opacity_;
-};
-
-
-/**
- * Determine whether the symbolizer rotates with the map.
- * @return {boolean} Rotate with map.
- * @api
- */
-ol.style.Image.prototype.getRotateWithView = function() {
-  return this.rotateWithView_;
-};
-
-
-/**
- * Get the symoblizer rotation.
- * @return {number} Rotation.
- * @api
- */
-ol.style.Image.prototype.getRotation = function() {
-  return this.rotation_;
-};
-
-
-/**
- * Get the symbolizer scale.
- * @return {number} Scale.
- * @api
- */
-ol.style.Image.prototype.getScale = function() {
-  return this.scale_;
-};
-
-
-/**
- * Determine whether the symbolizer should be snapped to a pixel.
- * @return {boolean} The symbolizer should snap to a pixel.
- * @api
- */
-ol.style.Image.prototype.getSnapToPixel = function() {
-  return this.snapToPixel_;
-};
-
-
-/**
- * Get the anchor point in pixels. The anchor determines the center point for the
- * symbolizer.
- * @abstract
- * @return {Array.<number>} Anchor.
- */
-ol.style.Image.prototype.getAnchor = function() {};
-
-
-/**
- * Get the image element for the symbolizer.
- * @abstract
- * @param {number} pixelRatio Pixel ratio.
- * @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element.
- */
-ol.style.Image.prototype.getImage = function(pixelRatio) {};
-
-
-/**
- * @abstract
- * @param {number} pixelRatio Pixel ratio.
- * @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element.
- */
-ol.style.Image.prototype.getHitDetectionImage = function(pixelRatio) {};
-
-
-/**
- * @abstract
- * @return {ol.ImageState} Image state.
- */
-ol.style.Image.prototype.getImageState = function() {};
-
-
-/**
- * @abstract
- * @return {ol.Size} Image size.
- */
-ol.style.Image.prototype.getImageSize = function() {};
-
-
-/**
- * @abstract
- * @return {ol.Size} Size of the hit-detection image.
- */
-ol.style.Image.prototype.getHitDetectionImageSize = function() {};
-
-
-/**
- * Get the origin of the symbolizer.
- * @abstract
- * @return {Array.<number>} Origin.
- */
-ol.style.Image.prototype.getOrigin = function() {};
-
-
-/**
- * Get the size of the symbolizer (in pixels).
- * @abstract
- * @return {ol.Size} Size.
- */
-ol.style.Image.prototype.getSize = function() {};
-
-
-/**
- * Set the opacity.
- *
- * @param {number} opacity Opacity.
- * @api
- */
-ol.style.Image.prototype.setOpacity = function(opacity) {
-  this.opacity_ = opacity;
-};
-
-
-/**
- * Set whether to rotate the style with the view.
- *
- * @param {boolean} rotateWithView Rotate with map.
- */
-ol.style.Image.prototype.setRotateWithView = function(rotateWithView) {
-  this.rotateWithView_ = rotateWithView;
-};
-
-
-/**
- * Set the rotation.
- *
- * @param {number} rotation Rotation.
- * @api
- */
-ol.style.Image.prototype.setRotation = function(rotation) {
-  this.rotation_ = rotation;
-};
-
-
-/**
- * Set the scale.
- *
- * @param {number} scale Scale.
- * @api
- */
-ol.style.Image.prototype.setScale = function(scale) {
-  this.scale_ = scale;
-};
-
-
-/**
- * Set whether to snap the image to the closest pixel.
- *
- * @param {boolean} snapToPixel Snap to pixel?
- */
-ol.style.Image.prototype.setSnapToPixel = function(snapToPixel) {
-  this.snapToPixel_ = snapToPixel;
-};
-
-
-/**
- * @abstract
- * @param {function(this: T, ol.events.Event)} listener Listener function.
- * @param {T} thisArg Value to use as `this` when executing `listener`.
- * @return {ol.EventsKey|undefined} Listener key.
- * @template T
- */
-ol.style.Image.prototype.listenImageChange = function(listener, thisArg) {};
-
-
-/**
- * Load not yet loaded URI.
- * @abstract
- */
-ol.style.Image.prototype.load = function() {};
-
-
-/**
- * @abstract
- * @param {function(this: T, ol.events.Event)} listener Listener function.
- * @param {T} thisArg Value to use as `this` when executing `listener`.
- * @template T
- */
-ol.style.Image.prototype.unlistenImageChange = function(listener, thisArg) {};
-
-goog.provide('ol.style.RegularShape');
-
-goog.require('ol');
-goog.require('ol.colorlike');
-goog.require('ol.dom');
-goog.require('ol.has');
-goog.require('ol.ImageState');
-goog.require('ol.render.canvas');
-goog.require('ol.style.Image');
-
-
-/**
- * @classdesc
- * Set regular shape style for vector features. The resulting shape will be
- * a regular polygon when `radius` is provided, or a star when `radius1` and
- * `radius2` are provided.
- *
- * @constructor
- * @param {olx.style.RegularShapeOptions} options Options.
- * @extends {ol.style.Image}
- * @api
- */
-ol.style.RegularShape = function(options) {
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.checksums_ = null;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = null;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.hitDetectionCanvas_ = null;
-
-  /**
-   * @private
-   * @type {ol.style.Fill}
-   */
-  this.fill_ = options.fill !== undefined ? options.fill : null;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.origin_ = [0, 0];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.points_ = options.points;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.radius_ = /** @type {number} */ (options.radius !== undefined ?
-      options.radius : options.radius1);
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.radius2_ = options.radius2;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.angle_ = options.angle !== undefined ? options.angle : 0;
-
-  /**
-   * @private
-   * @type {ol.style.Stroke}
-   */
-  this.stroke_ = options.stroke !== undefined ? options.stroke : null;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.anchor_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.size_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.imageSize_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.hitDetectionImageSize_ = null;
-
-  /**
-   * @protected
-   * @type {ol.style.AtlasManager|undefined}
-   */
-  this.atlasManager_ = options.atlasManager;
-
-  this.render_(this.atlasManager_);
-
-  /**
-   * @type {boolean}
-   */
-  var snapToPixel = options.snapToPixel !== undefined ?
-      options.snapToPixel : true;
-
-  /**
-   * @type {boolean}
-   */
-  var rotateWithView = options.rotateWithView !== undefined ?
-      options.rotateWithView : false;
-
-  ol.style.Image.call(this, {
-    opacity: 1,
-    rotateWithView: rotateWithView,
-    rotation: options.rotation !== undefined ? options.rotation : 0,
-    scale: 1,
-    snapToPixel: snapToPixel
-  });
-};
-ol.inherits(ol.style.RegularShape, ol.style.Image);
-
-
-/**
- * Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too.
- * @return {ol.style.RegularShape} The cloned style.
- * @api
- */
-ol.style.RegularShape.prototype.clone = function() {
-  var style = new ol.style.RegularShape({
-    fill: this.getFill() ? this.getFill().clone() : undefined,
-    points: this.getPoints(),
-    radius: this.getRadius(),
-    radius2: this.getRadius2(),
-    angle: this.getAngle(),
-    snapToPixel: this.getSnapToPixel(),
-    stroke: this.getStroke() ?  this.getStroke().clone() : undefined,
-    rotation: this.getRotation(),
-    rotateWithView: this.getRotateWithView(),
-    atlasManager: this.atlasManager_
-  });
-  style.setOpacity(this.getOpacity());
-  style.setScale(this.getScale());
-  return style;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.RegularShape.prototype.getAnchor = function() {
-  return this.anchor_;
-};
-
-
-/**
- * Get the angle used in generating the shape.
- * @return {number} Shape's rotation in radians.
- * @api
- */
-ol.style.RegularShape.prototype.getAngle = function() {
-  return this.angle_;
-};
-
-
-/**
- * Get the fill style for the shape.
- * @return {ol.style.Fill} Fill style.
- * @api
- */
-ol.style.RegularShape.prototype.getFill = function() {
-  return this.fill_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.getHitDetectionImage = function(pixelRatio) {
-  return this.hitDetectionCanvas_;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.RegularShape.prototype.getImage = function(pixelRatio) {
-  return this.canvas_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.getImageSize = function() {
-  return this.imageSize_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.getHitDetectionImageSize = function() {
-  return this.hitDetectionImageSize_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.getImageState = function() {
-  return ol.ImageState.LOADED;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.RegularShape.prototype.getOrigin = function() {
-  return this.origin_;
-};
-
-
-/**
- * Get the number of points for generating the shape.
- * @return {number} Number of points for stars and regular polygons.
- * @api
- */
-ol.style.RegularShape.prototype.getPoints = function() {
-  return this.points_;
-};
-
-
-/**
- * Get the (primary) radius for the shape.
- * @return {number} Radius.
- * @api
- */
-ol.style.RegularShape.prototype.getRadius = function() {
-  return this.radius_;
-};
-
-
-/**
- * Get the secondary radius for the shape.
- * @return {number|undefined} Radius2.
- * @api
- */
-ol.style.RegularShape.prototype.getRadius2 = function() {
-  return this.radius2_;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.RegularShape.prototype.getSize = function() {
-  return this.size_;
-};
-
-
-/**
- * Get the stroke style for the shape.
- * @return {ol.style.Stroke} Stroke style.
- * @api
- */
-ol.style.RegularShape.prototype.getStroke = function() {
-  return this.stroke_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.listenImageChange = function(listener, thisArg) {};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.load = function() {};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.unlistenImageChange = function(listener, thisArg) {};
-
-
-/**
- * @protected
- * @param {ol.style.AtlasManager|undefined} atlasManager An atlas manager.
- */
-ol.style.RegularShape.prototype.render_ = function(atlasManager) {
-  var imageSize;
-  var lineCap = '';
-  var lineJoin = '';
-  var miterLimit = 0;
-  var lineDash = null;
-  var strokeStyle;
-  var strokeWidth = 0;
-
-  if (this.stroke_) {
-    strokeStyle = this.stroke_.getColor();
-    if (strokeStyle === null) {
-      strokeStyle = ol.render.canvas.defaultStrokeStyle;
-    }
-    strokeStyle = ol.colorlike.asColorLike(strokeStyle);
-    strokeWidth = this.stroke_.getWidth();
-    if (strokeWidth === undefined) {
-      strokeWidth = ol.render.canvas.defaultLineWidth;
-    }
-    lineDash = this.stroke_.getLineDash();
-    if (!ol.has.CANVAS_LINE_DASH) {
-      lineDash = null;
-    }
-    lineJoin = this.stroke_.getLineJoin();
-    if (lineJoin === undefined) {
-      lineJoin = ol.render.canvas.defaultLineJoin;
-    }
-    lineCap = this.stroke_.getLineCap();
-    if (lineCap === undefined) {
-      lineCap = ol.render.canvas.defaultLineCap;
-    }
-    miterLimit = this.stroke_.getMiterLimit();
-    if (miterLimit === undefined) {
-      miterLimit = ol.render.canvas.defaultMiterLimit;
-    }
-  }
-
-  var size = 2 * (this.radius_ + strokeWidth) + 1;
-
-  /** @type {ol.RegularShapeRenderOptions} */
-  var renderOptions = {
-    strokeStyle: strokeStyle,
-    strokeWidth: strokeWidth,
-    size: size,
-    lineCap: lineCap,
-    lineDash: lineDash,
-    lineJoin: lineJoin,
-    miterLimit: miterLimit
-  };
-
-  if (atlasManager === undefined) {
-    // no atlas manager is used, create a new canvas
-    var context = ol.dom.createCanvasContext2D(size, size);
-    this.canvas_ = context.canvas;
-
-    // canvas.width and height are rounded to the closest integer
-    size = this.canvas_.width;
-    imageSize = size;
-
-    this.draw_(renderOptions, context, 0, 0);
-
-    this.createHitDetectionCanvas_(renderOptions);
-  } else {
-    // an atlas manager is used, add the symbol to an atlas
-    size = Math.round(size);
-
-    var hasCustomHitDetectionImage = !this.fill_;
-    var renderHitDetectionCallback;
-    if (hasCustomHitDetectionImage) {
-      // render the hit-detection image into a separate atlas image
-      renderHitDetectionCallback =
-          this.drawHitDetectionCanvas_.bind(this, renderOptions);
-    }
-
-    var id = this.getChecksum();
-    var info = atlasManager.add(
-        id, size, size, this.draw_.bind(this, renderOptions),
-        renderHitDetectionCallback);
-
-    this.canvas_ = info.image;
-    this.origin_ = [info.offsetX, info.offsetY];
-    imageSize = info.image.width;
-
-    if (hasCustomHitDetectionImage) {
-      this.hitDetectionCanvas_ = info.hitImage;
-      this.hitDetectionImageSize_ =
-          [info.hitImage.width, info.hitImage.height];
-    } else {
-      this.hitDetectionCanvas_ = this.canvas_;
-      this.hitDetectionImageSize_ = [imageSize, imageSize];
-    }
-  }
-
-  this.anchor_ = [size / 2, size / 2];
-  this.size_ = [size, size];
-  this.imageSize_ = [imageSize, imageSize];
-};
-
-
-/**
- * @private
- * @param {ol.RegularShapeRenderOptions} renderOptions Render options.
- * @param {CanvasRenderingContext2D} context The rendering context.
- * @param {number} x The origin for the symbol (x).
- * @param {number} y The origin for the symbol (y).
- */
-ol.style.RegularShape.prototype.draw_ = function(renderOptions, context, x, y) {
-  var i, angle0, radiusC;
-  // reset transform
-  context.setTransform(1, 0, 0, 1, 0, 0);
-
-  // then move to (x, y)
-  context.translate(x, y);
-
-  context.beginPath();
-
-  var points = this.points_;
-  if (points === Infinity) {
-    context.arc(
-        renderOptions.size / 2, renderOptions.size / 2,
-        this.radius_, 0, 2 * Math.PI, true);
-  } else {
-    var radius2 = (this.radius2_ !== undefined) ? this.radius2_
-      : this.radius_;
-    if (radius2 !== this.radius_) {
-      points = 2 * points;
-    }
-    for (i = 0; i <= points; i++) {
-      angle0 = i * 2 * Math.PI / points - Math.PI / 2 + this.angle_;
-      radiusC = i % 2 === 0 ? this.radius_ : radius2;
-      context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0),
-                     renderOptions.size / 2 + radiusC * Math.sin(angle0));
-    }
-  }
-
-
-  if (this.fill_) {
-    var color = this.fill_.getColor();
-    if (color === null) {
-      color = ol.render.canvas.defaultFillStyle;
-    }
-    context.fillStyle = ol.colorlike.asColorLike(color);
-    context.fill();
-  }
-  if (this.stroke_) {
-    context.strokeStyle = renderOptions.strokeStyle;
-    context.lineWidth = renderOptions.strokeWidth;
-    if (renderOptions.lineDash) {
-      context.setLineDash(renderOptions.lineDash);
-    }
-    context.lineCap = renderOptions.lineCap;
-    context.lineJoin = renderOptions.lineJoin;
-    context.miterLimit = renderOptions.miterLimit;
-    context.stroke();
-  }
-  context.closePath();
-};
-
-
-/**
- * @private
- * @param {ol.RegularShapeRenderOptions} renderOptions Render options.
- */
-ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
-  this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
-  if (this.fill_) {
-    this.hitDetectionCanvas_ = this.canvas_;
-    return;
-  }
-
-  // if no fill style is set, create an extra hit-detection image with a
-  // default fill style
-  var context = ol.dom.createCanvasContext2D(renderOptions.size, renderOptions.size);
-  this.hitDetectionCanvas_ = context.canvas;
-
-  this.drawHitDetectionCanvas_(renderOptions, context, 0, 0);
-};
-
-
-/**
- * @private
- * @param {ol.RegularShapeRenderOptions} renderOptions Render options.
- * @param {CanvasRenderingContext2D} context The context.
- * @param {number} x The origin for the symbol (x).
- * @param {number} y The origin for the symbol (y).
- */
-ol.style.RegularShape.prototype.drawHitDetectionCanvas_ = function(renderOptions, context, x, y) {
-  // reset transform
-  context.setTransform(1, 0, 0, 1, 0, 0);
-
-  // then move to (x, y)
-  context.translate(x, y);
-
-  context.beginPath();
-
-  var points = this.points_;
-  if (points === Infinity) {
-    context.arc(
-        renderOptions.size / 2, renderOptions.size / 2,
-        this.radius_, 0, 2 * Math.PI, true);
-  } else {
-    var radius2 = (this.radius2_ !== undefined) ? this.radius2_
-      : this.radius_;
-    if (radius2 !== this.radius_) {
-      points = 2 * points;
-    }
-    var i, radiusC, angle0;
-    for (i = 0; i <= points; i++) {
-      angle0 = i * 2 * Math.PI / points - Math.PI / 2 + this.angle_;
-      radiusC = i % 2 === 0 ? this.radius_ : radius2;
-      context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0),
-                     renderOptions.size / 2 + radiusC * Math.sin(angle0));
-    }
-  }
-
-  context.fillStyle = ol.render.canvas.defaultFillStyle;
-  context.fill();
-  if (this.stroke_) {
-    context.strokeStyle = renderOptions.strokeStyle;
-    context.lineWidth = renderOptions.strokeWidth;
-    if (renderOptions.lineDash) {
-      context.setLineDash(renderOptions.lineDash);
-    }
-    context.stroke();
-  }
-  context.closePath();
-};
-
-
-/**
- * @return {string} The checksum.
- */
-ol.style.RegularShape.prototype.getChecksum = function() {
-  var strokeChecksum = this.stroke_ ?
-      this.stroke_.getChecksum() : '-';
-  var fillChecksum = this.fill_ ?
-      this.fill_.getChecksum() : '-';
-
-  var recalculate = !this.checksums_ ||
-      (strokeChecksum != this.checksums_[1] ||
-      fillChecksum != this.checksums_[2] ||
-      this.radius_ != this.checksums_[3] ||
-      this.radius2_ != this.checksums_[4] ||
-      this.angle_ != this.checksums_[5] ||
-      this.points_ != this.checksums_[6]);
-
-  if (recalculate) {
-    var checksum = 'r' + strokeChecksum + fillChecksum +
-        (this.radius_ !== undefined ? this.radius_.toString() : '-') +
-        (this.radius2_ !== undefined ? this.radius2_.toString() : '-') +
-        (this.angle_ !== undefined ? this.angle_.toString() : '-') +
-        (this.points_ !== undefined ? this.points_.toString() : '-');
-    this.checksums_ = [checksum, strokeChecksum, fillChecksum,
-      this.radius_, this.radius2_, this.angle_, this.points_];
-  }
-
-  return this.checksums_[0];
-};
-
-goog.provide('ol.style.Circle');
-
-goog.require('ol');
-goog.require('ol.style.RegularShape');
-
-
-/**
- * @classdesc
- * Set circle style for vector features.
- *
- * @constructor
- * @param {olx.style.CircleOptions=} opt_options Options.
- * @extends {ol.style.RegularShape}
- * @api
- */
-ol.style.Circle = function(opt_options) {
-
-  var options = opt_options || {};
-
-  ol.style.RegularShape.call(this, {
-    points: Infinity,
-    fill: options.fill,
-    radius: options.radius,
-    snapToPixel: options.snapToPixel,
-    stroke: options.stroke,
-    atlasManager: options.atlasManager
-  });
-
-};
-ol.inherits(ol.style.Circle, ol.style.RegularShape);
-
-
-/**
- * Clones the style.  If an atlasmanager was provided to the original style it will be used in the cloned style, too.
- * @return {ol.style.Circle} The cloned style.
- * @override
- * @api
- */
-ol.style.Circle.prototype.clone = function() {
-  var style = new ol.style.Circle({
-    fill: this.getFill() ? this.getFill().clone() : undefined,
-    stroke: this.getStroke() ? this.getStroke().clone() : undefined,
-    radius: this.getRadius(),
-    snapToPixel: this.getSnapToPixel(),
-    atlasManager: this.atlasManager_
-  });
-  style.setOpacity(this.getOpacity());
-  style.setScale(this.getScale());
-  return style;
-};
-
-
-/**
- * Set the circle radius.
- *
- * @param {number} radius Circle radius.
- * @api
- */
-ol.style.Circle.prototype.setRadius = function(radius) {
-  this.radius_ = radius;
-  this.render_(this.atlasManager_);
-};
-
-goog.provide('ol.style.Fill');
-
-goog.require('ol');
-goog.require('ol.color');
-
-
-/**
- * @classdesc
- * Set fill style for vector features.
- *
- * @constructor
- * @param {olx.style.FillOptions=} opt_options Options.
- * @api
- */
-ol.style.Fill = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {ol.Color|ol.ColorLike}
-   */
-  this.color_ = options.color !== undefined ? options.color : null;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Clones the style. The color is not cloned if it is an {@link ol.ColorLike}.
- * @return {ol.style.Fill} The cloned style.
- * @api
- */
-ol.style.Fill.prototype.clone = function() {
-  var color = this.getColor();
-  return new ol.style.Fill({
-    color: (color && color.slice) ? color.slice() : color || undefined
-  });
-};
-
-
-/**
- * Get the fill color.
- * @return {ol.Color|ol.ColorLike} Color.
- * @api
- */
-ol.style.Fill.prototype.getColor = function() {
-  return this.color_;
-};
-
-
-/**
- * Set the color.
- *
- * @param {ol.Color|ol.ColorLike} color Color.
- * @api
- */
-ol.style.Fill.prototype.setColor = function(color) {
-  this.color_ = color;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * @return {string} The checksum.
- */
-ol.style.Fill.prototype.getChecksum = function() {
-  if (this.checksum_ === undefined) {
-    if (
-        this.color_ instanceof CanvasPattern ||
-        this.color_ instanceof CanvasGradient
-    ) {
-      this.checksum_ = ol.getUid(this.color_).toString();
-    } else {
-      this.checksum_ = 'f' + (this.color_ ?
-          ol.color.asString(this.color_) : '-');
-    }
-  }
-
-  return this.checksum_;
-};
-
-goog.provide('ol.style.Style');
-
-goog.require('ol.asserts');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.style.Circle');
-goog.require('ol.style.Fill');
-goog.require('ol.style.Stroke');
-
-
-/**
- * @classdesc
- * Container for vector feature rendering styles. Any changes made to the style
- * or its children through `set*()` methods will not take effect until the
- * feature or layer that uses the style is re-rendered.
- *
- * @constructor
- * @struct
- * @param {olx.style.StyleOptions=} opt_options Style options.
- * @api
- */
-ol.style.Style = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {string|ol.geom.Geometry|ol.StyleGeometryFunction}
-   */
-  this.geometry_ = null;
-
-  /**
-   * @private
-   * @type {!ol.StyleGeometryFunction}
-   */
-  this.geometryFunction_ = ol.style.Style.defaultGeometryFunction;
-
-  if (options.geometry !== undefined) {
-    this.setGeometry(options.geometry);
-  }
-
-  /**
-   * @private
-   * @type {ol.style.Fill}
-   */
-  this.fill_ = options.fill !== undefined ? options.fill : null;
-
-  /**
-   * @private
-   * @type {ol.style.Image}
-   */
-  this.image_ = options.image !== undefined ? options.image : null;
-
-  /**
-   * @private
-   * @type {ol.style.Stroke}
-   */
-  this.stroke_ = options.stroke !== undefined ? options.stroke : null;
-
-  /**
-   * @private
-   * @type {ol.style.Text}
-   */
-  this.text_ = options.text !== undefined ? options.text : null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.zIndex_ = options.zIndex;
-
-};
-
-
-/**
- * Clones the style.
- * @return {ol.style.Style} The cloned style.
- * @api
- */
-ol.style.Style.prototype.clone = function() {
-  var geometry = this.getGeometry();
-  if (geometry && geometry.clone) {
-    geometry = geometry.clone();
-  }
-  return new ol.style.Style({
-    geometry: geometry,
-    fill: this.getFill() ? this.getFill().clone() : undefined,
-    image: this.getImage() ? this.getImage().clone() : undefined,
-    stroke: this.getStroke() ? this.getStroke().clone() : undefined,
-    text: this.getText() ? this.getText().clone() : undefined,
-    zIndex: this.getZIndex()
-  });
-};
-
-
-/**
- * Get the geometry to be rendered.
- * @return {string|ol.geom.Geometry|ol.StyleGeometryFunction}
- * Feature property or geometry or function that returns the geometry that will
- * be rendered with this style.
- * @api
- */
-ol.style.Style.prototype.getGeometry = function() {
-  return this.geometry_;
-};
-
-
-/**
- * Get the function used to generate a geometry for rendering.
- * @return {!ol.StyleGeometryFunction} Function that is called with a feature
- * and returns the geometry to render instead of the feature's geometry.
- * @api
- */
-ol.style.Style.prototype.getGeometryFunction = function() {
-  return this.geometryFunction_;
-};
-
-
-/**
- * Get the fill style.
- * @return {ol.style.Fill} Fill style.
- * @api
- */
-ol.style.Style.prototype.getFill = function() {
-  return this.fill_;
-};
-
-
-/**
- * Set the fill style.
- * @param {ol.style.Fill} fill Fill style.
- * @api
- */
-ol.style.Style.prototype.setFill = function(fill) {
-  this.fill_ = fill;
-};
-
-
-/**
- * Get the image style.
- * @return {ol.style.Image} Image style.
- * @api
- */
-ol.style.Style.prototype.getImage = function() {
-  return this.image_;
-};
-
-
-/**
- * Set the image style.
- * @param {ol.style.Image} image Image style.
- * @api
- */
-ol.style.Style.prototype.setImage = function(image) {
-  this.image_ = image;
-};
-
-
-/**
- * Get the stroke style.
- * @return {ol.style.Stroke} Stroke style.
- * @api
- */
-ol.style.Style.prototype.getStroke = function() {
-  return this.stroke_;
-};
-
-
-/**
- * Set the stroke style.
- * @param {ol.style.Stroke} stroke Stroke style.
- * @api
- */
-ol.style.Style.prototype.setStroke = function(stroke) {
-  this.stroke_ = stroke;
-};
-
-
-/**
- * Get the text style.
- * @return {ol.style.Text} Text style.
- * @api
- */
-ol.style.Style.prototype.getText = function() {
-  return this.text_;
-};
-
-
-/**
- * Set the text style.
- * @param {ol.style.Text} text Text style.
- * @api
- */
-ol.style.Style.prototype.setText = function(text) {
-  this.text_ = text;
-};
-
-
-/**
- * Get the z-index for the style.
- * @return {number|undefined} ZIndex.
- * @api
- */
-ol.style.Style.prototype.getZIndex = function() {
-  return this.zIndex_;
-};
-
-
-/**
- * Set a geometry that is rendered instead of the feature's geometry.
- *
- * @param {string|ol.geom.Geometry|ol.StyleGeometryFunction} geometry
- *     Feature property or geometry or function returning a geometry to render
- *     for this style.
- * @api
- */
-ol.style.Style.prototype.setGeometry = function(geometry) {
-  if (typeof geometry === 'function') {
-    this.geometryFunction_ = geometry;
-  } else if (typeof geometry === 'string') {
-    this.geometryFunction_ = function(feature) {
-      return /** @type {ol.geom.Geometry} */ (feature.get(geometry));
-    };
-  } else if (!geometry) {
-    this.geometryFunction_ = ol.style.Style.defaultGeometryFunction;
-  } else if (geometry !== undefined) {
-    this.geometryFunction_ = function() {
-      return /** @type {ol.geom.Geometry} */ (geometry);
-    };
-  }
-  this.geometry_ = geometry;
-};
-
-
-/**
- * Set the z-index.
- *
- * @param {number|undefined} zIndex ZIndex.
- * @api
- */
-ol.style.Style.prototype.setZIndex = function(zIndex) {
-  this.zIndex_ = zIndex;
-};
-
-
-/**
- * Convert the provided object into a style function.  Functions passed through
- * unchanged.  Arrays of ol.style.Style or single style objects wrapped in a
- * new style function.
- * @param {ol.StyleFunction|Array.<ol.style.Style>|ol.style.Style} obj
- *     A style function, a single style, or an array of styles.
- * @return {ol.StyleFunction} A style function.
- */
-ol.style.Style.createFunction = function(obj) {
-  var styleFunction;
-
-  if (typeof obj === 'function') {
-    styleFunction = obj;
-  } else {
-    /**
-     * @type {Array.<ol.style.Style>}
-     */
-    var styles;
-    if (Array.isArray(obj)) {
-      styles = obj;
-    } else {
-      ol.asserts.assert(obj instanceof ol.style.Style,
-          41); // Expected an `ol.style.Style` or an array of `ol.style.Style`
-      styles = [obj];
-    }
-    styleFunction = function() {
-      return styles;
-    };
-  }
-  return styleFunction;
-};
-
-
-/**
- * @type {Array.<ol.style.Style>}
- * @private
- */
-ol.style.Style.default_ = null;
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {number} resolution Resolution.
- * @return {Array.<ol.style.Style>} Style.
- */
-ol.style.Style.defaultFunction = function(feature, resolution) {
-  // We don't use an immediately-invoked function
-  // and a closure so we don't get an error at script evaluation time in
-  // browsers that do not support Canvas. (ol.style.Circle does
-  // canvas.getContext('2d') at construction time, which will cause an.error
-  // in such browsers.)
-  if (!ol.style.Style.default_) {
-    var fill = new ol.style.Fill({
-      color: 'rgba(255,255,255,0.4)'
-    });
-    var stroke = new ol.style.Stroke({
-      color: '#3399CC',
-      width: 1.25
-    });
-    ol.style.Style.default_ = [
-      new ol.style.Style({
-        image: new ol.style.Circle({
-          fill: fill,
-          stroke: stroke,
-          radius: 5
-        }),
-        fill: fill,
-        stroke: stroke
-      })
-    ];
-  }
-  return ol.style.Style.default_;
-};
-
-
-/**
- * Default styles for editing features.
- * @return {Object.<ol.geom.GeometryType, Array.<ol.style.Style>>} Styles
- */
-ol.style.Style.createDefaultEditing = function() {
-  /** @type {Object.<ol.geom.GeometryType, Array.<ol.style.Style>>} */
-  var styles = {};
-  var white = [255, 255, 255, 1];
-  var blue = [0, 153, 255, 1];
-  var width = 3;
-  styles[ol.geom.GeometryType.POLYGON] = [
-    new ol.style.Style({
-      fill: new ol.style.Fill({
-        color: [255, 255, 255, 0.5]
-      })
-    })
-  ];
-  styles[ol.geom.GeometryType.MULTI_POLYGON] =
-      styles[ol.geom.GeometryType.POLYGON];
-
-  styles[ol.geom.GeometryType.LINE_STRING] = [
-    new ol.style.Style({
-      stroke: new ol.style.Stroke({
-        color: white,
-        width: width + 2
-      })
-    }),
-    new ol.style.Style({
-      stroke: new ol.style.Stroke({
-        color: blue,
-        width: width
-      })
-    })
-  ];
-  styles[ol.geom.GeometryType.MULTI_LINE_STRING] =
-      styles[ol.geom.GeometryType.LINE_STRING];
-
-  styles[ol.geom.GeometryType.CIRCLE] =
-      styles[ol.geom.GeometryType.POLYGON].concat(
-          styles[ol.geom.GeometryType.LINE_STRING]
-      );
-
-
-  styles[ol.geom.GeometryType.POINT] = [
-    new ol.style.Style({
-      image: new ol.style.Circle({
-        radius: width * 2,
-        fill: new ol.style.Fill({
-          color: blue
-        }),
-        stroke: new ol.style.Stroke({
-          color: white,
-          width: width / 2
-        })
-      }),
-      zIndex: Infinity
-    })
-  ];
-  styles[ol.geom.GeometryType.MULTI_POINT] =
-      styles[ol.geom.GeometryType.POINT];
-
-  styles[ol.geom.GeometryType.GEOMETRY_COLLECTION] =
-      styles[ol.geom.GeometryType.POLYGON].concat(
-          styles[ol.geom.GeometryType.LINE_STRING],
-          styles[ol.geom.GeometryType.POINT]
-      );
-
-  return styles;
-};
-
-
-/**
- * Function that is called with a feature and returns its default geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature to get the geometry
- *     for.
- * @return {ol.geom.Geometry|ol.render.Feature|undefined} Geometry to render.
- */
-ol.style.Style.defaultGeometryFunction = function(feature) {
-  return feature.getGeometry();
-};
-
-goog.provide('ol.Feature');
-
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.geom.Geometry');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * A vector object for geographic features with a geometry and other
- * attribute properties, similar to the features in vector file formats like
- * GeoJSON.
- *
- * Features can be styled individually with `setStyle`; otherwise they use the
- * style of their vector layer.
- *
- * Note that attribute properties are set as {@link ol.Object} properties on
- * the feature object, so they are observable, and have get/set accessors.
- *
- * Typically, a feature has a single geometry property. You can set the
- * geometry using the `setGeometry` method and get it with `getGeometry`.
- * It is possible to store more than one geometry on a feature using attribute
- * properties. By default, the geometry used for rendering is identified by
- * the property name `geometry`. If you want to use another geometry property
- * for rendering, use the `setGeometryName` method to change the attribute
- * property associated with the geometry for the feature.  For example:
- *
- * ```js
- * var feature = new ol.Feature({
- *   geometry: new ol.geom.Polygon(polyCoords),
- *   labelPoint: new ol.geom.Point(labelCoords),
- *   name: 'My Polygon'
- * });
- *
- * // get the polygon geometry
- * var poly = feature.getGeometry();
- *
- * // Render the feature as a point using the coordinates from labelPoint
- * feature.setGeometryName('labelPoint');
- *
- * // get the point geometry
- * var point = feature.getGeometry();
- * ```
- *
- * @constructor
- * @extends {ol.Object}
- * @param {ol.geom.Geometry|Object.<string, *>=} opt_geometryOrProperties
- *     You may pass a Geometry object directly, or an object literal
- *     containing properties.  If you pass an object literal, you may
- *     include a Geometry associated with a `geometry` key.
- * @api
- */
-ol.Feature = function(opt_geometryOrProperties) {
-
-  ol.Object.call(this);
-
-  /**
-   * @private
-   * @type {number|string|undefined}
-   */
-  this.id_ = undefined;
-
-  /**
-   * @type {string}
-   * @private
-   */
-  this.geometryName_ = 'geometry';
-
-  /**
-   * User provided style.
-   * @private
-   * @type {ol.style.Style|Array.<ol.style.Style>|
-   *     ol.FeatureStyleFunction}
-   */
-  this.style_ = null;
-
-  /**
-   * @private
-   * @type {ol.FeatureStyleFunction|undefined}
-   */
-  this.styleFunction_ = undefined;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.geometryChangeKey_ = null;
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(this.geometryName_),
-      this.handleGeometryChanged_, this);
-
-  if (opt_geometryOrProperties !== undefined) {
-    if (opt_geometryOrProperties instanceof ol.geom.Geometry ||
-        !opt_geometryOrProperties) {
-      var geometry = opt_geometryOrProperties;
-      this.setGeometry(geometry);
-    } else {
-      /** @type {Object.<string, *>} */
-      var properties = opt_geometryOrProperties;
-      this.setProperties(properties);
-    }
-  }
-};
-ol.inherits(ol.Feature, ol.Object);
-
-
-/**
- * Clone this feature. If the original feature has a geometry it
- * is also cloned. The feature id is not set in the clone.
- * @return {ol.Feature} The clone.
- * @api
- */
-ol.Feature.prototype.clone = function() {
-  var clone = new ol.Feature(this.getProperties());
-  clone.setGeometryName(this.getGeometryName());
-  var geometry = this.getGeometry();
-  if (geometry) {
-    clone.setGeometry(geometry.clone());
-  }
-  var style = this.getStyle();
-  if (style) {
-    clone.setStyle(style);
-  }
-  return clone;
-};
-
-
-/**
- * Get the feature's default geometry.  A feature may have any number of named
- * geometries.  The "default" geometry (the one that is rendered by default) is
- * set when calling {@link ol.Feature#setGeometry}.
- * @return {ol.geom.Geometry|undefined} The default geometry for the feature.
- * @api
- * @observable
- */
-ol.Feature.prototype.getGeometry = function() {
-  return /** @type {ol.geom.Geometry|undefined} */ (
-      this.get(this.geometryName_));
-};
-
-
-/**
- * Get the feature identifier.  This is a stable identifier for the feature and
- * is either set when reading data from a remote source or set explicitly by
- * calling {@link ol.Feature#setId}.
- * @return {number|string|undefined} Id.
- * @api
- */
-ol.Feature.prototype.getId = function() {
-  return this.id_;
-};
-
-
-/**
- * Get the name of the feature's default geometry.  By default, the default
- * geometry is named `geometry`.
- * @return {string} Get the property name associated with the default geometry
- *     for this feature.
- * @api
- */
-ol.Feature.prototype.getGeometryName = function() {
-  return this.geometryName_;
-};
-
-
-/**
- * Get the feature's style. Will return what was provided to the
- * {@link ol.Feature#setStyle} method.
- * @return {ol.style.Style|Array.<ol.style.Style>|
- *     ol.FeatureStyleFunction|ol.StyleFunction} The feature style.
- * @api
- */
-ol.Feature.prototype.getStyle = function() {
-  return this.style_;
-};
-
-
-/**
- * Get the feature's style function.
- * @return {ol.FeatureStyleFunction|undefined} Return a function
- * representing the current style of this feature.
- * @api
- */
-ol.Feature.prototype.getStyleFunction = function() {
-  return this.styleFunction_;
-};
-
-
-/**
- * @private
- */
-ol.Feature.prototype.handleGeometryChange_ = function() {
-  this.changed();
-};
-
-
-/**
- * @private
- */
-ol.Feature.prototype.handleGeometryChanged_ = function() {
-  if (this.geometryChangeKey_) {
-    ol.events.unlistenByKey(this.geometryChangeKey_);
-    this.geometryChangeKey_ = null;
-  }
-  var geometry = this.getGeometry();
-  if (geometry) {
-    this.geometryChangeKey_ = ol.events.listen(geometry,
-        ol.events.EventType.CHANGE, this.handleGeometryChange_, this);
-  }
-  this.changed();
-};
-
-
-/**
- * Set the default geometry for the feature.  This will update the property
- * with the name returned by {@link ol.Feature#getGeometryName}.
- * @param {ol.geom.Geometry|undefined} geometry The new geometry.
- * @api
- * @observable
- */
-ol.Feature.prototype.setGeometry = function(geometry) {
-  this.set(this.geometryName_, geometry);
-};
-
-
-/**
- * Set the style for the feature.  This can be a single style object, an array
- * of styles, or a function that takes a resolution and returns an array of
- * styles. If it is `null` the feature has no style (a `null` style).
- * @param {ol.style.Style|Array.<ol.style.Style>|
- *     ol.FeatureStyleFunction|ol.StyleFunction} style Style for this feature.
- * @api
- * @fires ol.events.Event#event:change
- */
-ol.Feature.prototype.setStyle = function(style) {
-  this.style_ = style;
-  this.styleFunction_ = !style ?
-      undefined : ol.Feature.createStyleFunction(style);
-  this.changed();
-};
-
-
-/**
- * Set the feature id.  The feature id is considered stable and may be used when
- * requesting features or comparing identifiers returned from a remote source.
- * The feature id can be used with the {@link ol.source.Vector#getFeatureById}
- * method.
- * @param {number|string|undefined} id The feature id.
- * @api
- * @fires ol.events.Event#event:change
- */
-ol.Feature.prototype.setId = function(id) {
-  this.id_ = id;
-  this.changed();
-};
-
-
-/**
- * Set the property name to be used when getting the feature's default geometry.
- * When calling {@link ol.Feature#getGeometry}, the value of the property with
- * this name will be returned.
- * @param {string} name The property name of the default geometry.
- * @api
- */
-ol.Feature.prototype.setGeometryName = function(name) {
-  ol.events.unlisten(
-      this, ol.Object.getChangeEventType(this.geometryName_),
-      this.handleGeometryChanged_, this);
-  this.geometryName_ = name;
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(this.geometryName_),
-      this.handleGeometryChanged_, this);
-  this.handleGeometryChanged_();
-};
-
-
-/**
- * Convert the provided object into a feature style function.  Functions passed
- * through unchanged.  Arrays of ol.style.Style or single style objects wrapped
- * in a new feature style function.
- * @param {ol.FeatureStyleFunction|!Array.<ol.style.Style>|!ol.style.Style} obj
- *     A feature style function, a single style, or an array of styles.
- * @return {ol.FeatureStyleFunction} A style function.
- */
-ol.Feature.createStyleFunction = function(obj) {
-  var styleFunction;
-
-  if (typeof obj === 'function') {
-    if (obj.length == 2) {
-      styleFunction = function(resolution) {
-        return /** @type {ol.StyleFunction} */ (obj)(this, resolution);
-      };
-    } else {
-      styleFunction = obj;
-    }
-  } else {
-    /**
-     * @type {Array.<ol.style.Style>}
-     */
-    var styles;
-    if (Array.isArray(obj)) {
-      styles = obj;
-    } else {
-      ol.asserts.assert(obj instanceof ol.style.Style,
-          41); // Expected an `ol.style.Style` or an array of `ol.style.Style`
-      styles = [obj];
-    }
-    styleFunction = function() {
-      return styles;
-    };
-  }
-  return styleFunction;
-};
-
-goog.provide('ol.format.FormatType');
-
-
-/**
- * @enum {string}
- */
-ol.format.FormatType = {
-  ARRAY_BUFFER: 'arraybuffer',
-  JSON: 'json',
-  TEXT: 'text',
-  XML: 'xml'
-};
-
-goog.provide('ol.xml');
-
-goog.require('ol.array');
-
-
-/**
- * This document should be used when creating nodes for XML serializations. This
- * document is also used by {@link ol.xml.createElementNS} and
- * {@link ol.xml.setAttributeNS}
- * @const
- * @type {Document}
- */
-ol.xml.DOCUMENT = document.implementation.createDocument('', '', null);
-
-
-/**
- * @param {string} namespaceURI Namespace URI.
- * @param {string} qualifiedName Qualified name.
- * @return {Node} Node.
- */
-ol.xml.createElementNS = function(namespaceURI, qualifiedName) {
-  return ol.xml.DOCUMENT.createElementNS(namespaceURI, qualifiedName);
-};
-
-
-/**
- * Recursively grab all text content of child nodes into a single string.
- * @param {Node} node Node.
- * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line
- * breaks.
- * @return {string} All text content.
- * @api
- */
-ol.xml.getAllTextContent = function(node, normalizeWhitespace) {
-  return ol.xml.getAllTextContent_(node, normalizeWhitespace, []).join('');
-};
-
-
-/**
- * Recursively grab all text content of child nodes into a single string.
- * @param {Node} node Node.
- * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line
- * breaks.
- * @param {Array.<string>} accumulator Accumulator.
- * @private
- * @return {Array.<string>} Accumulator.
- */
-ol.xml.getAllTextContent_ = function(node, normalizeWhitespace, accumulator) {
-  if (node.nodeType == Node.CDATA_SECTION_NODE ||
-      node.nodeType == Node.TEXT_NODE) {
-    if (normalizeWhitespace) {
-      accumulator.push(String(node.nodeValue).replace(/(\r\n|\r|\n)/g, ''));
-    } else {
-      accumulator.push(node.nodeValue);
-    }
-  } else {
-    var n;
-    for (n = node.firstChild; n; n = n.nextSibling) {
-      ol.xml.getAllTextContent_(n, normalizeWhitespace, accumulator);
-    }
-  }
-  return accumulator;
-};
-
-
-/**
- * @param {?} value Value.
- * @return {boolean} Is document.
- */
-ol.xml.isDocument = function(value) {
-  return value instanceof Document;
-};
-
-
-/**
- * @param {?} value Value.
- * @return {boolean} Is node.
- */
-ol.xml.isNode = function(value) {
-  return value instanceof Node;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {?string} namespaceURI Namespace URI.
- * @param {string} name Attribute name.
- * @return {string} Value
- */
-ol.xml.getAttributeNS = function(node, namespaceURI, name) {
-  return node.getAttributeNS(namespaceURI, name) || '';
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {?string} namespaceURI Namespace URI.
- * @param {string} name Attribute name.
- * @param {string|number} value Value.
- */
-ol.xml.setAttributeNS = function(node, namespaceURI, name, value) {
-  node.setAttributeNS(namespaceURI, name, value);
-};
-
-
-/**
- * Parse an XML string to an XML Document.
- * @param {string} xml XML.
- * @return {Document} Document.
- * @api
- */
-ol.xml.parse = function(xml) {
-  return new DOMParser().parseFromString(xml, 'application/xml');
-};
-
-
-/**
- * Make an array extender function for extending the array at the top of the
- * object stack.
- * @param {function(this: T, Node, Array.<*>): (Array.<*>|undefined)}
- *     valueReader Value reader.
- * @param {T=} opt_this The object to use as `this` in `valueReader`.
- * @return {ol.XmlParser} Parser.
- * @template T
- */
-ol.xml.makeArrayExtender = function(valueReader, opt_this) {
-  return (
-      /**
-       * @param {Node} node Node.
-       * @param {Array.<*>} objectStack Object stack.
-       */
-      function(node, objectStack) {
-        var value = valueReader.call(opt_this, node, objectStack);
-        if (value !== undefined) {
-          var array = /** @type {Array.<*>} */
-              (objectStack[objectStack.length - 1]);
-          ol.array.extend(array, value);
-        }
-      });
-};
-
-
-/**
- * Make an array pusher function for pushing to the array at the top of the
- * object stack.
- * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
- * @param {T=} opt_this The object to use as `this` in `valueReader`.
- * @return {ol.XmlParser} Parser.
- * @template T
- */
-ol.xml.makeArrayPusher = function(valueReader, opt_this) {
-  return (
-      /**
-       * @param {Node} node Node.
-       * @param {Array.<*>} objectStack Object stack.
-       */
-      function(node, objectStack) {
-        var value = valueReader.call(opt_this !== undefined ? opt_this : this,
-            node, objectStack);
-        if (value !== undefined) {
-          var array = objectStack[objectStack.length - 1];
-          array.push(value);
-        }
-      });
-};
-
-
-/**
- * Make an object stack replacer function for replacing the object at the
- * top of the stack.
- * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
- * @param {T=} opt_this The object to use as `this` in `valueReader`.
- * @return {ol.XmlParser} Parser.
- * @template T
- */
-ol.xml.makeReplacer = function(valueReader, opt_this) {
-  return (
-      /**
-       * @param {Node} node Node.
-       * @param {Array.<*>} objectStack Object stack.
-       */
-      function(node, objectStack) {
-        var value = valueReader.call(opt_this !== undefined ? opt_this : this,
-            node, objectStack);
-        if (value !== undefined) {
-          objectStack[objectStack.length - 1] = value;
-        }
-      });
-};
-
-
-/**
- * Make an object property pusher function for adding a property to the
- * object at the top of the stack.
- * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
- * @param {string=} opt_property Property.
- * @param {T=} opt_this The object to use as `this` in `valueReader`.
- * @return {ol.XmlParser} Parser.
- * @template T
- */
-ol.xml.makeObjectPropertyPusher = function(valueReader, opt_property, opt_this) {
-  return (
-      /**
-       * @param {Node} node Node.
-       * @param {Array.<*>} objectStack Object stack.
-       */
-      function(node, objectStack) {
-        var value = valueReader.call(opt_this !== undefined ? opt_this : this,
-            node, objectStack);
-        if (value !== undefined) {
-          var object = /** @type {Object} */
-              (objectStack[objectStack.length - 1]);
-          var property = opt_property !== undefined ?
-              opt_property : node.localName;
-          var array;
-          if (property in object) {
-            array = object[property];
-          } else {
-            array = object[property] = [];
-          }
-          array.push(value);
-        }
-      });
-};
-
-
-/**
- * Make an object property setter function.
- * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
- * @param {string=} opt_property Property.
- * @param {T=} opt_this The object to use as `this` in `valueReader`.
- * @return {ol.XmlParser} Parser.
- * @template T
- */
-ol.xml.makeObjectPropertySetter = function(valueReader, opt_property, opt_this) {
-  return (
-      /**
-       * @param {Node} node Node.
-       * @param {Array.<*>} objectStack Object stack.
-       */
-      function(node, objectStack) {
-        var value = valueReader.call(opt_this !== undefined ? opt_this : this,
-            node, objectStack);
-        if (value !== undefined) {
-          var object = /** @type {Object} */
-              (objectStack[objectStack.length - 1]);
-          var property = opt_property !== undefined ?
-              opt_property : node.localName;
-          object[property] = value;
-        }
-      });
-};
-
-
-/**
- * Create a serializer that appends nodes written by its `nodeWriter` to its
- * designated parent. The parent is the `node` of the
- * {@link ol.XmlNodeStackItem} at the top of the `objectStack`.
- * @param {function(this: T, Node, V, Array.<*>)}
- *     nodeWriter Node writer.
- * @param {T=} opt_this The object to use as `this` in `nodeWriter`.
- * @return {ol.XmlSerializer} Serializer.
- * @template T, V
- */
-ol.xml.makeChildAppender = function(nodeWriter, opt_this) {
-  return function(node, value, objectStack) {
-    nodeWriter.call(opt_this !== undefined ? opt_this : this,
-        node, value, objectStack);
-    var parent = objectStack[objectStack.length - 1];
-    var parentNode = parent.node;
-    parentNode.appendChild(node);
-  };
-};
-
-
-/**
- * Create a serializer that calls the provided `nodeWriter` from
- * {@link ol.xml.serialize}. This can be used by the parent writer to have the
- * 'nodeWriter' called with an array of values when the `nodeWriter` was
- * designed to serialize a single item. An example would be a LineString
- * geometry writer, which could be reused for writing MultiLineString
- * geometries.
- * @param {function(this: T, Node, V, Array.<*>)}
- *     nodeWriter Node writer.
- * @param {T=} opt_this The object to use as `this` in `nodeWriter`.
- * @return {ol.XmlSerializer} Serializer.
- * @template T, V
- */
-ol.xml.makeArraySerializer = function(nodeWriter, opt_this) {
-  var serializersNS, nodeFactory;
-  return function(node, value, objectStack) {
-    if (serializersNS === undefined) {
-      serializersNS = {};
-      var serializers = {};
-      serializers[node.localName] = nodeWriter;
-      serializersNS[node.namespaceURI] = serializers;
-      nodeFactory = ol.xml.makeSimpleNodeFactory(node.localName);
-    }
-    ol.xml.serialize(serializersNS, nodeFactory, value, objectStack);
-  };
-};
-
-
-/**
- * Create a node factory which can use the `opt_keys` passed to
- * {@link ol.xml.serialize} or {@link ol.xml.pushSerializeAndPop} as node names,
- * or a fixed node name. The namespace of the created nodes can either be fixed,
- * or the parent namespace will be used.
- * @param {string=} opt_nodeName Fixed node name which will be used for all
- *     created nodes. If not provided, the 3rd argument to the resulting node
- *     factory needs to be provided and will be the nodeName.
- * @param {string=} opt_namespaceURI Fixed namespace URI which will be used for
- *     all created nodes. If not provided, the namespace of the parent node will
- *     be used.
- * @return {function(*, Array.<*>, string=): (Node|undefined)} Node factory.
- */
-ol.xml.makeSimpleNodeFactory = function(opt_nodeName, opt_namespaceURI) {
-  var fixedNodeName = opt_nodeName;
-  return (
-      /**
-       * @param {*} value Value.
-       * @param {Array.<*>} objectStack Object stack.
-       * @param {string=} opt_nodeName Node name.
-       * @return {Node} Node.
-       */
-      function(value, objectStack, opt_nodeName) {
-        var context = objectStack[objectStack.length - 1];
-        var node = context.node;
-        var nodeName = fixedNodeName;
-        if (nodeName === undefined) {
-          nodeName = opt_nodeName;
-        }
-        var namespaceURI = opt_namespaceURI;
-        if (opt_namespaceURI === undefined) {
-          namespaceURI = node.namespaceURI;
-        }
-        return ol.xml.createElementNS(namespaceURI, /** @type {string} */ (nodeName));
-      }
-  );
-};
-
-
-/**
- * A node factory that creates a node using the parent's `namespaceURI` and the
- * `nodeName` passed by {@link ol.xml.serialize} or
- * {@link ol.xml.pushSerializeAndPop} to the node factory.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- */
-ol.xml.OBJECT_PROPERTY_NODE_FACTORY = ol.xml.makeSimpleNodeFactory();
-
-
-/**
- * Create an array of `values` to be used with {@link ol.xml.serialize} or
- * {@link ol.xml.pushSerializeAndPop}, where `orderedKeys` has to be provided as
- * `opt_key` argument.
- * @param {Object.<string, V>} object Key-value pairs for the sequence. Keys can
- *     be a subset of the `orderedKeys`.
- * @param {Array.<string>} orderedKeys Keys in the order of the sequence.
- * @return {Array.<V>} Values in the order of the sequence. The resulting array
- *     has the same length as the `orderedKeys` array. Values that are not
- *     present in `object` will be `undefined` in the resulting array.
- * @template V
- */
-ol.xml.makeSequence = function(object, orderedKeys) {
-  var length = orderedKeys.length;
-  var sequence = new Array(length);
-  for (var i = 0; i < length; ++i) {
-    sequence[i] = object[orderedKeys[i]];
-  }
-  return sequence;
-};
-
-
-/**
- * Create a namespaced structure, using the same values for each namespace.
- * This can be used as a starting point for versioned parsers, when only a few
- * values are version specific.
- * @param {Array.<string>} namespaceURIs Namespace URIs.
- * @param {T} structure Structure.
- * @param {Object.<string, T>=} opt_structureNS Namespaced structure to add to.
- * @return {Object.<string, T>} Namespaced structure.
- * @template T
- */
-ol.xml.makeStructureNS = function(namespaceURIs, structure, opt_structureNS) {
-  /**
-   * @type {Object.<string, *>}
-   */
-  var structureNS = opt_structureNS !== undefined ? opt_structureNS : {};
-  var i, ii;
-  for (i = 0, ii = namespaceURIs.length; i < ii; ++i) {
-    structureNS[namespaceURIs[i]] = structure;
-  }
-  return structureNS;
-};
-
-
-/**
- * Parse a node using the parsers and object stack.
- * @param {Object.<string, Object.<string, ol.XmlParser>>} parsersNS
- *     Parsers by namespace.
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @param {*=} opt_this The object to use as `this`.
- */
-ol.xml.parseNode = function(parsersNS, node, objectStack, opt_this) {
-  var n;
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    var parsers = parsersNS[n.namespaceURI];
-    if (parsers !== undefined) {
-      var parser = parsers[n.localName];
-      if (parser !== undefined) {
-        parser.call(opt_this, n, objectStack);
-      }
-    }
-  }
-};
-
-
-/**
- * Push an object on top of the stack, parse and return the popped object.
- * @param {T} object Object.
- * @param {Object.<string, Object.<string, ol.XmlParser>>} parsersNS
- *     Parsers by namespace.
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @param {*=} opt_this The object to use as `this`.
- * @return {T} Object.
- * @template T
- */
-ol.xml.pushParseAndPop = function(
-    object, parsersNS, node, objectStack, opt_this) {
-  objectStack.push(object);
-  ol.xml.parseNode(parsersNS, node, objectStack, opt_this);
-  return objectStack.pop();
-};
-
-
-/**
- * Walk through an array of `values` and call a serializer for each value.
- * @param {Object.<string, Object.<string, ol.XmlSerializer>>} serializersNS
- *     Namespaced serializers.
- * @param {function(this: T, *, Array.<*>, (string|undefined)): (Node|undefined)} nodeFactory
- *     Node factory. The `nodeFactory` creates the node whose namespace and name
- *     will be used to choose a node writer from `serializersNS`. This
- *     separation allows us to decide what kind of node to create, depending on
- *     the value we want to serialize. An example for this would be different
- *     geometry writers based on the geometry type.
- * @param {Array.<*>} values Values to serialize. An example would be an array
- *     of {@link ol.Feature} instances.
- * @param {Array.<*>} objectStack Node stack.
- * @param {Array.<string>=} opt_keys Keys of the `values`. Will be passed to the
- *     `nodeFactory`. This is used for serializing object literals where the
- *     node name relates to the property key. The array length of `opt_keys` has
- *     to match the length of `values`. For serializing a sequence, `opt_keys`
- *     determines the order of the sequence.
- * @param {T=} opt_this The object to use as `this` for the node factory and
- *     serializers.
- * @template T
- */
-ol.xml.serialize = function(
-    serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {
-  var length = (opt_keys !== undefined ? opt_keys : values).length;
-  var value, node;
-  for (var i = 0; i < length; ++i) {
-    value = values[i];
-    if (value !== undefined) {
-      node = nodeFactory.call(opt_this, value, objectStack,
-          opt_keys !== undefined ? opt_keys[i] : undefined);
-      if (node !== undefined) {
-        serializersNS[node.namespaceURI][node.localName]
-            .call(opt_this, node, value, objectStack);
-      }
-    }
-  }
-};
-
-
-/**
- * @param {O} object Object.
- * @param {Object.<string, Object.<string, ol.XmlSerializer>>} serializersNS
- *     Namespaced serializers.
- * @param {function(this: T, *, Array.<*>, (string|undefined)): (Node|undefined)} nodeFactory
- *     Node factory. The `nodeFactory` creates the node whose namespace and name
- *     will be used to choose a node writer from `serializersNS`. This
- *     separation allows us to decide what kind of node to create, depending on
- *     the value we want to serialize. An example for this would be different
- *     geometry writers based on the geometry type.
- * @param {Array.<*>} values Values to serialize. An example would be an array
- *     of {@link ol.Feature} instances.
- * @param {Array.<*>} objectStack Node stack.
- * @param {Array.<string>=} opt_keys Keys of the `values`. Will be passed to the
- *     `nodeFactory`. This is used for serializing object literals where the
- *     node name relates to the property key. The array length of `opt_keys` has
- *     to match the length of `values`. For serializing a sequence, `opt_keys`
- *     determines the order of the sequence.
- * @param {T=} opt_this The object to use as `this` for the node factory and
- *     serializers.
- * @return {O|undefined} Object.
- * @template O, T
- */
-ol.xml.pushSerializeAndPop = function(object,
-    serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {
-  objectStack.push(object);
-  ol.xml.serialize(
-      serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this);
-  return objectStack.pop();
-};
-
-goog.provide('ol.featureloader');
-
-goog.require('ol');
-goog.require('ol.format.FormatType');
-goog.require('ol.xml');
-
-
-/**
- * @param {string|ol.FeatureUrlFunction} url Feature URL service.
- * @param {ol.format.Feature} format Feature format.
- * @param {function(this:ol.VectorTile, Array.<ol.Feature>, ol.proj.Projection)|function(this:ol.source.Vector, Array.<ol.Feature>)} success
- *     Function called with the loaded features and optionally with the data
- *     projection. Called with the vector tile or source as `this`.
- * @param {function(this:ol.VectorTile)|function(this:ol.source.Vector)} failure
- *     Function called when loading failed. Called with the vector tile or
- *     source as `this`.
- * @return {ol.FeatureLoader} The feature loader.
- */
-ol.featureloader.loadFeaturesXhr = function(url, format, success, failure) {
-  return (
-      /**
-       * @param {ol.Extent} extent Extent.
-       * @param {number} resolution Resolution.
-       * @param {ol.proj.Projection} projection Projection.
-       * @this {ol.source.Vector|ol.VectorTile}
-       */
-      function(extent, resolution, projection) {
-        var xhr = new XMLHttpRequest();
-        xhr.open('GET',
-            typeof url === 'function' ? url(extent, resolution, projection) : url,
-            true);
-        if (format.getType() == ol.format.FormatType.ARRAY_BUFFER) {
-          xhr.responseType = 'arraybuffer';
-        }
-        /**
-         * @param {Event} event Event.
-         * @private
-         */
-        xhr.onload = function(event) {
-          // status will be 0 for file:// urls
-          if (!xhr.status || xhr.status >= 200 && xhr.status < 300) {
-            var type = format.getType();
-            /** @type {Document|Node|Object|string|undefined} */
-            var source;
-            if (type == ol.format.FormatType.JSON ||
-                type == ol.format.FormatType.TEXT) {
-              source = xhr.responseText;
-            } else if (type == ol.format.FormatType.XML) {
-              source = xhr.responseXML;
-              if (!source) {
-                source = ol.xml.parse(xhr.responseText);
-              }
-            } else if (type == ol.format.FormatType.ARRAY_BUFFER) {
-              source = /** @type {ArrayBuffer} */ (xhr.response);
-            }
-            if (source) {
-              success.call(this, format.readFeatures(source,
-                  {featureProjection: projection}),
-                  format.readProjection(source));
-            } else {
-              failure.call(this);
-            }
-          } else {
-            failure.call(this);
-          }
-        }.bind(this);
-        /**
-         * @private
-         */
-        xhr.onerror = function() {
-          failure.call(this);
-        }.bind(this);
-        xhr.send();
-      });
-};
-
-
-/**
- * Create an XHR feature loader for a `url` and `format`. The feature loader
- * loads features (with XHR), parses the features, and adds them to the
- * vector source.
- * @param {string|ol.FeatureUrlFunction} url Feature URL service.
- * @param {ol.format.Feature} format Feature format.
- * @return {ol.FeatureLoader} The feature loader.
- * @api
- */
-ol.featureloader.xhr = function(url, format) {
-  return ol.featureloader.loadFeaturesXhr(url, format,
-      /**
-       * @param {Array.<ol.Feature>} features The loaded features.
-       * @param {ol.proj.Projection} dataProjection Data projection.
-       * @this {ol.source.Vector}
-       */
-      function(features, dataProjection) {
-        this.addFeatures(features);
-      }, /* FIXME handle error */ ol.nullFunction);
-};
-
-goog.provide('ol.format.Feature');
-
-goog.require('ol.geom.Geometry');
-goog.require('ol.obj');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for feature formats.
- * {ol.format.Feature} subclasses provide the ability to decode and encode
- * {@link ol.Feature} objects from a variety of commonly used geospatial
- * file formats.  See the documentation for each format for more details.
- *
- * @constructor
- * @abstract
- * @api
- */
-ol.format.Feature = function() {
-
-  /**
-   * @protected
-   * @type {ol.proj.Projection}
-   */
-  this.defaultDataProjection = null;
-
-  /**
-   * @protected
-   * @type {ol.proj.Projection}
-   */
-  this.defaultFeatureProjection = null;
-
-};
-
-
-/**
- * Adds the data projection to the read options.
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @return {olx.format.ReadOptions|undefined} Options.
- * @protected
- */
-ol.format.Feature.prototype.getReadOptions = function(source, opt_options) {
-  var options;
-  if (opt_options) {
-    options = {
-      dataProjection: opt_options.dataProjection ?
-          opt_options.dataProjection : this.readProjection(source),
-      featureProjection: opt_options.featureProjection
-    };
-  }
-  return this.adaptOptions(options);
-};
-
-
-/**
- * Sets the `defaultDataProjection` on the options, if no `dataProjection`
- * is set.
- * @param {olx.format.WriteOptions|olx.format.ReadOptions|undefined} options
- *     Options.
- * @protected
- * @return {olx.format.WriteOptions|olx.format.ReadOptions|undefined}
- *     Updated options.
- */
-ol.format.Feature.prototype.adaptOptions = function(options) {
-  return ol.obj.assign({
-    dataProjection: this.defaultDataProjection,
-    featureProjection: this.defaultFeatureProjection
-  }, options);
-};
-
-
-/**
- * @abstract
- * @return {ol.format.FormatType} Format.
- */
-ol.format.Feature.prototype.getType = function() {};
-
-
-/**
- * Read a single feature from a source.
- *
- * @abstract
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- */
-ol.format.Feature.prototype.readFeature = function(source, opt_options) {};
-
-
-/**
- * Read all features from a source.
- *
- * @abstract
- * @param {Document|Node|ArrayBuffer|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- */
-ol.format.Feature.prototype.readFeatures = function(source, opt_options) {};
-
-
-/**
- * Read a single geometry from a source.
- *
- * @abstract
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.Feature.prototype.readGeometry = function(source, opt_options) {};
-
-
-/**
- * Read the projection from a source.
- *
- * @abstract
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- */
-ol.format.Feature.prototype.readProjection = function(source) {};
-
-
-/**
- * Encode a feature in this format.
- *
- * @abstract
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} Result.
- */
-ol.format.Feature.prototype.writeFeature = function(feature, opt_options) {};
-
-
-/**
- * Encode an array of features in this format.
- *
- * @abstract
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} Result.
- */
-ol.format.Feature.prototype.writeFeatures = function(features, opt_options) {};
-
-
-/**
- * Write a single geometry in this format.
- *
- * @abstract
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} Result.
- */
-ol.format.Feature.prototype.writeGeometry = function(geometry, opt_options) {};
-
-
-/**
- * @param {ol.geom.Geometry|ol.Extent} geometry Geometry.
- * @param {boolean} write Set to true for writing, false for reading.
- * @param {(olx.format.WriteOptions|olx.format.ReadOptions)=} opt_options
- *     Options.
- * @return {ol.geom.Geometry|ol.Extent} Transformed geometry.
- * @protected
- */
-ol.format.Feature.transformWithOptions = function(
-    geometry, write, opt_options) {
-  var featureProjection = opt_options ?
-      ol.proj.get(opt_options.featureProjection) : null;
-  var dataProjection = opt_options ?
-      ol.proj.get(opt_options.dataProjection) : null;
-  /**
-   * @type {ol.geom.Geometry|ol.Extent}
-   */
-  var transformed;
-  if (featureProjection && dataProjection &&
-      !ol.proj.equivalent(featureProjection, dataProjection)) {
-    if (geometry instanceof ol.geom.Geometry) {
-      transformed = (write ? geometry.clone() : geometry).transform(
-          write ? featureProjection : dataProjection,
-          write ? dataProjection : featureProjection);
-    } else {
-      // FIXME this is necessary because ol.format.GML treats extents
-      // as geometries
-      transformed = ol.proj.transformExtent(
-          geometry,
-          dataProjection,
-          featureProjection);
-    }
-  } else {
-    transformed = geometry;
-  }
-  if (write && opt_options && opt_options.decimals !== undefined) {
-    var power = Math.pow(10, opt_options.decimals);
-    // if decimals option on write, round each coordinate appropriately
-    /**
-     * @param {Array.<number>} coordinates Coordinates.
-     * @return {Array.<number>} Transformed coordinates.
-     */
-    var transform = function(coordinates) {
-      for (var i = 0, ii = coordinates.length; i < ii; ++i) {
-        coordinates[i] = Math.round(coordinates[i] * power) / power;
-      }
-      return coordinates;
-    };
-    if (transformed === geometry) {
-      transformed = transformed.clone();
-    }
-    transformed.applyTransform(transform);
-  }
-  return transformed;
-};
-
-goog.provide('ol.format.JSONFeature');
-
-goog.require('ol');
-goog.require('ol.format.Feature');
-goog.require('ol.format.FormatType');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for JSON feature formats.
- *
- * @constructor
- * @abstract
- * @extends {ol.format.Feature}
- */
-ol.format.JSONFeature = function() {
-  ol.format.Feature.call(this);
-};
-ol.inherits(ol.format.JSONFeature, ol.format.Feature);
-
-
-/**
- * @param {Document|Node|Object|string} source Source.
- * @private
- * @return {Object} Object.
- */
-ol.format.JSONFeature.prototype.getObject_ = function(source) {
-  if (typeof source === 'string') {
-    var object = JSON.parse(source);
-    return object ? /** @type {Object} */ (object) : null;
-  } else if (source !== null) {
-    return source;
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.getType = function() {
-  return ol.format.FormatType.JSON;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.readFeature = function(source, opt_options) {
-  return this.readFeatureFromObject(
-      this.getObject_(source), this.getReadOptions(source, opt_options));
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.readFeatures = function(source, opt_options) {
-  return this.readFeaturesFromObject(
-      this.getObject_(source), this.getReadOptions(source, opt_options));
-};
-
-
-/**
- * @abstract
- * @param {Object} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {ol.Feature} Feature.
- */
-ol.format.JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
-
-
-/**
- * @abstract
- * @param {Object} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {Array.<ol.Feature>} Features.
- */
-ol.format.JSONFeature.prototype.readFeaturesFromObject = function(object, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.readGeometry = function(source, opt_options) {
-  return this.readGeometryFromObject(
-      this.getObject_(source), this.getReadOptions(source, opt_options));
-};
-
-
-/**
- * @abstract
- * @param {Object} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.JSONFeature.prototype.readGeometryFromObject = function(object, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.readProjection = function(source) {
-  return this.readProjectionFromObject(this.getObject_(source));
-};
-
-
-/**
- * @abstract
- * @param {Object} object Object.
- * @protected
- * @return {ol.proj.Projection} Projection.
- */
-ol.format.JSONFeature.prototype.readProjectionFromObject = function(object) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.writeFeature = function(feature, opt_options) {
-  return JSON.stringify(this.writeFeatureObject(feature, opt_options));
-};
-
-
-/**
- * @abstract
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {Object} Object.
- */
-ol.format.JSONFeature.prototype.writeFeatureObject = function(feature, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.writeFeatures = function(features, opt_options) {
-  return JSON.stringify(this.writeFeaturesObject(features, opt_options));
-};
-
-
-/**
- * @abstract
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {Object} Object.
- */
-ol.format.JSONFeature.prototype.writeFeaturesObject = function(features, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.writeGeometry = function(geometry, opt_options) {
-  return JSON.stringify(this.writeGeometryObject(geometry, opt_options));
-};
-
-
-/**
- * @abstract
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {Object} Object.
- */
-ol.format.JSONFeature.prototype.writeGeometryObject = function(geometry, opt_options) {};
-
-goog.provide('ol.geom.flat.interpolate');
-
-goog.require('ol.array');
-goog.require('ol.math');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} fraction Fraction.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Destination.
- */
-ol.geom.flat.interpolate.lineString = function(flatCoordinates, offset, end, stride, fraction, opt_dest) {
-  var pointX = NaN;
-  var pointY = NaN;
-  var n = (end - offset) / stride;
-  if (n === 1) {
-    pointX = flatCoordinates[offset];
-    pointY = flatCoordinates[offset + 1];
-  } else if (n == 2) {
-    pointX = (1 - fraction) * flatCoordinates[offset] +
-        fraction * flatCoordinates[offset + stride];
-    pointY = (1 - fraction) * flatCoordinates[offset + 1] +
-        fraction * flatCoordinates[offset + stride + 1];
-  } else if (n !== 0) {
-    var x1 = flatCoordinates[offset];
-    var y1 = flatCoordinates[offset + 1];
-    var length = 0;
-    var cumulativeLengths = [0];
-    var i;
-    for (i = offset + stride; i < end; i += stride) {
-      var x2 = flatCoordinates[i];
-      var y2 = flatCoordinates[i + 1];
-      length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
-      cumulativeLengths.push(length);
-      x1 = x2;
-      y1 = y2;
-    }
-    var target = fraction * length;
-    var index = ol.array.binarySearch(cumulativeLengths, target);
-    if (index < 0) {
-      var t = (target - cumulativeLengths[-index - 2]) /
-          (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);
-      var o = offset + (-index - 2) * stride;
-      pointX = ol.math.lerp(
-          flatCoordinates[o], flatCoordinates[o + stride], t);
-      pointY = ol.math.lerp(
-          flatCoordinates[o + 1], flatCoordinates[o + stride + 1], t);
-    } else {
-      pointX = flatCoordinates[offset + index * stride];
-      pointY = flatCoordinates[offset + index * stride + 1];
-    }
-  }
-  if (opt_dest) {
-    opt_dest[0] = pointX;
-    opt_dest[1] = pointY;
-    return opt_dest;
-  } else {
-    return [pointX, pointY];
-  }
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} m M.
- * @param {boolean} extrapolate Extrapolate.
- * @return {ol.Coordinate} Coordinate.
- */
-ol.geom.flat.interpolate.lineStringCoordinateAtM = function(flatCoordinates, offset, end, stride, m, extrapolate) {
-  if (end == offset) {
-    return null;
-  }
-  var coordinate;
-  if (m < flatCoordinates[offset + stride - 1]) {
-    if (extrapolate) {
-      coordinate = flatCoordinates.slice(offset, offset + stride);
-      coordinate[stride - 1] = m;
-      return coordinate;
-    } else {
-      return null;
-    }
-  } else if (flatCoordinates[end - 1] < m) {
-    if (extrapolate) {
-      coordinate = flatCoordinates.slice(end - stride, end);
-      coordinate[stride - 1] = m;
-      return coordinate;
-    } else {
-      return null;
-    }
-  }
-  // FIXME use O(1) search
-  if (m == flatCoordinates[offset + stride - 1]) {
-    return flatCoordinates.slice(offset, offset + stride);
-  }
-  var lo = offset / stride;
-  var hi = end / stride;
-  while (lo < hi) {
-    var mid = (lo + hi) >> 1;
-    if (m < flatCoordinates[(mid + 1) * stride - 1]) {
-      hi = mid;
-    } else {
-      lo = mid + 1;
-    }
-  }
-  var m0 = flatCoordinates[lo * stride - 1];
-  if (m == m0) {
-    return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);
-  }
-  var m1 = flatCoordinates[(lo + 1) * stride - 1];
-  var t = (m - m0) / (m1 - m0);
-  coordinate = [];
-  var i;
-  for (i = 0; i < stride - 1; ++i) {
-    coordinate.push(ol.math.lerp(flatCoordinates[(lo - 1) * stride + i],
-        flatCoordinates[lo * stride + i], t));
-  }
-  coordinate.push(m);
-  return coordinate;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} m M.
- * @param {boolean} extrapolate Extrapolate.
- * @param {boolean} interpolate Interpolate.
- * @return {ol.Coordinate} Coordinate.
- */
-ol.geom.flat.interpolate.lineStringsCoordinateAtM = function(
-    flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {
-  if (interpolate) {
-    return ol.geom.flat.interpolate.lineStringCoordinateAtM(
-        flatCoordinates, offset, ends[ends.length - 1], stride, m, extrapolate);
-  }
-  var coordinate;
-  if (m < flatCoordinates[stride - 1]) {
-    if (extrapolate) {
-      coordinate = flatCoordinates.slice(0, stride);
-      coordinate[stride - 1] = m;
-      return coordinate;
-    } else {
-      return null;
-    }
-  }
-  if (flatCoordinates[flatCoordinates.length - 1] < m) {
-    if (extrapolate) {
-      coordinate = flatCoordinates.slice(flatCoordinates.length - stride);
-      coordinate[stride - 1] = m;
-      return coordinate;
-    } else {
-      return null;
-    }
-  }
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    if (offset == end) {
-      continue;
-    }
-    if (m < flatCoordinates[offset + stride - 1]) {
-      return null;
-    } else if (m <= flatCoordinates[end - 1]) {
-      return ol.geom.flat.interpolate.lineStringCoordinateAtM(
-          flatCoordinates, offset, end, stride, m, false);
-    }
-    offset = end;
-  }
-  return null;
-};
-
-goog.provide('ol.geom.flat.length');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {number} Length.
- */
-ol.geom.flat.length.lineString = function(flatCoordinates, offset, end, stride) {
-  var x1 = flatCoordinates[offset];
-  var y1 = flatCoordinates[offset + 1];
-  var length = 0;
-  var i;
-  for (i = offset + stride; i < end; i += stride) {
-    var x2 = flatCoordinates[i];
-    var y2 = flatCoordinates[i + 1];
-    length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
-    x1 = x2;
-    y1 = y2;
-  }
-  return length;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {number} Perimeter.
- */
-ol.geom.flat.length.linearRing = function(flatCoordinates, offset, end, stride) {
-  var perimeter =
-      ol.geom.flat.length.lineString(flatCoordinates, offset, end, stride);
-  var dx = flatCoordinates[end - stride] - flatCoordinates[offset];
-  var dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];
-  perimeter += Math.sqrt(dx * dx + dy * dy);
-  return perimeter;
-};
-
-goog.provide('ol.geom.LineString');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.closest');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.interpolate');
-goog.require('ol.geom.flat.intersectsextent');
-goog.require('ol.geom.flat.length');
-goog.require('ol.geom.flat.segments');
-goog.require('ol.geom.flat.simplify');
-
-
-/**
- * @classdesc
- * Linestring geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.LineString = function(coordinates, opt_layout) {
-
-  ol.geom.SimpleGeometry.call(this);
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.flatMidpoint_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.flatMidpointRevision_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDelta_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDeltaRevision_ = -1;
-
-  this.setCoordinates(coordinates, opt_layout);
-
-};
-ol.inherits(ol.geom.LineString, ol.geom.SimpleGeometry);
-
-
-/**
- * Append the passed coordinate to the coordinates of the linestring.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @api
- */
-ol.geom.LineString.prototype.appendCoordinate = function(coordinate) {
-  if (!this.flatCoordinates) {
-    this.flatCoordinates = coordinate.slice();
-  } else {
-    ol.array.extend(this.flatCoordinates, coordinate);
-  }
-  this.changed();
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.LineString} Clone.
- * @override
- * @api
- */
-ol.geom.LineString.prototype.clone = function() {
-  var lineString = new ol.geom.LineString(null);
-  lineString.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
-  return lineString;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.LineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  if (this.maxDeltaRevision_ != this.getRevision()) {
-    this.maxDelta_ = Math.sqrt(ol.geom.flat.closest.getMaxSquaredDelta(
-        this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));
-    this.maxDeltaRevision_ = this.getRevision();
-  }
-  return ol.geom.flat.closest.getClosestPoint(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);
-};
-
-
-/**
- * Iterate over each segment, calling the provided callback.
- * If the callback returns a truthy value the function returns that
- * value immediately. Otherwise the function returns `false`.
- *
- * @param {function(this: S, ol.Coordinate, ol.Coordinate): T} callback Function
- *     called for each segment.
- * @param {S=} opt_this The object to be used as the value of 'this'
- *     within callback.
- * @return {T|boolean} Value.
- * @template T,S
- * @api
- */
-ol.geom.LineString.prototype.forEachSegment = function(callback, opt_this) {
-  return ol.geom.flat.segments.forEach(this.flatCoordinates, 0,
-      this.flatCoordinates.length, this.stride, callback, opt_this);
-};
-
-
-/**
- * Returns the coordinate at `m` using linear interpolation, or `null` if no
- * such coordinate exists.
- *
- * `opt_extrapolate` controls extrapolation beyond the range of Ms in the
- * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first
- * M will return the first coordinate and Ms greater than the last M will
- * return the last coordinate.
- *
- * @param {number} m M.
- * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.
- * @return {ol.Coordinate} Coordinate.
- * @api
- */
-ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
-  if (this.layout != ol.geom.GeometryLayout.XYM &&
-      this.layout != ol.geom.GeometryLayout.XYZM) {
-    return null;
-  }
-  var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;
-  return ol.geom.flat.interpolate.lineStringCoordinateAtM(this.flatCoordinates, 0,
-      this.flatCoordinates.length, this.stride, m, extrapolate);
-};
-
-
-/**
- * Return the coordinates of the linestring.
- * @return {Array.<ol.Coordinate>} Coordinates.
- * @override
- * @api
- */
-ol.geom.LineString.prototype.getCoordinates = function() {
-  return ol.geom.flat.inflate.coordinates(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
-};
-
-
-/**
- * Return the coordinate at the provided fraction along the linestring.
- * The `fraction` is a number between 0 and 1, where 0 is the start of the
- * linestring and 1 is the end.
- * @param {number} fraction Fraction.
- * @param {ol.Coordinate=} opt_dest Optional coordinate whose values will
- *     be modified. If not provided, a new coordinate will be returned.
- * @return {ol.Coordinate} Coordinate of the interpolated point.
- * @api
- */
-ol.geom.LineString.prototype.getCoordinateAt = function(fraction, opt_dest) {
-  return ol.geom.flat.interpolate.lineString(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      fraction, opt_dest);
-};
-
-
-/**
- * Return the length of the linestring on projected plane.
- * @return {number} Length (on projected plane).
- * @api
- */
-ol.geom.LineString.prototype.getLength = function() {
-  return ol.geom.flat.length.lineString(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
-};
-
-
-/**
- * @return {Array.<number>} Flat midpoint.
- */
-ol.geom.LineString.prototype.getFlatMidpoint = function() {
-  if (this.flatMidpointRevision_ != this.getRevision()) {
-    this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);
-    this.flatMidpointRevision_ = this.getRevision();
-  }
-  return this.flatMidpoint_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.LineString.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  var simplifiedFlatCoordinates = [];
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      squaredTolerance, simplifiedFlatCoordinates, 0);
-  var simplifiedLineString = new ol.geom.LineString(null);
-  simplifiedLineString.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, simplifiedFlatCoordinates);
-  return simplifiedLineString;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.LineString.prototype.getType = function() {
-  return ol.geom.GeometryType.LINE_STRING;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.LineString.prototype.intersectsExtent = function(extent) {
-  return ol.geom.flat.intersectsextent.lineString(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      extent);
-};
-
-
-/**
- * Set the coordinates of the linestring.
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.LineString.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
-  } else {
-    this.setLayout(opt_layout, coordinates, 1);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    this.flatCoordinates.length = ol.geom.flat.deflate.coordinates(
-        this.flatCoordinates, 0, coordinates, this.stride);
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- */
-ol.geom.LineString.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.changed();
-};
-
-goog.provide('ol.geom.MultiLineString');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.closest');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.interpolate');
-goog.require('ol.geom.flat.intersectsextent');
-goog.require('ol.geom.flat.simplify');
-
-
-/**
- * @classdesc
- * Multi-linestring geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.MultiLineString = function(coordinates, opt_layout) {
-
-  ol.geom.SimpleGeometry.call(this);
-
-  /**
-   * @type {Array.<number>}
-   * @private
-   */
-  this.ends_ = [];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDelta_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDeltaRevision_ = -1;
-
-  this.setCoordinates(coordinates, opt_layout);
-
-};
-ol.inherits(ol.geom.MultiLineString, ol.geom.SimpleGeometry);
-
-
-/**
- * Append the passed linestring to the multilinestring.
- * @param {ol.geom.LineString} lineString LineString.
- * @api
- */
-ol.geom.MultiLineString.prototype.appendLineString = function(lineString) {
-  if (!this.flatCoordinates) {
-    this.flatCoordinates = lineString.getFlatCoordinates().slice();
-  } else {
-    ol.array.extend(
-        this.flatCoordinates, lineString.getFlatCoordinates().slice());
-  }
-  this.ends_.push(this.flatCoordinates.length);
-  this.changed();
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.MultiLineString} Clone.
- * @override
- * @api
- */
-ol.geom.MultiLineString.prototype.clone = function() {
-  var multiLineString = new ol.geom.MultiLineString(null);
-  multiLineString.setFlatCoordinates(
-      this.layout, this.flatCoordinates.slice(), this.ends_.slice());
-  return multiLineString;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiLineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  if (this.maxDeltaRevision_ != this.getRevision()) {
-    this.maxDelta_ = Math.sqrt(ol.geom.flat.closest.getsMaxSquaredDelta(
-        this.flatCoordinates, 0, this.ends_, this.stride, 0));
-    this.maxDeltaRevision_ = this.getRevision();
-  }
-  return ol.geom.flat.closest.getsClosestPoint(
-      this.flatCoordinates, 0, this.ends_, this.stride,
-      this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);
-};
-
-
-/**
- * Returns the coordinate at `m` using linear interpolation, or `null` if no
- * such coordinate exists.
- *
- * `opt_extrapolate` controls extrapolation beyond the range of Ms in the
- * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first
- * M will return the first coordinate and Ms greater than the last M will
- * return the last coordinate.
- *
- * `opt_interpolate` controls interpolation between consecutive LineStrings
- * within the MultiLineString. If `opt_interpolate` is `true` the coordinates
- * will be linearly interpolated between the last coordinate of one LineString
- * and the first coordinate of the next LineString.  If `opt_interpolate` is
- * `false` then the function will return `null` for Ms falling between
- * LineStrings.
- *
- * @param {number} m M.
- * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.
- * @param {boolean=} opt_interpolate Interpolate. Default is `false`.
- * @return {ol.Coordinate} Coordinate.
- * @api
- */
-ol.geom.MultiLineString.prototype.getCoordinateAtM = function(m, opt_extrapolate, opt_interpolate) {
-  if ((this.layout != ol.geom.GeometryLayout.XYM &&
-       this.layout != ol.geom.GeometryLayout.XYZM) ||
-      this.flatCoordinates.length === 0) {
-    return null;
-  }
-  var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;
-  var interpolate = opt_interpolate !== undefined ? opt_interpolate : false;
-  return ol.geom.flat.interpolate.lineStringsCoordinateAtM(this.flatCoordinates, 0,
-      this.ends_, this.stride, m, extrapolate, interpolate);
-};
-
-
-/**
- * Return the coordinates of the multilinestring.
- * @return {Array.<Array.<ol.Coordinate>>} Coordinates.
- * @override
- * @api
- */
-ol.geom.MultiLineString.prototype.getCoordinates = function() {
-  return ol.geom.flat.inflate.coordinatess(
-      this.flatCoordinates, 0, this.ends_, this.stride);
-};
-
-
-/**
- * @return {Array.<number>} Ends.
- */
-ol.geom.MultiLineString.prototype.getEnds = function() {
-  return this.ends_;
-};
-
-
-/**
- * Return the linestring at the specified index.
- * @param {number} index Index.
- * @return {ol.geom.LineString} LineString.
- * @api
- */
-ol.geom.MultiLineString.prototype.getLineString = function(index) {
-  if (index < 0 || this.ends_.length <= index) {
-    return null;
-  }
-  var lineString = new ol.geom.LineString(null);
-  lineString.setFlatCoordinates(this.layout, this.flatCoordinates.slice(
-      index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]));
-  return lineString;
-};
-
-
-/**
- * Return the linestrings of this multilinestring.
- * @return {Array.<ol.geom.LineString>} LineStrings.
- * @api
- */
-ol.geom.MultiLineString.prototype.getLineStrings = function() {
-  var flatCoordinates = this.flatCoordinates;
-  var ends = this.ends_;
-  var layout = this.layout;
-  /** @type {Array.<ol.geom.LineString>} */
-  var lineStrings = [];
-  var offset = 0;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var lineString = new ol.geom.LineString(null);
-    lineString.setFlatCoordinates(layout, flatCoordinates.slice(offset, end));
-    lineStrings.push(lineString);
-    offset = end;
-  }
-  return lineStrings;
-};
-
-
-/**
- * @return {Array.<number>} Flat midpoints.
- */
-ol.geom.MultiLineString.prototype.getFlatMidpoints = function() {
-  var midpoints = [];
-  var flatCoordinates = this.flatCoordinates;
-  var offset = 0;
-  var ends = this.ends_;
-  var stride = this.stride;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var midpoint = ol.geom.flat.interpolate.lineString(
-        flatCoordinates, offset, end, stride, 0.5);
-    ol.array.extend(midpoints, midpoint);
-    offset = end;
-  }
-  return midpoints;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiLineString.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  var simplifiedFlatCoordinates = [];
-  var simplifiedEnds = [];
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeuckers(
-      this.flatCoordinates, 0, this.ends_, this.stride, squaredTolerance,
-      simplifiedFlatCoordinates, 0, simplifiedEnds);
-  var simplifiedMultiLineString = new ol.geom.MultiLineString(null);
-  simplifiedMultiLineString.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, simplifiedFlatCoordinates, simplifiedEnds);
-  return simplifiedMultiLineString;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiLineString.prototype.getType = function() {
-  return ol.geom.GeometryType.MULTI_LINE_STRING;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiLineString.prototype.intersectsExtent = function(extent) {
-  return ol.geom.flat.intersectsextent.lineStrings(
-      this.flatCoordinates, 0, this.ends_, this.stride, extent);
-};
-
-
-/**
- * Set the coordinates of the multilinestring.
- * @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.MultiLineString.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.ends_);
-  } else {
-    this.setLayout(opt_layout, coordinates, 2);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    var ends = ol.geom.flat.deflate.coordinatess(
-        this.flatCoordinates, 0, coordinates, this.stride, this.ends_);
-    this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {Array.<number>} ends Ends.
- */
-ol.geom.MultiLineString.prototype.setFlatCoordinates = function(layout, flatCoordinates, ends) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.ends_ = ends;
-  this.changed();
-};
-
-
-/**
- * @param {Array.<ol.geom.LineString>} lineStrings LineStrings.
- */
-ol.geom.MultiLineString.prototype.setLineStrings = function(lineStrings) {
-  var layout = this.getLayout();
-  var flatCoordinates = [];
-  var ends = [];
-  var i, ii;
-  for (i = 0, ii = lineStrings.length; i < ii; ++i) {
-    var lineString = lineStrings[i];
-    if (i === 0) {
-      layout = lineString.getLayout();
-    }
-    ol.array.extend(flatCoordinates, lineString.getFlatCoordinates());
-    ends.push(flatCoordinates.length);
-  }
-  this.setFlatCoordinates(layout, flatCoordinates, ends);
-};
-
-goog.provide('ol.geom.MultiPoint');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * Multi-point geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.MultiPoint = function(coordinates, opt_layout) {
-  ol.geom.SimpleGeometry.call(this);
-  this.setCoordinates(coordinates, opt_layout);
-};
-ol.inherits(ol.geom.MultiPoint, ol.geom.SimpleGeometry);
-
-
-/**
- * Append the passed point to this multipoint.
- * @param {ol.geom.Point} point Point.
- * @api
- */
-ol.geom.MultiPoint.prototype.appendPoint = function(point) {
-  if (!this.flatCoordinates) {
-    this.flatCoordinates = point.getFlatCoordinates().slice();
-  } else {
-    ol.array.extend(this.flatCoordinates, point.getFlatCoordinates());
-  }
-  this.changed();
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.MultiPoint} Clone.
- * @override
- * @api
- */
-ol.geom.MultiPoint.prototype.clone = function() {
-  var multiPoint = new ol.geom.MultiPoint(null);
-  multiPoint.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
-  return multiPoint;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiPoint.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  var flatCoordinates = this.flatCoordinates;
-  var stride = this.stride;
-  var i, ii, j;
-  for (i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
-    var squaredDistance = ol.math.squaredDistance(
-        x, y, flatCoordinates[i], flatCoordinates[i + 1]);
-    if (squaredDistance < minSquaredDistance) {
-      minSquaredDistance = squaredDistance;
-      for (j = 0; j < stride; ++j) {
-        closestPoint[j] = flatCoordinates[i + j];
-      }
-      closestPoint.length = stride;
-    }
-  }
-  return minSquaredDistance;
-};
-
-
-/**
- * Return the coordinates of the multipoint.
- * @return {Array.<ol.Coordinate>} Coordinates.
- * @override
- * @api
- */
-ol.geom.MultiPoint.prototype.getCoordinates = function() {
-  return ol.geom.flat.inflate.coordinates(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
-};
-
-
-/**
- * Return the point at the specified index.
- * @param {number} index Index.
- * @return {ol.geom.Point} Point.
- * @api
- */
-ol.geom.MultiPoint.prototype.getPoint = function(index) {
-  var n = !this.flatCoordinates ?
-      0 : this.flatCoordinates.length / this.stride;
-  if (index < 0 || n <= index) {
-    return null;
-  }
-  var point = new ol.geom.Point(null);
-  point.setFlatCoordinates(this.layout, this.flatCoordinates.slice(
-      index * this.stride, (index + 1) * this.stride));
-  return point;
-};
-
-
-/**
- * Return the points of this multipoint.
- * @return {Array.<ol.geom.Point>} Points.
- * @api
- */
-ol.geom.MultiPoint.prototype.getPoints = function() {
-  var flatCoordinates = this.flatCoordinates;
-  var layout = this.layout;
-  var stride = this.stride;
-  /** @type {Array.<ol.geom.Point>} */
-  var points = [];
-  var i, ii;
-  for (i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
-    var point = new ol.geom.Point(null);
-    point.setFlatCoordinates(layout, flatCoordinates.slice(i, i + stride));
-    points.push(point);
-  }
-  return points;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiPoint.prototype.getType = function() {
-  return ol.geom.GeometryType.MULTI_POINT;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiPoint.prototype.intersectsExtent = function(extent) {
-  var flatCoordinates = this.flatCoordinates;
-  var stride = this.stride;
-  var i, ii, x, y;
-  for (i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
-    x = flatCoordinates[i];
-    y = flatCoordinates[i + 1];
-    if (ol.extent.containsXY(extent, x, y)) {
-      return true;
-    }
-  }
-  return false;
-};
-
-
-/**
- * Set the coordinates of the multipoint.
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.MultiPoint.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
-  } else {
-    this.setLayout(opt_layout, coordinates, 1);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    this.flatCoordinates.length = ol.geom.flat.deflate.coordinates(
-        this.flatCoordinates, 0, coordinates, this.stride);
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- */
-ol.geom.MultiPoint.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.changed();
-};
-
-goog.provide('ol.geom.flat.center');
-
-goog.require('ol.extent');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @return {Array.<number>} Flat centers.
- */
-ol.geom.flat.center.linearRingss = function(flatCoordinates, offset, endss, stride) {
-  var flatCenters = [];
-  var i, ii;
-  var extent = ol.extent.createEmpty();
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    extent = ol.extent.createOrUpdateFromFlatCoordinates(
-        flatCoordinates, offset, ends[0], stride);
-    flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);
-    offset = ends[ends.length - 1];
-  }
-  return flatCenters;
-};
-
-goog.provide('ol.geom.MultiPolygon');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.area');
-goog.require('ol.geom.flat.center');
-goog.require('ol.geom.flat.closest');
-goog.require('ol.geom.flat.contains');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.interiorpoint');
-goog.require('ol.geom.flat.intersectsextent');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.geom.flat.simplify');
-
-
-/**
- * @classdesc
- * Multi-polygon geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.MultiPolygon = function(coordinates, opt_layout) {
-
-  ol.geom.SimpleGeometry.call(this);
-
-  /**
-   * @type {Array.<Array.<number>>}
-   * @private
-   */
-  this.endss_ = [];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.flatInteriorPointsRevision_ = -1;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.flatInteriorPoints_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDelta_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDeltaRevision_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.orientedRevision_ = -1;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.orientedFlatCoordinates_ = null;
-
-  this.setCoordinates(coordinates, opt_layout);
-
-};
-ol.inherits(ol.geom.MultiPolygon, ol.geom.SimpleGeometry);
-
-
-/**
- * Append the passed polygon to this multipolygon.
- * @param {ol.geom.Polygon} polygon Polygon.
- * @api
- */
-ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) {
-  /** @type {Array.<number>} */
-  var ends;
-  if (!this.flatCoordinates) {
-    this.flatCoordinates = polygon.getFlatCoordinates().slice();
-    ends = polygon.getEnds().slice();
-    this.endss_.push();
-  } else {
-    var offset = this.flatCoordinates.length;
-    ol.array.extend(this.flatCoordinates, polygon.getFlatCoordinates());
-    ends = polygon.getEnds().slice();
-    var i, ii;
-    for (i = 0, ii = ends.length; i < ii; ++i) {
-      ends[i] += offset;
-    }
-  }
-  this.endss_.push(ends);
-  this.changed();
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.MultiPolygon} Clone.
- * @override
- * @api
- */
-ol.geom.MultiPolygon.prototype.clone = function() {
-  var multiPolygon = new ol.geom.MultiPolygon(null);
-
-  var len = this.endss_.length;
-  var newEndss = new Array(len);
-  for (var i = 0; i < len; ++i) {
-    newEndss[i] = this.endss_[i].slice();
-  }
-
-  multiPolygon.setFlatCoordinates(
-      this.layout, this.flatCoordinates.slice(), newEndss);
-  return multiPolygon;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiPolygon.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  if (this.maxDeltaRevision_ != this.getRevision()) {
-    this.maxDelta_ = Math.sqrt(ol.geom.flat.closest.getssMaxSquaredDelta(
-        this.flatCoordinates, 0, this.endss_, this.stride, 0));
-    this.maxDeltaRevision_ = this.getRevision();
-  }
-  return ol.geom.flat.closest.getssClosestPoint(
-      this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride,
-      this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiPolygon.prototype.containsXY = function(x, y) {
-  return ol.geom.flat.contains.linearRingssContainsXY(
-      this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y);
-};
-
-
-/**
- * Return the area of the multipolygon on projected plane.
- * @return {number} Area (on projected plane).
- * @api
- */
-ol.geom.MultiPolygon.prototype.getArea = function() {
-  return ol.geom.flat.area.linearRingss(
-      this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride);
-};
-
-
-/**
- * Get the coordinate array for this geometry.  This array has the structure
- * of a GeoJSON coordinate array for multi-polygons.
- *
- * @param {boolean=} opt_right Orient coordinates according to the right-hand
- *     rule (counter-clockwise for exterior and clockwise for interior rings).
- *     If `false`, coordinates will be oriented according to the left-hand rule
- *     (clockwise for exterior and counter-clockwise for interior rings).
- *     By default, coordinate orientation will depend on how the geometry was
- *     constructed.
- * @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinates.
- * @override
- * @api
- */
-ol.geom.MultiPolygon.prototype.getCoordinates = function(opt_right) {
-  var flatCoordinates;
-  if (opt_right !== undefined) {
-    flatCoordinates = this.getOrientedFlatCoordinates().slice();
-    ol.geom.flat.orient.orientLinearRingss(
-        flatCoordinates, 0, this.endss_, this.stride, opt_right);
-  } else {
-    flatCoordinates = this.flatCoordinates;
-  }
-
-  return ol.geom.flat.inflate.coordinatesss(
-      flatCoordinates, 0, this.endss_, this.stride);
-};
-
-
-/**
- * @return {Array.<Array.<number>>} Endss.
- */
-ol.geom.MultiPolygon.prototype.getEndss = function() {
-  return this.endss_;
-};
-
-
-/**
- * @return {Array.<number>} Flat interior points.
- */
-ol.geom.MultiPolygon.prototype.getFlatInteriorPoints = function() {
-  if (this.flatInteriorPointsRevision_ != this.getRevision()) {
-    var flatCenters = ol.geom.flat.center.linearRingss(
-        this.flatCoordinates, 0, this.endss_, this.stride);
-    this.flatInteriorPoints_ = ol.geom.flat.interiorpoint.linearRingss(
-        this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride,
-        flatCenters);
-    this.flatInteriorPointsRevision_ = this.getRevision();
-  }
-  return this.flatInteriorPoints_;
-};
-
-
-/**
- * Return the interior points as {@link ol.geom.MultiPoint multipoint}.
- * @return {ol.geom.MultiPoint} Interior points.
- * @api
- */
-ol.geom.MultiPolygon.prototype.getInteriorPoints = function() {
-  var interiorPoints = new ol.geom.MultiPoint(null);
-  interiorPoints.setFlatCoordinates(ol.geom.GeometryLayout.XY,
-      this.getFlatInteriorPoints().slice());
-  return interiorPoints;
-};
-
-
-/**
- * @return {Array.<number>} Oriented flat coordinates.
- */
-ol.geom.MultiPolygon.prototype.getOrientedFlatCoordinates = function() {
-  if (this.orientedRevision_ != this.getRevision()) {
-    var flatCoordinates = this.flatCoordinates;
-    if (ol.geom.flat.orient.linearRingssAreOriented(
-        flatCoordinates, 0, this.endss_, this.stride)) {
-      this.orientedFlatCoordinates_ = flatCoordinates;
-    } else {
-      this.orientedFlatCoordinates_ = flatCoordinates.slice();
-      this.orientedFlatCoordinates_.length =
-          ol.geom.flat.orient.orientLinearRingss(
-              this.orientedFlatCoordinates_, 0, this.endss_, this.stride);
-    }
-    this.orientedRevision_ = this.getRevision();
-  }
-  return this.orientedFlatCoordinates_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  var simplifiedFlatCoordinates = [];
-  var simplifiedEndss = [];
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.quantizess(
-      this.flatCoordinates, 0, this.endss_, this.stride,
-      Math.sqrt(squaredTolerance),
-      simplifiedFlatCoordinates, 0, simplifiedEndss);
-  var simplifiedMultiPolygon = new ol.geom.MultiPolygon(null);
-  simplifiedMultiPolygon.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, simplifiedFlatCoordinates, simplifiedEndss);
-  return simplifiedMultiPolygon;
-};
-
-
-/**
- * Return the polygon at the specified index.
- * @param {number} index Index.
- * @return {ol.geom.Polygon} Polygon.
- * @api
- */
-ol.geom.MultiPolygon.prototype.getPolygon = function(index) {
-  if (index < 0 || this.endss_.length <= index) {
-    return null;
-  }
-  var offset;
-  if (index === 0) {
-    offset = 0;
-  } else {
-    var prevEnds = this.endss_[index - 1];
-    offset = prevEnds[prevEnds.length - 1];
-  }
-  var ends = this.endss_[index].slice();
-  var end = ends[ends.length - 1];
-  if (offset !== 0) {
-    var i, ii;
-    for (i = 0, ii = ends.length; i < ii; ++i) {
-      ends[i] -= offset;
-    }
-  }
-  var polygon = new ol.geom.Polygon(null);
-  polygon.setFlatCoordinates(
-      this.layout, this.flatCoordinates.slice(offset, end), ends);
-  return polygon;
-};
-
-
-/**
- * Return the polygons of this multipolygon.
- * @return {Array.<ol.geom.Polygon>} Polygons.
- * @api
- */
-ol.geom.MultiPolygon.prototype.getPolygons = function() {
-  var layout = this.layout;
-  var flatCoordinates = this.flatCoordinates;
-  var endss = this.endss_;
-  var polygons = [];
-  var offset = 0;
-  var i, ii, j, jj;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i].slice();
-    var end = ends[ends.length - 1];
-    if (offset !== 0) {
-      for (j = 0, jj = ends.length; j < jj; ++j) {
-        ends[j] -= offset;
-      }
-    }
-    var polygon = new ol.geom.Polygon(null);
-    polygon.setFlatCoordinates(
-        layout, flatCoordinates.slice(offset, end), ends);
-    polygons.push(polygon);
-    offset = end;
-  }
-  return polygons;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiPolygon.prototype.getType = function() {
-  return ol.geom.GeometryType.MULTI_POLYGON;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiPolygon.prototype.intersectsExtent = function(extent) {
-  return ol.geom.flat.intersectsextent.linearRingss(
-      this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, extent);
-};
-
-
-/**
- * Set the coordinates of the multipolygon.
- * @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.MultiPolygon.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.endss_);
-  } else {
-    this.setLayout(opt_layout, coordinates, 3);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    var endss = ol.geom.flat.deflate.coordinatesss(
-        this.flatCoordinates, 0, coordinates, this.stride, this.endss_);
-    if (endss.length === 0) {
-      this.flatCoordinates.length = 0;
-    } else {
-      var lastEnds = endss[endss.length - 1];
-      this.flatCoordinates.length = lastEnds.length === 0 ?
-          0 : lastEnds[lastEnds.length - 1];
-    }
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {Array.<Array.<number>>} endss Endss.
- */
-ol.geom.MultiPolygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, endss) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.endss_ = endss;
-  this.changed();
-};
-
-
-/**
- * @param {Array.<ol.geom.Polygon>} polygons Polygons.
- */
-ol.geom.MultiPolygon.prototype.setPolygons = function(polygons) {
-  var layout = this.getLayout();
-  var flatCoordinates = [];
-  var endss = [];
-  var i, ii, ends;
-  for (i = 0, ii = polygons.length; i < ii; ++i) {
-    var polygon = polygons[i];
-    if (i === 0) {
-      layout = polygon.getLayout();
-    }
-    var offset = flatCoordinates.length;
-    ends = polygon.getEnds();
-    var j, jj;
-    for (j = 0, jj = ends.length; j < jj; ++j) {
-      ends[j] += offset;
-    }
-    ol.array.extend(flatCoordinates, polygon.getFlatCoordinates());
-    endss.push(ends);
-  }
-  this.setFlatCoordinates(layout, flatCoordinates, endss);
-};
-
-goog.provide('ol.format.EsriJSON');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.asserts');
-goog.require('ol.extent');
-goog.require('ol.format.Feature');
-goog.require('ol.format.JSONFeature');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.LinearRing');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.obj');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the EsriJSON format.
- *
- * @constructor
- * @extends {ol.format.JSONFeature}
- * @param {olx.format.EsriJSONOptions=} opt_options Options.
- * @api
- */
-ol.format.EsriJSON = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.JSONFeature.call(this);
-
-  /**
-   * Name of the geometry attribute for features.
-   * @type {string|undefined}
-   * @private
-   */
-  this.geometryName_ = options.geometryName;
-
-};
-ol.inherits(ol.format.EsriJSON, ol.format.JSONFeature);
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @private
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.EsriJSON.readGeometry_ = function(object, opt_options) {
-  if (!object) {
-    return null;
-  }
-  /** @type {ol.geom.GeometryType} */
-  var type;
-  if (typeof object.x === 'number' && typeof object.y === 'number') {
-    type = ol.geom.GeometryType.POINT;
-  } else if (object.points) {
-    type = ol.geom.GeometryType.MULTI_POINT;
-  } else if (object.paths) {
-    if (object.paths.length === 1) {
-      type = ol.geom.GeometryType.LINE_STRING;
-    } else {
-      type = ol.geom.GeometryType.MULTI_LINE_STRING;
-    }
-  } else if (object.rings) {
-    var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-    var rings = ol.format.EsriJSON.convertRings_(object.rings, layout);
-    object = /** @type {EsriJSONGeometry} */(ol.obj.assign({}, object));
-    if (rings.length === 1) {
-      type = ol.geom.GeometryType.POLYGON;
-      object.rings = rings[0];
-    } else {
-      type = ol.geom.GeometryType.MULTI_POLYGON;
-      object.rings = rings;
-    }
-  }
-  var geometryReader = ol.format.EsriJSON.GEOMETRY_READERS_[type];
-  return /** @type {ol.geom.Geometry} */ (
-      ol.format.Feature.transformWithOptions(
-          geometryReader(object), false, opt_options));
-};
-
-
-/**
- * Determines inner and outer rings.
- * Checks if any polygons in this array contain any other polygons in this
- * array. It is used for checking for holes.
- * Logic inspired by: https://github.com/Esri/terraformer-arcgis-parser
- * @param {Array.<!Array.<!Array.<number>>>} rings Rings.
- * @param {ol.geom.GeometryLayout} layout Geometry layout.
- * @private
- * @return {Array.<!Array.<!Array.<number>>>} Transformed rings.
- */
-ol.format.EsriJSON.convertRings_ = function(rings, layout) {
-  var flatRing = [];
-  var outerRings = [];
-  var holes = [];
-  var i, ii;
-  for (i = 0, ii = rings.length; i < ii; ++i) {
-    flatRing.length = 0;
-    ol.geom.flat.deflate.coordinates(flatRing, 0, rings[i], layout.length);
-    // is this ring an outer ring? is it clockwise?
-    var clockwise = ol.geom.flat.orient.linearRingIsClockwise(flatRing, 0,
-        flatRing.length, layout.length);
-    if (clockwise) {
-      outerRings.push([rings[i]]);
-    } else {
-      holes.push(rings[i]);
-    }
-  }
-  while (holes.length) {
-    var hole = holes.shift();
-    var matched = false;
-    // loop over all outer rings and see if they contain our hole.
-    for (i = outerRings.length - 1; i >= 0; i--) {
-      var outerRing = outerRings[i][0];
-      if (ol.extent.containsExtent(new ol.geom.LinearRing(
-          outerRing).getExtent(),
-          new ol.geom.LinearRing(hole).getExtent())) {
-        // the hole is contained push it into our polygon
-        outerRings[i].push(hole);
-        matched = true;
-        break;
-      }
-    }
-    if (!matched) {
-      // no outer rings contain this hole turn it into and outer
-      // ring (reverse it)
-      outerRings.push([hole.reverse()]);
-    }
-  }
-  return outerRings;
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} Point.
- */
-ol.format.EsriJSON.readPointGeometry_ = function(object) {
-  var point;
-  if (object.m !== undefined && object.z !== undefined) {
-    point = new ol.geom.Point([object.x, object.y, object.z, object.m],
-        ol.geom.GeometryLayout.XYZM);
-  } else if (object.z !== undefined) {
-    point = new ol.geom.Point([object.x, object.y, object.z],
-        ol.geom.GeometryLayout.XYZ);
-  } else if (object.m !== undefined) {
-    point = new ol.geom.Point([object.x, object.y, object.m],
-        ol.geom.GeometryLayout.XYM);
-  } else {
-    point = new ol.geom.Point([object.x, object.y]);
-  }
-  return point;
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} LineString.
- */
-ol.format.EsriJSON.readLineStringGeometry_ = function(object) {
-  var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-  return new ol.geom.LineString(object.paths[0], layout);
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} MultiLineString.
- */
-ol.format.EsriJSON.readMultiLineStringGeometry_ = function(object) {
-  var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-  return new ol.geom.MultiLineString(object.paths, layout);
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.GeometryLayout} The geometry layout to use.
- */
-ol.format.EsriJSON.getGeometryLayout_ = function(object) {
-  var layout = ol.geom.GeometryLayout.XY;
-  if (object.hasZ === true && object.hasM === true) {
-    layout = ol.geom.GeometryLayout.XYZM;
-  } else if (object.hasZ === true) {
-    layout = ol.geom.GeometryLayout.XYZ;
-  } else if (object.hasM === true) {
-    layout = ol.geom.GeometryLayout.XYM;
-  }
-  return layout;
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} MultiPoint.
- */
-ol.format.EsriJSON.readMultiPointGeometry_ = function(object) {
-  var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-  return new ol.geom.MultiPoint(object.points, layout);
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} MultiPolygon.
- */
-ol.format.EsriJSON.readMultiPolygonGeometry_ = function(object) {
-  var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-  return new ol.geom.MultiPolygon(
-      /** @type {Array.<Array.<Array.<Array.<number>>>>} */(object.rings),
-      layout);
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} Polygon.
- */
-ol.format.EsriJSON.readPolygonGeometry_ = function(object) {
-  var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-  return new ol.geom.Polygon(object.rings, layout);
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONGeometry} EsriJSON geometry.
- */
-ol.format.EsriJSON.writePointGeometry_ = function(geometry, opt_options) {
-  var coordinates = /** @type {ol.geom.Point} */ (geometry).getCoordinates();
-  var esriJSON;
-  var layout = /** @type {ol.geom.Point} */ (geometry).getLayout();
-  if (layout === ol.geom.GeometryLayout.XYZ) {
-    esriJSON = /** @type {EsriJSONPoint} */ ({
-      x: coordinates[0],
-      y: coordinates[1],
-      z: coordinates[2]
-    });
-  } else if (layout === ol.geom.GeometryLayout.XYM) {
-    esriJSON = /** @type {EsriJSONPoint} */ ({
-      x: coordinates[0],
-      y: coordinates[1],
-      m: coordinates[2]
-    });
-  } else if (layout === ol.geom.GeometryLayout.XYZM) {
-    esriJSON = /** @type {EsriJSONPoint} */ ({
-      x: coordinates[0],
-      y: coordinates[1],
-      z: coordinates[2],
-      m: coordinates[3]
-    });
-  } else if (layout === ol.geom.GeometryLayout.XY) {
-    esriJSON = /** @type {EsriJSONPoint} */ ({
-      x: coordinates[0],
-      y: coordinates[1]
-    });
-  } else {
-    ol.asserts.assert(false, 34); // Invalid geometry layout
-  }
-  return /** @type {EsriJSONGeometry} */ (esriJSON);
-};
-
-
-/**
- * @param {ol.geom.SimpleGeometry} geometry Geometry.
- * @private
- * @return {Object} Object with boolean hasZ and hasM keys.
- */
-ol.format.EsriJSON.getHasZM_ = function(geometry) {
-  var layout = geometry.getLayout();
-  return {
-    hasZ: (layout === ol.geom.GeometryLayout.XYZ ||
-        layout === ol.geom.GeometryLayout.XYZM),
-    hasM: (layout === ol.geom.GeometryLayout.XYM ||
-        layout === ol.geom.GeometryLayout.XYZM)
-  };
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONPolyline} EsriJSON geometry.
- */
-ol.format.EsriJSON.writeLineStringGeometry_ = function(geometry, opt_options) {
-  var hasZM = ol.format.EsriJSON.getHasZM_(/** @type {ol.geom.LineString} */ (geometry));
-  return /** @type {EsriJSONPolyline} */ ({
-    hasZ: hasZM.hasZ,
-    hasM: hasZM.hasM,
-    paths: [
-      /** @type {ol.geom.LineString} */ (geometry).getCoordinates()
-    ]
-  });
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONPolygon} EsriJSON geometry.
- */
-ol.format.EsriJSON.writePolygonGeometry_ = function(geometry, opt_options) {
-  // Esri geometries use the left-hand rule
-  var hasZM = ol.format.EsriJSON.getHasZM_(/** @type {ol.geom.Polygon} */ (geometry));
-  return /** @type {EsriJSONPolygon} */ ({
-    hasZ: hasZM.hasZ,
-    hasM: hasZM.hasM,
-    rings: /** @type {ol.geom.Polygon} */ (geometry).getCoordinates(false)
-  });
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONPolyline} EsriJSON geometry.
- */
-ol.format.EsriJSON.writeMultiLineStringGeometry_ = function(geometry, opt_options) {
-  var hasZM = ol.format.EsriJSON.getHasZM_(/** @type {ol.geom.MultiLineString} */ (geometry));
-  return /** @type {EsriJSONPolyline} */ ({
-    hasZ: hasZM.hasZ,
-    hasM: hasZM.hasM,
-    paths: /** @type {ol.geom.MultiLineString} */ (geometry).getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONMultipoint} EsriJSON geometry.
- */
-ol.format.EsriJSON.writeMultiPointGeometry_ = function(geometry, opt_options) {
-  var hasZM = ol.format.EsriJSON.getHasZM_(/** @type {ol.geom.MultiPoint} */ (geometry));
-  return /** @type {EsriJSONMultipoint} */ ({
-    hasZ: hasZM.hasZ,
-    hasM: hasZM.hasM,
-    points: /** @type {ol.geom.MultiPoint} */ (geometry).getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONPolygon} EsriJSON geometry.
- */
-ol.format.EsriJSON.writeMultiPolygonGeometry_ = function(geometry,
-    opt_options) {
-  var hasZM = ol.format.EsriJSON.getHasZM_(/** @type {ol.geom.MultiPolygon} */ (geometry));
-  var coordinates = /** @type {ol.geom.MultiPolygon} */ (geometry).getCoordinates(false);
-  var output = [];
-  for (var i = 0; i < coordinates.length; i++) {
-    for (var x = coordinates[i].length - 1; x >= 0; x--) {
-      output.push(coordinates[i][x]);
-    }
-  }
-  return /** @type {EsriJSONPolygon} */ ({
-    hasZ: hasZM.hasZ,
-    hasM: hasZM.hasM,
-    rings: output
-  });
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<ol.geom.GeometryType, function(EsriJSONGeometry): ol.geom.Geometry>}
- */
-ol.format.EsriJSON.GEOMETRY_READERS_ = {};
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.POINT] =
-    ol.format.EsriJSON.readPointGeometry_;
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.LINE_STRING] =
-    ol.format.EsriJSON.readLineStringGeometry_;
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.POLYGON] =
-    ol.format.EsriJSON.readPolygonGeometry_;
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.MULTI_POINT] =
-    ol.format.EsriJSON.readMultiPointGeometry_;
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.MULTI_LINE_STRING] =
-    ol.format.EsriJSON.readMultiLineStringGeometry_;
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.MULTI_POLYGON] =
-    ol.format.EsriJSON.readMultiPolygonGeometry_;
-
-
-/**
- * @const
- * @private
- * @type {Object.<string, function(ol.geom.Geometry, olx.format.WriteOptions=): (EsriJSONGeometry)>}
- */
-ol.format.EsriJSON.GEOMETRY_WRITERS_ = {};
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.POINT] =
-    ol.format.EsriJSON.writePointGeometry_;
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.LINE_STRING] =
-    ol.format.EsriJSON.writeLineStringGeometry_;
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.POLYGON] =
-    ol.format.EsriJSON.writePolygonGeometry_;
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.MULTI_POINT] =
-    ol.format.EsriJSON.writeMultiPointGeometry_;
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.MULTI_LINE_STRING] =
-    ol.format.EsriJSON.writeMultiLineStringGeometry_;
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.MULTI_POLYGON] =
-    ol.format.EsriJSON.writeMultiPolygonGeometry_;
-
-
-/**
- * Read a feature from a EsriJSON Feature source.  Only works for Feature,
- * use `readFeatures` to read FeatureCollection source.
- *
- * @function
- * @param {ArrayBuffer|Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.EsriJSON.prototype.readFeature;
-
-
-/**
- * Read all features from a EsriJSON source.  Works with both Feature and
- * FeatureCollection sources.
- *
- * @function
- * @param {ArrayBuffer|Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.EsriJSON.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.EsriJSON.prototype.readFeatureFromObject = function(
-    object, opt_options) {
-  var esriJSONFeature = /** @type {EsriJSONFeature} */ (object);
-  var geometry = ol.format.EsriJSON.readGeometry_(esriJSONFeature.geometry,
-      opt_options);
-  var feature = new ol.Feature();
-  if (this.geometryName_) {
-    feature.setGeometryName(this.geometryName_);
-  }
-  feature.setGeometry(geometry);
-  if (opt_options && opt_options.idField &&
-      esriJSONFeature.attributes[opt_options.idField]) {
-    feature.setId(/** @type {number} */(
-        esriJSONFeature.attributes[opt_options.idField]));
-  }
-  if (esriJSONFeature.attributes) {
-    feature.setProperties(esriJSONFeature.attributes);
-  }
-  return feature;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.EsriJSON.prototype.readFeaturesFromObject = function(
-    object, opt_options) {
-  var esriJSONObject = /** @type {EsriJSONObject} */ (object);
-  var options = opt_options ? opt_options : {};
-  if (esriJSONObject.features) {
-    var esriJSONFeatureCollection = /** @type {EsriJSONFeatureCollection} */
-        (object);
-    /** @type {Array.<ol.Feature>} */
-    var features = [];
-    var esriJSONFeatures = esriJSONFeatureCollection.features;
-    var i, ii;
-    options.idField = object.objectIdFieldName;
-    for (i = 0, ii = esriJSONFeatures.length; i < ii; ++i) {
-      features.push(this.readFeatureFromObject(esriJSONFeatures[i],
-          options));
-    }
-    return features;
-  } else {
-    return [this.readFeatureFromObject(object, options)];
-  }
-};
-
-
-/**
- * Read a geometry from a EsriJSON source.
- *
- * @function
- * @param {ArrayBuffer|Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.geom.Geometry} Geometry.
- * @api
- */
-ol.format.EsriJSON.prototype.readGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.EsriJSON.prototype.readGeometryFromObject = function(
-    object, opt_options) {
-  return ol.format.EsriJSON.readGeometry_(
-      /** @type {EsriJSONGeometry} */ (object), opt_options);
-};
-
-
-/**
- * Read the projection from a EsriJSON source.
- *
- * @function
- * @param {ArrayBuffer|Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.EsriJSON.prototype.readProjection;
-
-
-/**
- * @inheritDoc
- */
-ol.format.EsriJSON.prototype.readProjectionFromObject = function(object) {
-  var esriJSONObject = /** @type {EsriJSONObject} */ (object);
-  if (esriJSONObject.spatialReference && esriJSONObject.spatialReference.wkid) {
-    var crs = esriJSONObject.spatialReference.wkid;
-    return ol.proj.get('EPSG:' + crs);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONGeometry} EsriJSON geometry.
- */
-ol.format.EsriJSON.writeGeometry_ = function(geometry, opt_options) {
-  var geometryWriter = ol.format.EsriJSON.GEOMETRY_WRITERS_[geometry.getType()];
-  return geometryWriter(/** @type {ol.geom.Geometry} */ (
-      ol.format.Feature.transformWithOptions(geometry, true, opt_options)),
-      opt_options);
-};
-
-
-/**
- * Encode a geometry as a EsriJSON string.
- *
- * @function
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} EsriJSON.
- * @api
- */
-ol.format.EsriJSON.prototype.writeGeometry;
-
-
-/**
- * Encode a geometry as a EsriJSON object.
- *
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {EsriJSONGeometry} Object.
- * @override
- * @api
- */
-ol.format.EsriJSON.prototype.writeGeometryObject = function(geometry,
-    opt_options) {
-  return ol.format.EsriJSON.writeGeometry_(geometry,
-      this.adaptOptions(opt_options));
-};
-
-
-/**
- * Encode a feature as a EsriJSON Feature string.
- *
- * @function
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} EsriJSON.
- * @api
- */
-ol.format.EsriJSON.prototype.writeFeature;
-
-
-/**
- * Encode a feature as a esriJSON Feature object.
- *
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {Object} Object.
- * @override
- * @api
- */
-ol.format.EsriJSON.prototype.writeFeatureObject = function(
-    feature, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var object = {};
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    object['geometry'] =
-        ol.format.EsriJSON.writeGeometry_(geometry, opt_options);
-  }
-  var properties = feature.getProperties();
-  delete properties[feature.getGeometryName()];
-  if (!ol.obj.isEmpty(properties)) {
-    object['attributes'] = properties;
-  } else {
-    object['attributes'] = {};
-  }
-  if (opt_options && opt_options.featureProjection) {
-    object['spatialReference'] = /** @type {EsriJSONCRS} */({
-      wkid: ol.proj.get(
-          opt_options.featureProjection).getCode().split(':').pop()
-    });
-  }
-  return object;
-};
-
-
-/**
- * Encode an array of features as EsriJSON.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} EsriJSON.
- * @api
- */
-ol.format.EsriJSON.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features as a EsriJSON object.
- *
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {Object} EsriJSON Object.
- * @override
- * @api
- */
-ol.format.EsriJSON.prototype.writeFeaturesObject = function(features, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var objects = [];
-  var i, ii;
-  for (i = 0, ii = features.length; i < ii; ++i) {
-    objects.push(this.writeFeatureObject(features[i], opt_options));
-  }
-  return /** @type {EsriJSONFeatureCollection} */ ({
-    'features': objects
-  });
-};
-
-goog.provide('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Abstract class; normally only used for creating subclasses and not instantiated in apps.
- * Base class for WFS GetFeature filters.
- *
- * @constructor
- * @param {!string} tagName The XML tag name for this filter.
- * @struct
- * @api
- */
-ol.format.filter.Filter = function(tagName) {
-
-  /**
-   * @private
-   * @type {!string}
-   */
-  this.tagName_ = tagName;
-};
-
-/**
- * The XML tag name for a filter.
- * @returns {!string} Name.
- */
-ol.format.filter.Filter.prototype.getTagName = function() {
-  return this.tagName_;
-};
-
-goog.provide('ol.format.filter.LogicalNary');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Abstract class; normally only used for creating subclasses and not instantiated in apps.
- * Base class for WFS GetFeature n-ary logical filters.
- *
- * @constructor
- * @param {!string} tagName The XML tag name for this filter.
- * @param {...ol.format.filter.Filter} conditions Conditions.
- * @extends {ol.format.filter.Filter}
- */
-ol.format.filter.LogicalNary = function(tagName, conditions) {
-
-  ol.format.filter.Filter.call(this, tagName);
-
-  /**
-   * @public
-   * @type {Array.<ol.format.filter.Filter>}
-   */
-  this.conditions = Array.prototype.slice.call(arguments, 1);
-  ol.asserts.assert(this.conditions.length >= 2, 57); // At least 2 conditions are required.
-};
-ol.inherits(ol.format.filter.LogicalNary, ol.format.filter.Filter);
-
-goog.provide('ol.format.filter.And');
-
-goog.require('ol');
-goog.require('ol.format.filter.LogicalNary');
-
-/**
- * @classdesc
- * Represents a logical `<And>` operator between two or more filter conditions.
- *
- * @constructor
- * @param {...ol.format.filter.Filter} conditions Conditions.
- * @extends {ol.format.filter.LogicalNary}
- * @api
- */
-ol.format.filter.And = function(conditions) {
-  var params = ['And'].concat(Array.prototype.slice.call(arguments));
-  ol.format.filter.LogicalNary.apply(this, params);
-};
-ol.inherits(ol.format.filter.And, ol.format.filter.LogicalNary);
-
-goog.provide('ol.format.filter.Bbox');
-
-goog.require('ol');
-goog.require('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Represents a `<BBOX>` operator to test whether a geometry-valued property
- * intersects a fixed bounding box
- *
- * @constructor
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.Extent} extent Extent.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @extends {ol.format.filter.Filter}
- * @api
- */
-ol.format.filter.Bbox = function(geometryName, extent, opt_srsName) {
-
-  ol.format.filter.Filter.call(this, 'BBOX');
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.geometryName = geometryName;
-
-  /**
-   * @public
-   * @type {ol.Extent}
-   */
-  this.extent = extent;
-
-  /**
-   * @public
-   * @type {string|undefined}
-   */
-  this.srsName = opt_srsName;
-};
-ol.inherits(ol.format.filter.Bbox, ol.format.filter.Filter);
-
-goog.provide('ol.format.filter.Comparison');
-
-goog.require('ol');
-goog.require('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Abstract class; normally only used for creating subclasses and not instantiated in apps.
- * Base class for WFS GetFeature property comparison filters.
- *
- * @constructor
- * @param {!string} tagName The XML tag name for this filter.
- * @param {!string} propertyName Name of the context property to compare.
- * @extends {ol.format.filter.Filter}
- * @api
- */
-ol.format.filter.Comparison = function(tagName, propertyName) {
-
-  ol.format.filter.Filter.call(this, tagName);
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.propertyName = propertyName;
-};
-ol.inherits(ol.format.filter.Comparison, ol.format.filter.Filter);
-
-goog.provide('ol.format.filter.During');
-
-goog.require('ol');
-goog.require('ol.format.filter.Comparison');
-
-
-/**
- * @classdesc
- * Represents a `<During>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!string} begin The begin date in ISO-8601 format.
- * @param {!string} end The end date in ISO-8601 format.
- * @extends {ol.format.filter.Comparison}
- * @api
- */
-ol.format.filter.During = function(propertyName, begin, end) {
-  ol.format.filter.Comparison.call(this, 'During', propertyName);
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.begin = begin;
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.end = end;
-};
-ol.inherits(ol.format.filter.During, ol.format.filter.Comparison);
-
-goog.provide('ol.format.filter.ComparisonBinary');
-
-goog.require('ol');
-goog.require('ol.format.filter.Comparison');
-
-
-/**
- * @classdesc
- * Abstract class; normally only used for creating subclasses and not instantiated in apps.
- * Base class for WFS GetFeature property binary comparison filters.
- *
- * @constructor
- * @param {!string} tagName The XML tag name for this filter.
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!(string|number)} expression The value to compare.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @extends {ol.format.filter.Comparison}
- * @api
- */
-ol.format.filter.ComparisonBinary = function(
-    tagName, propertyName, expression, opt_matchCase) {
-
-  ol.format.filter.Comparison.call(this, tagName, propertyName);
-
-  /**
-   * @public
-   * @type {!(string|number)}
-   */
-  this.expression = expression;
-
-  /**
-   * @public
-   * @type {boolean|undefined}
-   */
-  this.matchCase = opt_matchCase;
-};
-ol.inherits(ol.format.filter.ComparisonBinary, ol.format.filter.Comparison);
-
-goog.provide('ol.format.filter.EqualTo');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsEqualTo>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!(string|number)} expression The value to compare.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.EqualTo = function(propertyName, expression, opt_matchCase) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsEqualTo', propertyName, expression, opt_matchCase);
-};
-ol.inherits(ol.format.filter.EqualTo, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.GreaterThan');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsGreaterThan>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.GreaterThan = function(propertyName, expression) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsGreaterThan', propertyName, expression);
-};
-ol.inherits(ol.format.filter.GreaterThan, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.GreaterThanOrEqualTo');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.GreaterThanOrEqualTo = function(propertyName, expression) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsGreaterThanOrEqualTo', propertyName, expression);
-};
-ol.inherits(ol.format.filter.GreaterThanOrEqualTo, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.Spatial');
-
-goog.require('ol');
-goog.require('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Represents a spatial operator to test whether a geometry-valued property
- * relates to a given geometry.
- *
- * @constructor
- * @param {!string} tagName The XML tag name for this filter.
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @extends {ol.format.filter.Filter}
- * @api
- */
-ol.format.filter.Spatial = function(tagName, geometryName, geometry, opt_srsName) {
-
-  ol.format.filter.Filter.call(this, tagName);
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.geometryName = geometryName || 'the_geom';
-
-  /**
-   * @public
-   * @type {ol.geom.Geometry}
-   */
-  this.geometry = geometry;
-
-  /**
-   * @public
-   * @type {string|undefined}
-   */
-  this.srsName = opt_srsName;
-};
-ol.inherits(ol.format.filter.Spatial, ol.format.filter.Filter);
-
-goog.provide('ol.format.filter.Intersects');
-
-goog.require('ol');
-goog.require('ol.format.filter.Spatial');
-
-
-/**
- * @classdesc
- * Represents a `<Intersects>` operator to test whether a geometry-valued property
- * intersects a given geometry.
- *
- * @constructor
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @extends {ol.format.filter.Spatial}
- * @api
- */
-ol.format.filter.Intersects = function(geometryName, geometry, opt_srsName) {
-
-  ol.format.filter.Spatial.call(this, 'Intersects', geometryName, geometry, opt_srsName);
-
-};
-ol.inherits(ol.format.filter.Intersects, ol.format.filter.Spatial);
-
-goog.provide('ol.format.filter.IsBetween');
-
-goog.require('ol');
-goog.require('ol.format.filter.Comparison');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsBetween>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} lowerBoundary The lower bound of the range.
- * @param {!number} upperBoundary The upper bound of the range.
- * @extends {ol.format.filter.Comparison}
- * @api
- */
-ol.format.filter.IsBetween = function(propertyName, lowerBoundary, upperBoundary) {
-  ol.format.filter.Comparison.call(this, 'PropertyIsBetween', propertyName);
-
-  /**
-   * @public
-   * @type {!number}
-   */
-  this.lowerBoundary = lowerBoundary;
-
-  /**
-   * @public
-   * @type {!number}
-   */
-  this.upperBoundary = upperBoundary;
-};
-ol.inherits(ol.format.filter.IsBetween, ol.format.filter.Comparison);
-
-goog.provide('ol.format.filter.IsLike');
-
-goog.require('ol');
-goog.require('ol.format.filter.Comparison');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsLike>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!string} pattern Text pattern.
- * @param {string=} opt_wildCard Pattern character which matches any sequence of
- *    zero or more string characters. Default is '*'.
- * @param {string=} opt_singleChar pattern character which matches any single
- *    string character. Default is '.'.
- * @param {string=} opt_escapeChar Escape character which can be used to escape
- *    the pattern characters. Default is '!'.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @extends {ol.format.filter.Comparison}
- * @api
- */
-ol.format.filter.IsLike = function(propertyName, pattern,
-    opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {
-  ol.format.filter.Comparison.call(this, 'PropertyIsLike', propertyName);
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.pattern = pattern;
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.wildCard = (opt_wildCard !== undefined) ? opt_wildCard : '*';
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.singleChar = (opt_singleChar !== undefined) ? opt_singleChar : '.';
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.escapeChar = (opt_escapeChar !== undefined) ? opt_escapeChar : '!';
-
-  /**
-   * @public
-   * @type {boolean|undefined}
-   */
-  this.matchCase = opt_matchCase;
-};
-ol.inherits(ol.format.filter.IsLike, ol.format.filter.Comparison);
-
-goog.provide('ol.format.filter.IsNull');
-
-goog.require('ol');
-goog.require('ol.format.filter.Comparison');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsNull>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @extends {ol.format.filter.Comparison}
- * @api
- */
-ol.format.filter.IsNull = function(propertyName) {
-  ol.format.filter.Comparison.call(this, 'PropertyIsNull', propertyName);
-};
-ol.inherits(ol.format.filter.IsNull, ol.format.filter.Comparison);
-
-goog.provide('ol.format.filter.LessThan');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsLessThan>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.LessThan = function(propertyName, expression) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsLessThan', propertyName, expression);
-};
-ol.inherits(ol.format.filter.LessThan, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.LessThanOrEqualTo');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsLessThanOrEqualTo>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.LessThanOrEqualTo = function(propertyName, expression) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsLessThanOrEqualTo', propertyName, expression);
-};
-ol.inherits(ol.format.filter.LessThanOrEqualTo, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.Not');
-
-goog.require('ol');
-goog.require('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Represents a logical `<Not>` operator for a filter condition.
- *
- * @constructor
- * @param {!ol.format.filter.Filter} condition Filter condition.
- * @extends {ol.format.filter.Filter}
- * @api
- */
-ol.format.filter.Not = function(condition) {
-
-  ol.format.filter.Filter.call(this, 'Not');
-
-  /**
-   * @public
-   * @type {!ol.format.filter.Filter}
-   */
-  this.condition = condition;
-};
-ol.inherits(ol.format.filter.Not, ol.format.filter.Filter);
-
-goog.provide('ol.format.filter.NotEqualTo');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsNotEqualTo>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!(string|number)} expression The value to compare.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.NotEqualTo = function(propertyName, expression, opt_matchCase) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsNotEqualTo', propertyName, expression, opt_matchCase);
-};
-ol.inherits(ol.format.filter.NotEqualTo, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.Or');
-
-goog.require('ol');
-goog.require('ol.format.filter.LogicalNary');
-
-
-/**
- * @classdesc
- * Represents a logical `<Or>` operator between two ore more filter conditions.
- *
- * @constructor
- * @param {...ol.format.filter.Filter} conditions Conditions.
- * @extends {ol.format.filter.LogicalNary}
- * @api
- */
-ol.format.filter.Or = function(conditions) {
-  var params = ['Or'].concat(Array.prototype.slice.call(arguments));
-  ol.format.filter.LogicalNary.apply(this, params);
-};
-ol.inherits(ol.format.filter.Or, ol.format.filter.LogicalNary);
-
-goog.provide('ol.format.filter.Within');
-
-goog.require('ol');
-goog.require('ol.format.filter.Spatial');
-
-
-/**
- * @classdesc
- * Represents a `<Within>` operator to test whether a geometry-valued property
- * is within a given geometry.
- *
- * @constructor
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @extends {ol.format.filter.Spatial}
- * @api
- */
-ol.format.filter.Within = function(geometryName, geometry, opt_srsName) {
-
-  ol.format.filter.Spatial.call(this, 'Within', geometryName, geometry, opt_srsName);
-
-};
-ol.inherits(ol.format.filter.Within, ol.format.filter.Spatial);
-
-goog.provide('ol.format.filter');
-
-goog.require('ol.format.filter.And');
-goog.require('ol.format.filter.Bbox');
-goog.require('ol.format.filter.During');
-goog.require('ol.format.filter.EqualTo');
-goog.require('ol.format.filter.GreaterThan');
-goog.require('ol.format.filter.GreaterThanOrEqualTo');
-goog.require('ol.format.filter.Intersects');
-goog.require('ol.format.filter.IsBetween');
-goog.require('ol.format.filter.IsLike');
-goog.require('ol.format.filter.IsNull');
-goog.require('ol.format.filter.LessThan');
-goog.require('ol.format.filter.LessThanOrEqualTo');
-goog.require('ol.format.filter.Not');
-goog.require('ol.format.filter.NotEqualTo');
-goog.require('ol.format.filter.Or');
-goog.require('ol.format.filter.Within');
-
-
-/**
- * Create a logical `<And>` operator between two or more filter conditions.
- *
- * @param {...ol.format.filter.Filter} conditions Filter conditions.
- * @returns {!ol.format.filter.And} `<And>` operator.
- * @api
- */
-ol.format.filter.and = function(conditions) {
-  var params = [null].concat(Array.prototype.slice.call(arguments));
-  return new (Function.prototype.bind.apply(ol.format.filter.And, params));
-};
-
-
-/**
- * Create a logical `<Or>` operator between two or more filter conditions.
- *
- * @param {...ol.format.filter.Filter} conditions Filter conditions.
- * @returns {!ol.format.filter.Or} `<Or>` operator.
- * @api
- */
-ol.format.filter.or = function(conditions) {
-  var params = [null].concat(Array.prototype.slice.call(arguments));
-  return new (Function.prototype.bind.apply(ol.format.filter.Or, params));
-};
-
-
-/**
- * Represents a logical `<Not>` operator for a filter condition.
- *
- * @param {!ol.format.filter.Filter} condition Filter condition.
- * @returns {!ol.format.filter.Not} `<Not>` operator.
- * @api
- */
-ol.format.filter.not = function(condition) {
-  return new ol.format.filter.Not(condition);
-};
-
-
-/**
- * Create a `<BBOX>` operator to test whether a geometry-valued property
- * intersects a fixed bounding box
- *
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.Extent} extent Extent.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @returns {!ol.format.filter.Bbox} `<BBOX>` operator.
- * @api
- */
-ol.format.filter.bbox = function(geometryName, extent, opt_srsName) {
-  return new ol.format.filter.Bbox(geometryName, extent, opt_srsName);
-};
-
-/**
- * Create a `<Intersects>` operator to test whether a geometry-valued property
- * intersects a given geometry.
- *
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @returns {!ol.format.filter.Intersects} `<Intersects>` operator.
- * @api
- */
-ol.format.filter.intersects = function(geometryName, geometry, opt_srsName) {
-  return new ol.format.filter.Intersects(geometryName, geometry, opt_srsName);
-};
-
-/**
- * Create a `<Within>` operator to test whether a geometry-valued property
- * is within a given geometry.
- *
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @returns {!ol.format.filter.Within} `<Within>` operator.
- * @api
- */
-ol.format.filter.within = function(geometryName, geometry, opt_srsName) {
-  return new ol.format.filter.Within(geometryName, geometry, opt_srsName);
-};
-
-
-/**
- * Creates a `<PropertyIsEqualTo>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!(string|number)} expression The value to compare.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @returns {!ol.format.filter.EqualTo} `<PropertyIsEqualTo>` operator.
- * @api
- */
-ol.format.filter.equalTo = function(propertyName, expression, opt_matchCase) {
-  return new ol.format.filter.EqualTo(propertyName, expression, opt_matchCase);
-};
-
-
-/**
- * Creates a `<PropertyIsNotEqualTo>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!(string|number)} expression The value to compare.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @returns {!ol.format.filter.NotEqualTo} `<PropertyIsNotEqualTo>` operator.
- * @api
- */
-ol.format.filter.notEqualTo = function(propertyName, expression, opt_matchCase) {
-  return new ol.format.filter.NotEqualTo(propertyName, expression, opt_matchCase);
-};
-
-
-/**
- * Creates a `<PropertyIsLessThan>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @returns {!ol.format.filter.LessThan} `<PropertyIsLessThan>` operator.
- * @api
- */
-ol.format.filter.lessThan = function(propertyName, expression) {
-  return new ol.format.filter.LessThan(propertyName, expression);
-};
-
-
-/**
- * Creates a `<PropertyIsLessThanOrEqualTo>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @returns {!ol.format.filter.LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.
- * @api
- */
-ol.format.filter.lessThanOrEqualTo = function(propertyName, expression) {
-  return new ol.format.filter.LessThanOrEqualTo(propertyName, expression);
-};
-
-
-/**
- * Creates a `<PropertyIsGreaterThan>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @returns {!ol.format.filter.GreaterThan} `<PropertyIsGreaterThan>` operator.
- * @api
- */
-ol.format.filter.greaterThan = function(propertyName, expression) {
-  return new ol.format.filter.GreaterThan(propertyName, expression);
-};
-
-
-/**
- * Creates a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @returns {!ol.format.filter.GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.
- * @api
- */
-ol.format.filter.greaterThanOrEqualTo = function(propertyName, expression) {
-  return new ol.format.filter.GreaterThanOrEqualTo(propertyName, expression);
-};
-
-
-/**
- * Creates a `<PropertyIsNull>` comparison operator to test whether a property value
- * is null.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @returns {!ol.format.filter.IsNull} `<PropertyIsNull>` operator.
- * @api
- */
-ol.format.filter.isNull = function(propertyName) {
-  return new ol.format.filter.IsNull(propertyName);
-};
-
-
-/**
- * Creates a `<PropertyIsBetween>` comparison operator to test whether an expression
- * value lies within a range given by a lower and upper bound (inclusive).
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} lowerBoundary The lower bound of the range.
- * @param {!number} upperBoundary The upper bound of the range.
- * @returns {!ol.format.filter.IsBetween} `<PropertyIsBetween>` operator.
- * @api
- */
-ol.format.filter.between = function(propertyName, lowerBoundary, upperBoundary) {
-  return new ol.format.filter.IsBetween(propertyName, lowerBoundary, upperBoundary);
-};
-
-
-/**
- * Represents a `<PropertyIsLike>` comparison operator that matches a string property
- * value against a text pattern.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!string} pattern Text pattern.
- * @param {string=} opt_wildCard Pattern character which matches any sequence of
- *    zero or more string characters. Default is '*'.
- * @param {string=} opt_singleChar pattern character which matches any single
- *    string character. Default is '.'.
- * @param {string=} opt_escapeChar Escape character which can be used to escape
- *    the pattern characters. Default is '!'.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @returns {!ol.format.filter.IsLike} `<PropertyIsLike>` operator.
- * @api
- */
-ol.format.filter.like = function(propertyName, pattern,
-    opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {
-  return new ol.format.filter.IsLike(propertyName, pattern,
-    opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase);
-};
-
-
-/**
- * Create a `<During>` temporal operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!string} begin The begin date in ISO-8601 format.
- * @param {!string} end The end date in ISO-8601 format.
- * @returns {!ol.format.filter.During} `<During>` operator.
- * @api
- */
-ol.format.filter.during = function(propertyName, begin, end) {
-  return new ol.format.filter.During(propertyName, begin, end);
-};
-
-goog.provide('ol.geom.GeometryCollection');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * An array of {@link ol.geom.Geometry} objects.
- *
- * @constructor
- * @extends {ol.geom.Geometry}
- * @param {Array.<ol.geom.Geometry>=} opt_geometries Geometries.
- * @api
- */
-ol.geom.GeometryCollection = function(opt_geometries) {
-
-  ol.geom.Geometry.call(this);
-
-  /**
-   * @private
-   * @type {Array.<ol.geom.Geometry>}
-   */
-  this.geometries_ = opt_geometries ? opt_geometries : null;
-
-  this.listenGeometriesChange_();
-};
-ol.inherits(ol.geom.GeometryCollection, ol.geom.Geometry);
-
-
-/**
- * @param {Array.<ol.geom.Geometry>} geometries Geometries.
- * @private
- * @return {Array.<ol.geom.Geometry>} Cloned geometries.
- */
-ol.geom.GeometryCollection.cloneGeometries_ = function(geometries) {
-  var clonedGeometries = [];
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    clonedGeometries.push(geometries[i].clone());
-  }
-  return clonedGeometries;
-};
-
-
-/**
- * @private
- */
-ol.geom.GeometryCollection.prototype.unlistenGeometriesChange_ = function() {
-  var i, ii;
-  if (!this.geometries_) {
-    return;
-  }
-  for (i = 0, ii = this.geometries_.length; i < ii; ++i) {
-    ol.events.unlisten(
-        this.geometries_[i], ol.events.EventType.CHANGE,
-        this.changed, this);
-  }
-};
-
-
-/**
- * @private
- */
-ol.geom.GeometryCollection.prototype.listenGeometriesChange_ = function() {
-  var i, ii;
-  if (!this.geometries_) {
-    return;
-  }
-  for (i = 0, ii = this.geometries_.length; i < ii; ++i) {
-    ol.events.listen(
-        this.geometries_[i], ol.events.EventType.CHANGE,
-        this.changed, this);
-  }
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.GeometryCollection} Clone.
- * @override
- * @api
- */
-ol.geom.GeometryCollection.prototype.clone = function() {
-  var geometryCollection = new ol.geom.GeometryCollection(null);
-  geometryCollection.setGeometries(this.geometries_);
-  return geometryCollection;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.GeometryCollection.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  var geometries = this.geometries_;
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    minSquaredDistance = geometries[i].closestPointXY(
-        x, y, closestPoint, minSquaredDistance);
-  }
-  return minSquaredDistance;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.GeometryCollection.prototype.containsXY = function(x, y) {
-  var geometries = this.geometries_;
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    if (geometries[i].containsXY(x, y)) {
-      return true;
-    }
-  }
-  return false;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.GeometryCollection.prototype.computeExtent = function(extent) {
-  ol.extent.createOrUpdateEmpty(extent);
-  var geometries = this.geometries_;
-  for (var i = 0, ii = geometries.length; i < ii; ++i) {
-    ol.extent.extend(extent, geometries[i].getExtent());
-  }
-  return extent;
-};
-
-
-/**
- * Return the geometries that make up this geometry collection.
- * @return {Array.<ol.geom.Geometry>} Geometries.
- * @api
- */
-ol.geom.GeometryCollection.prototype.getGeometries = function() {
-  return ol.geom.GeometryCollection.cloneGeometries_(this.geometries_);
-};
-
-
-/**
- * @return {Array.<ol.geom.Geometry>} Geometries.
- */
-ol.geom.GeometryCollection.prototype.getGeometriesArray = function() {
-  return this.geometries_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.GeometryCollection.prototype.getSimplifiedGeometry = function(squaredTolerance) {
-  if (this.simplifiedGeometryRevision != this.getRevision()) {
-    ol.obj.clear(this.simplifiedGeometryCache);
-    this.simplifiedGeometryMaxMinSquaredTolerance = 0;
-    this.simplifiedGeometryRevision = this.getRevision();
-  }
-  if (squaredTolerance < 0 ||
-      (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&
-       squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)) {
-    return this;
-  }
-  var key = squaredTolerance.toString();
-  if (this.simplifiedGeometryCache.hasOwnProperty(key)) {
-    return this.simplifiedGeometryCache[key];
-  } else {
-    var simplifiedGeometries = [];
-    var geometries = this.geometries_;
-    var simplified = false;
-    var i, ii;
-    for (i = 0, ii = geometries.length; i < ii; ++i) {
-      var geometry = geometries[i];
-      var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);
-      simplifiedGeometries.push(simplifiedGeometry);
-      if (simplifiedGeometry !== geometry) {
-        simplified = true;
-      }
-    }
-    if (simplified) {
-      var simplifiedGeometryCollection = new ol.geom.GeometryCollection(null);
-      simplifiedGeometryCollection.setGeometriesArray(simplifiedGeometries);
-      this.simplifiedGeometryCache[key] = simplifiedGeometryCollection;
-      return simplifiedGeometryCollection;
-    } else {
-      this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;
-      return this;
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.GeometryCollection.prototype.getType = function() {
-  return ol.geom.GeometryType.GEOMETRY_COLLECTION;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.GeometryCollection.prototype.intersectsExtent = function(extent) {
-  var geometries = this.geometries_;
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    if (geometries[i].intersectsExtent(extent)) {
-      return true;
-    }
-  }
-  return false;
-};
-
-
-/**
- * @return {boolean} Is empty.
- */
-ol.geom.GeometryCollection.prototype.isEmpty = function() {
-  return this.geometries_.length === 0;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.GeometryCollection.prototype.rotate = function(angle, anchor) {
-  var geometries = this.geometries_;
-  for (var i = 0, ii = geometries.length; i < ii; ++i) {
-    geometries[i].rotate(angle, anchor);
-  }
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.GeometryCollection.prototype.scale = function(sx, opt_sy, opt_anchor) {
-  var anchor = opt_anchor;
-  if (!anchor) {
-    anchor = ol.extent.getCenter(this.getExtent());
-  }
-  var geometries = this.geometries_;
-  for (var i = 0, ii = geometries.length; i < ii; ++i) {
-    geometries[i].scale(sx, opt_sy, anchor);
-  }
-  this.changed();
-};
-
-
-/**
- * Set the geometries that make up this geometry collection.
- * @param {Array.<ol.geom.Geometry>} geometries Geometries.
- * @api
- */
-ol.geom.GeometryCollection.prototype.setGeometries = function(geometries) {
-  this.setGeometriesArray(
-      ol.geom.GeometryCollection.cloneGeometries_(geometries));
-};
-
-
-/**
- * @param {Array.<ol.geom.Geometry>} geometries Geometries.
- */
-ol.geom.GeometryCollection.prototype.setGeometriesArray = function(geometries) {
-  this.unlistenGeometriesChange_();
-  this.geometries_ = geometries;
-  this.listenGeometriesChange_();
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.GeometryCollection.prototype.applyTransform = function(transformFn) {
-  var geometries = this.geometries_;
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    geometries[i].applyTransform(transformFn);
-  }
-  this.changed();
-};
-
-
-/**
- * Translate the geometry.
- * @param {number} deltaX Delta X.
- * @param {number} deltaY Delta Y.
- * @override
- * @api
- */
-ol.geom.GeometryCollection.prototype.translate = function(deltaX, deltaY) {
-  var geometries = this.geometries_;
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    geometries[i].translate(deltaX, deltaY);
-  }
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.GeometryCollection.prototype.disposeInternal = function() {
-  this.unlistenGeometriesChange_();
-  ol.geom.Geometry.prototype.disposeInternal.call(this);
-};
-
-// TODO: serialize dataProjection as crs member when writing
-// see https://github.com/openlayers/openlayers/issues/2078
-
-goog.provide('ol.format.GeoJSON');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.JSONFeature');
-goog.require('ol.geom.GeometryCollection');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.obj');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the GeoJSON format.
- *
- * @constructor
- * @extends {ol.format.JSONFeature}
- * @param {olx.format.GeoJSONOptions=} opt_options Options.
- * @api
- */
-ol.format.GeoJSON = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.JSONFeature.call(this);
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get(
-      options.defaultDataProjection ?
-          options.defaultDataProjection : 'EPSG:4326');
-
-
-  if (options.featureProjection) {
-    this.defaultFeatureProjection = ol.proj.get(options.featureProjection);
-  }
-
-  /**
-   * Name of the geometry attribute for features.
-   * @type {string|undefined}
-   * @private
-   */
-  this.geometryName_ = options.geometryName;
-
-};
-ol.inherits(ol.format.GeoJSON, ol.format.JSONFeature);
-
-
-/**
- * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @private
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.GeoJSON.readGeometry_ = function(object, opt_options) {
-  if (!object) {
-    return null;
-  }
-  var geometryReader = ol.format.GeoJSON.GEOMETRY_READERS_[object.type];
-  return /** @type {ol.geom.Geometry} */ (
-      ol.format.Feature.transformWithOptions(
-          geometryReader(object), false, opt_options));
-};
-
-
-/**
- * @param {GeoJSONGeometryCollection} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @private
- * @return {ol.geom.GeometryCollection} Geometry collection.
- */
-ol.format.GeoJSON.readGeometryCollectionGeometry_ = function(
-    object, opt_options) {
-  var geometries = object.geometries.map(
-      /**
-       * @param {GeoJSONGeometry} geometry Geometry.
-       * @return {ol.geom.Geometry} geometry Geometry.
-       */
-      function(geometry) {
-        return ol.format.GeoJSON.readGeometry_(geometry, opt_options);
-      });
-  return new ol.geom.GeometryCollection(geometries);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Point} Point.
- */
-ol.format.GeoJSON.readPointGeometry_ = function(object) {
-  return new ol.geom.Point(object.coordinates);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.LineString} LineString.
- */
-ol.format.GeoJSON.readLineStringGeometry_ = function(object) {
-  return new ol.geom.LineString(object.coordinates);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.MultiLineString} MultiLineString.
- */
-ol.format.GeoJSON.readMultiLineStringGeometry_ = function(object) {
-  return new ol.geom.MultiLineString(object.coordinates);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.MultiPoint} MultiPoint.
- */
-ol.format.GeoJSON.readMultiPointGeometry_ = function(object) {
-  return new ol.geom.MultiPoint(object.coordinates);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.MultiPolygon} MultiPolygon.
- */
-ol.format.GeoJSON.readMultiPolygonGeometry_ = function(object) {
-  return new ol.geom.MultiPolygon(object.coordinates);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Polygon} Polygon.
- */
-ol.format.GeoJSON.readPolygonGeometry_ = function(object) {
-  return new ol.geom.Polygon(object.coordinates);
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry|GeoJSONGeometryCollection} GeoJSON geometry.
- */
-ol.format.GeoJSON.writeGeometry_ = function(geometry, opt_options) {
-  var geometryWriter = ol.format.GeoJSON.GEOMETRY_WRITERS_[geometry.getType()];
-  return geometryWriter(/** @type {ol.geom.Geometry} */ (
-      ol.format.Feature.transformWithOptions(geometry, true, opt_options)),
-      opt_options);
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @private
- * @return {GeoJSONGeometryCollection} Empty GeoJSON geometry collection.
- */
-ol.format.GeoJSON.writeEmptyGeometryCollectionGeometry_ = function(geometry) {
-  return /** @type {GeoJSONGeometryCollection} */ ({
-    type: 'GeometryCollection',
-    geometries: []
-  });
-};
-
-
-/**
- * @param {ol.geom.GeometryCollection} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.
- */
-ol.format.GeoJSON.writeGeometryCollectionGeometry_ = function(
-    geometry, opt_options) {
-  var geometries = geometry.getGeometriesArray().map(function(geometry) {
-    var options = ol.obj.assign({}, opt_options);
-    delete options.featureProjection;
-    return ol.format.GeoJSON.writeGeometry_(geometry, options);
-  });
-  return /** @type {GeoJSONGeometryCollection} */ ({
-    type: 'GeometryCollection',
-    geometries: geometries
-  });
-};
-
-
-/**
- * @param {ol.geom.LineString} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writeLineStringGeometry_ = function(geometry, opt_options) {
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'LineString',
-    coordinates: geometry.getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.MultiLineString} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writeMultiLineStringGeometry_ = function(geometry, opt_options) {
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'MultiLineString',
-    coordinates: geometry.getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.MultiPoint} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writeMultiPointGeometry_ = function(geometry, opt_options) {
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'MultiPoint',
-    coordinates: geometry.getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.MultiPolygon} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writeMultiPolygonGeometry_ = function(geometry, opt_options) {
-  var right;
-  if (opt_options) {
-    right = opt_options.rightHanded;
-  }
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'MultiPolygon',
-    coordinates: geometry.getCoordinates(right)
-  });
-};
-
-
-/**
- * @param {ol.geom.Point} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writePointGeometry_ = function(geometry, opt_options) {
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'Point',
-    coordinates: geometry.getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.Polygon} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writePolygonGeometry_ = function(geometry, opt_options) {
-  var right;
-  if (opt_options) {
-    right = opt_options.rightHanded;
-  }
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'Polygon',
-    coordinates: geometry.getCoordinates(right)
-  });
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<string, function(GeoJSONObject): ol.geom.Geometry>}
- */
-ol.format.GeoJSON.GEOMETRY_READERS_ = {
-  'Point': ol.format.GeoJSON.readPointGeometry_,
-  'LineString': ol.format.GeoJSON.readLineStringGeometry_,
-  'Polygon': ol.format.GeoJSON.readPolygonGeometry_,
-  'MultiPoint': ol.format.GeoJSON.readMultiPointGeometry_,
-  'MultiLineString': ol.format.GeoJSON.readMultiLineStringGeometry_,
-  'MultiPolygon': ol.format.GeoJSON.readMultiPolygonGeometry_,
-  'GeometryCollection': ol.format.GeoJSON.readGeometryCollectionGeometry_
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<string, function(ol.geom.Geometry, olx.format.WriteOptions=): (GeoJSONGeometry|GeoJSONGeometryCollection)>}
- */
-ol.format.GeoJSON.GEOMETRY_WRITERS_ = {
-  'Point': ol.format.GeoJSON.writePointGeometry_,
-  'LineString': ol.format.GeoJSON.writeLineStringGeometry_,
-  'Polygon': ol.format.GeoJSON.writePolygonGeometry_,
-  'MultiPoint': ol.format.GeoJSON.writeMultiPointGeometry_,
-  'MultiLineString': ol.format.GeoJSON.writeMultiLineStringGeometry_,
-  'MultiPolygon': ol.format.GeoJSON.writeMultiPolygonGeometry_,
-  'GeometryCollection': ol.format.GeoJSON.writeGeometryCollectionGeometry_,
-  'Circle': ol.format.GeoJSON.writeEmptyGeometryCollectionGeometry_
-};
-
-
-/**
- * Read a feature from a GeoJSON Feature source.  Only works for Feature or
- * geometry types.  Use {@link ol.format.GeoJSON#readFeatures} to read
- * FeatureCollection source. If feature at source has an id, it will be used
- * as Feature id by calling {@link ol.Feature#setId} internally.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.GeoJSON.prototype.readFeature;
-
-
-/**
- * Read all features from a GeoJSON source.  Works for all GeoJSON types.
- * If the source includes only geometries, features will be created with those
- * geometries.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.GeoJSON.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GeoJSON.prototype.readFeatureFromObject = function(
-    object, opt_options) {
-  /**
-   * @type {GeoJSONFeature}
-   */
-  var geoJSONFeature = null;
-  if (object.type === 'Feature') {
-    geoJSONFeature = /** @type {GeoJSONFeature} */ (object);
-  } else {
-    geoJSONFeature = /** @type {GeoJSONFeature} */ ({
-      type: 'Feature',
-      geometry: /** @type {GeoJSONGeometry|GeoJSONGeometryCollection} */ (object)
-    });
-  }
-
-  var geometry = ol.format.GeoJSON.readGeometry_(geoJSONFeature.geometry, opt_options);
-  var feature = new ol.Feature();
-  if (this.geometryName_) {
-    feature.setGeometryName(this.geometryName_);
-  }
-  feature.setGeometry(geometry);
-  if (geoJSONFeature.id !== undefined) {
-    feature.setId(geoJSONFeature.id);
-  }
-  if (geoJSONFeature.properties) {
-    feature.setProperties(geoJSONFeature.properties);
-  }
-  return feature;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.GeoJSON.prototype.readFeaturesFromObject = function(
-    object, opt_options) {
-  var geoJSONObject = /** @type {GeoJSONObject} */ (object);
-  /** @type {Array.<ol.Feature>} */
-  var features = null;
-  if (geoJSONObject.type === 'FeatureCollection') {
-    var geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */
-        (object);
-    features = [];
-    var geoJSONFeatures = geoJSONFeatureCollection.features;
-    var i, ii;
-    for (i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {
-      features.push(this.readFeatureFromObject(geoJSONFeatures[i],
-          opt_options));
-    }
-  } else {
-    features = [this.readFeatureFromObject(object, opt_options)];
-  }
-  return features;
-};
-
-
-/**
- * Read a geometry from a GeoJSON source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.geom.Geometry} Geometry.
- * @api
- */
-ol.format.GeoJSON.prototype.readGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GeoJSON.prototype.readGeometryFromObject = function(
-    object, opt_options) {
-  return ol.format.GeoJSON.readGeometry_(
-      /** @type {GeoJSONGeometry} */ (object), opt_options);
-};
-
-
-/**
- * Read the projection from a GeoJSON source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.GeoJSON.prototype.readProjection;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GeoJSON.prototype.readProjectionFromObject = function(object) {
-  var geoJSONObject = /** @type {GeoJSONObject} */ (object);
-  var crs = geoJSONObject.crs;
-  var projection;
-  if (crs) {
-    if (crs.type == 'name') {
-      projection = ol.proj.get(crs.properties.name);
-    } else if (crs.type == 'EPSG') {
-      // 'EPSG' is not part of the GeoJSON specification, but is generated by
-      // GeoServer.
-      // TODO: remove this when http://jira.codehaus.org/browse/GEOS-5996
-      // is fixed and widely deployed.
-      projection = ol.proj.get('EPSG:' + crs.properties.code);
-    } else {
-      ol.asserts.assert(false, 36); // Unknown SRS type
-    }
-  } else {
-    projection = this.defaultDataProjection;
-  }
-  return /** @type {ol.proj.Projection} */ (projection);
-};
-
-
-/**
- * Encode a feature as a GeoJSON Feature string.
- *
- * @function
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} GeoJSON.
- * @override
- * @api
- */
-ol.format.GeoJSON.prototype.writeFeature;
-
-
-/**
- * Encode a feature as a GeoJSON Feature object.
- *
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {GeoJSONFeature} Object.
- * @override
- * @api
- */
-ol.format.GeoJSON.prototype.writeFeatureObject = function(feature, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-
-  var object = /** @type {GeoJSONFeature} */ ({
-    'type': 'Feature'
-  });
-  var id = feature.getId();
-  if (id !== undefined) {
-    object.id = id;
-  }
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    object.geometry =
-        ol.format.GeoJSON.writeGeometry_(geometry, opt_options);
-  } else {
-    object.geometry = null;
-  }
-  var properties = feature.getProperties();
-  delete properties[feature.getGeometryName()];
-  if (!ol.obj.isEmpty(properties)) {
-    object.properties = properties;
-  } else {
-    object.properties = null;
-  }
-  return object;
-};
-
-
-/**
- * Encode an array of features as GeoJSON.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} GeoJSON.
- * @api
- */
-ol.format.GeoJSON.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features as a GeoJSON object.
- *
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {GeoJSONFeatureCollection} GeoJSON Object.
- * @override
- * @api
- */
-ol.format.GeoJSON.prototype.writeFeaturesObject = function(features, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var objects = [];
-  var i, ii;
-  for (i = 0, ii = features.length; i < ii; ++i) {
-    objects.push(this.writeFeatureObject(features[i], opt_options));
-  }
-  return /** @type {GeoJSONFeatureCollection} */ ({
-    type: 'FeatureCollection',
-    features: objects
-  });
-};
-
-
-/**
- * Encode a geometry as a GeoJSON string.
- *
- * @function
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} GeoJSON.
- * @api
- */
-ol.format.GeoJSON.prototype.writeGeometry;
-
-
-/**
- * Encode a geometry as a GeoJSON object.
- *
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.
- * @override
- * @api
- */
-ol.format.GeoJSON.prototype.writeGeometryObject = function(geometry,
-    opt_options) {
-  return ol.format.GeoJSON.writeGeometry_(geometry,
-      this.adaptOptions(opt_options));
-};
-
-goog.provide('ol.format.XMLFeature');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.format.Feature');
-goog.require('ol.format.FormatType');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for XML feature formats.
- *
- * @constructor
- * @abstract
- * @extends {ol.format.Feature}
- */
-ol.format.XMLFeature = function() {
-
-  /**
-   * @type {XMLSerializer}
-   * @private
-   */
-  this.xmlSerializer_ = new XMLSerializer();
-
-  ol.format.Feature.call(this);
-};
-ol.inherits(ol.format.XMLFeature, ol.format.Feature);
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.getType = function() {
-  return ol.format.FormatType.XML;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.readFeature = function(source, opt_options) {
-  if (ol.xml.isDocument(source)) {
-    return this.readFeatureFromDocument(
-        /** @type {Document} */ (source), opt_options);
-  } else if (ol.xml.isNode(source)) {
-    return this.readFeatureFromNode(/** @type {Node} */ (source), opt_options);
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readFeatureFromDocument(doc, opt_options);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @return {ol.Feature} Feature.
- */
-ol.format.XMLFeature.prototype.readFeatureFromDocument = function(
-    doc, opt_options) {
-  var features = this.readFeaturesFromDocument(doc, opt_options);
-  if (features.length > 0) {
-    return features[0];
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @return {ol.Feature} Feature.
- */
-ol.format.XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {
-  return null; // not implemented
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.readFeatures = function(source, opt_options) {
-  if (ol.xml.isDocument(source)) {
-    return this.readFeaturesFromDocument(
-        /** @type {Document} */ (source), opt_options);
-  } else if (ol.xml.isNode(source)) {
-    return this.readFeaturesFromNode(/** @type {Node} */ (source), opt_options);
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readFeaturesFromDocument(doc, opt_options);
-  } else {
-    return [];
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @protected
- * @return {Array.<ol.Feature>} Features.
- */
-ol.format.XMLFeature.prototype.readFeaturesFromDocument = function(
-    doc, opt_options) {
-  /** @type {Array.<ol.Feature>} */
-  var features = [];
-  var n;
-  for (n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      ol.array.extend(features, this.readFeaturesFromNode(n, opt_options));
-    }
-  }
-  return features;
-};
-
-
-/**
- * @abstract
- * @param {Node} node Node.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @protected
- * @return {Array.<ol.Feature>} Features.
- */
-ol.format.XMLFeature.prototype.readFeaturesFromNode = function(node, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.readGeometry = function(source, opt_options) {
-  if (ol.xml.isDocument(source)) {
-    return this.readGeometryFromDocument(
-        /** @type {Document} */ (source), opt_options);
-  } else if (ol.xml.isNode(source)) {
-    return this.readGeometryFromNode(/** @type {Node} */ (source), opt_options);
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readGeometryFromDocument(doc, opt_options);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @protected
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {
-  return null; // not implemented
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @protected
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.XMLFeature.prototype.readGeometryFromNode = function(node, opt_options) {
-  return null; // not implemented
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.readProjection = function(source) {
-  if (ol.xml.isDocument(source)) {
-    return this.readProjectionFromDocument(/** @type {Document} */ (source));
-  } else if (ol.xml.isNode(source)) {
-    return this.readProjectionFromNode(/** @type {Node} */ (source));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readProjectionFromDocument(doc);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @protected
- * @return {ol.proj.Projection} Projection.
- */
-ol.format.XMLFeature.prototype.readProjectionFromDocument = function(doc) {
-  return this.defaultDataProjection;
-};
-
-
-/**
- * @param {Node} node Node.
- * @protected
- * @return {ol.proj.Projection} Projection.
- */
-ol.format.XMLFeature.prototype.readProjectionFromNode = function(node) {
-  return this.defaultDataProjection;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.writeFeature = function(feature, opt_options) {
-  var node = this.writeFeatureNode(feature, opt_options);
-  return this.xmlSerializer_.serializeToString(node);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @protected
- * @return {Node} Node.
- */
-ol.format.XMLFeature.prototype.writeFeatureNode = function(feature, opt_options) {
-  return null; // not implemented
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.writeFeatures = function(features, opt_options) {
-  var node = this.writeFeaturesNode(features, opt_options);
-  return this.xmlSerializer_.serializeToString(node);
-};
-
-
-/**
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- */
-ol.format.XMLFeature.prototype.writeFeaturesNode = function(features, opt_options) {
-  return null; // not implemented
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.writeGeometry = function(geometry, opt_options) {
-  var node = this.writeGeometryNode(geometry, opt_options);
-  return this.xmlSerializer_.serializeToString(node);
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- */
-ol.format.XMLFeature.prototype.writeGeometryNode = function(geometry, opt_options) {
-  return null; // not implemented
-};
-
-// FIXME Envelopes should not be treated as geometries! readEnvelope_ is part
-// of GEOMETRY_PARSERS_ and methods using GEOMETRY_PARSERS_ do not expect
-// envelopes/extents, only geometries!
-goog.provide('ol.format.GMLBase');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.LinearRing');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Feature base format for reading and writing data in the GML format.
- * This class cannot be instantiated, it contains only base content that
- * is shared with versioned format classes ol.format.GML2 and
- * ol.format.GML3.
- *
- * @constructor
- * @abstract
- * @param {olx.format.GMLOptions=} opt_options
- *     Optional configuration object.
- * @extends {ol.format.XMLFeature}
- */
-ol.format.GMLBase = function(opt_options) {
-  var options = /** @type {olx.format.GMLOptions} */
-      (opt_options ? opt_options : {});
-
-  /**
-   * @protected
-   * @type {Array.<string>|string|undefined}
-   */
-  this.featureType = options.featureType;
-
-  /**
-   * @protected
-   * @type {Object.<string, string>|string|undefined}
-   */
-  this.featureNS = options.featureNS;
-
-  /**
-   * @protected
-   * @type {string}
-   */
-  this.srsName = options.srsName;
-
-  /**
-   * @protected
-   * @type {string}
-   */
-  this.schemaLocation = '';
-
-  /**
-   * @type {Object.<string, Object.<string, Object>>}
-   */
-  this.FEATURE_COLLECTION_PARSERS = {};
-  this.FEATURE_COLLECTION_PARSERS[ol.format.GMLBase.GMLNS] = {
-    'featureMember': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readFeaturesInternal),
-    'featureMembers': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readFeaturesInternal)
-  };
-
-  ol.format.XMLFeature.call(this);
-};
-ol.inherits(ol.format.GMLBase, ol.format.XMLFeature);
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.GMLBase.GMLNS = 'http://www.opengis.net/gml';
-
-
-/**
- * A regular expression that matches if a string only contains whitespace
- * characters. It will e.g. match `''`, `' '`, `'\n'` etc. The non-breaking
- * space (0xa0) is explicitly included as IE doesn't include it in its
- * definition of `\s`.
- *
- * Information from `goog.string.isEmptyOrWhitespace`: https://github.com/google/closure-library/blob/e877b1e/closure/goog/string/string.js#L156-L160
- *
- * @const
- * @type {RegExp}
- * @private
- */
-ol.format.GMLBase.ONLY_WHITESPACE_RE_ = /^[\s\xa0]*$/;
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Array.<ol.Feature> | undefined} Features.
- */
-ol.format.GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {
-  var localName = node.localName;
-  var features = null;
-  if (localName == 'FeatureCollection') {
-    if (node.namespaceURI === 'http://www.opengis.net/wfs') {
-      features = ol.xml.pushParseAndPop([],
-          this.FEATURE_COLLECTION_PARSERS, node,
-          objectStack, this);
-    } else {
-      features = ol.xml.pushParseAndPop(null,
-          this.FEATURE_COLLECTION_PARSERS, node,
-          objectStack, this);
-    }
-  } else if (localName == 'featureMembers' || localName == 'featureMember') {
-    var context = objectStack[0];
-    var featureType = context['featureType'];
-    var featureNS = context['featureNS'];
-    var i, ii, prefix = 'p', defaultPrefix = 'p0';
-    if (!featureType && node.childNodes) {
-      featureType = [], featureNS = {};
-      for (i = 0, ii = node.childNodes.length; i < ii; ++i) {
-        var child = node.childNodes[i];
-        if (child.nodeType === 1) {
-          var ft = child.nodeName.split(':').pop();
-          if (featureType.indexOf(ft) === -1) {
-            var key = '';
-            var count = 0;
-            var uri = child.namespaceURI;
-            for (var candidate in featureNS) {
-              if (featureNS[candidate] === uri) {
-                key = candidate;
-                break;
-              }
-              ++count;
-            }
-            if (!key) {
-              key = prefix + count;
-              featureNS[key] = uri;
-            }
-            featureType.push(key + ':' + ft);
-          }
-        }
-      }
-      if (localName != 'featureMember') {
-        // recheck featureType for each featureMember
-        context['featureType'] = featureType;
-        context['featureNS'] = featureNS;
-      }
-    }
-    if (typeof featureNS === 'string') {
-      var ns = featureNS;
-      featureNS = {};
-      featureNS[defaultPrefix] = ns;
-    }
-    var parsersNS = {};
-    var featureTypes = Array.isArray(featureType) ? featureType : [featureType];
-    for (var p in featureNS) {
-      var parsers = {};
-      for (i = 0, ii = featureTypes.length; i < ii; ++i) {
-        var featurePrefix = featureTypes[i].indexOf(':') === -1 ?
-            defaultPrefix : featureTypes[i].split(':')[0];
-        if (featurePrefix === p) {
-          parsers[featureTypes[i].split(':').pop()] =
-              (localName == 'featureMembers') ?
-              ol.xml.makeArrayPusher(this.readFeatureElement, this) :
-              ol.xml.makeReplacer(this.readFeatureElement, this);
-        }
-      }
-      parsersNS[featureNS[p]] = parsers;
-    }
-    if (localName == 'featureMember') {
-      features = ol.xml.pushParseAndPop(undefined, parsersNS, node, objectStack);
-    } else {
-      features = ol.xml.pushParseAndPop([], parsersNS, node, objectStack);
-    }
-  }
-  if (features === null) {
-    features = [];
-  }
-  return features;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.Geometry|undefined} Geometry.
- */
-ol.format.GMLBase.prototype.readGeometryElement = function(node, objectStack) {
-  var context = /** @type {Object} */ (objectStack[0]);
-  context['srsName'] = node.firstElementChild.getAttribute('srsName');
-  /** @type {ol.geom.Geometry} */
-  var geometry = ol.xml.pushParseAndPop(null,
-      this.GEOMETRY_PARSERS_, node, objectStack, this);
-  if (geometry) {
-    return /** @type {ol.geom.Geometry} */ (
-        ol.format.Feature.transformWithOptions(geometry, false, context));
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.Feature} Feature.
- */
-ol.format.GMLBase.prototype.readFeatureElement = function(node, objectStack) {
-  var n;
-  var fid = node.getAttribute('fid') ||
-      ol.xml.getAttributeNS(node, ol.format.GMLBase.GMLNS, 'id');
-  var values = {}, geometryName;
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    var localName = n.localName;
-    // Assume attribute elements have one child node and that the child
-    // is a text or CDATA node (to be treated as text).
-    // Otherwise assume it is a geometry node.
-    if (n.childNodes.length === 0 ||
-        (n.childNodes.length === 1 &&
-        (n.firstChild.nodeType === 3 || n.firstChild.nodeType === 4))) {
-      var value = ol.xml.getAllTextContent(n, false);
-      if (ol.format.GMLBase.ONLY_WHITESPACE_RE_.test(value)) {
-        value = undefined;
-      }
-      values[localName] = value;
-    } else {
-      // boundedBy is an extent and must not be considered as a geometry
-      if (localName !== 'boundedBy') {
-        geometryName = localName;
-      }
-      values[localName] = this.readGeometryElement(n, objectStack);
-    }
-  }
-  var feature = new ol.Feature(values);
-  if (geometryName) {
-    feature.setGeometryName(geometryName);
-  }
-  if (fid) {
-    feature.setId(fid);
-  }
-  return feature;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.Point|undefined} Point.
- */
-ol.format.GMLBase.prototype.readPoint = function(node, objectStack) {
-  var flatCoordinates =
-      this.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var point = new ol.geom.Point(null);
-    point.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    return point;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.MultiPoint|undefined} MultiPoint.
- */
-ol.format.GMLBase.prototype.readMultiPoint = function(node, objectStack) {
-  /** @type {Array.<Array.<number>>} */
-  var coordinates = ol.xml.pushParseAndPop([],
-      this.MULTIPOINT_PARSERS_, node, objectStack, this);
-  if (coordinates) {
-    return new ol.geom.MultiPoint(coordinates);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.MultiLineString|undefined} MultiLineString.
- */
-ol.format.GMLBase.prototype.readMultiLineString = function(node, objectStack) {
-  /** @type {Array.<ol.geom.LineString>} */
-  var lineStrings = ol.xml.pushParseAndPop([],
-      this.MULTILINESTRING_PARSERS_, node, objectStack, this);
-  if (lineStrings) {
-    var multiLineString = new ol.geom.MultiLineString(null);
-    multiLineString.setLineStrings(lineStrings);
-    return multiLineString;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.MultiPolygon|undefined} MultiPolygon.
- */
-ol.format.GMLBase.prototype.readMultiPolygon = function(node, objectStack) {
-  /** @type {Array.<ol.geom.Polygon>} */
-  var polygons = ol.xml.pushParseAndPop([],
-      this.MULTIPOLYGON_PARSERS_, node, objectStack, this);
-  if (polygons) {
-    var multiPolygon = new ol.geom.MultiPolygon(null);
-    multiPolygon.setPolygons(polygons);
-    return multiPolygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GMLBase.prototype.pointMemberParser_ = function(node, objectStack) {
-  ol.xml.parseNode(this.POINTMEMBER_PARSERS_,
-      node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GMLBase.prototype.lineStringMemberParser_ = function(node, objectStack) {
-  ol.xml.parseNode(this.LINESTRINGMEMBER_PARSERS_,
-      node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GMLBase.prototype.polygonMemberParser_ = function(node, objectStack) {
-  ol.xml.parseNode(this.POLYGONMEMBER_PARSERS_, node,
-      objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.LineString|undefined} LineString.
- */
-ol.format.GMLBase.prototype.readLineString = function(node, objectStack) {
-  var flatCoordinates =
-      this.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var lineString = new ol.geom.LineString(null);
-    lineString.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    return lineString;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} LinearRing flat coordinates.
- */
-ol.format.GMLBase.prototype.readFlatLinearRing_ = function(node, objectStack) {
-  var ring = ol.xml.pushParseAndPop(null,
-      this.GEOMETRY_FLAT_COORDINATES_PARSERS_, node,
-      objectStack, this);
-  if (ring) {
-    return ring;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.LinearRing|undefined} LinearRing.
- */
-ol.format.GMLBase.prototype.readLinearRing = function(node, objectStack) {
-  var flatCoordinates =
-      this.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var ring = new ol.geom.LinearRing(null);
-    ring.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    return ring;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.Polygon|undefined} Polygon.
- */
-ol.format.GMLBase.prototype.readPolygon = function(node, objectStack) {
-  /** @type {Array.<Array.<number>>} */
-  var flatLinearRings = ol.xml.pushParseAndPop([null],
-      this.FLAT_LINEAR_RINGS_PARSERS_, node, objectStack, this);
-  if (flatLinearRings && flatLinearRings[0]) {
-    var polygon = new ol.geom.Polygon(null);
-    var flatCoordinates = flatLinearRings[0];
-    var ends = [flatCoordinates.length];
-    var i, ii;
-    for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {
-      ol.array.extend(flatCoordinates, flatLinearRings[i]);
-      ends.push(flatCoordinates.length);
-    }
-    polygon.setFlatCoordinates(
-        ol.geom.GeometryLayout.XYZ, flatCoordinates, ends);
-    return polygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>} Flat coordinates.
- */
-ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(null,
-      this.GEOMETRY_FLAT_COORDINATES_PARSERS_, node,
-      objectStack, this);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'pointMember': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.pointMemberParser_),
-    'pointMembers': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.pointMemberParser_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'lineStringMember': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.lineStringMemberParser_),
-    'lineStringMembers': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.lineStringMemberParser_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'polygonMember': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.polygonMemberParser_),
-    'polygonMembers': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.polygonMemberParser_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'Point': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'LineString': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.readLineString)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'Polygon': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.readPolygon)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @protected
- */
-ol.format.GMLBase.prototype.RING_PARSERS = {
-  'http://www.opengis.net/gml': {
-    'LinearRing': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readFlatLinearRing_)
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.GMLBase.prototype.readGeometryFromNode = function(node, opt_options) {
-  var geometry = this.readGeometryElement(node,
-      [this.getReadOptions(node, opt_options ? opt_options : {})]);
-  return geometry ? geometry : null;
-};
-
-
-/**
- * Read all features from a GML FeatureCollection.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.GMLBase.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GMLBase.prototype.readFeaturesFromNode = function(node, opt_options) {
-  var options = {
-    featureType: this.featureType,
-    featureNS: this.featureNS
-  };
-  if (opt_options) {
-    ol.obj.assign(options, this.getReadOptions(node, opt_options));
-  }
-  var features = this.readFeaturesInternal(node, [options]);
-  return features || [];
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.GMLBase.prototype.readProjectionFromNode = function(node) {
-  return ol.proj.get(this.srsName ? this.srsName :
-      node.firstElementChild.getAttribute('srsName'));
-};
-
-goog.provide('ol.format.XSD');
-
-goog.require('ol.xml');
-goog.require('ol.string');
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.XSD.NAMESPACE_URI = 'http://www.w3.org/2001/XMLSchema';
-
-
-/**
- * @param {Node} node Node.
- * @return {boolean|undefined} Boolean.
- */
-ol.format.XSD.readBoolean = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  return ol.format.XSD.readBooleanString(s);
-};
-
-
-/**
- * @param {string} string String.
- * @return {boolean|undefined} Boolean.
- */
-ol.format.XSD.readBooleanString = function(string) {
-  var m = /^\s*(true|1)|(false|0)\s*$/.exec(string);
-  if (m) {
-    return m[1] !== undefined || false;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {number|undefined} DateTime in seconds.
- */
-ol.format.XSD.readDateTime = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  var dateTime = Date.parse(s);
-  return isNaN(dateTime) ? undefined : dateTime / 1000;
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {number|undefined} Decimal.
- */
-ol.format.XSD.readDecimal = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  return ol.format.XSD.readDecimalString(s);
-};
-
-
-/**
- * @param {string} string String.
- * @return {number|undefined} Decimal.
- */
-ol.format.XSD.readDecimalString = function(string) {
-  // FIXME check spec
-  var m = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(string);
-  if (m) {
-    return parseFloat(m[1]);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {number|undefined} Non negative integer.
- */
-ol.format.XSD.readNonNegativeInteger = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  return ol.format.XSD.readNonNegativeIntegerString(s);
-};
-
-
-/**
- * @param {string} string String.
- * @return {number|undefined} Non negative integer.
- */
-ol.format.XSD.readNonNegativeIntegerString = function(string) {
-  var m = /^\s*(\d+)\s*$/.exec(string);
-  if (m) {
-    return parseInt(m[1], 10);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {string|undefined} String.
- */
-ol.format.XSD.readString = function(node) {
-  return ol.xml.getAllTextContent(node, false).trim();
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the boolean to.
- * @param {boolean} bool Boolean.
- */
-ol.format.XSD.writeBooleanTextNode = function(node, bool) {
-  ol.format.XSD.writeStringTextNode(node, (bool) ? '1' : '0');
-};
-
-
-/**
- * @param {Node} node Node to append a CDATA Section with the string to.
- * @param {string} string String.
- */
-ol.format.XSD.writeCDATASection = function(node, string) {
-  node.appendChild(ol.xml.DOCUMENT.createCDATASection(string));
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the dateTime to.
- * @param {number} dateTime DateTime in seconds.
- */
-ol.format.XSD.writeDateTimeTextNode = function(node, dateTime) {
-  var date = new Date(dateTime * 1000);
-  var string = date.getUTCFullYear() + '-' +
-      ol.string.padNumber(date.getUTCMonth() + 1, 2) + '-' +
-      ol.string.padNumber(date.getUTCDate(), 2) + 'T' +
-      ol.string.padNumber(date.getUTCHours(), 2) + ':' +
-      ol.string.padNumber(date.getUTCMinutes(), 2) + ':' +
-      ol.string.padNumber(date.getUTCSeconds(), 2) + 'Z';
-  node.appendChild(ol.xml.DOCUMENT.createTextNode(string));
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the decimal to.
- * @param {number} decimal Decimal.
- */
-ol.format.XSD.writeDecimalTextNode = function(node, decimal) {
-  var string = decimal.toPrecision();
-  node.appendChild(ol.xml.DOCUMENT.createTextNode(string));
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the decimal to.
- * @param {number} nonNegativeInteger Non negative integer.
- */
-ol.format.XSD.writeNonNegativeIntegerTextNode = function(node, nonNegativeInteger) {
-  var string = nonNegativeInteger.toString();
-  node.appendChild(ol.xml.DOCUMENT.createTextNode(string));
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the string to.
- * @param {string} string String.
- */
-ol.format.XSD.writeStringTextNode = function(node, string) {
-  node.appendChild(ol.xml.DOCUMENT.createTextNode(string));
-};
-
-goog.provide('ol.format.GML3');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.format.Feature');
-goog.require('ol.format.GMLBase');
-goog.require('ol.format.XSD');
-goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Polygon');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the GML format
- * version 3.1.1.
- * Currently only supports GML 3.1.1 Simple Features profile.
- *
- * @constructor
- * @param {olx.format.GMLOptions=} opt_options
- *     Optional configuration object.
- * @extends {ol.format.GMLBase}
- * @api
- */
-ol.format.GML3 = function(opt_options) {
-  var options = /** @type {olx.format.GMLOptions} */
-      (opt_options ? opt_options : {});
-
-  ol.format.GMLBase.call(this, options);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.surface_ = options.surface !== undefined ? options.surface : false;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.curve_ = options.curve !== undefined ? options.curve : false;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.multiCurve_ = options.multiCurve !== undefined ?
-      options.multiCurve : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.multiSurface_ = options.multiSurface !== undefined ?
-      options.multiSurface : true;
-
-  /**
-   * @inheritDoc
-   */
-  this.schemaLocation = options.schemaLocation ?
-      options.schemaLocation : ol.format.GML3.schemaLocation_;
-
-};
-ol.inherits(ol.format.GML3, ol.format.GMLBase);
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.GML3.schemaLocation_ = ol.format.GMLBase.GMLNS +
-    ' http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/' +
-    '1.0.0/gmlsf.xsd';
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.MultiLineString|undefined} MultiLineString.
- */
-ol.format.GML3.prototype.readMultiCurve_ = function(node, objectStack) {
-  /** @type {Array.<ol.geom.LineString>} */
-  var lineStrings = ol.xml.pushParseAndPop([],
-      this.MULTICURVE_PARSERS_, node, objectStack, this);
-  if (lineStrings) {
-    var multiLineString = new ol.geom.MultiLineString(null);
-    multiLineString.setLineStrings(lineStrings);
-    return multiLineString;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.MultiPolygon|undefined} MultiPolygon.
- */
-ol.format.GML3.prototype.readMultiSurface_ = function(node, objectStack) {
-  /** @type {Array.<ol.geom.Polygon>} */
-  var polygons = ol.xml.pushParseAndPop([],
-      this.MULTISURFACE_PARSERS_, node, objectStack, this);
-  if (polygons) {
-    var multiPolygon = new ol.geom.MultiPolygon(null);
-    multiPolygon.setPolygons(polygons);
-    return multiPolygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML3.prototype.curveMemberParser_ = function(node, objectStack) {
-  ol.xml.parseNode(this.CURVEMEMBER_PARSERS_, node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML3.prototype.surfaceMemberParser_ = function(node, objectStack) {
-  ol.xml.parseNode(this.SURFACEMEMBER_PARSERS_,
-      node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<(Array.<number>)>|undefined} flat coordinates.
- */
-ol.format.GML3.prototype.readPatch_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop([null],
-      this.PATCHES_PARSERS_, node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} flat coordinates.
- */
-ol.format.GML3.prototype.readSegment_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop([null],
-      this.SEGMENTS_PARSERS_, node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<(Array.<number>)>|undefined} flat coordinates.
- */
-ol.format.GML3.prototype.readPolygonPatch_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop([null],
-      this.FLAT_LINEAR_RINGS_PARSERS_, node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} flat coordinates.
- */
-ol.format.GML3.prototype.readLineStringSegment_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop([null],
-      this.GEOMETRY_FLAT_COORDINATES_PARSERS_,
-      node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML3.prototype.interiorParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      this.RING_PARSERS, node, objectStack, this);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings.push(flatLinearRing);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML3.prototype.exteriorParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      this.RING_PARSERS, node, objectStack, this);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings[0] = flatLinearRing;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.Polygon|undefined} Polygon.
- */
-ol.format.GML3.prototype.readSurface_ = function(node, objectStack) {
-  /** @type {Array.<Array.<number>>} */
-  var flatLinearRings = ol.xml.pushParseAndPop([null],
-      this.SURFACE_PARSERS_, node, objectStack, this);
-  if (flatLinearRings && flatLinearRings[0]) {
-    var polygon = new ol.geom.Polygon(null);
-    var flatCoordinates = flatLinearRings[0];
-    var ends = [flatCoordinates.length];
-    var i, ii;
-    for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {
-      ol.array.extend(flatCoordinates, flatLinearRings[i]);
-      ends.push(flatCoordinates.length);
-    }
-    polygon.setFlatCoordinates(
-        ol.geom.GeometryLayout.XYZ, flatCoordinates, ends);
-    return polygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.LineString|undefined} LineString.
- */
-ol.format.GML3.prototype.readCurve_ = function(node, objectStack) {
-  /** @type {Array.<number>} */
-  var flatCoordinates = ol.xml.pushParseAndPop([null],
-      this.CURVE_PARSERS_, node, objectStack, this);
-  if (flatCoordinates) {
-    var lineString = new ol.geom.LineString(null);
-    lineString.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    return lineString;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Extent|undefined} Envelope.
- */
-ol.format.GML3.prototype.readEnvelope_ = function(node, objectStack) {
-  /** @type {Array.<number>} */
-  var flatCoordinates = ol.xml.pushParseAndPop([null],
-      this.ENVELOPE_PARSERS_, node, objectStack, this);
-  return ol.extent.createOrUpdate(flatCoordinates[1][0],
-      flatCoordinates[1][1], flatCoordinates[2][0],
-      flatCoordinates[2][1]);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} Flat coordinates.
- */
-ol.format.GML3.prototype.readFlatPos_ = function(node, objectStack) {
-  var s = ol.xml.getAllTextContent(node, false);
-  var re = /^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/;
-  /** @type {Array.<number>} */
-  var flatCoordinates = [];
-  var m;
-  while ((m = re.exec(s))) {
-    flatCoordinates.push(parseFloat(m[1]));
-    s = s.substr(m[0].length);
-  }
-  if (s !== '') {
-    return undefined;
-  }
-  var context = objectStack[0];
-  var containerSrs = context['srsName'];
-  var axisOrientation = 'enu';
-  if (containerSrs) {
-    var proj = ol.proj.get(containerSrs);
-    axisOrientation = proj.getAxisOrientation();
-  }
-  if (axisOrientation === 'neu') {
-    var i, ii;
-    for (i = 0, ii = flatCoordinates.length; i < ii; i += 3) {
-      var y = flatCoordinates[i];
-      var x = flatCoordinates[i + 1];
-      flatCoordinates[i] = x;
-      flatCoordinates[i + 1] = y;
-    }
-  }
-  var len = flatCoordinates.length;
-  if (len == 2) {
-    flatCoordinates.push(0);
-  }
-  if (len === 0) {
-    return undefined;
-  }
-  return flatCoordinates;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} Flat coordinates.
- */
-ol.format.GML3.prototype.readFlatPosList_ = function(node, objectStack) {
-  var s = ol.xml.getAllTextContent(node, false).replace(/^\s*|\s*$/g, '');
-  var context = objectStack[0];
-  var containerSrs = context['srsName'];
-  var containerDimension = node.parentNode.getAttribute('srsDimension');
-  var axisOrientation = 'enu';
-  if (containerSrs) {
-    var proj = ol.proj.get(containerSrs);
-    axisOrientation = proj.getAxisOrientation();
-  }
-  var coords = s.split(/\s+/);
-  // The "dimension" attribute is from the GML 3.0.1 spec.
-  var dim = 2;
-  if (node.getAttribute('srsDimension')) {
-    dim = ol.format.XSD.readNonNegativeIntegerString(
-        node.getAttribute('srsDimension'));
-  } else if (node.getAttribute('dimension')) {
-    dim = ol.format.XSD.readNonNegativeIntegerString(
-        node.getAttribute('dimension'));
-  } else if (containerDimension) {
-    dim = ol.format.XSD.readNonNegativeIntegerString(containerDimension);
-  }
-  var x, y, z;
-  var flatCoordinates = [];
-  for (var i = 0, ii = coords.length; i < ii; i += dim) {
-    x = parseFloat(coords[i]);
-    y = parseFloat(coords[i + 1]);
-    z = (dim === 3) ? parseFloat(coords[i + 2]) : 0;
-    if (axisOrientation.substr(0, 2) === 'en') {
-      flatCoordinates.push(x, y, z);
-    } else {
-      flatCoordinates.push(y, x, z);
-    }
-  }
-  return flatCoordinates;
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'pos': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPos_),
-    'posList': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPosList_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'interior': ol.format.GML3.prototype.interiorParser_,
-    'exterior': ol.format.GML3.prototype.exteriorParser_
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.GEOMETRY_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint),
-    'MultiPoint': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiPoint),
-    'LineString': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readLineString),
-    'MultiLineString': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiLineString),
-    'LinearRing': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readLinearRing),
-    'Polygon': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPolygon),
-    'MultiPolygon': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiPolygon),
-    'Surface': ol.xml.makeReplacer(ol.format.GML3.prototype.readSurface_),
-    'MultiSurface': ol.xml.makeReplacer(
-        ol.format.GML3.prototype.readMultiSurface_),
-    'Curve': ol.xml.makeReplacer(ol.format.GML3.prototype.readCurve_),
-    'MultiCurve': ol.xml.makeReplacer(
-        ol.format.GML3.prototype.readMultiCurve_),
-    'Envelope': ol.xml.makeReplacer(ol.format.GML3.prototype.readEnvelope_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.MULTICURVE_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'curveMember': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.curveMemberParser_),
-    'curveMembers': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.curveMemberParser_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'surfaceMember': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.surfaceMemberParser_),
-    'surfaceMembers': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.surfaceMemberParser_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'LineString': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.readLineString),
-    'Curve': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readCurve_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'Polygon': ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readPolygon),
-    'Surface': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readSurface_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.SURFACE_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'patches': ol.xml.makeReplacer(ol.format.GML3.prototype.readPatch_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.CURVE_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'segments': ol.xml.makeReplacer(ol.format.GML3.prototype.readSegment_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.ENVELOPE_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'lowerCorner': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.readFlatPosList_),
-    'upperCorner': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.readFlatPosList_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.PATCHES_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'PolygonPatch': ol.xml.makeReplacer(
-        ol.format.GML3.prototype.readPolygonPatch_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.SEGMENTS_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'LineStringSegment': ol.xml.makeReplacer(
-        ol.format.GML3.prototype.readLineStringSegment_)
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Point} value Point geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writePos_ = function(node, value, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  var axisOrientation = 'enu';
-  if (srsName) {
-    axisOrientation = ol.proj.get(srsName).getAxisOrientation();
-  }
-  var point = value.getCoordinates();
-  var coords;
-  // only 2d for simple features profile
-  if (axisOrientation.substr(0, 2) === 'en') {
-    coords = (point[0] + ' ' + point[1]);
-  } else {
-    coords = (point[1] + ' ' + point[0]);
-  }
-  if (hasZ) {
-    // For newly created points, Z can be undefined.
-    var z = point[2] || 0;
-    coords += ' ' + z;
-  }
-  ol.format.XSD.writeStringTextNode(node, coords);
-};
-
-
-/**
- * @param {Array.<number>} point Point geometry.
- * @param {string=} opt_srsName Optional srsName
- * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not.
- * @return {string} The coords string.
- * @private
- */
-ol.format.GML3.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
-  var axisOrientation = 'enu';
-  if (opt_srsName) {
-    axisOrientation = ol.proj.get(opt_srsName).getAxisOrientation();
-  }
-  var coords = ((axisOrientation.substr(0, 2) === 'en') ?
-      point[0] + ' ' + point[1] :
-      point[1] + ' ' + point[0]);
-  if (opt_hasZ) {
-    // For newly created points, Z can be undefined.
-    var z = point[2] || 0;
-    coords += ' ' + z;
-  }
-
-  return coords;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString|ol.geom.LinearRing} value Geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writePosList_ = function(node, value, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  // only 2d for simple features profile
-  var points = value.getCoordinates();
-  var len = points.length;
-  var parts = new Array(len);
-  var point;
-  for (var i = 0; i < len; ++i) {
-    point = points[i];
-    parts[i] = this.getCoords_(point, srsName, hasZ);
-  }
-  ol.format.XSD.writeStringTextNode(node, parts.join(' '));
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Point} geometry Point geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writePoint_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var pos = ol.xml.createElementNS(node.namespaceURI, 'pos');
-  node.appendChild(pos);
-  this.writePos_(pos, geometry, objectStack);
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.ENVELOPE_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'lowerCorner': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-    'upperCorner': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode)
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Extent} extent Extent.
- * @param {Array.<*>} objectStack Node stack.
- */
-ol.format.GML3.prototype.writeEnvelope = function(node, extent, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var keys = ['lowerCorner', 'upperCorner'];
-  var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      ({node: node}), ol.format.GML3.ENVELOPE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values,
-      objectStack, keys, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LinearRing} geometry LinearRing geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeLinearRing_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var posList = ol.xml.createElementNS(node.namespaceURI, 'posList');
-  node.appendChild(posList);
-  this.writePosList_(posList, geometry, objectStack);
-};
-
-
-/**
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node} Node.
- * @private
- */
-ol.format.GML3.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var context = objectStack[objectStack.length - 1];
-  var parentNode = context.node;
-  var exteriorWritten = context['exteriorWritten'];
-  if (exteriorWritten === undefined) {
-    context['exteriorWritten'] = true;
-  }
-  return ol.xml.createElementNS(parentNode.namespaceURI,
-      exteriorWritten !== undefined ? 'interior' : 'exterior');
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} geometry Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeSurfaceOrPolygon_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  if (node.nodeName !== 'PolygonPatch' && srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {
-    var rings = geometry.getLinearRings();
-    ol.xml.pushSerializeAndPop(
-        {node: node, hasZ: hasZ, srsName: srsName},
-        ol.format.GML3.RING_SERIALIZERS_,
-        this.RING_NODE_FACTORY_,
-        rings, objectStack, undefined, this);
-  } else if (node.nodeName === 'Surface') {
-    var patches = ol.xml.createElementNS(node.namespaceURI, 'patches');
-    node.appendChild(patches);
-    this.writeSurfacePatches_(
-        patches, geometry, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} geometry LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (node.nodeName !== 'LineStringSegment' && srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  if (node.nodeName === 'LineString' ||
-      node.nodeName === 'LineStringSegment') {
-    var posList = ol.xml.createElementNS(node.namespaceURI, 'posList');
-    node.appendChild(posList);
-    this.writePosList_(posList, geometry, objectStack);
-  } else if (node.nodeName === 'Curve') {
-    var segments = ol.xml.createElementNS(node.namespaceURI, 'segments');
-    node.appendChild(segments);
-    this.writeCurveSegments_(segments,
-        geometry, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiPolygon} geometry MultiPolygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  var surface = context['surface'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var polygons = geometry.getPolygons();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, surface: surface},
-      ol.format.GML3.SURFACEORPOLYGONMEMBER_SERIALIZERS_,
-      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiPoint} geometry MultiPoint geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeMultiPoint_ = function(node, geometry,
-    objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  var hasZ = context['hasZ'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var points = geometry.getPoints();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName},
-      ol.format.GML3.POINTMEMBER_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory('pointMember'), points,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiLineString} geometry MultiLineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  var curve = context['curve'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var lines = geometry.getLineStrings();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, curve: curve},
-      ol.format.GML3.LINESTRINGORCURVEMEMBER_SERIALIZERS_,
-      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LinearRing} ring LinearRing geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeRing_ = function(node, ring, objectStack) {
-  var linearRing = ol.xml.createElementNS(node.namespaceURI, 'LinearRing');
-  node.appendChild(linearRing);
-  this.writeLinearRing_(linearRing, ring, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} polygon Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeSurfaceOrPolygonMember_ = function(node, polygon, objectStack) {
-  var child = this.GEOMETRY_NODE_FACTORY_(
-      polygon, objectStack);
-  if (child) {
-    node.appendChild(child);
-    this.writeSurfaceOrPolygon_(child, polygon, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Point} point Point geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writePointMember_ = function(node, point, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI, 'Point');
-  node.appendChild(child);
-  this.writePoint_(child, point, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} line LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack) {
-  var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);
-  if (child) {
-    node.appendChild(child);
-    this.writeCurveOrLineString_(child, line, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} polygon Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI, 'PolygonPatch');
-  node.appendChild(child);
-  this.writeSurfaceOrPolygon_(child, polygon, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} line LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeCurveSegments_ = function(node, line, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI,
-      'LineStringSegment');
-  node.appendChild(child);
-  this.writeCurveOrLineString_(child, line, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Geometry|ol.Extent} geometry Geometry.
- * @param {Array.<*>} objectStack Node stack.
- */
-ol.format.GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
-  var context = /** @type {olx.format.WriteOptions} */ (objectStack[objectStack.length - 1]);
-  var item = ol.obj.assign({}, context);
-  item.node = node;
-  var value;
-  if (Array.isArray(geometry)) {
-    if (context.dataProjection) {
-      value = ol.proj.transformExtent(
-          geometry, context.featureProjection, context.dataProjection);
-    } else {
-      value = geometry;
-    }
-  } else {
-    value =
-        ol.format.Feature.transformWithOptions(/** @type {ol.geom.Geometry} */ (geometry), true, context);
-  }
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      (item), ol.format.GML3.GEOMETRY_SERIALIZERS_,
-      this.GEOMETRY_NODE_FACTORY_, [value],
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Node stack.
- */
-ol.format.GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
-  var fid = feature.getId();
-  if (fid) {
-    node.setAttribute('fid', fid);
-  }
-  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var featureNS = context['featureNS'];
-  var geometryName = feature.getGeometryName();
-  if (!context.serializers) {
-    context.serializers = {};
-    context.serializers[featureNS] = {};
-  }
-  var properties = feature.getProperties();
-  var keys = [], values = [];
-  for (var key in properties) {
-    var value = properties[key];
-    if (value !== null) {
-      keys.push(key);
-      values.push(value);
-      if (key == geometryName || value instanceof ol.geom.Geometry) {
-        if (!(key in context.serializers[featureNS])) {
-          context.serializers[featureNS][key] = ol.xml.makeChildAppender(
-              this.writeGeometryElement, this);
-        }
-      } else {
-        if (!(key in context.serializers[featureNS])) {
-          context.serializers[featureNS][key] = ol.xml.makeChildAppender(
-              ol.format.XSD.writeStringTextNode);
-        }
-      }
-    }
-  }
-  var item = ol.obj.assign({}, context);
-  item.node = node;
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      (item), context.serializers,
-      ol.xml.makeSimpleNodeFactory(undefined, featureNS),
-      values,
-      objectStack, keys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<ol.Feature>} features Features.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeFeatureMembers_ = function(node, features, objectStack) {
-  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var featureType = context['featureType'];
-  var featureNS = context['featureNS'];
-  var serializers = {};
-  serializers[featureNS] = {};
-  serializers[featureNS][featureType] = ol.xml.makeChildAppender(
-      this.writeFeatureElement, this);
-  var item = ol.obj.assign({}, context);
-  item.node = node;
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      (item),
-      serializers,
-      ol.xml.makeSimpleNodeFactory(featureType, featureNS), features,
-      objectStack);
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.SURFACEORPOLYGONMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'surfaceMember': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeSurfaceOrPolygonMember_),
-    'polygonMember': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeSurfaceOrPolygonMember_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.POINTMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'pointMember': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writePointMember_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.LINESTRINGORCURVEMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'lineStringMember': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeLineStringOrCurveMember_),
-    'curveMember': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeLineStringOrCurveMember_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.RING_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'exterior': ol.xml.makeChildAppender(ol.format.GML3.prototype.writeRing_),
-    'interior': ol.xml.makeChildAppender(ol.format.GML3.prototype.writeRing_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.GEOMETRY_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'Curve': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeCurveOrLineString_),
-    'MultiCurve': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeMultiCurveOrLineString_),
-    'Point': ol.xml.makeChildAppender(ol.format.GML3.prototype.writePoint_),
-    'MultiPoint': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeMultiPoint_),
-    'LineString': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeCurveOrLineString_),
-    'MultiLineString': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeMultiCurveOrLineString_),
-    'LinearRing': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeLinearRing_),
-    'Polygon': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeSurfaceOrPolygon_),
-    'MultiPolygon': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeMultiSurfaceOrPolygon_),
-    'Surface': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeSurfaceOrPolygon_),
-    'MultiSurface': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeMultiSurfaceOrPolygon_),
-    'Envelope': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeEnvelope)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, string>}
- * @private
- */
-ol.format.GML3.MULTIGEOMETRY_TO_MEMBER_NODENAME_ = {
-  'MultiLineString': 'lineStringMember',
-  'MultiCurve': 'curveMember',
-  'MultiPolygon': 'polygonMember',
-  'MultiSurface': 'surfaceMember'
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var parentNode = objectStack[objectStack.length - 1].node;
-  return ol.xml.createElementNS('http://www.opengis.net/gml',
-      ol.format.GML3.MULTIGEOMETRY_TO_MEMBER_NODENAME_[parentNode.nodeName]);
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var context = objectStack[objectStack.length - 1];
-  var multiSurface = context['multiSurface'];
-  var surface = context['surface'];
-  var curve = context['curve'];
-  var multiCurve = context['multiCurve'];
-  var nodeName;
-  if (!Array.isArray(value)) {
-    nodeName = /** @type {ol.geom.Geometry} */ (value).getType();
-    if (nodeName === 'MultiPolygon' && multiSurface === true) {
-      nodeName = 'MultiSurface';
-    } else if (nodeName === 'Polygon' && surface === true) {
-      nodeName = 'Surface';
-    } else if (nodeName === 'LineString' && curve === true) {
-      nodeName = 'Curve';
-    } else if (nodeName === 'MultiLineString' && multiCurve === true) {
-      nodeName = 'MultiCurve';
-    }
-  } else {
-    nodeName = 'Envelope';
-  }
-  return ol.xml.createElementNS('http://www.opengis.net/gml',
-      nodeName);
-};
-
-
-/**
- * Encode a geometry in GML 3.1.1 Simple Features.
- *
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- * @override
- * @api
- */
-ol.format.GML3.prototype.writeGeometryNode = function(geometry, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var geom = ol.xml.createElementNS('http://www.opengis.net/gml', 'geom');
-  var context = {node: geom, hasZ: this.hasZ, srsName: this.srsName,
-    curve: this.curve_, surface: this.surface_,
-    multiSurface: this.multiSurface_, multiCurve: this.multiCurve_};
-  if (opt_options) {
-    ol.obj.assign(context, opt_options);
-  }
-  this.writeGeometryElement(geom, geometry, [context]);
-  return geom;
-};
-
-
-/**
- * Encode an array of features in GML 3.1.1 Simple Features.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {string} Result.
- * @api
- */
-ol.format.GML3.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features in the GML 3.1.1 format as an XML node.
- *
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- * @override
- * @api
- */
-ol.format.GML3.prototype.writeFeaturesNode = function(features, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var node = ol.xml.createElementNS('http://www.opengis.net/gml',
-      'featureMembers');
-  ol.xml.setAttributeNS(node, 'http://www.w3.org/2001/XMLSchema-instance',
-      'xsi:schemaLocation', this.schemaLocation);
-  var context = {
-    srsName: this.srsName,
-    hasZ: this.hasZ,
-    curve: this.curve_,
-    surface: this.surface_,
-    multiSurface: this.multiSurface_,
-    multiCurve: this.multiCurve_,
-    featureNS: this.featureNS,
-    featureType: this.featureType
-  };
-  if (opt_options) {
-    ol.obj.assign(context, opt_options);
-  }
-  this.writeFeatureMembers_(node, features, [context]);
-  return node;
-};
-
-goog.provide('ol.format.GML');
-
-goog.require('ol.format.GML3');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the GML format
- * version 3.1.1.
- * Currently only supports GML 3.1.1 Simple Features profile.
- *
- * @constructor
- * @param {olx.format.GMLOptions=} opt_options
- *     Optional configuration object.
- * @extends {ol.format.GMLBase}
- * @api
- */
-ol.format.GML = ol.format.GML3;
-
-
-/**
- * Encode an array of features in GML 3.1.1 Simple Features.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {string} Result.
- * @api
- */
-ol.format.GML.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features in the GML 3.1.1 format as an XML node.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- * @api
- */
-ol.format.GML.prototype.writeFeaturesNode;
-
-goog.provide('ol.format.GML2');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.format.Feature');
-goog.require('ol.format.GMLBase');
-goog.require('ol.format.XSD');
-goog.require('ol.geom.Geometry');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the GML format,
- * version 2.1.2.
- *
- * @constructor
- * @param {olx.format.GMLOptions=} opt_options Optional configuration object.
- * @extends {ol.format.GMLBase}
- * @api
- */
-ol.format.GML2 = function(opt_options) {
-  var options = /** @type {olx.format.GMLOptions} */
-      (opt_options ? opt_options : {});
-
-  ol.format.GMLBase.call(this, options);
-
-  this.FEATURE_COLLECTION_PARSERS[ol.format.GMLBase.GMLNS][
-      'featureMember'] =
-      ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readFeaturesInternal);
-
-  /**
-   * @inheritDoc
-   */
-  this.schemaLocation = options.schemaLocation ?
-      options.schemaLocation : ol.format.GML2.schemaLocation_;
-
-};
-ol.inherits(ol.format.GML2, ol.format.GMLBase);
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.GML2.schemaLocation_ = ol.format.GMLBase.GMLNS +
-    ' http://schemas.opengis.net/gml/2.1.2/feature.xsd';
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} Flat coordinates.
- */
-ol.format.GML2.prototype.readFlatCoordinates_ = function(node, objectStack) {
-  var s = ol.xml.getAllTextContent(node, false).replace(/^\s*|\s*$/g, '');
-  var context = /** @type {ol.XmlNodeStackItem} */ (objectStack[0]);
-  var containerSrs = context['srsName'];
-  var axisOrientation = 'enu';
-  if (containerSrs) {
-    var proj = ol.proj.get(containerSrs);
-    if (proj) {
-      axisOrientation = proj.getAxisOrientation();
-    }
-  }
-  var coordsGroups = s.trim().split(/\s+/);
-  var x, y, z;
-  var flatCoordinates = [];
-  for (var i = 0, ii = coordsGroups.length; i < ii; i++) {
-    var coords = coordsGroups[i].split(/,+/);
-    x = parseFloat(coords[0]);
-    y = parseFloat(coords[1]);
-    z = (coords.length === 3) ? parseFloat(coords[2]) : 0;
-    if (axisOrientation.substr(0, 2) === 'en') {
-      flatCoordinates.push(x, y, z);
-    } else {
-      flatCoordinates.push(y, x, z);
-    }
-  }
-  return flatCoordinates;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Extent|undefined} Envelope.
- */
-ol.format.GML2.prototype.readBox_ = function(node, objectStack) {
-  /** @type {Array.<number>} */
-  var flatCoordinates = ol.xml.pushParseAndPop([null],
-      this.BOX_PARSERS_, node, objectStack, this);
-  return ol.extent.createOrUpdate(flatCoordinates[1][0],
-      flatCoordinates[1][1], flatCoordinates[1][3],
-      flatCoordinates[1][4]);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML2.prototype.innerBoundaryIsParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      this.RING_PARSERS, node, objectStack, this);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings.push(flatLinearRing);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML2.prototype.outerBoundaryIsParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      this.RING_PARSERS, node, objectStack, this);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings[0] = flatLinearRing;
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'coordinates': ol.xml.makeReplacer(
-        ol.format.GML2.prototype.readFlatCoordinates_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'innerBoundaryIs': ol.format.GML2.prototype.innerBoundaryIsParser_,
-    'outerBoundaryIs': ol.format.GML2.prototype.outerBoundaryIsParser_
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML2.prototype.BOX_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'coordinates': ol.xml.makeArrayPusher(
-        ol.format.GML2.prototype.readFlatCoordinates_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML2.prototype.GEOMETRY_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint),
-    'MultiPoint': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiPoint),
-    'LineString': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readLineString),
-    'MultiLineString': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiLineString),
-    'LinearRing': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readLinearRing),
-    'Polygon': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPolygon),
-    'MultiPolygon': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiPolygon),
-    'Box': ol.xml.makeReplacer(ol.format.GML2.prototype.readBox_)
-  }
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.GML2.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var context = objectStack[objectStack.length - 1];
-  var multiSurface = context['multiSurface'];
-  var surface = context['surface'];
-  var multiCurve = context['multiCurve'];
-  var nodeName;
-  if (!Array.isArray(value)) {
-    nodeName = /** @type {ol.geom.Geometry} */ (value).getType();
-    if (nodeName === 'MultiPolygon' && multiSurface === true) {
-      nodeName = 'MultiSurface';
-    } else if (nodeName === 'Polygon' && surface === true) {
-      nodeName = 'Surface';
-    } else if (nodeName === 'MultiLineString' && multiCurve === true) {
-      nodeName = 'MultiCurve';
-    }
-  } else {
-    nodeName = 'Envelope';
-  }
-  return ol.xml.createElementNS('http://www.opengis.net/gml',
-      nodeName);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Node stack.
- */
-ol.format.GML2.prototype.writeFeatureElement = function(node, feature, objectStack) {
-  var fid = feature.getId();
-  if (fid) {
-    node.setAttribute('fid', fid);
-  }
-  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var featureNS = context['featureNS'];
-  var geometryName = feature.getGeometryName();
-  if (!context.serializers) {
-    context.serializers = {};
-    context.serializers[featureNS] = {};
-  }
-  var properties = feature.getProperties();
-  var keys = [], values = [];
-  for (var key in properties) {
-    var value = properties[key];
-    if (value !== null) {
-      keys.push(key);
-      values.push(value);
-      if (key == geometryName || value instanceof ol.geom.Geometry) {
-        if (!(key in context.serializers[featureNS])) {
-          context.serializers[featureNS][key] = ol.xml.makeChildAppender(
-              this.writeGeometryElement, this);
-        }
-      } else {
-        if (!(key in context.serializers[featureNS])) {
-          context.serializers[featureNS][key] = ol.xml.makeChildAppender(
-              ol.format.XSD.writeStringTextNode);
-        }
-      }
-    }
-  }
-  var item = ol.obj.assign({}, context);
-  item.node = node;
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      (item), context.serializers,
-      ol.xml.makeSimpleNodeFactory(undefined, featureNS),
-      values,
-      objectStack, keys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Geometry|ol.Extent} geometry Geometry.
- * @param {Array.<*>} objectStack Node stack.
- */
-ol.format.GML2.prototype.writeGeometryElement = function(node, geometry, objectStack) {
-  var context = /** @type {olx.format.WriteOptions} */ (objectStack[objectStack.length - 1]);
-  var item = ol.obj.assign({}, context);
-  item.node = node;
-  var value;
-  if (Array.isArray(geometry)) {
-    if (context.dataProjection) {
-      value = ol.proj.transformExtent(
-          geometry, context.featureProjection, context.dataProjection);
-    } else {
-      value = geometry;
-    }
-  } else {
-    value =
-        ol.format.Feature.transformWithOptions(/** @type {ol.geom.Geometry} */ (geometry), true, context);
-  }
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      (item), ol.format.GML2.GEOMETRY_SERIALIZERS_,
-      this.GEOMETRY_NODE_FACTORY_, [value],
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} geometry LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (node.nodeName !== 'LineStringSegment' && srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  if (node.nodeName === 'LineString' ||
-      node.nodeName === 'LineStringSegment') {
-    var coordinates = this.createCoordinatesNode_(node.namespaceURI);
-    node.appendChild(coordinates);
-    this.writeCoordinates_(coordinates, geometry, objectStack);
-  } else if (node.nodeName === 'Curve') {
-    var segments = ol.xml.createElementNS(node.namespaceURI, 'segments');
-    node.appendChild(segments);
-    this.writeCurveSegments_(segments,
-        geometry, objectStack);
-  }
-};
-
-
-/**
- * @param {string} namespaceURI XML namespace.
- * @returns {Node} coordinates node.
- * @private
- */
-ol.format.GML2.prototype.createCoordinatesNode_ = function(namespaceURI) {
-  var coordinates = ol.xml.createElementNS(namespaceURI, 'coordinates');
-  coordinates.setAttribute('decimal', '.');
-  coordinates.setAttribute('cs', ',');
-  coordinates.setAttribute('ts', ' ');
-
-  return coordinates;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString|ol.geom.LinearRing} value Geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeCoordinates_ = function(node, value, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  // only 2d for simple features profile
-  var points = value.getCoordinates();
-  var len = points.length;
-  var parts = new Array(len);
-  var point;
-  for (var i = 0; i < len; ++i) {
-    point = points[i];
-    parts[i] = this.getCoords_(point, srsName, hasZ);
-  }
-  ol.format.XSD.writeStringTextNode(node, parts.join(' '));
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} line LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeCurveSegments_ = function(node, line, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI,
-      'LineStringSegment');
-  node.appendChild(child);
-  this.writeCurveOrLineString_(child, line, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} geometry Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeSurfaceOrPolygon_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  if (node.nodeName !== 'PolygonPatch' && srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {
-    var rings = geometry.getLinearRings();
-    ol.xml.pushSerializeAndPop(
-        {node: node, hasZ: hasZ, srsName: srsName},
-        ol.format.GML2.RING_SERIALIZERS_,
-        this.RING_NODE_FACTORY_,
-        rings, objectStack, undefined, this);
-  } else if (node.nodeName === 'Surface') {
-    var patches = ol.xml.createElementNS(node.namespaceURI, 'patches');
-    node.appendChild(patches);
-    this.writeSurfacePatches_(
-        patches, geometry, objectStack);
-  }
-};
-
-
-/**
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node} Node.
- * @private
- */
-ol.format.GML2.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var context = objectStack[objectStack.length - 1];
-  var parentNode = context.node;
-  var exteriorWritten = context['exteriorWritten'];
-  if (exteriorWritten === undefined) {
-    context['exteriorWritten'] = true;
-  }
-  return ol.xml.createElementNS(parentNode.namespaceURI,
-      exteriorWritten !== undefined ? 'innerBoundaryIs' : 'outerBoundaryIs');
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} polygon Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI, 'PolygonPatch');
-  node.appendChild(child);
-  this.writeSurfaceOrPolygon_(child, polygon, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LinearRing} ring LinearRing geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeRing_ = function(node, ring, objectStack) {
-  var linearRing = ol.xml.createElementNS(node.namespaceURI, 'LinearRing');
-  node.appendChild(linearRing);
-  this.writeLinearRing_(linearRing, ring, objectStack);
-};
-
-
-/**
- * @param {Array.<number>} point Point geometry.
- * @param {string=} opt_srsName Optional srsName
- * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not.
- * @return {string} The coords string.
- * @private
- */
-ol.format.GML2.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
-  var axisOrientation = 'enu';
-  if (opt_srsName) {
-    axisOrientation = ol.proj.get(opt_srsName).getAxisOrientation();
-  }
-  var coords = ((axisOrientation.substr(0, 2) === 'en') ?
-      point[0] + ',' + point[1] :
-      point[1] + ',' + point[0]);
-  if (opt_hasZ) {
-    // For newly created points, Z can be undefined.
-    var z = point[2] || 0;
-    coords += ',' + z;
-  }
-
-  return coords;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiLineString} geometry MultiLineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  var curve = context['curve'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var lines = geometry.getLineStrings();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, curve: curve},
-      ol.format.GML2.LINESTRINGORCURVEMEMBER_SERIALIZERS_,
-      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Point} geometry Point geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writePoint_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var coordinates = this.createCoordinatesNode_(node.namespaceURI);
-  node.appendChild(coordinates);
-  var point = geometry.getCoordinates();
-  var coord = this.getCoords_(point, srsName, hasZ);
-  ol.format.XSD.writeStringTextNode(coordinates, coord);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiPoint} geometry MultiPoint geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeMultiPoint_ = function(node, geometry,
-    objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var points = geometry.getPoints();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName},
-      ol.format.GML2.POINTMEMBER_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory('pointMember'), points,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Point} point Point geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writePointMember_ = function(node, point, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI, 'Point');
-  node.appendChild(child);
-  this.writePoint_(child, point, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} line LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack) {
-  var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);
-  if (child) {
-    node.appendChild(child);
-    this.writeCurveOrLineString_(child, line, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LinearRing} geometry LinearRing geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeLinearRing_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var coordinates = this.createCoordinatesNode_(node.namespaceURI);
-  node.appendChild(coordinates);
-  this.writeCoordinates_(coordinates, geometry, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiPolygon} geometry MultiPolygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  var surface = context['surface'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var polygons = geometry.getPolygons();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, surface: surface},
-      ol.format.GML2.SURFACEORPOLYGONMEMBER_SERIALIZERS_,
-      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} polygon Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeSurfaceOrPolygonMember_ = function(node, polygon, objectStack) {
-  var child = this.GEOMETRY_NODE_FACTORY_(
-      polygon, objectStack);
-  if (child) {
-    node.appendChild(child);
-    this.writeSurfaceOrPolygon_(child, polygon, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Extent} extent Extent.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeEnvelope = function(node, extent, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var keys = ['lowerCorner', 'upperCorner'];
-  var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      ({node: node}), ol.format.GML2.ENVELOPE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values,
-      objectStack, keys, this);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.GEOMETRY_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'Curve': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeCurveOrLineString_),
-    'MultiCurve': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeMultiCurveOrLineString_),
-    'Point': ol.xml.makeChildAppender(ol.format.GML2.prototype.writePoint_),
-    'MultiPoint': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeMultiPoint_),
-    'LineString': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeCurveOrLineString_),
-    'MultiLineString': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeMultiCurveOrLineString_),
-    'LinearRing': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeLinearRing_),
-    'Polygon': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeSurfaceOrPolygon_),
-    'MultiPolygon': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeMultiSurfaceOrPolygon_),
-    'Surface': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeSurfaceOrPolygon_),
-    'MultiSurface': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeMultiSurfaceOrPolygon_),
-    'Envelope': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeEnvelope)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.RING_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'outerBoundaryIs': ol.xml.makeChildAppender(ol.format.GML2.prototype.writeRing_),
-    'innerBoundaryIs': ol.xml.makeChildAppender(ol.format.GML2.prototype.writeRing_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.POINTMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'pointMember': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writePointMember_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.LINESTRINGORCURVEMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'lineStringMember': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeLineStringOrCurveMember_),
-    'curveMember': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeLineStringOrCurveMember_)
-  }
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.GML2.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var parentNode = objectStack[objectStack.length - 1].node;
-  return ol.xml.createElementNS('http://www.opengis.net/gml',
-      ol.format.GML2.MULTIGEOMETRY_TO_MEMBER_NODENAME_[parentNode.nodeName]);
-};
-
-/**
- * @const
- * @type {Object.<string, string>}
- * @private
- */
-ol.format.GML2.MULTIGEOMETRY_TO_MEMBER_NODENAME_ = {
-  'MultiLineString': 'lineStringMember',
-  'MultiCurve': 'curveMember',
-  'MultiPolygon': 'polygonMember',
-  'MultiSurface': 'surfaceMember'
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.SURFACEORPOLYGONMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'surfaceMember': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeSurfaceOrPolygonMember_),
-    'polygonMember': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeSurfaceOrPolygonMember_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.ENVELOPE_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'lowerCorner': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-    'upperCorner': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode)
-  }
-};
-
-goog.provide('ol.format.GPX');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.array');
-goog.require('ol.format.Feature');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.format.XSD');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.Point');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the GPX format.
- *
- * @constructor
- * @extends {ol.format.XMLFeature}
- * @param {olx.format.GPXOptions=} opt_options Options.
- * @api
- */
-ol.format.GPX = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.XMLFeature.call(this);
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get('EPSG:4326');
-
-  /**
-   * @type {function(ol.Feature, Node)|undefined}
-   * @private
-   */
-  this.readExtensions_ = options.readExtensions;
-};
-ol.inherits(ol.format.GPX, ol.format.XMLFeature);
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.format.GPX.NAMESPACE_URIS_ = [
-  null,
-  'http://www.topografix.com/GPX/1/0',
-  'http://www.topografix.com/GPX/1/1'
-];
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.GPX.SCHEMA_LOCATION_ = 'http://www.topografix.com/GPX/1/1 ' +
-    'http://www.topografix.com/GPX/1/1/gpx.xsd';
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {ol.LayoutOptions} layoutOptions Layout options.
- * @param {Node} node Node.
- * @param {Object} values Values.
- * @private
- * @return {Array.<number>} Flat coordinates.
- */
-ol.format.GPX.appendCoordinate_ = function(flatCoordinates, layoutOptions, node, values) {
-  flatCoordinates.push(
-      parseFloat(node.getAttribute('lon')),
-      parseFloat(node.getAttribute('lat')));
-  if ('ele' in values) {
-    flatCoordinates.push(/** @type {number} */ (values['ele']));
-    delete values['ele'];
-    layoutOptions.hasZ = true;
-  } else {
-    flatCoordinates.push(0);
-  }
-  if ('time' in values) {
-    flatCoordinates.push(/** @type {number} */ (values['time']));
-    delete values['time'];
-    layoutOptions.hasM = true;
-  } else {
-    flatCoordinates.push(0);
-  }
-  return flatCoordinates;
-};
-
-
-/**
- * Choose GeometryLayout based on flags in layoutOptions and adjust flatCoordinates
- * and ends arrays by shrinking them accordingly (removing unused zero entries).
- *
- * @param {ol.LayoutOptions} layoutOptions Layout options.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {Array.<number>=} ends Ends.
- * @return {ol.geom.GeometryLayout} Layout.
- */
-ol.format.GPX.applyLayoutOptions_ = function(layoutOptions, flatCoordinates, ends) {
-  var layout = ol.geom.GeometryLayout.XY;
-  var stride = 2;
-  if (layoutOptions.hasZ && layoutOptions.hasM) {
-    layout = ol.geom.GeometryLayout.XYZM;
-    stride = 4;
-  } else if (layoutOptions.hasZ) {
-    layout = ol.geom.GeometryLayout.XYZ;
-    stride = 3;
-  } else if (layoutOptions.hasM) {
-    layout = ol.geom.GeometryLayout.XYM;
-    stride = 3;
-  }
-  if (stride !== 4) {
-    var i, ii;
-    for (i = 0, ii = flatCoordinates.length / 4; i < ii; i++) {
-      flatCoordinates[i * stride] = flatCoordinates[i * 4];
-      flatCoordinates[i * stride + 1] = flatCoordinates[i * 4 + 1];
-      if (layoutOptions.hasZ) {
-        flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 2];
-      }
-      if (layoutOptions.hasM) {
-        flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 3];
-      }
-    }
-    flatCoordinates.length = flatCoordinates.length / 4 * stride;
-    if (ends) {
-      for (i = 0, ii = ends.length; i < ii; i++) {
-        ends[i] = ends[i] / 4 * stride;
-      }
-    }
-  }
-  return layout;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.parseLink_ = function(node, objectStack) {
-  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var href = node.getAttribute('href');
-  if (href !== null) {
-    values['link'] = href;
-  }
-  ol.xml.parseNode(ol.format.GPX.LINK_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.parseExtensions_ = function(node, objectStack) {
-  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  values['extensionsNode_'] = node;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.parseRtePt_ = function(node, objectStack) {
-  var values = ol.xml.pushParseAndPop(
-      {}, ol.format.GPX.RTEPT_PARSERS_, node, objectStack);
-  if (values) {
-    var rteValues = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-    var flatCoordinates = /** @type {Array.<number>} */
-        (rteValues['flatCoordinates']);
-    var layoutOptions = /** @type {ol.LayoutOptions} */
-        (rteValues['layoutOptions']);
-    ol.format.GPX.appendCoordinate_(flatCoordinates, layoutOptions, node, values);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.parseTrkPt_ = function(node, objectStack) {
-  var values = ol.xml.pushParseAndPop(
-      {}, ol.format.GPX.TRKPT_PARSERS_, node, objectStack);
-  if (values) {
-    var trkValues = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-    var flatCoordinates = /** @type {Array.<number>} */
-        (trkValues['flatCoordinates']);
-    var layoutOptions = /** @type {ol.LayoutOptions} */
-        (trkValues['layoutOptions']);
-    ol.format.GPX.appendCoordinate_(flatCoordinates, layoutOptions, node, values);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.parseTrkSeg_ = function(node, objectStack) {
-  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  ol.xml.parseNode(ol.format.GPX.TRKSEG_PARSERS_, node, objectStack);
-  var flatCoordinates = /** @type {Array.<number>} */
-      (values['flatCoordinates']);
-  var ends = /** @type {Array.<number>} */ (values['ends']);
-  ends.push(flatCoordinates.length);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Feature|undefined} Track.
- */
-ol.format.GPX.readRte_ = function(node, objectStack) {
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-  var values = ol.xml.pushParseAndPop({
-    'flatCoordinates': [],
-    'layoutOptions': {}
-  }, ol.format.GPX.RTE_PARSERS_, node, objectStack);
-  if (!values) {
-    return undefined;
-  }
-  var flatCoordinates = /** @type {Array.<number>} */
-      (values['flatCoordinates']);
-  delete values['flatCoordinates'];
-  var layoutOptions = /** @type {ol.LayoutOptions} */ (values['layoutOptions']);
-  delete values['layoutOptions'];
-  var layout = ol.format.GPX.applyLayoutOptions_(layoutOptions, flatCoordinates);
-  var geometry = new ol.geom.LineString(null);
-  geometry.setFlatCoordinates(layout, flatCoordinates);
-  ol.format.Feature.transformWithOptions(geometry, false, options);
-  var feature = new ol.Feature(geometry);
-  feature.setProperties(values);
-  return feature;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Feature|undefined} Track.
- */
-ol.format.GPX.readTrk_ = function(node, objectStack) {
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-  var values = ol.xml.pushParseAndPop({
-    'flatCoordinates': [],
-    'ends': [],
-    'layoutOptions': {}
-  }, ol.format.GPX.TRK_PARSERS_, node, objectStack);
-  if (!values) {
-    return undefined;
-  }
-  var flatCoordinates = /** @type {Array.<number>} */
-      (values['flatCoordinates']);
-  delete values['flatCoordinates'];
-  var ends = /** @type {Array.<number>} */ (values['ends']);
-  delete values['ends'];
-  var layoutOptions = /** @type {ol.LayoutOptions} */ (values['layoutOptions']);
-  delete values['layoutOptions'];
-  var layout = ol.format.GPX.applyLayoutOptions_(layoutOptions, flatCoordinates, ends);
-  var geometry = new ol.geom.MultiLineString(null);
-  geometry.setFlatCoordinates(layout, flatCoordinates, ends);
-  ol.format.Feature.transformWithOptions(geometry, false, options);
-  var feature = new ol.Feature(geometry);
-  feature.setProperties(values);
-  return feature;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Feature|undefined} Waypoint.
- */
-ol.format.GPX.readWpt_ = function(node, objectStack) {
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-  var values = ol.xml.pushParseAndPop(
-      {}, ol.format.GPX.WPT_PARSERS_, node, objectStack);
-  if (!values) {
-    return undefined;
-  }
-  var layoutOptions = /** @type {ol.LayoutOptions} */ ({});
-  var coordinates = ol.format.GPX.appendCoordinate_([], layoutOptions, node, values);
-  var layout = ol.format.GPX.applyLayoutOptions_(layoutOptions, coordinates);
-  var geometry = new ol.geom.Point(coordinates, layout);
-  ol.format.Feature.transformWithOptions(geometry, false, options);
-  var feature = new ol.Feature(geometry);
-  feature.setProperties(values);
-  return feature;
-};
-
-
-/**
- * @const
- * @type {Object.<string, function(Node, Array.<*>): (ol.Feature|undefined)>}
- * @private
- */
-ol.format.GPX.FEATURE_READER_ = {
-  'rte': ol.format.GPX.readRte_,
-  'trk': ol.format.GPX.readTrk_,
-  'wpt': ol.format.GPX.readWpt_
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.GPX_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'rte': ol.xml.makeArrayPusher(ol.format.GPX.readRte_),
-      'trk': ol.xml.makeArrayPusher(ol.format.GPX.readTrk_),
-      'wpt': ol.xml.makeArrayPusher(ol.format.GPX.readWpt_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.LINK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'text':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readString, 'linkText'),
-      'type':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readString, 'linkType')
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.RTE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'cmt': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'desc': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'src': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'link': ol.format.GPX.parseLink_,
-      'number':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readNonNegativeInteger),
-      'extensions': ol.format.GPX.parseExtensions_,
-      'type': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'rtept': ol.format.GPX.parseRtePt_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.RTEPT_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'ele': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'time': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDateTime)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.TRK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'cmt': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'desc': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'src': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'link': ol.format.GPX.parseLink_,
-      'number':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readNonNegativeInteger),
-      'type': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'extensions': ol.format.GPX.parseExtensions_,
-      'trkseg': ol.format.GPX.parseTrkSeg_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.TRKSEG_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'trkpt': ol.format.GPX.parseTrkPt_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.TRKPT_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'ele': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'time': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDateTime)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.WPT_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'ele': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'time': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDateTime),
-      'magvar': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'geoidheight': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'cmt': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'desc': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'src': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'link': ol.format.GPX.parseLink_,
-      'sym': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'type': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'fix': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'sat': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'hdop': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'vdop': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'pdop': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'ageofdgpsdata':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'dgpsid':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readNonNegativeInteger),
-      'extensions': ol.format.GPX.parseExtensions_
-    });
-
-
-/**
- * @param {Array.<ol.Feature>} features List of features.
- * @private
- */
-ol.format.GPX.prototype.handleReadExtensions_ = function(features) {
-  if (!features) {
-    features = [];
-  }
-  for (var i = 0, ii = features.length; i < ii; ++i) {
-    var feature = features[i];
-    if (this.readExtensions_) {
-      var extensionsNode = feature.get('extensionsNode_') || null;
-      this.readExtensions_(feature, extensionsNode);
-    }
-    feature.set('extensionsNode_', undefined);
-  }
-};
-
-
-/**
- * Read the first feature from a GPX source.
- * Routes (`<rte>`) are converted into LineString geometries, and tracks (`<trk>`)
- * into MultiLineString. Any properties on route and track waypoints are ignored.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.GPX.prototype.readFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GPX.prototype.readFeatureFromNode = function(node, opt_options) {
-  if (!ol.array.includes(ol.format.GPX.NAMESPACE_URIS_, node.namespaceURI)) {
-    return null;
-  }
-  var featureReader = ol.format.GPX.FEATURE_READER_[node.localName];
-  if (!featureReader) {
-    return null;
-  }
-  var feature = featureReader(node, [this.getReadOptions(node, opt_options)]);
-  if (!feature) {
-    return null;
-  }
-  this.handleReadExtensions_([feature]);
-  return feature;
-};
-
-
-/**
- * Read all features from a GPX source.
- * Routes (`<rte>`) are converted into LineString geometries, and tracks (`<trk>`)
- * into MultiLineString. Any properties on route and track waypoints are ignored.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.GPX.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
-  if (!ol.array.includes(ol.format.GPX.NAMESPACE_URIS_, node.namespaceURI)) {
-    return [];
-  }
-  if (node.localName == 'gpx') {
-    /** @type {Array.<ol.Feature>} */
-    var features = ol.xml.pushParseAndPop([], ol.format.GPX.GPX_PARSERS_,
-        node, [this.getReadOptions(node, opt_options)]);
-    if (features) {
-      this.handleReadExtensions_(features);
-      return features;
-    } else {
-      return [];
-    }
-  }
-  return [];
-};
-
-
-/**
- * Read the projection from a GPX source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.GPX.prototype.readProjection;
-
-
-/**
- * @param {Node} node Node.
- * @param {string} value Value for the link's `href` attribute.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GPX.writeLink_ = function(node, value, objectStack) {
-  node.setAttribute('href', value);
-  var context = objectStack[objectStack.length - 1];
-  var properties = context['properties'];
-  var link = [
-    properties['linkText'],
-    properties['linkType']
-  ];
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */ ({node: node}),
-      ol.format.GPX.LINK_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      link, objectStack, ol.format.GPX.LINK_SEQUENCE_);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.writeWptType_ = function(node, coordinate, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var parentNode = context.node;
-  var namespaceURI = parentNode.namespaceURI;
-  var properties = context['properties'];
-  //FIXME Projection handling
-  ol.xml.setAttributeNS(node, null, 'lat', coordinate[1]);
-  ol.xml.setAttributeNS(node, null, 'lon', coordinate[0]);
-  var geometryLayout = context['geometryLayout'];
-  switch (geometryLayout) {
-    case ol.geom.GeometryLayout.XYZM:
-      if (coordinate[3] !== 0) {
-        properties['time'] = coordinate[3];
-      }
-      // fall through
-    case ol.geom.GeometryLayout.XYZ:
-      if (coordinate[2] !== 0) {
-        properties['ele'] = coordinate[2];
-      }
-      break;
-    case ol.geom.GeometryLayout.XYM:
-      if (coordinate[2] !== 0) {
-        properties['time'] = coordinate[2];
-      }
-      break;
-    default:
-      // pass
-  }
-  var orderedKeys = (node.nodeName == 'rtept') ?
-      ol.format.GPX.RTEPT_TYPE_SEQUENCE_[namespaceURI] :
-      ol.format.GPX.WPT_TYPE_SEQUENCE_[namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      ({node: node, 'properties': properties}),
-      ol.format.GPX.WPT_TYPE_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.writeRte_ = function(node, feature, objectStack) {
-  var options = /** @type {olx.format.WriteOptions} */ (objectStack[0]);
-  var properties = feature.getProperties();
-  var context = {node: node, 'properties': properties};
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    geometry = /** @type {ol.geom.LineString} */
-        (ol.format.Feature.transformWithOptions(geometry, true, options));
-    context['geometryLayout'] = geometry.getLayout();
-    properties['rtept'] = geometry.getCoordinates();
-  }
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.GPX.RTE_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.GPX.RTE_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.writeTrk_ = function(node, feature, objectStack) {
-  var options = /** @type {olx.format.WriteOptions} */ (objectStack[0]);
-  var properties = feature.getProperties();
-  /** @type {ol.XmlNodeStackItem} */
-  var context = {node: node, 'properties': properties};
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    geometry = /** @type {ol.geom.MultiLineString} */
-        (ol.format.Feature.transformWithOptions(geometry, true, options));
-    properties['trkseg'] = geometry.getLineStrings();
-  }
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.GPX.TRK_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.GPX.TRK_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} lineString LineString.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.writeTrkSeg_ = function(node, lineString, objectStack) {
-  /** @type {ol.XmlNodeStackItem} */
-  var context = {node: node, 'geometryLayout': lineString.getLayout(),
-    'properties': {}};
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.GPX.TRKSEG_SERIALIZERS_, ol.format.GPX.TRKSEG_NODE_FACTORY_,
-      lineString.getCoordinates(), objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.writeWpt_ = function(node, feature, objectStack) {
-  var options = /** @type {olx.format.WriteOptions} */ (objectStack[0]);
-  var context = objectStack[objectStack.length - 1];
-  context['properties'] = feature.getProperties();
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    geometry = /** @type {ol.geom.Point} */
-        (ol.format.Feature.transformWithOptions(geometry, true, options));
-    context['geometryLayout'] = geometry.getLayout();
-    ol.format.GPX.writeWptType_(node, geometry.getCoordinates(), objectStack);
-  }
-};
-
-
-/**
- * @const
- * @type {Array.<string>}
- * @private
- */
-ol.format.GPX.LINK_SEQUENCE_ = ['text', 'type'];
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.LINK_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'text': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'type': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.GPX.RTE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, [
-      'name', 'cmt', 'desc', 'src', 'link', 'number', 'type', 'rtept'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.RTE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'name': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'cmt': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'desc': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'src': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'link': ol.xml.makeChildAppender(ol.format.GPX.writeLink_),
-      'number': ol.xml.makeChildAppender(
-          ol.format.XSD.writeNonNegativeIntegerTextNode),
-      'type': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'rtept': ol.xml.makeArraySerializer(ol.xml.makeChildAppender(
-          ol.format.GPX.writeWptType_))
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.GPX.RTEPT_TYPE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, [
-      'ele', 'time'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.GPX.TRK_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, [
-      'name', 'cmt', 'desc', 'src', 'link', 'number', 'type', 'trkseg'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.TRK_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'name': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'cmt': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'desc': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'src': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'link': ol.xml.makeChildAppender(ol.format.GPX.writeLink_),
-      'number': ol.xml.makeChildAppender(
-          ol.format.XSD.writeNonNegativeIntegerTextNode),
-      'type': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'trkseg': ol.xml.makeArraySerializer(ol.xml.makeChildAppender(
-          ol.format.GPX.writeTrkSeg_))
-    });
-
-
-/**
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.GPX.TRKSEG_NODE_FACTORY_ = ol.xml.makeSimpleNodeFactory('trkpt');
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.TRKSEG_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'trkpt': ol.xml.makeChildAppender(ol.format.GPX.writeWptType_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.GPX.WPT_TYPE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, [
-      'ele', 'time', 'magvar', 'geoidheight', 'name', 'cmt', 'desc', 'src',
-      'link', 'sym', 'type', 'fix', 'sat', 'hdop', 'vdop', 'pdop',
-      'ageofdgpsdata', 'dgpsid'
-    ]);
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.WPT_TYPE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'ele': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'time': ol.xml.makeChildAppender(ol.format.XSD.writeDateTimeTextNode),
-      'magvar': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'geoidheight': ol.xml.makeChildAppender(
-          ol.format.XSD.writeDecimalTextNode),
-      'name': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'cmt': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'desc': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'src': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'link': ol.xml.makeChildAppender(ol.format.GPX.writeLink_),
-      'sym': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'type': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'fix': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'sat': ol.xml.makeChildAppender(
-          ol.format.XSD.writeNonNegativeIntegerTextNode),
-      'hdop': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'vdop': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'pdop': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'ageofdgpsdata': ol.xml.makeChildAppender(
-          ol.format.XSD.writeDecimalTextNode),
-      'dgpsid': ol.xml.makeChildAppender(
-          ol.format.XSD.writeNonNegativeIntegerTextNode)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, string>}
- * @private
- */
-ol.format.GPX.GEOMETRY_TYPE_TO_NODENAME_ = {
-  'Point': 'wpt',
-  'LineString': 'rte',
-  'MultiLineString': 'trk'
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.GPX.GPX_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var geometry = /** @type {ol.Feature} */ (value).getGeometry();
-  if (geometry) {
-    var nodeName = ol.format.GPX.GEOMETRY_TYPE_TO_NODENAME_[geometry.getType()];
-    if (nodeName) {
-      var parentNode = objectStack[objectStack.length - 1].node;
-      return ol.xml.createElementNS(parentNode.namespaceURI, nodeName);
-    }
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.GPX_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'rte': ol.xml.makeChildAppender(ol.format.GPX.writeRte_),
-      'trk': ol.xml.makeChildAppender(ol.format.GPX.writeTrk_),
-      'wpt': ol.xml.makeChildAppender(ol.format.GPX.writeWpt_)
-    });
-
-
-/**
- * Encode an array of features in the GPX format.
- * LineString geometries are output as routes (`<rte>`), and MultiLineString
- * as tracks (`<trk>`).
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} Result.
- * @api
- */
-ol.format.GPX.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features in the GPX format as an XML node.
- * LineString geometries are output as routes (`<rte>`), and MultiLineString
- * as tracks (`<trk>`).
- *
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- * @override
- * @api
- */
-ol.format.GPX.prototype.writeFeaturesNode = function(features, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  //FIXME Serialize metadata
-  var gpx = ol.xml.createElementNS('http://www.topografix.com/GPX/1/1', 'gpx');
-  var xmlnsUri = 'http://www.w3.org/2000/xmlns/';
-  var xmlSchemaInstanceUri = 'http://www.w3.org/2001/XMLSchema-instance';
-  ol.xml.setAttributeNS(gpx, xmlnsUri, 'xmlns:xsi', xmlSchemaInstanceUri);
-  ol.xml.setAttributeNS(gpx, xmlSchemaInstanceUri, 'xsi:schemaLocation',
-      ol.format.GPX.SCHEMA_LOCATION_);
-  gpx.setAttribute('version', '1.1');
-  gpx.setAttribute('creator', 'OpenLayers');
-
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      ({node: gpx}), ol.format.GPX.GPX_SERIALIZERS_,
-      ol.format.GPX.GPX_NODE_FACTORY_, features, [opt_options]);
-  return gpx;
-};
-
-goog.provide('ol.format.IGCZ');
-
-/**
- * IGC altitude/z. One of 'barometric', 'gps', 'none'.
- * @enum {string}
- */
-ol.format.IGCZ = {
-  BAROMETRIC: 'barometric',
-  GPS: 'gps',
-  NONE: 'none'
-};
-
-goog.provide('ol.format.TextFeature');
-
-goog.require('ol');
-goog.require('ol.format.Feature');
-goog.require('ol.format.FormatType');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for text feature formats.
- *
- * @constructor
- * @abstract
- * @extends {ol.format.Feature}
- */
-ol.format.TextFeature = function() {
-  ol.format.Feature.call(this);
-};
-ol.inherits(ol.format.TextFeature, ol.format.Feature);
-
-
-/**
- * @param {Document|Node|Object|string} source Source.
- * @private
- * @return {string} Text.
- */
-ol.format.TextFeature.prototype.getText_ = function(source) {
-  if (typeof source === 'string') {
-    return source;
-  } else {
-    return '';
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.getType = function() {
-  return ol.format.FormatType.TEXT;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.readFeature = function(source, opt_options) {
-  return this.readFeatureFromText(
-      this.getText_(source), this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {string} text Text.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {ol.Feature} Feature.
- */
-ol.format.TextFeature.prototype.readFeatureFromText = function(text, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.readFeatures = function(source, opt_options) {
-  return this.readFeaturesFromText(
-      this.getText_(source), this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {string} text Text.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {Array.<ol.Feature>} Features.
- */
-ol.format.TextFeature.prototype.readFeaturesFromText = function(text, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.readGeometry = function(source, opt_options) {
-  return this.readGeometryFromText(
-      this.getText_(source), this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {string} text Text.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.TextFeature.prototype.readGeometryFromText = function(text, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.readProjection = function(source) {
-  return this.readProjectionFromText(this.getText_(source));
-};
-
-
-/**
- * @param {string} text Text.
- * @protected
- * @return {ol.proj.Projection} Projection.
- */
-ol.format.TextFeature.prototype.readProjectionFromText = function(text) {
-  return this.defaultDataProjection;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.writeFeature = function(feature, opt_options) {
-  return this.writeFeatureText(feature, this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {ol.Feature} feature Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @protected
- * @return {string} Text.
- */
-ol.format.TextFeature.prototype.writeFeatureText = function(feature, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.writeFeatures = function(
-    features, opt_options) {
-  return this.writeFeaturesText(features, this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @protected
- * @return {string} Text.
- */
-ol.format.TextFeature.prototype.writeFeaturesText = function(features, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.writeGeometry = function(
-    geometry, opt_options) {
-  return this.writeGeometryText(geometry, this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @protected
- * @return {string} Text.
- */
-ol.format.TextFeature.prototype.writeGeometryText = function(geometry, opt_options) {};
-
-goog.provide('ol.format.IGC');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.IGCZ');
-goog.require('ol.format.TextFeature');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Feature format for `*.igc` flight recording files.
- *
- * @constructor
- * @extends {ol.format.TextFeature}
- * @param {olx.format.IGCOptions=} opt_options Options.
- * @api
- */
-ol.format.IGC = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.TextFeature.call(this);
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get('EPSG:4326');
-
-  /**
-   * @private
-   * @type {ol.format.IGCZ}
-   */
-  this.altitudeMode_ = options.altitudeMode ?
-      options.altitudeMode : ol.format.IGCZ.NONE;
-
-};
-ol.inherits(ol.format.IGC, ol.format.TextFeature);
-
-
-/**
- * @const
- * @type {RegExp}
- * @private
- */
-ol.format.IGC.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})/;
-
-
-/**
- * @const
- * @type {RegExp}
- * @private
- */
-ol.format.IGC.H_RECORD_RE_ = /^H.([A-Z]{3}).*?:(.*)/;
-
-
-/**
- * @const
- * @type {RegExp}
- * @private
- */
-ol.format.IGC.HFDTE_RECORD_RE_ = /^HFDTE(\d{2})(\d{2})(\d{2})/;
-
-
-/**
- * A regular expression matching the newline characters `\r\n`, `\r` and `\n`.
- *
- * @const
- * @type {RegExp}
- * @private
- */
-ol.format.IGC.NEWLINE_RE_ = /\r\n|\r|\n/;
-
-
-/**
- * Read the feature from the IGC source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.IGC.prototype.readFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.IGC.prototype.readFeatureFromText = function(text, opt_options) {
-  var altitudeMode = this.altitudeMode_;
-  var lines = text.split(ol.format.IGC.NEWLINE_RE_);
-  /** @type {Object.<string, string>} */
-  var properties = {};
-  var flatCoordinates = [];
-  var year = 2000;
-  var month = 0;
-  var day = 1;
-  var lastDateTime = -1;
-  var i, ii;
-  for (i = 0, ii = lines.length; i < ii; ++i) {
-    var line = lines[i];
-    var m;
-    if (line.charAt(0) == 'B') {
-      m = ol.format.IGC.B_RECORD_RE_.exec(line);
-      if (m) {
-        var hour = parseInt(m[1], 10);
-        var minute = parseInt(m[2], 10);
-        var second = parseInt(m[3], 10);
-        var y = parseInt(m[4], 10) + parseInt(m[5], 10) / 60000;
-        if (m[6] == 'S') {
-          y = -y;
-        }
-        var x = parseInt(m[7], 10) + parseInt(m[8], 10) / 60000;
-        if (m[9] == 'W') {
-          x = -x;
-        }
-        flatCoordinates.push(x, y);
-        if (altitudeMode != ol.format.IGCZ.NONE) {
-          var z;
-          if (altitudeMode == ol.format.IGCZ.GPS) {
-            z = parseInt(m[11], 10);
-          } else if (altitudeMode == ol.format.IGCZ.BAROMETRIC) {
-            z = parseInt(m[12], 10);
-          } else {
-            z = 0;
-          }
-          flatCoordinates.push(z);
-        }
-        var dateTime = Date.UTC(year, month, day, hour, minute, second);
-        // Detect UTC midnight wrap around.
-        if (dateTime < lastDateTime) {
-          dateTime = Date.UTC(year, month, day + 1, hour, minute, second);
-        }
-        flatCoordinates.push(dateTime / 1000);
-        lastDateTime = dateTime;
-      }
-    } else if (line.charAt(0) == 'H') {
-      m = ol.format.IGC.HFDTE_RECORD_RE_.exec(line);
-      if (m) {
-        day = parseInt(m[1], 10);
-        month = parseInt(m[2], 10) - 1;
-        year = 2000 + parseInt(m[3], 10);
-      } else {
-        m = ol.format.IGC.H_RECORD_RE_.exec(line);
-        if (m) {
-          properties[m[1]] = m[2].trim();
-        }
-      }
-    }
-  }
-  if (flatCoordinates.length === 0) {
-    return null;
-  }
-  var lineString = new ol.geom.LineString(null);
-  var layout = altitudeMode == ol.format.IGCZ.NONE ?
-      ol.geom.GeometryLayout.XYM : ol.geom.GeometryLayout.XYZM;
-  lineString.setFlatCoordinates(layout, flatCoordinates);
-  var feature = new ol.Feature(ol.format.Feature.transformWithOptions(
-      lineString, false, opt_options));
-  feature.setProperties(properties);
-  return feature;
-};
-
-
-/**
- * Read the feature from the source. As IGC sources contain a single
- * feature, this will return the feature in an array.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.IGC.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.IGC.prototype.readFeaturesFromText = function(text, opt_options) {
-  var feature = this.readFeatureFromText(text, opt_options);
-  if (feature) {
-    return [feature];
-  } else {
-    return [];
-  }
-};
-
-
-/**
- * Read the projection from the IGC source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.IGC.prototype.readProjection;
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.IGC.prototype.writeFeatureText = function(feature, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.IGC.prototype.writeFeaturesText = function(features, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.IGC.prototype.writeGeometryText = function(geometry, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.IGC.prototype.readGeometryFromText = function(text, opt_options) {};
-
-goog.provide('ol.style.IconAnchorUnits');
-
-/**
- * Icon anchor units. One of 'fraction', 'pixels'.
- * @enum {string}
- */
-ol.style.IconAnchorUnits = {
-  FRACTION: 'fraction',
-  PIXELS: 'pixels'
-};
-
-goog.provide('ol.style.IconImage');
-
-goog.require('ol');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventTarget');
-goog.require('ol.events.EventType');
-goog.require('ol.ImageState');
-goog.require('ol.style');
-
-
-/**
- * @constructor
- * @param {Image|HTMLCanvasElement} image Image.
- * @param {string|undefined} src Src.
- * @param {ol.Size} size Size.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.ImageState} imageState Image state.
- * @param {ol.Color} color Color.
- * @extends {ol.events.EventTarget}
- */
-ol.style.IconImage = function(image, src, size, crossOrigin, imageState,
-                               color) {
-
-  ol.events.EventTarget.call(this);
-
-  /**
-   * @private
-   * @type {Image|HTMLCanvasElement}
-   */
-  this.hitDetectionImage_ = null;
-
-  /**
-   * @private
-   * @type {Image|HTMLCanvasElement}
-   */
-  this.image_ = !image ? new Image() : image;
-
-  if (crossOrigin !== null) {
-    this.image_.crossOrigin = crossOrigin;
-  }
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = color ?
-      /** @type {HTMLCanvasElement} */ (document.createElement('CANVAS')) :
-      null;
-
-  /**
-   * @private
-   * @type {ol.Color}
-   */
-  this.color_ = color;
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.imageListenerKeys_ = null;
-
-  /**
-   * @private
-   * @type {ol.ImageState}
-   */
-  this.imageState_ = imageState;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.size_ = size;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.src_ = src;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.tainting_ = false;
-  if (this.imageState_ == ol.ImageState.LOADED) {
-    this.determineTainting_();
-  }
-
-};
-ol.inherits(ol.style.IconImage, ol.events.EventTarget);
-
-
-/**
- * @param {Image|HTMLCanvasElement} image Image.
- * @param {string} src Src.
- * @param {ol.Size} size Size.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.ImageState} imageState Image state.
- * @param {ol.Color} color Color.
- * @return {ol.style.IconImage} Icon image.
- */
-ol.style.IconImage.get = function(image, src, size, crossOrigin, imageState,
-                                   color) {
-  var iconImageCache = ol.style.iconImageCache;
-  var iconImage = iconImageCache.get(src, crossOrigin, color);
-  if (!iconImage) {
-    iconImage = new ol.style.IconImage(
-        image, src, size, crossOrigin, imageState, color);
-    iconImageCache.set(src, crossOrigin, color, iconImage);
-  }
-  return iconImage;
-};
-
-
-/**
- * @private
- */
-ol.style.IconImage.prototype.determineTainting_ = function() {
-  var context = ol.dom.createCanvasContext2D(1, 1);
-  try {
-    context.drawImage(this.image_, 0, 0);
-    context.getImageData(0, 0, 1, 1);
-  } catch (e) {
-    this.tainting_ = true;
-  }
-};
-
-
-/**
- * @private
- */
-ol.style.IconImage.prototype.dispatchChangeEvent_ = function() {
-  this.dispatchEvent(ol.events.EventType.CHANGE);
-};
-
-
-/**
- * @private
- */
-ol.style.IconImage.prototype.handleImageError_ = function() {
-  this.imageState_ = ol.ImageState.ERROR;
-  this.unlistenImage_();
-  this.dispatchChangeEvent_();
-};
-
-
-/**
- * @private
- */
-ol.style.IconImage.prototype.handleImageLoad_ = function() {
-  this.imageState_ = ol.ImageState.LOADED;
-  if (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.determineTainting_();
-  this.replaceColor_();
-  this.dispatchChangeEvent_();
-};
-
-
-/**
- * @param {number} pixelRatio Pixel ratio.
- * @return {Image|HTMLCanvasElement} Image or Canvas element.
- */
-ol.style.IconImage.prototype.getImage = function(pixelRatio) {
-  return this.canvas_ ? this.canvas_ : this.image_;
-};
-
-
-/**
- * @return {ol.ImageState} Image state.
- */
-ol.style.IconImage.prototype.getImageState = function() {
-  return this.imageState_;
-};
-
-
-/**
- * @param {number} pixelRatio Pixel ratio.
- * @return {Image|HTMLCanvasElement} Image element.
- */
-ol.style.IconImage.prototype.getHitDetectionImage = function(pixelRatio) {
-  if (!this.hitDetectionImage_) {
-    if (this.tainting_) {
-      var width = this.size_[0];
-      var height = this.size_[1];
-      var context = ol.dom.createCanvasContext2D(width, height);
-      context.fillRect(0, 0, width, height);
-      this.hitDetectionImage_ = context.canvas;
-    } else {
-      this.hitDetectionImage_ = this.image_;
-    }
-  }
-  return this.hitDetectionImage_;
-};
-
-
-/**
- * @return {ol.Size} Image size.
- */
-ol.style.IconImage.prototype.getSize = function() {
-  return this.size_;
-};
-
-
-/**
- * @return {string|undefined} Image src.
- */
-ol.style.IconImage.prototype.getSrc = function() {
-  return this.src_;
-};
-
-
-/**
- * Load not yet loaded URI.
- */
-ol.style.IconImage.prototype.load = function() {
-  if (this.imageState_ == ol.ImageState.IDLE) {
-    this.imageState_ = ol.ImageState.LOADING;
-    this.imageListenerKeys_ = [
-      ol.events.listenOnce(this.image_, ol.events.EventType.ERROR,
-          this.handleImageError_, this),
-      ol.events.listenOnce(this.image_, ol.events.EventType.LOAD,
-          this.handleImageLoad_, this)
-    ];
-    try {
-      this.image_.src = this.src_;
-    } catch (e) {
-      this.handleImageError_();
-    }
-  }
-};
-
-
-/**
- * @private
- */
-ol.style.IconImage.prototype.replaceColor_ = function() {
-  if (this.tainting_ || this.color_ === null) {
-    return;
-  }
-
-  this.canvas_.width = this.image_.width;
-  this.canvas_.height = this.image_.height;
-
-  var ctx = this.canvas_.getContext('2d');
-  ctx.drawImage(this.image_, 0, 0);
-
-  var imgData = ctx.getImageData(0, 0, this.image_.width, this.image_.height);
-  var data = imgData.data;
-  var r = this.color_[0] / 255.0;
-  var g = this.color_[1] / 255.0;
-  var b = this.color_[2] / 255.0;
-
-  for (var i = 0, ii = data.length; i < ii; i += 4) {
-    data[i] *= r;
-    data[i + 1] *= g;
-    data[i + 2] *= b;
-  }
-  ctx.putImageData(imgData, 0, 0);
-};
-
-
-/**
- * Discards event handlers which listen for load completion or errors.
- *
- * @private
- */
-ol.style.IconImage.prototype.unlistenImage_ = function() {
-  this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.imageListenerKeys_ = null;
-};
-
-goog.provide('ol.style.IconOrigin');
-
-/**
- * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.
- * @enum {string}
- */
-ol.style.IconOrigin = {
-  BOTTOM_LEFT: 'bottom-left',
-  BOTTOM_RIGHT: 'bottom-right',
-  TOP_LEFT: 'top-left',
-  TOP_RIGHT: 'top-right'
-};
-
-goog.provide('ol.style.Icon');
-
-goog.require('ol');
-goog.require('ol.ImageState');
-goog.require('ol.asserts');
-goog.require('ol.color');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.style.IconAnchorUnits');
-goog.require('ol.style.IconImage');
-goog.require('ol.style.IconOrigin');
-goog.require('ol.style.Image');
-
-
-/**
- * @classdesc
- * Set icon style for vector features.
- *
- * @constructor
- * @param {olx.style.IconOptions=} opt_options Options.
- * @extends {ol.style.Image}
- * @api
- */
-ol.style.Icon = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.normalizedAnchor_ = null;
-
-  /**
-   * @private
-   * @type {ol.style.IconOrigin}
-   */
-  this.anchorOrigin_ = options.anchorOrigin !== undefined ?
-      options.anchorOrigin : ol.style.IconOrigin.TOP_LEFT;
-
-  /**
-   * @private
-   * @type {ol.style.IconAnchorUnits}
-   */
-  this.anchorXUnits_ = options.anchorXUnits !== undefined ?
-      options.anchorXUnits : ol.style.IconAnchorUnits.FRACTION;
-
-  /**
-   * @private
-   * @type {ol.style.IconAnchorUnits}
-   */
-  this.anchorYUnits_ = options.anchorYUnits !== undefined ?
-      options.anchorYUnits : ol.style.IconAnchorUnits.FRACTION;
-
-  /**
-   * @private
-   * @type {?string}
-   */
-  this.crossOrigin_ =
-      options.crossOrigin !== undefined ? options.crossOrigin : null;
-
-  /**
-   * @type {Image|HTMLCanvasElement}
-   */
-  var image = options.img !== undefined ? options.img : null;
-
-  /**
-   * @type {ol.Size}
-   */
-  var imgSize = options.imgSize !== undefined ? options.imgSize : null;
-
-  /**
-   * @type {string|undefined}
-   */
-  var src = options.src;
-
-  ol.asserts.assert(!(src !== undefined && image),
-      4); // `image` and `src` cannot be provided at the same time
-  ol.asserts.assert(!image || (image && imgSize),
-      5); // `imgSize` must be set when `image` is provided
-
-  if ((src === undefined || src.length === 0) && image) {
-    src = image.src || ol.getUid(image).toString();
-  }
-  ol.asserts.assert(src !== undefined && src.length > 0,
-      6); // A defined and non-empty `src` or `image` must be provided
-
-  /**
-   * @type {ol.ImageState}
-   */
-  var imageState = options.src !== undefined ?
-      ol.ImageState.IDLE : ol.ImageState.LOADED;
-
-  /**
-   * @private
-   * @type {ol.Color}
-   */
-  this.color_ = options.color !== undefined ? ol.color.asArray(options.color) :
-      null;
-
-  /**
-   * @private
-   * @type {ol.style.IconImage}
-   */
-  this.iconImage_ = ol.style.IconImage.get(
-      image, /** @type {string} */ (src), imgSize, this.crossOrigin_, imageState, this.color_);
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.offset_ = options.offset !== undefined ? options.offset : [0, 0];
-
-  /**
-   * @private
-   * @type {ol.style.IconOrigin}
-   */
-  this.offsetOrigin_ = options.offsetOrigin !== undefined ?
-      options.offsetOrigin : ol.style.IconOrigin.TOP_LEFT;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.origin_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.size_ = options.size !== undefined ? options.size : null;
-
-  /**
-   * @type {number}
-   */
-  var opacity = options.opacity !== undefined ? options.opacity : 1;
-
-  /**
-   * @type {boolean}
-   */
-  var rotateWithView = options.rotateWithView !== undefined ?
-      options.rotateWithView : false;
-
-  /**
-   * @type {number}
-   */
-  var rotation = options.rotation !== undefined ? options.rotation : 0;
-
-  /**
-   * @type {number}
-   */
-  var scale = options.scale !== undefined ? options.scale : 1;
-
-  /**
-   * @type {boolean}
-   */
-  var snapToPixel = options.snapToPixel !== undefined ?
-      options.snapToPixel : true;
-
-  ol.style.Image.call(this, {
-    opacity: opacity,
-    rotation: rotation,
-    scale: scale,
-    snapToPixel: snapToPixel,
-    rotateWithView: rotateWithView
-  });
-
-};
-ol.inherits(ol.style.Icon, ol.style.Image);
-
-
-/**
- * Clones the style.
- * @return {ol.style.Icon} The cloned style.
- * @api
- */
-ol.style.Icon.prototype.clone = function() {
-  var oldImage = this.getImage(1);
-  var newImage;
-  if (this.iconImage_.getImageState() === ol.ImageState.LOADED) {
-    if (oldImage.tagName.toUpperCase() === 'IMG') {
-      newImage = /** @type {Image} */ (oldImage.cloneNode(true));
-    } else {
-      newImage = /** @type {HTMLCanvasElement} */ (document.createElement('canvas'));
-      var context = newImage.getContext('2d');
-      newImage.width = oldImage.width;
-      newImage.height = oldImage.height;
-      context.drawImage(oldImage, 0, 0);
-    }
-  }
-  return new ol.style.Icon({
-    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_ || undefined,
-    img: newImage ? newImage : undefined,
-    imgSize: newImage ? this.iconImage_.getSize().slice() : undefined,
-    src: newImage ? undefined : this.getSrc(),
-    offset: this.offset_.slice(),
-    offsetOrigin: this.offsetOrigin_,
-    size: this.size_ !== null ? this.size_.slice() : undefined,
-    opacity: this.getOpacity(),
-    scale: this.getScale(),
-    snapToPixel: this.getSnapToPixel(),
-    rotation: this.getRotation(),
-    rotateWithView: this.getRotateWithView()
-  });
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.Icon.prototype.getAnchor = function() {
-  if (this.normalizedAnchor_) {
-    return this.normalizedAnchor_;
-  }
-  var anchor = this.anchor_;
-  var size = this.getSize();
-  if (this.anchorXUnits_ == ol.style.IconAnchorUnits.FRACTION ||
-      this.anchorYUnits_ == ol.style.IconAnchorUnits.FRACTION) {
-    if (!size) {
-      return null;
-    }
-    anchor = this.anchor_.slice();
-    if (this.anchorXUnits_ == ol.style.IconAnchorUnits.FRACTION) {
-      anchor[0] *= size[0];
-    }
-    if (this.anchorYUnits_ == ol.style.IconAnchorUnits.FRACTION) {
-      anchor[1] *= size[1];
-    }
-  }
-
-  if (this.anchorOrigin_ != ol.style.IconOrigin.TOP_LEFT) {
-    if (!size) {
-      return null;
-    }
-    if (anchor === this.anchor_) {
-      anchor = this.anchor_.slice();
-    }
-    if (this.anchorOrigin_ == ol.style.IconOrigin.TOP_RIGHT ||
-        this.anchorOrigin_ == ol.style.IconOrigin.BOTTOM_RIGHT) {
-      anchor[0] = -anchor[0] + size[0];
-    }
-    if (this.anchorOrigin_ == ol.style.IconOrigin.BOTTOM_LEFT ||
-        this.anchorOrigin_ == ol.style.IconOrigin.BOTTOM_RIGHT) {
-      anchor[1] = -anchor[1] + size[1];
-    }
-  }
-  this.normalizedAnchor_ = anchor;
-  return this.normalizedAnchor_;
-};
-
-
-/**
- * Get the icon color.
- * @return {ol.Color} Color.
- * @api
- */
-ol.style.Icon.prototype.getColor = function() {
-  return this.color_;
-};
-
-
-/**
- * Get the image icon.
- * @param {number} pixelRatio Pixel ratio.
- * @return {Image|HTMLCanvasElement} Image or Canvas element.
- * @override
- * @api
- */
-ol.style.Icon.prototype.getImage = function(pixelRatio) {
-  return this.iconImage_.getImage(pixelRatio);
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.getImageSize = function() {
-  return this.iconImage_.getSize();
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.getHitDetectionImageSize = function() {
-  return this.getImageSize();
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.getImageState = function() {
-  return this.iconImage_.getImageState();
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.getHitDetectionImage = function(pixelRatio) {
-  return this.iconImage_.getHitDetectionImage(pixelRatio);
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.Icon.prototype.getOrigin = function() {
-  if (this.origin_) {
-    return this.origin_;
-  }
-  var offset = this.offset_;
-
-  if (this.offsetOrigin_ != ol.style.IconOrigin.TOP_LEFT) {
-    var size = this.getSize();
-    var iconImageSize = this.iconImage_.getSize();
-    if (!size || !iconImageSize) {
-      return null;
-    }
-    offset = offset.slice();
-    if (this.offsetOrigin_ == ol.style.IconOrigin.TOP_RIGHT ||
-        this.offsetOrigin_ == ol.style.IconOrigin.BOTTOM_RIGHT) {
-      offset[0] = iconImageSize[0] - size[0] - offset[0];
-    }
-    if (this.offsetOrigin_ == ol.style.IconOrigin.BOTTOM_LEFT ||
-        this.offsetOrigin_ == ol.style.IconOrigin.BOTTOM_RIGHT) {
-      offset[1] = iconImageSize[1] - size[1] - offset[1];
-    }
-  }
-  this.origin_ = offset;
-  return this.origin_;
-};
-
-
-/**
- * Get the image URL.
- * @return {string|undefined} Image src.
- * @api
- */
-ol.style.Icon.prototype.getSrc = function() {
-  return this.iconImage_.getSrc();
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.Icon.prototype.getSize = function() {
-  return !this.size_ ? this.iconImage_.getSize() : this.size_;
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.listenImageChange = function(listener, thisArg) {
-  return ol.events.listen(this.iconImage_, ol.events.EventType.CHANGE,
-      listener, thisArg);
-};
-
-
-/**
- * Load not yet loaded URI.
- * When rendering a feature with an icon style, the vector renderer will
- * automatically call this method. However, you might want to call this
- * method yourself for preloading or other purposes.
- * @override
- * @api
- */
-ol.style.Icon.prototype.load = function() {
-  this.iconImage_.load();
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.unlistenImageChange = function(listener, thisArg) {
-  ol.events.unlisten(this.iconImage_, ol.events.EventType.CHANGE,
-      listener, thisArg);
-};
-
-goog.provide('ol.style.Text');
-
-
-goog.require('ol.style.Fill');
-
-
-/**
- * @classdesc
- * Set text style for vector features.
- *
- * @constructor
- * @param {olx.style.TextOptions=} opt_options Options.
- * @api
- */
-ol.style.Text = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.font_ = options.font;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.rotation_ = options.rotation;
-
-  /**
-   * @private
-   * @type {boolean|undefined}
-   */
-  this.rotateWithView_ = options.rotateWithView;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.scale_ = options.scale;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.text_ = options.text;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.textAlign_ = options.textAlign;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.textBaseline_ = options.textBaseline;
-
-  /**
-   * @private
-   * @type {ol.style.Fill}
-   */
-  this.fill_ = options.fill !== undefined ? options.fill :
-      new ol.style.Fill({color: ol.style.Text.DEFAULT_FILL_COLOR_});
-
-  /**
-   * @private
-   * @type {ol.style.Stroke}
-   */
-  this.stroke_ = options.stroke !== undefined ? options.stroke : null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;
-};
-
-
-/**
- * The default fill color to use if no fill was set at construction time; a
- * blackish `#333`.
- *
- * @const {string}
- * @private
- */
-ol.style.Text.DEFAULT_FILL_COLOR_ = '#333';
-
-
-/**
- * Clones the style.
- * @return {ol.style.Text} The cloned style.
- * @api
- */
-ol.style.Text.prototype.clone = function() {
-  return new ol.style.Text({
-    font: this.getFont(),
-    rotation: this.getRotation(),
-    rotateWithView: this.getRotateWithView(),
-    scale: this.getScale(),
-    text: this.getText(),
-    textAlign: this.getTextAlign(),
-    textBaseline: this.getTextBaseline(),
-    fill: this.getFill() ? this.getFill().clone() : undefined,
-    stroke: this.getStroke() ? this.getStroke().clone() : undefined,
-    offsetX: this.getOffsetX(),
-    offsetY: this.getOffsetY()
-  });
-};
-
-
-/**
- * Get the font name.
- * @return {string|undefined} Font.
- * @api
- */
-ol.style.Text.prototype.getFont = function() {
-  return this.font_;
-};
-
-
-/**
- * Get the x-offset for the text.
- * @return {number} Horizontal text offset.
- * @api
- */
-ol.style.Text.prototype.getOffsetX = function() {
-  return this.offsetX_;
-};
-
-
-/**
- * Get the y-offset for the text.
- * @return {number} Vertical text offset.
- * @api
- */
-ol.style.Text.prototype.getOffsetY = function() {
-  return this.offsetY_;
-};
-
-
-/**
- * Get the fill style for the text.
- * @return {ol.style.Fill} Fill style.
- * @api
- */
-ol.style.Text.prototype.getFill = function() {
-  return this.fill_;
-};
-
-
-/**
- * Determine whether the text rotates with the map.
- * @return {boolean|undefined} Rotate with map.
- * @api
- */
-ol.style.Text.prototype.getRotateWithView = function() {
-  return this.rotateWithView_;
-};
-
-
-/**
- * Get the text rotation.
- * @return {number|undefined} Rotation.
- * @api
- */
-ol.style.Text.prototype.getRotation = function() {
-  return this.rotation_;
-};
-
-
-/**
- * Get the text scale.
- * @return {number|undefined} Scale.
- * @api
- */
-ol.style.Text.prototype.getScale = function() {
-  return this.scale_;
-};
-
-
-/**
- * Get the stroke style for the text.
- * @return {ol.style.Stroke} Stroke style.
- * @api
- */
-ol.style.Text.prototype.getStroke = function() {
-  return this.stroke_;
-};
-
-
-/**
- * Get the text to be rendered.
- * @return {string|undefined} Text.
- * @api
- */
-ol.style.Text.prototype.getText = function() {
-  return this.text_;
-};
-
-
-/**
- * Get the text alignment.
- * @return {string|undefined} Text align.
- * @api
- */
-ol.style.Text.prototype.getTextAlign = function() {
-  return this.textAlign_;
-};
-
-
-/**
- * Get the text baseline.
- * @return {string|undefined} Text baseline.
- * @api
- */
-ol.style.Text.prototype.getTextBaseline = function() {
-  return this.textBaseline_;
-};
-
-
-/**
- * Set the font.
- *
- * @param {string|undefined} font Font.
- * @api
- */
-ol.style.Text.prototype.setFont = function(font) {
-  this.font_ = font;
-};
-
-
-/**
- * Set the x offset.
- *
- * @param {number} offsetX Horizontal text offset.
- * @api
- */
-ol.style.Text.prototype.setOffsetX = function(offsetX) {
-  this.offsetX_ = offsetX;
-};
-
-
-/**
- * Set the y offset.
- *
- * @param {number} offsetY Vertical text offset.
- * @api
- */
-ol.style.Text.prototype.setOffsetY = function(offsetY) {
-  this.offsetY_ = offsetY;
-};
-
-
-/**
- * Set the fill.
- *
- * @param {ol.style.Fill} fill Fill style.
- * @api
- */
-ol.style.Text.prototype.setFill = function(fill) {
-  this.fill_ = fill;
-};
-
-
-/**
- * Set the rotation.
- *
- * @param {number|undefined} rotation Rotation.
- * @api
- */
-ol.style.Text.prototype.setRotation = function(rotation) {
-  this.rotation_ = rotation;
-};
-
-
-/**
- * Set the scale.
- *
- * @param {number|undefined} scale Scale.
- * @api
- */
-ol.style.Text.prototype.setScale = function(scale) {
-  this.scale_ = scale;
-};
-
-
-/**
- * Set the stroke.
- *
- * @param {ol.style.Stroke} stroke Stroke style.
- * @api
- */
-ol.style.Text.prototype.setStroke = function(stroke) {
-  this.stroke_ = stroke;
-};
-
-
-/**
- * Set the text.
- *
- * @param {string|undefined} text Text.
- * @api
- */
-ol.style.Text.prototype.setText = function(text) {
-  this.text_ = text;
-};
-
-
-/**
- * Set the text alignment.
- *
- * @param {string|undefined} textAlign Text align.
- * @api
- */
-ol.style.Text.prototype.setTextAlign = function(textAlign) {
-  this.textAlign_ = textAlign;
-};
-
-
-/**
- * Set the text baseline.
- *
- * @param {string|undefined} textBaseline Text baseline.
- * @api
- */
-ol.style.Text.prototype.setTextBaseline = function(textBaseline) {
-  this.textBaseline_ = textBaseline;
-};
-
-// FIXME http://earth.google.com/kml/1.0 namespace?
-// FIXME why does node.getAttribute return an unknown type?
-// FIXME serialize arbitrary feature properties
-// FIXME don't parse style if extractStyles is false
-
-goog.provide('ol.format.KML');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.array');
-goog.require('ol.asserts');
-goog.require('ol.color');
-goog.require('ol.format.Feature');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.format.XSD');
-goog.require('ol.geom.GeometryCollection');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.math');
-goog.require('ol.proj');
-goog.require('ol.style.Fill');
-goog.require('ol.style.Icon');
-goog.require('ol.style.IconAnchorUnits');
-goog.require('ol.style.IconOrigin');
-goog.require('ol.style.Stroke');
-goog.require('ol.style.Style');
-goog.require('ol.style.Text');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the KML format.
- *
- * Note that the KML format uses the URL() constructor. Older browsers such as IE
- * which do not support this will need a URL polyfill to be loaded before use.
- *
- * @constructor
- * @extends {ol.format.XMLFeature}
- * @param {olx.format.KMLOptions=} opt_options Options.
- * @api
- */
-ol.format.KML = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.XMLFeature.call(this);
-
-  if (!ol.format.KML.DEFAULT_STYLE_ARRAY_) {
-    ol.format.KML.createStyleDefaults_();
-  }
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get('EPSG:4326');
-
-  /**
-   * @private
-   * @type {Array.<ol.style.Style>}
-   */
-  this.defaultStyle_ = options.defaultStyle ?
-      options.defaultStyle : ol.format.KML.DEFAULT_STYLE_ARRAY_;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.extractStyles_ = options.extractStyles !== undefined ?
-      options.extractStyles : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.writeStyles_ = options.writeStyles !== undefined ?
-      options.writeStyles : true;
-
-  /**
-   * @private
-   * @type {Object.<string, (Array.<ol.style.Style>|string)>}
-   */
-  this.sharedStyles_ = {};
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.showPointNames_ = options.showPointNames !== undefined ?
-      options.showPointNames : true;
-
-};
-ol.inherits(ol.format.KML, ol.format.XMLFeature);
-
-
-/**
- * @const
- * @type {Array.<string>}
- * @private
- */
-ol.format.KML.GX_NAMESPACE_URIS_ = [
-  'http://www.google.com/kml/ext/2.2'
-];
-
-
-/**
- * @const
- * @type {Array.<string>}
- * @private
- */
-ol.format.KML.NAMESPACE_URIS_ = [
-  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'
-];
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.KML.SCHEMA_LOCATION_ = 'http://www.opengis.net/kml/2.2 ' +
-    'https://developers.google.com/kml/schema/kml22gx.xsd';
-
-
-/**
- * @return {Array.<ol.style.Style>} Default style.
- * @private
- */
-ol.format.KML.createStyleDefaults_ = function() {
-  /**
-   * @const
-   * @type {ol.Color}
-   * @private
-   */
-  ol.format.KML.DEFAULT_COLOR_ = [255, 255, 255, 1];
-
-  /**
-   * @const
-   * @type {ol.style.Fill}
-   * @private
-   */
-  ol.format.KML.DEFAULT_FILL_STYLE_ = new ol.style.Fill({
-    color: ol.format.KML.DEFAULT_COLOR_
-  });
-
-  /**
-   * @const
-   * @type {ol.Size}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_ = [20, 2]; // FIXME maybe [8, 32] ?
-
-  /**
-   * @const
-   * @type {ol.style.IconAnchorUnits}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS_ =
-      ol.style.IconAnchorUnits.PIXELS;
-
-  /**
-   * @const
-   * @type {ol.style.IconAnchorUnits}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS_ =
-      ol.style.IconAnchorUnits.PIXELS;
-
-  /**
-   * @const
-   * @type {ol.Size}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_ = [64, 64];
-
-  /**
-   * @const
-   * @type {string}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_ =
-      'https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png';
-
-  /**
-   * @const
-   * @type {number}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_ = 0.5;
-
-  /**
-   * @const
-   * @type {ol.style.Image}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_ = new ol.style.Icon({
-    anchor: ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_,
-    anchorOrigin: ol.style.IconOrigin.BOTTOM_LEFT,
-    anchorXUnits: ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS_,
-    anchorYUnits: ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS_,
-    crossOrigin: 'anonymous',
-    rotation: 0,
-    scale: ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_,
-    size: ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_,
-    src: ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_
-  });
-
-  /**
-   * @const
-   * @type {string}
-   * @private
-   */
-  ol.format.KML.DEFAULT_NO_IMAGE_STYLE_ = 'NO_IMAGE';
-
-  /**
-   * @const
-   * @type {ol.style.Stroke}
-   * @private
-   */
-  ol.format.KML.DEFAULT_STROKE_STYLE_ = new ol.style.Stroke({
-    color: ol.format.KML.DEFAULT_COLOR_,
-    width: 1
-  });
-
-  /**
-   * @const
-   * @type {ol.style.Stroke}
-   * @private
-   */
-  ol.format.KML.DEFAULT_TEXT_STROKE_STYLE_ = new ol.style.Stroke({
-    color: [51, 51, 51, 1],
-    width: 2
-  });
-
-  /**
-   * @const
-   * @type {ol.style.Text}
-   * @private
-   */
-  ol.format.KML.DEFAULT_TEXT_STYLE_ = new ol.style.Text({
-    font: 'bold 16px Helvetica',
-    fill: ol.format.KML.DEFAULT_FILL_STYLE_,
-    stroke: ol.format.KML.DEFAULT_TEXT_STROKE_STYLE_,
-    scale: 0.8
-  });
-
-  /**
-   * @const
-   * @type {ol.style.Style}
-   * @private
-   */
-  ol.format.KML.DEFAULT_STYLE_ = new ol.style.Style({
-    fill: ol.format.KML.DEFAULT_FILL_STYLE_,
-    image: ol.format.KML.DEFAULT_IMAGE_STYLE_,
-    text: ol.format.KML.DEFAULT_TEXT_STYLE_,
-    stroke: ol.format.KML.DEFAULT_STROKE_STYLE_,
-    zIndex: 0
-  });
-
-  /**
-   * @const
-   * @type {Array.<ol.style.Style>}
-   * @private
-   */
-  ol.format.KML.DEFAULT_STYLE_ARRAY_ = [ol.format.KML.DEFAULT_STYLE_];
-
-  return ol.format.KML.DEFAULT_STYLE_ARRAY_;
-};
-
-
-/**
- * @const
- * @type {Object.<string, ol.style.IconAnchorUnits>}
- * @private
- */
-ol.format.KML.ICON_ANCHOR_UNITS_MAP_ = {
-  'fraction': ol.style.IconAnchorUnits.FRACTION,
-  'pixels': ol.style.IconAnchorUnits.PIXELS,
-  'insetPixels': ol.style.IconAnchorUnits.PIXELS
-};
-
-
-/**
- * @param {ol.style.Style|undefined} foundStyle Style.
- * @param {string} name Name.
- * @return {ol.style.Style} style Style.
- * @private
- */
-ol.format.KML.createNameStyleFunction_ = function(foundStyle, name) {
-  var textStyle = null;
-  var textOffset = [0, 0];
-  var textAlign = 'start';
-  if (foundStyle.getImage()) {
-    var imageSize = foundStyle.getImage().getImageSize();
-    if (imageSize === null) {
-      imageSize = ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_;
-    }
-    if (imageSize.length == 2) {
-      var imageScale = foundStyle.getImage().getScale();
-      // Offset the label to be centered to the right of the icon, if there is
-      // one.
-      textOffset[0] = imageScale * imageSize[0] / 2;
-      textOffset[1] = -imageScale * imageSize[1] / 2;
-      textAlign = 'left';
-    }
-  }
-  if (foundStyle.getText() !== null) {
-    // clone the text style, customizing it with name, alignments and offset.
-    // Note that kml does not support many text options that OpenLayers does (rotation, textBaseline).
-    var foundText = foundStyle.getText();
-    textStyle = foundText.clone();
-    textStyle.setFont(foundText.getFont() || ol.format.KML.DEFAULT_TEXT_STYLE_.getFont());
-    textStyle.setScale(foundText.getScale() || ol.format.KML.DEFAULT_TEXT_STYLE_.getScale());
-    textStyle.setFill(foundText.getFill() || ol.format.KML.DEFAULT_TEXT_STYLE_.getFill());
-    textStyle.setStroke(foundText.getStroke() || ol.format.KML.DEFAULT_TEXT_STROKE_STYLE_);
-  } else {
-    textStyle = ol.format.KML.DEFAULT_TEXT_STYLE_.clone();
-  }
-  textStyle.setText(name);
-  textStyle.setOffsetX(textOffset[0]);
-  textStyle.setOffsetY(textOffset[1]);
-  textStyle.setTextAlign(textAlign);
-
-  var nameStyle = new ol.style.Style({
-    text: textStyle
-  });
-  return nameStyle;
-};
-
-
-/**
- * @param {Array.<ol.style.Style>|undefined} style Style.
- * @param {string} styleUrl Style URL.
- * @param {Array.<ol.style.Style>} defaultStyle Default style.
- * @param {Object.<string, (Array.<ol.style.Style>|string)>} sharedStyles Shared
- *          styles.
- * @param {boolean|undefined} showPointNames true to show names for point
- *          placemarks.
- * @return {ol.FeatureStyleFunction} Feature style function.
- * @private
- */
-ol.format.KML.createFeatureStyleFunction_ = function(style, styleUrl,
-    defaultStyle, sharedStyles, showPointNames) {
-
-  return (
-      /**
-       * @param {number} resolution Resolution.
-       * @return {Array.<ol.style.Style>} Style.
-       * @this {ol.Feature}
-       */
-      function(resolution) {
-        var drawName = showPointNames;
-        /** @type {ol.style.Style|undefined} */
-        var nameStyle;
-        var name = '';
-        if (drawName) {
-          if (this.getGeometry()) {
-            drawName = (this.getGeometry().getType() ===
-                        ol.geom.GeometryType.POINT);
-          }
-        }
-
-        if (drawName) {
-          name = /** @type {string} */ (this.get('name'));
-          drawName = drawName && name;
-        }
-
-        if (style) {
-          if (drawName) {
-            nameStyle = ol.format.KML.createNameStyleFunction_(style[0],
-                name);
-            return style.concat(nameStyle);
-          }
-          return style;
-        }
-        if (styleUrl) {
-          var foundStyle = ol.format.KML.findStyle_(styleUrl, defaultStyle,
-              sharedStyles);
-          if (drawName) {
-            nameStyle = ol.format.KML.createNameStyleFunction_(foundStyle[0],
-                name);
-            return foundStyle.concat(nameStyle);
-          }
-          return foundStyle;
-        }
-        if (drawName) {
-          nameStyle = ol.format.KML.createNameStyleFunction_(defaultStyle[0],
-              name);
-          return defaultStyle.concat(nameStyle);
-        }
-        return defaultStyle;
-      });
-};
-
-
-/**
- * @param {Array.<ol.style.Style>|string|undefined} styleValue Style value.
- * @param {Array.<ol.style.Style>} defaultStyle Default style.
- * @param {Object.<string, (Array.<ol.style.Style>|string)>} sharedStyles
- * Shared styles.
- * @return {Array.<ol.style.Style>} Style.
- * @private
- */
-ol.format.KML.findStyle_ = function(styleValue, defaultStyle, sharedStyles) {
-  if (Array.isArray(styleValue)) {
-    return styleValue;
-  } else if (typeof styleValue === 'string') {
-    // KML files in the wild occasionally forget the leading `#` on styleUrls
-    // defined in the same document.  Add a leading `#` if it enables to find
-    // a style.
-    if (!(styleValue in sharedStyles) && ('#' + styleValue in sharedStyles)) {
-      styleValue = '#' + styleValue;
-    }
-    return ol.format.KML.findStyle_(
-        sharedStyles[styleValue], defaultStyle, sharedStyles);
-  } else {
-    return defaultStyle;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @private
- * @return {ol.Color|undefined} Color.
- */
-ol.format.KML.readColor_ = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  // The KML specification states that colors should not include a leading `#`
-  // but we tolerate them.
-  var m = /^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(s);
-  if (m) {
-    var hexColor = m[1];
-    return [
-      parseInt(hexColor.substr(6, 2), 16),
-      parseInt(hexColor.substr(4, 2), 16),
-      parseInt(hexColor.substr(2, 2), 16),
-      parseInt(hexColor.substr(0, 2), 16) / 255
-    ];
-
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @private
- * @return {Array.<number>|undefined} Flat coordinates.
- */
-ol.format.KML.readFlatCoordinates_ = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  var flatCoordinates = [];
-  // The KML specification states that coordinate tuples should not include
-  // spaces, but we tolerate them.
-  var re =
-      /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i;
-  var m;
-  while ((m = re.exec(s))) {
-    var x = parseFloat(m[1]);
-    var y = parseFloat(m[2]);
-    var z = m[3] ? parseFloat(m[3]) : 0;
-    flatCoordinates.push(x, y, z);
-    s = s.substr(m[0].length);
-  }
-  if (s !== '') {
-    return undefined;
-  }
-  return flatCoordinates;
-};
-
-
-/**
- * @param {Node} node Node.
- * @private
- * @return {string} URI.
- */
-ol.format.KML.readURI_ = function(node) {
-  var s = ol.xml.getAllTextContent(node, false).trim();
-  if (node.baseURI && node.baseURI !== 'about:blank') {
-    var url = new URL(s, node.baseURI);
-    return url.href;
-  } else {
-    return s;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @private
- * @return {ol.KMLVec2_} Vec2.
- */
-ol.format.KML.readVec2_ = function(node) {
-  var xunits = node.getAttribute('xunits');
-  var yunits = node.getAttribute('yunits');
-  var origin;
-  if (xunits !== 'insetPixels') {
-    if (yunits !== 'insetPixels') {
-      origin = ol.style.IconOrigin.BOTTOM_LEFT;
-    } else {
-      origin = ol.style.IconOrigin.TOP_LEFT;
-    }
-  } else {
-    if (yunits !== 'insetPixels') {
-      origin = ol.style.IconOrigin.BOTTOM_RIGHT;
-    } else {
-      origin = ol.style.IconOrigin.TOP_RIGHT;
-    }
-  }
-  return {
-    x: parseFloat(node.getAttribute('x')),
-    xunits: ol.format.KML.ICON_ANCHOR_UNITS_MAP_[xunits],
-    y: parseFloat(node.getAttribute('y')),
-    yunits: ol.format.KML.ICON_ANCHOR_UNITS_MAP_[yunits],
-    origin: origin
-  };
-};
-
-
-/**
- * @param {Node} node Node.
- * @private
- * @return {number|undefined} Scale.
- */
-ol.format.KML.readScale_ = function(node) {
-  return ol.format.XSD.readDecimal(node);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<ol.style.Style>|string|undefined} StyleMap.
- */
-ol.format.KML.readStyleMapValue_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(undefined,
-      ol.format.KML.STYLE_MAP_PARSERS_, node, objectStack);
-};
- /**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.IconStyleParser_ = function(node, objectStack) {
-  // FIXME refreshMode
-  // FIXME refreshInterval
-  // FIXME viewRefreshTime
-  // FIXME viewBoundScale
-  // FIXME viewFormat
-  // FIXME httpQuery
-  var object = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.ICON_STYLE_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var styleObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var IconObject = 'Icon' in object ? object['Icon'] : {};
-  var drawIcon = (!('Icon' in object) || Object.keys(IconObject).length > 0);
-  var src;
-  var href = /** @type {string|undefined} */
-      (IconObject['href']);
-  if (href) {
-    src = href;
-  } else if (drawIcon) {
-    src = ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_;
-  }
-  var anchor, anchorXUnits, anchorYUnits;
-  var anchorOrigin = ol.style.IconOrigin.BOTTOM_LEFT;
-  var hotSpot = /** @type {ol.KMLVec2_|undefined} */
-      (object['hotSpot']);
-  if (hotSpot) {
-    anchor = [hotSpot.x, hotSpot.y];
-    anchorXUnits = hotSpot.xunits;
-    anchorYUnits = hotSpot.yunits;
-    anchorOrigin = hotSpot.origin;
-  } else if (src === ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_) {
-    anchor = ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_;
-    anchorXUnits = ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS_;
-    anchorYUnits = ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS_;
-  } else if (/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(src)) {
-    anchor = [0.5, 0];
-    anchorXUnits = ol.style.IconAnchorUnits.FRACTION;
-    anchorYUnits = ol.style.IconAnchorUnits.FRACTION;
-  }
-
-  var offset;
-  var x = /** @type {number|undefined} */
-      (IconObject['x']);
-  var y = /** @type {number|undefined} */
-      (IconObject['y']);
-  if (x !== undefined && y !== undefined) {
-    offset = [x, y];
-  }
-
-  var size;
-  var w = /** @type {number|undefined} */
-      (IconObject['w']);
-  var h = /** @type {number|undefined} */
-      (IconObject['h']);
-  if (w !== undefined && h !== undefined) {
-    size = [w, h];
-  }
-
-  var rotation;
-  var heading = /** @type {number} */
-      (object['heading']);
-  if (heading !== undefined) {
-    rotation = ol.math.toRadians(heading);
-  }
-
-  var scale = /** @type {number|undefined} */
-      (object['scale']);
-
-  if (drawIcon) {
-    if (src == ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_) {
-      size = ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_;
-      if (scale === undefined) {
-        scale = ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_;
-      }
-    }
-
-    var imageStyle = new ol.style.Icon({
-      anchor: anchor,
-      anchorOrigin: anchorOrigin,
-      anchorXUnits: anchorXUnits,
-      anchorYUnits: anchorYUnits,
-      crossOrigin: 'anonymous', // FIXME should this be configurable?
-      offset: offset,
-      offsetOrigin: ol.style.IconOrigin.BOTTOM_LEFT,
-      rotation: rotation,
-      scale: scale,
-      size: size,
-      src: src
-    });
-    styleObject['imageStyle'] = imageStyle;
-  } else {
-    // handle the case when we explicitly want to draw no icon.
-    styleObject['imageStyle'] = ol.format.KML.DEFAULT_NO_IMAGE_STYLE_;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.LabelStyleParser_ = function(node, objectStack) {
-  // FIXME colorMode
-  var object = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.LABEL_STYLE_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var styleObject = objectStack[objectStack.length - 1];
-  var textStyle = new ol.style.Text({
-    fill: new ol.style.Fill({
-      color: /** @type {ol.Color} */
-          ('color' in object ? object['color'] : ol.format.KML.DEFAULT_COLOR_)
-    }),
-    scale: /** @type {number|undefined} */
-        (object['scale'])
-  });
-  styleObject['textStyle'] = textStyle;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.LineStyleParser_ = function(node, objectStack) {
-  // FIXME colorMode
-  // FIXME gx:outerColor
-  // FIXME gx:outerWidth
-  // FIXME gx:physicalWidth
-  // FIXME gx:labelVisibility
-  var object = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.LINE_STYLE_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var styleObject = objectStack[objectStack.length - 1];
-  var strokeStyle = new ol.style.Stroke({
-    color: /** @type {ol.Color} */
-        ('color' in object ? object['color'] : ol.format.KML.DEFAULT_COLOR_),
-    width: /** @type {number} */ ('width' in object ? object['width'] : 1)
-  });
-  styleObject['strokeStyle'] = strokeStyle;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.PolyStyleParser_ = function(node, objectStack) {
-  // FIXME colorMode
-  var object = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.POLY_STYLE_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var styleObject = objectStack[objectStack.length - 1];
-  var fillStyle = new ol.style.Fill({
-    color: /** @type {ol.Color} */
-        ('color' in object ? object['color'] : ol.format.KML.DEFAULT_COLOR_)
-  });
-  styleObject['fillStyle'] = fillStyle;
-  var fill = /** @type {boolean|undefined} */ (object['fill']);
-  if (fill !== undefined) {
-    styleObject['fill'] = fill;
-  }
-  var outline =
-      /** @type {boolean|undefined} */ (object['outline']);
-  if (outline !== undefined) {
-    styleObject['outline'] = outline;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>} LinearRing flat coordinates.
- */
-ol.format.KML.readFlatLinearRing_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(null,
-      ol.format.KML.FLAT_LINEAR_RING_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.gxCoordParser_ = function(node, objectStack) {
-  var gxTrackObject = /** @type {ol.KMLGxTrackObject_} */
-      (objectStack[objectStack.length - 1]);
-  var flatCoordinates = gxTrackObject.flatCoordinates;
-  var s = ol.xml.getAllTextContent(node, false);
-  var re =
-      /^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i;
-  var m = re.exec(s);
-  if (m) {
-    var x = parseFloat(m[1]);
-    var y = parseFloat(m[2]);
-    var z = parseFloat(m[3]);
-    flatCoordinates.push(x, y, z, 0);
-  } else {
-    flatCoordinates.push(0, 0, 0, 0);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.MultiLineString|undefined} MultiLineString.
- */
-ol.format.KML.readGxMultiTrack_ = function(node, objectStack) {
-  var lineStrings = ol.xml.pushParseAndPop([],
-      ol.format.KML.GX_MULTITRACK_GEOMETRY_PARSERS_, node, objectStack);
-  if (!lineStrings) {
-    return undefined;
-  }
-  var multiLineString = new ol.geom.MultiLineString(null);
-  multiLineString.setLineStrings(lineStrings);
-  return multiLineString;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.LineString|undefined} LineString.
- */
-ol.format.KML.readGxTrack_ = function(node, objectStack) {
-  var gxTrackObject = ol.xml.pushParseAndPop(
-      /** @type {ol.KMLGxTrackObject_} */ ({
-        flatCoordinates: [],
-        whens: []
-      }), ol.format.KML.GX_TRACK_PARSERS_, node, objectStack);
-  if (!gxTrackObject) {
-    return undefined;
-  }
-  var flatCoordinates = gxTrackObject.flatCoordinates;
-  var whens = gxTrackObject.whens;
-  var i, ii;
-  for (i = 0, ii = Math.min(flatCoordinates.length, whens.length); i < ii;
-       ++i) {
-    flatCoordinates[4 * i + 3] = whens[i];
-  }
-  var lineString = new ol.geom.LineString(null);
-  lineString.setFlatCoordinates(ol.geom.GeometryLayout.XYZM, flatCoordinates);
-  return lineString;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object} Icon object.
- */
-ol.format.KML.readIcon_ = function(node, objectStack) {
-  var iconObject = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.ICON_PARSERS_, node, objectStack);
-  if (iconObject) {
-    return iconObject;
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>} Flat coordinates.
- */
-ol.format.KML.readFlatCoordinatesFromNode_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(null,
-      ol.format.KML.GEOMETRY_FLAT_COORDINATES_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.LineString|undefined} LineString.
- */
-ol.format.KML.readLineString_ = function(node, objectStack) {
-  var properties = ol.xml.pushParseAndPop({},
-      ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
-      objectStack);
-  var flatCoordinates =
-      ol.format.KML.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var lineString = new ol.geom.LineString(null);
-    lineString.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    lineString.setProperties(properties);
-    return lineString;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.Polygon|undefined} Polygon.
- */
-ol.format.KML.readLinearRing_ = function(node, objectStack) {
-  var properties = ol.xml.pushParseAndPop({},
-      ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
-      objectStack);
-  var flatCoordinates =
-      ol.format.KML.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var polygon = new ol.geom.Polygon(null);
-    polygon.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates,
-        [flatCoordinates.length]);
-    polygon.setProperties(properties);
-    return polygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.KML.readMultiGeometry_ = function(node, objectStack) {
-  var geometries = ol.xml.pushParseAndPop([],
-      ol.format.KML.MULTI_GEOMETRY_PARSERS_, node, objectStack);
-  if (!geometries) {
-    return null;
-  }
-  if (geometries.length === 0) {
-    return new ol.geom.GeometryCollection(geometries);
-  }
-  /** @type {ol.geom.Geometry} */
-  var multiGeometry;
-  var homogeneous = true;
-  var type = geometries[0].getType();
-  var geometry, i, ii;
-  for (i = 1, ii = geometries.length; i < ii; ++i) {
-    geometry = geometries[i];
-    if (geometry.getType() != type) {
-      homogeneous = false;
-      break;
-    }
-  }
-  if (homogeneous) {
-    var layout;
-    var flatCoordinates;
-    if (type == ol.geom.GeometryType.POINT) {
-      var point = geometries[0];
-      layout = point.getLayout();
-      flatCoordinates = point.getFlatCoordinates();
-      for (i = 1, ii = geometries.length; i < ii; ++i) {
-        geometry = geometries[i];
-        ol.array.extend(flatCoordinates, geometry.getFlatCoordinates());
-      }
-      multiGeometry = new ol.geom.MultiPoint(null);
-      multiGeometry.setFlatCoordinates(layout, flatCoordinates);
-      ol.format.KML.setCommonGeometryProperties_(multiGeometry, geometries);
-    } else if (type == ol.geom.GeometryType.LINE_STRING) {
-      multiGeometry = new ol.geom.MultiLineString(null);
-      multiGeometry.setLineStrings(geometries);
-      ol.format.KML.setCommonGeometryProperties_(multiGeometry, geometries);
-    } else if (type == ol.geom.GeometryType.POLYGON) {
-      multiGeometry = new ol.geom.MultiPolygon(null);
-      multiGeometry.setPolygons(geometries);
-      ol.format.KML.setCommonGeometryProperties_(multiGeometry, geometries);
-    } else if (type == ol.geom.GeometryType.GEOMETRY_COLLECTION) {
-      multiGeometry = new ol.geom.GeometryCollection(geometries);
-    } else {
-      ol.asserts.assert(false, 37); // Unknown geometry type found
-    }
-  } else {
-    multiGeometry = new ol.geom.GeometryCollection(geometries);
-  }
-  return /** @type {ol.geom.Geometry} */ (multiGeometry);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.Point|undefined} Point.
- */
-ol.format.KML.readPoint_ = function(node, objectStack) {
-  var properties = ol.xml.pushParseAndPop({},
-      ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
-      objectStack);
-  var flatCoordinates =
-      ol.format.KML.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var point = new ol.geom.Point(null);
-    point.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    point.setProperties(properties);
-    return point;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.Polygon|undefined} Polygon.
- */
-ol.format.KML.readPolygon_ = function(node, objectStack) {
-  var properties = ol.xml.pushParseAndPop(/** @type {Object<string,*>} */ ({}),
-      ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
-      objectStack);
-  var flatLinearRings = ol.xml.pushParseAndPop([null],
-      ol.format.KML.FLAT_LINEAR_RINGS_PARSERS_, node, objectStack);
-  if (flatLinearRings && flatLinearRings[0]) {
-    var polygon = new ol.geom.Polygon(null);
-    var flatCoordinates = flatLinearRings[0];
-    var ends = [flatCoordinates.length];
-    var i, ii;
-    for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {
-      ol.array.extend(flatCoordinates, flatLinearRings[i]);
-      ends.push(flatCoordinates.length);
-    }
-    polygon.setFlatCoordinates(
-        ol.geom.GeometryLayout.XYZ, flatCoordinates, ends);
-    polygon.setProperties(properties);
-    return polygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<ol.style.Style>} Style.
- */
-ol.format.KML.readStyle_ = function(node, objectStack) {
-  var styleObject = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.STYLE_PARSERS_, node, objectStack);
-  if (!styleObject) {
-    return null;
-  }
-  var fillStyle = /** @type {ol.style.Fill} */
-      ('fillStyle' in styleObject ?
-          styleObject['fillStyle'] : ol.format.KML.DEFAULT_FILL_STYLE_);
-  var fill = /** @type {boolean|undefined} */ (styleObject['fill']);
-  if (fill !== undefined && !fill) {
-    fillStyle = null;
-  }
-  var imageStyle = /** @type {ol.style.Image} */
-      ('imageStyle' in styleObject ?
-          styleObject['imageStyle'] : ol.format.KML.DEFAULT_IMAGE_STYLE_);
-  if (imageStyle == ol.format.KML.DEFAULT_NO_IMAGE_STYLE_) {
-    imageStyle = undefined;
-  }
-  var textStyle = /** @type {ol.style.Text} */
-      ('textStyle' in styleObject ?
-          styleObject['textStyle'] : ol.format.KML.DEFAULT_TEXT_STYLE_);
-  var strokeStyle = /** @type {ol.style.Stroke} */
-      ('strokeStyle' in styleObject ?
-          styleObject['strokeStyle'] : ol.format.KML.DEFAULT_STROKE_STYLE_);
-  var outline = /** @type {boolean|undefined} */
-      (styleObject['outline']);
-  if (outline !== undefined && !outline) {
-    strokeStyle = null;
-  }
-  return [new ol.style.Style({
-    fill: fillStyle,
-    image: imageStyle,
-    stroke: strokeStyle,
-    text: textStyle,
-    zIndex: undefined // FIXME
-  })];
-};
-
-
-/**
- * Reads an array of geometries and creates arrays for common geometry
- * properties. Then sets them to the multi geometry.
- * @param {ol.geom.MultiPoint|ol.geom.MultiLineString|ol.geom.MultiPolygon}
- *     multiGeometry A multi-geometry.
- * @param {Array.<ol.geom.Geometry>} geometries List of geometries.
- * @private
- */
-ol.format.KML.setCommonGeometryProperties_ = function(multiGeometry,
-    geometries) {
-  var ii = geometries.length;
-  var extrudes = new Array(geometries.length);
-  var altitudeModes = new Array(geometries.length);
-  var geometry, i, hasExtrude, hasAltitudeMode;
-  hasExtrude = hasAltitudeMode = false;
-  for (i = 0; i < ii; ++i) {
-    geometry = geometries[i];
-    extrudes[i] = geometry.get('extrude');
-    altitudeModes[i] = geometry.get('altitudeMode');
-    hasExtrude = hasExtrude || extrudes[i] !== undefined;
-    hasAltitudeMode = hasAltitudeMode || altitudeModes[i];
-  }
-  if (hasExtrude) {
-    multiGeometry.set('extrude', extrudes);
-  }
-  if (hasAltitudeMode) {
-    multiGeometry.set('altitudeMode', altitudeModes);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.DataParser_ = function(node, objectStack) {
-  var name = node.getAttribute('name');
-  ol.xml.parseNode(ol.format.KML.DATA_PARSERS_, node, objectStack);
-  var featureObject =
-    /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  if (name !== null) {
-    featureObject[name] = featureObject.value;
-  } else if (featureObject.displayName !== null) {
-    featureObject[featureObject.displayName] = featureObject.value;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.ExtendedDataParser_ = function(node, objectStack) {
-  ol.xml.parseNode(ol.format.KML.EXTENDED_DATA_PARSERS_, node, objectStack);
-};
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.RegionParser_ = function(node, objectStack) {
-  ol.xml.parseNode(ol.format.KML.REGION_PARSERS_, node, objectStack);
-};
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.PairDataParser_ = function(node, objectStack) {
-  var pairObject = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.PAIR_PARSERS_, node, objectStack);
-  if (!pairObject) {
-    return;
-  }
-  var key = /** @type {string|undefined} */
-      (pairObject['key']);
-  if (key && key == 'normal') {
-    var styleUrl = /** @type {string|undefined} */
-        (pairObject['styleUrl']);
-    if (styleUrl) {
-      objectStack[objectStack.length - 1] = styleUrl;
-    }
-    var Style = /** @type {ol.style.Style} */
-        (pairObject['Style']);
-    if (Style) {
-      objectStack[objectStack.length - 1] = Style;
-    }
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.PlacemarkStyleMapParser_ = function(node, objectStack) {
-  var styleMapValue = ol.format.KML.readStyleMapValue_(node, objectStack);
-  if (!styleMapValue) {
-    return;
-  }
-  var placemarkObject = objectStack[objectStack.length - 1];
-  if (Array.isArray(styleMapValue)) {
-    placemarkObject['Style'] = styleMapValue;
-  } else if (typeof styleMapValue === 'string') {
-    placemarkObject['styleUrl'] = styleMapValue;
-  } else {
-    ol.asserts.assert(false, 38); // `styleMapValue` has an unknown type
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.SchemaDataParser_ = function(node, objectStack) {
-  ol.xml.parseNode(ol.format.KML.SCHEMA_DATA_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.SimpleDataParser_ = function(node, objectStack) {
-  var name = node.getAttribute('name');
-  if (name !== null) {
-    var data = ol.format.XSD.readString(node);
-    var featureObject =
-        /** @type {Object} */ (objectStack[objectStack.length - 1]);
-    featureObject[name] = data;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.LatLonAltBoxParser_ = function(node, objectStack) {
-  var object = ol.xml.pushParseAndPop({}, ol.format.KML.LAT_LON_ALT_BOX_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var regionObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var extent = [
-    parseFloat(object['west']),
-    parseFloat(object['south']),
-    parseFloat(object['east']),
-    parseFloat(object['north'])
-  ];
-  regionObject['extent'] = extent;
-  regionObject['altitudeMode'] = object['altitudeMode'];
-  regionObject['minAltitude'] = parseFloat(object['minAltitude']);
-  regionObject['maxAltitude'] = parseFloat(object['maxAltitude']);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.LodParser_ = function(node, objectStack) {
-  var object = ol.xml.pushParseAndPop({}, ol.format.KML.LOD_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var lodObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  lodObject['minLodPixels'] = parseFloat(object['minLodPixels']);
-  lodObject['maxLodPixels'] = parseFloat(object['maxLodPixels']);
-  lodObject['minFadeExtent'] = parseFloat(object['minFadeExtent']);
-  lodObject['maxFadeExtent'] = parseFloat(object['maxFadeExtent']);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.innerBoundaryIsParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      ol.format.KML.INNER_BOUNDARY_IS_PARSERS_, node, objectStack);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings.push(flatLinearRing);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.outerBoundaryIsParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      ol.format.KML.OUTER_BOUNDARY_IS_PARSERS_, node, objectStack);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings[0] = flatLinearRing;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.LinkParser_ = function(node, objectStack) {
-  ol.xml.parseNode(ol.format.KML.LINK_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.whenParser_ = function(node, objectStack) {
-  var gxTrackObject = /** @type {ol.KMLGxTrackObject_} */
-      (objectStack[objectStack.length - 1]);
-  var whens = gxTrackObject.whens;
-  var s = ol.xml.getAllTextContent(node, false);
-  var when = Date.parse(s);
-  whens.push(isNaN(when) ? 0 : when);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.DATA_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'displayName': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'value': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.EXTENDED_DATA_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Data': ol.format.KML.DataParser_,
-      'SchemaData': ol.format.KML.SchemaDataParser_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.REGION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LatLonAltBox': ol.format.KML.LatLonAltBoxParser_,
-      'Lod': ol.format.KML.LodParser_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.LAT_LON_ALT_BOX_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'altitudeMode': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'minAltitude': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'maxAltitude': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'north': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'south': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'east': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'west': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.LOD_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'minLodPixels': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'maxLodPixels': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'minFadeExtent': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'maxFadeExtent': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'extrude': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean),
-      'altitudeMode': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.FLAT_LINEAR_RING_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'coordinates': ol.xml.makeReplacer(ol.format.KML.readFlatCoordinates_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.FLAT_LINEAR_RINGS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'innerBoundaryIs': ol.format.KML.innerBoundaryIsParser_,
-      'outerBoundaryIs': ol.format.KML.outerBoundaryIsParser_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.GX_TRACK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'when': ol.format.KML.whenParser_
-    }, ol.xml.makeStructureNS(
-        ol.format.KML.GX_NAMESPACE_URIS_, {
-          'coord': ol.format.KML.gxCoordParser_
-        }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.GEOMETRY_FLAT_COORDINATES_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'coordinates': ol.xml.makeReplacer(ol.format.KML.readFlatCoordinates_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.ICON_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'href': ol.xml.makeObjectPropertySetter(ol.format.KML.readURI_)
-    }, ol.xml.makeStructureNS(
-        ol.format.KML.GX_NAMESPACE_URIS_, {
-          'x': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-          'y': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-          'w': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-          'h': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal)
-        }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.ICON_STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Icon': ol.xml.makeObjectPropertySetter(ol.format.KML.readIcon_),
-      'heading': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'hotSpot': ol.xml.makeObjectPropertySetter(ol.format.KML.readVec2_),
-      'scale': ol.xml.makeObjectPropertySetter(ol.format.KML.readScale_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.INNER_BOUNDARY_IS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LinearRing': ol.xml.makeReplacer(ol.format.KML.readFlatLinearRing_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.LABEL_STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeObjectPropertySetter(ol.format.KML.readColor_),
-      'scale': ol.xml.makeObjectPropertySetter(ol.format.KML.readScale_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.LINE_STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeObjectPropertySetter(ol.format.KML.readColor_),
-      'width': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.MULTI_GEOMETRY_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LineString': ol.xml.makeArrayPusher(ol.format.KML.readLineString_),
-      'LinearRing': ol.xml.makeArrayPusher(ol.format.KML.readLinearRing_),
-      'MultiGeometry': ol.xml.makeArrayPusher(ol.format.KML.readMultiGeometry_),
-      'Point': ol.xml.makeArrayPusher(ol.format.KML.readPoint_),
-      'Polygon': ol.xml.makeArrayPusher(ol.format.KML.readPolygon_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.GX_MULTITRACK_GEOMETRY_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.GX_NAMESPACE_URIS_, {
-      'Track': ol.xml.makeArrayPusher(ol.format.KML.readGxTrack_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.NETWORK_LINK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'ExtendedData': ol.format.KML.ExtendedDataParser_,
-      'Region': ol.format.KML.RegionParser_,
-      'Link': ol.format.KML.LinkParser_,
-      'address': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'description': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'open': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean),
-      'phoneNumber': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'visibility': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.LINK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'href': ol.xml.makeObjectPropertySetter(ol.format.KML.readURI_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.OUTER_BOUNDARY_IS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LinearRing': ol.xml.makeReplacer(ol.format.KML.readFlatLinearRing_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.PAIR_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Style': ol.xml.makeObjectPropertySetter(ol.format.KML.readStyle_),
-      'key': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'styleUrl': ol.xml.makeObjectPropertySetter(ol.format.KML.readURI_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.PLACEMARK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'ExtendedData': ol.format.KML.ExtendedDataParser_,
-      'Region': ol.format.KML.RegionParser_,
-      'MultiGeometry': ol.xml.makeObjectPropertySetter(
-          ol.format.KML.readMultiGeometry_, 'geometry'),
-      'LineString': ol.xml.makeObjectPropertySetter(
-          ol.format.KML.readLineString_, 'geometry'),
-      'LinearRing': ol.xml.makeObjectPropertySetter(
-          ol.format.KML.readLinearRing_, 'geometry'),
-      'Point': ol.xml.makeObjectPropertySetter(
-          ol.format.KML.readPoint_, 'geometry'),
-      'Polygon': ol.xml.makeObjectPropertySetter(
-          ol.format.KML.readPolygon_, 'geometry'),
-      'Style': ol.xml.makeObjectPropertySetter(ol.format.KML.readStyle_),
-      'StyleMap': ol.format.KML.PlacemarkStyleMapParser_,
-      'address': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'description': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'open': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean),
-      'phoneNumber': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'styleUrl': ol.xml.makeObjectPropertySetter(ol.format.KML.readURI_),
-      'visibility': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean)
-    }, ol.xml.makeStructureNS(
-        ol.format.KML.GX_NAMESPACE_URIS_, {
-          'MultiTrack': ol.xml.makeObjectPropertySetter(
-              ol.format.KML.readGxMultiTrack_, 'geometry'),
-          'Track': ol.xml.makeObjectPropertySetter(
-              ol.format.KML.readGxTrack_, 'geometry')
-        }
-    ));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.POLY_STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeObjectPropertySetter(ol.format.KML.readColor_),
-      'fill': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean),
-      'outline': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.SCHEMA_DATA_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'SimpleData': ol.format.KML.SimpleDataParser_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'IconStyle': ol.format.KML.IconStyleParser_,
-      'LabelStyle': ol.format.KML.LabelStyleParser_,
-      'LineStyle': ol.format.KML.LineStyleParser_,
-      'PolyStyle': ol.format.KML.PolyStyleParser_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.STYLE_MAP_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Pair': ol.format.KML.PairDataParser_
-    });
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<ol.Feature>|undefined} Features.
- */
-ol.format.KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
-  // FIXME use scope somehow
-  var parsersNS = ol.xml.makeStructureNS(
-      ol.format.KML.NAMESPACE_URIS_, {
-        'Document': ol.xml.makeArrayExtender(this.readDocumentOrFolder_, this),
-        'Folder': ol.xml.makeArrayExtender(this.readDocumentOrFolder_, this),
-        'Placemark': ol.xml.makeArrayPusher(this.readPlacemark_, this),
-        'Style': this.readSharedStyle_.bind(this),
-        'StyleMap': this.readSharedStyleMap_.bind(this)
-      });
-  /** @type {Array.<ol.Feature>} */
-  var features = ol.xml.pushParseAndPop([], parsersNS, node, objectStack, this);
-  if (features) {
-    return features;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Feature|undefined} Feature.
- */
-ol.format.KML.prototype.readPlacemark_ = function(node, objectStack) {
-  var object = ol.xml.pushParseAndPop({'geometry': null},
-      ol.format.KML.PLACEMARK_PARSERS_, node, objectStack);
-  if (!object) {
-    return undefined;
-  }
-  var feature = new ol.Feature();
-  var id = node.getAttribute('id');
-  if (id !== null) {
-    feature.setId(id);
-  }
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-
-  var geometry = object['geometry'];
-  if (geometry) {
-    ol.format.Feature.transformWithOptions(geometry, false, options);
-  }
-  feature.setGeometry(geometry);
-  delete object['geometry'];
-
-  if (this.extractStyles_) {
-    var style = object['Style'];
-    var styleUrl = object['styleUrl'];
-    var styleFunction = ol.format.KML.createFeatureStyleFunction_(
-        style, styleUrl, this.defaultStyle_, this.sharedStyles_,
-        this.showPointNames_);
-    feature.setStyle(styleFunction);
-  }
-  delete object['Style'];
-  // we do not remove the styleUrl property from the object, so it
-  // gets stored on feature when setProperties is called
-
-  feature.setProperties(object);
-
-  return feature;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.prototype.readSharedStyle_ = function(node, objectStack) {
-  var id = node.getAttribute('id');
-  if (id !== null) {
-    var style = ol.format.KML.readStyle_(node, objectStack);
-    if (style) {
-      var styleUri;
-      if (node.baseURI && node.baseURI !== 'about:blank') {
-        var url = new URL('#' + id, node.baseURI);
-        styleUri = url.href;
-      } else {
-        styleUri = '#' + id;
-      }
-      this.sharedStyles_[styleUri] = style;
-    }
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.prototype.readSharedStyleMap_ = function(node, objectStack) {
-  var id = node.getAttribute('id');
-  if (id === null) {
-    return;
-  }
-  var styleMapValue = ol.format.KML.readStyleMapValue_(node, objectStack);
-  if (!styleMapValue) {
-    return;
-  }
-  var styleUri;
-  if (node.baseURI && node.baseURI !== 'about:blank') {
-    var url = new URL('#' + id, node.baseURI);
-    styleUri = url.href;
-  } else {
-    styleUri = '#' + id;
-  }
-  this.sharedStyles_[styleUri] = styleMapValue;
-};
-
-
-/**
- * Read the first feature from a KML source. MultiGeometries are converted into
- * GeometryCollections if they are a mix of geometry types, and into MultiPoint/
- * MultiLineString/MultiPolygon if they are all of the same type.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.KML.prototype.readFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.KML.prototype.readFeatureFromNode = function(node, opt_options) {
-  if (!ol.array.includes(ol.format.KML.NAMESPACE_URIS_, node.namespaceURI)) {
-    return null;
-  }
-  var feature = this.readPlacemark_(
-      node, [this.getReadOptions(node, opt_options)]);
-  if (feature) {
-    return feature;
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * Read all features from a KML source. MultiGeometries are converted into
- * GeometryCollections if they are a mix of geometry types, and into MultiPoint/
- * MultiLineString/MultiPolygon if they are all of the same type.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.KML.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.KML.prototype.readFeaturesFromNode = function(node, opt_options) {
-  if (!ol.array.includes(ol.format.KML.NAMESPACE_URIS_, node.namespaceURI)) {
-    return [];
-  }
-  var features;
-  var localName = node.localName;
-  if (localName == 'Document' || localName == 'Folder') {
-    features = this.readDocumentOrFolder_(
-        node, [this.getReadOptions(node, opt_options)]);
-    if (features) {
-      return features;
-    } else {
-      return [];
-    }
-  } else if (localName == 'Placemark') {
-    var feature = this.readPlacemark_(
-        node, [this.getReadOptions(node, opt_options)]);
-    if (feature) {
-      return [feature];
-    } else {
-      return [];
-    }
-  } else if (localName == 'kml') {
-    features = [];
-    var n;
-    for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-      var fs = this.readFeaturesFromNode(n, opt_options);
-      if (fs) {
-        ol.array.extend(features, fs);
-      }
-    }
-    return features;
-  } else {
-    return [];
-  }
-};
-
-
-/**
- * Read the name of the KML.
- *
- * @param {Document|Node|string} source Souce.
- * @return {string|undefined} Name.
- * @api
- */
-ol.format.KML.prototype.readName = function(source) {
-  if (ol.xml.isDocument(source)) {
-    return this.readNameFromDocument(/** @type {Document} */ (source));
-  } else if (ol.xml.isNode(source)) {
-    return this.readNameFromNode(/** @type {Node} */ (source));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readNameFromDocument(doc);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @return {string|undefined} Name.
- */
-ol.format.KML.prototype.readNameFromDocument = function(doc) {
-  var n;
-  for (n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      var name = this.readNameFromNode(n);
-      if (name) {
-        return name;
-      }
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {string|undefined} Name.
- */
-ol.format.KML.prototype.readNameFromNode = function(node) {
-  var n;
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        n.localName == 'name') {
-      return ol.format.XSD.readString(n);
-    }
-  }
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    var localName = n.localName;
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        (localName == 'Document' ||
-         localName == 'Folder' ||
-         localName == 'Placemark' ||
-         localName == 'kml')) {
-      var name = this.readNameFromNode(n);
-      if (name) {
-        return name;
-      }
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * Read the network links of the KML.
- *
- * @param {Document|Node|string} source Source.
- * @return {Array.<Object>} Network links.
- * @api
- */
-ol.format.KML.prototype.readNetworkLinks = function(source) {
-  var networkLinks = [];
-  if (ol.xml.isDocument(source)) {
-    ol.array.extend(networkLinks, this.readNetworkLinksFromDocument(
-        /** @type {Document} */ (source)));
-  } else if (ol.xml.isNode(source)) {
-    ol.array.extend(networkLinks, this.readNetworkLinksFromNode(
-        /** @type {Node} */ (source)));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    ol.array.extend(networkLinks, this.readNetworkLinksFromDocument(doc));
-  }
-  return networkLinks;
-};
-
-
-/**
- * @param {Document} doc Document.
- * @return {Array.<Object>} Network links.
- */
-ol.format.KML.prototype.readNetworkLinksFromDocument = function(doc) {
-  var n, networkLinks = [];
-  for (n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      ol.array.extend(networkLinks, this.readNetworkLinksFromNode(n));
-    }
-  }
-  return networkLinks;
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {Array.<Object>} Network links.
- */
-ol.format.KML.prototype.readNetworkLinksFromNode = function(node) {
-  var n, networkLinks = [];
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        n.localName == 'NetworkLink') {
-      var obj = ol.xml.pushParseAndPop({}, ol.format.KML.NETWORK_LINK_PARSERS_,
-          n, []);
-      networkLinks.push(obj);
-    }
-  }
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    var localName = n.localName;
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        (localName == 'Document' ||
-         localName == 'Folder' ||
-         localName == 'kml')) {
-      ol.array.extend(networkLinks, this.readNetworkLinksFromNode(n));
-    }
-  }
-  return networkLinks;
-};
-
-
-/**
- * Read the regions of the KML.
- *
- * @param {Document|Node|string} source Source.
- * @return {Array.<Object>} Regions.
- * @api
- */
-ol.format.KML.prototype.readRegion = function(source) {
-  var regions = [];
-  if (ol.xml.isDocument(source)) {
-    ol.array.extend(regions, this.readRegionFromDocument(
-        /** @type {Document} */ (source)));
-  } else if (ol.xml.isNode(source)) {
-    ol.array.extend(regions, this.readRegionFromNode(
-        /** @type {Node} */ (source)));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    ol.array.extend(regions, this.readRegionFromDocument(doc));
-  }
-  return regions;
-};
-
-
-/**
- * @param {Document} doc Document.
- * @return {Array.<Object>} Region.
- */
-ol.format.KML.prototype.readRegionFromDocument = function(doc) {
-  var n, regions = [];
-  for (n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      ol.array.extend(regions, this.readRegionFromNode(n));
-    }
-  }
-  return regions;
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {Array.<Object>} Region.
- * @api
- */
-ol.format.KML.prototype.readRegionFromNode = function(node) {
-  var n, regions = [];
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        n.localName == 'Region') {
-      var obj = ol.xml.pushParseAndPop({}, ol.format.KML.REGION_PARSERS_,
-          n, []);
-      regions.push(obj);
-    }
-  }
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    var localName = n.localName;
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        (localName == 'Document' ||
-         localName == 'Folder' ||
-         localName == 'kml')) {
-      ol.array.extend(regions, this.readRegionFromNode(n));
-    }
-  }
-  return regions;
-};
-
-
-/**
- * Read the projection from a KML source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.KML.prototype.readProjection;
-
-
-/**
- * @param {Node} node Node to append a TextNode with the color to.
- * @param {ol.Color|string} color Color.
- * @private
- */
-ol.format.KML.writeColorTextNode_ = function(node, color) {
-  var rgba = ol.color.asArray(color);
-  var opacity = (rgba.length == 4) ? rgba[3] : 1;
-  var abgr = [opacity * 255, rgba[2], rgba[1], rgba[0]];
-  var i;
-  for (i = 0; i < 4; ++i) {
-    var hex = parseInt(abgr[i], 10).toString(16);
-    abgr[i] = (hex.length == 1) ? '0' + hex : hex;
-  }
-  ol.format.XSD.writeStringTextNode(node, abgr.join(''));
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the coordinates to.
- * @param {Array.<number>} coordinates Coordinates.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeCoordinatesTextNode_ = function(node, coordinates, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-
-  var layout = context['layout'];
-  var stride = context['stride'];
-
-  var dimension;
-  if (layout == ol.geom.GeometryLayout.XY ||
-      layout == ol.geom.GeometryLayout.XYM) {
-    dimension = 2;
-  } else if (layout == ol.geom.GeometryLayout.XYZ ||
-      layout == ol.geom.GeometryLayout.XYZM) {
-    dimension = 3;
-  } else {
-    ol.asserts.assert(false, 34); // Invalid geometry layout
-  }
-
-  var d, i;
-  var ii = coordinates.length;
-  var text = '';
-  if (ii > 0) {
-    text += coordinates[0];
-    for (d = 1; d < dimension; ++d) {
-      text += ',' + coordinates[d];
-    }
-    for (i = stride; i < ii; i += stride) {
-      text += ' ' + coordinates[i];
-      for (d = 1; d < dimension; ++d) {
-        text += ',' + coordinates[i + d];
-      }
-    }
-  }
-  ol.format.XSD.writeStringTextNode(node, text);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {{name: *, value: *}} pair Name value pair.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeDataNode_ = function(node, pair, objectStack) {
-  node.setAttribute('name', pair.name);
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var value = pair.value;
-
-  if (typeof value == 'object') {
-    if (value !== null && value.displayName) {
-      ol.xml.pushSerializeAndPop(context, ol.format.KML.EXTENDEDDATA_NODE_SERIALIZERS_,
-        ol.xml.OBJECT_PROPERTY_NODE_FACTORY, [value.displayName], objectStack, ['displayName']);
-    }
-
-    if (value !== null && value.value) {
-      ol.xml.pushSerializeAndPop(context, ol.format.KML.EXTENDEDDATA_NODE_SERIALIZERS_,
-        ol.xml.OBJECT_PROPERTY_NODE_FACTORY, [value.value], objectStack, ['value']);
-    }
-  } else {
-    ol.xml.pushSerializeAndPop(context, ol.format.KML.EXTENDEDDATA_NODE_SERIALIZERS_,
-     ol.xml.OBJECT_PROPERTY_NODE_FACTORY, [value], objectStack, ['value']);
-  }
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the name to.
- * @param {string} name DisplayName.
- * @private
- */
-ol.format.KML.writeDataNodeName_ = function(node, name) {
-  ol.format.XSD.writeCDATASection(node, name);
-};
-
-
-/**
- * @param {Node} node Node to append a CDATA Section with the value to.
- * @param {string} value Value.
- * @private
- */
-ol.format.KML.writeDataNodeValue_ = function(node, value) {
-  ol.format.XSD.writeStringTextNode(node, value);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<ol.Feature>} features Features.
- * @param {Array.<*>} objectStack Object stack.
- * @this {ol.format.KML}
- * @private
- */
-ol.format.KML.writeDocument_ = function(node, features, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.DOCUMENT_SERIALIZERS_,
-      ol.format.KML.DOCUMENT_NODE_FACTORY_, features, objectStack, undefined,
-      this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {{names: Array<string>, values: (Array<*>)}} namesAndValues Names and values.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeExtendedData_ = function(node, namesAndValues, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var names = namesAndValues.names, values = namesAndValues.values;
-  var length = names.length;
-
-  for (var i = 0; i < length; i++) {
-    ol.xml.pushSerializeAndPop(context, ol.format.KML.EXTENDEDDATA_NODE_SERIALIZERS_,
-      ol.format.KML.DATA_NODE_FACTORY_, [{name: names[i], value: values[i]}], objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Object} icon Icon object.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeIcon_ = function(node, icon, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.ICON_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(icon, orderedKeys);
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.ICON_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values, objectStack, orderedKeys);
-  orderedKeys =
-      ol.format.KML.ICON_SEQUENCE_[ol.format.KML.GX_NAMESPACE_URIS_[0]];
-  values = ol.xml.makeSequence(icon, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.ICON_SERIALIZERS_,
-      ol.format.KML.GX_NODE_FACTORY_, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.style.Icon} style Icon style.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeIconStyle_ = function(node, style, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var properties = {};
-  var src = style.getSrc();
-  var size = style.getSize();
-  var iconImageSize = style.getImageSize();
-  var iconProperties = {
-    'href': src
-  };
-
-  if (size) {
-    iconProperties['w'] = size[0];
-    iconProperties['h'] = size[1];
-    var anchor = style.getAnchor(); // top-left
-    var origin = style.getOrigin(); // top-left
-
-    if (origin && iconImageSize && origin[0] !== 0 && origin[1] !== size[1]) {
-      iconProperties['x'] = origin[0];
-      iconProperties['y'] = iconImageSize[1] - (origin[1] + size[1]);
-    }
-
-    if (anchor && anchor[0] !== 0 && anchor[1] !== size[1]) {
-      var /** @type {ol.KMLVec2_} */ hotSpot = {
-        x: anchor[0],
-        xunits: ol.style.IconAnchorUnits.PIXELS,
-        y: size[1] - anchor[1],
-        yunits: ol.style.IconAnchorUnits.PIXELS
-      };
-      properties['hotSpot'] = hotSpot;
-    }
-  }
-
-  properties['Icon'] = iconProperties;
-
-  var scale = style.getScale();
-  if (scale !== 1) {
-    properties['scale'] = scale;
-  }
-
-  var rotation = style.getRotation();
-  if (rotation !== 0) {
-    properties['heading'] = rotation; // 0-360
-  }
-
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.ICON_STYLE_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.ICON_STYLE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.style.Text} style style.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeLabelStyle_ = function(node, style, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var properties = {};
-  var fill = style.getFill();
-  if (fill) {
-    properties['color'] = fill.getColor();
-  }
-  var scale = style.getScale();
-  if (scale && scale !== 1) {
-    properties['scale'] = scale;
-  }
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys =
-      ol.format.KML.LABEL_STYLE_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.LABEL_STYLE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.style.Stroke} style style.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeLineStyle_ = function(node, style, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var properties = {
-    'color': style.getColor(),
-    'width': style.getWidth()
-  };
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.LINE_STYLE_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.LINE_STYLE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeMultiGeometry_ = function(node, geometry, objectStack) {
-  /** @type {ol.XmlNodeStackItem} */
-  var context = {node: node};
-  var type = geometry.getType();
-  /** @type {Array.<ol.geom.Geometry>} */
-  var geometries;
-  /** @type {function(*, Array.<*>, string=): (Node|undefined)} */
-  var factory;
-  if (type == ol.geom.GeometryType.GEOMETRY_COLLECTION) {
-    geometries = /** @type {ol.geom.GeometryCollection} */ (geometry).getGeometries();
-    factory = ol.format.KML.GEOMETRY_NODE_FACTORY_;
-  } else if (type == ol.geom.GeometryType.MULTI_POINT) {
-    geometries = /** @type {ol.geom.MultiPoint} */ (geometry).getPoints();
-    factory = ol.format.KML.POINT_NODE_FACTORY_;
-  } else if (type == ol.geom.GeometryType.MULTI_LINE_STRING) {
-    geometries =
-        (/** @type {ol.geom.MultiLineString} */ (geometry)).getLineStrings();
-    factory = ol.format.KML.LINE_STRING_NODE_FACTORY_;
-  } else if (type == ol.geom.GeometryType.MULTI_POLYGON) {
-    geometries =
-        (/** @type {ol.geom.MultiPolygon} */ (geometry)).getPolygons();
-    factory = ol.format.KML.POLYGON_NODE_FACTORY_;
-  } else {
-    ol.asserts.assert(false, 39); // Unknown geometry type
-  }
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.MULTI_GEOMETRY_SERIALIZERS_, factory,
-      geometries, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LinearRing} linearRing Linear ring.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeBoundaryIs_ = function(node, linearRing, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.BOUNDARY_IS_SERIALIZERS_,
-      ol.format.KML.LINEAR_RING_NODE_FACTORY_, [linearRing], objectStack);
-};
-
-
-/**
- * FIXME currently we do serialize arbitrary/custom feature properties
- * (ExtendedData).
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Object stack.
- * @this {ol.format.KML}
- * @private
- */
-ol.format.KML.writePlacemark_ = function(node, feature, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-
-  // set id
-  if (feature.getId()) {
-    node.setAttribute('id', feature.getId());
-  }
-
-  // serialize properties (properties unknown to KML are not serialized)
-  var properties = feature.getProperties();
-
-  // don't export these to ExtendedData
-  var filter = {'address': 1, 'description': 1, 'name': 1, 'open': 1,
-    'phoneNumber': 1, 'styleUrl': 1, 'visibility': 1};
-  filter[feature.getGeometryName()] = 1;
-  var keys = Object.keys(properties || {}).sort().filter(function(v) {
-    return !filter[v];
-  });
-
-  if (keys.length > 0) {
-    var sequence = ol.xml.makeSequence(properties, keys);
-    var namesAndValues = {names: keys, values: sequence};
-    ol.xml.pushSerializeAndPop(context, ol.format.KML.PLACEMARK_SERIALIZERS_,
-      ol.format.KML.EXTENDEDDATA_NODE_FACTORY_, [namesAndValues], objectStack);
-  }
-
-  var styleFunction = feature.getStyleFunction();
-  if (styleFunction) {
-    // FIXME the styles returned by the style function are supposed to be
-    // resolution-independent here
-    var styles = styleFunction.call(feature, 0);
-    if (styles) {
-      var style = Array.isArray(styles) ? styles[0] : styles;
-      if (this.writeStyles_) {
-        properties['Style'] = style;
-      }
-      var textStyle = style.getText();
-      if (textStyle) {
-        properties['name'] = textStyle.getText();
-      }
-    }
-  }
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.PLACEMARK_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.PLACEMARK_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-
-  // serialize geometry
-  var options = /** @type {olx.format.WriteOptions} */ (objectStack[0]);
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    geometry =
-        ol.format.Feature.transformWithOptions(geometry, true, options);
-  }
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.PLACEMARK_SERIALIZERS_,
-      ol.format.KML.GEOMETRY_NODE_FACTORY_, [geometry], objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.SimpleGeometry} geometry Geometry.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writePrimitiveGeometry_ = function(node, geometry, objectStack) {
-  var flatCoordinates = geometry.getFlatCoordinates();
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  context['layout'] = geometry.getLayout();
-  context['stride'] = geometry.getStride();
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.PRIMITIVE_GEOMETRY_SERIALIZERS_,
-      ol.format.KML.COORDINATES_NODE_FACTORY_,
-      [flatCoordinates], objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} polygon Polygon.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writePolygon_ = function(node, polygon, objectStack) {
-  var linearRings = polygon.getLinearRings();
-  var outerRing = linearRings.shift();
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  // inner rings
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.POLYGON_SERIALIZERS_,
-      ol.format.KML.INNER_BOUNDARY_NODE_FACTORY_,
-      linearRings, objectStack);
-  // outer ring
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.POLYGON_SERIALIZERS_,
-      ol.format.KML.OUTER_BOUNDARY_NODE_FACTORY_,
-      [outerRing], objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.style.Fill} style Style.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writePolyStyle_ = function(node, style, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.POLY_STYLE_SERIALIZERS_,
-      ol.format.KML.COLOR_NODE_FACTORY_, [style.getColor()], objectStack);
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the scale to.
- * @param {number|undefined} scale Scale.
- * @private
- */
-ol.format.KML.writeScaleTextNode_ = function(node, scale) {
-  // the Math is to remove any excess decimals created by float arithmetic
-  ol.format.XSD.writeDecimalTextNode(node,
-      Math.round(scale * 1e6) / 1e6);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.style.Style} style Style.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeStyle_ = function(node, style, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var properties = {};
-  var fillStyle = style.getFill();
-  var strokeStyle = style.getStroke();
-  var imageStyle = style.getImage();
-  var textStyle = style.getText();
-  if (imageStyle instanceof ol.style.Icon) {
-    properties['IconStyle'] = imageStyle;
-  }
-  if (textStyle) {
-    properties['LabelStyle'] = textStyle;
-  }
-  if (strokeStyle) {
-    properties['LineStyle'] = strokeStyle;
-  }
-  if (fillStyle) {
-    properties['PolyStyle'] = fillStyle;
-  }
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.STYLE_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.STYLE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the Vec2 to.
- * @param {ol.KMLVec2_} vec2 Vec2.
- * @private
- */
-ol.format.KML.writeVec2_ = function(node, vec2) {
-  node.setAttribute('x', vec2.x);
-  node.setAttribute('y', vec2.y);
-  node.setAttribute('xunits', vec2.xunits);
-  node.setAttribute('yunits', vec2.yunits);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.KML_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'Document', 'Placemark'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.KML_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Document': ol.xml.makeChildAppender(ol.format.KML.writeDocument_),
-      'Placemark': ol.xml.makeChildAppender(ol.format.KML.writePlacemark_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.DOCUMENT_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Placemark': ol.xml.makeChildAppender(ol.format.KML.writePlacemark_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.EXTENDEDDATA_NODE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Data': ol.xml.makeChildAppender(ol.format.KML.writeDataNode_),
-      'value': ol.xml.makeChildAppender(ol.format.KML.writeDataNodeValue_),
-      'displayName': ol.xml.makeChildAppender(ol.format.KML.writeDataNodeName_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, string>}
- * @private
- */
-ol.format.KML.GEOMETRY_TYPE_TO_NODENAME_ = {
-  'Point': 'Point',
-  'LineString': 'LineString',
-  'LinearRing': 'LinearRing',
-  'Polygon': 'Polygon',
-  'MultiPoint': 'MultiGeometry',
-  'MultiLineString': 'MultiGeometry',
-  'MultiPolygon': 'MultiGeometry',
-  'GeometryCollection': 'MultiGeometry'
-};
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.ICON_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'href'
-    ],
-    ol.xml.makeStructureNS(ol.format.KML.GX_NAMESPACE_URIS_, [
-      'x', 'y', 'w', 'h'
-    ]));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.ICON_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'href': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode)
-    }, ol.xml.makeStructureNS(
-        ol.format.KML.GX_NAMESPACE_URIS_, {
-          'x': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-          'y': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-          'w': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-          'h': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode)
-        }));
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.ICON_STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'scale', 'heading', 'Icon', 'hotSpot'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.ICON_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Icon': ol.xml.makeChildAppender(ol.format.KML.writeIcon_),
-      'heading': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'hotSpot': ol.xml.makeChildAppender(ol.format.KML.writeVec2_),
-      'scale': ol.xml.makeChildAppender(ol.format.KML.writeScaleTextNode_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.LABEL_STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'color', 'scale'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.LABEL_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeChildAppender(ol.format.KML.writeColorTextNode_),
-      'scale': ol.xml.makeChildAppender(ol.format.KML.writeScaleTextNode_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.LINE_STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'color', 'width'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.LINE_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeChildAppender(ol.format.KML.writeColorTextNode_),
-      'width': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.BOUNDARY_IS_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LinearRing': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.MULTI_GEOMETRY_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LineString': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_),
-      'Point': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_),
-      'Polygon': ol.xml.makeChildAppender(ol.format.KML.writePolygon_),
-      'GeometryCollection': ol.xml.makeChildAppender(
-          ol.format.KML.writeMultiGeometry_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.PLACEMARK_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'name', 'open', 'visibility', 'address', 'phoneNumber', 'description',
-      'styleUrl', 'Style'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.PLACEMARK_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'ExtendedData': ol.xml.makeChildAppender(
-          ol.format.KML.writeExtendedData_),
-      'MultiGeometry': ol.xml.makeChildAppender(
-          ol.format.KML.writeMultiGeometry_),
-      'LineString': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_),
-      'LinearRing': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_),
-      'Point': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_),
-      'Polygon': ol.xml.makeChildAppender(ol.format.KML.writePolygon_),
-      'Style': ol.xml.makeChildAppender(ol.format.KML.writeStyle_),
-      'address': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'description': ol.xml.makeChildAppender(
-          ol.format.XSD.writeStringTextNode),
-      'name': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'open': ol.xml.makeChildAppender(ol.format.XSD.writeBooleanTextNode),
-      'phoneNumber': ol.xml.makeChildAppender(
-          ol.format.XSD.writeStringTextNode),
-      'styleUrl': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'visibility': ol.xml.makeChildAppender(
-          ol.format.XSD.writeBooleanTextNode)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.PRIMITIVE_GEOMETRY_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'coordinates': ol.xml.makeChildAppender(
-          ol.format.KML.writeCoordinatesTextNode_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.POLYGON_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'outerBoundaryIs': ol.xml.makeChildAppender(
-          ol.format.KML.writeBoundaryIs_),
-      'innerBoundaryIs': ol.xml.makeChildAppender(
-          ol.format.KML.writeBoundaryIs_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.POLY_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeChildAppender(ol.format.KML.writeColorTextNode_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'IconStyle', 'LabelStyle', 'LineStyle', 'PolyStyle'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'IconStyle': ol.xml.makeChildAppender(ol.format.KML.writeIconStyle_),
-      'LabelStyle': ol.xml.makeChildAppender(ol.format.KML.writeLabelStyle_),
-      'LineStyle': ol.xml.makeChildAppender(ol.format.KML.writeLineStyle_),
-      'PolyStyle': ol.xml.makeChildAppender(ol.format.KML.writePolyStyle_)
-    });
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.KML.GX_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  return ol.xml.createElementNS(ol.format.KML.GX_NAMESPACE_URIS_[0],
-      'gx:' + opt_nodeName);
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.KML.DOCUMENT_NODE_FACTORY_ = function(value, objectStack,
-    opt_nodeName) {
-  var parentNode = objectStack[objectStack.length - 1].node;
-  return ol.xml.createElementNS(parentNode.namespaceURI, 'Placemark');
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.KML.GEOMETRY_NODE_FACTORY_ = function(value, objectStack,
-    opt_nodeName) {
-  if (value) {
-    var parentNode = objectStack[objectStack.length - 1].node;
-    return ol.xml.createElementNS(parentNode.namespaceURI,
-        ol.format.KML.GEOMETRY_TYPE_TO_NODENAME_[/** @type {ol.geom.Geometry} */ (value).getType()]);
-  }
-};
-
-
-/**
- * A factory for creating coordinates nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.COLOR_NODE_FACTORY_ = ol.xml.makeSimpleNodeFactory('color');
-
-
-/**
- * A factory for creating coordinates nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.COORDINATES_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('coordinates');
-
-
-/**
- * A factory for creating Data nodes.
- * @const
- * @type {function(*, Array.<*>): (Node|undefined)}
- * @private
- */
-ol.format.KML.DATA_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('Data');
-
-
-/**
- * A factory for creating ExtendedData nodes.
- * @const
- * @type {function(*, Array.<*>): (Node|undefined)}
- * @private
- */
-ol.format.KML.EXTENDEDDATA_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('ExtendedData');
-
-
-/**
- * A factory for creating innerBoundaryIs nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.INNER_BOUNDARY_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('innerBoundaryIs');
-
-
-/**
- * A factory for creating Point nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.POINT_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('Point');
-
-
-/**
- * A factory for creating LineString nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.LINE_STRING_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('LineString');
-
-
-/**
- * A factory for creating LinearRing nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.LINEAR_RING_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('LinearRing');
-
-
-/**
- * A factory for creating Polygon nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.POLYGON_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('Polygon');
-
-
-/**
- * A factory for creating outerBoundaryIs nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.OUTER_BOUNDARY_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('outerBoundaryIs');
-
-
-/**
- * Encode an array of features in the KML format. GeometryCollections, MultiPoints,
- * MultiLineStrings, and MultiPolygons are output as MultiGeometries.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {string} Result.
- * @api
- */
-ol.format.KML.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features in the KML format as an XML node. GeometryCollections,
- * MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.
- *
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- * @override
- * @api
- */
-ol.format.KML.prototype.writeFeaturesNode = function(features, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var kml = ol.xml.createElementNS(ol.format.KML.NAMESPACE_URIS_[4], 'kml');
-  var xmlnsUri = 'http://www.w3.org/2000/xmlns/';
-  var xmlSchemaInstanceUri = 'http://www.w3.org/2001/XMLSchema-instance';
-  ol.xml.setAttributeNS(kml, xmlnsUri, 'xmlns:gx',
-      ol.format.KML.GX_NAMESPACE_URIS_[0]);
-  ol.xml.setAttributeNS(kml, xmlnsUri, 'xmlns:xsi', xmlSchemaInstanceUri);
-  ol.xml.setAttributeNS(kml, xmlSchemaInstanceUri, 'xsi:schemaLocation',
-      ol.format.KML.SCHEMA_LOCATION_);
-
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: kml};
-  var properties = {};
-  if (features.length > 1) {
-    properties['Document'] = features;
-  } else if (features.length == 1) {
-    properties['Placemark'] = features[0];
-  }
-  var orderedKeys = ol.format.KML.KML_SEQUENCE_[kml.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.KML_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, [opt_options], orderedKeys,
-      this);
-  return kml;
-};
-
-
-/**
- * @fileoverview
- * @suppress {accessControls, ambiguousFunctionDecl, checkDebuggerStatement, checkRegExp, checkTypes, checkVars, const, constantProperty, deprecated, duplicate, es5Strict, fileoverviewTags, missingProperties, nonStandardJsDocs, strictModuleDepCheck, suspiciousCode, undefinedNames, undefinedVars, unknownDefines, unusedLocalVariables, uselessCode, visibility}
- */
-goog.provide('ol.ext.PBF');
-
-/** @typedef {function(*)} */
-ol.ext.PBF = function() {};
-
-(function() {(function (exports) {
-'use strict';
-
-var read = function (buffer, offset, isLE, mLen, nBytes) {
-  var e, m;
-  var eLen = nBytes * 8 - mLen - 1;
-  var eMax = (1 << eLen) - 1;
-  var eBias = eMax >> 1;
-  var nBits = -7;
-  var i = isLE ? (nBytes - 1) : 0;
-  var d = isLE ? -1 : 1;
-  var s = buffer[offset + i];
-  i += d;
-  e = s & ((1 << (-nBits)) - 1);
-  s >>= (-nBits);
-  nBits += eLen;
-  for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-  m = e & ((1 << (-nBits)) - 1);
-  e >>= (-nBits);
-  nBits += mLen;
-  for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-  if (e === 0) {
-    e = 1 - eBias;
-  } else if (e === eMax) {
-    return m ? NaN : ((s ? -1 : 1) * Infinity)
-  } else {
-    m = m + Math.pow(2, mLen);
-    e = e - eBias;
-  }
-  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
-};
-var write = function (buffer, value, offset, isLE, mLen, nBytes) {
-  var e, m, c;
-  var eLen = nBytes * 8 - mLen - 1;
-  var eMax = (1 << eLen) - 1;
-  var eBias = eMax >> 1;
-  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);
-  var i = isLE ? 0 : (nBytes - 1);
-  var d = isLE ? 1 : -1;
-  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
-  value = Math.abs(value);
-  if (isNaN(value) || value === Infinity) {
-    m = isNaN(value) ? 1 : 0;
-    e = eMax;
-  } else {
-    e = Math.floor(Math.log(value) / Math.LN2);
-    if (value * (c = Math.pow(2, -e)) < 1) {
-      e--;
-      c *= 2;
-    }
-    if (e + eBias >= 1) {
-      value += rt / c;
-    } else {
-      value += rt * Math.pow(2, 1 - eBias);
-    }
-    if (value * c >= 2) {
-      e++;
-      c /= 2;
-    }
-    if (e + eBias >= eMax) {
-      m = 0;
-      e = eMax;
-    } else if (e + eBias >= 1) {
-      m = (value * c - 1) * Math.pow(2, mLen);
-      e = e + eBias;
-    } else {
-      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
-      e = 0;
-    }
-  }
-  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
-  e = (e << mLen) | m;
-  eLen += mLen;
-  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
-  buffer[offset + i - d] |= s * 128;
-};
-var index$2 = {
-	read: read,
-	write: write
-};
-
-var index = Pbf;
-function Pbf(buf) {
-    this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);
-    this.pos = 0;
-    this.type = 0;
-    this.length = this.buf.length;
-}
-Pbf.Varint  = 0;
-Pbf.Fixed64 = 1;
-Pbf.Bytes   = 2;
-Pbf.Fixed32 = 5;
-var SHIFT_LEFT_32 = (1 << 16) * (1 << 16);
-var SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;
-Pbf.prototype = {
-    destroy: function() {
-        this.buf = null;
-    },
-    readFields: function(readField, result, end) {
-        end = end || this.length;
-        while (this.pos < end) {
-            var val = this.readVarint(),
-                tag = val >> 3,
-                startPos = this.pos;
-            this.type = val & 0x7;
-            readField(tag, result, this);
-            if (this.pos === startPos) this.skip(val);
-        }
-        return result;
-    },
-    readMessage: function(readField, result) {
-        return this.readFields(readField, result, this.readVarint() + this.pos);
-    },
-    readFixed32: function() {
-        var val = readUInt32(this.buf, this.pos);
-        this.pos += 4;
-        return val;
-    },
-    readSFixed32: function() {
-        var val = readInt32(this.buf, this.pos);
-        this.pos += 4;
-        return val;
-    },
-    readFixed64: function() {
-        var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;
-        this.pos += 8;
-        return val;
-    },
-    readSFixed64: function() {
-        var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;
-        this.pos += 8;
-        return val;
-    },
-    readFloat: function() {
-        var val = index$2.read(this.buf, this.pos, true, 23, 4);
-        this.pos += 4;
-        return val;
-    },
-    readDouble: function() {
-        var val = index$2.read(this.buf, this.pos, true, 52, 8);
-        this.pos += 8;
-        return val;
-    },
-    readVarint: function(isSigned) {
-        var buf = this.buf,
-            val, b;
-        b = buf[this.pos++]; val  =  b & 0x7f;        if (b < 0x80) return val;
-        b = buf[this.pos++]; val |= (b & 0x7f) << 7;  if (b < 0x80) return val;
-        b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;
-        b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;
-        b = buf[this.pos];   val |= (b & 0x0f) << 28;
-        return readVarintRemainder(val, isSigned, this);
-    },
-    readVarint64: function() {
-        return this.readVarint(true);
-    },
-    readSVarint: function() {
-        var num = this.readVarint();
-        return num % 2 === 1 ? (num + 1) / -2 : num / 2;
-    },
-    readBoolean: function() {
-        return Boolean(this.readVarint());
-    },
-    readString: function() {
-        var end = this.readVarint() + this.pos,
-            str = readUtf8(this.buf, this.pos, end);
-        this.pos = end;
-        return str;
-    },
-    readBytes: function() {
-        var end = this.readVarint() + this.pos,
-            buffer = this.buf.subarray(this.pos, end);
-        this.pos = end;
-        return buffer;
-    },
-    readPackedVarint: function(arr, isSigned) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readVarint(isSigned));
-        return arr;
-    },
-    readPackedSVarint: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readSVarint());
-        return arr;
-    },
-    readPackedBoolean: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readBoolean());
-        return arr;
-    },
-    readPackedFloat: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readFloat());
-        return arr;
-    },
-    readPackedDouble: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readDouble());
-        return arr;
-    },
-    readPackedFixed32: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readFixed32());
-        return arr;
-    },
-    readPackedSFixed32: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readSFixed32());
-        return arr;
-    },
-    readPackedFixed64: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readFixed64());
-        return arr;
-    },
-    readPackedSFixed64: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readSFixed64());
-        return arr;
-    },
-    skip: function(val) {
-        var type = val & 0x7;
-        if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}
-        else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;
-        else if (type === Pbf.Fixed32) this.pos += 4;
-        else if (type === Pbf.Fixed64) this.pos += 8;
-        else throw new Error('Unimplemented type: ' + type);
-    },
-    writeTag: function(tag, type) {
-        this.writeVarint((tag << 3) | type);
-    },
-    realloc: function(min) {
-        var length = this.length || 16;
-        while (length < this.pos + min) length *= 2;
-        if (length !== this.length) {
-            var buf = new Uint8Array(length);
-            buf.set(this.buf);
-            this.buf = buf;
-            this.length = length;
-        }
-    },
-    finish: function() {
-        this.length = this.pos;
-        this.pos = 0;
-        return this.buf.subarray(0, this.length);
-    },
-    writeFixed32: function(val) {
-        this.realloc(4);
-        writeInt32(this.buf, val, this.pos);
-        this.pos += 4;
-    },
-    writeSFixed32: function(val) {
-        this.realloc(4);
-        writeInt32(this.buf, val, this.pos);
-        this.pos += 4;
-    },
-    writeFixed64: function(val) {
-        this.realloc(8);
-        writeInt32(this.buf, val & -1, this.pos);
-        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);
-        this.pos += 8;
-    },
-    writeSFixed64: function(val) {
-        this.realloc(8);
-        writeInt32(this.buf, val & -1, this.pos);
-        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);
-        this.pos += 8;
-    },
-    writeVarint: function(val) {
-        val = +val || 0;
-        if (val > 0xfffffff || val < 0) {
-            writeBigVarint(val, this);
-            return;
-        }
-        this.realloc(4);
-        this.buf[this.pos++] =           val & 0x7f  | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;
-        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;
-        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;
-        this.buf[this.pos++] =   (val >>> 7) & 0x7f;
-    },
-    writeSVarint: function(val) {
-        this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);
-    },
-    writeBoolean: function(val) {
-        this.writeVarint(Boolean(val));
-    },
-    writeString: function(str) {
-        str = String(str);
-        this.realloc(str.length * 4);
-        this.pos++;
-        var startPos = this.pos;
-        this.pos = writeUtf8(this.buf, str, this.pos);
-        var len = this.pos - startPos;
-        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);
-        this.pos = startPos - 1;
-        this.writeVarint(len);
-        this.pos += len;
-    },
-    writeFloat: function(val) {
-        this.realloc(4);
-        index$2.write(this.buf, val, this.pos, true, 23, 4);
-        this.pos += 4;
-    },
-    writeDouble: function(val) {
-        this.realloc(8);
-        index$2.write(this.buf, val, this.pos, true, 52, 8);
-        this.pos += 8;
-    },
-    writeBytes: function(buffer) {
-        var len = buffer.length;
-        this.writeVarint(len);
-        this.realloc(len);
-        for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];
-    },
-    writeRawMessage: function(fn, obj) {
-        this.pos++;
-        var startPos = this.pos;
-        fn(obj, this);
-        var len = this.pos - startPos;
-        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);
-        this.pos = startPos - 1;
-        this.writeVarint(len);
-        this.pos += len;
-    },
-    writeMessage: function(tag, fn, obj) {
-        this.writeTag(tag, Pbf.Bytes);
-        this.writeRawMessage(fn, obj);
-    },
-    writePackedVarint:   function(tag, arr) { this.writeMessage(tag, writePackedVarint, arr);   },
-    writePackedSVarint:  function(tag, arr) { this.writeMessage(tag, writePackedSVarint, arr);  },
-    writePackedBoolean:  function(tag, arr) { this.writeMessage(tag, writePackedBoolean, arr);  },
-    writePackedFloat:    function(tag, arr) { this.writeMessage(tag, writePackedFloat, arr);    },
-    writePackedDouble:   function(tag, arr) { this.writeMessage(tag, writePackedDouble, arr);   },
-    writePackedFixed32:  function(tag, arr) { this.writeMessage(tag, writePackedFixed32, arr);  },
-    writePackedSFixed32: function(tag, arr) { this.writeMessage(tag, writePackedSFixed32, arr); },
-    writePackedFixed64:  function(tag, arr) { this.writeMessage(tag, writePackedFixed64, arr);  },
-    writePackedSFixed64: function(tag, arr) { this.writeMessage(tag, writePackedSFixed64, arr); },
-    writeBytesField: function(tag, buffer) {
-        this.writeTag(tag, Pbf.Bytes);
-        this.writeBytes(buffer);
-    },
-    writeFixed32Field: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed32);
-        this.writeFixed32(val);
-    },
-    writeSFixed32Field: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed32);
-        this.writeSFixed32(val);
-    },
-    writeFixed64Field: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed64);
-        this.writeFixed64(val);
-    },
-    writeSFixed64Field: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed64);
-        this.writeSFixed64(val);
-    },
-    writeVarintField: function(tag, val) {
-        this.writeTag(tag, Pbf.Varint);
-        this.writeVarint(val);
-    },
-    writeSVarintField: function(tag, val) {
-        this.writeTag(tag, Pbf.Varint);
-        this.writeSVarint(val);
-    },
-    writeStringField: function(tag, str) {
-        this.writeTag(tag, Pbf.Bytes);
-        this.writeString(str);
-    },
-    writeFloatField: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed32);
-        this.writeFloat(val);
-    },
-    writeDoubleField: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed64);
-        this.writeDouble(val);
-    },
-    writeBooleanField: function(tag, val) {
-        this.writeVarintField(tag, Boolean(val));
-    }
-};
-function readVarintRemainder(l, s, p) {
-    var buf = p.buf,
-        h, b;
-    b = buf[p.pos++]; h  = (b & 0x70) >> 4;  if (b < 0x80) return toNum(l, h, s);
-    b = buf[p.pos++]; h |= (b & 0x7f) << 3;  if (b < 0x80) return toNum(l, h, s);
-    b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);
-    b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);
-    b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);
-    b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);
-    throw new Error('Expected varint not more than 10 bytes');
-}
-function readPackedEnd(pbf) {
-    return pbf.type === Pbf.Bytes ?
-        pbf.readVarint() + pbf.pos : pbf.pos + 1;
-}
-function toNum(low, high, isSigned) {
-    if (isSigned) {
-        return high * 0x100000000 + (low >>> 0);
-    }
-    return ((high >>> 0) * 0x100000000) + (low >>> 0);
-}
-function writeBigVarint(val, pbf) {
-    var low, high;
-    if (val >= 0) {
-        low  = (val % 0x100000000) | 0;
-        high = (val / 0x100000000) | 0;
-    } else {
-        low  = ~(-val % 0x100000000);
-        high = ~(-val / 0x100000000);
-        if (low ^ 0xffffffff) {
-            low = (low + 1) | 0;
-        } else {
-            low = 0;
-            high = (high + 1) | 0;
-        }
-    }
-    if (val >= 0x10000000000000000 || val < -0x10000000000000000) {
-        throw new Error('Given varint doesn\'t fit into 10 bytes');
-    }
-    pbf.realloc(10);
-    writeBigVarintLow(low, high, pbf);
-    writeBigVarintHigh(high, pbf);
-}
-function writeBigVarintLow(low, high, pbf) {
-    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
-    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
-    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
-    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
-    pbf.buf[pbf.pos]   = low & 0x7f;
-}
-function writeBigVarintHigh(high, pbf) {
-    var lsb = (high & 0x07) << 4;
-    pbf.buf[pbf.pos++] |= lsb         | ((high >>>= 3) ? 0x80 : 0); if (!high) return;
-    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
-    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
-    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
-    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
-    pbf.buf[pbf.pos++]  = high & 0x7f;
-}
-function makeRoomForExtraLength(startPos, len, pbf) {
-    var extraLen =
-        len <= 0x3fff ? 1 :
-        len <= 0x1fffff ? 2 :
-        len <= 0xfffffff ? 3 : Math.ceil(Math.log(len) / (Math.LN2 * 7));
-    pbf.realloc(extraLen);
-    for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];
-}
-function writePackedVarint(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]);   }
-function writePackedSVarint(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]);  }
-function writePackedFloat(arr, pbf)    { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]);    }
-function writePackedDouble(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]);   }
-function writePackedBoolean(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]);  }
-function writePackedFixed32(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]);  }
-function writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }
-function writePackedFixed64(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]);  }
-function writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }
-function readUInt32(buf, pos) {
-    return ((buf[pos]) |
-        (buf[pos + 1] << 8) |
-        (buf[pos + 2] << 16)) +
-        (buf[pos + 3] * 0x1000000);
-}
-function writeInt32(buf, val, pos) {
-    buf[pos] = val;
-    buf[pos + 1] = (val >>> 8);
-    buf[pos + 2] = (val >>> 16);
-    buf[pos + 3] = (val >>> 24);
-}
-function readInt32(buf, pos) {
-    return ((buf[pos]) |
-        (buf[pos + 1] << 8) |
-        (buf[pos + 2] << 16)) +
-        (buf[pos + 3] << 24);
-}
-function readUtf8(buf, pos, end) {
-    var str = '';
-    var i = pos;
-    while (i < end) {
-        var b0 = buf[i];
-        var c = null;
-        var bytesPerSequence =
-            b0 > 0xEF ? 4 :
-            b0 > 0xDF ? 3 :
-            b0 > 0xBF ? 2 : 1;
-        if (i + bytesPerSequence > end) break;
-        var b1, b2, b3;
-        if (bytesPerSequence === 1) {
-            if (b0 < 0x80) {
-                c = b0;
-            }
-        } else if (bytesPerSequence === 2) {
-            b1 = buf[i + 1];
-            if ((b1 & 0xC0) === 0x80) {
-                c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);
-                if (c <= 0x7F) {
-                    c = null;
-                }
-            }
-        } else if (bytesPerSequence === 3) {
-            b1 = buf[i + 1];
-            b2 = buf[i + 2];
-            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {
-                c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);
-                if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {
-                    c = null;
-                }
-            }
-        } else if (bytesPerSequence === 4) {
-            b1 = buf[i + 1];
-            b2 = buf[i + 2];
-            b3 = buf[i + 3];
-            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {
-                c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);
-                if (c <= 0xFFFF || c >= 0x110000) {
-                    c = null;
-                }
-            }
-        }
-        if (c === null) {
-            c = 0xFFFD;
-            bytesPerSequence = 1;
-        } else if (c > 0xFFFF) {
-            c -= 0x10000;
-            str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);
-            c = 0xDC00 | c & 0x3FF;
-        }
-        str += String.fromCharCode(c);
-        i += bytesPerSequence;
-    }
-    return str;
-}
-function writeUtf8(buf, str, pos) {
-    for (var i = 0, c, lead; i < str.length; i++) {
-        c = str.charCodeAt(i);
-        if (c > 0xD7FF && c < 0xE000) {
-            if (lead) {
-                if (c < 0xDC00) {
-                    buf[pos++] = 0xEF;
-                    buf[pos++] = 0xBF;
-                    buf[pos++] = 0xBD;
-                    lead = c;
-                    continue;
-                } else {
-                    c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;
-                    lead = null;
-                }
-            } else {
-                if (c > 0xDBFF || (i + 1 === str.length)) {
-                    buf[pos++] = 0xEF;
-                    buf[pos++] = 0xBF;
-                    buf[pos++] = 0xBD;
-                } else {
-                    lead = c;
-                }
-                continue;
-            }
-        } else if (lead) {
-            buf[pos++] = 0xEF;
-            buf[pos++] = 0xBF;
-            buf[pos++] = 0xBD;
-            lead = null;
-        }
-        if (c < 0x80) {
-            buf[pos++] = c;
-        } else {
-            if (c < 0x800) {
-                buf[pos++] = c >> 0x6 | 0xC0;
-            } else {
-                if (c < 0x10000) {
-                    buf[pos++] = c >> 0xC | 0xE0;
-                } else {
-                    buf[pos++] = c >> 0x12 | 0xF0;
-                    buf[pos++] = c >> 0xC & 0x3F | 0x80;
-                }
-                buf[pos++] = c >> 0x6 & 0x3F | 0x80;
-            }
-            buf[pos++] = c & 0x3F | 0x80;
-        }
-    }
-    return pos;
-}
-
-exports['default'] = index;
-
-}((this.PBF = this.PBF || {})));}).call(ol.ext);
-ol.ext.PBF = ol.ext.PBF.default;
-
-
-/**
- * @fileoverview
- * @suppress {accessControls, ambiguousFunctionDecl, checkDebuggerStatement, checkRegExp, checkTypes, checkVars, const, constantProperty, deprecated, duplicate, es5Strict, fileoverviewTags, missingProperties, nonStandardJsDocs, strictModuleDepCheck, suspiciousCode, undefinedNames, undefinedVars, unknownDefines, unusedLocalVariables, uselessCode, visibility}
- */
-goog.provide('ol.ext.vectortile.VectorTile');
-
-/** @typedef {function(*)} */
-ol.ext.vectortile.VectorTile = function() {};
-
-(function() {(function (exports) {
-'use strict';
-
-var index$2 = Point;
-function Point(x, y) {
-    this.x = x;
-    this.y = y;
-}
-Point.prototype = {
-    clone: function() { return new Point(this.x, this.y); },
-    add:     function(p) { return this.clone()._add(p); },
-    sub:     function(p) { return this.clone()._sub(p); },
-    multByPoint:    function(p) { return this.clone()._multByPoint(p); },
-    divByPoint:     function(p) { return this.clone()._divByPoint(p); },
-    mult:    function(k) { return this.clone()._mult(k); },
-    div:     function(k) { return this.clone()._div(k); },
-    rotate:  function(a) { return this.clone()._rotate(a); },
-    rotateAround:  function(a,p) { return this.clone()._rotateAround(a,p); },
-    matMult: function(m) { return this.clone()._matMult(m); },
-    unit:    function() { return this.clone()._unit(); },
-    perp:    function() { return this.clone()._perp(); },
-    round:   function() { return this.clone()._round(); },
-    mag: function() {
-        return Math.sqrt(this.x * this.x + this.y * this.y);
-    },
-    equals: function(other) {
-        return this.x === other.x &&
-               this.y === other.y;
-    },
-    dist: function(p) {
-        return Math.sqrt(this.distSqr(p));
-    },
-    distSqr: function(p) {
-        var dx = p.x - this.x,
-            dy = p.y - this.y;
-        return dx * dx + dy * dy;
-    },
-    angle: function() {
-        return Math.atan2(this.y, this.x);
-    },
-    angleTo: function(b) {
-        return Math.atan2(this.y - b.y, this.x - b.x);
-    },
-    angleWith: function(b) {
-        return this.angleWithSep(b.x, b.y);
-    },
-    angleWithSep: function(x, y) {
-        return Math.atan2(
-            this.x * y - this.y * x,
-            this.x * x + this.y * y);
-    },
-    _matMult: function(m) {
-        var x = m[0] * this.x + m[1] * this.y,
-            y = m[2] * this.x + m[3] * this.y;
-        this.x = x;
-        this.y = y;
-        return this;
-    },
-    _add: function(p) {
-        this.x += p.x;
-        this.y += p.y;
-        return this;
-    },
-    _sub: function(p) {
-        this.x -= p.x;
-        this.y -= p.y;
-        return this;
-    },
-    _mult: function(k) {
-        this.x *= k;
-        this.y *= k;
-        return this;
-    },
-    _div: function(k) {
-        this.x /= k;
-        this.y /= k;
-        return this;
-    },
-    _multByPoint: function(p) {
-        this.x *= p.x;
-        this.y *= p.y;
-        return this;
-    },
-    _divByPoint: function(p) {
-        this.x /= p.x;
-        this.y /= p.y;
-        return this;
-    },
-    _unit: function() {
-        this._div(this.mag());
-        return this;
-    },
-    _perp: function() {
-        var y = this.y;
-        this.y = this.x;
-        this.x = -y;
-        return this;
-    },
-    _rotate: function(angle) {
-        var cos = Math.cos(angle),
-            sin = Math.sin(angle),
-            x = cos * this.x - sin * this.y,
-            y = sin * this.x + cos * this.y;
-        this.x = x;
-        this.y = y;
-        return this;
-    },
-    _rotateAround: function(angle, p) {
-        var cos = Math.cos(angle),
-            sin = Math.sin(angle),
-            x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y),
-            y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);
-        this.x = x;
-        this.y = y;
-        return this;
-    },
-    _round: function() {
-        this.x = Math.round(this.x);
-        this.y = Math.round(this.y);
-        return this;
-    }
-};
-Point.convert = function (a) {
-    if (a instanceof Point) {
-        return a;
-    }
-    if (Array.isArray(a)) {
-        return new Point(a[0], a[1]);
-    }
-    return a;
-};
-
-var vectortilefeature = VectorTileFeature$1;
-function VectorTileFeature$1(pbf, end, extent, keys, values) {
-    this.properties = {};
-    this.extent = extent;
-    this.type = 0;
-    this._pbf = pbf;
-    this._geometry = -1;
-    this._keys = keys;
-    this._values = values;
-    pbf.readFields(readFeature, this, end);
-}
-function readFeature(tag, feature, pbf) {
-    if (tag == 1) feature.id = pbf.readVarint();
-    else if (tag == 2) readTag(pbf, feature);
-    else if (tag == 3) feature.type = pbf.readVarint();
-    else if (tag == 4) feature._geometry = pbf.pos;
-}
-function readTag(pbf, feature) {
-    var end = pbf.readVarint() + pbf.pos;
-    while (pbf.pos < end) {
-        var key = feature._keys[pbf.readVarint()],
-            value = feature._values[pbf.readVarint()];
-        feature.properties[key] = value;
-    }
-}
-VectorTileFeature$1.types = ['Unknown', 'Point', 'LineString', 'Polygon'];
-VectorTileFeature$1.prototype.loadGeometry = function() {
-    var pbf = this._pbf;
-    pbf.pos = this._geometry;
-    var end = pbf.readVarint() + pbf.pos,
-        cmd = 1,
-        length = 0,
-        x = 0,
-        y = 0,
-        lines = [],
-        line;
-    while (pbf.pos < end) {
-        if (!length) {
-            var cmdLen = pbf.readVarint();
-            cmd = cmdLen & 0x7;
-            length = cmdLen >> 3;
-        }
-        length--;
-        if (cmd === 1 || cmd === 2) {
-            x += pbf.readSVarint();
-            y += pbf.readSVarint();
-            if (cmd === 1) {
-                if (line) lines.push(line);
-                line = [];
-            }
-            line.push(new index$2(x, y));
-        } else if (cmd === 7) {
-            if (line) {
-                line.push(line[0].clone());
-            }
-        } else {
-            throw new Error('unknown command ' + cmd);
-        }
-    }
-    if (line) lines.push(line);
-    return lines;
-};
-VectorTileFeature$1.prototype.bbox = function() {
-    var pbf = this._pbf;
-    pbf.pos = this._geometry;
-    var end = pbf.readVarint() + pbf.pos,
-        cmd = 1,
-        length = 0,
-        x = 0,
-        y = 0,
-        x1 = Infinity,
-        x2 = -Infinity,
-        y1 = Infinity,
-        y2 = -Infinity;
-    while (pbf.pos < end) {
-        if (!length) {
-            var cmdLen = pbf.readVarint();
-            cmd = cmdLen & 0x7;
-            length = cmdLen >> 3;
-        }
-        length--;
-        if (cmd === 1 || cmd === 2) {
-            x += pbf.readSVarint();
-            y += pbf.readSVarint();
-            if (x < x1) x1 = x;
-            if (x > x2) x2 = x;
-            if (y < y1) y1 = y;
-            if (y > y2) y2 = y;
-        } else if (cmd !== 7) {
-            throw new Error('unknown command ' + cmd);
-        }
-    }
-    return [x1, y1, x2, y2];
-};
-VectorTileFeature$1.prototype.toGeoJSON = function(x, y, z) {
-    var size = this.extent * Math.pow(2, z),
-        x0 = this.extent * x,
-        y0 = this.extent * y,
-        coords = this.loadGeometry(),
-        type = VectorTileFeature$1.types[this.type],
-        i, j;
-    function project(line) {
-        for (var j = 0; j < line.length; j++) {
-            var p = line[j], y2 = 180 - (p.y + y0) * 360 / size;
-            line[j] = [
-                (p.x + x0) * 360 / size - 180,
-                360 / Math.PI * Math.atan(Math.exp(y2 * Math.PI / 180)) - 90
-            ];
-        }
-    }
-    switch (this.type) {
-    case 1:
-        var points = [];
-        for (i = 0; i < coords.length; i++) {
-            points[i] = coords[i][0];
-        }
-        coords = points;
-        project(coords);
-        break;
-    case 2:
-        for (i = 0; i < coords.length; i++) {
-            project(coords[i]);
-        }
-        break;
-    case 3:
-        coords = classifyRings(coords);
-        for (i = 0; i < coords.length; i++) {
-            for (j = 0; j < coords[i].length; j++) {
-                project(coords[i][j]);
-            }
-        }
-        break;
-    }
-    if (coords.length === 1) {
-        coords = coords[0];
-    } else {
-        type = 'Multi' + type;
-    }
-    var result = {
-        type: "Feature",
-        geometry: {
-            type: type,
-            coordinates: coords
-        },
-        properties: this.properties
-    };
-    if ('id' in this) {
-        result.id = this.id;
-    }
-    return result;
-};
-function classifyRings(rings) {
-    var len = rings.length;
-    if (len <= 1) return [rings];
-    var polygons = [],
-        polygon,
-        ccw;
-    for (var i = 0; i < len; i++) {
-        var area = signedArea(rings[i]);
-        if (area === 0) continue;
-        if (ccw === undefined) ccw = area < 0;
-        if (ccw === area < 0) {
-            if (polygon) polygons.push(polygon);
-            polygon = [rings[i]];
-        } else {
-            polygon.push(rings[i]);
-        }
-    }
-    if (polygon) polygons.push(polygon);
-    return polygons;
-}
-function signedArea(ring) {
-    var sum = 0;
-    for (var i = 0, len = ring.length, j = len - 1, p1, p2; i < len; j = i++) {
-        p1 = ring[i];
-        p2 = ring[j];
-        sum += (p2.x - p1.x) * (p1.y + p2.y);
-    }
-    return sum;
-}
-
-var vectortilelayer = VectorTileLayer$1;
-function VectorTileLayer$1(pbf, end) {
-    this.version = 1;
-    this.name = null;
-    this.extent = 4096;
-    this.length = 0;
-    this._pbf = pbf;
-    this._keys = [];
-    this._values = [];
-    this._features = [];
-    pbf.readFields(readLayer, this, end);
-    this.length = this._features.length;
-}
-function readLayer(tag, layer, pbf) {
-    if (tag === 15) layer.version = pbf.readVarint();
-    else if (tag === 1) layer.name = pbf.readString();
-    else if (tag === 5) layer.extent = pbf.readVarint();
-    else if (tag === 2) layer._features.push(pbf.pos);
-    else if (tag === 3) layer._keys.push(pbf.readString());
-    else if (tag === 4) layer._values.push(readValueMessage(pbf));
-}
-function readValueMessage(pbf) {
-    var value = null,
-        end = pbf.readVarint() + pbf.pos;
-    while (pbf.pos < end) {
-        var tag = pbf.readVarint() >> 3;
-        value = tag === 1 ? pbf.readString() :
-            tag === 2 ? pbf.readFloat() :
-            tag === 3 ? pbf.readDouble() :
-            tag === 4 ? pbf.readVarint64() :
-            tag === 5 ? pbf.readVarint() :
-            tag === 6 ? pbf.readSVarint() :
-            tag === 7 ? pbf.readBoolean() : null;
-    }
-    return value;
-}
-VectorTileLayer$1.prototype.feature = function(i) {
-    if (i < 0 || i >= this._features.length) throw new Error('feature index out of bounds');
-    this._pbf.pos = this._features[i];
-    var end = this._pbf.readVarint() + this._pbf.pos;
-    return new vectortilefeature(this._pbf, end, this.extent, this._keys, this._values);
-};
-
-var vectortile = VectorTile$1;
-function VectorTile$1(pbf, end) {
-    this.layers = pbf.readFields(readTile, {}, end);
-}
-function readTile(tag, layers, pbf) {
-    if (tag === 3) {
-        var layer = new vectortilelayer(pbf, pbf.readVarint() + pbf.pos);
-        if (layer.length) layers[layer.name] = layer;
-    }
-}
-
-var VectorTile = vectortile;
-var VectorTileFeature = vectortilefeature;
-var VectorTileLayer = vectortilelayer;
-var index = {
-	VectorTile: VectorTile,
-	VectorTileFeature: VectorTileFeature,
-	VectorTileLayer: VectorTileLayer
-};
-
-exports['default'] = index;
-exports.VectorTile = VectorTile;
-exports.VectorTileFeature = VectorTileFeature;
-exports.VectorTileLayer = VectorTileLayer;
-
-}((this.vectortile = this.vectortile || {})));}).call(ol.ext);
-
-goog.provide('ol.render.Feature');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-
-
-/**
- * Lightweight, read-only, {@link ol.Feature} and {@link ol.geom.Geometry} like
- * structure, optimized for rendering and styling. Geometry access through the
- * API is limited to getting the type and extent of the geometry.
- *
- * @constructor
- * @param {ol.geom.GeometryType} type Geometry type.
- * @param {Array.<number>} flatCoordinates Flat coordinates. These always need
- *     to be right-handed for polygons.
- * @param {Array.<number>|Array.<Array.<number>>} ends Ends or Endss.
- * @param {Object.<string, *>} properties Properties.
- * @param {number|string|undefined} id Feature id.
- */
-ol.render.Feature = function(type, flatCoordinates, ends, properties, id) {
-  /**
-   * @private
-   * @type {ol.Extent|undefined}
-   */
-  this.extent_;
-
-  /**
-   * @private
-   * @type {number|string|undefined}
-   */
-  this.id_ = id;
-
-  /**
-   * @private
-   * @type {ol.geom.GeometryType}
-   */
-  this.type_ = type;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.flatCoordinates_ = flatCoordinates;
-
-  /**
-   * @private
-   * @type {Array.<number>|Array.<Array.<number>>}
-   */
-  this.ends_ = ends;
-
-  /**
-   * @private
-   * @type {Object.<string, *>}
-   */
-  this.properties_ = properties;
-};
-
-
-/**
- * Get a feature property by its key.
- * @param {string} key Key
- * @return {*} Value for the requested key.
- * @api
- */
-ol.render.Feature.prototype.get = function(key) {
-  return this.properties_[key];
-};
-
-
-/**
- * @return {Array.<number>|Array.<Array.<number>>} Ends or endss.
- */
-ol.render.Feature.prototype.getEnds = function() {
-  return this.ends_;
-};
-
-
-/**
- * Get the extent of this feature's geometry.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.render.Feature.prototype.getExtent = function() {
-  if (!this.extent_) {
-    this.extent_ = this.type_ === ol.geom.GeometryType.POINT ?
-        ol.extent.createOrUpdateFromCoordinate(this.flatCoordinates_) :
-        ol.extent.createOrUpdateFromFlatCoordinates(
-            this.flatCoordinates_, 0, this.flatCoordinates_.length, 2);
-
-  }
-  return this.extent_;
-};
-
-/**
- * Get the feature identifier.  This is a stable identifier for the feature and
- * is set when reading data from a remote source.
- * @return {number|string|undefined} Id.
- * @api
- */
-ol.render.Feature.prototype.getId = function() {
-  return this.id_;
-};
-
-
-/**
- * @return {Array.<number>} Flat coordinates.
- */
-ol.render.Feature.prototype.getOrientedFlatCoordinates = function() {
-  return this.flatCoordinates_;
-};
-
-
-/**
- * @return {Array.<number>} Flat coordinates.
- */
-ol.render.Feature.prototype.getFlatCoordinates =
-    ol.render.Feature.prototype.getOrientedFlatCoordinates;
-
-
-/**
- * For API compatibility with {@link ol.Feature}, this method is useful when
- * determining the geometry type in style function (see {@link #getType}).
- * @return {ol.render.Feature} Feature.
- * @api
- */
-ol.render.Feature.prototype.getGeometry = function() {
-  return this;
-};
-
-
-/**
- * Get the feature properties.
- * @return {Object.<string, *>} Feature properties.
- * @api
- */
-ol.render.Feature.prototype.getProperties = function() {
-  return this.properties_;
-};
-
-
-/**
- * Get the feature for working with its geometry.
- * @return {ol.render.Feature} Feature.
- */
-ol.render.Feature.prototype.getSimplifiedGeometry =
-    ol.render.Feature.prototype.getGeometry;
-
-
-/**
- * @return {number} Stride.
- */
-ol.render.Feature.prototype.getStride = function() {
-  return 2;
-};
-
-
-/**
- * @return {undefined}
- */
-ol.render.Feature.prototype.getStyleFunction = ol.nullFunction;
-
-
-/**
- * Get the type of this feature's geometry.
- * @return {ol.geom.GeometryType} Geometry type.
- * @api
- */
-ol.render.Feature.prototype.getType = function() {
-  return this.type_;
-};
-
-//FIXME Implement projection handling
-
-goog.provide('ol.format.MVT');
-
-goog.require('ol');
-goog.require('ol.ext.PBF');
-goog.require('ol.ext.vectortile.VectorTile');
-goog.require('ol.format.Feature');
-goog.require('ol.format.FormatType');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.proj.Projection');
-goog.require('ol.proj.Units');
-goog.require('ol.render.Feature');
-
-
-/**
- * @classdesc
- * Feature format for reading data in the Mapbox MVT format.
- *
- * @constructor
- * @extends {ol.format.Feature}
- * @param {olx.format.MVTOptions=} opt_options Options.
- * @api
- */
-ol.format.MVT = function(opt_options) {
-
-  ol.format.Feature.call(this);
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {ol.proj.Projection}
-   */
-  this.defaultDataProjection = new ol.proj.Projection({
-    code: '',
-    units: ol.proj.Units.TILE_PIXELS
-  });
-
-  /**
-   * @private
-   * @type {function((ol.geom.Geometry|Object.<string,*>)=)|
-   *     function(ol.geom.GeometryType,Array.<number>,
-   *         (Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)}
-   */
-  this.featureClass_ = options.featureClass ?
-      options.featureClass : ol.render.Feature;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.geometryName_ = options.geometryName;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.layerName_ = options.layerName ? options.layerName : 'layer';
-
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.layers_ = options.layers ? options.layers : null;
-
-};
-ol.inherits(ol.format.MVT, ol.format.Feature);
-
-
-/**
- * @inheritDoc
- */
-ol.format.MVT.prototype.getType = function() {
-  return ol.format.FormatType.ARRAY_BUFFER;
-};
-
-
-/**
- * @private
- * @param {Object} rawFeature Raw Mapbox feature.
- * @param {string} layer Layer.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- */
-ol.format.MVT.prototype.readFeature_ = function(
-    rawFeature, layer, opt_options) {
-  var feature = new this.featureClass_();
-  var id = rawFeature.id;
-  var values = rawFeature.properties;
-  values[this.layerName_] = layer;
-  if (this.geometryName_) {
-    feature.setGeometryName(this.geometryName_);
-  }
-  var geometry = ol.format.Feature.transformWithOptions(
-      ol.format.MVT.readGeometry_(rawFeature), false,
-      this.adaptOptions(opt_options));
-  feature.setGeometry(geometry);
-  feature.setId(id);
-  feature.setProperties(values);
-  return feature;
-};
-
-
-/**
- * @private
- * @param {Object} rawFeature Raw Mapbox feature.
- * @param {string} layer Layer.
- * @return {ol.render.Feature} Feature.
- */
-ol.format.MVT.prototype.readRenderFeature_ = function(rawFeature, layer) {
-  var coords = rawFeature.loadGeometry();
-  var ends = [];
-  var flatCoordinates = [];
-  ol.format.MVT.calculateFlatCoordinates_(coords, flatCoordinates, ends);
-
-  var type = rawFeature.type;
-  /** @type {ol.geom.GeometryType} */
-  var geometryType;
-  if (type === 1) {
-    geometryType = coords.length === 1 ?
-        ol.geom.GeometryType.POINT : ol.geom.GeometryType.MULTI_POINT;
-  } else if (type === 2) {
-    if (coords.length === 1) {
-      geometryType = ol.geom.GeometryType.LINE_STRING;
-    } else {
-      geometryType = ol.geom.GeometryType.MULTI_LINE_STRING;
-    }
-  } else if (type === 3) {
-    geometryType = ol.geom.GeometryType.POLYGON;
-  }
-
-  var values = rawFeature.properties;
-  values[this.layerName_] = layer;
-  var id = rawFeature.id;
-
-  return new this.featureClass_(geometryType, flatCoordinates, ends, values, id);
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.format.MVT.prototype.readFeatures = function(source, opt_options) {
-  var layers = this.layers_;
-
-  var pbf = new ol.ext.PBF(/** @type {ArrayBuffer} */ (source));
-  var tile = new ol.ext.vectortile.VectorTile(pbf);
-  var features = [];
-  var featureClass = this.featureClass_;
-  var layer, feature;
-  for (var name in tile.layers) {
-    if (layers && layers.indexOf(name) == -1) {
-      continue;
-    }
-    layer = tile.layers[name];
-
-    for (var i = 0, ii = layer.length; i < ii; ++i) {
-      if (featureClass === ol.render.Feature) {
-        feature = this.readRenderFeature_(layer.feature(i), name);
-      } else {
-        feature = this.readFeature_(layer.feature(i), name, opt_options);
-      }
-      features.push(feature);
-    }
-  }
-
-  return features;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.format.MVT.prototype.readProjection = function(source) {
-  return this.defaultDataProjection;
-};
-
-
-/**
- * Sets the layers that features will be read from.
- * @param {Array.<string>} layers Layers.
- * @api
- */
-ol.format.MVT.prototype.setLayers = function(layers) {
-  this.layers_ = layers;
-};
-
-
-/**
- * @private
- * @param {Object} coords Raw feature coordinates.
- * @param {Array.<number>} flatCoordinates Flat coordinates to be populated by
- *     this function.
- * @param {Array.<number>} ends Ends to be populated by this function.
- */
-ol.format.MVT.calculateFlatCoordinates_ = function(
-    coords, flatCoordinates, ends) {
-  var end = 0;
-  for (var i = 0, ii = coords.length; i < ii; ++i) {
-    var line = coords[i];
-    var j, jj;
-    for (j = 0, jj = line.length; j < jj; ++j) {
-      var coord = line[j];
-      // Non-tilespace coords can be calculated here when a TileGrid and
-      // TileCoord are known.
-      flatCoordinates.push(coord.x, coord.y);
-    }
-    end += 2 * j;
-    ends.push(end);
-  }
-};
-
-
-/**
- * @private
- * @param {Object} rawFeature Raw Mapbox feature.
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.MVT.readGeometry_ = function(rawFeature) {
-  var type = rawFeature.type;
-  if (type === 0) {
-    return null;
-  }
-
-  var coords = rawFeature.loadGeometry();
-  var ends = [];
-  var flatCoordinates = [];
-  ol.format.MVT.calculateFlatCoordinates_(coords, flatCoordinates, ends);
-
-  var geom;
-  if (type === 1) {
-    geom = coords.length === 1 ?
-        new ol.geom.Point(null) : new ol.geom.MultiPoint(null);
-  } else if (type === 2) {
-    if (coords.length === 1) {
-      geom = new ol.geom.LineString(null);
-    } else {
-      geom = new ol.geom.MultiLineString(null);
-    }
-  } else if (type === 3) {
-    geom = new ol.geom.Polygon(null);
-  }
-
-  geom.setFlatCoordinates(ol.geom.GeometryLayout.XY, flatCoordinates,
-      ends);
-
-  return geom;
-};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.MVT.prototype.readFeature = function() {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.MVT.prototype.readGeometry = function() {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.MVT.prototype.writeFeature = function() {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.MVT.prototype.writeGeometry = function() {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.MVT.prototype.writeFeatures = function() {};
-
-// FIXME add typedef for stack state objects
-goog.provide('ol.format.OSMXML');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading data in the
- * [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML).
- *
- * @constructor
- * @extends {ol.format.XMLFeature}
- * @api
- */
-ol.format.OSMXML = function() {
-  ol.format.XMLFeature.call(this);
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get('EPSG:4326');
-};
-ol.inherits(ol.format.OSMXML, ol.format.XMLFeature);
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.OSMXML.readNode_ = function(node, objectStack) {
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-  var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var id = node.getAttribute('id');
-  /** @type {ol.Coordinate} */
-  var coordinates = [
-    parseFloat(node.getAttribute('lon')),
-    parseFloat(node.getAttribute('lat'))
-  ];
-  state.nodes[id] = coordinates;
-
-  var values = ol.xml.pushParseAndPop({
-    tags: {}
-  }, ol.format.OSMXML.NODE_PARSERS_, node, objectStack);
-  if (!ol.obj.isEmpty(values.tags)) {
-    var geometry = new ol.geom.Point(coordinates);
-    ol.format.Feature.transformWithOptions(geometry, false, options);
-    var feature = new ol.Feature(geometry);
-    feature.setId(id);
-    feature.setProperties(values.tags);
-    state.features.push(feature);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.OSMXML.readWay_ = function(node, objectStack) {
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-  var id = node.getAttribute('id');
-  var values = ol.xml.pushParseAndPop({
-    ndrefs: [],
-    tags: {}
-  }, ol.format.OSMXML.WAY_PARSERS_, node, objectStack);
-  var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  /** @type {Array.<number>} */
-  var flatCoordinates = [];
-  for (var i = 0, ii = values.ndrefs.length; i < ii; i++) {
-    var point = state.nodes[values.ndrefs[i]];
-    ol.array.extend(flatCoordinates, point);
-  }
-  var geometry;
-  if (values.ndrefs[0] == values.ndrefs[values.ndrefs.length - 1]) {
-    // closed way
-    geometry = new ol.geom.Polygon(null);
-    geometry.setFlatCoordinates(ol.geom.GeometryLayout.XY, flatCoordinates,
-        [flatCoordinates.length]);
-  } else {
-    geometry = new ol.geom.LineString(null);
-    geometry.setFlatCoordinates(ol.geom.GeometryLayout.XY, flatCoordinates);
-  }
-  ol.format.Feature.transformWithOptions(geometry, false, options);
-  var feature = new ol.Feature(geometry);
-  feature.setId(id);
-  feature.setProperties(values.tags);
-  state.features.push(feature);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.OSMXML.readNd_ = function(node, objectStack) {
-  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  values.ndrefs.push(node.getAttribute('ref'));
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.OSMXML.readTag_ = function(node, objectStack) {
-  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  values.tags[node.getAttribute('k')] = node.getAttribute('v');
-};
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.format.OSMXML.NAMESPACE_URIS_ = [
-  null
-];
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OSMXML.WAY_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OSMXML.NAMESPACE_URIS_, {
-      'nd': ol.format.OSMXML.readNd_,
-      'tag': ol.format.OSMXML.readTag_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OSMXML.PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OSMXML.NAMESPACE_URIS_, {
-      'node': ol.format.OSMXML.readNode_,
-      'way': ol.format.OSMXML.readWay_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OSMXML.NODE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OSMXML.NAMESPACE_URIS_, {
-      'tag': ol.format.OSMXML.readTag_
-    });
-
-
-/**
- * Read all features from an OSM source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.OSMXML.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.OSMXML.prototype.readFeaturesFromNode = function(node, opt_options) {
-  var options = this.getReadOptions(node, opt_options);
-  if (node.localName == 'osm') {
-    var state = ol.xml.pushParseAndPop({
-      nodes: {},
-      features: []
-    }, ol.format.OSMXML.PARSERS_, node, [options]);
-    if (state.features) {
-      return state.features;
-    }
-  }
-  return [];
-};
-
-
-/**
- * Read the projection from an OSM source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.OSMXML.prototype.readProjection;
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.OSMXML.prototype.writeFeatureNode = function(feature, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.OSMXML.prototype.writeFeaturesNode = function(features, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.OSMXML.prototype.writeGeometryNode = function(geometry, opt_options) {};
-
-goog.provide('ol.format.XLink');
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.XLink.NAMESPACE_URI = 'http://www.w3.org/1999/xlink';
-
-
-/**
- * @param {Node} node Node.
- * @return {boolean|undefined} Boolean.
- */
-ol.format.XLink.readHref = function(node) {
-  return node.getAttributeNS(ol.format.XLink.NAMESPACE_URI, 'href');
-};
-
-goog.provide('ol.format.XML');
-
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Generic format for reading non-feature XML data
- *
- * @constructor
- * @abstract
- * @struct
- */
-ol.format.XML = function() {
-};
-
-
-/**
- * @param {Document|Node|string} source Source.
- * @return {Object} The parsed result.
- */
-ol.format.XML.prototype.read = function(source) {
-  if (ol.xml.isDocument(source)) {
-    return this.readFromDocument(/** @type {Document} */ (source));
-  } else if (ol.xml.isNode(source)) {
-    return this.readFromNode(/** @type {Node} */ (source));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readFromDocument(doc);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @abstract
- * @param {Document} doc Document.
- * @return {Object} Object
- */
-ol.format.XML.prototype.readFromDocument = function(doc) {};
-
-
-/**
- * @abstract
- * @param {Node} node Node.
- * @return {Object} Object
- */
-ol.format.XML.prototype.readFromNode = function(node) {};
-
-goog.provide('ol.format.OWS');
-
-goog.require('ol');
-goog.require('ol.format.XLink');
-goog.require('ol.format.XML');
-goog.require('ol.format.XSD');
-goog.require('ol.xml');
-
-
-/**
- * @constructor
- * @extends {ol.format.XML}
- */
-ol.format.OWS = function() {
-  ol.format.XML.call(this);
-};
-ol.inherits(ol.format.OWS, ol.format.XML);
-
-
-/**
- * @inheritDoc
- */
-ol.format.OWS.prototype.readFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readFromNode(n);
-    }
-  }
-  return null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.OWS.prototype.readFromNode = function(node) {
-  var owsObject = ol.xml.pushParseAndPop({},
-      ol.format.OWS.PARSERS_, node, []);
-  return owsObject ? owsObject : null;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The address.
- */
-ol.format.OWS.readAddress_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.ADDRESS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The values.
- */
-ol.format.OWS.readAllowedValues_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.ALLOWED_VALUES_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The constraint.
- */
-ol.format.OWS.readConstraint_ = function(node, objectStack) {
-  var name = node.getAttribute('name');
-  if (!name) {
-    return undefined;
-  }
-  return ol.xml.pushParseAndPop({'name': name},
-      ol.format.OWS.CONSTRAINT_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The contact info.
- */
-ol.format.OWS.readContactInfo_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.CONTACT_INFO_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The DCP.
- */
-ol.format.OWS.readDcp_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.DCP_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The GET object.
- */
-ol.format.OWS.readGet_ = function(node, objectStack) {
-  var href = ol.format.XLink.readHref(node);
-  if (!href) {
-    return undefined;
-  }
-  return ol.xml.pushParseAndPop({'href': href},
-      ol.format.OWS.REQUEST_METHOD_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The HTTP object.
- */
-ol.format.OWS.readHttp_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({}, ol.format.OWS.HTTP_PARSERS_,
-      node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The operation.
- */
-ol.format.OWS.readOperation_ = function(node, objectStack) {
-  var name = node.getAttribute('name');
-  var value = ol.xml.pushParseAndPop({},
-      ol.format.OWS.OPERATION_PARSERS_, node, objectStack);
-  if (!value) {
-    return undefined;
-  }
-  var object = /** @type {Object} */
-      (objectStack[objectStack.length - 1]);
-  object[name] = value;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The operations metadata.
- */
-ol.format.OWS.readOperationsMetadata_ = function(node,
-    objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.OPERATIONS_METADATA_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The phone.
- */
-ol.format.OWS.readPhone_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.PHONE_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The service identification.
- */
-ol.format.OWS.readServiceIdentification_ = function(node,
-    objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.OWS.SERVICE_IDENTIFICATION_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The service contact.
- */
-ol.format.OWS.readServiceContact_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.OWS.SERVICE_CONTACT_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The service provider.
- */
-ol.format.OWS.readServiceProvider_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.OWS.SERVICE_PROVIDER_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {string|undefined} The value.
- */
-ol.format.OWS.readValue_ = function(node, objectStack) {
-  return ol.format.XSD.readString(node);
-};
-
-
-/**
- * @const
- * @type {Array.<string>}
- * @private
- */
-ol.format.OWS.NAMESPACE_URIS_ = [
-  null,
-  'http://www.opengis.net/ows/1.1'
-];
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'ServiceIdentification': ol.xml.makeObjectPropertySetter(
-          ol.format.OWS.readServiceIdentification_),
-      'ServiceProvider': ol.xml.makeObjectPropertySetter(
-          ol.format.OWS.readServiceProvider_),
-      'OperationsMetadata': ol.xml.makeObjectPropertySetter(
-          ol.format.OWS.readOperationsMetadata_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.ADDRESS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'DeliveryPoint': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'City': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'AdministrativeArea': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'PostalCode': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Country': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'ElectronicMailAddress': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.ALLOWED_VALUES_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Value': ol.xml.makeObjectPropertyPusher(ol.format.OWS.readValue_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.CONSTRAINT_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'AllowedValues': ol.xml.makeObjectPropertySetter(
-          ol.format.OWS.readAllowedValues_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.CONTACT_INFO_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Phone': ol.xml.makeObjectPropertySetter(ol.format.OWS.readPhone_),
-      'Address': ol.xml.makeObjectPropertySetter(ol.format.OWS.readAddress_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.DCP_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'HTTP': ol.xml.makeObjectPropertySetter(ol.format.OWS.readHttp_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.HTTP_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Get': ol.xml.makeObjectPropertyPusher(ol.format.OWS.readGet_),
-      'Post': undefined // TODO
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.OPERATION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'DCP': ol.xml.makeObjectPropertySetter(ol.format.OWS.readDcp_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.OPERATIONS_METADATA_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Operation': ol.format.OWS.readOperation_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.PHONE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Voice': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Facsimile': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.REQUEST_METHOD_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Constraint': ol.xml.makeObjectPropertyPusher(
-          ol.format.OWS.readConstraint_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.SERVICE_CONTACT_PARSERS_ =
-    ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'IndividualName': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'PositionName': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'ContactInfo': ol.xml.makeObjectPropertySetter(
-          ol.format.OWS.readContactInfo_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.SERVICE_IDENTIFICATION_PARSERS_ =
-    ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Title': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'ServiceTypeVersion': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'ServiceType': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.SERVICE_PROVIDER_PARSERS_ =
-    ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'ProviderName': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'ProviderSite': ol.xml.makeObjectPropertySetter(ol.format.XLink.readHref),
-      'ServiceContact': ol.xml.makeObjectPropertySetter(
-          ol.format.OWS.readServiceContact_)
-    });
-
-goog.provide('ol.geom.flat.flip');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {Array.<number>=} opt_dest Destination.
- * @param {number=} opt_destOffset Destination offset.
- * @return {Array.<number>} Flat coordinates.
- */
-ol.geom.flat.flip.flipXY = function(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {
-  var dest, destOffset;
-  if (opt_dest !== undefined) {
-    dest = opt_dest;
-    destOffset = opt_destOffset !== undefined ? opt_destOffset : 0;
-  } else {
-    dest = [];
-    destOffset = 0;
-  }
-  var j = offset;
-  while (j < end) {
-    var x = flatCoordinates[j++];
-    dest[destOffset++] = flatCoordinates[j++];
-    dest[destOffset++] = x;
-    for (var k = 2; k < stride; ++k) {
-      dest[destOffset++] = flatCoordinates[j++];
-    }
-  }
-  dest.length = destOffset;
-  return dest;
-};
-
-goog.provide('ol.format.Polyline');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.TextFeature');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.flip');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the Encoded
- * Polyline Algorithm Format.
- *
- * @constructor
- * @extends {ol.format.TextFeature}
- * @param {olx.format.PolylineOptions=} opt_options
- *     Optional configuration object.
- * @api
- */
-ol.format.Polyline = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.TextFeature.call(this);
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get('EPSG:4326');
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.factor_ = options.factor ? options.factor : 1e5;
-
-  /**
-   * @private
-   * @type {ol.geom.GeometryLayout}
-   */
-  this.geometryLayout_ = options.geometryLayout ?
-      options.geometryLayout : ol.geom.GeometryLayout.XY;
-};
-ol.inherits(ol.format.Polyline, ol.format.TextFeature);
-
-
-/**
- * Encode a list of n-dimensional points and return an encoded string
- *
- * Attention: This function will modify the passed array!
- *
- * @param {Array.<number>} numbers A list of n-dimensional points.
- * @param {number} stride The number of dimension of the points in the list.
- * @param {number=} opt_factor The factor by which the numbers will be
- *     multiplied. The remaining decimal places will get rounded away.
- *     Default is `1e5`.
- * @return {string} The encoded string.
- * @api
- */
-ol.format.Polyline.encodeDeltas = function(numbers, stride, opt_factor) {
-  var factor = opt_factor ? opt_factor : 1e5;
-  var d;
-
-  var lastNumbers = new Array(stride);
-  for (d = 0; d < stride; ++d) {
-    lastNumbers[d] = 0;
-  }
-
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii;) {
-    for (d = 0; d < stride; ++d, ++i) {
-      var num = numbers[i];
-      var delta = num - lastNumbers[d];
-      lastNumbers[d] = num;
-
-      numbers[i] = delta;
-    }
-  }
-
-  return ol.format.Polyline.encodeFloats(numbers, factor);
-};
-
-
-/**
- * Decode a list of n-dimensional points from an encoded string
- *
- * @param {string} encoded An encoded string.
- * @param {number} stride The number of dimension of the points in the
- *     encoded string.
- * @param {number=} opt_factor The factor by which the resulting numbers will
- *     be divided. Default is `1e5`.
- * @return {Array.<number>} A list of n-dimensional points.
- * @api
- */
-ol.format.Polyline.decodeDeltas = function(encoded, stride, opt_factor) {
-  var factor = opt_factor ? opt_factor : 1e5;
-  var d;
-
-  /** @type {Array.<number>} */
-  var lastNumbers = new Array(stride);
-  for (d = 0; d < stride; ++d) {
-    lastNumbers[d] = 0;
-  }
-
-  var numbers = ol.format.Polyline.decodeFloats(encoded, factor);
-
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii;) {
-    for (d = 0; d < stride; ++d, ++i) {
-      lastNumbers[d] += numbers[i];
-
-      numbers[i] = lastNumbers[d];
-    }
-  }
-
-  return numbers;
-};
-
-
-/**
- * Encode a list of floating point numbers and return an encoded string
- *
- * Attention: This function will modify the passed array!
- *
- * @param {Array.<number>} numbers A list of floating point numbers.
- * @param {number=} opt_factor The factor by which the numbers will be
- *     multiplied. The remaining decimal places will get rounded away.
- *     Default is `1e5`.
- * @return {string} The encoded string.
- * @api
- */
-ol.format.Polyline.encodeFloats = function(numbers, opt_factor) {
-  var factor = opt_factor ? opt_factor : 1e5;
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii; ++i) {
-    numbers[i] = Math.round(numbers[i] * factor);
-  }
-
-  return ol.format.Polyline.encodeSignedIntegers(numbers);
-};
-
-
-/**
- * Decode a list of floating point numbers from an encoded string
- *
- * @param {string} encoded An encoded string.
- * @param {number=} opt_factor The factor by which the result will be divided.
- *     Default is `1e5`.
- * @return {Array.<number>} A list of floating point numbers.
- * @api
- */
-ol.format.Polyline.decodeFloats = function(encoded, opt_factor) {
-  var factor = opt_factor ? opt_factor : 1e5;
-  var numbers = ol.format.Polyline.decodeSignedIntegers(encoded);
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii; ++i) {
-    numbers[i] /= factor;
-  }
-  return numbers;
-};
-
-
-/**
- * Encode a list of signed integers and return an encoded string
- *
- * Attention: This function will modify the passed array!
- *
- * @param {Array.<number>} numbers A list of signed integers.
- * @return {string} The encoded string.
- */
-ol.format.Polyline.encodeSignedIntegers = function(numbers) {
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii; ++i) {
-    var num = numbers[i];
-    numbers[i] = (num < 0) ? ~(num << 1) : (num << 1);
-  }
-  return ol.format.Polyline.encodeUnsignedIntegers(numbers);
-};
-
-
-/**
- * Decode a list of signed integers from an encoded string
- *
- * @param {string} encoded An encoded string.
- * @return {Array.<number>} A list of signed integers.
- */
-ol.format.Polyline.decodeSignedIntegers = function(encoded) {
-  var numbers = ol.format.Polyline.decodeUnsignedIntegers(encoded);
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii; ++i) {
-    var num = numbers[i];
-    numbers[i] = (num & 1) ? ~(num >> 1) : (num >> 1);
-  }
-  return numbers;
-};
-
-
-/**
- * Encode a list of unsigned integers and return an encoded string
- *
- * @param {Array.<number>} numbers A list of unsigned integers.
- * @return {string} The encoded string.
- */
-ol.format.Polyline.encodeUnsignedIntegers = function(numbers) {
-  var encoded = '';
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii; ++i) {
-    encoded += ol.format.Polyline.encodeUnsignedInteger(numbers[i]);
-  }
-  return encoded;
-};
-
-
-/**
- * Decode a list of unsigned integers from an encoded string
- *
- * @param {string} encoded An encoded string.
- * @return {Array.<number>} A list of unsigned integers.
- */
-ol.format.Polyline.decodeUnsignedIntegers = function(encoded) {
-  var numbers = [];
-  var current = 0;
-  var shift = 0;
-  var i, ii;
-  for (i = 0, ii = encoded.length; i < ii; ++i) {
-    var b = encoded.charCodeAt(i) - 63;
-    current |= (b & 0x1f) << shift;
-    if (b < 0x20) {
-      numbers.push(current);
-      current = 0;
-      shift = 0;
-    } else {
-      shift += 5;
-    }
-  }
-  return numbers;
-};
-
-
-/**
- * Encode one single unsigned integer and return an encoded string
- *
- * @param {number} num Unsigned integer that should be encoded.
- * @return {string} The encoded string.
- */
-ol.format.Polyline.encodeUnsignedInteger = function(num) {
-  var value, encoded = '';
-  while (num >= 0x20) {
-    value = (0x20 | (num & 0x1f)) + 63;
-    encoded += String.fromCharCode(value);
-    num >>= 5;
-  }
-  value = num + 63;
-  encoded += String.fromCharCode(value);
-  return encoded;
-};
-
-
-/**
- * Read the feature from the Polyline source. The coordinates are assumed to be
- * in two dimensions and in latitude, longitude order.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.Polyline.prototype.readFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.readFeatureFromText = function(text, opt_options) {
-  var geometry = this.readGeometryFromText(text, opt_options);
-  return new ol.Feature(geometry);
-};
-
-
-/**
- * Read the feature from the source. As Polyline sources contain a single
- * feature, this will return the feature in an array.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.Polyline.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.readFeaturesFromText = function(text, opt_options) {
-  var feature = this.readFeatureFromText(text, opt_options);
-  return [feature];
-};
-
-
-/**
- * Read the geometry from the source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.geom.Geometry} Geometry.
- * @api
- */
-ol.format.Polyline.prototype.readGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.readGeometryFromText = function(text, opt_options) {
-  var stride = ol.geom.SimpleGeometry.getStrideForLayout(this.geometryLayout_);
-  var flatCoordinates = ol.format.Polyline.decodeDeltas(
-      text, stride, this.factor_);
-  ol.geom.flat.flip.flipXY(
-      flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);
-  var coordinates = ol.geom.flat.inflate.coordinates(
-      flatCoordinates, 0, flatCoordinates.length, stride);
-
-  return /** @type {ol.geom.Geometry} */ (
-      ol.format.Feature.transformWithOptions(
-          new ol.geom.LineString(coordinates, this.geometryLayout_), false,
-          this.adaptOptions(opt_options)));
-};
-
-
-/**
- * Read the projection from a Polyline source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.Polyline.prototype.readProjection;
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.writeFeatureText = function(feature, opt_options) {
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    return this.writeGeometryText(geometry, opt_options);
-  } else {
-    ol.asserts.assert(false, 40); // Expected `feature` to have a geometry
-    return '';
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.writeFeaturesText = function(features, opt_options) {
-  return this.writeFeatureText(features[0], opt_options);
-};
-
-
-/**
- * Write a single geometry in Polyline format.
- *
- * @function
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} Geometry.
- * @api
- */
-ol.format.Polyline.prototype.writeGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.writeGeometryText = function(geometry, opt_options) {
-  geometry = /** @type {ol.geom.LineString} */
-      (ol.format.Feature.transformWithOptions(
-          geometry, true, this.adaptOptions(opt_options)));
-  var flatCoordinates = geometry.getFlatCoordinates();
-  var stride = geometry.getStride();
-  ol.geom.flat.flip.flipXY(
-      flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);
-  return ol.format.Polyline.encodeDeltas(flatCoordinates, stride, this.factor_);
-};
-
-goog.provide('ol.format.TopoJSON');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.JSONFeature');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Feature format for reading data in the TopoJSON format.
- *
- * @constructor
- * @extends {ol.format.JSONFeature}
- * @param {olx.format.TopoJSONOptions=} opt_options Options.
- * @api
- */
-ol.format.TopoJSON = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.JSONFeature.call(this);
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.layerName_ = options.layerName;
-
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.layers_ = options.layers ? options.layers : null;
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get(
-      options.defaultDataProjection ?
-          options.defaultDataProjection : 'EPSG:4326');
-
-};
-ol.inherits(ol.format.TopoJSON, ol.format.JSONFeature);
-
-
-/**
- * Concatenate arcs into a coordinate array.
- * @param {Array.<number>} indices Indices of arcs to concatenate.  Negative
- *     values indicate arcs need to be reversed.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs (already
- *     transformed).
- * @return {Array.<ol.Coordinate>} Coordinates array.
- * @private
- */
-ol.format.TopoJSON.concatenateArcs_ = function(indices, arcs) {
-  /** @type {Array.<ol.Coordinate>} */
-  var coordinates = [];
-  var index, arc;
-  var i, ii;
-  var j, jj;
-  for (i = 0, ii = indices.length; i < ii; ++i) {
-    index = indices[i];
-    if (i > 0) {
-      // splicing together arcs, discard last point
-      coordinates.pop();
-    }
-    if (index >= 0) {
-      // forward arc
-      arc = arcs[index];
-    } else {
-      // reverse arc
-      arc = arcs[~index].slice().reverse();
-    }
-    coordinates.push.apply(coordinates, arc);
-  }
-  // provide fresh copies of coordinate arrays
-  for (j = 0, jj = coordinates.length; j < jj; ++j) {
-    coordinates[j] = coordinates[j].slice();
-  }
-  return coordinates;
-};
-
-
-/**
- * Create a point from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @return {ol.geom.Point} Geometry.
- * @private
- */
-ol.format.TopoJSON.readPointGeometry_ = function(object, scale, translate) {
-  var coordinates = object.coordinates;
-  if (scale && translate) {
-    ol.format.TopoJSON.transformVertex_(coordinates, scale, translate);
-  }
-  return new ol.geom.Point(coordinates);
-};
-
-
-/**
- * Create a multi-point from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @return {ol.geom.MultiPoint} Geometry.
- * @private
- */
-ol.format.TopoJSON.readMultiPointGeometry_ = function(object, scale,
-    translate) {
-  var coordinates = object.coordinates;
-  var i, ii;
-  if (scale && translate) {
-    for (i = 0, ii = coordinates.length; i < ii; ++i) {
-      ol.format.TopoJSON.transformVertex_(coordinates[i], scale, translate);
-    }
-  }
-  return new ol.geom.MultiPoint(coordinates);
-};
-
-
-/**
- * Create a linestring from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @return {ol.geom.LineString} Geometry.
- * @private
- */
-ol.format.TopoJSON.readLineStringGeometry_ = function(object, arcs) {
-  var coordinates = ol.format.TopoJSON.concatenateArcs_(object.arcs, arcs);
-  return new ol.geom.LineString(coordinates);
-};
-
-
-/**
- * Create a multi-linestring from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @return {ol.geom.MultiLineString} Geometry.
- * @private
- */
-ol.format.TopoJSON.readMultiLineStringGeometry_ = function(object, arcs) {
-  var coordinates = [];
-  var i, ii;
-  for (i = 0, ii = object.arcs.length; i < ii; ++i) {
-    coordinates[i] = ol.format.TopoJSON.concatenateArcs_(object.arcs[i], arcs);
-  }
-  return new ol.geom.MultiLineString(coordinates);
-};
-
-
-/**
- * Create a polygon from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @return {ol.geom.Polygon} Geometry.
- * @private
- */
-ol.format.TopoJSON.readPolygonGeometry_ = function(object, arcs) {
-  var coordinates = [];
-  var i, ii;
-  for (i = 0, ii = object.arcs.length; i < ii; ++i) {
-    coordinates[i] = ol.format.TopoJSON.concatenateArcs_(object.arcs[i], arcs);
-  }
-  return new ol.geom.Polygon(coordinates);
-};
-
-
-/**
- * Create a multi-polygon from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @return {ol.geom.MultiPolygon} Geometry.
- * @private
- */
-ol.format.TopoJSON.readMultiPolygonGeometry_ = function(object, arcs) {
-  var coordinates = [];
-  var polyArray, ringCoords, j, jj;
-  var i, ii;
-  for (i = 0, ii = object.arcs.length; i < ii; ++i) {
-    // for each polygon
-    polyArray = object.arcs[i];
-    ringCoords = [];
-    for (j = 0, jj = polyArray.length; j < jj; ++j) {
-      // for each ring
-      ringCoords[j] = ol.format.TopoJSON.concatenateArcs_(polyArray[j], arcs);
-    }
-    coordinates[i] = ringCoords;
-  }
-  return new ol.geom.MultiPolygon(coordinates);
-};
-
-
-/**
- * Create features from a TopoJSON GeometryCollection object.
- *
- * @param {TopoJSONGeometryCollection} collection TopoJSON Geometry
- *     object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @param {string|undefined} property Property to set the `GeometryCollection`'s parent
- *     object to.
- * @param {string} name Name of the `Topology`'s child object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Array of features.
- * @private
- */
-ol.format.TopoJSON.readFeaturesFromGeometryCollection_ = function(
-    collection, arcs, scale, translate, property, name, opt_options) {
-  var geometries = collection.geometries;
-  var features = [];
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    features[i] = ol.format.TopoJSON.readFeatureFromGeometry_(
-        geometries[i], arcs, scale, translate, property, name, opt_options);
-  }
-  return features;
-};
-
-
-/**
- * Create a feature from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON geometry object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @param {string|undefined} property Property to set the `GeometryCollection`'s parent
- *     object to.
- * @param {string} name Name of the `Topology`'s child object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @private
- */
-ol.format.TopoJSON.readFeatureFromGeometry_ = function(object, arcs,
-    scale, translate, property, name, opt_options) {
-  var geometry;
-  var type = object.type;
-  var geometryReader = ol.format.TopoJSON.GEOMETRY_READERS_[type];
-  if ((type === 'Point') || (type === 'MultiPoint')) {
-    geometry = geometryReader(object, scale, translate);
-  } else {
-    geometry = geometryReader(object, arcs);
-  }
-  var feature = new ol.Feature();
-  feature.setGeometry(/** @type {ol.geom.Geometry} */ (
-      ol.format.Feature.transformWithOptions(geometry, false, opt_options)));
-  if (object.id !== undefined) {
-    feature.setId(object.id);
-  }
-  var properties = object.properties;
-  if (property) {
-    if (!properties) {
-      properties = {};
-    }
-    properties[property] = name;
-  }
-  if (properties) {
-    feature.setProperties(properties);
-  }
-  return feature;
-};
-
-
-/**
- * Read all features from a TopoJSON source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.TopoJSON.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.TopoJSON.prototype.readFeaturesFromObject = function(
-    object, opt_options) {
-  if (object.type == 'Topology') {
-    var topoJSONTopology = /** @type {TopoJSONTopology} */ (object);
-    var transform, scale = null, translate = null;
-    if (topoJSONTopology.transform) {
-      transform = topoJSONTopology.transform;
-      scale = transform.scale;
-      translate = transform.translate;
-    }
-    var arcs = topoJSONTopology.arcs;
-    if (transform) {
-      ol.format.TopoJSON.transformArcs_(arcs, scale, translate);
-    }
-    /** @type {Array.<ol.Feature>} */
-    var features = [];
-    var topoJSONFeatures = topoJSONTopology.objects;
-    var property = this.layerName_;
-    var objectName, feature;
-    for (objectName in topoJSONFeatures) {
-      if (this.layers_ && this.layers_.indexOf(objectName) == -1) {
-        continue;
-      }
-      if (topoJSONFeatures[objectName].type === 'GeometryCollection') {
-        feature = /** @type {TopoJSONGeometryCollection} */
-            (topoJSONFeatures[objectName]);
-        features.push.apply(features,
-            ol.format.TopoJSON.readFeaturesFromGeometryCollection_(
-                feature, arcs, scale, translate, property, objectName, opt_options));
-      } else {
-        feature = /** @type {TopoJSONGeometry} */
-            (topoJSONFeatures[objectName]);
-        features.push(ol.format.TopoJSON.readFeatureFromGeometry_(
-            feature, arcs, scale, translate, property, objectName, opt_options));
-      }
-    }
-    return features;
-  } else {
-    return [];
-  }
-};
-
-
-/**
- * Apply a linear transform to array of arcs.  The provided array of arcs is
- * modified in place.
- *
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @private
- */
-ol.format.TopoJSON.transformArcs_ = function(arcs, scale, translate) {
-  var i, ii;
-  for (i = 0, ii = arcs.length; i < ii; ++i) {
-    ol.format.TopoJSON.transformArc_(arcs[i], scale, translate);
-  }
-};
-
-
-/**
- * Apply a linear transform to an arc.  The provided arc is modified in place.
- *
- * @param {Array.<ol.Coordinate>} arc Arc.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @private
- */
-ol.format.TopoJSON.transformArc_ = function(arc, scale, translate) {
-  var x = 0;
-  var y = 0;
-  var vertex;
-  var i, ii;
-  for (i = 0, ii = arc.length; i < ii; ++i) {
-    vertex = arc[i];
-    x += vertex[0];
-    y += vertex[1];
-    vertex[0] = x;
-    vertex[1] = y;
-    ol.format.TopoJSON.transformVertex_(vertex, scale, translate);
-  }
-};
-
-
-/**
- * Apply a linear transform to a vertex.  The provided vertex is modified in
- * place.
- *
- * @param {ol.Coordinate} vertex Vertex.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @private
- */
-ol.format.TopoJSON.transformVertex_ = function(vertex, scale, translate) {
-  vertex[0] = vertex[0] * scale[0] + translate[0];
-  vertex[1] = vertex[1] * scale[1] + translate[1];
-};
-
-
-/**
- * Read the projection from a TopoJSON source.
- *
- * @param {Document|Node|Object|string} object Source.
- * @return {ol.proj.Projection} Projection.
- * @override
- * @api
- */
-ol.format.TopoJSON.prototype.readProjection;
-
-
-/**
- * @inheritDoc
- */
-ol.format.TopoJSON.prototype.readProjectionFromObject = function(object) {
-  return this.defaultDataProjection;
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<string, function(TopoJSONGeometry, Array, ...Array): ol.geom.Geometry>}
- */
-ol.format.TopoJSON.GEOMETRY_READERS_ = {
-  'Point': ol.format.TopoJSON.readPointGeometry_,
-  'LineString': ol.format.TopoJSON.readLineStringGeometry_,
-  'Polygon': ol.format.TopoJSON.readPolygonGeometry_,
-  'MultiPoint': ol.format.TopoJSON.readMultiPointGeometry_,
-  'MultiLineString': ol.format.TopoJSON.readMultiLineStringGeometry_,
-  'MultiPolygon': ol.format.TopoJSON.readMultiPolygonGeometry_
-};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.TopoJSON.prototype.writeFeatureObject = function(feature, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.TopoJSON.prototype.writeFeaturesObject = function(features, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.TopoJSON.prototype.writeGeometryObject = function(geometry, opt_options) {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.TopoJSON.prototype.readGeometryFromObject = function() {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.TopoJSON.prototype.readFeatureFromObject = function() {};
-
-goog.provide('ol.format.WFS');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.format.GML2');
-goog.require('ol.format.GML3');
-goog.require('ol.format.GMLBase');
-goog.require('ol.format.filter');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.format.XSD');
-goog.require('ol.geom.Geometry');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the WFS format.
- * By default, supports WFS version 1.1.0. You can pass a GML format
- * as option if you want to read a WFS that contains GML2 (WFS 1.0.0).
- * Also see {@link ol.format.GMLBase} which is used by this format.
- *
- * @constructor
- * @param {olx.format.WFSOptions=} opt_options
- *     Optional configuration object.
- * @extends {ol.format.XMLFeature}
- * @api
- */
-ol.format.WFS = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {Array.<string>|string|undefined}
-   */
-  this.featureType_ = options.featureType;
-
-  /**
-   * @private
-   * @type {Object.<string, string>|string|undefined}
-   */
-  this.featureNS_ = options.featureNS;
-
-  /**
-   * @private
-   * @type {ol.format.GMLBase}
-   */
-  this.gmlFormat_ = options.gmlFormat ?
-      options.gmlFormat : new ol.format.GML3();
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.schemaLocation_ = options.schemaLocation ?
-      options.schemaLocation :
-          ol.format.WFS.SCHEMA_LOCATIONS[ol.format.WFS.DEFAULT_VERSION];
-
-  ol.format.XMLFeature.call(this);
-};
-ol.inherits(ol.format.WFS, ol.format.XMLFeature);
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.FEATURE_PREFIX = 'feature';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.XMLNS = 'http://www.w3.org/2000/xmlns/';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.OGCNS = 'http://www.opengis.net/ogc';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.WFSNS = 'http://www.opengis.net/wfs';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.FESNS = 'http://www.opengis.net/fes';
-
-
-/**
- * @const
- * @type {Object.<string, string>}
- */
-ol.format.WFS.SCHEMA_LOCATIONS = {
-  '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'
-};
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.DEFAULT_VERSION = '1.1.0';
-
-
-/**
- * Read all features from a WFS FeatureCollection.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.WFS.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WFS.prototype.readFeaturesFromNode = function(node, opt_options) {
-  var context = /** @type {ol.XmlNodeStackItem} */ ({
-    'featureType': this.featureType_,
-    'featureNS': this.featureNS_
-  });
-  ol.obj.assign(context, this.getReadOptions(node,
-      opt_options ? opt_options : {}));
-  var objectStack = [context];
-  this.gmlFormat_.FEATURE_COLLECTION_PARSERS[ol.format.GMLBase.GMLNS][
-      'featureMember'] =
-      ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readFeaturesInternal);
-  var features = ol.xml.pushParseAndPop([],
-      this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node,
-      objectStack, this.gmlFormat_);
-  if (!features) {
-    features = [];
-  }
-  return features;
-};
-
-
-/**
- * Read transaction response of the source.
- *
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.WFSTransactionResponse|undefined} Transaction response.
- * @api
- */
-ol.format.WFS.prototype.readTransactionResponse = function(source) {
-  if (ol.xml.isDocument(source)) {
-    return this.readTransactionResponseFromDocument(
-        /** @type {Document} */ (source));
-  } else if (ol.xml.isNode(source)) {
-    return this.readTransactionResponseFromNode(/** @type {Node} */ (source));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readTransactionResponseFromDocument(doc);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * Read feature collection metadata of the source.
- *
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.WFSFeatureCollectionMetadata|undefined}
- *     FeatureCollection metadata.
- * @api
- */
-ol.format.WFS.prototype.readFeatureCollectionMetadata = function(source) {
-  if (ol.xml.isDocument(source)) {
-    return this.readFeatureCollectionMetadataFromDocument(
-        /** @type {Document} */ (source));
-  } else if (ol.xml.isNode(source)) {
-    return this.readFeatureCollectionMetadataFromNode(
-        /** @type {Node} */ (source));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readFeatureCollectionMetadataFromDocument(doc);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @return {ol.WFSFeatureCollectionMetadata|undefined}
- *     FeatureCollection metadata.
- */
-ol.format.WFS.prototype.readFeatureCollectionMetadataFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readFeatureCollectionMetadataFromNode(n);
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WFS.FEATURE_COLLECTION_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'boundedBy': ol.xml.makeObjectPropertySetter(
-        ol.format.GMLBase.prototype.readGeometryElement, 'bounds')
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {ol.WFSFeatureCollectionMetadata|undefined}
- *     FeatureCollection metadata.
- */
-ol.format.WFS.prototype.readFeatureCollectionMetadataFromNode = function(node) {
-  var result = {};
-  var value = ol.format.XSD.readNonNegativeIntegerString(
-      node.getAttribute('numberOfFeatures'));
-  result['numberOfFeatures'] = value;
-  return ol.xml.pushParseAndPop(
-      /** @type {ol.WFSFeatureCollectionMetadata} */ (result),
-      ol.format.WFS.FEATURE_COLLECTION_PARSERS_, node, [], this.gmlFormat_);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WFS.TRANSACTION_SUMMARY_PARSERS_ = {
-  'http://www.opengis.net/wfs': {
-    'totalInserted': ol.xml.makeObjectPropertySetter(
-        ol.format.XSD.readNonNegativeInteger),
-    'totalUpdated': ol.xml.makeObjectPropertySetter(
-        ol.format.XSD.readNonNegativeInteger),
-    'totalDeleted': ol.xml.makeObjectPropertySetter(
-        ol.format.XSD.readNonNegativeInteger)
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Transaction Summary.
- * @private
- */
-ol.format.WFS.readTransactionSummary_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WFS.TRANSACTION_SUMMARY_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WFS.OGC_FID_PARSERS_ = {
-  'http://www.opengis.net/ogc': {
-    'FeatureId': ol.xml.makeArrayPusher(function(node, objectStack) {
-      return node.getAttribute('fid');
-    })
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.WFS.fidParser_ = function(node, objectStack) {
-  ol.xml.parseNode(ol.format.WFS.OGC_FID_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WFS.INSERT_RESULTS_PARSERS_ = {
-  'http://www.opengis.net/wfs': {
-    'Feature': ol.format.WFS.fidParser_
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Array.<string>|undefined} Insert results.
- * @private
- */
-ol.format.WFS.readInsertResults_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      [], ol.format.WFS.INSERT_RESULTS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WFS.TRANSACTION_RESPONSE_PARSERS_ = {
-  'http://www.opengis.net/wfs': {
-    'TransactionSummary': ol.xml.makeObjectPropertySetter(
-        ol.format.WFS.readTransactionSummary_, 'transactionSummary'),
-    'InsertResults': ol.xml.makeObjectPropertySetter(
-        ol.format.WFS.readInsertResults_, 'insertIds')
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @return {ol.WFSTransactionResponse|undefined} Transaction response.
- */
-ol.format.WFS.prototype.readTransactionResponseFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readTransactionResponseFromNode(n);
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {ol.WFSTransactionResponse|undefined} Transaction response.
- */
-ol.format.WFS.prototype.readTransactionResponseFromNode = function(node) {
-  return ol.xml.pushParseAndPop(
-      /** @type {ol.WFSTransactionResponse} */({}),
-      ol.format.WFS.TRANSACTION_RESPONSE_PARSERS_, node, []);
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.WFS.QUERY_SERIALIZERS_ = {
-  'http://www.opengis.net/wfs': {
-    'PropertyName': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode)
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeFeature_ = function(node, feature, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var featureType = context['featureType'];
-  var featureNS = context['featureNS'];
-  var gmlVersion = context['gmlVersion'];
-  var child = ol.xml.createElementNS(featureNS, featureType);
-  node.appendChild(child);
-  if (gmlVersion === 2) {
-    ol.format.GML2.prototype.writeFeatureElement(child, feature, objectStack);
-  } else {
-    ol.format.GML3.prototype.writeFeatureElement(child, feature, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {number|string} fid Feature identifier.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeOgcFidFilter_ = function(node, fid, objectStack) {
-  var filter = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'Filter');
-  var child = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'FeatureId');
-  filter.appendChild(child);
-  child.setAttribute('fid', fid);
-  node.appendChild(filter);
-};
-
-
-/**
- * @param {string|undefined} featurePrefix The prefix of the feature.
- * @param {string} featureType The type of the feature.
- * @returns {string} The value of the typeName property.
- * @private
- */
-ol.format.WFS.getTypeName_ = function(featurePrefix, featureType) {
-  featurePrefix = featurePrefix ? featurePrefix :
-      ol.format.WFS.FEATURE_PREFIX;
-  var prefix = featurePrefix + ':';
-  // The featureType already contains the prefix.
-  if (featureType.indexOf(prefix) === 0) {
-    return featureType;
-  } else {
-    return prefix + featureType;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeDelete_ = function(node, feature, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  ol.asserts.assert(feature.getId() !== undefined, 26); // Features must have an id set
-  var featureType = context['featureType'];
-  var featurePrefix = context['featurePrefix'];
-  var featureNS = context['featureNS'];
-  var typeName = ol.format.WFS.getTypeName_(featurePrefix, featureType);
-  node.setAttribute('typeName', typeName);
-  ol.xml.setAttributeNS(node, ol.format.WFS.XMLNS, 'xmlns:' + featurePrefix,
-      featureNS);
-  var fid = feature.getId();
-  if (fid !== undefined) {
-    ol.format.WFS.writeOgcFidFilter_(node, fid, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeUpdate_ = function(node, feature, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  ol.asserts.assert(feature.getId() !== undefined, 27); // Features must have an id set
-  var featureType = context['featureType'];
-  var featurePrefix = context['featurePrefix'];
-  var featureNS = context['featureNS'];
-  var typeName = ol.format.WFS.getTypeName_(featurePrefix, featureType);
-  node.setAttribute('typeName', typeName);
-  ol.xml.setAttributeNS(node, ol.format.WFS.XMLNS, 'xmlns:' + featurePrefix,
-      featureNS);
-  var fid = feature.getId();
-  if (fid !== undefined) {
-    var keys = feature.getKeys();
-    var values = [];
-    for (var i = 0, ii = keys.length; i < ii; i++) {
-      var value = feature.get(keys[i]);
-      if (value !== undefined) {
-        values.push({name: keys[i], value: value});
-      }
-    }
-    ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */ (
-      {'gmlVersion': context['gmlVersion'], node: node,
-        'hasZ': context['hasZ'], 'srsName': context['srsName']}),
-        ol.format.WFS.TRANSACTION_SERIALIZERS_,
-        ol.xml.makeSimpleNodeFactory('Property'), values,
-        objectStack);
-    ol.format.WFS.writeOgcFidFilter_(node, fid, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Object} pair Property name and value.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeProperty_ = function(node, pair, objectStack) {
-  var name = ol.xml.createElementNS(ol.format.WFS.WFSNS, 'Name');
-  var context = objectStack[objectStack.length - 1];
-  var gmlVersion = context['gmlVersion'];
-  node.appendChild(name);
-  ol.format.XSD.writeStringTextNode(name, pair.name);
-  if (pair.value !== undefined && pair.value !== null) {
-    var value = ol.xml.createElementNS(ol.format.WFS.WFSNS, 'Value');
-    node.appendChild(value);
-    if (pair.value instanceof ol.geom.Geometry) {
-      if (gmlVersion === 2) {
-        ol.format.GML2.prototype.writeGeometryElement(value,
-            pair.value, objectStack);
-      } else {
-        ol.format.GML3.prototype.writeGeometryElement(value,
-            pair.value, objectStack);
-      }
-    } else {
-      ol.format.XSD.writeStringTextNode(value, pair.value);
-    }
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {{vendorId: string, safeToIgnore: boolean, value: string}}
- *     nativeElement The native element.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeNative_ = function(node, nativeElement, objectStack) {
-  if (nativeElement.vendorId) {
-    node.setAttribute('vendorId', nativeElement.vendorId);
-  }
-  if (nativeElement.safeToIgnore !== undefined) {
-    node.setAttribute('safeToIgnore', nativeElement.safeToIgnore);
-  }
-  if (nativeElement.value !== undefined) {
-    ol.format.XSD.writeStringTextNode(node, nativeElement.value);
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.WFS.TRANSACTION_SERIALIZERS_ = {
-  'http://www.opengis.net/wfs': {
-    'Insert': ol.xml.makeChildAppender(ol.format.WFS.writeFeature_),
-    'Update': ol.xml.makeChildAppender(ol.format.WFS.writeUpdate_),
-    'Delete': ol.xml.makeChildAppender(ol.format.WFS.writeDelete_),
-    'Property': ol.xml.makeChildAppender(ol.format.WFS.writeProperty_),
-    'Native': ol.xml.makeChildAppender(ol.format.WFS.writeNative_)
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {string} featureType Feature type.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeQuery_ = function(node, featureType, objectStack) {
-  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var featurePrefix = context['featurePrefix'];
-  var featureNS = context['featureNS'];
-  var propertyNames = context['propertyNames'];
-  var srsName = context['srsName'];
-  var typeName;
-  // If feature prefix is not defined, we must not use the default prefix.
-  if (featurePrefix) {
-    typeName = ol.format.WFS.getTypeName_(featurePrefix, featureType);
-  } else {
-    typeName = featureType;
-  }
-  node.setAttribute('typeName', typeName);
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  if (featureNS) {
-    ol.xml.setAttributeNS(node, ol.format.WFS.XMLNS, 'xmlns:' + featurePrefix,
-        featureNS);
-  }
-  var item = /** @type {ol.XmlNodeStackItem} */ (ol.obj.assign({}, context));
-  item.node = node;
-  ol.xml.pushSerializeAndPop(item,
-      ol.format.WFS.QUERY_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory('PropertyName'), propertyNames,
-      objectStack);
-  var filter = context['filter'];
-  if (filter) {
-    var child = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'Filter');
-    node.appendChild(child);
-    ol.format.WFS.writeFilterCondition_(child, filter, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Filter} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeFilterCondition_ = function(node, filter, objectStack) {
-  /** @type {ol.XmlNodeStackItem} */
-  var item = {node: node};
-  ol.xml.pushSerializeAndPop(item,
-      ol.format.WFS.GETFEATURE_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory(filter.getTagName()),
-      [filter], objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Bbox} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeBboxFilter_ = function(node, filter, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  context['srsName'] = filter.srsName;
-
-  ol.format.WFS.writeOgcPropertyName_(node, filter.geometryName);
-  ol.format.GML3.prototype.writeGeometryElement(node, filter.extent, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Intersects} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeIntersectsFilter_ = function(node, filter, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  context['srsName'] = filter.srsName;
-
-  ol.format.WFS.writeOgcPropertyName_(node, filter.geometryName);
-  ol.format.GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Within} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeWithinFilter_ = function(node, filter, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  context['srsName'] = filter.srsName;
-
-  ol.format.WFS.writeOgcPropertyName_(node, filter.geometryName);
-  ol.format.GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.During} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeDuringFilter_ = function(node, filter, objectStack) {
-
-  var valueReference = ol.xml.createElementNS(ol.format.WFS.FESNS, 'ValueReference');
-  ol.format.XSD.writeStringTextNode(valueReference, filter.propertyName);
-  node.appendChild(valueReference);
-
-  var timePeriod = ol.xml.createElementNS(ol.format.GMLBase.GMLNS, 'TimePeriod');
-
-  node.appendChild(timePeriod);
-
-  var begin = ol.xml.createElementNS(ol.format.GMLBase.GMLNS, 'begin');
-  timePeriod.appendChild(begin);
-  ol.format.WFS.writeTimeInstant_(begin, filter.begin);
-
-  var end = ol.xml.createElementNS(ol.format.GMLBase.GMLNS, 'end');
-  timePeriod.appendChild(end);
-  ol.format.WFS.writeTimeInstant_(end, filter.end);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.LogicalNary} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeLogicalFilter_ = function(node, filter, objectStack) {
-  /** @type {ol.XmlNodeStackItem} */
-  var item = {node: node};
-  filter.conditions.forEach(function(condition) {
-    ol.xml.pushSerializeAndPop(item,
-        ol.format.WFS.GETFEATURE_SERIALIZERS_,
-        ol.xml.makeSimpleNodeFactory(condition.getTagName()),
-        [condition], objectStack);
-  });
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Not} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeNotFilter_ = function(node, filter, objectStack) {
-  /** @type {ol.XmlNodeStackItem} */
-  var item = {node: node};
-  var condition = filter.condition;
-  ol.xml.pushSerializeAndPop(item,
-      ol.format.WFS.GETFEATURE_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory(condition.getTagName()),
-      [condition], objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.ComparisonBinary} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeComparisonFilter_ = function(node, filter, objectStack) {
-  if (filter.matchCase !== undefined) {
-    node.setAttribute('matchCase', filter.matchCase.toString());
-  }
-  ol.format.WFS.writeOgcPropertyName_(node, filter.propertyName);
-  ol.format.WFS.writeOgcLiteral_(node, '' + filter.expression);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.IsNull} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeIsNullFilter_ = function(node, filter, objectStack) {
-  ol.format.WFS.writeOgcPropertyName_(node, filter.propertyName);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.IsBetween} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeIsBetweenFilter_ = function(node, filter, objectStack) {
-  ol.format.WFS.writeOgcPropertyName_(node, filter.propertyName);
-
-  var lowerBoundary = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'LowerBoundary');
-  node.appendChild(lowerBoundary);
-  ol.format.WFS.writeOgcLiteral_(lowerBoundary, '' + filter.lowerBoundary);
-
-  var upperBoundary = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'UpperBoundary');
-  node.appendChild(upperBoundary);
-  ol.format.WFS.writeOgcLiteral_(upperBoundary, '' + filter.upperBoundary);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.IsLike} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeIsLikeFilter_ = function(node, filter, objectStack) {
-  node.setAttribute('wildCard', filter.wildCard);
-  node.setAttribute('singleChar', filter.singleChar);
-  node.setAttribute('escapeChar', filter.escapeChar);
-  if (filter.matchCase !== undefined) {
-    node.setAttribute('matchCase', filter.matchCase.toString());
-  }
-  ol.format.WFS.writeOgcPropertyName_(node, filter.propertyName);
-  ol.format.WFS.writeOgcLiteral_(node, '' + filter.pattern);
-};
-
-
-/**
- * @param {string} tagName Tag name.
- * @param {Node} node Node.
- * @param {string} value Value.
- * @private
- */
-ol.format.WFS.writeOgcExpression_ = function(tagName, node, value) {
-  var property = ol.xml.createElementNS(ol.format.WFS.OGCNS, tagName);
-  ol.format.XSD.writeStringTextNode(property, value);
-  node.appendChild(property);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {string} value PropertyName value.
- * @private
- */
-ol.format.WFS.writeOgcPropertyName_ = function(node, value) {
-  ol.format.WFS.writeOgcExpression_('PropertyName', node, value);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {string} value PropertyName value.
- * @private
- */
-ol.format.WFS.writeOgcLiteral_ = function(node, value) {
-  ol.format.WFS.writeOgcExpression_('Literal', node, value);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {string} time PropertyName value.
- * @private
- */
-ol.format.WFS.writeTimeInstant_ = function(node, time) {
-  var timeInstant = ol.xml.createElementNS(ol.format.GMLBase.GMLNS, 'TimeInstant');
-  node.appendChild(timeInstant);
-
-  var timePosition = ol.xml.createElementNS(ol.format.GMLBase.GMLNS, 'timePosition');
-  timeInstant.appendChild(timePosition);
-  ol.format.XSD.writeStringTextNode(timePosition, time);
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.WFS.GETFEATURE_SERIALIZERS_ = {
-  'http://www.opengis.net/wfs': {
-    'Query': ol.xml.makeChildAppender(ol.format.WFS.writeQuery_)
-  },
-  'http://www.opengis.net/ogc': {
-    'During': ol.xml.makeChildAppender(ol.format.WFS.writeDuringFilter_),
-    'And': ol.xml.makeChildAppender(ol.format.WFS.writeLogicalFilter_),
-    'Or': ol.xml.makeChildAppender(ol.format.WFS.writeLogicalFilter_),
-    'Not': ol.xml.makeChildAppender(ol.format.WFS.writeNotFilter_),
-    'BBOX': ol.xml.makeChildAppender(ol.format.WFS.writeBboxFilter_),
-    'Intersects': ol.xml.makeChildAppender(ol.format.WFS.writeIntersectsFilter_),
-    'Within': ol.xml.makeChildAppender(ol.format.WFS.writeWithinFilter_),
-    'PropertyIsEqualTo': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsNotEqualTo': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsLessThan': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsLessThanOrEqualTo': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsGreaterThan': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsGreaterThanOrEqualTo': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsNull': ol.xml.makeChildAppender(ol.format.WFS.writeIsNullFilter_),
-    'PropertyIsBetween': ol.xml.makeChildAppender(ol.format.WFS.writeIsBetweenFilter_),
-    'PropertyIsLike': ol.xml.makeChildAppender(ol.format.WFS.writeIsLikeFilter_)
-  }
-};
-
-
-/**
- * Encode filter as WFS `Filter` and return the Node.
- *
- * @param {ol.format.filter.Filter} filter Filter.
- * @return {Node} Result.
- * @api
- */
-ol.format.WFS.writeFilter = function(filter) {
-  var child = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'Filter');
-  ol.format.WFS.writeFilterCondition_(child, filter, []);
-  return child;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<string>} featureTypes Feature types.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeGetFeature_ = function(node, featureTypes, objectStack) {
-  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var item = /** @type {ol.XmlNodeStackItem} */ (ol.obj.assign({}, context));
-  item.node = node;
-  ol.xml.pushSerializeAndPop(item,
-      ol.format.WFS.GETFEATURE_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory('Query'), featureTypes,
-      objectStack);
-};
-
-
-/**
- * Encode format as WFS `GetFeature` and return the Node.
- *
- * @param {olx.format.WFSWriteGetFeatureOptions} options Options.
- * @return {Node} Result.
- * @api
- */
-ol.format.WFS.prototype.writeGetFeature = function(options) {
-  var node = ol.xml.createElementNS(ol.format.WFS.WFSNS, 'GetFeature');
-  node.setAttribute('service', 'WFS');
-  node.setAttribute('version', '1.1.0');
-  var filter;
-  if (options) {
-    if (options.handle) {
-      node.setAttribute('handle', options.handle);
-    }
-    if (options.outputFormat) {
-      node.setAttribute('outputFormat', options.outputFormat);
-    }
-    if (options.maxFeatures !== undefined) {
-      node.setAttribute('maxFeatures', options.maxFeatures);
-    }
-    if (options.resultType) {
-      node.setAttribute('resultType', options.resultType);
-    }
-    if (options.startIndex !== undefined) {
-      node.setAttribute('startIndex', options.startIndex);
-    }
-    if (options.count !== undefined) {
-      node.setAttribute('count', options.count);
-    }
-    filter = options.filter;
-    if (options.bbox) {
-      ol.asserts.assert(options.geometryName,
-          12); // `options.geometryName` must also be provided when `options.bbox` is set
-      var bbox = ol.format.filter.bbox(
-          /** @type {string} */ (options.geometryName), options.bbox, options.srsName);
-      if (filter) {
-        // if bbox and filter are both set, combine the two into a single filter
-        filter = ol.format.filter.and(filter, bbox);
-      } else {
-        filter = bbox;
-      }
-    }
-  }
-  ol.xml.setAttributeNS(node, 'http://www.w3.org/2001/XMLSchema-instance',
-      'xsi:schemaLocation', this.schemaLocation_);
-  /** @type {ol.XmlNodeStackItem} */
-  var context = {
-    node: node,
-    'srsName': options.srsName,
-    'featureNS': options.featureNS ? options.featureNS : this.featureNS_,
-    'featurePrefix': options.featurePrefix,
-    'geometryName': options.geometryName,
-    'filter': filter,
-    'propertyNames': options.propertyNames ? options.propertyNames : []
-  };
-  ol.asserts.assert(Array.isArray(options.featureTypes),
-      11); // `options.featureTypes` should be an Array
-  ol.format.WFS.writeGetFeature_(node, /** @type {!Array.<string>} */ (options.featureTypes), [context]);
-  return node;
-};
-
-
-/**
- * Encode format as WFS `Transaction` and return the Node.
- *
- * @param {Array.<ol.Feature>} inserts The features to insert.
- * @param {Array.<ol.Feature>} updates The features to update.
- * @param {Array.<ol.Feature>} deletes The features to delete.
- * @param {olx.format.WFSWriteTransactionOptions} options Write options.
- * @return {Node} Result.
- * @api
- */
-ol.format.WFS.prototype.writeTransaction = function(inserts, updates, deletes,
-    options) {
-  var objectStack = [];
-  var node = ol.xml.createElementNS(ol.format.WFS.WFSNS, 'Transaction');
-  var version = options.version ?
-        options.version : ol.format.WFS.DEFAULT_VERSION;
-  var gmlVersion = version === '1.0.0' ? 2 : 3;
-  node.setAttribute('service', 'WFS');
-  node.setAttribute('version', version);
-  var baseObj;
-  /** @type {ol.XmlNodeStackItem} */
-  var obj;
-  if (options) {
-    baseObj = options.gmlOptions ? options.gmlOptions : {};
-    if (options.handle) {
-      node.setAttribute('handle', options.handle);
-    }
-  }
-  var schemaLocation = ol.format.WFS.SCHEMA_LOCATIONS[version];
-  ol.xml.setAttributeNS(node, 'http://www.w3.org/2001/XMLSchema-instance',
-      'xsi:schemaLocation', schemaLocation);
-  if (inserts) {
-    obj = {node: node, 'featureNS': options.featureNS,
-      'featureType': options.featureType, 'featurePrefix': options.featurePrefix,
-      'gmlVersion': gmlVersion, 'hasZ': options.hasZ, 'srsName': options.srsName};
-    ol.obj.assign(obj, baseObj);
-    ol.xml.pushSerializeAndPop(obj,
-        ol.format.WFS.TRANSACTION_SERIALIZERS_,
-        ol.xml.makeSimpleNodeFactory('Insert'), inserts,
-        objectStack);
-  }
-  if (updates) {
-    obj = {node: node, 'featureNS': options.featureNS,
-      'featureType': options.featureType, 'featurePrefix': options.featurePrefix,
-      'gmlVersion': gmlVersion, 'hasZ': options.hasZ, 'srsName': options.srsName};
-    ol.obj.assign(obj, baseObj);
-    ol.xml.pushSerializeAndPop(obj,
-        ol.format.WFS.TRANSACTION_SERIALIZERS_,
-        ol.xml.makeSimpleNodeFactory('Update'), updates,
-        objectStack);
-  }
-  if (deletes) {
-    ol.xml.pushSerializeAndPop({node: node, 'featureNS': options.featureNS,
-      'featureType': options.featureType, 'featurePrefix': options.featurePrefix,
-      'gmlVersion': gmlVersion, 'srsName': options.srsName},
-    ol.format.WFS.TRANSACTION_SERIALIZERS_,
-    ol.xml.makeSimpleNodeFactory('Delete'), deletes,
-    objectStack);
-  }
-  if (options.nativeElements) {
-    ol.xml.pushSerializeAndPop({node: node, 'featureNS': options.featureNS,
-      'featureType': options.featureType, 'featurePrefix': options.featurePrefix,
-      'gmlVersion': gmlVersion, 'srsName': options.srsName},
-    ol.format.WFS.TRANSACTION_SERIALIZERS_,
-    ol.xml.makeSimpleNodeFactory('Native'), options.nativeElements,
-    objectStack);
-  }
-  return node;
-};
-
-
-/**
- * Read the projection from a WFS source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {?ol.proj.Projection} Projection.
- * @api
- */
-ol.format.WFS.prototype.readProjection;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WFS.prototype.readProjectionFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readProjectionFromNode(n);
-    }
-  }
-  return null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.WFS.prototype.readProjectionFromNode = function(node) {
-  if (node.firstElementChild &&
-      node.firstElementChild.firstElementChild) {
-    node = node.firstElementChild.firstElementChild;
-    for (var n = node.firstElementChild; n; n = n.nextElementSibling) {
-      if (!(n.childNodes.length === 0 ||
-          (n.childNodes.length === 1 &&
-          n.firstChild.nodeType === 3))) {
-        var objectStack = [{}];
-        this.gmlFormat_.readGeometryElement(n, objectStack);
-        return ol.proj.get(objectStack.pop().srsName);
-      }
-    }
-  }
-
-  return null;
-};
-
-goog.provide('ol.format.WKT');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.TextFeature');
-goog.require('ol.geom.GeometryCollection');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.SimpleGeometry');
-
-
-/**
- * @classdesc
- * Geometry format for reading and writing data in the `WellKnownText` (WKT)
- * format.
- *
- * @constructor
- * @extends {ol.format.TextFeature}
- * @param {olx.format.WKTOptions=} opt_options Options.
- * @api
- */
-ol.format.WKT = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.TextFeature.call(this);
-
-  /**
-   * Split GeometryCollection into multiple features.
-   * @type {boolean}
-   * @private
-   */
-  this.splitCollection_ = options.splitCollection !== undefined ?
-      options.splitCollection : false;
-
-};
-ol.inherits(ol.format.WKT, ol.format.TextFeature);
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WKT.EMPTY = 'EMPTY';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WKT.Z = 'Z';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WKT.M = 'M';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WKT.ZM = 'ZM';
-
-
-/**
- * @param {ol.geom.Point} geom Point geometry.
- * @return {string} Coordinates part of Point as WKT.
- * @private
- */
-ol.format.WKT.encodePointGeometry_ = function(geom) {
-  var coordinates = geom.getCoordinates();
-  if (coordinates.length === 0) {
-    return '';
-  }
-  return coordinates.join(' ');
-};
-
-
-/**
- * @param {ol.geom.MultiPoint} geom MultiPoint geometry.
- * @return {string} Coordinates part of MultiPoint as WKT.
- * @private
- */
-ol.format.WKT.encodeMultiPointGeometry_ = function(geom) {
-  var array = [];
-  var components = geom.getPoints();
-  for (var i = 0, ii = components.length; i < ii; ++i) {
-    array.push('(' + ol.format.WKT.encodePointGeometry_(components[i]) + ')');
-  }
-  return array.join(',');
-};
-
-
-/**
- * @param {ol.geom.GeometryCollection} geom GeometryCollection geometry.
- * @return {string} Coordinates part of GeometryCollection as WKT.
- * @private
- */
-ol.format.WKT.encodeGeometryCollectionGeometry_ = function(geom) {
-  var array = [];
-  var geoms = geom.getGeometries();
-  for (var i = 0, ii = geoms.length; i < ii; ++i) {
-    array.push(ol.format.WKT.encode_(geoms[i]));
-  }
-  return array.join(',');
-};
-
-
-/**
- * @param {ol.geom.LineString|ol.geom.LinearRing} geom LineString geometry.
- * @return {string} Coordinates part of LineString as WKT.
- * @private
- */
-ol.format.WKT.encodeLineStringGeometry_ = function(geom) {
-  var coordinates = geom.getCoordinates();
-  var array = [];
-  for (var i = 0, ii = coordinates.length; i < ii; ++i) {
-    array.push(coordinates[i].join(' '));
-  }
-  return array.join(',');
-};
-
-
-/**
- * @param {ol.geom.MultiLineString} geom MultiLineString geometry.
- * @return {string} Coordinates part of MultiLineString as WKT.
- * @private
- */
-ol.format.WKT.encodeMultiLineStringGeometry_ = function(geom) {
-  var array = [];
-  var components = geom.getLineStrings();
-  for (var i = 0, ii = components.length; i < ii; ++i) {
-    array.push('(' + ol.format.WKT.encodeLineStringGeometry_(
-        components[i]) + ')');
-  }
-  return array.join(',');
-};
-
-
-/**
- * @param {ol.geom.Polygon} geom Polygon geometry.
- * @return {string} Coordinates part of Polygon as WKT.
- * @private
- */
-ol.format.WKT.encodePolygonGeometry_ = function(geom) {
-  var array = [];
-  var rings = geom.getLinearRings();
-  for (var i = 0, ii = rings.length; i < ii; ++i) {
-    array.push('(' + ol.format.WKT.encodeLineStringGeometry_(
-        rings[i]) + ')');
-  }
-  return array.join(',');
-};
-
-
-/**
- * @param {ol.geom.MultiPolygon} geom MultiPolygon geometry.
- * @return {string} Coordinates part of MultiPolygon as WKT.
- * @private
- */
-ol.format.WKT.encodeMultiPolygonGeometry_ = function(geom) {
-  var array = [];
-  var components = geom.getPolygons();
-  for (var i = 0, ii = components.length; i < ii; ++i) {
-    array.push('(' + ol.format.WKT.encodePolygonGeometry_(
-        components[i]) + ')');
-  }
-  return array.join(',');
-};
-
-/**
- * @param {ol.geom.SimpleGeometry} geom SimpleGeometry geometry.
- * @return {string} Potential dimensional information for WKT type.
- * @private
- */
-ol.format.WKT.encodeGeometryLayout_ = function(geom) {
-  var layout = geom.getLayout();
-  var dimInfo = '';
-  if (layout === ol.geom.GeometryLayout.XYZ || layout === ol.geom.GeometryLayout.XYZM) {
-    dimInfo += ol.format.WKT.Z;
-  }
-  if (layout === ol.geom.GeometryLayout.XYM || layout === ol.geom.GeometryLayout.XYZM) {
-    dimInfo += ol.format.WKT.M;
-  }
-  return dimInfo;
-};
-
-
-/**
- * Encode a geometry as WKT.
- * @param {ol.geom.Geometry} geom The geometry to encode.
- * @return {string} WKT string for the geometry.
- * @private
- */
-ol.format.WKT.encode_ = function(geom) {
-  var type = geom.getType();
-  var geometryEncoder = ol.format.WKT.GeometryEncoder_[type];
-  var enc = geometryEncoder(geom);
-  type = type.toUpperCase();
-  if (geom instanceof ol.geom.SimpleGeometry) {
-    var dimInfo = ol.format.WKT.encodeGeometryLayout_(geom);
-    if (dimInfo.length > 0) {
-      type += ' ' + dimInfo;
-    }
-  }
-  if (enc.length === 0) {
-    return type + ' ' + ol.format.WKT.EMPTY;
-  }
-  return type + '(' + enc + ')';
-};
-
-
-/**
- * @const
- * @type {Object.<string, function(ol.geom.Geometry): string>}
- * @private
- */
-ol.format.WKT.GeometryEncoder_ = {
-  'Point': ol.format.WKT.encodePointGeometry_,
-  'LineString': ol.format.WKT.encodeLineStringGeometry_,
-  'Polygon': ol.format.WKT.encodePolygonGeometry_,
-  'MultiPoint': ol.format.WKT.encodeMultiPointGeometry_,
-  'MultiLineString': ol.format.WKT.encodeMultiLineStringGeometry_,
-  'MultiPolygon': ol.format.WKT.encodeMultiPolygonGeometry_,
-  'GeometryCollection': ol.format.WKT.encodeGeometryCollectionGeometry_
-};
-
-
-/**
- * Parse a WKT string.
- * @param {string} wkt WKT string.
- * @return {ol.geom.Geometry|undefined}
- *     The geometry created.
- * @private
- */
-ol.format.WKT.prototype.parse_ = function(wkt) {
-  var lexer = new ol.format.WKT.Lexer(wkt);
-  var parser = new ol.format.WKT.Parser(lexer);
-  return parser.parse();
-};
-
-
-/**
- * Read a feature from a WKT source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.WKT.prototype.readFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.readFeatureFromText = function(text, opt_options) {
-  var geom = this.readGeometryFromText(text, opt_options);
-  if (geom) {
-    var feature = new ol.Feature();
-    feature.setGeometry(geom);
-    return feature;
-  }
-  return null;
-};
-
-
-/**
- * Read all features from a WKT source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.WKT.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.readFeaturesFromText = function(text, opt_options) {
-  var geometries = [];
-  var geometry = this.readGeometryFromText(text, opt_options);
-  if (this.splitCollection_ &&
-      geometry.getType() == ol.geom.GeometryType.GEOMETRY_COLLECTION) {
-    geometries = (/** @type {ol.geom.GeometryCollection} */ (geometry))
-        .getGeometriesArray();
-  } else {
-    geometries = [geometry];
-  }
-  var feature, features = [];
-  for (var i = 0, ii = geometries.length; i < ii; ++i) {
-    feature = new ol.Feature();
-    feature.setGeometry(geometries[i]);
-    features.push(feature);
-  }
-  return features;
-};
-
-
-/**
- * Read a single geometry from a WKT source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.geom.Geometry} Geometry.
- * @api
- */
-ol.format.WKT.prototype.readGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.readGeometryFromText = function(text, opt_options) {
-  var geometry = this.parse_(text);
-  if (geometry) {
-    return /** @type {ol.geom.Geometry} */ (
-        ol.format.Feature.transformWithOptions(geometry, false, opt_options));
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * Encode a feature as a WKT string.
- *
- * @function
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} WKT string.
- * @api
- */
-ol.format.WKT.prototype.writeFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.writeFeatureText = function(feature, opt_options) {
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    return this.writeGeometryText(geometry, opt_options);
-  }
-  return '';
-};
-
-
-/**
- * Encode an array of features as a WKT string.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} WKT string.
- * @api
- */
-ol.format.WKT.prototype.writeFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.writeFeaturesText = function(features, opt_options) {
-  if (features.length == 1) {
-    return this.writeFeatureText(features[0], opt_options);
-  }
-  var geometries = [];
-  for (var i = 0, ii = features.length; i < ii; ++i) {
-    geometries.push(features[i].getGeometry());
-  }
-  var collection = new ol.geom.GeometryCollection(geometries);
-  return this.writeGeometryText(collection, opt_options);
-};
-
-
-/**
- * Write a single geometry as a WKT string.
- *
- * @function
- * @param {ol.geom.Geometry} geometry Geometry.
- * @return {string} WKT string.
- * @api
- */
-ol.format.WKT.prototype.writeGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.writeGeometryText = function(geometry, opt_options) {
-  return ol.format.WKT.encode_(/** @type {ol.geom.Geometry} */ (
-      ol.format.Feature.transformWithOptions(geometry, true, opt_options)));
-};
-
-
-/**
- * @const
- * @enum {number}
- * @private
- */
-ol.format.WKT.TokenType_ = {
-  TEXT: 1,
-  LEFT_PAREN: 2,
-  RIGHT_PAREN: 3,
-  NUMBER: 4,
-  COMMA: 5,
-  EOF: 6
-};
-
-
-/**
- * Class to tokenize a WKT string.
- * @param {string} wkt WKT string.
- * @constructor
- * @protected
- */
-ol.format.WKT.Lexer = function(wkt) {
-
-  /**
-   * @type {string}
-   */
-  this.wkt = wkt;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.index_ = -1;
-};
-
-
-/**
- * @param {string} c Character.
- * @return {boolean} Whether the character is alphabetic.
- * @private
- */
-ol.format.WKT.Lexer.prototype.isAlpha_ = function(c) {
-  return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
-};
-
-
-/**
- * @param {string} c Character.
- * @param {boolean=} opt_decimal Whether the string number
- *     contains a dot, i.e. is a decimal number.
- * @return {boolean} Whether the character is numeric.
- * @private
- */
-ol.format.WKT.Lexer.prototype.isNumeric_ = function(c, opt_decimal) {
-  var decimal = opt_decimal !== undefined ? opt_decimal : false;
-  return c >= '0' && c <= '9' || c == '.' && !decimal;
-};
-
-
-/**
- * @param {string} c Character.
- * @return {boolean} Whether the character is whitespace.
- * @private
- */
-ol.format.WKT.Lexer.prototype.isWhiteSpace_ = function(c) {
-  return c == ' ' || c == '\t' || c == '\r' || c == '\n';
-};
-
-
-/**
- * @return {string} Next string character.
- * @private
- */
-ol.format.WKT.Lexer.prototype.nextChar_ = function() {
-  return this.wkt.charAt(++this.index_);
-};
-
-
-/**
- * Fetch and return the next token.
- * @return {!ol.WKTToken} Next string token.
- */
-ol.format.WKT.Lexer.prototype.nextToken = function() {
-  var c = this.nextChar_();
-  var token = {position: this.index_, value: c};
-
-  if (c == '(') {
-    token.type = ol.format.WKT.TokenType_.LEFT_PAREN;
-  } else if (c == ',') {
-    token.type = ol.format.WKT.TokenType_.COMMA;
-  } else if (c == ')') {
-    token.type = ol.format.WKT.TokenType_.RIGHT_PAREN;
-  } else if (this.isNumeric_(c) || c == '-') {
-    token.type = ol.format.WKT.TokenType_.NUMBER;
-    token.value = this.readNumber_();
-  } else if (this.isAlpha_(c)) {
-    token.type = ol.format.WKT.TokenType_.TEXT;
-    token.value = this.readText_();
-  } else if (this.isWhiteSpace_(c)) {
-    return this.nextToken();
-  } else if (c === '') {
-    token.type = ol.format.WKT.TokenType_.EOF;
-  } else {
-    throw new Error('Unexpected character: ' + c);
-  }
-
-  return token;
-};
-
-
-/**
- * @return {number} Numeric token value.
- * @private
- */
-ol.format.WKT.Lexer.prototype.readNumber_ = function() {
-  var c, index = this.index_;
-  var decimal = false;
-  var scientificNotation = false;
-  do {
-    if (c == '.') {
-      decimal = true;
-    } else if (c == 'e' || c == 'E') {
-      scientificNotation = true;
-    }
-    c = this.nextChar_();
-  } while (
-      this.isNumeric_(c, decimal) ||
-      // if we haven't detected a scientific number before, 'e' or 'E'
-      // hint that we should continue to read
-      !scientificNotation && (c == 'e' || c == 'E') ||
-      // once we know that we have a scientific number, both '-' and '+'
-      // are allowed
-      scientificNotation && (c == '-' || c == '+')
-  );
-  return parseFloat(this.wkt.substring(index, this.index_--));
-};
-
-
-/**
- * @return {string} String token value.
- * @private
- */
-ol.format.WKT.Lexer.prototype.readText_ = function() {
-  var c, index = this.index_;
-  do {
-    c = this.nextChar_();
-  } while (this.isAlpha_(c));
-  return this.wkt.substring(index, this.index_--).toUpperCase();
-};
-
-
-/**
- * Class to parse the tokens from the WKT string.
- * @param {ol.format.WKT.Lexer} lexer The lexer.
- * @constructor
- * @protected
- */
-ol.format.WKT.Parser = function(lexer) {
-
-  /**
-   * @type {ol.format.WKT.Lexer}
-   * @private
-   */
-  this.lexer_ = lexer;
-
-  /**
-   * @type {ol.WKTToken}
-   * @private
-   */
-  this.token_;
-
-  /**
-   * @type {ol.geom.GeometryLayout}
-   * @private
-   */
-  this.layout_ = ol.geom.GeometryLayout.XY;
-};
-
-
-/**
- * Fetch the next token form the lexer and replace the active token.
- * @private
- */
-ol.format.WKT.Parser.prototype.consume_ = function() {
-  this.token_ = this.lexer_.nextToken();
-};
-
-/**
- * Tests if the given type matches the type of the current token.
- * @param {ol.format.WKT.TokenType_} type Token type.
- * @return {boolean} Whether the token matches the given type.
- */
-ol.format.WKT.Parser.prototype.isTokenType = function(type) {
-  var isMatch = this.token_.type == type;
-  return isMatch;
-};
-
-
-/**
- * If the given type matches the current token, consume it.
- * @param {ol.format.WKT.TokenType_} type Token type.
- * @return {boolean} Whether the token matches the given type.
- */
-ol.format.WKT.Parser.prototype.match = function(type) {
-  var isMatch = this.isTokenType(type);
-  if (isMatch) {
-    this.consume_();
-  }
-  return isMatch;
-};
-
-
-/**
- * Try to parse the tokens provided by the lexer.
- * @return {ol.geom.Geometry} The geometry.
- */
-ol.format.WKT.Parser.prototype.parse = function() {
-  this.consume_();
-  var geometry = this.parseGeometry_();
-  return geometry;
-};
-
-
-/**
- * Try to parse the dimensional info.
- * @return {ol.geom.GeometryLayout} The layout.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseGeometryLayout_ = function() {
-  var layout = ol.geom.GeometryLayout.XY;
-  var dimToken = this.token_;
-  if (this.isTokenType(ol.format.WKT.TokenType_.TEXT)) {
-    var dimInfo = dimToken.value;
-    if (dimInfo === ol.format.WKT.Z) {
-      layout = ol.geom.GeometryLayout.XYZ;
-    } else if (dimInfo === ol.format.WKT.M) {
-      layout = ol.geom.GeometryLayout.XYM;
-    } else if (dimInfo === ol.format.WKT.ZM) {
-      layout = ol.geom.GeometryLayout.XYZM;
-    }
-    if (layout !== ol.geom.GeometryLayout.XY) {
-      this.consume_();
-    }
-  }
-  return layout;
-};
-
-
-/**
- * @return {!ol.geom.Geometry} The geometry.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseGeometry_ = function() {
-  var token = this.token_;
-  if (this.match(ol.format.WKT.TokenType_.TEXT)) {
-    var geomType = token.value;
-    this.layout_ = this.parseGeometryLayout_();
-    if (geomType == ol.geom.GeometryType.GEOMETRY_COLLECTION.toUpperCase()) {
-      var geometries = this.parseGeometryCollectionText_();
-      return new ol.geom.GeometryCollection(geometries);
-    } else {
-      var parser = ol.format.WKT.Parser.GeometryParser_[geomType];
-      var ctor = ol.format.WKT.Parser.GeometryConstructor_[geomType];
-      if (!parser || !ctor) {
-        throw new Error('Invalid geometry type: ' + geomType);
-      }
-      var coordinates = parser.call(this);
-      return new ctor(coordinates, this.layout_);
-    }
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<ol.geom.Geometry>} A collection of geometries.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseGeometryCollectionText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var geometries = [];
-    do {
-      geometries.push(this.parseGeometry_());
-    } while (this.match(ol.format.WKT.TokenType_.COMMA));
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return geometries;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {Array.<number>} All values in a point.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePointText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates = this.parsePoint_();
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return null;
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} All points in a linestring.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseLineStringText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates = this.parsePointList_();
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} All points in a polygon.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePolygonText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates = this.parseLineStringTextList_();
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} All points in a multipoint.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseMultiPointText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates;
-    if (this.token_.type == ol.format.WKT.TokenType_.LEFT_PAREN) {
-      coordinates = this.parsePointTextList_();
-    } else {
-      coordinates = this.parsePointList_();
-    }
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} All linestring points
- *                                        in a multilinestring.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseMultiLineStringText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates = this.parseLineStringTextList_();
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} All polygon points in a multipolygon.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseMultiPolygonText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates = this.parsePolygonTextList_();
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<number>} A point.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePoint_ = function() {
-  var coordinates = [];
-  var dimensions = this.layout_.length;
-  for (var i = 0; i < dimensions; ++i) {
-    var token = this.token_;
-    if (this.match(ol.format.WKT.TokenType_.NUMBER)) {
-      coordinates.push(token.value);
-    } else {
-      break;
-    }
-  }
-  if (coordinates.length == dimensions) {
-    return coordinates;
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} An array of points.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePointList_ = function() {
-  var coordinates = [this.parsePoint_()];
-  while (this.match(ol.format.WKT.TokenType_.COMMA)) {
-    coordinates.push(this.parsePoint_());
-  }
-  return coordinates;
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} An array of points.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePointTextList_ = function() {
-  var coordinates = [this.parsePointText_()];
-  while (this.match(ol.format.WKT.TokenType_.COMMA)) {
-    coordinates.push(this.parsePointText_());
-  }
-  return coordinates;
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} An array of points.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseLineStringTextList_ = function() {
-  var coordinates = [this.parseLineStringText_()];
-  while (this.match(ol.format.WKT.TokenType_.COMMA)) {
-    coordinates.push(this.parseLineStringText_());
-  }
-  return coordinates;
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} An array of points.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePolygonTextList_ = function() {
-  var coordinates = [this.parsePolygonText_()];
-  while (this.match(ol.format.WKT.TokenType_.COMMA)) {
-    coordinates.push(this.parsePolygonText_());
-  }
-  return coordinates;
-};
-
-
-/**
- * @return {boolean} Whether the token implies an empty geometry.
- * @private
- */
-ol.format.WKT.Parser.prototype.isEmptyGeometry_ = function() {
-  var isEmpty = this.isTokenType(ol.format.WKT.TokenType_.TEXT) &&
-      this.token_.value == ol.format.WKT.EMPTY;
-  if (isEmpty) {
-    this.consume_();
-  }
-  return isEmpty;
-};
-
-
-/**
- * Create an error message for an unexpected token error.
- * @return {string} Error message.
- * @private
- */
-ol.format.WKT.Parser.prototype.formatErrorMessage_ = function() {
-  return 'Unexpected `' + this.token_.value + '` at position ' +
-      this.token_.position + ' in `' + this.lexer_.wkt + '`';
-};
-
-
-/**
- * @enum {function (new:ol.geom.Geometry, Array, ol.geom.GeometryLayout)}
- * @private
- */
-ol.format.WKT.Parser.GeometryConstructor_ = {
-  'POINT': ol.geom.Point,
-  'LINESTRING': ol.geom.LineString,
-  'POLYGON': ol.geom.Polygon,
-  'MULTIPOINT': ol.geom.MultiPoint,
-  'MULTILINESTRING': ol.geom.MultiLineString,
-  'MULTIPOLYGON': ol.geom.MultiPolygon
-};
-
-
-/**
- * @enum {(function(): Array)}
- * @private
- */
-ol.format.WKT.Parser.GeometryParser_ = {
-  'POINT': ol.format.WKT.Parser.prototype.parsePointText_,
-  'LINESTRING': ol.format.WKT.Parser.prototype.parseLineStringText_,
-  'POLYGON': ol.format.WKT.Parser.prototype.parsePolygonText_,
-  'MULTIPOINT': ol.format.WKT.Parser.prototype.parseMultiPointText_,
-  'MULTILINESTRING': ol.format.WKT.Parser.prototype.parseMultiLineStringText_,
-  'MULTIPOLYGON': ol.format.WKT.Parser.prototype.parseMultiPolygonText_
-};
-
-goog.provide('ol.format.WMSCapabilities');
-
-goog.require('ol');
-goog.require('ol.format.XLink');
-goog.require('ol.format.XML');
-goog.require('ol.format.XSD');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Format for reading WMS capabilities data
- *
- * @constructor
- * @extends {ol.format.XML}
- * @api
- */
-ol.format.WMSCapabilities = function() {
-
-  ol.format.XML.call(this);
-
-  /**
-   * @type {string|undefined}
-   */
-  this.version = undefined;
-};
-ol.inherits(ol.format.WMSCapabilities, ol.format.XML);
-
-
-/**
- * Read a WMS capabilities document.
- *
- * @function
- * @param {Document|Node|string} source The XML source.
- * @return {Object} An object representing the WMS capabilities.
- * @api
- */
-ol.format.WMSCapabilities.prototype.read;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WMSCapabilities.prototype.readFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readFromNode(n);
-    }
-  }
-  return null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.WMSCapabilities.prototype.readFromNode = function(node) {
-  this.version = node.getAttribute('version').trim();
-  var wmsCapabilityObject = ol.xml.pushParseAndPop({
-    'version': this.version
-  }, ol.format.WMSCapabilities.PARSERS_, node, []);
-  return wmsCapabilityObject ? wmsCapabilityObject : null;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Attribution object.
- */
-ol.format.WMSCapabilities.readAttribution_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.ATTRIBUTION_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object} Bounding box object.
- */
-ol.format.WMSCapabilities.readBoundingBox_ = function(node, objectStack) {
-  var extent = [
-    ol.format.XSD.readDecimalString(node.getAttribute('minx')),
-    ol.format.XSD.readDecimalString(node.getAttribute('miny')),
-    ol.format.XSD.readDecimalString(node.getAttribute('maxx')),
-    ol.format.XSD.readDecimalString(node.getAttribute('maxy'))
-  ];
-
-  var resolutions = [
-    ol.format.XSD.readDecimalString(node.getAttribute('resx')),
-    ol.format.XSD.readDecimalString(node.getAttribute('resy'))
-  ];
-
-  return {
-    'crs': node.getAttribute('CRS'),
-    'extent': extent,
-    'res': resolutions
-  };
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.Extent|undefined} Bounding box object.
- */
-ol.format.WMSCapabilities.readEXGeographicBoundingBox_ = function(node, objectStack) {
-  var geographicBoundingBox = ol.xml.pushParseAndPop(
-        {},
-        ol.format.WMSCapabilities.EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS_,
-        node, objectStack);
-  if (!geographicBoundingBox) {
-    return undefined;
-  }
-  var westBoundLongitude = /** @type {number|undefined} */
-        (geographicBoundingBox['westBoundLongitude']);
-  var southBoundLatitude = /** @type {number|undefined} */
-        (geographicBoundingBox['southBoundLatitude']);
-  var eastBoundLongitude = /** @type {number|undefined} */
-        (geographicBoundingBox['eastBoundLongitude']);
-  var northBoundLatitude = /** @type {number|undefined} */
-        (geographicBoundingBox['northBoundLatitude']);
-  if (westBoundLongitude === undefined || southBoundLatitude === undefined ||
-        eastBoundLongitude === undefined || northBoundLatitude === undefined) {
-    return undefined;
-  }
-  return [
-    westBoundLongitude, southBoundLatitude,
-    eastBoundLongitude, northBoundLatitude
-  ];
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Capability object.
- */
-ol.format.WMSCapabilities.readCapability_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.CAPABILITY_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Service object.
- */
-ol.format.WMSCapabilities.readService_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.SERVICE_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Contact information object.
- */
-ol.format.WMSCapabilities.readContactInformation_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.CONTACT_INFORMATION_PARSERS_,
-        node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Contact person object.
- */
-ol.format.WMSCapabilities.readContactPersonPrimary_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.CONTACT_PERSON_PARSERS_,
-        node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Contact address object.
- */
-ol.format.WMSCapabilities.readContactAddress_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.CONTACT_ADDRESS_PARSERS_,
-        node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<string>|undefined} Format array.
- */
-ol.format.WMSCapabilities.readException_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        [], ol.format.WMSCapabilities.EXCEPTION_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Layer object.
- */
-ol.format.WMSCapabilities.readCapabilityLayer_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.LAYER_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Layer object.
- */
-ol.format.WMSCapabilities.readLayer_ = function(node, objectStack) {
-  var parentLayerObject = /**  @type {Object.<string,*>} */
-        (objectStack[objectStack.length - 1]);
-
-  var layerObject = ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.LAYER_PARSERS_, node, objectStack);
-
-  if (!layerObject) {
-    return undefined;
-  }
-  var queryable =
-        ol.format.XSD.readBooleanString(node.getAttribute('queryable'));
-  if (queryable === undefined) {
-    queryable = parentLayerObject['queryable'];
-  }
-  layerObject['queryable'] = queryable !== undefined ? queryable : false;
-
-  var cascaded = ol.format.XSD.readNonNegativeIntegerString(
-        node.getAttribute('cascaded'));
-  if (cascaded === undefined) {
-    cascaded = parentLayerObject['cascaded'];
-  }
-  layerObject['cascaded'] = cascaded;
-
-  var opaque = ol.format.XSD.readBooleanString(node.getAttribute('opaque'));
-  if (opaque === undefined) {
-    opaque = parentLayerObject['opaque'];
-  }
-  layerObject['opaque'] = opaque !== undefined ? opaque : false;
-
-  var noSubsets =
-        ol.format.XSD.readBooleanString(node.getAttribute('noSubsets'));
-  if (noSubsets === undefined) {
-    noSubsets = parentLayerObject['noSubsets'];
-  }
-  layerObject['noSubsets'] = noSubsets !== undefined ? noSubsets : false;
-
-  var fixedWidth =
-        ol.format.XSD.readDecimalString(node.getAttribute('fixedWidth'));
-  if (!fixedWidth) {
-    fixedWidth = parentLayerObject['fixedWidth'];
-  }
-  layerObject['fixedWidth'] = fixedWidth;
-
-  var fixedHeight =
-        ol.format.XSD.readDecimalString(node.getAttribute('fixedHeight'));
-  if (!fixedHeight) {
-    fixedHeight = parentLayerObject['fixedHeight'];
-  }
-  layerObject['fixedHeight'] = fixedHeight;
-
-    // See 7.2.4.8
-  var addKeys = ['Style', 'CRS', 'AuthorityURL'];
-  addKeys.forEach(function(key) {
-    if (key in parentLayerObject) {
-      var childValue = layerObject[key] || [];
-      layerObject[key] = childValue.concat(parentLayerObject[key]);
-    }
-  });
-
-  var replaceKeys = ['EX_GeographicBoundingBox', 'BoundingBox', 'Dimension',
-    'Attribution', 'MinScaleDenominator', 'MaxScaleDenominator'];
-  replaceKeys.forEach(function(key) {
-    if (!(key in layerObject)) {
-      var parentValue = parentLayerObject[key];
-      layerObject[key] = parentValue;
-    }
-  });
-
-  return layerObject;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object} Dimension object.
- */
-ol.format.WMSCapabilities.readDimension_ = function(node, objectStack) {
-  var dimensionObject = {
-    'name': node.getAttribute('name'),
-    'units': node.getAttribute('units'),
-    'unitSymbol': node.getAttribute('unitSymbol'),
-    'default': node.getAttribute('default'),
-    'multipleValues': ol.format.XSD.readBooleanString(
-          node.getAttribute('multipleValues')),
-    'nearestValue': ol.format.XSD.readBooleanString(
-          node.getAttribute('nearestValue')),
-    'current': ol.format.XSD.readBooleanString(node.getAttribute('current')),
-    'values': ol.format.XSD.readString(node)
-  };
-  return dimensionObject;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Online resource object.
- */
-ol.format.WMSCapabilities.readFormatOnlineresource_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.FORMAT_ONLINERESOURCE_PARSERS_,
-        node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Request object.
- */
-ol.format.WMSCapabilities.readRequest_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.REQUEST_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} DCP type object.
- */
-ol.format.WMSCapabilities.readDCPType_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.DCPTYPE_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} HTTP object.
- */
-ol.format.WMSCapabilities.readHTTP_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.HTTP_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Operation type object.
- */
-ol.format.WMSCapabilities.readOperationType_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.OPERATIONTYPE_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Online resource object.
- */
-ol.format.WMSCapabilities.readSizedFormatOnlineresource_ = function(node, objectStack) {
-  var formatOnlineresource =
-        ol.format.WMSCapabilities.readFormatOnlineresource_(node, objectStack);
-  if (formatOnlineresource) {
-    var size = [
-      ol.format.XSD.readNonNegativeIntegerString(node.getAttribute('width')),
-      ol.format.XSD.readNonNegativeIntegerString(node.getAttribute('height'))
-    ];
-    formatOnlineresource['size'] = size;
-    return formatOnlineresource;
-  }
-  return undefined;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Authority URL object.
- */
-ol.format.WMSCapabilities.readAuthorityURL_ = function(node, objectStack) {
-  var authorityObject =
-        ol.format.WMSCapabilities.readFormatOnlineresource_(node, objectStack);
-  if (authorityObject) {
-    authorityObject['name'] = node.getAttribute('name');
-    return authorityObject;
-  }
-  return undefined;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Metadata URL object.
- */
-ol.format.WMSCapabilities.readMetadataURL_ = function(node, objectStack) {
-  var metadataObject =
-        ol.format.WMSCapabilities.readFormatOnlineresource_(node, objectStack);
-  if (metadataObject) {
-    metadataObject['type'] = node.getAttribute('type');
-    return metadataObject;
-  }
-  return undefined;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Style object.
- */
-ol.format.WMSCapabilities.readStyle_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        {}, ol.format.WMSCapabilities.STYLE_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Array.<string>|undefined} Keyword list.
- */
-ol.format.WMSCapabilities.readKeywordList_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-        [], ol.format.WMSCapabilities.KEYWORDLIST_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.format.WMSCapabilities.NAMESPACE_URIS_ = [
-  null,
-  'http://www.opengis.net/wms'
-];
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Service': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readService_),
-      'Capability': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readCapability_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.CAPABILITY_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Request': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readRequest_),
-      'Exception': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readException_),
-      'Layer': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readCapabilityLayer_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.SERVICE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Title': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Abstract': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'KeywordList': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readKeywordList_),
-      'OnlineResource': ol.xml.makeObjectPropertySetter(
-          ol.format.XLink.readHref),
-      'ContactInformation': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readContactInformation_),
-      'Fees': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'AccessConstraints': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'LayerLimit': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MaxWidth': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MaxHeight': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.CONTACT_INFORMATION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'ContactPersonPrimary': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readContactPersonPrimary_),
-      'ContactPosition': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'ContactAddress': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readContactAddress_),
-      'ContactVoiceTelephone': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'ContactFacsimileTelephone': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'ContactElectronicMailAddress': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.CONTACT_PERSON_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'ContactPerson': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'ContactOrganization': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.CONTACT_ADDRESS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'AddressType': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Address': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'City': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'StateOrProvince': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'PostCode': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Country': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.EXCEPTION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Format': ol.xml.makeArrayPusher(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.LAYER_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Title': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Abstract': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'KeywordList': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readKeywordList_),
-      'CRS': ol.xml.makeObjectPropertyPusher(ol.format.XSD.readString),
-      'EX_GeographicBoundingBox': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readEXGeographicBoundingBox_),
-      'BoundingBox': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readBoundingBox_),
-      'Dimension': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readDimension_),
-      'Attribution': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readAttribution_),
-      'AuthorityURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readAuthorityURL_),
-      'Identifier': ol.xml.makeObjectPropertyPusher(ol.format.XSD.readString),
-      'MetadataURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readMetadataURL_),
-      'DataURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readFormatOnlineresource_),
-      'FeatureListURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readFormatOnlineresource_),
-      'Style': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readStyle_),
-      'MinScaleDenominator': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'MaxScaleDenominator': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'Layer': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readLayer_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.ATTRIBUTION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Title': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'OnlineResource': ol.xml.makeObjectPropertySetter(
-          ol.format.XLink.readHref),
-      'LogoURL': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readSizedFormatOnlineresource_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS_ =
-    ol.xml.makeStructureNS(ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'westBoundLongitude': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'eastBoundLongitude': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'southBoundLatitude': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'northBoundLatitude': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.REQUEST_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'GetCapabilities': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readOperationType_),
-      'GetMap': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readOperationType_),
-      'GetFeatureInfo': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readOperationType_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.OPERATIONTYPE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Format': ol.xml.makeObjectPropertyPusher(ol.format.XSD.readString),
-      'DCPType': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readDCPType_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.DCPTYPE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'HTTP': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readHTTP_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.HTTP_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Get': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readFormatOnlineresource_),
-      'Post': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readFormatOnlineresource_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Title': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Abstract': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'LegendURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readSizedFormatOnlineresource_),
-      'StyleSheetURL': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readFormatOnlineresource_),
-      'StyleURL': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readFormatOnlineresource_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.FORMAT_ONLINERESOURCE_PARSERS_ =
-    ol.xml.makeStructureNS(ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Format': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'OnlineResource': ol.xml.makeObjectPropertySetter(
-          ol.format.XLink.readHref)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.KEYWORDLIST_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Keyword': ol.xml.makeArrayPusher(ol.format.XSD.readString)
-    });
-
-goog.provide('ol.format.WMSGetFeatureInfo');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.format.GML2');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.obj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Format for reading WMSGetFeatureInfo format. It uses
- * {@link ol.format.GML2} to read features.
- *
- * @constructor
- * @extends {ol.format.XMLFeature}
- * @param {olx.format.WMSGetFeatureInfoOptions=} opt_options Options.
- * @api
- */
-ol.format.WMSGetFeatureInfo = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.featureNS_ = 'http://mapserver.gis.umn.edu/mapserver';
-
-
-  /**
-   * @private
-   * @type {ol.format.GML2}
-   */
-  this.gmlFormat_ = new ol.format.GML2();
-
-
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.layers_ = options.layers ? options.layers : null;
-
-  ol.format.XMLFeature.call(this);
-};
-ol.inherits(ol.format.WMSGetFeatureInfo, ol.format.XMLFeature);
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.WMSGetFeatureInfo.featureIdentifier_ = '_feature';
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.WMSGetFeatureInfo.layerIdentifier_ = '_layer';
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Array.<ol.Feature>} Features.
- * @private
- */
-ol.format.WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
-  node.setAttribute('namespaceURI', this.featureNS_);
-  var localName = node.localName;
-  /** @type {Array.<ol.Feature>} */
-  var features = [];
-  if (node.childNodes.length === 0) {
-    return features;
-  }
-  if (localName == 'msGMLOutput') {
-    for (var i = 0, ii = node.childNodes.length; i < ii; i++) {
-      var layer = node.childNodes[i];
-      if (layer.nodeType !== Node.ELEMENT_NODE) {
-        continue;
-      }
-      var context = objectStack[0];
-
-      var toRemove = ol.format.WMSGetFeatureInfo.layerIdentifier_;
-      var layerName = layer.localName.replace(toRemove, '');
-
-      if (this.layers_ && !ol.array.includes(this.layers_, layerName)) {
-        continue;
-      }
-
-      var featureType = layerName +
-          ol.format.WMSGetFeatureInfo.featureIdentifier_;
-
-      context['featureType'] = featureType;
-      context['featureNS'] = this.featureNS_;
-
-      var parsers = {};
-      parsers[featureType] = ol.xml.makeArrayPusher(
-          this.gmlFormat_.readFeatureElement, this.gmlFormat_);
-      var parsersNS = ol.xml.makeStructureNS(
-          [context['featureNS'], null], parsers);
-      layer.setAttribute('namespaceURI', this.featureNS_);
-      var layerFeatures = ol.xml.pushParseAndPop(
-          [], parsersNS, layer, objectStack, this.gmlFormat_);
-      if (layerFeatures) {
-        ol.array.extend(features, layerFeatures);
-      }
-    }
-  }
-  if (localName == 'FeatureCollection') {
-    var gmlFeatures = ol.xml.pushParseAndPop([],
-        this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node,
-        [{}], this.gmlFormat_);
-    if (gmlFeatures) {
-      features = gmlFeatures;
-    }
-  }
-  return features;
-};
-
-
-/**
- * Read all features from a WMSGetFeatureInfo response.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.WMSGetFeatureInfo.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WMSGetFeatureInfo.prototype.readFeaturesFromNode = function(node, opt_options) {
-  var options = {};
-  if (opt_options) {
-    ol.obj.assign(options, this.getReadOptions(node, opt_options));
-  }
-  return this.readFeatures_(node, [options]);
-};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.WMSGetFeatureInfo.prototype.writeFeatureNode = function(feature, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.WMSGetFeatureInfo.prototype.writeFeaturesNode = function(features, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.WMSGetFeatureInfo.prototype.writeGeometryNode = function(geometry, opt_options) {};
-
-goog.provide('ol.format.WMTSCapabilities');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.format.OWS');
-goog.require('ol.format.XLink');
-goog.require('ol.format.XML');
-goog.require('ol.format.XSD');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Format for reading WMTS capabilities data.
- *
- * @constructor
- * @extends {ol.format.XML}
- * @api
- */
-ol.format.WMTSCapabilities = function() {
-  ol.format.XML.call(this);
-
-  /**
-   * @type {ol.format.OWS}
-   * @private
-   */
-  this.owsParser_ = new ol.format.OWS();
-};
-ol.inherits(ol.format.WMTSCapabilities, ol.format.XML);
-
-
-/**
- * Read a WMTS capabilities document.
- *
- * @function
- * @param {Document|Node|string} source The XML source.
- * @return {Object} An object representing the WMTS capabilities.
- * @api
- */
-ol.format.WMTSCapabilities.prototype.read;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WMTSCapabilities.prototype.readFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readFromNode(n);
-    }
-  }
-  return null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.WMTSCapabilities.prototype.readFromNode = function(node) {
-  var version = node.getAttribute('version').trim();
-  var WMTSCapabilityObject = this.owsParser_.readFromNode(node);
-  if (!WMTSCapabilityObject) {
-    return null;
-  }
-  WMTSCapabilityObject['version'] = version;
-  WMTSCapabilityObject = ol.xml.pushParseAndPop(WMTSCapabilityObject,
-        ol.format.WMTSCapabilities.PARSERS_, node, []);
-  return WMTSCapabilityObject ? WMTSCapabilityObject : null;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Attribution object.
- */
-ol.format.WMTSCapabilities.readContents_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-        ol.format.WMTSCapabilities.CONTENTS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Layers object.
- */
-ol.format.WMTSCapabilities.readLayer_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-        ol.format.WMTSCapabilities.LAYER_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Tile Matrix Set object.
- */
-ol.format.WMTSCapabilities.readTileMatrixSet_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.TMS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Style object.
- */
-ol.format.WMTSCapabilities.readStyle_ = function(node, objectStack) {
-  var style = ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.STYLE_PARSERS_, node, objectStack);
-  if (!style) {
-    return undefined;
-  }
-  var isDefault = node.getAttribute('isDefault') === 'true';
-  style['isDefault'] = isDefault;
-  return style;
-
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Tile Matrix Set Link object.
- */
-ol.format.WMTSCapabilities.readTileMatrixSetLink_ = function(node,
-    objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.TMS_LINKS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Dimension object.
- */
-ol.format.WMTSCapabilities.readDimensions_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.DIMENSION_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Resource URL object.
- */
-ol.format.WMTSCapabilities.readResourceUrl_ = function(node, objectStack) {
-  var format = node.getAttribute('format');
-  var template = node.getAttribute('template');
-  var resourceType = node.getAttribute('resourceType');
-  var resource = {};
-  if (format) {
-    resource['format'] = format;
-  }
-  if (template) {
-    resource['template'] = template;
-  }
-  if (resourceType) {
-    resource['resourceType'] = resourceType;
-  }
-  return resource;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} WGS84 BBox object.
- */
-ol.format.WMTSCapabilities.readWgs84BoundingBox_ = function(node, objectStack) {
-  var coordinates = ol.xml.pushParseAndPop([],
-      ol.format.WMTSCapabilities.WGS84_BBOX_READERS_, node, objectStack);
-  if (coordinates.length != 2) {
-    return undefined;
-  }
-  return ol.extent.boundingExtent(coordinates);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Legend object.
- */
-ol.format.WMTSCapabilities.readLegendUrl_ = function(node, objectStack) {
-  var legend = {};
-  legend['format'] = node.getAttribute('format');
-  legend['href'] = ol.format.XLink.readHref(node);
-  return legend;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Coordinates object.
- */
-ol.format.WMTSCapabilities.readCoordinates_ = function(node, objectStack) {
-  var coordinates = ol.format.XSD.readString(node).split(' ');
-  if (!coordinates || coordinates.length != 2) {
-    return undefined;
-  }
-  var x = +coordinates[0];
-  var y = +coordinates[1];
-  if (isNaN(x) || isNaN(y)) {
-    return undefined;
-  }
-  return [x, y];
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} TileMatrix object.
- */
-ol.format.WMTSCapabilities.readTileMatrix_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.TM_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} TileMatrixSetLimits Object.
- */
-ol.format.WMTSCapabilities.readTileMatrixLimitsList_ = function(node,
-    objectStack) {
-  return ol.xml.pushParseAndPop([],
-      ol.format.WMTSCapabilities.TMS_LIMITS_LIST_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} TileMatrixLimits Array.
- */
-ol.format.WMTSCapabilities.readTileMatrixLimits_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.TMS_LIMITS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.format.WMTSCapabilities.NAMESPACE_URIS_ = [
-  null,
-  'http://www.opengis.net/wmts/1.0'
-];
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_ = [
-  null,
-  'http://www.opengis.net/ows/1.1'
-];
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'Contents': ol.xml.makeObjectPropertySetter(
-          ol.format.WMTSCapabilities.readContents_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.CONTENTS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'Layer': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readLayer_),
-      'TileMatrixSet': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readTileMatrixSet_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.LAYER_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'Style': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readStyle_),
-      'Format': ol.xml.makeObjectPropertyPusher(
-          ol.format.XSD.readString),
-      'TileMatrixSetLink': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readTileMatrixSetLink_),
-      'Dimension': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readDimensions_),
-      'ResourceURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readResourceUrl_)
-    }, ol.xml.makeStructureNS(ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'Title': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'Abstract': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'WGS84BoundingBox': ol.xml.makeObjectPropertySetter(
-          ol.format.WMTSCapabilities.readWgs84BoundingBox_),
-      'Identifier': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'LegendURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readLegendUrl_)
-    }, ol.xml.makeStructureNS(ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'Title': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'Identifier': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.TMS_LINKS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'TileMatrixSet': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'TileMatrixSetLimits': ol.xml.makeObjectPropertySetter(
-          ol.format.WMTSCapabilities.readTileMatrixLimitsList_)
-    });
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.TMS_LIMITS_LIST_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'TileMatrixLimits': ol.xml.makeArrayPusher(
-          ol.format.WMTSCapabilities.readTileMatrixLimits_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.TMS_LIMITS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'TileMatrix': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'MinTileRow': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MaxTileRow': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MinTileCol': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MaxTileCol': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.DIMENSION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'Default': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'Value': ol.xml.makeObjectPropertyPusher(
-          ol.format.XSD.readString)
-    }, ol.xml.makeStructureNS(ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'Identifier': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.WGS84_BBOX_READERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'LowerCorner': ol.xml.makeArrayPusher(
-          ol.format.WMTSCapabilities.readCoordinates_),
-      'UpperCorner': ol.xml.makeArrayPusher(
-          ol.format.WMTSCapabilities.readCoordinates_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.TMS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'WellKnownScaleSet': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'TileMatrix': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readTileMatrix_)
-    }, ol.xml.makeStructureNS(ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'SupportedCRS': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'Identifier': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.TM_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'TopLeftCorner': ol.xml.makeObjectPropertySetter(
-          ol.format.WMTSCapabilities.readCoordinates_),
-      'ScaleDenominator': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'TileWidth': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'TileHeight': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MatrixWidth': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MatrixHeight': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger)
-    }, ol.xml.makeStructureNS(ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'Identifier': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    }));
-
-goog.provide('ol.GeolocationProperty');
-
-
-/**
- * @enum {string}
- */
-ol.GeolocationProperty = {
-  ACCURACY: 'accuracy',
-  ACCURACY_GEOMETRY: 'accuracyGeometry',
-  ALTITUDE: 'altitude',
-  ALTITUDE_ACCURACY: 'altitudeAccuracy',
-  HEADING: 'heading',
-  POSITION: 'position',
-  PROJECTION: 'projection',
-  SPEED: 'speed',
-  TRACKING: 'tracking',
-  TRACKING_OPTIONS: 'trackingOptions'
-};
-
-// FIXME handle geolocation not supported
-
-goog.provide('ol.Geolocation');
-
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.GeolocationProperty');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.geom.Polygon');
-goog.require('ol.has');
-goog.require('ol.math');
-goog.require('ol.proj');
-goog.require('ol.sphere.WGS84');
-
-
-/**
- * @classdesc
- * Helper class for providing HTML5 Geolocation capabilities.
- * The [Geolocation API](http://www.w3.org/TR/geolocation-API/)
- * is used to locate a user's position.
- *
- * To get notified of position changes, register a listener for the generic
- * `change` event on your instance of `ol.Geolocation`.
- *
- * Example:
- *
- *     var geolocation = new ol.Geolocation({
- *       // take the projection to use from the map's view
- *       projection: view.getProjection()
- *     });
- *     // listen to changes in position
- *     geolocation.on('change', function(evt) {
- *       window.console.log(geolocation.getPosition());
- *     });
- *
- * @fires error
- * @constructor
- * @extends {ol.Object}
- * @param {olx.GeolocationOptions=} opt_options Options.
- * @api
- */
-ol.Geolocation = function(opt_options) {
-
-  ol.Object.call(this);
-
-  var options = opt_options || {};
-
-  /**
-   * The unprojected (EPSG:4326) device position.
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.position_ = null;
-
-  /**
-   * @private
-   * @type {ol.TransformFunction}
-   */
-  this.transform_ = ol.proj.identityTransform;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.watchId_ = undefined;
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.GeolocationProperty.PROJECTION),
-      this.handleProjectionChanged_, this);
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.GeolocationProperty.TRACKING),
-      this.handleTrackingChanged_, this);
-
-  if (options.projection !== undefined) {
-    this.setProjection(options.projection);
-  }
-  if (options.trackingOptions !== undefined) {
-    this.setTrackingOptions(options.trackingOptions);
-  }
-
-  this.setTracking(options.tracking !== undefined ? options.tracking : false);
-
-};
-ol.inherits(ol.Geolocation, ol.Object);
-
-
-/**
- * @inheritDoc
- */
-ol.Geolocation.prototype.disposeInternal = function() {
-  this.setTracking(false);
-  ol.Object.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @private
- */
-ol.Geolocation.prototype.handleProjectionChanged_ = function() {
-  var projection = this.getProjection();
-  if (projection) {
-    this.transform_ = ol.proj.getTransformFromProjections(
-        ol.proj.get('EPSG:4326'), projection);
-    if (this.position_) {
-      this.set(
-          ol.GeolocationProperty.POSITION, this.transform_(this.position_));
-    }
-  }
-};
-
-
-/**
- * @private
- */
-ol.Geolocation.prototype.handleTrackingChanged_ = function() {
-  if (ol.has.GEOLOCATION) {
-    var tracking = this.getTracking();
-    if (tracking && this.watchId_ === undefined) {
-      this.watchId_ = navigator.geolocation.watchPosition(
-          this.positionChange_.bind(this),
-          this.positionError_.bind(this),
-          this.getTrackingOptions());
-    } else if (!tracking && this.watchId_ !== undefined) {
-      navigator.geolocation.clearWatch(this.watchId_);
-      this.watchId_ = undefined;
-    }
-  }
-};
-
-
-/**
- * @private
- * @param {GeolocationPosition} position position event.
- */
-ol.Geolocation.prototype.positionChange_ = function(position) {
-  var coords = position.coords;
-  this.set(ol.GeolocationProperty.ACCURACY, coords.accuracy);
-  this.set(ol.GeolocationProperty.ALTITUDE,
-      coords.altitude === null ? undefined : coords.altitude);
-  this.set(ol.GeolocationProperty.ALTITUDE_ACCURACY,
-      coords.altitudeAccuracy === null ?
-      undefined : coords.altitudeAccuracy);
-  this.set(ol.GeolocationProperty.HEADING, coords.heading === null ?
-      undefined : ol.math.toRadians(coords.heading));
-  if (!this.position_) {
-    this.position_ = [coords.longitude, coords.latitude];
-  } else {
-    this.position_[0] = coords.longitude;
-    this.position_[1] = coords.latitude;
-  }
-  var projectedPosition = this.transform_(this.position_);
-  this.set(ol.GeolocationProperty.POSITION, projectedPosition);
-  this.set(ol.GeolocationProperty.SPEED,
-      coords.speed === null ? undefined : coords.speed);
-  var geometry = ol.geom.Polygon.circular(
-      ol.sphere.WGS84, this.position_, coords.accuracy);
-  geometry.applyTransform(this.transform_);
-  this.set(ol.GeolocationProperty.ACCURACY_GEOMETRY, geometry);
-  this.changed();
-};
-
-/**
- * Triggered when the Geolocation returns an error.
- * @event error
- * @api
- */
-
-/**
- * @private
- * @param {GeolocationPositionError} error error object.
- */
-ol.Geolocation.prototype.positionError_ = function(error) {
-  error.type = ol.events.EventType.ERROR;
-  this.setTracking(false);
-  this.dispatchEvent(/** @type {{type: string, target: undefined}} */ (error));
-};
-
-
-/**
- * Get the accuracy of the position in meters.
- * @return {number|undefined} The accuracy of the position measurement in
- *     meters.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getAccuracy = function() {
-  return /** @type {number|undefined} */ (
-      this.get(ol.GeolocationProperty.ACCURACY));
-};
-
-
-/**
- * Get a geometry of the position accuracy.
- * @return {?ol.geom.Polygon} A geometry of the position accuracy.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getAccuracyGeometry = function() {
-  return /** @type {?ol.geom.Polygon} */ (
-      this.get(ol.GeolocationProperty.ACCURACY_GEOMETRY) || null);
-};
-
-
-/**
- * Get the altitude associated with the position.
- * @return {number|undefined} The altitude of the position in meters above mean
- *     sea level.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getAltitude = function() {
-  return /** @type {number|undefined} */ (
-      this.get(ol.GeolocationProperty.ALTITUDE));
-};
-
-
-/**
- * Get the altitude accuracy of the position.
- * @return {number|undefined} The accuracy of the altitude measurement in
- *     meters.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getAltitudeAccuracy = function() {
-  return /** @type {number|undefined} */ (
-      this.get(ol.GeolocationProperty.ALTITUDE_ACCURACY));
-};
-
-
-/**
- * Get the heading as radians clockwise from North.
- * @return {number|undefined} The heading of the device in radians from north.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getHeading = function() {
-  return /** @type {number|undefined} */ (
-      this.get(ol.GeolocationProperty.HEADING));
-};
-
-
-/**
- * Get the position of the device.
- * @return {ol.Coordinate|undefined} The current position of the device reported
- *     in the current projection.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getPosition = function() {
-  return /** @type {ol.Coordinate|undefined} */ (
-      this.get(ol.GeolocationProperty.POSITION));
-};
-
-
-/**
- * Get the projection associated with the position.
- * @return {ol.proj.Projection|undefined} The projection the position is
- *     reported in.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getProjection = function() {
-  return /** @type {ol.proj.Projection|undefined} */ (
-      this.get(ol.GeolocationProperty.PROJECTION));
-};
-
-
-/**
- * Get the speed in meters per second.
- * @return {number|undefined} The instantaneous speed of the device in meters
- *     per second.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getSpeed = function() {
-  return /** @type {number|undefined} */ (
-      this.get(ol.GeolocationProperty.SPEED));
-};
-
-
-/**
- * Determine if the device location is being tracked.
- * @return {boolean} The device location is being tracked.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getTracking = function() {
-  return /** @type {boolean} */ (
-      this.get(ol.GeolocationProperty.TRACKING));
-};
-
-
-/**
- * Get the tracking options.
- * @see http://www.w3.org/TR/geolocation-API/#position-options
- * @return {GeolocationPositionOptions|undefined} PositionOptions as defined by
- *     the [HTML5 Geolocation spec
- *     ](http://www.w3.org/TR/geolocation-API/#position_options_interface).
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getTrackingOptions = function() {
-  return /** @type {GeolocationPositionOptions|undefined} */ (
-      this.get(ol.GeolocationProperty.TRACKING_OPTIONS));
-};
-
-
-/**
- * Set the projection to use for transforming the coordinates.
- * @param {ol.ProjectionLike} projection The projection the position is
- *     reported in.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.setProjection = function(projection) {
-  this.set(ol.GeolocationProperty.PROJECTION, ol.proj.get(projection));
-};
-
-
-/**
- * Enable or disable tracking.
- * @param {boolean} tracking Enable tracking.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.setTracking = function(tracking) {
-  this.set(ol.GeolocationProperty.TRACKING, tracking);
-};
-
-
-/**
- * Set the tracking options.
- * @see http://www.w3.org/TR/geolocation-API/#position-options
- * @param {GeolocationPositionOptions} options PositionOptions as defined by the
- *     [HTML5 Geolocation spec
- *     ](http://www.w3.org/TR/geolocation-API/#position_options_interface).
- * @observable
- * @api
- */
-ol.Geolocation.prototype.setTrackingOptions = function(options) {
-  this.set(ol.GeolocationProperty.TRACKING_OPTIONS, options);
-};
-
-goog.provide('ol.geom.Circle');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.deflate');
-
-
-/**
- * @classdesc
- * Circle geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {ol.Coordinate} center Center.
- * @param {number=} opt_radius Radius.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.Circle = function(center, opt_radius, opt_layout) {
-  ol.geom.SimpleGeometry.call(this);
-  var radius = opt_radius ? opt_radius : 0;
-  this.setCenterAndRadius(center, radius, opt_layout);
-};
-ol.inherits(ol.geom.Circle, ol.geom.SimpleGeometry);
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.Circle} Clone.
- * @override
- * @api
- */
-ol.geom.Circle.prototype.clone = function() {
-  var circle = new ol.geom.Circle(null);
-  circle.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
-  return circle;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Circle.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  var flatCoordinates = this.flatCoordinates;
-  var dx = x - flatCoordinates[0];
-  var dy = y - flatCoordinates[1];
-  var squaredDistance = dx * dx + dy * dy;
-  if (squaredDistance < minSquaredDistance) {
-    var i;
-    if (squaredDistance === 0) {
-      for (i = 0; i < this.stride; ++i) {
-        closestPoint[i] = flatCoordinates[i];
-      }
-    } else {
-      var delta = this.getRadius() / Math.sqrt(squaredDistance);
-      closestPoint[0] = flatCoordinates[0] + delta * dx;
-      closestPoint[1] = flatCoordinates[1] + delta * dy;
-      for (i = 2; i < this.stride; ++i) {
-        closestPoint[i] = flatCoordinates[i];
-      }
-    }
-    closestPoint.length = this.stride;
-    return squaredDistance;
-  } else {
-    return minSquaredDistance;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Circle.prototype.containsXY = function(x, y) {
-  var flatCoordinates = this.flatCoordinates;
-  var dx = x - flatCoordinates[0];
-  var dy = y - flatCoordinates[1];
-  return dx * dx + dy * dy <= this.getRadiusSquared_();
-};
-
-
-/**
- * Return the center of the circle as {@link ol.Coordinate coordinate}.
- * @return {ol.Coordinate} Center.
- * @api
- */
-ol.geom.Circle.prototype.getCenter = function() {
-  return this.flatCoordinates.slice(0, this.stride);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Circle.prototype.computeExtent = function(extent) {
-  var flatCoordinates = this.flatCoordinates;
-  var radius = flatCoordinates[this.stride] - flatCoordinates[0];
-  return ol.extent.createOrUpdate(
-      flatCoordinates[0] - radius, flatCoordinates[1] - radius,
-      flatCoordinates[0] + radius, flatCoordinates[1] + radius,
-      extent);
-};
-
-
-/**
- * Return the radius of the circle.
- * @return {number} Radius.
- * @api
- */
-ol.geom.Circle.prototype.getRadius = function() {
-  return Math.sqrt(this.getRadiusSquared_());
-};
-
-
-/**
- * @private
- * @return {number} Radius squared.
- */
-ol.geom.Circle.prototype.getRadiusSquared_ = function() {
-  var dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];
-  var dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];
-  return dx * dx + dy * dy;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Circle.prototype.getType = function() {
-  return ol.geom.GeometryType.CIRCLE;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Circle.prototype.intersectsExtent = function(extent) {
-  var circleExtent = this.getExtent();
-  if (ol.extent.intersects(extent, circleExtent)) {
-    var center = this.getCenter();
-
-    if (extent[0] <= center[0] && extent[2] >= center[0]) {
-      return true;
-    }
-    if (extent[1] <= center[1] && extent[3] >= center[1]) {
-      return true;
-    }
-
-    return ol.extent.forEachCorner(extent, this.intersectsCoordinate, this);
-  }
-  return false;
-
-};
-
-
-/**
- * Set the center of the circle as {@link ol.Coordinate coordinate}.
- * @param {ol.Coordinate} center Center.
- * @api
- */
-ol.geom.Circle.prototype.setCenter = function(center) {
-  var stride = this.stride;
-  var radius = this.flatCoordinates[stride] - this.flatCoordinates[0];
-  var flatCoordinates = center.slice();
-  flatCoordinates[stride] = flatCoordinates[0] + radius;
-  var i;
-  for (i = 1; i < stride; ++i) {
-    flatCoordinates[stride + i] = center[i];
-  }
-  this.setFlatCoordinates(this.layout, flatCoordinates);
-};
-
-
-/**
- * Set the center (as {@link ol.Coordinate coordinate}) and the radius (as
- * number) of the circle.
- * @param {ol.Coordinate} center Center.
- * @param {number} radius Radius.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.Circle.prototype.setCenterAndRadius = function(center, radius, opt_layout) {
-  if (!center) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
-  } else {
-    this.setLayout(opt_layout, center, 0);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    /** @type {Array.<number>} */
-    var flatCoordinates = this.flatCoordinates;
-    var offset = ol.geom.flat.deflate.coordinate(
-        flatCoordinates, 0, center, this.stride);
-    flatCoordinates[offset++] = flatCoordinates[0] + radius;
-    var i, ii;
-    for (i = 1, ii = this.stride; i < ii; ++i) {
-      flatCoordinates[offset++] = flatCoordinates[i];
-    }
-    flatCoordinates.length = offset;
-    this.changed();
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Circle.prototype.getCoordinates = function() {};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Circle.prototype.setCoordinates = function(coordinates, opt_layout) {};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- */
-ol.geom.Circle.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.changed();
-};
-
-
-/**
- * Set the radius of the circle. The radius is in the units of the projection.
- * @param {number} radius Radius.
- * @api
- */
-ol.geom.Circle.prototype.setRadius = function(radius) {
-  this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;
-  this.changed();
-};
-
-
-/**
- * Transform each coordinate of the circle from one coordinate reference system
- * to another. The geometry is modified in place.
- * If you do not want the geometry modified in place, first clone() it and
- * then use this function on the clone.
- *
- * Internally a circle is currently represented by two points: the center of
- * the circle `[cx, cy]`, and the point to the right of the circle
- * `[cx + r, cy]`. This `transform` function just transforms these two points.
- * So the resulting geometry is also a circle, and that circle does not
- * correspond to the shape that would be obtained by transforming every point
- * of the original circle.
- *
- * @param {ol.ProjectionLike} source The current projection.  Can be a
- *     string identifier or a {@link ol.proj.Projection} object.
- * @param {ol.ProjectionLike} destination The desired projection.  Can be a
- *     string identifier or a {@link ol.proj.Projection} object.
- * @return {ol.geom.Circle} This geometry.  Note that original geometry is
- *     modified in place.
- * @function
- * @api
- */
-ol.geom.Circle.prototype.transform;
-
-goog.provide('ol.geom.flat.geodesic');
-
-goog.require('ol.math');
-goog.require('ol.proj');
-
-
-/**
- * @private
- * @param {function(number): ol.Coordinate} interpolate Interpolate function.
- * @param {ol.TransformFunction} transform Transform from longitude/latitude to
- *     projected coordinates.
- * @param {number} squaredTolerance Squared tolerance.
- * @return {Array.<number>} Flat coordinates.
- */
-ol.geom.flat.geodesic.line_ = function(interpolate, transform, squaredTolerance) {
-  // FIXME reduce garbage generation
-  // FIXME optimize stack operations
-
-  /** @type {Array.<number>} */
-  var flatCoordinates = [];
-
-  var geoA = interpolate(0);
-  var geoB = interpolate(1);
-
-  var a = transform(geoA);
-  var b = transform(geoB);
-
-  /** @type {Array.<ol.Coordinate>} */
-  var geoStack = [geoB, geoA];
-  /** @type {Array.<ol.Coordinate>} */
-  var stack = [b, a];
-  /** @type {Array.<number>} */
-  var fractionStack = [1, 0];
-
-  /** @type {Object.<string, boolean>} */
-  var fractions = {};
-
-  var maxIterations = 1e5;
-  var geoM, m, fracA, fracB, fracM, key;
-
-  while (--maxIterations > 0 && fractionStack.length > 0) {
-    // Pop the a coordinate off the stack
-    fracA = fractionStack.pop();
-    geoA = geoStack.pop();
-    a = stack.pop();
-    // Add the a coordinate if it has not been added yet
-    key = fracA.toString();
-    if (!(key in fractions)) {
-      flatCoordinates.push(a[0], a[1]);
-      fractions[key] = true;
-    }
-    // Pop the b coordinate off the stack
-    fracB = fractionStack.pop();
-    geoB = geoStack.pop();
-    b = stack.pop();
-    // Find the m point between the a and b coordinates
-    fracM = (fracA + fracB) / 2;
-    geoM = interpolate(fracM);
-    m = transform(geoM);
-    if (ol.math.squaredSegmentDistance(m[0], m[1], a[0], a[1],
-        b[0], b[1]) < squaredTolerance) {
-      // If the m point is sufficiently close to the straight line, then we
-      // discard it.  Just use the b coordinate and move on to the next line
-      // segment.
-      flatCoordinates.push(b[0], b[1]);
-      key = fracB.toString();
-      fractions[key] = true;
-    } else {
-      // Otherwise, we need to subdivide the current line segment.  Split it
-      // into two and push the two line segments onto the stack.
-      fractionStack.push(fracB, fracM, fracM, fracA);
-      stack.push(b, m, m, a);
-      geoStack.push(geoB, geoM, geoM, geoA);
-    }
-  }
-
-  return flatCoordinates;
-};
-
-
-/**
-* Generate a great-circle arcs between two lat/lon points.
-* @param {number} lon1 Longitude 1 in degrees.
-* @param {number} lat1 Latitude 1 in degrees.
-* @param {number} lon2 Longitude 2 in degrees.
-* @param {number} lat2 Latitude 2 in degrees.
- * @param {ol.proj.Projection} projection Projection.
-* @param {number} squaredTolerance Squared tolerance.
-* @return {Array.<number>} Flat coordinates.
-*/
-ol.geom.flat.geodesic.greatCircleArc = function(
-    lon1, lat1, lon2, lat2, projection, squaredTolerance) {
-
-  var geoProjection = ol.proj.get('EPSG:4326');
-
-  var cosLat1 = Math.cos(ol.math.toRadians(lat1));
-  var sinLat1 = Math.sin(ol.math.toRadians(lat1));
-  var cosLat2 = Math.cos(ol.math.toRadians(lat2));
-  var sinLat2 = Math.sin(ol.math.toRadians(lat2));
-  var cosDeltaLon = Math.cos(ol.math.toRadians(lon2 - lon1));
-  var sinDeltaLon = Math.sin(ol.math.toRadians(lon2 - lon1));
-  var d = sinLat1 * sinLat2 + cosLat1 * cosLat2 * cosDeltaLon;
-
-  return ol.geom.flat.geodesic.line_(
-      /**
-       * @param {number} frac Fraction.
-       * @return {ol.Coordinate} Coordinate.
-       */
-      function(frac) {
-        if (1 <= d) {
-          return [lon2, lat2];
-        }
-        var D = frac * Math.acos(d);
-        var cosD = Math.cos(D);
-        var sinD = Math.sin(D);
-        var y = sinDeltaLon * cosLat2;
-        var x = cosLat1 * sinLat2 - sinLat1 * cosLat2 * cosDeltaLon;
-        var theta = Math.atan2(y, x);
-        var lat = Math.asin(sinLat1 * cosD + cosLat1 * sinD * Math.cos(theta));
-        var lon = ol.math.toRadians(lon1) +
-            Math.atan2(Math.sin(theta) * sinD * cosLat1,
-                       cosD - sinLat1 * Math.sin(lat));
-        return [ol.math.toDegrees(lon), ol.math.toDegrees(lat)];
-      }, ol.proj.getTransform(geoProjection, projection), squaredTolerance);
-};
-
-
-/**
- * Generate a meridian (line at constant longitude).
- * @param {number} lon Longitude.
- * @param {number} lat1 Latitude 1.
- * @param {number} lat2 Latitude 2.
- * @param {ol.proj.Projection} projection Projection.
- * @param {number} squaredTolerance Squared tolerance.
- * @return {Array.<number>} Flat coordinates.
- */
-ol.geom.flat.geodesic.meridian = function(lon, lat1, lat2, projection, squaredTolerance) {
-  var epsg4326Projection = ol.proj.get('EPSG:4326');
-  return ol.geom.flat.geodesic.line_(
-      /**
-       * @param {number} frac Fraction.
-       * @return {ol.Coordinate} Coordinate.
-       */
-      function(frac) {
-        return [lon, lat1 + ((lat2 - lat1) * frac)];
-      },
-      ol.proj.getTransform(epsg4326Projection, projection), squaredTolerance);
-};
-
-
-/**
- * Generate a parallel (line at constant latitude).
- * @param {number} lat Latitude.
- * @param {number} lon1 Longitude 1.
- * @param {number} lon2 Longitude 2.
- * @param {ol.proj.Projection} projection Projection.
- * @param {number} squaredTolerance Squared tolerance.
- * @return {Array.<number>} Flat coordinates.
- */
-ol.geom.flat.geodesic.parallel = function(lat, lon1, lon2, projection, squaredTolerance) {
-  var epsg4326Projection = ol.proj.get('EPSG:4326');
-  return ol.geom.flat.geodesic.line_(
-      /**
-       * @param {number} frac Fraction.
-       * @return {ol.Coordinate} Coordinate.
-       */
-      function(frac) {
-        return [lon1 + ((lon2 - lon1) * frac), lat];
-      },
-      ol.proj.getTransform(epsg4326Projection, projection), squaredTolerance);
-};
-
-goog.provide('ol.Graticule');
-
-goog.require('ol.coordinate');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.flat.geodesic');
-goog.require('ol.math');
-goog.require('ol.proj');
-goog.require('ol.render.EventType');
-goog.require('ol.style.Fill');
-goog.require('ol.style.Stroke');
-goog.require('ol.style.Text');
-
-
-/**
- * Render a grid for a coordinate system on a map.
- * @constructor
- * @param {olx.GraticuleOptions=} opt_options Options.
- * @api
- */
-ol.Graticule = function(opt_options) {
-  var options = opt_options || {};
-
- /**
-  * @type {ol.Map}
-  * @private
-  */
-  this.map_ = null;
-
- /**
-  * @type {ol.proj.Projection}
-  * @private
-  */
-  this.projection_ = null;
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.maxLat_ = Infinity;
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.maxLon_ = Infinity;
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.minLat_ = -Infinity;
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.minLon_ = -Infinity;
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.maxLatP_ = Infinity;
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.maxLonP_ = Infinity;
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.minLatP_ = -Infinity;
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.minLonP_ = -Infinity;
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.targetSize_ = options.targetSize !== undefined ?
-     options.targetSize : 100;
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100;
-
- /**
-  * @type {Array.<ol.geom.LineString>}
-  * @private
-  */
-  this.meridians_ = [];
-
- /**
-  * @type {Array.<ol.geom.LineString>}
-  * @private
-  */
-  this.parallels_ = [];
-
-  /**
-   * @type {ol.style.Stroke}
-   * @private
-   */
-  this.strokeStyle_ = options.strokeStyle !== undefined ?
-     options.strokeStyle : ol.Graticule.DEFAULT_STROKE_STYLE_;
-
-  /**
-   * @type {ol.TransformFunction|undefined}
-   * @private
-   */
-  this.fromLonLatTransform_ = undefined;
-
-  /**
-   * @type {ol.TransformFunction|undefined}
-   * @private
-   */
-  this.toLonLatTransform_ = undefined;
-
-  /**
-   * @type {ol.Coordinate}
-   * @private
-   */
-  this.projectionCenterLonLat_ = null;
-
-  /**
-   * @type {Array.<ol.GraticuleLabelDataType>}
-   * @private
-   */
-  this.meridiansLabels_ = null;
-
-  /**
-   * @type {Array.<ol.GraticuleLabelDataType>}
-   * @private
-   */
-  this.parallelsLabels_ = null;
-
-  if (options.showLabels == true) {
-    var degreesToString = ol.coordinate.degreesToStringHDMS;
-
-    /**
-     * @type {null|function(number):string}
-     * @private
-     */
-    this.lonLabelFormatter_ = options.lonLabelFormatter == undefined ?
-        degreesToString.bind(this, 'EW') : options.lonLabelFormatter;
-
-    /**
-     * @type {function(number):string}
-     * @private
-     */
-    this.latLabelFormatter_ = options.latLabelFormatter == undefined ?
-        degreesToString.bind(this, 'NS') : options.latLabelFormatter;
-
-    /**
-     * Longitude label position in fractions (0..1) of view extent. 0 means
-     * bottom, 1 means top.
-     * @type {number}
-     * @private
-     */
-    this.lonLabelPosition_ = options.lonLabelPosition == undefined ? 0 :
-        options.lonLabelPosition;
-
-    /**
-     * Latitude Label position in fractions (0..1) of view extent. 0 means left, 1
-     * means right.
-     * @type {number}
-     * @private
-     */
-    this.latLabelPosition_ = options.latLabelPosition == undefined ? 1 :
-        options.latLabelPosition;
-
-    /**
-     * @type {ol.style.Text}
-     * @private
-     */
-    this.lonLabelStyle_ = options.lonLabelStyle !== undefined ? options.lonLabelStyle :
-        new ol.style.Text({
-          font: '12px Calibri,sans-serif',
-          textBaseline: 'bottom',
-          fill: new ol.style.Fill({
-            color: 'rgba(0,0,0,1)'
-          }),
-          stroke: new ol.style.Stroke({
-            color: 'rgba(255,255,255,1)',
-            width: 3
-          })
-        });
-
-    /**
-     * @type {ol.style.Text}
-     * @private
-     */
-    this.latLabelStyle_ = options.latLabelStyle !== undefined ? options.latLabelStyle :
-        new ol.style.Text({
-          font: '12px Calibri,sans-serif',
-          textAlign: 'end',
-          fill: new ol.style.Fill({
-            color: 'rgba(0,0,0,1)'
-          }),
-          stroke: new ol.style.Stroke({
-            color: 'rgba(255,255,255,1)',
-            width: 3
-          })
-        });
-
-    this.meridiansLabels_ = [];
-    this.parallelsLabels_ = [];
-  }
-
-  this.setMap(options.map !== undefined ? options.map : null);
-};
-
-
-/**
- * @type {ol.style.Stroke}
- * @private
- * @const
- */
-ol.Graticule.DEFAULT_STROKE_STYLE_ = new ol.style.Stroke({
-  color: 'rgba(0,0,0,0.2)'
-});
-
-
-/**
- * TODO can be configurable
- * @type {Array.<number>}
- * @private
- */
-ol.Graticule.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];
-
-
-/**
- * @param {number} lon Longitude.
- * @param {number} minLat Minimal latitude.
- * @param {number} maxLat Maximal latitude.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {ol.Extent} extent Extent.
- * @param {number} index Index.
- * @return {number} Index.
- * @private
- */
-ol.Graticule.prototype.addMeridian_ = function(lon, minLat, maxLat, squaredTolerance, extent, index) {
-  var lineString = this.getMeridian_(lon, minLat, maxLat,
-      squaredTolerance, index);
-  if (ol.extent.intersects(lineString.getExtent(), extent)) {
-    if (this.meridiansLabels_) {
-      var textPoint = this.getMeridianPoint_(lineString, extent, index);
-      this.meridiansLabels_[index] = {
-        geom: textPoint,
-        text: this.lonLabelFormatter_(lon)
-      };
-    }
-    this.meridians_[index++] = lineString;
-  }
-  return index;
-};
-
-/**
- * @param {ol.geom.LineString} lineString Meridian
- * @param {ol.Extent} extent Extent.
- * @param {number} index Index.
- * @return {ol.geom.Point} Meridian point.
- * @private
- */
-ol.Graticule.prototype.getMeridianPoint_ = function(lineString, extent, index) {
-  var flatCoordinates = lineString.getFlatCoordinates();
-  var clampedBottom = Math.max(extent[1], flatCoordinates[1]);
-  var clampedTop = Math.min(extent[3], flatCoordinates[flatCoordinates.length - 1]);
-  var lat = ol.math.clamp(
-      extent[1] + Math.abs(extent[1] - extent[3]) * this.lonLabelPosition_,
-      clampedBottom, clampedTop);
-  var coordinate = [flatCoordinates[0], lat];
-  var point = this.meridiansLabels_[index] !== undefined ?
-      this.meridiansLabels_[index].geom : new ol.geom.Point(null);
-  point.setCoordinates(coordinate);
-  return point;
-};
-
-
-/**
- * @param {number} lat Latitude.
- * @param {number} minLon Minimal longitude.
- * @param {number} maxLon Maximal longitude.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {ol.Extent} extent Extent.
- * @param {number} index Index.
- * @return {number} Index.
- * @private
- */
-ol.Graticule.prototype.addParallel_ = function(lat, minLon, maxLon, squaredTolerance, extent, index) {
-  var lineString = this.getParallel_(lat, minLon, maxLon, squaredTolerance,
-      index);
-  if (ol.extent.intersects(lineString.getExtent(), extent)) {
-    if (this.parallelsLabels_) {
-      var textPoint = this.getParallelPoint_(lineString, extent, index);
-      this.parallelsLabels_[index] = {
-        geom: textPoint,
-        text: this.latLabelFormatter_(lat)
-      };
-    }
-    this.parallels_[index++] = lineString;
-  }
-  return index;
-};
-
-
-/**
- * @param {ol.geom.LineString} lineString Parallels.
- * @param {ol.Extent} extent Extent.
- * @param {number} index Index.
- * @return {ol.geom.Point} Parallel point.
- * @private
- */
-ol.Graticule.prototype.getParallelPoint_ = function(lineString, extent, index) {
-  var flatCoordinates = lineString.getFlatCoordinates();
-  var clampedLeft = Math.max(extent[0], flatCoordinates[0]);
-  var clampedRight = Math.min(extent[2], flatCoordinates[flatCoordinates.length - 2]);
-  var lon = ol.math.clamp(
-      extent[0] + Math.abs(extent[0] - extent[2]) * this.latLabelPosition_,
-      clampedLeft, clampedRight);
-  var coordinate = [lon, flatCoordinates[1]];
-  var point = this.parallelsLabels_[index] !== undefined ?
-      this.parallelsLabels_[index].geom : new ol.geom.Point(null);
-  point.setCoordinates(coordinate);
-  return point;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} squaredTolerance Squared tolerance.
- * @private
- */
-ol.Graticule.prototype.createGraticule_ = function(extent, center, resolution, squaredTolerance) {
-
-  var interval = this.getInterval_(resolution);
-  if (interval == -1) {
-    this.meridians_.length = this.parallels_.length = 0;
-    if (this.meridiansLabels_) {
-      this.meridiansLabels_.length = 0;
-    }
-    if (this.parallelsLabels_) {
-      this.parallelsLabels_.length = 0;
-    }
-    return;
-  }
-
-  var centerLonLat = this.toLonLatTransform_(center);
-  var centerLon = centerLonLat[0];
-  var centerLat = centerLonLat[1];
-  var maxLines = this.maxLines_;
-  var cnt, idx, lat, lon;
-
-  var validExtent = [
-    Math.max(extent[0], this.minLonP_),
-    Math.max(extent[1], this.minLatP_),
-    Math.min(extent[2], this.maxLonP_),
-    Math.min(extent[3], this.maxLatP_)
-  ];
-
-  validExtent = ol.proj.transformExtent(validExtent, this.projection_,
-      'EPSG:4326');
-  var maxLat = validExtent[3];
-  var maxLon = validExtent[2];
-  var minLat = validExtent[1];
-  var minLon = validExtent[0];
-
-  // Create meridians
-
-  centerLon = Math.floor(centerLon / interval) * interval;
-  lon = ol.math.clamp(centerLon, this.minLon_, this.maxLon_);
-
-  idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, 0);
-
-  cnt = 0;
-  while (lon != this.minLon_ && cnt++ < maxLines) {
-    lon = Math.max(lon - interval, this.minLon_);
-    idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);
-  }
-
-  lon = ol.math.clamp(centerLon, this.minLon_, this.maxLon_);
-
-  cnt = 0;
-  while (lon != this.maxLon_ && cnt++ < maxLines) {
-    lon = Math.min(lon + interval, this.maxLon_);
-    idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);
-  }
-
-  this.meridians_.length = idx;
-  if (this.meridiansLabels_) {
-    this.meridiansLabels_.length = idx;
-  }
-
-  // Create parallels
-
-  centerLat = Math.floor(centerLat / interval) * interval;
-  lat = ol.math.clamp(centerLat, this.minLat_, this.maxLat_);
-
-  idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, 0);
-
-  cnt = 0;
-  while (lat != this.minLat_ && cnt++ < maxLines) {
-    lat = Math.max(lat - interval, this.minLat_);
-    idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);
-  }
-
-  lat = ol.math.clamp(centerLat, this.minLat_, this.maxLat_);
-
-  cnt = 0;
-  while (lat != this.maxLat_ && cnt++ < maxLines) {
-    lat = Math.min(lat + interval, this.maxLat_);
-    idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);
-  }
-
-  this.parallels_.length = idx;
-  if (this.parallelsLabels_) {
-    this.parallelsLabels_.length = idx;
-  }
-
-};
-
-
-/**
- * @param {number} resolution Resolution.
- * @return {number} The interval in degrees.
- * @private
- */
-ol.Graticule.prototype.getInterval_ = function(resolution) {
-  var centerLon = this.projectionCenterLonLat_[0];
-  var centerLat = this.projectionCenterLonLat_[1];
-  var interval = -1;
-  var i, ii, delta, dist;
-  var target = Math.pow(this.targetSize_ * resolution, 2);
-  /** @type {Array.<number>} **/
-  var p1 = [];
-  /** @type {Array.<number>} **/
-  var p2 = [];
-  for (i = 0, ii = ol.Graticule.intervals_.length; i < ii; ++i) {
-    delta = ol.Graticule.intervals_[i] / 2;
-    p1[0] = centerLon - delta;
-    p1[1] = centerLat - delta;
-    p2[0] = centerLon + delta;
-    p2[1] = centerLat + delta;
-    this.fromLonLatTransform_(p1, p1);
-    this.fromLonLatTransform_(p2, p2);
-    dist = Math.pow(p2[0] - p1[0], 2) + Math.pow(p2[1] - p1[1], 2);
-    if (dist <= target) {
-      break;
-    }
-    interval = ol.Graticule.intervals_[i];
-  }
-  return interval;
-};
-
-
-/**
- * Get the map associated with this graticule.
- * @return {ol.Map} The map.
- * @api
- */
-ol.Graticule.prototype.getMap = function() {
-  return this.map_;
-};
-
-
-/**
- * @param {number} lon Longitude.
- * @param {number} minLat Minimal latitude.
- * @param {number} maxLat Maximal latitude.
- * @param {number} squaredTolerance Squared tolerance.
- * @return {ol.geom.LineString} The meridian line string.
- * @param {number} index Index.
- * @private
- */
-ol.Graticule.prototype.getMeridian_ = function(lon, minLat, maxLat,
-                                               squaredTolerance, index) {
-  var flatCoordinates = ol.geom.flat.geodesic.meridian(lon,
-     minLat, maxLat, this.projection_, squaredTolerance);
-  var lineString = this.meridians_[index] !== undefined ?
-     this.meridians_[index] : new ol.geom.LineString(null);
-  lineString.setFlatCoordinates(ol.geom.GeometryLayout.XY, flatCoordinates);
-  return lineString;
-};
-
-
-/**
- * Get the list of meridians.  Meridians are lines of equal longitude.
- * @return {Array.<ol.geom.LineString>} The meridians.
- * @api
- */
-ol.Graticule.prototype.getMeridians = function() {
-  return this.meridians_;
-};
-
-
-/**
- * @param {number} lat Latitude.
- * @param {number} minLon Minimal longitude.
- * @param {number} maxLon Maximal longitude.
- * @param {number} squaredTolerance Squared tolerance.
- * @return {ol.geom.LineString} The parallel line string.
- * @param {number} index Index.
- * @private
- */
-ol.Graticule.prototype.getParallel_ = function(lat, minLon, maxLon,
-                                               squaredTolerance, index) {
-  var flatCoordinates = ol.geom.flat.geodesic.parallel(lat,
-     this.minLon_, this.maxLon_, this.projection_, squaredTolerance);
-  var lineString = this.parallels_[index] !== undefined ?
-     this.parallels_[index] : new ol.geom.LineString(null);
-  lineString.setFlatCoordinates(ol.geom.GeometryLayout.XY, flatCoordinates);
-  return lineString;
-};
-
-
-/**
- * Get the list of parallels.  Pallels are lines of equal latitude.
- * @return {Array.<ol.geom.LineString>} The parallels.
- * @api
- */
-ol.Graticule.prototype.getParallels = function() {
-  return this.parallels_;
-};
-
-
-/**
- * @param {ol.render.Event} e Event.
- * @private
- */
-ol.Graticule.prototype.handlePostCompose_ = function(e) {
-  var vectorContext = e.vectorContext;
-  var frameState = e.frameState;
-  var extent = frameState.extent;
-  var viewState = frameState.viewState;
-  var center = viewState.center;
-  var projection = viewState.projection;
-  var resolution = viewState.resolution;
-  var pixelRatio = frameState.pixelRatio;
-  var squaredTolerance =
-      resolution * resolution / (4 * pixelRatio * pixelRatio);
-
-  var updateProjectionInfo = !this.projection_ ||
-      !ol.proj.equivalent(this.projection_, projection);
-
-  if (updateProjectionInfo) {
-    this.updateProjectionInfo_(projection);
-  }
-
-  //Fix the extent if wrapped.
-  //(note: this is the same extent as vectorContext.extent_)
-  var offsetX = 0;
-  if (projection.canWrapX()) {
-    var projectionExtent = projection.getExtent();
-    var worldWidth = ol.extent.getWidth(projectionExtent);
-    var x = frameState.focus[0];
-    if (x < projectionExtent[0] || x > projectionExtent[2]) {
-      var worldsAway = Math.ceil((projectionExtent[0] - x) / worldWidth);
-      offsetX = worldWidth * worldsAway;
-      extent = [
-        extent[0] + offsetX, extent[1],
-        extent[2] + offsetX, extent[3]
-      ];
-    }
-  }
-
-  this.createGraticule_(extent, center, resolution, squaredTolerance);
-
-  // Draw the lines
-  vectorContext.setFillStrokeStyle(null, this.strokeStyle_);
-  var i, l, line;
-  for (i = 0, l = this.meridians_.length; i < l; ++i) {
-    line = this.meridians_[i];
-    vectorContext.drawGeometry(line);
-  }
-  for (i = 0, l = this.parallels_.length; i < l; ++i) {
-    line = this.parallels_[i];
-    vectorContext.drawGeometry(line);
-  }
-  var labelData;
-  if (this.meridiansLabels_) {
-    for (i = 0, l = this.meridiansLabels_.length; i < l; ++i) {
-      labelData = this.meridiansLabels_[i];
-      this.lonLabelStyle_.setText(labelData.text);
-      vectorContext.setTextStyle(this.lonLabelStyle_);
-      vectorContext.drawGeometry(labelData.geom);
-    }
-  }
-  if (this.parallelsLabels_) {
-    for (i = 0, l = this.parallelsLabels_.length; i < l; ++i) {
-      labelData = this.parallelsLabels_[i];
-      this.latLabelStyle_.setText(labelData.text);
-      vectorContext.setTextStyle(this.latLabelStyle_);
-      vectorContext.drawGeometry(labelData.geom);
-    }
-  }
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @private
- */
-ol.Graticule.prototype.updateProjectionInfo_ = function(projection) {
-  var epsg4326Projection = ol.proj.get('EPSG:4326');
-
-  var extent = projection.getExtent();
-  var worldExtent = projection.getWorldExtent();
-  var worldExtentP = ol.proj.transformExtent(worldExtent,
-     epsg4326Projection, projection);
-
-  var maxLat = worldExtent[3];
-  var maxLon = worldExtent[2];
-  var minLat = worldExtent[1];
-  var minLon = worldExtent[0];
-
-  var maxLatP = worldExtentP[3];
-  var maxLonP = worldExtentP[2];
-  var minLatP = worldExtentP[1];
-  var minLonP = worldExtentP[0];
-
-  this.maxLat_ = maxLat;
-  this.maxLon_ = maxLon;
-  this.minLat_ = minLat;
-  this.minLon_ = minLon;
-
-  this.maxLatP_ = maxLatP;
-  this.maxLonP_ = maxLonP;
-  this.minLatP_ = minLatP;
-  this.minLonP_ = minLonP;
-
-
-  this.fromLonLatTransform_ = ol.proj.getTransform(
-     epsg4326Projection, projection);
-
-  this.toLonLatTransform_ = ol.proj.getTransform(
-     projection, epsg4326Projection);
-
-  this.projectionCenterLonLat_ = this.toLonLatTransform_(
-     ol.extent.getCenter(extent));
-
-  this.projection_ = projection;
-};
-
-
-/**
- * Set the map for this graticule.  The graticule will be rendered on the
- * provided map.
- * @param {ol.Map} map Map.
- * @api
- */
-ol.Graticule.prototype.setMap = function(map) {
-  if (this.map_) {
-    this.map_.un(ol.render.EventType.POSTCOMPOSE,
-        this.handlePostCompose_, this);
-    this.map_.render();
-  }
-  if (map) {
-    map.on(ol.render.EventType.POSTCOMPOSE,
-        this.handlePostCompose_, this);
-    map.render();
-  }
-  this.map_ = map;
-};
-
-goog.provide('ol.ImageBase');
-
-goog.require('ol');
-goog.require('ol.events.EventTarget');
-goog.require('ol.events.EventType');
-
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.events.EventTarget}
- * @param {ol.Extent} extent Extent.
- * @param {number|undefined} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.ImageState} state State.
- * @param {Array.<ol.Attribution>} attributions Attributions.
- */
-ol.ImageBase = function(extent, resolution, pixelRatio, state, attributions) {
-
-  ol.events.EventTarget.call(this);
-
-  /**
-   * @private
-   * @type {Array.<ol.Attribution>}
-   */
-  this.attributions_ = attributions;
-
-  /**
-   * @protected
-   * @type {ol.Extent}
-   */
-  this.extent = extent;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelRatio_ = pixelRatio;
-
-  /**
-   * @protected
-   * @type {number|undefined}
-   */
-  this.resolution = resolution;
-
-  /**
-   * @protected
-   * @type {ol.ImageState}
-   */
-  this.state = state;
-
-};
-ol.inherits(ol.ImageBase, ol.events.EventTarget);
-
-
-/**
- * @protected
- */
-ol.ImageBase.prototype.changed = function() {
-  this.dispatchEvent(ol.events.EventType.CHANGE);
-};
-
-
-/**
- * @return {Array.<ol.Attribution>} Attributions.
- */
-ol.ImageBase.prototype.getAttributions = function() {
-  return this.attributions_;
-};
-
-
-/**
- * @return {ol.Extent} Extent.
- */
-ol.ImageBase.prototype.getExtent = function() {
-  return this.extent;
-};
-
-
-/**
- * @abstract
- * @param {Object=} opt_context Object.
- * @return {HTMLCanvasElement|Image|HTMLVideoElement} Image.
- */
-ol.ImageBase.prototype.getImage = function(opt_context) {};
-
-
-/**
- * @return {number} PixelRatio.
- */
-ol.ImageBase.prototype.getPixelRatio = function() {
-  return this.pixelRatio_;
-};
-
-
-/**
- * @return {number} Resolution.
- */
-ol.ImageBase.prototype.getResolution = function() {
-  return /** @type {number} */ (this.resolution);
-};
-
-
-/**
- * @return {ol.ImageState} State.
- */
-ol.ImageBase.prototype.getState = function() {
-  return this.state;
-};
-
-
-/**
- * Load not yet loaded URI.
- * @abstract
- */
-ol.ImageBase.prototype.load = function() {};
-
-goog.provide('ol.Image');
-
-goog.require('ol');
-goog.require('ol.ImageBase');
-goog.require('ol.ImageState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.obj');
-
-
-/**
- * @constructor
- * @extends {ol.ImageBase}
- * @param {ol.Extent} extent Extent.
- * @param {number|undefined} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {Array.<ol.Attribution>} attributions Attributions.
- * @param {string} src Image source URI.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.ImageLoadFunctionType} imageLoadFunction Image load function.
- */
-ol.Image = function(extent, resolution, pixelRatio, attributions, src,
-    crossOrigin, imageLoadFunction) {
-
-  ol.ImageBase.call(this, extent, resolution, pixelRatio, ol.ImageState.IDLE,
-      attributions);
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.src_ = src;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement|Image|HTMLVideoElement}
-   */
-  this.image_ = new Image();
-  if (crossOrigin !== null) {
-    this.image_.crossOrigin = crossOrigin;
-  }
-
-  /**
-   * @private
-   * @type {Object.<number, (HTMLCanvasElement|Image|HTMLVideoElement)>}
-   */
-  this.imageByContext_ = {};
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.imageListenerKeys_ = null;
-
-  /**
-   * @protected
-   * @type {ol.ImageState}
-   */
-  this.state = ol.ImageState.IDLE;
-
-  /**
-   * @private
-   * @type {ol.ImageLoadFunctionType}
-   */
-  this.imageLoadFunction_ = imageLoadFunction;
-
-};
-ol.inherits(ol.Image, ol.ImageBase);
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.Image.prototype.getImage = function(opt_context) {
-  if (opt_context !== undefined) {
-    var image;
-    var key = ol.getUid(opt_context);
-    if (key in this.imageByContext_) {
-      return this.imageByContext_[key];
-    } else if (ol.obj.isEmpty(this.imageByContext_)) {
-      image = this.image_;
-    } else {
-      image = /** @type {Image} */ (this.image_.cloneNode(false));
-    }
-    this.imageByContext_[key] = image;
-    return image;
-  } else {
-    return this.image_;
-  }
-};
-
-
-/**
- * Tracks loading or read errors.
- *
- * @private
- */
-ol.Image.prototype.handleImageError_ = function() {
-  this.state = ol.ImageState.ERROR;
-  this.unlistenImage_();
-  this.changed();
-};
-
-
-/**
- * Tracks successful image load.
- *
- * @private
- */
-ol.Image.prototype.handleImageLoad_ = function() {
-  if (this.resolution === undefined) {
-    this.resolution = ol.extent.getHeight(this.extent) / this.image_.height;
-  }
-  this.state = ol.ImageState.LOADED;
-  this.unlistenImage_();
-  this.changed();
-};
-
-
-/**
- * Load the image or retry if loading previously failed.
- * Loading is taken care of by the tile queue, and calling this method is
- * only needed for preloading or for reloading in case of an error.
- * @override
- * @api
- */
-ol.Image.prototype.load = function() {
-  if (this.state == ol.ImageState.IDLE || this.state == ol.ImageState.ERROR) {
-    this.state = ol.ImageState.LOADING;
-    this.changed();
-    this.imageListenerKeys_ = [
-      ol.events.listenOnce(this.image_, ol.events.EventType.ERROR,
-          this.handleImageError_, this),
-      ol.events.listenOnce(this.image_, ol.events.EventType.LOAD,
-          this.handleImageLoad_, this)
-    ];
-    this.imageLoadFunction_(this, this.src_);
-  }
-};
-
-
-/**
- * @param {HTMLCanvasElement|Image|HTMLVideoElement} image Image.
- */
-ol.Image.prototype.setImage = function(image) {
-  this.image_ = image;
-};
-
-
-/**
- * Discards event handlers which listen for load completion or errors.
- *
- * @private
- */
-ol.Image.prototype.unlistenImage_ = function() {
-  this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.imageListenerKeys_ = null;
-};
-
-goog.provide('ol.ImageCanvas');
-
-goog.require('ol');
-goog.require('ol.ImageBase');
-goog.require('ol.ImageState');
-
-
-/**
- * @constructor
- * @extends {ol.ImageBase}
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {Array.<ol.Attribution>} attributions Attributions.
- * @param {HTMLCanvasElement} canvas Canvas.
- * @param {ol.ImageCanvasLoader=} opt_loader Optional loader function to
- *     support asynchronous canvas drawing.
- */
-ol.ImageCanvas = function(extent, resolution, pixelRatio, attributions,
-    canvas, opt_loader) {
-
-  /**
-   * Optional canvas loader function.
-   * @type {?ol.ImageCanvasLoader}
-   * @private
-   */
-  this.loader_ = opt_loader !== undefined ? opt_loader : null;
-
-  var state = opt_loader !== undefined ?
-      ol.ImageState.IDLE : ol.ImageState.LOADED;
-
-  ol.ImageBase.call(this, extent, resolution, pixelRatio, state, attributions);
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = canvas;
-
-  /**
-   * @private
-   * @type {Error}
-   */
-  this.error_ = null;
-
-};
-ol.inherits(ol.ImageCanvas, ol.ImageBase);
-
-
-/**
- * Get any error associated with asynchronous rendering.
- * @return {Error} Any error that occurred during rendering.
- */
-ol.ImageCanvas.prototype.getError = function() {
-  return this.error_;
-};
-
-
-/**
- * Handle async drawing complete.
- * @param {Error} err Any error during drawing.
- * @private
- */
-ol.ImageCanvas.prototype.handleLoad_ = function(err) {
-  if (err) {
-    this.error_ = err;
-    this.state = ol.ImageState.ERROR;
-  } else {
-    this.state = ol.ImageState.LOADED;
-  }
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.ImageCanvas.prototype.load = function() {
-  if (this.state == ol.ImageState.IDLE) {
-    this.state = ol.ImageState.LOADING;
-    this.changed();
-    this.loader_(this.handleLoad_.bind(this));
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.ImageCanvas.prototype.getImage = function(opt_context) {
-  return this.canvas_;
-};
-
-goog.provide('ol.Tile');
-
-goog.require('ol');
-goog.require('ol.TileState');
-goog.require('ol.events.EventTarget');
-goog.require('ol.events.EventType');
-
-
-/**
- * @classdesc
- * Base class for tiles.
- *
- * @constructor
- * @abstract
- * @extends {ol.events.EventTarget}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- */
-ol.Tile = function(tileCoord, state) {
-
-  ol.events.EventTarget.call(this);
-
-  /**
-   * @type {ol.TileCoord}
-   */
-  this.tileCoord = tileCoord;
-
-  /**
-   * @protected
-   * @type {ol.TileState}
-   */
-  this.state = state;
-
-  /**
-   * An "interim" tile for this tile. The interim tile may be used while this
-   * one is loading, for "smooth" transitions when changing params/dimensions
-   * on the source.
-   * @type {ol.Tile}
-   */
-  this.interimTile = null;
-
-  /**
-   * A key assigned to the tile. This is used by the tile source to determine
-   * if this tile can effectively be used, or if a new tile should be created
-   * and this one be used as an interim tile for this new tile.
-   * @type {string}
-   */
-  this.key = '';
-
-};
-ol.inherits(ol.Tile, ol.events.EventTarget);
-
-
-/**
- * @protected
- */
-ol.Tile.prototype.changed = function() {
-  this.dispatchEvent(ol.events.EventType.CHANGE);
-};
-
-
-/**
- * @return {string} Key.
- */
-ol.Tile.prototype.getKey = function() {
-  return this.key + '/' + this.tileCoord;
-};
-
-/**
- * Get the interim tile most suitable for rendering using the chain of interim
- * tiles. This corresponds to the  most recent tile that has been loaded, if no
- * such tile exists, the original tile is returned.
- * @return {!ol.Tile} Best tile for rendering.
- */
-ol.Tile.prototype.getInterimTile = function() {
-  if (!this.interimTile) {
-    //empty chain
-    return this;
-  }
-  var tile = this.interimTile;
-
-  // find the first loaded tile and return it. Since the chain is sorted in
-  // decreasing order of creation time, there is no need to search the remainder
-  // of the list (all those tiles correspond to older requests and will be
-  // cleaned up by refreshInterimChain)
-  do {
-    if (tile.getState() == ol.TileState.LOADED) {
-      return tile;
-    }
-    tile = tile.interimTile;
-  } while (tile);
-
-  // we can not find a better tile
-  return this;
-};
-
-/**
- * Goes through the chain of interim tiles and discards sections of the chain
- * that are no longer relevant.
- */
-ol.Tile.prototype.refreshInterimChain = function() {
-  if (!this.interimTile) {
-    return;
-  }
-
-  var tile = this.interimTile;
-  var prev = this;
-
-  do {
-    if (tile.getState() == ol.TileState.LOADED) {
-      //we have a loaded tile, we can discard the rest of the list
-      //we would could abort any LOADING tile request
-      //older than this tile (i.e. any LOADING tile following this entry in the chain)
-      tile.interimTile = null;
-      break;
-    } else if (tile.getState() == ol.TileState.LOADING) {
-      //keep this LOADING tile any loaded tiles later in the chain are
-      //older than this tile, so we're still interested in the request
-      prev = tile;
-    } else if (tile.getState() == ol.TileState.IDLE) {
-      //the head of the list is the most current tile, we don't need
-      //to start any other requests for this chain
-      prev.interimTile = tile.interimTile;
-    } else {
-      prev = tile;
-    }
-    tile = prev.interimTile;
-  } while (tile);
-};
-
-/**
- * Get the tile coordinate for this tile.
- * @return {ol.TileCoord} The tile coordinate.
- * @api
- */
-ol.Tile.prototype.getTileCoord = function() {
-  return this.tileCoord;
-};
-
-
-/**
- * @return {ol.TileState} State.
- */
-ol.Tile.prototype.getState = function() {
-  return this.state;
-};
-
-/**
- * @param {ol.TileState} state State.
- */
-ol.Tile.prototype.setState = function(state) {
-  this.state = state;
-  this.changed();
-};
-
-/**
- * Load the image or retry if loading previously failed.
- * Loading is taken care of by the tile queue, and calling this method is
- * only needed for preloading or for reloading in case of an error.
- * @abstract
- * @api
- */
-ol.Tile.prototype.load = function() {};
-
-goog.provide('ol.ImageTile');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-
-
-/**
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {string} src Image source URI.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
- */
-ol.ImageTile = function(tileCoord, state, src, crossOrigin, tileLoadFunction) {
-
-  ol.Tile.call(this, tileCoord, state);
-
-  /**
-   * Image URI
-   *
-   * @private
-   * @type {string}
-   */
-  this.src_ = src;
-
-  /**
-   * @private
-   * @type {Image}
-   */
-  this.image_ = new Image();
-  if (crossOrigin !== null) {
-    this.image_.crossOrigin = crossOrigin;
-  }
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.imageListenerKeys_ = null;
-
-  /**
-   * @private
-   * @type {ol.TileLoadFunctionType}
-   */
-  this.tileLoadFunction_ = tileLoadFunction;
-
-};
-ol.inherits(ol.ImageTile, ol.Tile);
-
-
-/**
- * @inheritDoc
- */
-ol.ImageTile.prototype.disposeInternal = function() {
-  if (this.state == ol.TileState.LOADING) {
-    this.unlistenImage_();
-  }
-  if (this.interimTile) {
-    this.interimTile.dispose();
-  }
-  this.state = ol.TileState.ABORT;
-  this.changed();
-  ol.Tile.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Get the HTML image element for this tile (may be a Canvas, Image, or Video).
- * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
- * @api
- */
-ol.ImageTile.prototype.getImage = function() {
-  return this.image_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.ImageTile.prototype.getKey = function() {
-  return this.src_;
-};
-
-
-/**
- * Tracks loading or read errors.
- *
- * @private
- */
-ol.ImageTile.prototype.handleImageError_ = function() {
-  this.state = ol.TileState.ERROR;
-  this.image_ = ol.ImageTile.blankImage;
-  this.unlistenImage_();
-  this.changed();
-};
-
-
-/**
- * Tracks successful image load.
- *
- * @private
- */
-ol.ImageTile.prototype.handleImageLoad_ = function() {
-  if (this.image_.naturalWidth && this.image_.naturalHeight) {
-    this.state = ol.TileState.LOADED;
-  } else {
-    this.state = ol.TileState.EMPTY;
-  }
-  this.unlistenImage_();
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.ImageTile.prototype.load = function() {
-  if (this.state == ol.TileState.IDLE || this.state == ol.TileState.ERROR) {
-    this.state = ol.TileState.LOADING;
-    this.changed();
-    this.imageListenerKeys_ = [
-      ol.events.listenOnce(this.image_, ol.events.EventType.ERROR,
-          this.handleImageError_, this),
-      ol.events.listenOnce(this.image_, ol.events.EventType.LOAD,
-          this.handleImageLoad_, this)
-    ];
-    this.tileLoadFunction_(this, this.src_);
-  }
-};
-
-
-/**
- * Discards event handlers which listen for load completion or errors.
- *
- * @private
- */
-ol.ImageTile.prototype.unlistenImage_ = function() {
-  this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.imageListenerKeys_ = null;
-};
-
-
-/**
- * A blank image.
- * @type {Image}
- */
-ol.ImageTile.blankImage = new Image();
-ol.ImageTile.blankImage.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
-
-// FIXME should handle all geo-referenced data, not just vector data
-
-goog.provide('ol.interaction.DragAndDrop');
-
-goog.require('ol');
-goog.require('ol.functions');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Handles input of vector data by drag and drop.
- *
- * @constructor
- * @extends {ol.interaction.Interaction}
- * @fires ol.interaction.DragAndDrop.Event
- * @param {olx.interaction.DragAndDropOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragAndDrop = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.DragAndDrop.handleEvent
-  });
-
-  /**
-   * @private
-   * @type {Array.<function(new: ol.format.Feature)>}
-   */
-  this.formatConstructors_ = options.formatConstructors ?
-      options.formatConstructors : [];
-
-  /**
-   * @private
-   * @type {ol.proj.Projection}
-   */
-  this.projection_ = options.projection ?
-      ol.proj.get(options.projection) : null;
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.dropListenKeys_ = null;
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.target = options.target ? options.target : null;
-
-};
-ol.inherits(ol.interaction.DragAndDrop, ol.interaction.Interaction);
-
-
-/**
- * @param {Event} event Event.
- * @this {ol.interaction.DragAndDrop}
- * @private
- */
-ol.interaction.DragAndDrop.handleDrop_ = function(event) {
-  var files = event.dataTransfer.files;
-  var i, ii, file;
-  for (i = 0, ii = files.length; i < ii; ++i) {
-    file = files.item(i);
-    var reader = new FileReader();
-    reader.addEventListener(ol.events.EventType.LOAD,
-        this.handleResult_.bind(this, file));
-    reader.readAsText(file);
-  }
-};
-
-
-/**
- * @param {Event} event Event.
- * @private
- */
-ol.interaction.DragAndDrop.handleStop_ = function(event) {
-  event.stopPropagation();
-  event.preventDefault();
-  event.dataTransfer.dropEffect = 'copy';
-};
-
-
-/**
- * @param {File} file File.
- * @param {Event} event Load event.
- * @private
- */
-ol.interaction.DragAndDrop.prototype.handleResult_ = function(file, event) {
-  var result = event.target.result;
-  var map = this.getMap();
-  var projection = this.projection_;
-  if (!projection) {
-    var view = map.getView();
-    projection = view.getProjection();
-  }
-
-  var formatConstructors = this.formatConstructors_;
-  var features = [];
-  var i, ii;
-  for (i = 0, ii = formatConstructors.length; i < ii; ++i) {
-    /**
-     * Avoid "cannot instantiate abstract class" error.
-     * @type {Function}
-     */
-    var formatConstructor = formatConstructors[i];
-    /**
-     * @type {ol.format.Feature}
-     */
-    var format = new formatConstructor();
-    features = this.tryReadFeatures_(format, result, {
-      featureProjection: projection
-    });
-    if (features && features.length > 0) {
-      break;
-    }
-  }
-  this.dispatchEvent(
-      new ol.interaction.DragAndDrop.Event(
-          ol.interaction.DragAndDrop.EventType_.ADD_FEATURES, file,
-          features, projection));
-};
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} unconditionally and
- * neither prevents the browser default nor stops event propagation.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.DragAndDrop}
- * @api
- */
-ol.interaction.DragAndDrop.handleEvent = ol.functions.TRUE;
-
-
-/**
- * @private
- */
-ol.interaction.DragAndDrop.prototype.registerListeners_ = function() {
-  var map = this.getMap();
-  if (map) {
-    var dropArea = this.target ? this.target : map.getViewport();
-    this.dropListenKeys_ = [
-      ol.events.listen(dropArea, ol.events.EventType.DROP,
-          ol.interaction.DragAndDrop.handleDrop_, this),
-      ol.events.listen(dropArea, ol.events.EventType.DRAGENTER,
-          ol.interaction.DragAndDrop.handleStop_, this),
-      ol.events.listen(dropArea, ol.events.EventType.DRAGOVER,
-          ol.interaction.DragAndDrop.handleStop_, this),
-      ol.events.listen(dropArea, ol.events.EventType.DROP,
-          ol.interaction.DragAndDrop.handleStop_, this)
-    ];
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.DragAndDrop.prototype.setActive = function(active) {
-  ol.interaction.Interaction.prototype.setActive.call(this, active);
-  if (active) {
-    this.registerListeners_();
-  } else {
-    this.unregisterListeners_();
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.DragAndDrop.prototype.setMap = function(map) {
-  this.unregisterListeners_();
-  ol.interaction.Interaction.prototype.setMap.call(this, map);
-  if (this.getActive()) {
-    this.registerListeners_();
-  }
-};
-
-
-/**
- * @param {ol.format.Feature} format Format.
- * @param {string} text Text.
- * @param {olx.format.ReadOptions} options Read options.
- * @private
- * @return {Array.<ol.Feature>} Features.
- */
-ol.interaction.DragAndDrop.prototype.tryReadFeatures_ = function(format, text, options) {
-  try {
-    return format.readFeatures(text, options);
-  } catch (e) {
-    return null;
-  }
-};
-
-
-/**
- * @private
- */
-ol.interaction.DragAndDrop.prototype.unregisterListeners_ = function() {
-  if (this.dropListenKeys_) {
-    this.dropListenKeys_.forEach(ol.events.unlistenByKey);
-    this.dropListenKeys_ = null;
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.interaction.DragAndDrop.EventType_ = {
-  /**
-   * Triggered when features are added
-   * @event ol.interaction.DragAndDrop.Event#addfeatures
-   * @api
-   */
-  ADD_FEATURES: 'addfeatures'
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.DragAndDrop} instances are instances
- * of this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.interaction.DragAndDropEvent}
- * @param {ol.interaction.DragAndDrop.EventType_} type Type.
- * @param {File} file File.
- * @param {Array.<ol.Feature>=} opt_features Features.
- * @param {ol.proj.Projection=} opt_projection Projection.
- */
-ol.interaction.DragAndDrop.Event = function(type, file, opt_features, opt_projection) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The features parsed from dropped data.
-   * @type {Array.<ol.Feature>|undefined}
-   * @api
-   */
-  this.features = opt_features;
-
-  /**
-   * The dropped file.
-   * @type {File}
-   * @api
-   */
-  this.file = file;
-
-  /**
-   * The feature projection.
-   * @type {ol.proj.Projection|undefined}
-   * @api
-   */
-  this.projection = opt_projection;
-
-};
-ol.inherits(ol.interaction.DragAndDrop.Event, ol.events.Event);
-
-goog.provide('ol.interaction.DragRotateAndZoom');
-
-goog.require('ol');
-goog.require('ol.RotationConstraint');
-goog.require('ol.ViewHint');
-goog.require('ol.events.condition');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.interaction.Pointer');
-
-
-/**
- * @classdesc
- * Allows the user to zoom and rotate the map by clicking and dragging
- * on the map.  By default, this interaction is limited to when the shift
- * key is held down.
- *
- * This interaction is only supported for mouse devices.
- *
- * And this interaction is not included in the default interactions.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.DragRotateAndZoomOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragRotateAndZoom = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.DragRotateAndZoom.handleDownEvent_,
-    handleDragEvent: ol.interaction.DragRotateAndZoom.handleDragEvent_,
-    handleUpEvent: ol.interaction.DragRotateAndZoom.handleUpEvent_
-  });
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-      options.condition : ol.events.condition.shiftKeyOnly;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lastAngle_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lastMagnitude_ = undefined;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.lastScaleDelta_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 400;
-
-};
-ol.inherits(ol.interaction.DragRotateAndZoom, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.DragRotateAndZoom}
- * @private
- */
-ol.interaction.DragRotateAndZoom.handleDragEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return;
-  }
-
-  var map = mapBrowserEvent.map;
-  var size = map.getSize();
-  var offset = mapBrowserEvent.pixel;
-  var deltaX = offset[0] - size[0] / 2;
-  var deltaY = size[1] / 2 - offset[1];
-  var theta = Math.atan2(deltaY, deltaX);
-  var magnitude = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
-  var view = map.getView();
-  if (view.getConstraints().rotation !== ol.RotationConstraint.disable && this.lastAngle_ !== undefined) {
-    var angleDelta = theta - this.lastAngle_;
-    ol.interaction.Interaction.rotateWithoutConstraints(
-        view, view.getRotation() - angleDelta);
-  }
-  this.lastAngle_ = theta;
-  if (this.lastMagnitude_ !== undefined) {
-    var resolution = this.lastMagnitude_ * (view.getResolution() / magnitude);
-    ol.interaction.Interaction.zoomWithoutConstraints(view, resolution);
-  }
-  if (this.lastMagnitude_ !== undefined) {
-    this.lastScaleDelta_ = this.lastMagnitude_ / magnitude;
-  }
-  this.lastMagnitude_ = magnitude;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.DragRotateAndZoom}
- * @private
- */
-ol.interaction.DragRotateAndZoom.handleUpEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return true;
-  }
-
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  view.setHint(ol.ViewHint.INTERACTING, -1);
-  var direction = this.lastScaleDelta_ - 1;
-  ol.interaction.Interaction.rotate(view, view.getRotation());
-  ol.interaction.Interaction.zoom(view, view.getResolution(),
-      undefined, this.duration_, direction);
-  this.lastScaleDelta_ = 0;
-  return false;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.DragRotateAndZoom}
- * @private
- */
-ol.interaction.DragRotateAndZoom.handleDownEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return false;
-  }
-
-  if (this.condition_(mapBrowserEvent)) {
-    mapBrowserEvent.map.getView().setHint(ol.ViewHint.INTERACTING, 1);
-    this.lastAngle_ = undefined;
-    this.lastMagnitude_ = undefined;
-    return true;
-  } else {
-    return false;
-  }
-};
-
-goog.provide('ol.interaction.DrawEventType');
-
-
-/**
- * @enum {string}
- */
-ol.interaction.DrawEventType = {
-  /**
-   * Triggered upon feature draw start
-   * @event ol.interaction.Draw.Event#drawstart
-   * @api
-   */
-  DRAWSTART: 'drawstart',
-  /**
-   * Triggered upon feature draw end
-   * @event ol.interaction.Draw.Event#drawend
-   * @api
-   */
-  DRAWEND: 'drawend'
-};
-
-goog.provide('ol.render.canvas.Instruction');
-
-/**
- * @enum {number}
- */
-ol.render.canvas.Instruction = {
-  BEGIN_GEOMETRY: 0,
-  BEGIN_PATH: 1,
-  CIRCLE: 2,
-  CLOSE_PATH: 3,
-  DRAW_IMAGE: 4,
-  DRAW_TEXT: 5,
-  END_GEOMETRY: 6,
-  FILL: 7,
-  MOVE_TO_LINE_TO: 8,
-  SET_FILL_STYLE: 9,
-  SET_STROKE_STYLE: 10,
-  SET_TEXT_STYLE: 11,
-  STROKE: 12
-};
-
-goog.provide('ol.render.canvas.Replay');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.extent.Relationship');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.has');
-goog.require('ol.obj');
-goog.require('ol.render.VectorContext');
-goog.require('ol.render.canvas.Instruction');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.render.VectorContext}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Maximum extent.
- * @param {number} resolution Resolution.
- * @param {boolean} overlaps The replay can have overlapping geometries.
- * @struct
- */
-ol.render.canvas.Replay = function(tolerance, maxExtent, resolution, overlaps) {
-  ol.render.VectorContext.call(this);
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.tolerance = tolerance;
-
-  /**
-   * @protected
-   * @const
-   * @type {ol.Extent}
-   */
-  this.maxExtent = maxExtent;
-
-  /**
-   * @protected
-   * @type {boolean}
-   */
-  this.overlaps = overlaps;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.maxLineWidth = 0;
-
-  /**
-   * @protected
-   * @const
-   * @type {number}
-   */
-  this.resolution = resolution;
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.fillOrigin_;
-
-  /**
-   * @private
-   * @type {Array.<*>}
-   */
-  this.beginGeometryInstruction1_ = null;
-
-  /**
-   * @private
-   * @type {Array.<*>}
-   */
-  this.beginGeometryInstruction2_ = null;
-
-  /**
-   * @protected
-   * @type {Array.<*>}
-   */
-  this.instructions = [];
-
-  /**
-   * @protected
-   * @type {Array.<number>}
-   */
-  this.coordinates = [];
-
-  /**
-   * @private
-   * @type {!ol.Transform}
-   */
-  this.renderedTransform_ = ol.transform.create();
-
-  /**
-   * @protected
-   * @type {Array.<*>}
-   */
-  this.hitDetectionInstructions = [];
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.pixelCoordinates_ = null;
-
-  /**
-   * @private
-   * @type {!ol.Transform}
-   */
-  this.tmpLocalTransform_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {!ol.Transform}
-   */
-  this.resetTransform_ = ol.transform.create();
-};
-ol.inherits(ol.render.canvas.Replay, ol.render.VectorContext);
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {boolean} closed Last input coordinate equals first.
- * @param {boolean} skipFirst Skip first coordinate.
- * @protected
- * @return {number} My end.
- */
-ol.render.canvas.Replay.prototype.appendFlatCoordinates = function(flatCoordinates, offset, end, stride, closed, skipFirst) {
-
-  var myEnd = this.coordinates.length;
-  var extent = this.getBufferedMaxExtent();
-  if (skipFirst) {
-    offset += stride;
-  }
-  var lastCoord = [flatCoordinates[offset], flatCoordinates[offset + 1]];
-  var nextCoord = [NaN, NaN];
-  var skipped = true;
-
-  var i, lastRel, nextRel;
-  for (i = offset + stride; i < end; i += stride) {
-    nextCoord[0] = flatCoordinates[i];
-    nextCoord[1] = flatCoordinates[i + 1];
-    nextRel = ol.extent.coordinateRelationship(extent, nextCoord);
-    if (nextRel !== lastRel) {
-      if (skipped) {
-        this.coordinates[myEnd++] = lastCoord[0];
-        this.coordinates[myEnd++] = lastCoord[1];
-      }
-      this.coordinates[myEnd++] = nextCoord[0];
-      this.coordinates[myEnd++] = nextCoord[1];
-      skipped = false;
-    } else if (nextRel === ol.extent.Relationship.INTERSECTING) {
-      this.coordinates[myEnd++] = nextCoord[0];
-      this.coordinates[myEnd++] = nextCoord[1];
-      skipped = false;
-    } else {
-      skipped = true;
-    }
-    lastCoord[0] = nextCoord[0];
-    lastCoord[1] = nextCoord[1];
-    lastRel = nextRel;
-  }
-
-  // Last coordinate equals first or only one point to append:
-  if ((closed && skipped) || i === offset + stride) {
-    this.coordinates[myEnd++] = lastCoord[0];
-    this.coordinates[myEnd++] = lastCoord[1];
-  }
-  return myEnd;
-};
-
-
-/**
- * @protected
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.canvas.Replay.prototype.beginGeometry = function(geometry, feature) {
-  this.beginGeometryInstruction1_ =
-      [ol.render.canvas.Instruction.BEGIN_GEOMETRY, feature, 0];
-  this.instructions.push(this.beginGeometryInstruction1_);
-  this.beginGeometryInstruction2_ =
-      [ol.render.canvas.Instruction.BEGIN_GEOMETRY, feature, 0];
-  this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);
-};
-
-
-/**
- * @private
- * @param {CanvasRenderingContext2D} context Context.
- * @param {number} rotation Rotation.
- */
-ol.render.canvas.Replay.prototype.fill_ = function(context, rotation) {
-  if (this.fillOrigin_) {
-    var origin = ol.transform.apply(this.renderedTransform_, this.fillOrigin_.slice());
-    context.translate(origin[0], origin[1]);
-    context.rotate(rotation);
-  }
-  context.fill();
-  if (this.fillOrigin_) {
-    context.setTransform.apply(context, this.resetTransform_);
-  }
-};
-
-
-/**
- * @private
- * @param {CanvasRenderingContext2D} context Context.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.Transform} transform Transform.
- * @param {number} viewRotation View rotation.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- * @param {Array.<*>} instructions Instructions array.
- * @param {function((ol.Feature|ol.render.Feature)): T|undefined}
- *     featureCallback Feature callback.
- * @param {ol.Extent=} opt_hitExtent Only check features that intersect this
- *     extent.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.canvas.Replay.prototype.replay_ = function(
-    context, pixelRatio, transform, viewRotation, skippedFeaturesHash,
-    instructions, featureCallback, opt_hitExtent) {
-  /** @type {Array.<number>} */
-  var pixelCoordinates;
-  if (this.pixelCoordinates_ && ol.array.equals(transform, this.renderedTransform_)) {
-    pixelCoordinates = this.pixelCoordinates_;
-  } else {
-    if (!this.pixelCoordinates_) {
-      this.pixelCoordinates_ = [];
-    }
-    pixelCoordinates = ol.geom.flat.transform.transform2D(
-        this.coordinates, 0, this.coordinates.length, 2,
-        transform, this.pixelCoordinates_);
-    ol.transform.setFromArray(this.renderedTransform_, transform);
-  }
-  var skipFeatures = !ol.obj.isEmpty(skippedFeaturesHash);
-  var i = 0; // instruction index
-  var ii = instructions.length; // end of instructions
-  var d = 0; // data index
-  var dd; // end of per-instruction data
-  var localTransform = this.tmpLocalTransform_;
-  var resetTransform = this.resetTransform_;
-  var prevX, prevY, roundX, roundY;
-  var pendingFill = 0;
-  var pendingStroke = 0;
-  // When the batch size gets too big, performance decreases. 200 is a good
-  // balance between batch size and number of fill/stroke instructions.
-  var batchSize =
-      this.instructions != instructions || this.overlaps ? 0 : 200;
-  while (i < ii) {
-    var instruction = instructions[i];
-    var type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
-    var feature, fill, stroke, text, x, y;
-    switch (type) {
-      case ol.render.canvas.Instruction.BEGIN_GEOMETRY:
-        feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
-        if ((skipFeatures &&
-            skippedFeaturesHash[ol.getUid(feature).toString()]) ||
-            !feature.getGeometry()) {
-          i = /** @type {number} */ (instruction[2]);
-        } else if (opt_hitExtent !== undefined && !ol.extent.intersects(
-            opt_hitExtent, feature.getGeometry().getExtent())) {
-          i = /** @type {number} */ (instruction[2]) + 1;
-        } else {
-          ++i;
-        }
-        break;
-      case ol.render.canvas.Instruction.BEGIN_PATH:
-        if (pendingFill > batchSize) {
-          this.fill_(context, viewRotation);
-          pendingFill = 0;
-        }
-        if (pendingStroke > batchSize) {
-          context.stroke();
-          pendingStroke = 0;
-        }
-        if (!pendingFill && !pendingStroke) {
-          context.beginPath();
-          prevX = prevY = NaN;
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.CIRCLE:
-        d = /** @type {number} */ (instruction[1]);
-        var x1 = pixelCoordinates[d];
-        var y1 = pixelCoordinates[d + 1];
-        var x2 = pixelCoordinates[d + 2];
-        var y2 = pixelCoordinates[d + 3];
-        var dx = x2 - x1;
-        var dy = y2 - y1;
-        var r = Math.sqrt(dx * dx + dy * dy);
-        context.moveTo(x1 + r, y1);
-        context.arc(x1, y1, r, 0, 2 * Math.PI, true);
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.CLOSE_PATH:
-        context.closePath();
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.DRAW_IMAGE:
-        d = /** @type {number} */ (instruction[1]);
-        dd = /** @type {number} */ (instruction[2]);
-        var image =  /** @type {HTMLCanvasElement|HTMLVideoElement|Image} */
-            (instruction[3]);
-        // Remaining arguments in DRAW_IMAGE are in alphabetical order
-        var anchorX = /** @type {number} */ (instruction[4]) * pixelRatio;
-        var anchorY = /** @type {number} */ (instruction[5]) * pixelRatio;
-        var height = /** @type {number} */ (instruction[6]);
-        var opacity = /** @type {number} */ (instruction[7]);
-        var originX = /** @type {number} */ (instruction[8]);
-        var originY = /** @type {number} */ (instruction[9]);
-        var rotateWithView = /** @type {boolean} */ (instruction[10]);
-        var rotation = /** @type {number} */ (instruction[11]);
-        var scale = /** @type {number} */ (instruction[12]);
-        var snapToPixel = /** @type {boolean} */ (instruction[13]);
-        var width = /** @type {number} */ (instruction[14]);
-        if (rotateWithView) {
-          rotation += viewRotation;
-        }
-        for (; d < dd; d += 2) {
-          x = pixelCoordinates[d] - anchorX;
-          y = pixelCoordinates[d + 1] - anchorY;
-          if (snapToPixel) {
-            x = Math.round(x);
-            y = Math.round(y);
-          }
-          if (scale != 1 || rotation !== 0) {
-            var centerX = x + anchorX;
-            var centerY = y + anchorY;
-            ol.transform.compose(localTransform,
-                centerX, centerY, scale, scale, rotation, -centerX, -centerY);
-            context.setTransform.apply(context, localTransform);
-          }
-          var alpha = context.globalAlpha;
-          if (opacity != 1) {
-            context.globalAlpha = alpha * opacity;
-          }
-
-          var w = (width + originX > image.width) ? image.width - originX : width;
-          var h = (height + originY > image.height) ? image.height - originY : height;
-
-          context.drawImage(image, originX, originY, w, h,
-              x, y, w * pixelRatio, h * pixelRatio);
-
-          if (opacity != 1) {
-            context.globalAlpha = alpha;
-          }
-          if (scale != 1 || rotation !== 0) {
-            context.setTransform.apply(context, resetTransform);
-          }
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.DRAW_TEXT:
-        d = /** @type {number} */ (instruction[1]);
-        dd = /** @type {number} */ (instruction[2]);
-        text = /** @type {string} */ (instruction[3]);
-        var offsetX = /** @type {number} */ (instruction[4]) * pixelRatio;
-        var offsetY = /** @type {number} */ (instruction[5]) * pixelRatio;
-        rotation = /** @type {number} */ (instruction[6]);
-        scale = /** @type {number} */ (instruction[7]) * pixelRatio;
-        fill = /** @type {boolean} */ (instruction[8]);
-        stroke = /** @type {boolean} */ (instruction[9]);
-        rotateWithView = /** @type {boolean} */ (instruction[10]);
-        if (rotateWithView) {
-          rotation += viewRotation;
-        }
-        for (; d < dd; d += 2) {
-          x = pixelCoordinates[d] + offsetX;
-          y = pixelCoordinates[d + 1] + offsetY;
-          if (scale != 1 || rotation !== 0) {
-            ol.transform.compose(localTransform, x, y, scale, scale, rotation, -x, -y);
-            context.setTransform.apply(context, localTransform);
-          }
-
-          // Support multiple lines separated by \n
-          var lines = text.split('\n');
-          var numLines = lines.length;
-          var fontSize, lineY;
-          if (numLines > 1) {
-            // Estimate line height using width of capital M, and add padding
-            fontSize = Math.round(context.measureText('M').width * 1.5);
-            lineY = y - (((numLines - 1) / 2) * fontSize);
-          } else {
-            // No need to calculate line height/offset for a single line
-            fontSize = 0;
-            lineY = y;
-          }
-
-          for (var lineIndex = 0; lineIndex < numLines; lineIndex++) {
-            var line = lines[lineIndex];
-            if (stroke) {
-              context.strokeText(line, x, lineY);
-            }
-            if (fill) {
-              context.fillText(line, x, lineY);
-            }
-
-            // Move next line down by fontSize px
-            lineY = lineY + fontSize;
-          }
-
-          if (scale != 1 || rotation !== 0) {
-            context.setTransform.apply(context, resetTransform);
-          }
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.END_GEOMETRY:
-        if (featureCallback !== undefined) {
-          feature =
-              /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
-          var result = featureCallback(feature);
-          if (result) {
-            return result;
-          }
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.FILL:
-        if (batchSize) {
-          pendingFill++;
-        } else {
-          this.fill_(context, viewRotation);
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.MOVE_TO_LINE_TO:
-        d = /** @type {number} */ (instruction[1]);
-        dd = /** @type {number} */ (instruction[2]);
-        x = pixelCoordinates[d];
-        y = pixelCoordinates[d + 1];
-        roundX = (x + 0.5) | 0;
-        roundY = (y + 0.5) | 0;
-        if (roundX !== prevX || roundY !== prevY) {
-          context.moveTo(x, y);
-          prevX = roundX;
-          prevY = roundY;
-        }
-        for (d += 2; d < dd; d += 2) {
-          x = pixelCoordinates[d];
-          y = pixelCoordinates[d + 1];
-          roundX = (x + 0.5) | 0;
-          roundY = (y + 0.5) | 0;
-          if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {
-            context.lineTo(x, y);
-            prevX = roundX;
-            prevY = roundY;
-          }
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.SET_FILL_STYLE:
-        this.fillOrigin_ = instruction[2];
-
-        if (pendingFill) {
-          this.fill_(context, viewRotation);
-          pendingFill = 0;
-          if (pendingStroke) {
-            context.stroke();
-            pendingStroke = 0;
-          }
-        }
-
-        context.fillStyle = /** @type {ol.ColorLike} */ (instruction[1]);
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.SET_STROKE_STYLE:
-        var usePixelRatio = instruction[8] !== undefined ?
-            instruction[8] : true;
-        var renderedPixelRatio = instruction[9];
-
-        var lineWidth = /** @type {number} */ (instruction[2]);
-        if (pendingStroke) {
-          context.stroke();
-          pendingStroke = 0;
-        }
-        context.strokeStyle = /** @type {ol.ColorLike} */ (instruction[1]);
-        context.lineWidth = usePixelRatio ? lineWidth * pixelRatio : lineWidth;
-        context.lineCap = /** @type {string} */ (instruction[3]);
-        context.lineJoin = /** @type {string} */ (instruction[4]);
-        context.miterLimit = /** @type {number} */ (instruction[5]);
-        if (ol.has.CANVAS_LINE_DASH) {
-          var lineDash = /** @type {Array.<number>} */ (instruction[6]);
-          var lineDashOffset = /** @type {number} */ (instruction[7]);
-          if (usePixelRatio && pixelRatio !== renderedPixelRatio) {
-            lineDash = lineDash.map(function(dash) {
-              return dash * pixelRatio / renderedPixelRatio;
-            });
-            lineDashOffset *= pixelRatio / renderedPixelRatio;
-            instruction[6] = lineDash;
-            instruction[7] = lineDashOffset;
-            instruction[9] = pixelRatio;
-          }
-          context.lineDashOffset = lineDashOffset;
-          context.setLineDash(lineDash);
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.SET_TEXT_STYLE:
-        context.font = /** @type {string} */ (instruction[1]);
-        context.textAlign = /** @type {string} */ (instruction[2]);
-        context.textBaseline = /** @type {string} */ (instruction[3]);
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.STROKE:
-        if (batchSize) {
-          pendingStroke++;
-        } else {
-          context.stroke();
-        }
-        ++i;
-        break;
-      default:
-        ++i; // consume the instruction anyway, to avoid an infinite loop
-        break;
-    }
-  }
-  if (pendingFill) {
-    this.fill_(context, viewRotation);
-  }
-  if (pendingStroke) {
-    context.stroke();
-  }
-  return undefined;
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.Transform} transform Transform.
- * @param {number} viewRotation View rotation.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- */
-ol.render.canvas.Replay.prototype.replay = function(
-    context, pixelRatio, transform, viewRotation, skippedFeaturesHash) {
-  var instructions = this.instructions;
-  this.replay_(context, pixelRatio, transform, viewRotation,
-      skippedFeaturesHash, instructions, undefined, undefined);
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {ol.Transform} transform Transform.
- * @param {number} viewRotation View rotation.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T=} opt_featureCallback
- *     Feature callback.
- * @param {ol.Extent=} opt_hitExtent Only check features that intersect this
- *     extent.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.canvas.Replay.prototype.replayHitDetection = function(
-    context, transform, viewRotation, skippedFeaturesHash,
-    opt_featureCallback, opt_hitExtent) {
-  var instructions = this.hitDetectionInstructions;
-  return this.replay_(context, 1, transform, viewRotation,
-      skippedFeaturesHash, instructions, opt_featureCallback, opt_hitExtent);
-};
-
-
-/**
- * Reverse the hit detection instructions.
- */
-ol.render.canvas.Replay.prototype.reverseHitDetectionInstructions = function() {
-  var hitDetectionInstructions = this.hitDetectionInstructions;
-  // step 1 - reverse array
-  hitDetectionInstructions.reverse();
-  // step 2 - reverse instructions within geometry blocks
-  var i;
-  var n = hitDetectionInstructions.length;
-  var instruction;
-  var type;
-  var begin = -1;
-  for (i = 0; i < n; ++i) {
-    instruction = hitDetectionInstructions[i];
-    type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
-    if (type == ol.render.canvas.Instruction.END_GEOMETRY) {
-      begin = i;
-    } else if (type == ol.render.canvas.Instruction.BEGIN_GEOMETRY) {
-      instruction[2] = i;
-      ol.array.reverseSubArray(this.hitDetectionInstructions, begin, i);
-      begin = -1;
-    }
-  }
-};
-
-
-/**
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.canvas.Replay.prototype.endGeometry = function(geometry, feature) {
-  this.beginGeometryInstruction1_[2] = this.instructions.length;
-  this.beginGeometryInstruction1_ = null;
-  this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;
-  this.beginGeometryInstruction2_ = null;
-  var endGeometryInstruction =
-      [ol.render.canvas.Instruction.END_GEOMETRY, feature];
-  this.instructions.push(endGeometryInstruction);
-  this.hitDetectionInstructions.push(endGeometryInstruction);
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.render.canvas.Replay.prototype.finish = ol.nullFunction;
-
-
-/**
- * Get the buffered rendering extent.  Rendering will be clipped to the extent
- * provided to the constructor.  To account for symbolizers that may intersect
- * this extent, we calculate a buffered extent (e.g. based on stroke width).
- * @return {ol.Extent} The buffered rendering extent.
- * @protected
- */
-ol.render.canvas.Replay.prototype.getBufferedMaxExtent = function() {
-  return this.maxExtent;
-};
-
-goog.provide('ol.render.canvas.ImageReplay');
-
-goog.require('ol');
-goog.require('ol.render.canvas.Instruction');
-goog.require('ol.render.canvas.Replay');
-
-
-/**
- * @constructor
- * @extends {ol.render.canvas.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Maximum extent.
- * @param {number} resolution Resolution.
- * @param {boolean} overlaps The replay can have overlapping geometries.
- * @struct
- */
-ol.render.canvas.ImageReplay = function(tolerance, maxExtent, resolution, overlaps) {
-  ol.render.canvas.Replay.call(this, tolerance, maxExtent, resolution, overlaps);
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement|HTMLVideoElement|Image}
-   */
-  this.hitDetectionImage_ = null;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement|HTMLVideoElement|Image}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.anchorX_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.anchorY_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.height_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.opacity_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.originX_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.originY_ = undefined;
-
-  /**
-   * @private
-   * @type {boolean|undefined}
-   */
-  this.rotateWithView_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.rotation_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.scale_ = undefined;
-
-  /**
-   * @private
-   * @type {boolean|undefined}
-   */
-  this.snapToPixel_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.width_ = undefined;
-
-};
-ol.inherits(ol.render.canvas.ImageReplay, ol.render.canvas.Replay);
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @private
- * @return {number} My end.
- */
-ol.render.canvas.ImageReplay.prototype.drawCoordinates_ = function(flatCoordinates, offset, end, stride) {
-  return this.appendFlatCoordinates(
-      flatCoordinates, offset, end, stride, false, false);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ImageReplay.prototype.drawPoint = function(pointGeometry, feature) {
-  if (!this.image_) {
-    return;
-  }
-  this.beginGeometry(pointGeometry, feature);
-  var flatCoordinates = pointGeometry.getFlatCoordinates();
-  var stride = pointGeometry.getStride();
-  var myBegin = this.coordinates.length;
-  var myEnd = this.drawCoordinates_(
-        flatCoordinates, 0, flatCoordinates.length, stride);
-  this.instructions.push([
-    ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd, this.image_,
-      // Remaining arguments to DRAW_IMAGE are in alphabetical order
-    this.anchorX_, this.anchorY_, this.height_, this.opacity_,
-    this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
-    this.scale_, this.snapToPixel_, this.width_
-  ]);
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd,
-    this.hitDetectionImage_,
-      // Remaining arguments to DRAW_IMAGE are in alphabetical order
-    this.anchorX_, this.anchorY_, this.height_, this.opacity_,
-    this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
-    this.scale_, this.snapToPixel_, this.width_
-  ]);
-  this.endGeometry(pointGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ImageReplay.prototype.drawMultiPoint = function(multiPointGeometry, feature) {
-  if (!this.image_) {
-    return;
-  }
-  this.beginGeometry(multiPointGeometry, feature);
-  var flatCoordinates = multiPointGeometry.getFlatCoordinates();
-  var stride = multiPointGeometry.getStride();
-  var myBegin = this.coordinates.length;
-  var myEnd = this.drawCoordinates_(
-        flatCoordinates, 0, flatCoordinates.length, stride);
-  this.instructions.push([
-    ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd, this.image_,
-      // Remaining arguments to DRAW_IMAGE are in alphabetical order
-    this.anchorX_, this.anchorY_, this.height_, this.opacity_,
-    this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
-    this.scale_, this.snapToPixel_, this.width_
-  ]);
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd,
-    this.hitDetectionImage_,
-      // Remaining arguments to DRAW_IMAGE are in alphabetical order
-    this.anchorX_, this.anchorY_, this.height_, this.opacity_,
-    this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
-    this.scale_, this.snapToPixel_, this.width_
-  ]);
-  this.endGeometry(multiPointGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ImageReplay.prototype.finish = function() {
-  this.reverseHitDetectionInstructions();
-  // FIXME this doesn't really protect us against further calls to draw*Geometry
-  this.anchorX_ = undefined;
-  this.anchorY_ = undefined;
-  this.hitDetectionImage_ = null;
-  this.image_ = null;
-  this.height_ = undefined;
-  this.scale_ = undefined;
-  this.opacity_ = undefined;
-  this.originX_ = undefined;
-  this.originY_ = undefined;
-  this.rotateWithView_ = undefined;
-  this.rotation_ = undefined;
-  this.snapToPixel_ = undefined;
-  this.width_ = undefined;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ImageReplay.prototype.setImageStyle = function(imageStyle) {
-  var anchor = imageStyle.getAnchor();
-  var size = imageStyle.getSize();
-  var hitDetectionImage = imageStyle.getHitDetectionImage(1);
-  var image = imageStyle.getImage(1);
-  var origin = imageStyle.getOrigin();
-  this.anchorX_ = anchor[0];
-  this.anchorY_ = anchor[1];
-  this.hitDetectionImage_ = hitDetectionImage;
-  this.image_ = image;
-  this.height_ = size[1];
-  this.opacity_ = imageStyle.getOpacity();
-  this.originX_ = origin[0];
-  this.originY_ = origin[1];
-  this.rotateWithView_ = imageStyle.getRotateWithView();
-  this.rotation_ = imageStyle.getRotation();
-  this.scale_ = imageStyle.getScale();
-  this.snapToPixel_ = imageStyle.getSnapToPixel();
-  this.width_ = size[0];
-};
-
-goog.provide('ol.render.canvas.LineStringReplay');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.colorlike');
-goog.require('ol.extent');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.Instruction');
-goog.require('ol.render.canvas.Replay');
-
-
-/**
- * @constructor
- * @extends {ol.render.canvas.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Maximum extent.
- * @param {number} resolution Resolution.
- * @param {boolean} overlaps The replay can have overlapping geometries.
- * @struct
- */
-ol.render.canvas.LineStringReplay = function(tolerance, maxExtent, resolution, overlaps) {
-
-  ol.render.canvas.Replay.call(this, tolerance, maxExtent, resolution, overlaps);
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.bufferedMaxExtent_ = null;
-
-  /**
-   * @private
-   * @type {{currentStrokeStyle: (ol.ColorLike|undefined),
-   *         currentLineCap: (string|undefined),
-   *         currentLineDash: Array.<number>,
-   *         currentLineDashOffset: (number|undefined),
-   *         currentLineJoin: (string|undefined),
-   *         currentLineWidth: (number|undefined),
-   *         currentMiterLimit: (number|undefined),
-   *         lastStroke: number,
-   *         strokeStyle: (ol.ColorLike|undefined),
-   *         lineCap: (string|undefined),
-   *         lineDash: Array.<number>,
-   *         lineDashOffset: (number|undefined),
-   *         lineJoin: (string|undefined),
-   *         lineWidth: (number|undefined),
-   *         miterLimit: (number|undefined)}|null}
-   */
-  this.state_ = {
-    currentStrokeStyle: undefined,
-    currentLineCap: undefined,
-    currentLineDash: null,
-    currentLineDashOffset: undefined,
-    currentLineJoin: undefined,
-    currentLineWidth: undefined,
-    currentMiterLimit: undefined,
-    lastStroke: 0,
-    strokeStyle: undefined,
-    lineCap: undefined,
-    lineDash: null,
-    lineDashOffset: undefined,
-    lineJoin: undefined,
-    lineWidth: undefined,
-    miterLimit: undefined
-  };
-
-};
-ol.inherits(ol.render.canvas.LineStringReplay, ol.render.canvas.Replay);
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @private
- * @return {number} end.
- */
-ol.render.canvas.LineStringReplay.prototype.drawFlatCoordinates_ = function(flatCoordinates, offset, end, stride) {
-  var myBegin = this.coordinates.length;
-  var myEnd = this.appendFlatCoordinates(
-      flatCoordinates, offset, end, stride, false, false);
-  var moveToLineToInstruction =
-      [ol.render.canvas.Instruction.MOVE_TO_LINE_TO, myBegin, myEnd];
-  this.instructions.push(moveToLineToInstruction);
-  this.hitDetectionInstructions.push(moveToLineToInstruction);
-  return end;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.LineStringReplay.prototype.getBufferedMaxExtent = function() {
-  if (!this.bufferedMaxExtent_) {
-    this.bufferedMaxExtent_ = ol.extent.clone(this.maxExtent);
-    if (this.maxLineWidth > 0) {
-      var width = this.resolution * (this.maxLineWidth + 1) / 2;
-      ol.extent.buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);
-    }
-  }
-  return this.bufferedMaxExtent_;
-};
-
-
-/**
- * @private
- */
-ol.render.canvas.LineStringReplay.prototype.setStrokeStyle_ = function() {
-  var state = this.state_;
-  var strokeStyle = state.strokeStyle;
-  var lineCap = state.lineCap;
-  var lineDash = state.lineDash;
-  var lineDashOffset = state.lineDashOffset;
-  var lineJoin = state.lineJoin;
-  var lineWidth = state.lineWidth;
-  var miterLimit = state.miterLimit;
-  if (state.currentStrokeStyle != strokeStyle ||
-      state.currentLineCap != lineCap ||
-      !ol.array.equals(state.currentLineDash, lineDash) ||
-      state.currentLineDashOffset != lineDashOffset ||
-      state.currentLineJoin != lineJoin ||
-      state.currentLineWidth != lineWidth ||
-      state.currentMiterLimit != miterLimit) {
-    if (state.lastStroke != this.coordinates.length) {
-      this.instructions.push([ol.render.canvas.Instruction.STROKE]);
-      state.lastStroke = this.coordinates.length;
-    }
-    this.instructions.push([
-      ol.render.canvas.Instruction.SET_STROKE_STYLE,
-      strokeStyle, lineWidth, lineCap, lineJoin, miterLimit, lineDash, lineDashOffset, true, 1
-    ], [
-      ol.render.canvas.Instruction.BEGIN_PATH
-    ]);
-    state.currentStrokeStyle = strokeStyle;
-    state.currentLineCap = lineCap;
-    state.currentLineDash = lineDash;
-    state.currentLineDashOffset = lineDashOffset;
-    state.currentLineJoin = lineJoin;
-    state.currentLineWidth = lineWidth;
-    state.currentMiterLimit = miterLimit;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.LineStringReplay.prototype.drawLineString = function(lineStringGeometry, feature) {
-  var state = this.state_;
-  var strokeStyle = state.strokeStyle;
-  var lineWidth = state.lineWidth;
-  if (strokeStyle === undefined || lineWidth === undefined) {
-    return;
-  }
-  this.setStrokeStyle_();
-  this.beginGeometry(lineStringGeometry, feature);
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.SET_STROKE_STYLE,
-    state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
-    state.miterLimit, state.lineDash, state.lineDashOffset, true, 1
-  ], [
-    ol.render.canvas.Instruction.BEGIN_PATH
-  ]);
-  var flatCoordinates = lineStringGeometry.getFlatCoordinates();
-  var stride = lineStringGeometry.getStride();
-  this.drawFlatCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);
-  this.hitDetectionInstructions.push([ol.render.canvas.Instruction.STROKE]);
-  this.endGeometry(lineStringGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.LineStringReplay.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {
-  var state = this.state_;
-  var strokeStyle = state.strokeStyle;
-  var lineWidth = state.lineWidth;
-  if (strokeStyle === undefined || lineWidth === undefined) {
-    return;
-  }
-  this.setStrokeStyle_();
-  this.beginGeometry(multiLineStringGeometry, feature);
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.SET_STROKE_STYLE,
-    state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
-    state.miterLimit, state.lineDash, state.lineDashOffset, true, 1
-  ], [
-    ol.render.canvas.Instruction.BEGIN_PATH
-  ]);
-  var ends = multiLineStringGeometry.getEnds();
-  var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();
-  var stride = multiLineStringGeometry.getStride();
-  var offset = 0;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    offset = this.drawFlatCoordinates_(
-        flatCoordinates, offset, ends[i], stride);
-  }
-  this.hitDetectionInstructions.push([ol.render.canvas.Instruction.STROKE]);
-  this.endGeometry(multiLineStringGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.LineStringReplay.prototype.finish = function() {
-  var state = this.state_;
-  if (state.lastStroke != this.coordinates.length) {
-    this.instructions.push([ol.render.canvas.Instruction.STROKE]);
-  }
-  this.reverseHitDetectionInstructions();
-  this.state_ = null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.LineStringReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-  var strokeStyleColor = strokeStyle.getColor();
-  this.state_.strokeStyle = ol.colorlike.asColorLike(strokeStyleColor ?
-      strokeStyleColor : ol.render.canvas.defaultStrokeStyle);
-  var strokeStyleLineCap = strokeStyle.getLineCap();
-  this.state_.lineCap = strokeStyleLineCap !== undefined ?
-      strokeStyleLineCap : ol.render.canvas.defaultLineCap;
-  var strokeStyleLineDash = strokeStyle.getLineDash();
-  this.state_.lineDash = strokeStyleLineDash ?
-      strokeStyleLineDash : ol.render.canvas.defaultLineDash;
-  var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
-  this.state_.lineDashOffset = strokeStyleLineDashOffset ?
-      strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset;
-  var strokeStyleLineJoin = strokeStyle.getLineJoin();
-  this.state_.lineJoin = strokeStyleLineJoin !== undefined ?
-      strokeStyleLineJoin : ol.render.canvas.defaultLineJoin;
-  var strokeStyleWidth = strokeStyle.getWidth();
-  this.state_.lineWidth = strokeStyleWidth !== undefined ?
-      strokeStyleWidth : ol.render.canvas.defaultLineWidth;
-  var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
-  this.state_.miterLimit = strokeStyleMiterLimit !== undefined ?
-      strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
-
-  if (this.state_.lineWidth > this.maxLineWidth) {
-    this.maxLineWidth = this.state_.lineWidth;
-    // invalidate the buffered max extent cache
-    this.bufferedMaxExtent_ = null;
-  }
-};
-
-goog.provide('ol.render.canvas.PolygonReplay');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.color');
-goog.require('ol.colorlike');
-goog.require('ol.extent');
-goog.require('ol.geom.flat.simplify');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.Instruction');
-goog.require('ol.render.canvas.Replay');
-
-
-/**
- * @constructor
- * @extends {ol.render.canvas.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Maximum extent.
- * @param {number} resolution Resolution.
- * @param {boolean} overlaps The replay can have overlapping geometries.
- * @struct
- */
-ol.render.canvas.PolygonReplay = function(tolerance, maxExtent, resolution, overlaps) {
-
-  ol.render.canvas.Replay.call(this, tolerance, maxExtent, resolution, overlaps);
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.bufferedMaxExtent_ = null;
-
-  /**
-   * @private
-   * @type {{currentFillStyle: (ol.ColorLike|undefined),
-   *         currentStrokeStyle: (ol.ColorLike|undefined),
-   *         currentLineCap: (string|undefined),
-   *         currentLineDash: Array.<number>,
-   *         currentLineDashOffset: (number|undefined),
-   *         currentLineJoin: (string|undefined),
-   *         currentLineWidth: (number|undefined),
-   *         currentMiterLimit: (number|undefined),
-   *         fillStyle: (ol.ColorLike|undefined),
-   *         strokeStyle: (ol.ColorLike|undefined),
-   *         lineCap: (string|undefined),
-   *         lineDash: Array.<number>,
-   *         lineDashOffset: (number|undefined),
-   *         lineJoin: (string|undefined),
-   *         lineWidth: (number|undefined),
-   *         miterLimit: (number|undefined)}|null}
-   */
-  this.state_ = {
-    currentFillStyle: undefined,
-    currentStrokeStyle: undefined,
-    currentLineCap: undefined,
-    currentLineDash: null,
-    currentLineDashOffset: undefined,
-    currentLineJoin: undefined,
-    currentLineWidth: undefined,
-    currentMiterLimit: undefined,
-    fillStyle: undefined,
-    strokeStyle: undefined,
-    lineCap: undefined,
-    lineDash: null,
-    lineDashOffset: undefined,
-    lineJoin: undefined,
-    lineWidth: undefined,
-    miterLimit: undefined
-  };
-
-};
-ol.inherits(ol.render.canvas.PolygonReplay, ol.render.canvas.Replay);
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @private
- * @return {number} End.
- */
-ol.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_ = function(flatCoordinates, offset, ends, stride) {
-  var state = this.state_;
-  var fill = state.fillStyle !== undefined;
-  var stroke = state.strokeStyle != undefined;
-  var numEnds = ends.length;
-  var beginPathInstruction = [ol.render.canvas.Instruction.BEGIN_PATH];
-  this.instructions.push(beginPathInstruction);
-  this.hitDetectionInstructions.push(beginPathInstruction);
-  for (var i = 0; i < numEnds; ++i) {
-    var end = ends[i];
-    var myBegin = this.coordinates.length;
-    var myEnd = this.appendFlatCoordinates(
-        flatCoordinates, offset, end, stride, true, !stroke);
-    var moveToLineToInstruction =
-        [ol.render.canvas.Instruction.MOVE_TO_LINE_TO, myBegin, myEnd];
-    this.instructions.push(moveToLineToInstruction);
-    this.hitDetectionInstructions.push(moveToLineToInstruction);
-    if (stroke) {
-      // Performance optimization: only call closePath() when we have a stroke.
-      // Otherwise the ring is closed already (see appendFlatCoordinates above).
-      var closePathInstruction = [ol.render.canvas.Instruction.CLOSE_PATH];
-      this.instructions.push(closePathInstruction);
-      this.hitDetectionInstructions.push(closePathInstruction);
-    }
-    offset = end;
-  }
-  var fillInstruction = [ol.render.canvas.Instruction.FILL];
-  this.hitDetectionInstructions.push(fillInstruction);
-  if (fill) {
-    this.instructions.push(fillInstruction);
-  }
-  if (stroke) {
-    var strokeInstruction = [ol.render.canvas.Instruction.STROKE];
-    this.instructions.push(strokeInstruction);
-    this.hitDetectionInstructions.push(strokeInstruction);
-  }
-  return offset;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.PolygonReplay.prototype.drawCircle = function(circleGeometry, feature) {
-  var state = this.state_;
-  var fillStyle = state.fillStyle;
-  var strokeStyle = state.strokeStyle;
-  if (fillStyle === undefined && strokeStyle === undefined) {
-    return;
-  }
-  this.setFillStrokeStyles_(circleGeometry);
-  this.beginGeometry(circleGeometry, feature);
-  // always fill the circle for hit detection
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.SET_FILL_STYLE,
-    ol.color.asString(ol.render.canvas.defaultFillStyle)
-  ]);
-  if (state.strokeStyle !== undefined) {
-    this.hitDetectionInstructions.push([
-      ol.render.canvas.Instruction.SET_STROKE_STYLE,
-      state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
-      state.miterLimit, state.lineDash, state.lineDashOffset, true, 1
-    ]);
-  }
-  var flatCoordinates = circleGeometry.getFlatCoordinates();
-  var stride = circleGeometry.getStride();
-  var myBegin = this.coordinates.length;
-  this.appendFlatCoordinates(
-      flatCoordinates, 0, flatCoordinates.length, stride, false, false);
-  var beginPathInstruction = [ol.render.canvas.Instruction.BEGIN_PATH];
-  var circleInstruction = [ol.render.canvas.Instruction.CIRCLE, myBegin];
-  this.instructions.push(beginPathInstruction, circleInstruction);
-  this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);
-  var fillInstruction = [ol.render.canvas.Instruction.FILL];
-  this.hitDetectionInstructions.push(fillInstruction);
-  if (state.fillStyle !== undefined) {
-    this.instructions.push(fillInstruction);
-  }
-  if (state.strokeStyle !== undefined) {
-    var strokeInstruction = [ol.render.canvas.Instruction.STROKE];
-    this.instructions.push(strokeInstruction);
-    this.hitDetectionInstructions.push(strokeInstruction);
-  }
-  this.endGeometry(circleGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.PolygonReplay.prototype.drawPolygon = function(polygonGeometry, feature) {
-  var state = this.state_;
-  this.setFillStrokeStyles_(polygonGeometry);
-  this.beginGeometry(polygonGeometry, feature);
-  // always fill the polygon for hit detection
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.SET_FILL_STYLE,
-    ol.color.asString(ol.render.canvas.defaultFillStyle)]
-                                    );
-  if (state.strokeStyle !== undefined) {
-    this.hitDetectionInstructions.push([
-      ol.render.canvas.Instruction.SET_STROKE_STYLE,
-      state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
-      state.miterLimit, state.lineDash, state.lineDashOffset, true, 1
-    ]);
-  }
-  var ends = polygonGeometry.getEnds();
-  var flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();
-  var stride = polygonGeometry.getStride();
-  this.drawFlatCoordinatess_(flatCoordinates, 0, ends, stride);
-  this.endGeometry(polygonGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.PolygonReplay.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {
-  var state = this.state_;
-  var fillStyle = state.fillStyle;
-  var strokeStyle = state.strokeStyle;
-  if (fillStyle === undefined && strokeStyle === undefined) {
-    return;
-  }
-  this.setFillStrokeStyles_(multiPolygonGeometry);
-  this.beginGeometry(multiPolygonGeometry, feature);
-  // always fill the multi-polygon for hit detection
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.SET_FILL_STYLE,
-    ol.color.asString(ol.render.canvas.defaultFillStyle)
-  ]);
-  if (state.strokeStyle !== undefined) {
-    this.hitDetectionInstructions.push([
-      ol.render.canvas.Instruction.SET_STROKE_STYLE,
-      state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
-      state.miterLimit, state.lineDash, state.lineDashOffset, true, 1
-    ]);
-  }
-  var endss = multiPolygonGeometry.getEndss();
-  var flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();
-  var stride = multiPolygonGeometry.getStride();
-  var offset = 0;
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    offset = this.drawFlatCoordinatess_(
-        flatCoordinates, offset, endss[i], stride);
-  }
-  this.endGeometry(multiPolygonGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.PolygonReplay.prototype.finish = function() {
-  this.reverseHitDetectionInstructions();
-  this.state_ = null;
-  // We want to preserve topology when drawing polygons.  Polygons are
-  // simplified using quantization and point elimination. However, we might
-  // have received a mix of quantized and non-quantized geometries, so ensure
-  // that all are quantized by quantizing all coordinates in the batch.
-  var tolerance = this.tolerance;
-  if (tolerance !== 0) {
-    var coordinates = this.coordinates;
-    var i, ii;
-    for (i = 0, ii = coordinates.length; i < ii; ++i) {
-      coordinates[i] = ol.geom.flat.simplify.snap(coordinates[i], tolerance);
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.PolygonReplay.prototype.getBufferedMaxExtent = function() {
-  if (!this.bufferedMaxExtent_) {
-    this.bufferedMaxExtent_ = ol.extent.clone(this.maxExtent);
-    if (this.maxLineWidth > 0) {
-      var width = this.resolution * (this.maxLineWidth + 1) / 2;
-      ol.extent.buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);
-    }
-  }
-  return this.bufferedMaxExtent_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.PolygonReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-  var state = this.state_;
-  if (fillStyle) {
-    var fillStyleColor = fillStyle.getColor();
-    state.fillStyle = ol.colorlike.asColorLike(fillStyleColor ?
-        fillStyleColor : ol.render.canvas.defaultFillStyle);
-  } else {
-    state.fillStyle = undefined;
-  }
-  if (strokeStyle) {
-    var strokeStyleColor = strokeStyle.getColor();
-    state.strokeStyle = ol.colorlike.asColorLike(strokeStyleColor ?
-        strokeStyleColor : ol.render.canvas.defaultStrokeStyle);
-    var strokeStyleLineCap = strokeStyle.getLineCap();
-    state.lineCap = strokeStyleLineCap !== undefined ?
-        strokeStyleLineCap : ol.render.canvas.defaultLineCap;
-    var strokeStyleLineDash = strokeStyle.getLineDash();
-    state.lineDash = strokeStyleLineDash ?
-        strokeStyleLineDash.slice() : ol.render.canvas.defaultLineDash;
-    var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
-    state.lineDashOffset = strokeStyleLineDashOffset ?
-        strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset;
-    var strokeStyleLineJoin = strokeStyle.getLineJoin();
-    state.lineJoin = strokeStyleLineJoin !== undefined ?
-        strokeStyleLineJoin : ol.render.canvas.defaultLineJoin;
-    var strokeStyleWidth = strokeStyle.getWidth();
-    state.lineWidth = strokeStyleWidth !== undefined ?
-        strokeStyleWidth : ol.render.canvas.defaultLineWidth;
-    var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
-    state.miterLimit = strokeStyleMiterLimit !== undefined ?
-        strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
-
-    if (state.lineWidth > this.maxLineWidth) {
-      this.maxLineWidth = state.lineWidth;
-      // invalidate the buffered max extent cache
-      this.bufferedMaxExtent_ = null;
-    }
-  } else {
-    state.strokeStyle = undefined;
-    state.lineCap = undefined;
-    state.lineDash = null;
-    state.lineDashOffset = undefined;
-    state.lineJoin = undefined;
-    state.lineWidth = undefined;
-    state.miterLimit = undefined;
-  }
-};
-
-
-/**
- * @private
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- */
-ol.render.canvas.PolygonReplay.prototype.setFillStrokeStyles_ = function(geometry) {
-  var state = this.state_;
-  var fillStyle = state.fillStyle;
-  var strokeStyle = state.strokeStyle;
-  var lineCap = state.lineCap;
-  var lineDash = state.lineDash;
-  var lineDashOffset = state.lineDashOffset;
-  var lineJoin = state.lineJoin;
-  var lineWidth = state.lineWidth;
-  var miterLimit = state.miterLimit;
-  if (fillStyle !== undefined && (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle)) {
-    var fillInstruction = [ol.render.canvas.Instruction.SET_FILL_STYLE, fillStyle];
-    if (typeof fillStyle !== 'string') {
-      var fillExtent = geometry.getExtent();
-      fillInstruction.push([fillExtent[0], fillExtent[3]]);
-    }
-    this.instructions.push(fillInstruction);
-    state.currentFillStyle = state.fillStyle;
-  }
-  if (strokeStyle !== undefined) {
-    if (state.currentStrokeStyle != strokeStyle ||
-        state.currentLineCap != lineCap ||
-        !ol.array.equals(state.currentLineDash, lineDash) ||
-        state.currentLineDashOffset != lineDashOffset ||
-        state.currentLineJoin != lineJoin ||
-        state.currentLineWidth != lineWidth ||
-        state.currentMiterLimit != miterLimit) {
-      this.instructions.push([
-        ol.render.canvas.Instruction.SET_STROKE_STYLE,
-        strokeStyle, lineWidth, lineCap, lineJoin, miterLimit, lineDash, lineDashOffset, true, 1
-      ]);
-      state.currentStrokeStyle = strokeStyle;
-      state.currentLineCap = lineCap;
-      state.currentLineDash = lineDash;
-      state.currentLineDashOffset = lineDashOffset;
-      state.currentLineJoin = lineJoin;
-      state.currentLineWidth = lineWidth;
-      state.currentMiterLimit = miterLimit;
-    }
-  }
-};
-
-goog.provide('ol.render.canvas.TextReplay');
-
-goog.require('ol');
-goog.require('ol.colorlike');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.Instruction');
-goog.require('ol.render.canvas.Replay');
-
-
-/**
- * @constructor
- * @extends {ol.render.canvas.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Maximum extent.
- * @param {number} resolution Resolution.
- * @param {boolean} overlaps The replay can have overlapping geometries.
- * @struct
- */
-ol.render.canvas.TextReplay = function(tolerance, maxExtent, resolution, overlaps) {
-
-  ol.render.canvas.Replay.call(this, tolerance, maxExtent, resolution, overlaps);
-
-  /**
-   * @private
-   * @type {?ol.CanvasFillState}
-   */
-  this.replayFillState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasStrokeState}
-   */
-  this.replayStrokeState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasTextState}
-   */
-  this.replayTextState_ = null;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.text_ = '';
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textOffsetX_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textOffsetY_ = 0;
-
-  /**
-   * @private
-   * @type {boolean|undefined}
-   */
-  this.textRotateWithView_ = undefined;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textRotation_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textScale_ = 0;
-
-  /**
-   * @private
-   * @type {?ol.CanvasFillState}
-   */
-  this.textFillState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasStrokeState}
-   */
-  this.textStrokeState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasTextState}
-   */
-  this.textState_ = null;
-
-};
-ol.inherits(ol.render.canvas.TextReplay, ol.render.canvas.Replay);
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.TextReplay.prototype.drawText = function(flatCoordinates, offset, end, stride, geometry, feature) {
-  if (this.text_ === '' || !this.textState_ ||
-      (!this.textFillState_ && !this.textStrokeState_)) {
-    return;
-  }
-  if (this.textFillState_) {
-    this.setReplayFillState_(this.textFillState_);
-  }
-  if (this.textStrokeState_) {
-    this.setReplayStrokeState_(this.textStrokeState_);
-  }
-  this.setReplayTextState_(this.textState_);
-  this.beginGeometry(geometry, feature);
-  var myBegin = this.coordinates.length;
-  var myEnd =
-      this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);
-  var fill = !!this.textFillState_;
-  var stroke = !!this.textStrokeState_;
-  var drawTextInstruction = [
-    ol.render.canvas.Instruction.DRAW_TEXT, myBegin, myEnd, this.text_,
-    this.textOffsetX_, this.textOffsetY_, this.textRotation_, this.textScale_,
-    fill, stroke, this.textRotateWithView_];
-  this.instructions.push(drawTextInstruction);
-  this.hitDetectionInstructions.push(drawTextInstruction);
-  this.endGeometry(geometry, feature);
-};
-
-
-/**
- * @param {ol.CanvasFillState} fillState Fill state.
- * @private
- */
-ol.render.canvas.TextReplay.prototype.setReplayFillState_ = function(fillState) {
-  var replayFillState = this.replayFillState_;
-  if (replayFillState &&
-      replayFillState.fillStyle == fillState.fillStyle) {
-    return;
-  }
-  var setFillStyleInstruction =
-      [ol.render.canvas.Instruction.SET_FILL_STYLE, fillState.fillStyle];
-  this.instructions.push(setFillStyleInstruction);
-  this.hitDetectionInstructions.push(setFillStyleInstruction);
-  if (!replayFillState) {
-    this.replayFillState_ = {
-      fillStyle: fillState.fillStyle
-    };
-  } else {
-    replayFillState.fillStyle = fillState.fillStyle;
-  }
-};
-
-
-/**
- * @param {ol.CanvasStrokeState} strokeState Stroke state.
- * @private
- */
-ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ = function(strokeState) {
-  var replayStrokeState = this.replayStrokeState_;
-  if (replayStrokeState &&
-      replayStrokeState.lineCap == strokeState.lineCap &&
-      replayStrokeState.lineDash == strokeState.lineDash &&
-      replayStrokeState.lineDashOffset == strokeState.lineDashOffset &&
-      replayStrokeState.lineJoin == strokeState.lineJoin &&
-      replayStrokeState.lineWidth == strokeState.lineWidth &&
-      replayStrokeState.miterLimit == strokeState.miterLimit &&
-      replayStrokeState.strokeStyle == strokeState.strokeStyle) {
-    return;
-  }
-  var setStrokeStyleInstruction = [
-    ol.render.canvas.Instruction.SET_STROKE_STYLE, strokeState.strokeStyle,
-    strokeState.lineWidth, strokeState.lineCap, strokeState.lineJoin,
-    strokeState.miterLimit, strokeState.lineDash, strokeState.lineDashOffset, false, 1
-  ];
-  this.instructions.push(setStrokeStyleInstruction);
-  this.hitDetectionInstructions.push(setStrokeStyleInstruction);
-  if (!replayStrokeState) {
-    this.replayStrokeState_ = {
-      lineCap: strokeState.lineCap,
-      lineDash: strokeState.lineDash,
-      lineDashOffset: strokeState.lineDashOffset,
-      lineJoin: strokeState.lineJoin,
-      lineWidth: strokeState.lineWidth,
-      miterLimit: strokeState.miterLimit,
-      strokeStyle: strokeState.strokeStyle
-    };
-  } else {
-    replayStrokeState.lineCap = strokeState.lineCap;
-    replayStrokeState.lineDash = strokeState.lineDash;
-    replayStrokeState.lineDashOffset = strokeState.lineDashOffset;
-    replayStrokeState.lineJoin = strokeState.lineJoin;
-    replayStrokeState.lineWidth = strokeState.lineWidth;
-    replayStrokeState.miterLimit = strokeState.miterLimit;
-    replayStrokeState.strokeStyle = strokeState.strokeStyle;
-  }
-};
-
-
-/**
- * @param {ol.CanvasTextState} textState Text state.
- * @private
- */
-ol.render.canvas.TextReplay.prototype.setReplayTextState_ = function(textState) {
-  var replayTextState = this.replayTextState_;
-  if (replayTextState &&
-      replayTextState.font == textState.font &&
-      replayTextState.textAlign == textState.textAlign &&
-      replayTextState.textBaseline == textState.textBaseline) {
-    return;
-  }
-  var setTextStyleInstruction = [ol.render.canvas.Instruction.SET_TEXT_STYLE,
-    textState.font, textState.textAlign, textState.textBaseline];
-  this.instructions.push(setTextStyleInstruction);
-  this.hitDetectionInstructions.push(setTextStyleInstruction);
-  if (!replayTextState) {
-    this.replayTextState_ = {
-      font: textState.font,
-      textAlign: textState.textAlign,
-      textBaseline: textState.textBaseline
-    };
-  } else {
-    replayTextState.font = textState.font;
-    replayTextState.textAlign = textState.textAlign;
-    replayTextState.textBaseline = textState.textBaseline;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.TextReplay.prototype.setTextStyle = function(textStyle) {
-  if (!textStyle) {
-    this.text_ = '';
-  } else {
-    var textFillStyle = textStyle.getFill();
-    if (!textFillStyle) {
-      this.textFillState_ = null;
-    } else {
-      var textFillStyleColor = textFillStyle.getColor();
-      var fillStyle = ol.colorlike.asColorLike(textFillStyleColor ?
-          textFillStyleColor : ol.render.canvas.defaultFillStyle);
-      if (!this.textFillState_) {
-        this.textFillState_ = {
-          fillStyle: fillStyle
-        };
-      } else {
-        var textFillState = this.textFillState_;
-        textFillState.fillStyle = fillStyle;
-      }
-    }
-    var textStrokeStyle = textStyle.getStroke();
-    if (!textStrokeStyle) {
-      this.textStrokeState_ = null;
-    } else {
-      var textStrokeStyleColor = textStrokeStyle.getColor();
-      var textStrokeStyleLineCap = textStrokeStyle.getLineCap();
-      var textStrokeStyleLineDash = textStrokeStyle.getLineDash();
-      var textStrokeStyleLineDashOffset = textStrokeStyle.getLineDashOffset();
-      var textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();
-      var textStrokeStyleWidth = textStrokeStyle.getWidth();
-      var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();
-      var lineCap = textStrokeStyleLineCap !== undefined ?
-          textStrokeStyleLineCap : ol.render.canvas.defaultLineCap;
-      var lineDash = textStrokeStyleLineDash ?
-          textStrokeStyleLineDash.slice() : ol.render.canvas.defaultLineDash;
-      var lineDashOffset = textStrokeStyleLineDashOffset !== undefined ?
-          textStrokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset;
-      var lineJoin = textStrokeStyleLineJoin !== undefined ?
-          textStrokeStyleLineJoin : ol.render.canvas.defaultLineJoin;
-      var lineWidth = textStrokeStyleWidth !== undefined ?
-          textStrokeStyleWidth : ol.render.canvas.defaultLineWidth;
-      var miterLimit = textStrokeStyleMiterLimit !== undefined ?
-          textStrokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
-      var strokeStyle = ol.colorlike.asColorLike(textStrokeStyleColor ?
-          textStrokeStyleColor : ol.render.canvas.defaultStrokeStyle);
-      if (!this.textStrokeState_) {
-        this.textStrokeState_ = {
-          lineCap: lineCap,
-          lineDash: lineDash,
-          lineDashOffset: lineDashOffset,
-          lineJoin: lineJoin,
-          lineWidth: lineWidth,
-          miterLimit: miterLimit,
-          strokeStyle: strokeStyle
-        };
-      } else {
-        var textStrokeState = this.textStrokeState_;
-        textStrokeState.lineCap = lineCap;
-        textStrokeState.lineDash = lineDash;
-        textStrokeState.lineDashOffset = lineDashOffset;
-        textStrokeState.lineJoin = lineJoin;
-        textStrokeState.lineWidth = lineWidth;
-        textStrokeState.miterLimit = miterLimit;
-        textStrokeState.strokeStyle = strokeStyle;
-      }
-    }
-    var textFont = textStyle.getFont();
-    var textOffsetX = textStyle.getOffsetX();
-    var textOffsetY = textStyle.getOffsetY();
-    var textRotateWithView = textStyle.getRotateWithView();
-    var textRotation = textStyle.getRotation();
-    var textScale = textStyle.getScale();
-    var textText = textStyle.getText();
-    var textTextAlign = textStyle.getTextAlign();
-    var textTextBaseline = textStyle.getTextBaseline();
-    var font = textFont !== undefined ?
-        textFont : ol.render.canvas.defaultFont;
-    var textAlign = textTextAlign !== undefined ?
-        textTextAlign : ol.render.canvas.defaultTextAlign;
-    var textBaseline = textTextBaseline !== undefined ?
-        textTextBaseline : ol.render.canvas.defaultTextBaseline;
-    if (!this.textState_) {
-      this.textState_ = {
-        font: font,
-        textAlign: textAlign,
-        textBaseline: textBaseline
-      };
-    } else {
-      var textState = this.textState_;
-      textState.font = font;
-      textState.textAlign = textAlign;
-      textState.textBaseline = textBaseline;
-    }
-    this.text_ = textText !== undefined ? textText : '';
-    this.textOffsetX_ = textOffsetX !== undefined ? textOffsetX : 0;
-    this.textOffsetY_ = textOffsetY !== undefined ? textOffsetY : 0;
-    this.textRotateWithView_ = textRotateWithView !== undefined ? textRotateWithView : false;
-    this.textRotation_ = textRotation !== undefined ? textRotation : 0;
-    this.textScale_ = textScale !== undefined ? textScale : 1;
-  }
-};
-
-goog.provide('ol.render.canvas.ReplayGroup');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.obj');
-goog.require('ol.render.ReplayGroup');
-goog.require('ol.render.canvas.ImageReplay');
-goog.require('ol.render.canvas.LineStringReplay');
-goog.require('ol.render.canvas.PolygonReplay');
-goog.require('ol.render.canvas.TextReplay');
-goog.require('ol.render.replay');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.render.ReplayGroup}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Max extent.
- * @param {number} resolution Resolution.
- * @param {boolean} overlaps The replay group can have overlapping geometries.
- * @param {number=} opt_renderBuffer Optional rendering buffer.
- * @struct
- */
-ol.render.canvas.ReplayGroup = function(
-    tolerance, maxExtent, resolution, overlaps, opt_renderBuffer) {
-  ol.render.ReplayGroup.call(this);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.tolerance_ = tolerance;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.maxExtent_ = maxExtent;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.overlaps_ = overlaps;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.resolution_ = resolution;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.renderBuffer_ = opt_renderBuffer;
-
-  /**
-   * @private
-   * @type {!Object.<string,
-   *        Object.<ol.render.ReplayType, ol.render.canvas.Replay>>}
-   */
-  this.replaysByZIndex_ = {};
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.hitDetectionContext_ = ol.dom.createCanvasContext2D(1, 1);
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.hitDetectionTransform_ = ol.transform.create();
-};
-ol.inherits(ol.render.canvas.ReplayGroup, ol.render.ReplayGroup);
-
-
-/**
- * This cache is used for storing calculated pixel circles for increasing performance.
- * It is a static property to allow each Replaygroup to access it.
- * @type {Object.<number, Array.<Array.<(boolean|undefined)>>>}
- * @private
- */
-ol.render.canvas.ReplayGroup.circleArrayCache_ = {
-  0: [[true]]
-};
-
-
-/**
- * This method fills a row in the array from the given coordinate to the
- * middle with `true`.
- * @param {Array.<Array.<(boolean|undefined)>>} array The array that will be altered.
- * @param {number} x X coordinate.
- * @param {number} y Y coordinate.
- * @private
- */
-ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_ = function(array, x, y) {
-  var i;
-  var radius = Math.floor(array.length / 2);
-  if (x >= radius) {
-    for (i = radius; i < x; i++) {
-      array[i][y] = true;
-    }
-  } else if (x < radius) {
-    for (i = x + 1; i < radius; i++) {
-      array[i][y] = true;
-    }
-  }
-};
-
-
-/**
- * This methods creates a circle inside a fitting array. Points inside the
- * circle are marked by true, points on the outside are undefined.
- * It uses the midpoint circle algorithm.
- * A cache is used to increase performance.
- * @param {number} radius Radius.
- * @returns {Array.<Array.<(boolean|undefined)>>} An array with marked circle points.
- * @private
- */
-ol.render.canvas.ReplayGroup.getCircleArray_ = function(radius) {
-  if (ol.render.canvas.ReplayGroup.circleArrayCache_[radius] !== undefined) {
-    return ol.render.canvas.ReplayGroup.circleArrayCache_[radius];
-  }
-
-  var arraySize = radius * 2 + 1;
-  var arr = new Array(arraySize);
-  for (var i = 0; i < arraySize; i++) {
-    arr[i] = new Array(arraySize);
-  }
-
-  var x = radius;
-  var y = 0;
-  var error = 0;
-
-  while (x >= y) {
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius + x, radius + y);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius + y, radius + x);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius - y, radius + x);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius - x, radius + y);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius - x, radius - y);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius - y, radius - x);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius + y, radius - x);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius + x, radius - y);
-
-    y++;
-    error += 1 + 2 * y;
-    if (2 * (error - x) + 1 > 0) {
-      x -= 1;
-      error += 1 - 2 * x;
-    }
-  }
-
-  ol.render.canvas.ReplayGroup.circleArrayCache_[radius] = arr;
-  return arr;
-};
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.render.canvas.ReplayGroup.prototype.finish = function() {
-  var zKey;
-  for (zKey in this.replaysByZIndex_) {
-    var replays = this.replaysByZIndex_[zKey];
-    var replayKey;
-    for (replayKey in replays) {
-      replays[replayKey].finish();
-    }
-  }
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T} callback Feature
- *     callback.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.canvas.ReplayGroup.prototype.forEachFeatureAtCoordinate = function(
-    coordinate, resolution, rotation, hitTolerance, skippedFeaturesHash, callback) {
-
-  hitTolerance = Math.round(hitTolerance);
-  var contextSize = hitTolerance * 2 + 1;
-  var transform = ol.transform.compose(this.hitDetectionTransform_,
-      hitTolerance + 0.5, hitTolerance + 0.5,
-      1 / resolution, -1 / resolution,
-      -rotation,
-      -coordinate[0], -coordinate[1]);
-  var context = this.hitDetectionContext_;
-
-  if (context.canvas.width !== contextSize || context.canvas.height !== contextSize) {
-    context.canvas.width = contextSize;
-    context.canvas.height = contextSize;
-  } else {
-    context.clearRect(0, 0, contextSize, contextSize);
-  }
-
-  /**
-   * @type {ol.Extent}
-   */
-  var hitExtent;
-  if (this.renderBuffer_ !== undefined) {
-    hitExtent = ol.extent.createEmpty();
-    ol.extent.extendCoordinate(hitExtent, coordinate);
-    ol.extent.buffer(hitExtent, resolution * (this.renderBuffer_ + hitTolerance), hitExtent);
-  }
-
-  var mask = ol.render.canvas.ReplayGroup.getCircleArray_(hitTolerance);
-
-  return this.replayHitDetection_(context, transform, rotation,
-      skippedFeaturesHash,
-      /**
-       * @param {ol.Feature|ol.render.Feature} feature Feature.
-       * @return {?} Callback result.
-       */
-      function(feature) {
-        var imageData = context.getImageData(0, 0, contextSize, contextSize).data;
-        for (var i = 0; i < contextSize; i++) {
-          for (var j = 0; j < contextSize; j++) {
-            if (mask[i][j]) {
-              if (imageData[(j * contextSize + i) * 4 + 3] > 0) {
-                var result = callback(feature);
-                if (result) {
-                  return result;
-                } else {
-                  context.clearRect(0, 0, contextSize, contextSize);
-                  return undefined;
-                }
-              }
-            }
-          }
-        }
-      }, hitExtent);
-};
-
-
-/**
- * @param {ol.Transform} transform Transform.
- * @return {Array.<number>} Clip coordinates.
- */
-ol.render.canvas.ReplayGroup.prototype.getClipCoords = function(transform) {
-  var maxExtent = this.maxExtent_;
-  var minX = maxExtent[0];
-  var minY = maxExtent[1];
-  var maxX = maxExtent[2];
-  var maxY = maxExtent[3];
-  var flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];
-  ol.geom.flat.transform.transform2D(
-      flatClipCoords, 0, 8, 2, transform, flatClipCoords);
-  return flatClipCoords;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ReplayGroup.prototype.getReplay = function(zIndex, replayType) {
-  var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';
-  var replays = this.replaysByZIndex_[zIndexKey];
-  if (replays === undefined) {
-    replays = {};
-    this.replaysByZIndex_[zIndexKey] = replays;
-  }
-  var replay = replays[replayType];
-  if (replay === undefined) {
-    var Constructor = ol.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_[replayType];
-    replay = new Constructor(this.tolerance_, this.maxExtent_,
-        this.resolution_, this.overlaps_);
-    replays[replayType] = replay;
-  }
-  return replay;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ReplayGroup.prototype.isEmpty = function() {
-  return ol.obj.isEmpty(this.replaysByZIndex_);
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.Transform} transform Transform.
- * @param {number} viewRotation View rotation.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- * @param {Array.<ol.render.ReplayType>=} opt_replayTypes Ordered replay types
- *     to replay. Default is {@link ol.render.replay.ORDER}
- */
-ol.render.canvas.ReplayGroup.prototype.replay = function(context, pixelRatio,
-    transform, viewRotation, skippedFeaturesHash, opt_replayTypes) {
-
-  /** @type {Array.<number>} */
-  var zs = Object.keys(this.replaysByZIndex_).map(Number);
-  zs.sort(ol.array.numberSafeCompareFunction);
-
-  // setup clipping so that the parts of over-simplified geometries are not
-  // visible outside the current extent when panning
-  var flatClipCoords = this.getClipCoords(transform);
-  context.save();
-  context.beginPath();
-  context.moveTo(flatClipCoords[0], flatClipCoords[1]);
-  context.lineTo(flatClipCoords[2], flatClipCoords[3]);
-  context.lineTo(flatClipCoords[4], flatClipCoords[5]);
-  context.lineTo(flatClipCoords[6], flatClipCoords[7]);
-  context.clip();
-
-  var replayTypes = opt_replayTypes ? opt_replayTypes : ol.render.replay.ORDER;
-  var i, ii, j, jj, replays, replay;
-  for (i = 0, ii = zs.length; i < ii; ++i) {
-    replays = this.replaysByZIndex_[zs[i].toString()];
-    for (j = 0, jj = replayTypes.length; j < jj; ++j) {
-      replay = replays[replayTypes[j]];
-      if (replay !== undefined) {
-        replay.replay(context, pixelRatio, transform, viewRotation,
-            skippedFeaturesHash);
-      }
-    }
-  }
-
-  context.restore();
-};
-
-
-/**
- * @private
- * @param {CanvasRenderingContext2D} context Context.
- * @param {ol.Transform} transform Transform.
- * @param {number} viewRotation View rotation.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T} featureCallback
- *     Feature callback.
- * @param {ol.Extent=} opt_hitExtent Only check features that intersect this
- *     extent.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.canvas.ReplayGroup.prototype.replayHitDetection_ = function(
-    context, transform, viewRotation, skippedFeaturesHash,
-    featureCallback, opt_hitExtent) {
-  /** @type {Array.<number>} */
-  var zs = Object.keys(this.replaysByZIndex_).map(Number);
-  zs.sort(function(a, b) {
-    return b - a;
-  });
-
-  var i, ii, j, replays, replay, result;
-  for (i = 0, ii = zs.length; i < ii; ++i) {
-    replays = this.replaysByZIndex_[zs[i].toString()];
-    for (j = ol.render.replay.ORDER.length - 1; j >= 0; --j) {
-      replay = replays[ol.render.replay.ORDER[j]];
-      if (replay !== undefined) {
-        result = replay.replayHitDetection(context, transform, viewRotation,
-            skippedFeaturesHash, featureCallback, opt_hitExtent);
-        if (result) {
-          return result;
-        }
-      }
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<ol.render.ReplayType,
- *                function(new: ol.render.canvas.Replay, number, ol.Extent,
- *                number, boolean)>}
- */
-ol.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_ = {
-  'Circle': ol.render.canvas.PolygonReplay,
-  'Image': ol.render.canvas.ImageReplay,
-  'LineString': ol.render.canvas.LineStringReplay,
-  'Polygon': ol.render.canvas.PolygonReplay,
-  'Text': ol.render.canvas.TextReplay
-};
-
-goog.provide('ol.renderer.Layer');
-
-goog.require('ol');
-goog.require('ol.ImageState');
-goog.require('ol.Observable');
-goog.require('ol.TileState');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.functions');
-goog.require('ol.source.State');
-
-
-/**
- * @constructor
- * @extends {ol.Observable}
- * @param {ol.layer.Layer} layer Layer.
- * @struct
- */
-ol.renderer.Layer = function(layer) {
-
-  ol.Observable.call(this);
-
-  /**
-   * @private
-   * @type {ol.layer.Layer}
-   */
-  this.layer_ = layer;
-
-
-};
-ol.inherits(ol.renderer.Layer, ol.Observable);
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {olx.FrameState} frameState Frame state.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @param {function(this: S, (ol.Feature|ol.render.Feature), ol.layer.Layer): T}
- *     callback Feature callback.
- * @param {S} thisArg Value to use as `this` when executing `callback`.
- * @return {T|undefined} Callback result.
- * @template S,T
- */
-ol.renderer.Layer.prototype.forEachFeatureAtCoordinate = ol.nullFunction;
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {olx.FrameState} frameState Frame state.
- * @return {boolean} Is there a feature at the given coordinate?
- */
-ol.renderer.Layer.prototype.hasFeatureAtCoordinate = ol.functions.FALSE;
-
-
-/**
- * Create a function that adds loaded tiles to the tile lookup.
- * @param {ol.source.Tile} source Tile source.
- * @param {ol.proj.Projection} projection Projection of the tiles.
- * @param {Object.<number, Object.<string, ol.Tile>>} tiles Lookup of loaded
- *     tiles by zoom level.
- * @return {function(number, ol.TileRange):boolean} A function that can be
- *     called with a zoom level and a tile range to add loaded tiles to the
- *     lookup.
- * @protected
- */
-ol.renderer.Layer.prototype.createLoadedTileFinder = function(source, projection, tiles) {
-  return (
-      /**
-       * @param {number} zoom Zoom level.
-       * @param {ol.TileRange} tileRange Tile range.
-       * @return {boolean} The tile range is fully loaded.
-       */
-      function(zoom, tileRange) {
-        function callback(tile) {
-          if (!tiles[zoom]) {
-            tiles[zoom] = {};
-          }
-          tiles[zoom][tile.tileCoord.toString()] = tile;
-        }
-        return source.forEachLoadedTile(projection, zoom, tileRange, callback);
-      });
-};
-
-
-/**
- * @return {ol.layer.Layer} Layer.
- */
-ol.renderer.Layer.prototype.getLayer = function() {
-  return this.layer_;
-};
-
-
-/**
- * Handle changes in image state.
- * @param {ol.events.Event} event Image change event.
- * @private
- */
-ol.renderer.Layer.prototype.handleImageChange_ = function(event) {
-  var image = /** @type {ol.Image} */ (event.target);
-  if (image.getState() === ol.ImageState.LOADED) {
-    this.renderIfReadyAndVisible();
-  }
-};
-
-
-/**
- * Load the image if not already loaded, and register the image change
- * listener if needed.
- * @param {ol.ImageBase} image Image.
- * @return {boolean} `true` if the image is already loaded, `false`
- *     otherwise.
- * @protected
- */
-ol.renderer.Layer.prototype.loadImage = function(image) {
-  var imageState = image.getState();
-  if (imageState != ol.ImageState.LOADED &&
-      imageState != ol.ImageState.ERROR) {
-    ol.events.listen(image, ol.events.EventType.CHANGE,
-        this.handleImageChange_, this);
-  }
-  if (imageState == ol.ImageState.IDLE) {
-    image.load();
-    imageState = image.getState();
-  }
-  return imageState == ol.ImageState.LOADED;
-};
-
-
-/**
- * @protected
- */
-ol.renderer.Layer.prototype.renderIfReadyAndVisible = function() {
-  var layer = this.getLayer();
-  if (layer.getVisible() && layer.getSourceState() == ol.source.State.READY) {
-    this.changed();
-  }
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.source.Tile} tileSource Tile source.
- * @protected
- */
-ol.renderer.Layer.prototype.scheduleExpireCache = function(frameState, tileSource) {
-  if (tileSource.canExpireCache()) {
-    /**
-     * @param {ol.source.Tile} tileSource Tile source.
-     * @param {ol.Map} map Map.
-     * @param {olx.FrameState} frameState Frame state.
-     */
-    var postRenderFunction = function(tileSource, map, frameState) {
-      var tileSourceKey = ol.getUid(tileSource).toString();
-      tileSource.expireCache(frameState.viewState.projection,
-                             frameState.usedTiles[tileSourceKey]);
-    }.bind(null, tileSource);
-
-    frameState.postRenderFunctions.push(
-      /** @type {ol.PostRenderFunction} */ (postRenderFunction)
-    );
-  }
-};
-
-
-/**
- * @param {Object.<string, ol.Attribution>} attributionsSet Attributions
- *     set (target).
- * @param {Array.<ol.Attribution>} attributions Attributions (source).
- * @protected
- */
-ol.renderer.Layer.prototype.updateAttributions = function(attributionsSet, attributions) {
-  if (attributions) {
-    var attribution, i, ii;
-    for (i = 0, ii = attributions.length; i < ii; ++i) {
-      attribution = attributions[i];
-      attributionsSet[ol.getUid(attribution).toString()] = attribution;
-    }
-  }
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.source.Source} source Source.
- * @protected
- */
-ol.renderer.Layer.prototype.updateLogos = function(frameState, source) {
-  var logo = source.getLogo();
-  if (logo !== undefined) {
-    if (typeof logo === 'string') {
-      frameState.logos[logo] = '';
-    } else if (logo) {
-      ol.asserts.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string.
-      ol.asserts.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string.
-      frameState.logos[logo.src] = logo.href;
-    }
-  }
-};
-
-
-/**
- * @param {Object.<string, Object.<string, ol.TileRange>>} usedTiles Used tiles.
- * @param {ol.source.Tile} tileSource Tile source.
- * @param {number} z Z.
- * @param {ol.TileRange} tileRange Tile range.
- * @protected
- */
-ol.renderer.Layer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, tileRange) {
-  // FIXME should we use tilesToDrawByZ instead?
-  var tileSourceKey = ol.getUid(tileSource).toString();
-  var zKey = z.toString();
-  if (tileSourceKey in usedTiles) {
-    if (zKey in usedTiles[tileSourceKey]) {
-      usedTiles[tileSourceKey][zKey].extend(tileRange);
-    } else {
-      usedTiles[tileSourceKey][zKey] = tileRange;
-    }
-  } else {
-    usedTiles[tileSourceKey] = {};
-    usedTiles[tileSourceKey][zKey] = tileRange;
-  }
-};
-
-
-/**
- * Manage tile pyramid.
- * This function performs a number of functions related to the tiles at the
- * current zoom and lower zoom levels:
- * - registers idle tiles in frameState.wantedTiles so that they are not
- *   discarded by the tile queue
- * - enqueues missing tiles
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.source.Tile} tileSource Tile source.
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {ol.Extent} extent Extent.
- * @param {number} currentZ Current Z.
- * @param {number} preload Load low resolution tiles up to 'preload' levels.
- * @param {function(this: T, ol.Tile)=} opt_tileCallback Tile callback.
- * @param {T=} opt_this Object to use as `this` in `opt_tileCallback`.
- * @protected
- * @template T
- */
-ol.renderer.Layer.prototype.manageTilePyramid = function(
-    frameState, tileSource, tileGrid, pixelRatio, projection, extent,
-    currentZ, preload, opt_tileCallback, opt_this) {
-  var tileSourceKey = ol.getUid(tileSource).toString();
-  if (!(tileSourceKey in frameState.wantedTiles)) {
-    frameState.wantedTiles[tileSourceKey] = {};
-  }
-  var wantedTiles = frameState.wantedTiles[tileSourceKey];
-  var tileQueue = frameState.tileQueue;
-  var minZoom = tileGrid.getMinZoom();
-  var tile, tileRange, tileResolution, x, y, z;
-  for (z = currentZ; z >= minZoom; --z) {
-    tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);
-    tileResolution = tileGrid.getResolution(z);
-    for (x = tileRange.minX; x <= tileRange.maxX; ++x) {
-      for (y = tileRange.minY; y <= tileRange.maxY; ++y) {
-        if (currentZ - z <= preload) {
-          tile = tileSource.getTile(z, x, y, pixelRatio, projection);
-          if (tile.getState() == ol.TileState.IDLE) {
-            wantedTiles[tile.getKey()] = true;
-            if (!tileQueue.isKeyQueued(tile.getKey())) {
-              tileQueue.enqueue([tile, tileSourceKey,
-                tileGrid.getTileCoordCenter(tile.tileCoord), tileResolution]);
-            }
-          }
-          if (opt_tileCallback !== undefined) {
-            opt_tileCallback.call(opt_this, tile);
-          }
-        } else {
-          tileSource.useTile(z, x, y, projection);
-        }
-      }
-    }
-  }
-};
-
-goog.provide('ol.renderer.canvas.Layer');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.render.Event');
-goog.require('ol.render.EventType');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.Immediate');
-goog.require('ol.renderer.Layer');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.renderer.Layer}
- * @param {ol.layer.Layer} layer Layer.
- */
-ol.renderer.canvas.Layer = function(layer) {
-
-  ol.renderer.Layer.call(this, layer);
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.renderedResolution;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.transform_ = ol.transform.create();
-
-};
-ol.inherits(ol.renderer.canvas.Layer, ol.renderer.Layer);
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.Extent} extent Clip extent.
- * @protected
- */
-ol.renderer.canvas.Layer.prototype.clip = function(context, frameState, extent) {
-  var pixelRatio = frameState.pixelRatio;
-  var width = frameState.size[0] * pixelRatio;
-  var height = frameState.size[1] * pixelRatio;
-  var rotation = frameState.viewState.rotation;
-  var topLeft = ol.extent.getTopLeft(/** @type {ol.Extent} */ (extent));
-  var topRight = ol.extent.getTopRight(/** @type {ol.Extent} */ (extent));
-  var bottomRight = ol.extent.getBottomRight(/** @type {ol.Extent} */ (extent));
-  var bottomLeft = ol.extent.getBottomLeft(/** @type {ol.Extent} */ (extent));
-
-  ol.transform.apply(frameState.coordinateToPixelTransform, topLeft);
-  ol.transform.apply(frameState.coordinateToPixelTransform, topRight);
-  ol.transform.apply(frameState.coordinateToPixelTransform, bottomRight);
-  ol.transform.apply(frameState.coordinateToPixelTransform, bottomLeft);
-
-  context.save();
-  ol.render.canvas.rotateAtOffset(context, -rotation, width / 2, height / 2);
-  context.beginPath();
-  context.moveTo(topLeft[0] * pixelRatio, topLeft[1] * pixelRatio);
-  context.lineTo(topRight[0] * pixelRatio, topRight[1] * pixelRatio);
-  context.lineTo(bottomRight[0] * pixelRatio, bottomRight[1] * pixelRatio);
-  context.lineTo(bottomLeft[0] * pixelRatio, bottomLeft[1] * pixelRatio);
-  context.clip();
-  ol.render.canvas.rotateAtOffset(context, rotation, width / 2, height / 2);
-};
-
-
-/**
- * @param {ol.render.EventType} type Event type.
- * @param {CanvasRenderingContext2D} context Context.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.Transform=} opt_transform Transform.
- * @private
- */
-ol.renderer.canvas.Layer.prototype.dispatchComposeEvent_ = function(type, context, frameState, opt_transform) {
-  var layer = this.getLayer();
-  if (layer.hasListener(type)) {
-    var width = frameState.size[0] * frameState.pixelRatio;
-    var height = frameState.size[1] * frameState.pixelRatio;
-    var rotation = frameState.viewState.rotation;
-    ol.render.canvas.rotateAtOffset(context, -rotation, width / 2, height / 2);
-    var transform = opt_transform !== undefined ?
-        opt_transform : this.getTransform(frameState, 0);
-    var render = new ol.render.canvas.Immediate(
-        context, frameState.pixelRatio, frameState.extent, transform,
-        frameState.viewState.rotation);
-    var composeEvent = new ol.render.Event(type, render, frameState,
-        context, null);
-    layer.dispatchEvent(composeEvent);
-    ol.render.canvas.rotateAtOffset(context, rotation, width / 2, height / 2);
-  }
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {olx.FrameState} frameState FrameState.
- * @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
- *     callback.
- * @param {S} thisArg Value to use as `this` when executing `callback`.
- * @return {T|undefined} Callback result.
- * @template S,T,U
- */
-ol.renderer.canvas.Layer.prototype.forEachLayerAtCoordinate = function(coordinate, frameState, callback, thisArg) {
-  var hasFeature = this.forEachFeatureAtCoordinate(
-      coordinate, frameState, 0, ol.functions.TRUE, this);
-
-  if (hasFeature) {
-    return callback.call(thisArg, this.getLayer(), null);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @param {ol.Transform=} opt_transform Transform.
- * @protected
- */
-ol.renderer.canvas.Layer.prototype.postCompose = function(context, frameState, layerState, opt_transform) {
-  this.dispatchComposeEvent_(ol.render.EventType.POSTCOMPOSE, context,
-      frameState, opt_transform);
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.Transform=} opt_transform Transform.
- * @protected
- */
-ol.renderer.canvas.Layer.prototype.preCompose = function(context, frameState, opt_transform) {
-  this.dispatchComposeEvent_(ol.render.EventType.PRECOMPOSE, context,
-      frameState, opt_transform);
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.Transform=} opt_transform Transform.
- * @protected
- */
-ol.renderer.canvas.Layer.prototype.dispatchRenderEvent = function(context, frameState, opt_transform) {
-  this.dispatchComposeEvent_(ol.render.EventType.RENDER, context,
-      frameState, opt_transform);
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @param {number} offsetX Offset on the x-axis in view coordinates.
- * @protected
- * @return {!ol.Transform} Transform.
- */
-ol.renderer.canvas.Layer.prototype.getTransform = function(frameState, offsetX) {
-  var viewState = frameState.viewState;
-  var pixelRatio = frameState.pixelRatio;
-  var dx1 = pixelRatio * frameState.size[0] / 2;
-  var dy1 = pixelRatio * frameState.size[1] / 2;
-  var sx = pixelRatio / viewState.resolution;
-  var sy = -sx;
-  var angle = -viewState.rotation;
-  var dx2 = -viewState.center[0] + offsetX;
-  var dy2 = -viewState.center[1];
-  return ol.transform.compose(this.transform_, dx1, dy1, sx, sy, angle, dx2, dy2);
-};
-
-
-/**
- * @abstract
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @param {CanvasRenderingContext2D} context Context.
- */
-ol.renderer.canvas.Layer.prototype.composeFrame = function(frameState, layerState, context) {};
-
-/**
- * @abstract
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @return {boolean} whether composeFrame should be called.
- */
-ol.renderer.canvas.Layer.prototype.prepareFrame = function(frameState, layerState) {};
-
-goog.provide('ol.renderer.vector');
-
-goog.require('ol');
-goog.require('ol.ImageState');
-goog.require('ol.render.ReplayType');
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature1 Feature 1.
- * @param {ol.Feature|ol.render.Feature} feature2 Feature 2.
- * @return {number} Order.
- */
-ol.renderer.vector.defaultOrder = function(feature1, feature2) {
-  return ol.getUid(feature1) - ol.getUid(feature2);
-};
-
-
-/**
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @return {number} Squared pixel tolerance.
- */
-ol.renderer.vector.getSquaredTolerance = function(resolution, pixelRatio) {
-  var tolerance = ol.renderer.vector.getTolerance(resolution, pixelRatio);
-  return tolerance * tolerance;
-};
-
-
-/**
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @return {number} Pixel tolerance.
- */
-ol.renderer.vector.getTolerance = function(resolution, pixelRatio) {
-  return ol.SIMPLIFY_TOLERANCE * resolution / pixelRatio;
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.Circle} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderCircleGeometry_ = function(replayGroup, geometry, style, feature) {
-  var fillStyle = style.getFill();
-  var strokeStyle = style.getStroke();
-  if (fillStyle || strokeStyle) {
-    var circleReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.CIRCLE);
-    circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);
-    circleReplay.drawCircle(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle);
-    textReplay.drawText(geometry.getCenter(), 0, 2, 2, geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {ol.style.Style} style Style.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {function(this: T, ol.events.Event)} listener Listener function.
- * @param {T} thisArg Value to use as `this` when executing `listener`.
- * @return {boolean} `true` if style is loading.
- * @template T
- */
-ol.renderer.vector.renderFeature = function(
-    replayGroup, feature, style, squaredTolerance, listener, thisArg) {
-  var loading = false;
-  var imageStyle, imageState;
-  imageStyle = style.getImage();
-  if (imageStyle) {
-    imageState = imageStyle.getImageState();
-    if (imageState == ol.ImageState.LOADED ||
-        imageState == ol.ImageState.ERROR) {
-      imageStyle.unlistenImageChange(listener, thisArg);
-    } else {
-      if (imageState == ol.ImageState.IDLE) {
-        imageStyle.load();
-      }
-      imageState = imageStyle.getImageState();
-      imageStyle.listenImageChange(listener, thisArg);
-      loading = true;
-    }
-  }
-  ol.renderer.vector.renderFeature_(replayGroup, feature, style,
-      squaredTolerance);
-  return loading;
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {ol.style.Style} style Style.
- * @param {number} squaredTolerance Squared tolerance.
- * @private
- */
-ol.renderer.vector.renderFeature_ = function(
-    replayGroup, feature, style, squaredTolerance) {
-  var geometry = style.getGeometryFunction()(feature);
-  if (!geometry) {
-    return;
-  }
-  var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);
-  var geometryRenderer =
-      ol.renderer.vector.GEOMETRY_RENDERERS_[simplifiedGeometry.getType()];
-  geometryRenderer(replayGroup, simplifiedGeometry, style, feature);
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.GeometryCollection} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderGeometryCollectionGeometry_ = function(replayGroup, geometry, style, feature) {
-  var geometries = geometry.getGeometriesArray();
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    var geometryRenderer =
-        ol.renderer.vector.GEOMETRY_RENDERERS_[geometries[i].getType()];
-    geometryRenderer(replayGroup, geometries[i], style, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.LineString|ol.render.Feature} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderLineStringGeometry_ = function(replayGroup, geometry, style, feature) {
-  var strokeStyle = style.getStroke();
-  if (strokeStyle) {
-    var lineStringReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.LINE_STRING);
-    lineStringReplay.setFillStrokeStyle(null, strokeStyle);
-    lineStringReplay.drawLineString(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle);
-    textReplay.drawText(geometry.getFlatMidpoint(), 0, 2, 2, geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.MultiLineString|ol.render.Feature} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderMultiLineStringGeometry_ = function(replayGroup, geometry, style, feature) {
-  var strokeStyle = style.getStroke();
-  if (strokeStyle) {
-    var lineStringReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.LINE_STRING);
-    lineStringReplay.setFillStrokeStyle(null, strokeStyle);
-    lineStringReplay.drawMultiLineString(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle);
-    var flatMidpointCoordinates = geometry.getFlatMidpoints();
-    textReplay.drawText(flatMidpointCoordinates, 0,
-        flatMidpointCoordinates.length, 2, geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.MultiPolygon} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderMultiPolygonGeometry_ = function(replayGroup, geometry, style, feature) {
-  var fillStyle = style.getFill();
-  var strokeStyle = style.getStroke();
-  if (strokeStyle || fillStyle) {
-    var polygonReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.POLYGON);
-    polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);
-    polygonReplay.drawMultiPolygon(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle);
-    var flatInteriorPointCoordinates = geometry.getFlatInteriorPoints();
-    textReplay.drawText(flatInteriorPointCoordinates, 0,
-        flatInteriorPointCoordinates.length, 2, geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.Point|ol.render.Feature} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderPointGeometry_ = function(replayGroup, geometry, style, feature) {
-  var imageStyle = style.getImage();
-  if (imageStyle) {
-    if (imageStyle.getImageState() != ol.ImageState.LOADED) {
-      return;
-    }
-    var imageReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.IMAGE);
-    imageReplay.setImageStyle(imageStyle);
-    imageReplay.drawPoint(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle);
-    textReplay.drawText(geometry.getFlatCoordinates(), 0, 2, 2, geometry,
-        feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.MultiPoint|ol.render.Feature} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderMultiPointGeometry_ = function(replayGroup, geometry, style, feature) {
-  var imageStyle = style.getImage();
-  if (imageStyle) {
-    if (imageStyle.getImageState() != ol.ImageState.LOADED) {
-      return;
-    }
-    var imageReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.IMAGE);
-    imageReplay.setImageStyle(imageStyle);
-    imageReplay.drawMultiPoint(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle);
-    var flatCoordinates = geometry.getFlatCoordinates();
-    textReplay.drawText(flatCoordinates, 0, flatCoordinates.length,
-        geometry.getStride(), geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.Polygon|ol.render.Feature} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderPolygonGeometry_ = function(replayGroup, geometry, style, feature) {
-  var fillStyle = style.getFill();
-  var strokeStyle = style.getStroke();
-  if (fillStyle || strokeStyle) {
-    var polygonReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.POLYGON);
-    polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);
-    polygonReplay.drawPolygon(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle);
-    textReplay.drawText(
-        geometry.getFlatInteriorPoint(), 0, 2, 2, geometry, feature);
-  }
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<ol.geom.GeometryType,
- *                function(ol.render.ReplayGroup, ol.geom.Geometry,
- *                         ol.style.Style, Object)>}
- */
-ol.renderer.vector.GEOMETRY_RENDERERS_ = {
-  'Point': ol.renderer.vector.renderPointGeometry_,
-  'LineString': ol.renderer.vector.renderLineStringGeometry_,
-  'Polygon': ol.renderer.vector.renderPolygonGeometry_,
-  'MultiPoint': ol.renderer.vector.renderMultiPointGeometry_,
-  'MultiLineString': ol.renderer.vector.renderMultiLineStringGeometry_,
-  'MultiPolygon': ol.renderer.vector.renderMultiPolygonGeometry_,
-  'GeometryCollection': ol.renderer.vector.renderGeometryCollectionGeometry_,
-  'Circle': ol.renderer.vector.renderCircleGeometry_
-};
-
-goog.provide('ol.renderer.canvas.VectorLayer');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.render.EventType');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.ReplayGroup');
-goog.require('ol.renderer.canvas.Layer');
-goog.require('ol.renderer.vector');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.canvas.Layer}
- * @param {ol.layer.Vector} vectorLayer Vector layer.
- */
-ol.renderer.canvas.VectorLayer = function(vectorLayer) {
-
-  ol.renderer.canvas.Layer.call(this, vectorLayer);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.dirty_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedResolution_ = NaN;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.renderedExtent_ = ol.extent.createEmpty();
-
-  /**
-   * @private
-   * @type {function(ol.Feature, ol.Feature): number|null}
-   */
-  this.renderedRenderOrder_ = null;
-
-  /**
-   * @private
-   * @type {ol.render.canvas.ReplayGroup}
-   */
-  this.replayGroup_ = null;
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context_ = ol.dom.createCanvasContext2D();
-
-};
-ol.inherits(ol.renderer.canvas.VectorLayer, ol.renderer.canvas.Layer);
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorLayer.prototype.composeFrame = function(frameState, layerState, context) {
-
-  var extent = frameState.extent;
-  var pixelRatio = frameState.pixelRatio;
-  var skippedFeatureUids = layerState.managed ?
-      frameState.skippedFeatureUids : {};
-  var viewState = frameState.viewState;
-  var projection = viewState.projection;
-  var rotation = viewState.rotation;
-  var projectionExtent = projection.getExtent();
-  var vectorSource = /** @type {ol.source.Vector} */ (this.getLayer().getSource());
-
-  var transform = this.getTransform(frameState, 0);
-
-  this.preCompose(context, frameState, transform);
-
-  // clipped rendering if layer extent is set
-  var clipExtent = layerState.extent;
-  var clipped = clipExtent !== undefined;
-  if (clipped) {
-    this.clip(context, frameState,  /** @type {ol.Extent} */ (clipExtent));
-  }
-  var replayGroup = this.replayGroup_;
-  if (replayGroup && !replayGroup.isEmpty()) {
-    var layer = this.getLayer();
-    var drawOffsetX = 0;
-    var drawOffsetY = 0;
-    var replayContext;
-    if (layer.hasListener(ol.render.EventType.RENDER)) {
-      var drawWidth = context.canvas.width;
-      var drawHeight = context.canvas.height;
-      if (rotation) {
-        var drawSize = Math.round(Math.sqrt(drawWidth * drawWidth + drawHeight * drawHeight));
-        drawOffsetX = (drawSize - drawWidth) / 2;
-        drawOffsetY = (drawSize - drawHeight) / 2;
-        drawWidth = drawHeight = drawSize;
-      }
-      // resize and clear
-      this.context_.canvas.width = drawWidth;
-      this.context_.canvas.height = drawHeight;
-      replayContext = this.context_;
-    } else {
-      replayContext = context;
-    }
-    // for performance reasons, context.save / context.restore is not used
-    // to save and restore the transformation matrix and the opacity.
-    // see http://jsperf.com/context-save-restore-versus-variable
-    var alpha = replayContext.globalAlpha;
-    replayContext.globalAlpha = layerState.opacity;
-    if (replayContext != context) {
-      replayContext.translate(drawOffsetX, drawOffsetY);
-    }
-
-    var width = frameState.size[0] * pixelRatio;
-    var height = frameState.size[1] * pixelRatio;
-    ol.render.canvas.rotateAtOffset(replayContext, -rotation,
-        width / 2, height / 2);
-    replayGroup.replay(replayContext, pixelRatio, transform, rotation,
-        skippedFeatureUids);
-    if (vectorSource.getWrapX() && projection.canWrapX() &&
-        !ol.extent.containsExtent(projectionExtent, extent)) {
-      var startX = extent[0];
-      var worldWidth = ol.extent.getWidth(projectionExtent);
-      var world = 0;
-      var offsetX;
-      while (startX < projectionExtent[0]) {
-        --world;
-        offsetX = worldWidth * world;
-        transform = this.getTransform(frameState, offsetX);
-        replayGroup.replay(replayContext, pixelRatio, transform, rotation,
-            skippedFeatureUids);
-        startX += worldWidth;
-      }
-      world = 0;
-      startX = extent[2];
-      while (startX > projectionExtent[2]) {
-        ++world;
-        offsetX = worldWidth * world;
-        transform = this.getTransform(frameState, offsetX);
-        replayGroup.replay(replayContext, pixelRatio, transform, rotation,
-            skippedFeatureUids);
-        startX -= worldWidth;
-      }
-      // restore original transform for render and compose events
-      transform = this.getTransform(frameState, 0);
-    }
-    ol.render.canvas.rotateAtOffset(replayContext, rotation,
-        width / 2, height / 2);
-
-    if (replayContext != context) {
-      this.dispatchRenderEvent(replayContext, frameState, transform);
-      context.drawImage(replayContext.canvas, -drawOffsetX, -drawOffsetY);
-      replayContext.translate(-drawOffsetX, -drawOffsetY);
-    }
-    replayContext.globalAlpha = alpha;
-  }
-
-  if (clipped) {
-    context.restore();
-  }
-  this.postCompose(context, frameState, layerState, transform);
-
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-  if (!this.replayGroup_) {
-    return undefined;
-  } else {
-    var resolution = frameState.viewState.resolution;
-    var rotation = frameState.viewState.rotation;
-    var layer = this.getLayer();
-    /** @type {Object.<string, boolean>} */
-    var features = {};
-    return this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution,
-        rotation, hitTolerance, {},
-        /**
-         * @param {ol.Feature|ol.render.Feature} feature Feature.
-         * @return {?} Callback result.
-         */
-        function(feature) {
-          var key = ol.getUid(feature).toString();
-          if (!(key in features)) {
-            features[key] = true;
-            return callback.call(thisArg, feature, layer);
-          }
-        });
-  }
-};
-
-
-/**
- * Handle changes in image style state.
- * @param {ol.events.Event} event Image style change event.
- * @private
- */
-ol.renderer.canvas.VectorLayer.prototype.handleStyleImageChange_ = function(event) {
-  this.renderIfReadyAndVisible();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorLayer.prototype.prepareFrame = function(frameState, layerState) {
-
-  var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
-  var vectorSource = vectorLayer.getSource();
-
-  this.updateAttributions(
-      frameState.attributions, vectorSource.getAttributions());
-  this.updateLogos(frameState, vectorSource);
-
-  var animating = frameState.viewHints[ol.ViewHint.ANIMATING];
-  var interacting = frameState.viewHints[ol.ViewHint.INTERACTING];
-  var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
-  var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();
-
-  if (!this.dirty_ && (!updateWhileAnimating && animating) ||
-      (!updateWhileInteracting && interacting)) {
-    return true;
-  }
-
-  var frameStateExtent = frameState.extent;
-  var viewState = frameState.viewState;
-  var projection = viewState.projection;
-  var resolution = viewState.resolution;
-  var pixelRatio = frameState.pixelRatio;
-  var vectorLayerRevision = vectorLayer.getRevision();
-  var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();
-  var vectorLayerRenderOrder = vectorLayer.getRenderOrder();
-
-  if (vectorLayerRenderOrder === undefined) {
-    vectorLayerRenderOrder = ol.renderer.vector.defaultOrder;
-  }
-
-  var extent = ol.extent.buffer(frameStateExtent,
-      vectorLayerRenderBuffer * resolution);
-  var projectionExtent = viewState.projection.getExtent();
-
-  if (vectorSource.getWrapX() && viewState.projection.canWrapX() &&
-      !ol.extent.containsExtent(projectionExtent, frameState.extent)) {
-    // For the replay group, we need an extent that intersects the real world
-    // (-180° to +180°). To support geometries in a coordinate range from -540°
-    // to +540°, we add at least 1 world width on each side of the projection
-    // extent. If the viewport is wider than the world, we need to add half of
-    // the viewport width to make sure we cover the whole viewport.
-    var worldWidth = ol.extent.getWidth(projectionExtent);
-    var buffer = Math.max(ol.extent.getWidth(extent) / 2, worldWidth);
-    extent[0] = projectionExtent[0] - buffer;
-    extent[2] = projectionExtent[2] + buffer;
-  }
-
-  if (!this.dirty_ &&
-      this.renderedResolution_ == resolution &&
-      this.renderedRevision_ == vectorLayerRevision &&
-      this.renderedRenderOrder_ == vectorLayerRenderOrder &&
-      ol.extent.containsExtent(this.renderedExtent_, extent)) {
-    return true;
-  }
-
-  this.replayGroup_ = null;
-
-  this.dirty_ = false;
-
-  var replayGroup =
-      new ol.render.canvas.ReplayGroup(
-          ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
-          resolution, vectorSource.getOverlaps(), vectorLayer.getRenderBuffer());
-  vectorSource.loadFeatures(extent, resolution, projection);
-  /**
-   * @param {ol.Feature} feature Feature.
-   * @this {ol.renderer.canvas.VectorLayer}
-   */
-  var renderFeature = function(feature) {
-    var styles;
-    var styleFunction = feature.getStyleFunction();
-    if (styleFunction) {
-      styles = styleFunction.call(feature, resolution);
-    } else {
-      styleFunction = vectorLayer.getStyleFunction();
-      if (styleFunction) {
-        styles = styleFunction(feature, resolution);
-      }
-    }
-    if (styles) {
-      var dirty = this.renderFeature(
-          feature, resolution, pixelRatio, styles, replayGroup);
-      this.dirty_ = this.dirty_ || dirty;
-    }
-  };
-  if (vectorLayerRenderOrder) {
-    /** @type {Array.<ol.Feature>} */
-    var features = [];
-    vectorSource.forEachFeatureInExtent(extent,
-        /**
-         * @param {ol.Feature} feature Feature.
-         */
-        function(feature) {
-          features.push(feature);
-        }, this);
-    features.sort(vectorLayerRenderOrder);
-    features.forEach(renderFeature, this);
-  } else {
-    vectorSource.forEachFeatureInExtent(extent, renderFeature, this);
-  }
-  replayGroup.finish();
-
-  this.renderedResolution_ = resolution;
-  this.renderedRevision_ = vectorLayerRevision;
-  this.renderedRenderOrder_ = vectorLayerRenderOrder;
-  this.renderedExtent_ = extent;
-  this.replayGroup_ = replayGroup;
-
-  return true;
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
- *     styles.
- * @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
- * @return {boolean} `true` if an image is loading.
- */
-ol.renderer.canvas.VectorLayer.prototype.renderFeature = function(feature, resolution, pixelRatio, styles, replayGroup) {
-  if (!styles) {
-    return false;
-  }
-  var loading = false;
-  if (Array.isArray(styles)) {
-    for (var i = 0, ii = styles.length; i < ii; ++i) {
-      loading = ol.renderer.vector.renderFeature(
-          replayGroup, feature, styles[i],
-          ol.renderer.vector.getSquaredTolerance(resolution, pixelRatio),
-          this.handleStyleImageChange_, this) || loading;
-    }
-  } else {
-    loading = ol.renderer.vector.renderFeature(
-        replayGroup, feature, styles,
-        ol.renderer.vector.getSquaredTolerance(resolution, pixelRatio),
-        this.handleStyleImageChange_, this) || loading;
-  }
-  return loading;
-};
-
-// This file is automatically generated, do not edit
-/* eslint openlayers-internal/no-missing-requires: 0 */
-goog.provide('ol.renderer.webgl.defaultmapshader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Fragment}
-   * @struct
-   */
-  ol.renderer.webgl.defaultmapshader.Fragment = function() {
-    ol.webgl.Fragment.call(this, ol.renderer.webgl.defaultmapshader.Fragment.SOURCE);
-  };
-  ol.inherits(ol.renderer.webgl.defaultmapshader.Fragment, ol.webgl.Fragment);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.defaultmapshader.Fragment.DEBUG_SOURCE = 'precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform float u_opacity;\nuniform sampler2D u_texture;\n\nvoid main(void) {\n  vec4 texColor = texture2D(u_texture, v_texCoord);\n  gl_FragColor.rgb = texColor.rgb;\n  gl_FragColor.a = texColor.a * u_opacity;\n}\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.defaultmapshader.Fragment.OPTIMIZED_SOURCE = 'precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.defaultmapshader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
-      ol.renderer.webgl.defaultmapshader.Fragment.DEBUG_SOURCE :
-      ol.renderer.webgl.defaultmapshader.Fragment.OPTIMIZED_SOURCE;
-
-
-  ol.renderer.webgl.defaultmapshader.fragment = new ol.renderer.webgl.defaultmapshader.Fragment();
-
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Vertex}
-   * @struct
-   */
-  ol.renderer.webgl.defaultmapshader.Vertex = function() {
-    ol.webgl.Vertex.call(this, ol.renderer.webgl.defaultmapshader.Vertex.SOURCE);
-  };
-  ol.inherits(ol.renderer.webgl.defaultmapshader.Vertex, ol.webgl.Vertex);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.defaultmapshader.Vertex.DEBUG_SOURCE = 'varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nuniform mat4 u_texCoordMatrix;\nuniform mat4 u_projectionMatrix;\n\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\n  v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\n}\n\n\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.defaultmapshader.Vertex.OPTIMIZED_SOURCE = 'varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.defaultmapshader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
-      ol.renderer.webgl.defaultmapshader.Vertex.DEBUG_SOURCE :
-      ol.renderer.webgl.defaultmapshader.Vertex.OPTIMIZED_SOURCE;
-
-
-  ol.renderer.webgl.defaultmapshader.vertex = new ol.renderer.webgl.defaultmapshader.Vertex();
-
-
-  /**
-   * @constructor
-   * @param {WebGLRenderingContext} gl GL.
-   * @param {WebGLProgram} program Program.
-   * @struct
-   */
-  ol.renderer.webgl.defaultmapshader.Locations = function(gl, program) {
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_opacity = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_opacity' : 'f');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_projectionMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'e');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_texCoordMatrix = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_texCoordMatrix' : 'd');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_texture = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_texture' : 'g');
-
-    /**
-     * @type {number}
-     */
-    this.a_position = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_position' : 'b');
-
-    /**
-     * @type {number}
-     */
-    this.a_texCoord = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'c');
-  };
-
-}
-
-goog.provide('ol.renderer.webgl.Layer');
-
-goog.require('ol');
-goog.require('ol.render.Event');
-goog.require('ol.render.EventType');
-goog.require('ol.render.webgl.Immediate');
-goog.require('ol.renderer.Layer');
-goog.require('ol.renderer.webgl.defaultmapshader');
-goog.require('ol.transform');
-goog.require('ol.vec.Mat4');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-goog.require('ol.webgl.Context');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @abstract
-   * @extends {ol.renderer.Layer}
-   * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
-   * @param {ol.layer.Layer} layer Layer.
-   */
-  ol.renderer.webgl.Layer = function(mapRenderer, layer) {
-
-    ol.renderer.Layer.call(this, layer);
-
-    /**
-     * @protected
-     * @type {ol.renderer.webgl.Map}
-     */
-    this.mapRenderer = mapRenderer;
-
-    /**
-     * @private
-     * @type {ol.webgl.Buffer}
-     */
-    this.arrayBuffer_ = new ol.webgl.Buffer([
-      -1, -1, 0, 0,
-      1, -1, 1, 0,
-      -1, 1, 0, 1,
-      1, 1, 1, 1
-    ]);
-
-    /**
-     * @protected
-     * @type {WebGLTexture}
-     */
-    this.texture = null;
-
-    /**
-     * @protected
-     * @type {WebGLFramebuffer}
-     */
-    this.framebuffer = null;
-
-    /**
-     * @protected
-     * @type {number|undefined}
-     */
-    this.framebufferDimension = undefined;
-
-    /**
-     * @protected
-     * @type {ol.Transform}
-     */
-    this.texCoordMatrix = ol.transform.create();
-
-    /**
-     * @protected
-     * @type {ol.Transform}
-     */
-    this.projectionMatrix = ol.transform.create();
-
-    /**
-     * @type {Array.<number>}
-     * @private
-     */
-    this.tmpMat4_ = ol.vec.Mat4.create();
-
-    /**
-     * @private
-     * @type {ol.renderer.webgl.defaultmapshader.Locations}
-     */
-    this.defaultLocations_ = null;
-
-  };
-  ol.inherits(ol.renderer.webgl.Layer, ol.renderer.Layer);
-
-
-  /**
-   * @param {olx.FrameState} frameState Frame state.
-   * @param {number} framebufferDimension Framebuffer dimension.
-   * @protected
-   */
-  ol.renderer.webgl.Layer.prototype.bindFramebuffer = function(frameState, framebufferDimension) {
-
-    var gl = this.mapRenderer.getGL();
-
-    if (this.framebufferDimension === undefined ||
-        this.framebufferDimension != framebufferDimension) {
-      /**
-       * @param {WebGLRenderingContext} gl GL.
-       * @param {WebGLFramebuffer} framebuffer Framebuffer.
-       * @param {WebGLTexture} texture Texture.
-       */
-      var postRenderFunction = function(gl, framebuffer, texture) {
-        if (!gl.isContextLost()) {
-          gl.deleteFramebuffer(framebuffer);
-          gl.deleteTexture(texture);
-        }
-      }.bind(null, gl, this.framebuffer, this.texture);
-
-      frameState.postRenderFunctions.push(
-        /** @type {ol.PostRenderFunction} */ (postRenderFunction)
-      );
-
-      var texture = ol.webgl.Context.createEmptyTexture(
-          gl, framebufferDimension, framebufferDimension);
-
-      var framebuffer = gl.createFramebuffer();
-      gl.bindFramebuffer(ol.webgl.FRAMEBUFFER, framebuffer);
-      gl.framebufferTexture2D(ol.webgl.FRAMEBUFFER,
-          ol.webgl.COLOR_ATTACHMENT0, ol.webgl.TEXTURE_2D, texture, 0);
-
-      this.texture = texture;
-      this.framebuffer = framebuffer;
-      this.framebufferDimension = framebufferDimension;
-
-    } else {
-      gl.bindFramebuffer(ol.webgl.FRAMEBUFFER, this.framebuffer);
-    }
-
-  };
-
-
-  /**
-   * @param {olx.FrameState} frameState Frame state.
-   * @param {ol.LayerState} layerState Layer state.
-   * @param {ol.webgl.Context} context Context.
-   */
-  ol.renderer.webgl.Layer.prototype.composeFrame = function(frameState, layerState, context) {
-
-    this.dispatchComposeEvent_(
-        ol.render.EventType.PRECOMPOSE, context, frameState);
-
-    context.bindBuffer(ol.webgl.ARRAY_BUFFER, this.arrayBuffer_);
-
-    var gl = context.getGL();
-
-    var fragmentShader = ol.renderer.webgl.defaultmapshader.fragment;
-    var vertexShader = ol.renderer.webgl.defaultmapshader.vertex;
-
-    var program = context.getProgram(fragmentShader, vertexShader);
-
-    var locations;
-    if (!this.defaultLocations_) {
-      // eslint-disable-next-line openlayers-internal/no-missing-requires
-      locations = new ol.renderer.webgl.defaultmapshader.Locations(gl, program);
-      this.defaultLocations_ = locations;
-    } else {
-      locations = this.defaultLocations_;
-    }
-
-    if (context.useProgram(program)) {
-      gl.enableVertexAttribArray(locations.a_position);
-      gl.vertexAttribPointer(
-          locations.a_position, 2, ol.webgl.FLOAT, false, 16, 0);
-      gl.enableVertexAttribArray(locations.a_texCoord);
-      gl.vertexAttribPointer(
-          locations.a_texCoord, 2, ol.webgl.FLOAT, false, 16, 8);
-      gl.uniform1i(locations.u_texture, 0);
-    }
-
-    gl.uniformMatrix4fv(locations.u_texCoordMatrix, false,
-        ol.vec.Mat4.fromTransform(this.tmpMat4_, this.getTexCoordMatrix()));
-    gl.uniformMatrix4fv(locations.u_projectionMatrix, false,
-        ol.vec.Mat4.fromTransform(this.tmpMat4_, this.getProjectionMatrix()));
-    gl.uniform1f(locations.u_opacity, layerState.opacity);
-    gl.bindTexture(ol.webgl.TEXTURE_2D, this.getTexture());
-    gl.drawArrays(ol.webgl.TRIANGLE_STRIP, 0, 4);
-
-    this.dispatchComposeEvent_(
-        ol.render.EventType.POSTCOMPOSE, context, frameState);
-
-  };
-
-
-  /**
-   * @param {ol.render.EventType} type Event type.
-   * @param {ol.webgl.Context} context WebGL context.
-   * @param {olx.FrameState} frameState Frame state.
-   * @private
-   */
-  ol.renderer.webgl.Layer.prototype.dispatchComposeEvent_ = function(type, context, frameState) {
-    var layer = this.getLayer();
-    if (layer.hasListener(type)) {
-      var viewState = frameState.viewState;
-      var resolution = viewState.resolution;
-      var pixelRatio = frameState.pixelRatio;
-      var extent = frameState.extent;
-      var center = viewState.center;
-      var rotation = viewState.rotation;
-      var size = frameState.size;
-
-      var render = new ol.render.webgl.Immediate(
-          context, center, resolution, rotation, size, extent, pixelRatio);
-      var composeEvent = new ol.render.Event(
-          type, render, frameState, null, context);
-      layer.dispatchEvent(composeEvent);
-    }
-  };
-
-
-  /**
-   * @return {!ol.Transform} Matrix.
-   */
-  ol.renderer.webgl.Layer.prototype.getTexCoordMatrix = function() {
-    return this.texCoordMatrix;
-  };
-
-
-  /**
-   * @return {WebGLTexture} Texture.
-   */
-  ol.renderer.webgl.Layer.prototype.getTexture = function() {
-    return this.texture;
-  };
-
-
-  /**
-   * @return {!ol.Transform} Matrix.
-   */
-  ol.renderer.webgl.Layer.prototype.getProjectionMatrix = function() {
-    return this.projectionMatrix;
-  };
-
-
-  /**
-   * Handle webglcontextlost.
-   */
-  ol.renderer.webgl.Layer.prototype.handleWebGLContextLost = function() {
-    this.texture = null;
-    this.framebuffer = null;
-    this.framebufferDimension = undefined;
-  };
-
-
-  /**
-   * @abstract
-   * @param {olx.FrameState} frameState Frame state.
-   * @param {ol.LayerState} layerState Layer state.
-   * @param {ol.webgl.Context} context Context.
-   * @return {boolean} whether composeFrame should be called.
-   */
-  ol.renderer.webgl.Layer.prototype.prepareFrame = function(frameState, layerState, context) {};
-
-
-  /**
-   * @abstract
-   * @param {ol.Pixel} pixel Pixel.
-   * @param {olx.FrameState} frameState FrameState.
-   * @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
-   *     callback.
-   * @param {S} thisArg Value to use as `this` when executing `callback`.
-   * @return {T|undefined} Callback result.
-   * @template S,T,U
-   */
-  ol.renderer.webgl.Layer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {};
-
-}
-
-goog.provide('ol.renderer.webgl.VectorLayer');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.extent');
-goog.require('ol.render.webgl.ReplayGroup');
-goog.require('ol.renderer.vector');
-goog.require('ol.renderer.webgl.Layer');
-goog.require('ol.transform');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.renderer.webgl.Layer}
-   * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
-   * @param {ol.layer.Vector} vectorLayer Vector layer.
-   */
-  ol.renderer.webgl.VectorLayer = function(mapRenderer, vectorLayer) {
-
-    ol.renderer.webgl.Layer.call(this, mapRenderer, vectorLayer);
-
-    /**
-     * @private
-     * @type {boolean}
-     */
-    this.dirty_ = false;
-
-    /**
-     * @private
-     * @type {number}
-     */
-    this.renderedRevision_ = -1;
-
-    /**
-     * @private
-     * @type {number}
-     */
-    this.renderedResolution_ = NaN;
-
-    /**
-     * @private
-     * @type {ol.Extent}
-     */
-    this.renderedExtent_ = ol.extent.createEmpty();
-
-    /**
-     * @private
-     * @type {function(ol.Feature, ol.Feature): number|null}
-     */
-    this.renderedRenderOrder_ = null;
-
-    /**
-     * @private
-     * @type {ol.render.webgl.ReplayGroup}
-     */
-    this.replayGroup_ = null;
-
-    /**
-     * The last layer state.
-     * @private
-     * @type {?ol.LayerState}
-     */
-    this.layerState_ = null;
-
-  };
-  ol.inherits(ol.renderer.webgl.VectorLayer, ol.renderer.webgl.Layer);
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.VectorLayer.prototype.composeFrame = function(frameState, layerState, context) {
-    this.layerState_ = layerState;
-    var viewState = frameState.viewState;
-    var replayGroup = this.replayGroup_;
-    var size = frameState.size;
-    var pixelRatio = frameState.pixelRatio;
-    var gl = this.mapRenderer.getGL();
-    if (replayGroup && !replayGroup.isEmpty()) {
-      gl.enable(gl.SCISSOR_TEST);
-      gl.scissor(0, 0, size[0] * pixelRatio, size[1] * pixelRatio);
-      replayGroup.replay(context,
-          viewState.center, viewState.resolution, viewState.rotation,
-          size, pixelRatio, layerState.opacity,
-          layerState.managed ? frameState.skippedFeatureUids : {});
-      gl.disable(gl.SCISSOR_TEST);
-    }
-
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.VectorLayer.prototype.disposeInternal = function() {
-    var replayGroup = this.replayGroup_;
-    if (replayGroup) {
-      var context = this.mapRenderer.getContext();
-      replayGroup.getDeleteResourcesFunction(context)();
-      this.replayGroup_ = null;
-    }
-    ol.renderer.webgl.Layer.prototype.disposeInternal.call(this);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.VectorLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-    if (!this.replayGroup_ || !this.layerState_) {
-      return undefined;
-    } else {
-      var context = this.mapRenderer.getContext();
-      var viewState = frameState.viewState;
-      var layer = this.getLayer();
-      var layerState = this.layerState_;
-      /** @type {Object.<string, boolean>} */
-      var features = {};
-      return this.replayGroup_.forEachFeatureAtCoordinate(coordinate,
-          context, viewState.center, viewState.resolution, viewState.rotation,
-          frameState.size, frameState.pixelRatio, layerState.opacity,
-          {},
-          /**
-           * @param {ol.Feature|ol.render.Feature} feature Feature.
-           * @return {?} Callback result.
-           */
-          function(feature) {
-            var key = ol.getUid(feature).toString();
-            if (!(key in features)) {
-              features[key] = true;
-              return callback.call(thisArg, feature, layer);
-            }
-          });
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.VectorLayer.prototype.hasFeatureAtCoordinate = function(coordinate, frameState) {
-    if (!this.replayGroup_ || !this.layerState_) {
-      return false;
-    } else {
-      var context = this.mapRenderer.getContext();
-      var viewState = frameState.viewState;
-      var layerState = this.layerState_;
-      return this.replayGroup_.hasFeatureAtCoordinate(coordinate,
-          context, viewState.center, viewState.resolution, viewState.rotation,
-          frameState.size, frameState.pixelRatio, layerState.opacity,
-          frameState.skippedFeatureUids);
-    }
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.VectorLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
-    var coordinate = ol.transform.apply(
-        frameState.pixelToCoordinateTransform, pixel.slice());
-    var hasFeature = this.hasFeatureAtCoordinate(coordinate, frameState);
-
-    if (hasFeature) {
-      return callback.call(thisArg, this.getLayer(), null);
-    } else {
-      return undefined;
-    }
-  };
-
-
-  /**
-   * Handle changes in image style state.
-   * @param {ol.events.Event} event Image style change event.
-   * @private
-   */
-  ol.renderer.webgl.VectorLayer.prototype.handleStyleImageChange_ = function(event) {
-    this.renderIfReadyAndVisible();
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.VectorLayer.prototype.prepareFrame = function(frameState, layerState, context) {
-
-    var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
-    var vectorSource = vectorLayer.getSource();
-
-    this.updateAttributions(
-        frameState.attributions, vectorSource.getAttributions());
-    this.updateLogos(frameState, vectorSource);
-
-    var animating = frameState.viewHints[ol.ViewHint.ANIMATING];
-    var interacting = frameState.viewHints[ol.ViewHint.INTERACTING];
-    var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
-    var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();
-
-    if (!this.dirty_ && (!updateWhileAnimating && animating) ||
-        (!updateWhileInteracting && interacting)) {
-      return true;
-    }
-
-    var frameStateExtent = frameState.extent;
-    var viewState = frameState.viewState;
-    var projection = viewState.projection;
-    var resolution = viewState.resolution;
-    var pixelRatio = frameState.pixelRatio;
-    var vectorLayerRevision = vectorLayer.getRevision();
-    var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();
-    var vectorLayerRenderOrder = vectorLayer.getRenderOrder();
-
-    if (vectorLayerRenderOrder === undefined) {
-      vectorLayerRenderOrder = ol.renderer.vector.defaultOrder;
-    }
-
-    var extent = ol.extent.buffer(frameStateExtent,
-        vectorLayerRenderBuffer * resolution);
-
-    if (!this.dirty_ &&
-        this.renderedResolution_ == resolution &&
-        this.renderedRevision_ == vectorLayerRevision &&
-        this.renderedRenderOrder_ == vectorLayerRenderOrder &&
-        ol.extent.containsExtent(this.renderedExtent_, extent)) {
-      return true;
-    }
-
-    if (this.replayGroup_) {
-      frameState.postRenderFunctions.push(
-          this.replayGroup_.getDeleteResourcesFunction(context));
-    }
-
-    this.dirty_ = false;
-
-    var replayGroup = new ol.render.webgl.ReplayGroup(
-        ol.renderer.vector.getTolerance(resolution, pixelRatio),
-        extent, vectorLayer.getRenderBuffer());
-    vectorSource.loadFeatures(extent, resolution, projection);
-    /**
-     * @param {ol.Feature} feature Feature.
-     * @this {ol.renderer.webgl.VectorLayer}
-     */
-    var renderFeature = function(feature) {
-      var styles;
-      var styleFunction = feature.getStyleFunction();
-      if (styleFunction) {
-        styles = styleFunction.call(feature, resolution);
-      } else {
-        styleFunction = vectorLayer.getStyleFunction();
-        if (styleFunction) {
-          styles = styleFunction(feature, resolution);
-        }
-      }
-      if (styles) {
-        var dirty = this.renderFeature(
-            feature, resolution, pixelRatio, styles, replayGroup);
-        this.dirty_ = this.dirty_ || dirty;
-      }
-    };
-    if (vectorLayerRenderOrder) {
-      /** @type {Array.<ol.Feature>} */
-      var features = [];
-      vectorSource.forEachFeatureInExtent(extent,
-          /**
-           * @param {ol.Feature} feature Feature.
-           */
-          function(feature) {
-            features.push(feature);
-          }, this);
-      features.sort(vectorLayerRenderOrder);
-      features.forEach(renderFeature, this);
-    } else {
-      vectorSource.forEachFeatureInExtent(extent, renderFeature, this);
-    }
-    replayGroup.finish(context);
-
-    this.renderedResolution_ = resolution;
-    this.renderedRevision_ = vectorLayerRevision;
-    this.renderedRenderOrder_ = vectorLayerRenderOrder;
-    this.renderedExtent_ = extent;
-    this.replayGroup_ = replayGroup;
-
-    return true;
-  };
-
-
-  /**
-   * @param {ol.Feature} feature Feature.
-   * @param {number} resolution Resolution.
-   * @param {number} pixelRatio Pixel ratio.
-   * @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
-   *     styles.
-   * @param {ol.render.webgl.ReplayGroup} replayGroup Replay group.
-   * @return {boolean} `true` if an image is loading.
-   */
-  ol.renderer.webgl.VectorLayer.prototype.renderFeature = function(feature, resolution, pixelRatio, styles, replayGroup) {
-    if (!styles) {
-      return false;
-    }
-    var loading = false;
-    if (Array.isArray(styles)) {
-      for (var i = styles.length - 1, ii = 0; i >= ii; --i) {
-        loading = ol.renderer.vector.renderFeature(
-            replayGroup, feature, styles[i],
-            ol.renderer.vector.getSquaredTolerance(resolution, pixelRatio),
-            this.handleStyleImageChange_, this) || loading;
-      }
-    } else {
-      loading = ol.renderer.vector.renderFeature(
-          replayGroup, feature, styles,
-          ol.renderer.vector.getSquaredTolerance(resolution, pixelRatio),
-          this.handleStyleImageChange_, this) || loading;
-    }
-    return loading;
-  };
-
-}
-
-goog.provide('ol.layer.Vector');
-
-goog.require('ol');
-goog.require('ol.layer.Layer');
-goog.require('ol.obj');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.canvas.VectorLayer');
-goog.require('ol.renderer.webgl.VectorLayer');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Vector data that is rendered client-side.
- * Note that any property set in the options is set as a {@link ol.Object}
- * property on the layer object; for example, setting `title: 'My Title'` in the
- * options means that `title` is observable, and has get/set accessors.
- *
- * @constructor
- * @extends {ol.layer.Layer}
- * @fires ol.render.Event
- * @param {olx.layer.VectorOptions=} opt_options Options.
- * @api
- */
-ol.layer.Vector = function(opt_options) {
-  var options = opt_options ?
-     opt_options : /** @type {olx.layer.VectorOptions} */ ({});
-
-  var baseOptions = ol.obj.assign({}, options);
-
-  delete baseOptions.style;
-  delete baseOptions.renderBuffer;
-  delete baseOptions.updateWhileAnimating;
-  delete baseOptions.updateWhileInteracting;
-  ol.layer.Layer.call(this, /** @type {olx.layer.LayerOptions} */ (baseOptions));
-
- /**
-  * @type {number}
-  * @private
-  */
-  this.renderBuffer_ = options.renderBuffer !== undefined ?
-     options.renderBuffer : 100;
-
- /**
-  * User provided style.
-  * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
-  * @private
-  */
-  this.style_ = null;
-
- /**
-  * Style function for use within the library.
-  * @type {ol.StyleFunction|undefined}
-  * @private
-  */
-  this.styleFunction_ = undefined;
-
-  this.setStyle(options.style);
-
- /**
-  * @type {boolean}
-  * @private
-  */
-  this.updateWhileAnimating_ = options.updateWhileAnimating !== undefined ?
-     options.updateWhileAnimating : false;
-
- /**
-  * @type {boolean}
-  * @private
-  */
-  this.updateWhileInteracting_ = options.updateWhileInteracting !== undefined ?
-     options.updateWhileInteracting : false;
-};
-ol.inherits(ol.layer.Vector, ol.layer.Layer);
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Vector.prototype.createRenderer = function(mapRenderer) {
-  var renderer = null;
-  var type = mapRenderer.getType();
-  if (ol.ENABLE_CANVAS && type === ol.renderer.Type.CANVAS) {
-    renderer = new ol.renderer.canvas.VectorLayer(this);
-  } else if (ol.ENABLE_WEBGL && type === ol.renderer.Type.WEBGL) {
-    renderer = new ol.renderer.webgl.VectorLayer(/** @type {ol.renderer.webgl.Map} */ (mapRenderer), this);
-  }
-  return renderer;
-};
-
-
-/**
- * @return {number|undefined} Render buffer.
- */
-ol.layer.Vector.prototype.getRenderBuffer = function() {
-  return this.renderBuffer_;
-};
-
-
-/**
- * @return {function(ol.Feature, ol.Feature): number|null|undefined} Render
- *     order.
- */
-ol.layer.Vector.prototype.getRenderOrder = function() {
-  return /** @type {ol.RenderOrderFunction|null|undefined} */ (
-      this.get(ol.layer.Vector.Property_.RENDER_ORDER));
-};
-
-
-/**
- * Return the associated {@link ol.source.Vector vectorsource} of the layer.
- * @function
- * @return {ol.source.Vector} Source.
- * @api
- */
-ol.layer.Vector.prototype.getSource;
-
-
-/**
- * Get the style for features.  This returns whatever was passed to the `style`
- * option at construction or to the `setStyle` method.
- * @return {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
- *     Layer style.
- * @api
- */
-ol.layer.Vector.prototype.getStyle = function() {
-  return this.style_;
-};
-
-
-/**
- * Get the style function.
- * @return {ol.StyleFunction|undefined} Layer style function.
- * @api
- */
-ol.layer.Vector.prototype.getStyleFunction = function() {
-  return this.styleFunction_;
-};
-
-
-/**
- * @return {boolean} Whether the rendered layer should be updated while
- *     animating.
- */
-ol.layer.Vector.prototype.getUpdateWhileAnimating = function() {
-  return this.updateWhileAnimating_;
-};
-
-
-/**
- * @return {boolean} Whether the rendered layer should be updated while
- *     interacting.
- */
-ol.layer.Vector.prototype.getUpdateWhileInteracting = function() {
-  return this.updateWhileInteracting_;
-};
-
-
-/**
- * @param {ol.RenderOrderFunction|null|undefined} renderOrder
- *     Render order.
- */
-ol.layer.Vector.prototype.setRenderOrder = function(renderOrder) {
-  this.set(ol.layer.Vector.Property_.RENDER_ORDER, renderOrder);
-};
-
-
-/**
- * Set the style for features.  This can be a single style object, an array
- * of styles, or a function that takes a feature and resolution and returns
- * an array of styles. If it is `undefined` the default style is used. If
- * it is `null` the layer has no style (a `null` style), so only features
- * that have their own styles will be rendered in the layer. See
- * {@link ol.style} for information on the default style.
- * @param {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|null|undefined}
- *     style Layer style.
- * @api
- */
-ol.layer.Vector.prototype.setStyle = function(style) {
-  this.style_ = style !== undefined ? style : ol.style.Style.defaultFunction;
-  this.styleFunction_ = style === null ?
-      undefined : ol.style.Style.createFunction(this.style_);
-  this.changed();
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.layer.Vector.Property_ = {
-  RENDER_ORDER: 'renderOrder'
-};
-
-goog.provide('ol.loadingstrategy');
-
-
-/**
- * Strategy function for loading all features with a single request.
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @return {Array.<ol.Extent>} Extents.
- * @api
- */
-ol.loadingstrategy.all = function(extent, resolution) {
-  return [[-Infinity, -Infinity, Infinity, Infinity]];
-};
-
-
-/**
- * Strategy function for loading features based on the view's extent and
- * resolution.
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @return {Array.<ol.Extent>} Extents.
- * @api
- */
-ol.loadingstrategy.bbox = function(extent, resolution) {
-  return [extent];
-};
-
-
-/**
- * Creates a strategy function for loading features based on a tile grid.
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @return {function(ol.Extent, number): Array.<ol.Extent>} Loading strategy.
- * @api
- */
-ol.loadingstrategy.tile = function(tileGrid) {
-  return (
-      /**
-       * @param {ol.Extent} extent Extent.
-       * @param {number} resolution Resolution.
-       * @return {Array.<ol.Extent>} Extents.
-       */
-      function(extent, resolution) {
-        var z = tileGrid.getZForResolution(resolution);
-        var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);
-        /** @type {Array.<ol.Extent>} */
-        var extents = [];
-        /** @type {ol.TileCoord} */
-        var tileCoord = [z, 0, 0];
-        for (tileCoord[1] = tileRange.minX; tileCoord[1] <= tileRange.maxX;
-             ++tileCoord[1]) {
-          for (tileCoord[2] = tileRange.minY; tileCoord[2] <= tileRange.maxY;
-               ++tileCoord[2]) {
-            extents.push(tileGrid.getTileCoordExtent(tileCoord));
-          }
-        }
-        return extents;
-      });
-};
-
-goog.provide('ol.source.Source');
-
-goog.require('ol');
-goog.require('ol.Attribution');
-goog.require('ol.Object');
-goog.require('ol.proj');
-goog.require('ol.source.State');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for {@link ol.layer.Layer} sources.
- *
- * A generic `change` event is triggered when the state of the source changes.
- *
- * @constructor
- * @abstract
- * @extends {ol.Object}
- * @param {ol.SourceSourceOptions} options Source options.
- * @api
- */
-ol.source.Source = function(options) {
-
-  ol.Object.call(this);
-
-  /**
-   * @private
-   * @type {ol.proj.Projection}
-   */
-  this.projection_ = ol.proj.get(options.projection);
-
-  /**
-   * @private
-   * @type {Array.<ol.Attribution>}
-   */
-  this.attributions_ = ol.source.Source.toAttributionsArray_(options.attributions);
-
-  /**
-   * @private
-   * @type {string|olx.LogoOptions|undefined}
-   */
-  this.logo_ = options.logo;
-
-  /**
-   * @private
-   * @type {ol.source.State}
-   */
-  this.state_ = options.state !== undefined ?
-      options.state : ol.source.State.READY;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;
-
-};
-ol.inherits(ol.source.Source, ol.Object);
-
-/**
- * Turns various ways of defining an attribution to an array of `ol.Attributions`.
- *
- * @param {ol.AttributionLike|undefined}
- *     attributionLike The attributions as string, array of strings,
- *     `ol.Attribution`, array of `ol.Attribution` or undefined.
- * @return {Array.<ol.Attribution>} The array of `ol.Attribution` or null if
- *     `undefined` was given.
- */
-ol.source.Source.toAttributionsArray_ = function(attributionLike) {
-  if (typeof attributionLike === 'string') {
-    return [new ol.Attribution({html: attributionLike})];
-  } else if (attributionLike instanceof ol.Attribution) {
-    return [attributionLike];
-  } else if (Array.isArray(attributionLike)) {
-    var len = attributionLike.length;
-    var attributions = new Array(len);
-    for (var i = 0; i < len; i++) {
-      var item = attributionLike[i];
-      if (typeof item === 'string') {
-        attributions[i] = new ol.Attribution({html: item});
-      } else {
-        attributions[i] = item;
-      }
-    }
-    return attributions;
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @param {Object.<string, boolean>} skippedFeatureUids Skipped feature uids.
- * @param {function((ol.Feature|ol.render.Feature)): T} callback Feature
- *     callback.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.source.Source.prototype.forEachFeatureAtCoordinate = ol.nullFunction;
-
-
-/**
- * Get the attributions of the source.
- * @return {Array.<ol.Attribution>} Attributions.
- * @api
- */
-ol.source.Source.prototype.getAttributions = function() {
-  return this.attributions_;
-};
-
-
-/**
- * Get the logo of the source.
- * @return {string|olx.LogoOptions|undefined} Logo.
- * @api
- */
-ol.source.Source.prototype.getLogo = function() {
-  return this.logo_;
-};
-
-
-/**
- * Get the projection of the source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.source.Source.prototype.getProjection = function() {
-  return this.projection_;
-};
-
-
-/**
- * @abstract
- * @return {Array.<number>|undefined} Resolutions.
- */
-ol.source.Source.prototype.getResolutions = function() {};
-
-
-/**
- * Get the state of the source, see {@link ol.source.State} for possible states.
- * @return {ol.source.State} State.
- * @api
- */
-ol.source.Source.prototype.getState = function() {
-  return this.state_;
-};
-
-
-/**
- * @return {boolean|undefined} Wrap X.
- */
-ol.source.Source.prototype.getWrapX = function() {
-  return this.wrapX_;
-};
-
-
-/**
- * Refreshes the source and finally dispatches a 'change' event.
- * @api
- */
-ol.source.Source.prototype.refresh = function() {
-  this.changed();
-};
-
-
-/**
- * Set the attributions of the source.
- * @param {ol.AttributionLike|undefined} attributions Attributions.
- *     Can be passed as `string`, `Array<string>`, `{@link ol.Attribution}`,
- *     `Array<{@link ol.Attribution}>` or `undefined`.
- * @api
- */
-ol.source.Source.prototype.setAttributions = function(attributions) {
-  this.attributions_ = ol.source.Source.toAttributionsArray_(attributions);
-  this.changed();
-};
-
-
-/**
- * Set the logo of the source.
- * @param {string|olx.LogoOptions|undefined} logo Logo.
- */
-ol.source.Source.prototype.setLogo = function(logo) {
-  this.logo_ = logo;
-};
-
-
-/**
- * Set the state of the source.
- * @param {ol.source.State} state State.
- * @protected
- */
-ol.source.Source.prototype.setState = function(state) {
-  this.state_ = state;
-  this.changed();
-};
-
-goog.provide('ol.source.VectorEventType');
-
-/**
- * @enum {string}
- */
-ol.source.VectorEventType = {
-  /**
-   * Triggered when a feature is added to the source.
-   * @event ol.source.Vector.Event#addfeature
-   * @api
-   */
-  ADDFEATURE: 'addfeature',
-
-  /**
-   * Triggered when a feature is updated.
-   * @event ol.source.Vector.Event#changefeature
-   * @api
-   */
-  CHANGEFEATURE: 'changefeature',
-
-  /**
-   * Triggered when the clear method is called on the source.
-   * @event ol.source.Vector.Event#clear
-   * @api
-   */
-  CLEAR: 'clear',
-
-  /**
-   * Triggered when a feature is removed from the source.
-   * See {@link ol.source.Vector#clear source.clear()} for exceptions.
-   * @event ol.source.Vector.Event#removefeature
-   * @api
-   */
-  REMOVEFEATURE: 'removefeature'
-};
-
-// FIXME bulk feature upload - suppress events
-// FIXME make change-detection more refined (notably, geometry hint)
-
-goog.provide('ol.source.Vector');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.CollectionEventType');
-goog.require('ol.ObjectEventType');
-goog.require('ol.array');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.featureloader');
-goog.require('ol.functions');
-goog.require('ol.loadingstrategy');
-goog.require('ol.obj');
-goog.require('ol.source.Source');
-goog.require('ol.source.State');
-goog.require('ol.source.VectorEventType');
-goog.require('ol.structs.RBush');
-
-
-/**
- * @classdesc
- * Provides a source of features for vector layers. Vector features provided
- * by this source are suitable for editing. See {@link ol.source.VectorTile} for
- * vector data that is optimized for rendering.
- *
- * @constructor
- * @extends {ol.source.Source}
- * @fires ol.source.Vector.Event
- * @param {olx.source.VectorOptions=} opt_options Vector source options.
- * @api
- */
-ol.source.Vector = function(opt_options) {
-
-  var options = opt_options || {};
-
-  ol.source.Source.call(this, {
-    attributions: options.attributions,
-    logo: options.logo,
-    projection: undefined,
-    state: ol.source.State.READY,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true
-  });
-
-  /**
-   * @private
-   * @type {ol.FeatureLoader}
-   */
-  this.loader_ = ol.nullFunction;
-
-  /**
-   * @private
-   * @type {ol.format.Feature|undefined}
-   */
-  this.format_ = options.format;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;
-
-  /**
-   * @private
-   * @type {string|ol.FeatureUrlFunction|undefined}
-   */
-  this.url_ = options.url;
-
-  if (options.loader !== undefined) {
-    this.loader_ = options.loader;
-  } else if (this.url_ !== undefined) {
-    ol.asserts.assert(this.format_, 7); // `format` must be set when `url` is set
-    // create a XHR feature loader for "url" and "format"
-    this.loader_ = ol.featureloader.xhr(this.url_, /** @type {ol.format.Feature} */ (this.format_));
-  }
-
-  /**
-   * @private
-   * @type {ol.LoadingStrategy}
-   */
-  this.strategy_ = options.strategy !== undefined ? options.strategy :
-      ol.loadingstrategy.all;
-
-  var useSpatialIndex =
-      options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;
-
-  /**
-   * @private
-   * @type {ol.structs.RBush.<ol.Feature>}
-   */
-  this.featuresRtree_ = useSpatialIndex ? new ol.structs.RBush() : null;
-
-  /**
-   * @private
-   * @type {ol.structs.RBush.<{extent: ol.Extent}>}
-   */
-  this.loadedExtentsRtree_ = new ol.structs.RBush();
-
-  /**
-   * @private
-   * @type {Object.<string, ol.Feature>}
-   */
-  this.nullGeometryFeatures_ = {};
-
-  /**
-   * A lookup of features by id (the return from feature.getId()).
-   * @private
-   * @type {Object.<string, ol.Feature>}
-   */
-  this.idIndex_ = {};
-
-  /**
-   * A lookup of features without id (keyed by ol.getUid(feature)).
-   * @private
-   * @type {Object.<string, ol.Feature>}
-   */
-  this.undefIdIndex_ = {};
-
-  /**
-   * @private
-   * @type {Object.<string, Array.<ol.EventsKey>>}
-   */
-  this.featureChangeKeys_ = {};
-
-  /**
-   * @private
-   * @type {ol.Collection.<ol.Feature>}
-   */
-  this.featuresCollection_ = null;
-
-  var collection, features;
-  if (options.features instanceof ol.Collection) {
-    collection = options.features;
-    features = collection.getArray();
-  } else if (Array.isArray(options.features)) {
-    features = options.features;
-  }
-  if (!useSpatialIndex && collection === undefined) {
-    collection = new ol.Collection(features);
-  }
-  if (features !== undefined) {
-    this.addFeaturesInternal(features);
-  }
-  if (collection !== undefined) {
-    this.bindFeaturesCollection_(collection);
-  }
-
-};
-ol.inherits(ol.source.Vector, ol.source.Source);
-
-
-/**
- * Add a single feature to the source.  If you want to add a batch of features
- * at once, call {@link ol.source.Vector#addFeatures source.addFeatures()}
- * instead. A feature will not be added to the source if feature with
- * the same id is already there. The reason for this behavior is to avoid
- * feature duplication when using bbox or tile loading strategies.
- * @param {ol.Feature} feature Feature to add.
- * @api
- */
-ol.source.Vector.prototype.addFeature = function(feature) {
-  this.addFeatureInternal(feature);
-  this.changed();
-};
-
-
-/**
- * Add a feature without firing a `change` event.
- * @param {ol.Feature} feature Feature.
- * @protected
- */
-ol.source.Vector.prototype.addFeatureInternal = function(feature) {
-  var featureKey = ol.getUid(feature).toString();
-
-  if (!this.addToIndex_(featureKey, feature)) {
-    return;
-  }
-
-  this.setupChangeEvents_(featureKey, feature);
-
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    var extent = geometry.getExtent();
-    if (this.featuresRtree_) {
-      this.featuresRtree_.insert(extent, feature);
-    }
-  } else {
-    this.nullGeometryFeatures_[featureKey] = feature;
-  }
-
-  this.dispatchEvent(
-      new ol.source.Vector.Event(ol.source.VectorEventType.ADDFEATURE, feature));
-};
-
-
-/**
- * @param {string} featureKey Unique identifier for the feature.
- * @param {ol.Feature} feature The feature.
- * @private
- */
-ol.source.Vector.prototype.setupChangeEvents_ = function(featureKey, feature) {
-  this.featureChangeKeys_[featureKey] = [
-    ol.events.listen(feature, ol.events.EventType.CHANGE,
-        this.handleFeatureChange_, this),
-    ol.events.listen(feature, ol.ObjectEventType.PROPERTYCHANGE,
-        this.handleFeatureChange_, this)
-  ];
-};
-
-
-/**
- * @param {string} featureKey Unique identifier for the feature.
- * @param {ol.Feature} feature The feature.
- * @return {boolean} The feature is "valid", in the sense that it is also a
- *     candidate for insertion into the Rtree.
- * @private
- */
-ol.source.Vector.prototype.addToIndex_ = function(featureKey, feature) {
-  var valid = true;
-  var id = feature.getId();
-  if (id !== undefined) {
-    if (!(id.toString() in this.idIndex_)) {
-      this.idIndex_[id.toString()] = feature;
-    } else {
-      valid = false;
-    }
-  } else {
-    ol.asserts.assert(!(featureKey in this.undefIdIndex_),
-        30); // The passed `feature` was already added to the source
-    this.undefIdIndex_[featureKey] = feature;
-  }
-  return valid;
-};
-
-
-/**
- * Add a batch of features to the source.
- * @param {Array.<ol.Feature>} features Features to add.
- * @api
- */
-ol.source.Vector.prototype.addFeatures = function(features) {
-  this.addFeaturesInternal(features);
-  this.changed();
-};
-
-
-/**
- * Add features without firing a `change` event.
- * @param {Array.<ol.Feature>} features Features.
- * @protected
- */
-ol.source.Vector.prototype.addFeaturesInternal = function(features) {
-  var featureKey, i, length, feature;
-
-  var extents = [];
-  var newFeatures = [];
-  var geometryFeatures = [];
-
-  for (i = 0, length = features.length; i < length; i++) {
-    feature = features[i];
-    featureKey = ol.getUid(feature).toString();
-    if (this.addToIndex_(featureKey, feature)) {
-      newFeatures.push(feature);
-    }
-  }
-
-  for (i = 0, length = newFeatures.length; i < length; i++) {
-    feature = newFeatures[i];
-    featureKey = ol.getUid(feature).toString();
-    this.setupChangeEvents_(featureKey, feature);
-
-    var geometry = feature.getGeometry();
-    if (geometry) {
-      var extent = geometry.getExtent();
-      extents.push(extent);
-      geometryFeatures.push(feature);
-    } else {
-      this.nullGeometryFeatures_[featureKey] = feature;
-    }
-  }
-  if (this.featuresRtree_) {
-    this.featuresRtree_.load(extents, geometryFeatures);
-  }
-
-  for (i = 0, length = newFeatures.length; i < length; i++) {
-    this.dispatchEvent(new ol.source.Vector.Event(
-        ol.source.VectorEventType.ADDFEATURE, newFeatures[i]));
-  }
-};
-
-
-/**
- * @param {!ol.Collection.<ol.Feature>} collection Collection.
- * @private
- */
-ol.source.Vector.prototype.bindFeaturesCollection_ = function(collection) {
-  var modifyingCollection = false;
-  ol.events.listen(this, ol.source.VectorEventType.ADDFEATURE,
-      function(evt) {
-        if (!modifyingCollection) {
-          modifyingCollection = true;
-          collection.push(evt.feature);
-          modifyingCollection = false;
-        }
-      });
-  ol.events.listen(this, ol.source.VectorEventType.REMOVEFEATURE,
-      function(evt) {
-        if (!modifyingCollection) {
-          modifyingCollection = true;
-          collection.remove(evt.feature);
-          modifyingCollection = false;
-        }
-      });
-  ol.events.listen(collection, ol.CollectionEventType.ADD,
-      function(evt) {
-        if (!modifyingCollection) {
-          modifyingCollection = true;
-          this.addFeature(/** @type {ol.Feature} */ (evt.element));
-          modifyingCollection = false;
-        }
-      }, this);
-  ol.events.listen(collection, ol.CollectionEventType.REMOVE,
-      function(evt) {
-        if (!modifyingCollection) {
-          modifyingCollection = true;
-          this.removeFeature(/** @type {ol.Feature} */ (evt.element));
-          modifyingCollection = false;
-        }
-      }, this);
-  this.featuresCollection_ = collection;
-};
-
-
-/**
- * Remove all features from the source.
- * @param {boolean=} opt_fast Skip dispatching of {@link removefeature} events.
- * @api
- */
-ol.source.Vector.prototype.clear = function(opt_fast) {
-  if (opt_fast) {
-    for (var featureId in this.featureChangeKeys_) {
-      var keys = this.featureChangeKeys_[featureId];
-      keys.forEach(ol.events.unlistenByKey);
-    }
-    if (!this.featuresCollection_) {
-      this.featureChangeKeys_ = {};
-      this.idIndex_ = {};
-      this.undefIdIndex_ = {};
-    }
-  } else {
-    if (this.featuresRtree_) {
-      this.featuresRtree_.forEach(this.removeFeatureInternal, this);
-      for (var id in this.nullGeometryFeatures_) {
-        this.removeFeatureInternal(this.nullGeometryFeatures_[id]);
-      }
-    }
-  }
-  if (this.featuresCollection_) {
-    this.featuresCollection_.clear();
-  }
-
-  if (this.featuresRtree_) {
-    this.featuresRtree_.clear();
-  }
-  this.loadedExtentsRtree_.clear();
-  this.nullGeometryFeatures_ = {};
-
-  var clearEvent = new ol.source.Vector.Event(ol.source.VectorEventType.CLEAR);
-  this.dispatchEvent(clearEvent);
-  this.changed();
-};
-
-
-/**
- * Iterate through all features on the source, calling the provided callback
- * with each one.  If the callback returns any "truthy" value, iteration will
- * stop and the function will return the same value.
- *
- * @param {function(this: T, ol.Feature): S} callback Called with each feature
- *     on the source.  Return a truthy value to stop iteration.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @return {S|undefined} The return value from the last call to the callback.
- * @template T,S
- * @api
- */
-ol.source.Vector.prototype.forEachFeature = function(callback, opt_this) {
-  if (this.featuresRtree_) {
-    return this.featuresRtree_.forEach(callback, opt_this);
-  } else if (this.featuresCollection_) {
-    return this.featuresCollection_.forEach(callback, opt_this);
-  }
-};
-
-
-/**
- * Iterate through all features whose geometries contain the provided
- * coordinate, calling the callback with each feature.  If the callback returns
- * a "truthy" value, iteration will stop and the function will return the same
- * value.
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {function(this: T, ol.Feature): S} callback Called with each feature
- *     whose goemetry contains the provided coordinate.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @return {S|undefined} The return value from the last call to the callback.
- * @template T,S
- */
-ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect = function(coordinate, callback, opt_this) {
-  var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];
-  return this.forEachFeatureInExtent(extent, function(feature) {
-    var geometry = feature.getGeometry();
-    if (geometry.intersectsCoordinate(coordinate)) {
-      return callback.call(opt_this, feature);
-    } else {
-      return undefined;
-    }
-  });
-};
-
-
-/**
- * Iterate through all features whose bounding box intersects the provided
- * extent (note that the feature's geometry may not intersect the extent),
- * calling the callback with each feature.  If the callback returns a "truthy"
- * value, iteration will stop and the function will return the same value.
- *
- * If you are interested in features whose geometry intersects an extent, call
- * the {@link ol.source.Vector#forEachFeatureIntersectingExtent
- * source.forEachFeatureIntersectingExtent()} method instead.
- *
- * When `useSpatialIndex` is set to false, this method will loop through all
- * features, equivalent to {@link ol.source.Vector#forEachFeature}.
- *
- * @param {ol.Extent} extent Extent.
- * @param {function(this: T, ol.Feature): S} callback Called with each feature
- *     whose bounding box intersects the provided extent.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @return {S|undefined} The return value from the last call to the callback.
- * @template T,S
- * @api
- */
-ol.source.Vector.prototype.forEachFeatureInExtent = function(extent, callback, opt_this) {
-  if (this.featuresRtree_) {
-    return this.featuresRtree_.forEachInExtent(extent, callback, opt_this);
-  } else if (this.featuresCollection_) {
-    return this.featuresCollection_.forEach(callback, opt_this);
-  }
-};
-
-
-/**
- * Iterate through all features whose geometry intersects the provided extent,
- * calling the callback with each feature.  If the callback returns a "truthy"
- * value, iteration will stop and the function will return the same value.
- *
- * If you only want to test for bounding box intersection, call the
- * {@link ol.source.Vector#forEachFeatureInExtent
- * source.forEachFeatureInExtent()} method instead.
- *
- * @param {ol.Extent} extent Extent.
- * @param {function(this: T, ol.Feature): S} callback Called with each feature
- *     whose geometry intersects the provided extent.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @return {S|undefined} The return value from the last call to the callback.
- * @template T,S
- * @api
- */
-ol.source.Vector.prototype.forEachFeatureIntersectingExtent = function(extent, callback, opt_this) {
-  return this.forEachFeatureInExtent(extent,
-      /**
-       * @param {ol.Feature} feature Feature.
-       * @return {S|undefined} The return value from the last call to the callback.
-       * @template S
-       */
-      function(feature) {
-        var geometry = feature.getGeometry();
-        if (geometry.intersectsExtent(extent)) {
-          var result = callback.call(opt_this, feature);
-          if (result) {
-            return result;
-          }
-        }
-      });
-};
-
-
-/**
- * Get the features collection associated with this source. Will be `null`
- * unless the source was configured with `useSpatialIndex` set to `false`, or
- * with an {@link ol.Collection} as `features`.
- * @return {ol.Collection.<ol.Feature>} The collection of features.
- * @api
- */
-ol.source.Vector.prototype.getFeaturesCollection = function() {
-  return this.featuresCollection_;
-};
-
-
-/**
- * Get all features on the source in random order.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.source.Vector.prototype.getFeatures = function() {
-  var features;
-  if (this.featuresCollection_) {
-    features = this.featuresCollection_.getArray();
-  } else if (this.featuresRtree_) {
-    features = this.featuresRtree_.getAll();
-    if (!ol.obj.isEmpty(this.nullGeometryFeatures_)) {
-      ol.array.extend(
-          features, ol.obj.getValues(this.nullGeometryFeatures_));
-    }
-  }
-  return /** @type {Array.<ol.Feature>} */ (features);
-};
-
-
-/**
- * Get all features whose geometry intersects the provided coordinate.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.source.Vector.prototype.getFeaturesAtCoordinate = function(coordinate) {
-  var features = [];
-  this.forEachFeatureAtCoordinateDirect(coordinate, function(feature) {
-    features.push(feature);
-  });
-  return features;
-};
-
-
-/**
- * Get all features in the provided extent.  Note that this returns an array of
- * all features intersecting the given extent in random order (so it may include
- * features whose geometries do not intersect the extent).
- *
- * This method is not available when the source is configured with
- * `useSpatialIndex` set to `false`.
- * @param {ol.Extent} extent Extent.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.source.Vector.prototype.getFeaturesInExtent = function(extent) {
-  return this.featuresRtree_.getInExtent(extent);
-};
-
-
-/**
- * Get the closest feature to the provided coordinate.
- *
- * This method is not available when the source is configured with
- * `useSpatialIndex` set to `false`.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {function(ol.Feature):boolean=} opt_filter Feature filter function.
- *     The filter function will receive one argument, the {@link ol.Feature feature}
- *     and it should return a boolean value. By default, no filtering is made.
- * @return {ol.Feature} Closest feature.
- * @api
- */
-ol.source.Vector.prototype.getClosestFeatureToCoordinate = function(coordinate, opt_filter) {
-  // Find the closest feature using branch and bound.  We start searching an
-  // infinite extent, and find the distance from the first feature found.  This
-  // becomes the closest feature.  We then compute a smaller extent which any
-  // closer feature must intersect.  We continue searching with this smaller
-  // extent, trying to find a closer feature.  Every time we find a closer
-  // feature, we update the extent being searched so that any even closer
-  // feature must intersect it.  We continue until we run out of features.
-  var x = coordinate[0];
-  var y = coordinate[1];
-  var closestFeature = null;
-  var closestPoint = [NaN, NaN];
-  var minSquaredDistance = Infinity;
-  var extent = [-Infinity, -Infinity, Infinity, Infinity];
-  var filter = opt_filter ? opt_filter : ol.functions.TRUE;
-  this.featuresRtree_.forEachInExtent(extent,
-      /**
-       * @param {ol.Feature} feature Feature.
-       */
-      function(feature) {
-        if (filter(feature)) {
-          var geometry = feature.getGeometry();
-          var previousMinSquaredDistance = minSquaredDistance;
-          minSquaredDistance = geometry.closestPointXY(
-              x, y, closestPoint, minSquaredDistance);
-          if (minSquaredDistance < previousMinSquaredDistance) {
-            closestFeature = feature;
-            // This is sneaky.  Reduce the extent that it is currently being
-            // searched while the R-Tree traversal using this same extent object
-            // is still in progress.  This is safe because the new extent is
-            // strictly contained by the old extent.
-            var minDistance = Math.sqrt(minSquaredDistance);
-            extent[0] = x - minDistance;
-            extent[1] = y - minDistance;
-            extent[2] = x + minDistance;
-            extent[3] = y + minDistance;
-          }
-        }
-      });
-  return closestFeature;
-};
-
-
-/**
- * Get the extent of the features currently in the source.
- *
- * This method is not available when the source is configured with
- * `useSpatialIndex` set to `false`.
- * @param {ol.Extent=} opt_extent Destination extent. If provided, no new extent
- *     will be created. Instead, that extent's coordinates will be overwritten.
- * @return {!ol.Extent} Extent.
- * @api
- */
-ol.source.Vector.prototype.getExtent = function(opt_extent) {
-  return this.featuresRtree_.getExtent(opt_extent);
-};
-
-
-/**
- * Get a feature by its identifier (the value returned by feature.getId()).
- * Note that the index treats string and numeric identifiers as the same.  So
- * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.
- *
- * @param {string|number} id Feature identifier.
- * @return {ol.Feature} The feature (or `null` if not found).
- * @api
- */
-ol.source.Vector.prototype.getFeatureById = function(id) {
-  var feature = this.idIndex_[id.toString()];
-  return feature !== undefined ? feature : null;
-};
-
-
-/**
- * Get the format associated with this source.
- *
- * @return {ol.format.Feature|undefined} The feature format.
- * @api
- */
-ol.source.Vector.prototype.getFormat = function() {
-  return this.format_;
-};
-
-
-/**
- * @return {boolean} The source can have overlapping geometries.
- */
-ol.source.Vector.prototype.getOverlaps = function() {
-  return this.overlaps_;
-};
-
-
-/**
- * @override
- */
-ol.source.Vector.prototype.getResolutions = function() {};
-
-
-/**
- * Get the url associated with this source.
- *
- * @return {string|ol.FeatureUrlFunction|undefined} The url.
- * @api
- */
-ol.source.Vector.prototype.getUrl = function() {
-  return this.url_;
-};
-
-
-/**
- * @param {ol.events.Event} event Event.
- * @private
- */
-ol.source.Vector.prototype.handleFeatureChange_ = function(event) {
-  var feature = /** @type {ol.Feature} */ (event.target);
-  var featureKey = ol.getUid(feature).toString();
-  var geometry = feature.getGeometry();
-  if (!geometry) {
-    if (!(featureKey in this.nullGeometryFeatures_)) {
-      if (this.featuresRtree_) {
-        this.featuresRtree_.remove(feature);
-      }
-      this.nullGeometryFeatures_[featureKey] = feature;
-    }
-  } else {
-    var extent = geometry.getExtent();
-    if (featureKey in this.nullGeometryFeatures_) {
-      delete this.nullGeometryFeatures_[featureKey];
-      if (this.featuresRtree_) {
-        this.featuresRtree_.insert(extent, feature);
-      }
-    } else {
-      if (this.featuresRtree_) {
-        this.featuresRtree_.update(extent, feature);
-      }
-    }
-  }
-  var id = feature.getId();
-  if (id !== undefined) {
-    var sid = id.toString();
-    if (featureKey in this.undefIdIndex_) {
-      delete this.undefIdIndex_[featureKey];
-      this.idIndex_[sid] = feature;
-    } else {
-      if (this.idIndex_[sid] !== feature) {
-        this.removeFromIdIndex_(feature);
-        this.idIndex_[sid] = feature;
-      }
-    }
-  } else {
-    if (!(featureKey in this.undefIdIndex_)) {
-      this.removeFromIdIndex_(feature);
-      this.undefIdIndex_[featureKey] = feature;
-    }
-  }
-  this.changed();
-  this.dispatchEvent(new ol.source.Vector.Event(
-      ol.source.VectorEventType.CHANGEFEATURE, feature));
-};
-
-
-/**
- * @return {boolean} Is empty.
- */
-ol.source.Vector.prototype.isEmpty = function() {
-  return this.featuresRtree_.isEmpty() &&
-      ol.obj.isEmpty(this.nullGeometryFeatures_);
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {ol.proj.Projection} projection Projection.
- */
-ol.source.Vector.prototype.loadFeatures = function(
-    extent, resolution, projection) {
-  var loadedExtentsRtree = this.loadedExtentsRtree_;
-  var extentsToLoad = this.strategy_(extent, resolution);
-  var i, ii;
-  for (i = 0, ii = extentsToLoad.length; i < ii; ++i) {
-    var extentToLoad = extentsToLoad[i];
-    var alreadyLoaded = loadedExtentsRtree.forEachInExtent(extentToLoad,
-        /**
-         * @param {{extent: ol.Extent}} object Object.
-         * @return {boolean} Contains.
-         */
-        function(object) {
-          return ol.extent.containsExtent(object.extent, extentToLoad);
-        });
-    if (!alreadyLoaded) {
-      this.loader_.call(this, extentToLoad, resolution, projection);
-      loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});
-    }
-  }
-};
-
-
-/**
- * Remove a single feature from the source.  If you want to remove all features
- * at once, use the {@link ol.source.Vector#clear source.clear()} method
- * instead.
- * @param {ol.Feature} feature Feature to remove.
- * @api
- */
-ol.source.Vector.prototype.removeFeature = function(feature) {
-  var featureKey = ol.getUid(feature).toString();
-  if (featureKey in this.nullGeometryFeatures_) {
-    delete this.nullGeometryFeatures_[featureKey];
-  } else {
-    if (this.featuresRtree_) {
-      this.featuresRtree_.remove(feature);
-    }
-  }
-  this.removeFeatureInternal(feature);
-  this.changed();
-};
-
-
-/**
- * Remove feature without firing a `change` event.
- * @param {ol.Feature} feature Feature.
- * @protected
- */
-ol.source.Vector.prototype.removeFeatureInternal = function(feature) {
-  var featureKey = ol.getUid(feature).toString();
-  this.featureChangeKeys_[featureKey].forEach(ol.events.unlistenByKey);
-  delete this.featureChangeKeys_[featureKey];
-  var id = feature.getId();
-  if (id !== undefined) {
-    delete this.idIndex_[id.toString()];
-  } else {
-    delete this.undefIdIndex_[featureKey];
-  }
-  this.dispatchEvent(new ol.source.Vector.Event(
-      ol.source.VectorEventType.REMOVEFEATURE, feature));
-};
-
-
-/**
- * Remove a feature from the id index.  Called internally when the feature id
- * may have changed.
- * @param {ol.Feature} feature The feature.
- * @return {boolean} Removed the feature from the index.
- * @private
- */
-ol.source.Vector.prototype.removeFromIdIndex_ = function(feature) {
-  var removed = false;
-  for (var id in this.idIndex_) {
-    if (this.idIndex_[id] === feature) {
-      delete this.idIndex_[id];
-      removed = true;
-      break;
-    }
-  }
-  return removed;
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.source.Vector} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.source.Vector.Event}
- * @param {string} type Type.
- * @param {ol.Feature=} opt_feature Feature.
- */
-ol.source.Vector.Event = function(type, opt_feature) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The feature being added or removed.
-   * @type {ol.Feature|undefined}
-   * @api
-   */
-  this.feature = opt_feature;
-
-};
-ol.inherits(ol.source.Vector.Event, ol.events.Event);
-
-goog.provide('ol.interaction.Draw');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.Object');
-goog.require('ol.coordinate');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.condition');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.geom.Circle');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.interaction.DrawEventType');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.interaction.Property');
-goog.require('ol.layer.Vector');
-goog.require('ol.source.Vector');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Interaction for drawing feature geometries.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @fires ol.interaction.Draw.Event
- * @param {olx.interaction.DrawOptions} options Options.
- * @api
- */
-ol.interaction.Draw = function(options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.Draw.handleDownEvent_,
-    handleEvent: ol.interaction.Draw.handleEvent,
-    handleUpEvent: ol.interaction.Draw.handleUpEvent_
-  });
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.shouldHandle_ = false;
-
-  /**
-   * @type {ol.Pixel}
-   * @private
-   */
-  this.downPx_ = null;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.freehand_ = false;
-
-  /**
-   * Target source for drawn features.
-   * @type {ol.source.Vector}
-   * @private
-   */
-  this.source_ = options.source ? options.source : null;
-
-  /**
-   * Target collection for drawn features.
-   * @type {ol.Collection.<ol.Feature>}
-   * @private
-   */
-  this.features_ = options.features ? options.features : null;
-
-  /**
-   * Pixel distance for snapping.
-   * @type {number}
-   * @private
-   */
-  this.snapTolerance_ = options.snapTolerance ? options.snapTolerance : 12;
-
-  /**
-   * Geometry type.
-   * @type {ol.geom.GeometryType}
-   * @private
-   */
-  this.type_ = options.type;
-
-  /**
-   * Drawing mode (derived from geometry type.
-   * @type {ol.interaction.Draw.Mode_}
-   * @private
-   */
-  this.mode_ = ol.interaction.Draw.getMode_(this.type_);
-
-  /**
-   * The number of points that must be drawn before a polygon ring or line
-   * string can be finished.  The default is 3 for polygon rings and 2 for
-   * line strings.
-   * @type {number}
-   * @private
-   */
-  this.minPoints_ = options.minPoints ?
-      options.minPoints :
-      (this.mode_ === ol.interaction.Draw.Mode_.POLYGON ? 3 : 2);
-
-  /**
-   * The number of points that can be drawn before a polygon ring or line string
-   * is finished. The default is no restriction.
-   * @type {number}
-   * @private
-   */
-  this.maxPoints_ = options.maxPoints ? options.maxPoints : Infinity;
-
-  /**
-   * A function to decide if a potential finish coordinate is permissible
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.finishCondition_ = options.finishCondition ? options.finishCondition : ol.functions.TRUE;
-
-  var geometryFunction = options.geometryFunction;
-  if (!geometryFunction) {
-    if (this.type_ === ol.geom.GeometryType.CIRCLE) {
-      /**
-       * @param {!Array.<ol.Coordinate>} coordinates
-       *     The coordinates.
-       * @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry.
-       * @return {ol.geom.SimpleGeometry} A geometry.
-       */
-      geometryFunction = function(coordinates, opt_geometry) {
-        var circle = opt_geometry ? /** @type {ol.geom.Circle} */ (opt_geometry) :
-            new ol.geom.Circle([NaN, NaN]);
-        var squaredLength = ol.coordinate.squaredDistance(
-            coordinates[0], coordinates[1]);
-        circle.setCenterAndRadius(coordinates[0], Math.sqrt(squaredLength));
-        return circle;
-      };
-    } else {
-      var Constructor;
-      var mode = this.mode_;
-      if (mode === ol.interaction.Draw.Mode_.POINT) {
-        Constructor = ol.geom.Point;
-      } else if (mode === ol.interaction.Draw.Mode_.LINE_STRING) {
-        Constructor = ol.geom.LineString;
-      } else if (mode === ol.interaction.Draw.Mode_.POLYGON) {
-        Constructor = ol.geom.Polygon;
-      }
-      /**
-       * @param {!Array.<ol.Coordinate>} coordinates
-       *     The coordinates.
-       * @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry.
-       * @return {ol.geom.SimpleGeometry} A geometry.
-       */
-      geometryFunction = function(coordinates, opt_geometry) {
-        var geometry = opt_geometry;
-        if (geometry) {
-          if (mode === ol.interaction.Draw.Mode_.POLYGON) {
-            geometry.setCoordinates([coordinates[0].concat([coordinates[0][0]])]);
-          } else {
-            geometry.setCoordinates(coordinates);
-          }
-        } else {
-          geometry = new Constructor(coordinates);
-        }
-        return geometry;
-      };
-    }
-  }
-
-  /**
-   * @type {ol.DrawGeometryFunctionType}
-   * @private
-   */
-  this.geometryFunction_ = geometryFunction;
-
-  /**
-   * Finish coordinate for the feature (first point for polygons, last point for
-   * linestrings).
-   * @type {ol.Coordinate}
-   * @private
-   */
-  this.finishCoordinate_ = null;
-
-  /**
-   * Sketch feature.
-   * @type {ol.Feature}
-   * @private
-   */
-  this.sketchFeature_ = null;
-
-  /**
-   * Sketch point.
-   * @type {ol.Feature}
-   * @private
-   */
-  this.sketchPoint_ = null;
-
-  /**
-   * Sketch coordinates. Used when drawing a line or polygon.
-   * @type {ol.Coordinate|Array.<ol.Coordinate>|Array.<Array.<ol.Coordinate>>}
-   * @private
-   */
-  this.sketchCoords_ = null;
-
-  /**
-   * Sketch line. Used when drawing polygon.
-   * @type {ol.Feature}
-   * @private
-   */
-  this.sketchLine_ = null;
-
-  /**
-   * Sketch line coordinates. Used when drawing a polygon or circle.
-   * @type {Array.<ol.Coordinate>}
-   * @private
-   */
-  this.sketchLineCoords_ = null;
-
-  /**
-   * Squared tolerance for handling up events.  If the squared distance
-   * between a down and up event is greater than this tolerance, up events
-   * will not be handled.
-   * @type {number}
-   * @private
-   */
-  this.squaredClickTolerance_ = options.clickTolerance ?
-      options.clickTolerance * options.clickTolerance : 36;
-
-  /**
-   * Draw overlay where our sketch features are drawn.
-   * @type {ol.layer.Vector}
-   * @private
-   */
-  this.overlay_ = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      useSpatialIndex: false,
-      wrapX: options.wrapX ? options.wrapX : false
-    }),
-    style: options.style ? options.style :
-        ol.interaction.Draw.getDefaultStyleFunction()
-  });
-
-  /**
-   * Name of the geometry attribute for newly created features.
-   * @type {string|undefined}
-   * @private
-   */
-  this.geometryName_ = options.geometryName;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-      options.condition : ol.events.condition.noModifierKeys;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.freehandCondition_;
-  if (options.freehand) {
-    this.freehandCondition_ = ol.events.condition.always;
-  } else {
-    this.freehandCondition_ = options.freehandCondition ?
-        options.freehandCondition : ol.events.condition.shiftKeyOnly;
-  }
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.interaction.Property.ACTIVE),
-      this.updateState_, this);
-
-};
-ol.inherits(ol.interaction.Draw, ol.interaction.Pointer);
-
-
-/**
- * @return {ol.StyleFunction} Styles.
- */
-ol.interaction.Draw.getDefaultStyleFunction = function() {
-  var styles = ol.style.Style.createDefaultEditing();
-  return function(feature, resolution) {
-    return styles[feature.getGeometry().getType()];
-  };
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Draw.prototype.setMap = function(map) {
-  ol.interaction.Pointer.prototype.setMap.call(this, map);
-  this.updateState_();
-};
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} and may actually
- * draw or finish the drawing.
- * @param {ol.MapBrowserEvent} event Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.Draw}
- * @api
- */
-ol.interaction.Draw.handleEvent = function(event) {
-  this.freehand_ = this.mode_ !== ol.interaction.Draw.Mode_.POINT && this.freehandCondition_(event);
-  var pass = !this.freehand_;
-  if (this.freehand_ &&
-      event.type === ol.MapBrowserEventType.POINTERDRAG && this.sketchFeature_ !== null) {
-    this.addToDrawing_(event);
-    pass = false;
-  } else if (event.type ===
-      ol.MapBrowserEventType.POINTERMOVE) {
-    pass = this.handlePointerMove_(event);
-  } else if (event.type === ol.MapBrowserEventType.DBLCLICK) {
-    pass = false;
-  }
-  return ol.interaction.Pointer.handleEvent.call(this, event) && pass;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} event Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.Draw}
- * @private
- */
-ol.interaction.Draw.handleDownEvent_ = function(event) {
-  this.shouldHandle_ = !this.freehand_;
-
-  if (this.freehand_) {
-    this.downPx_ = event.pixel;
-    if (!this.finishCoordinate_) {
-      this.startDrawing_(event);
-    }
-    return true;
-  } else if (this.condition_(event)) {
-    this.downPx_ = event.pixel;
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} event Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.Draw}
- * @private
- */
-ol.interaction.Draw.handleUpEvent_ = function(event) {
-  var pass = true;
-
-  this.handlePointerMove_(event);
-
-  var circleMode = this.mode_ === ol.interaction.Draw.Mode_.CIRCLE;
-
-  if (this.shouldHandle_) {
-    if (!this.finishCoordinate_) {
-      this.startDrawing_(event);
-      if (this.mode_ === ol.interaction.Draw.Mode_.POINT) {
-        this.finishDrawing();
-      }
-    } else if (this.freehand_ || circleMode) {
-      this.finishDrawing();
-    } else if (this.atFinish_(event)) {
-      if (this.finishCondition_(event)) {
-        this.finishDrawing();
-      }
-    } else {
-      this.addToDrawing_(event);
-    }
-    pass = false;
-  } else if (this.freehand_) {
-    this.finishCoordinate_ = null;
-    this.abortDrawing_();
-  }
-  return pass;
-};
-
-
-/**
- * Handle move events.
- * @param {ol.MapBrowserEvent} event A move event.
- * @return {boolean} Pass the event to other interactions.
- * @private
- */
-ol.interaction.Draw.prototype.handlePointerMove_ = function(event) {
-  if (this.downPx_ &&
-      ((!this.freehand_ && this.shouldHandle_) ||
-      (this.freehand_ && !this.shouldHandle_))) {
-    var downPx = this.downPx_;
-    var clickPx = event.pixel;
-    var dx = downPx[0] - clickPx[0];
-    var dy = downPx[1] - clickPx[1];
-    var squaredDistance = dx * dx + dy * dy;
-    this.shouldHandle_ = this.freehand_ ?
-        squaredDistance > this.squaredClickTolerance_ :
-        squaredDistance <= this.squaredClickTolerance_;
-  }
-
-  if (this.finishCoordinate_) {
-    this.modifyDrawing_(event);
-  } else {
-    this.createOrUpdateSketchPoint_(event);
-  }
-  return true;
-};
-
-
-/**
- * Determine if an event is within the snapping tolerance of the start coord.
- * @param {ol.MapBrowserEvent} event Event.
- * @return {boolean} The event is within the snapping tolerance of the start.
- * @private
- */
-ol.interaction.Draw.prototype.atFinish_ = function(event) {
-  var at = false;
-  if (this.sketchFeature_) {
-    var potentiallyDone = false;
-    var potentiallyFinishCoordinates = [this.finishCoordinate_];
-    if (this.mode_ === ol.interaction.Draw.Mode_.LINE_STRING) {
-      potentiallyDone = this.sketchCoords_.length > this.minPoints_;
-    } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-      potentiallyDone = this.sketchCoords_[0].length >
-          this.minPoints_;
-      potentiallyFinishCoordinates = [this.sketchCoords_[0][0],
-        this.sketchCoords_[0][this.sketchCoords_[0].length - 2]];
-    }
-    if (potentiallyDone) {
-      var map = event.map;
-      for (var i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {
-        var finishCoordinate = potentiallyFinishCoordinates[i];
-        var finishPixel = map.getPixelFromCoordinate(finishCoordinate);
-        var pixel = event.pixel;
-        var dx = pixel[0] - finishPixel[0];
-        var dy = pixel[1] - finishPixel[1];
-        var snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;
-        at = Math.sqrt(dx * dx + dy * dy) <= snapTolerance;
-        if (at) {
-          this.finishCoordinate_ = finishCoordinate;
-          break;
-        }
-      }
-    }
-  }
-  return at;
-};
-
-
-/**
- * @param {ol.MapBrowserEvent} event Event.
- * @private
- */
-ol.interaction.Draw.prototype.createOrUpdateSketchPoint_ = function(event) {
-  var coordinates = event.coordinate.slice();
-  if (!this.sketchPoint_) {
-    this.sketchPoint_ = new ol.Feature(new ol.geom.Point(coordinates));
-    this.updateSketchFeatures_();
-  } else {
-    var sketchPointGeom = /** @type {ol.geom.Point} */ (this.sketchPoint_.getGeometry());
-    sketchPointGeom.setCoordinates(coordinates);
-  }
-};
-
-
-/**
- * Start the drawing.
- * @param {ol.MapBrowserEvent} event Event.
- * @private
- */
-ol.interaction.Draw.prototype.startDrawing_ = function(event) {
-  var start = event.coordinate;
-  this.finishCoordinate_ = start;
-  if (this.mode_ === ol.interaction.Draw.Mode_.POINT) {
-    this.sketchCoords_ = start.slice();
-  } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-    this.sketchCoords_ = [[start.slice(), start.slice()]];
-    this.sketchLineCoords_ = this.sketchCoords_[0];
-  } else {
-    this.sketchCoords_ = [start.slice(), start.slice()];
-    if (this.mode_ === ol.interaction.Draw.Mode_.CIRCLE) {
-      this.sketchLineCoords_ = this.sketchCoords_;
-    }
-  }
-  if (this.sketchLineCoords_) {
-    this.sketchLine_ = new ol.Feature(
-        new ol.geom.LineString(this.sketchLineCoords_));
-  }
-  var geometry = this.geometryFunction_(this.sketchCoords_);
-  this.sketchFeature_ = new ol.Feature();
-  if (this.geometryName_) {
-    this.sketchFeature_.setGeometryName(this.geometryName_);
-  }
-  this.sketchFeature_.setGeometry(geometry);
-  this.updateSketchFeatures_();
-  this.dispatchEvent(new ol.interaction.Draw.Event(
-      ol.interaction.DrawEventType.DRAWSTART, this.sketchFeature_));
-};
-
-
-/**
- * Modify the drawing.
- * @param {ol.MapBrowserEvent} event Event.
- * @private
- */
-ol.interaction.Draw.prototype.modifyDrawing_ = function(event) {
-  var coordinate = event.coordinate;
-  var geometry = /** @type {ol.geom.SimpleGeometry} */ (this.sketchFeature_.getGeometry());
-  var coordinates, last;
-  if (this.mode_ === ol.interaction.Draw.Mode_.POINT) {
-    last = this.sketchCoords_;
-  } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-    coordinates = this.sketchCoords_[0];
-    last = coordinates[coordinates.length - 1];
-    if (this.atFinish_(event)) {
-      // snap to finish
-      coordinate = this.finishCoordinate_.slice();
-    }
-  } else {
-    coordinates = this.sketchCoords_;
-    last = coordinates[coordinates.length - 1];
-  }
-  last[0] = coordinate[0];
-  last[1] = coordinate[1];
-  this.geometryFunction_(/** @type {!Array.<ol.Coordinate>} */ (this.sketchCoords_), geometry);
-  if (this.sketchPoint_) {
-    var sketchPointGeom = /** @type {ol.geom.Point} */ (this.sketchPoint_.getGeometry());
-    sketchPointGeom.setCoordinates(coordinate);
-  }
-  var sketchLineGeom;
-  if (geometry instanceof ol.geom.Polygon &&
-      this.mode_ !== ol.interaction.Draw.Mode_.POLYGON) {
-    if (!this.sketchLine_) {
-      this.sketchLine_ = new ol.Feature(new ol.geom.LineString(null));
-    }
-    var ring = geometry.getLinearRing(0);
-    sketchLineGeom = /** @type {ol.geom.LineString} */ (this.sketchLine_.getGeometry());
-    sketchLineGeom.setFlatCoordinates(
-        ring.getLayout(), ring.getFlatCoordinates());
-  } else if (this.sketchLineCoords_) {
-    sketchLineGeom = /** @type {ol.geom.LineString} */ (this.sketchLine_.getGeometry());
-    sketchLineGeom.setCoordinates(this.sketchLineCoords_);
-  }
-  this.updateSketchFeatures_();
-};
-
-
-/**
- * Add a new coordinate to the drawing.
- * @param {ol.MapBrowserEvent} event Event.
- * @private
- */
-ol.interaction.Draw.prototype.addToDrawing_ = function(event) {
-  var coordinate = event.coordinate;
-  var geometry = /** @type {ol.geom.SimpleGeometry} */ (this.sketchFeature_.getGeometry());
-  var done;
-  var coordinates;
-  if (this.mode_ === ol.interaction.Draw.Mode_.LINE_STRING) {
-    this.finishCoordinate_ = coordinate.slice();
-    coordinates = this.sketchCoords_;
-    if (coordinates.length >= this.maxPoints_) {
-      if (this.freehand_) {
-        coordinates.pop();
-      } else {
-        done = true;
-      }
-    }
-    coordinates.push(coordinate.slice());
-    this.geometryFunction_(coordinates, geometry);
-  } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-    coordinates = this.sketchCoords_[0];
-    if (coordinates.length >= this.maxPoints_) {
-      if (this.freehand_) {
-        coordinates.pop();
-      } else {
-        done = true;
-      }
-    }
-    coordinates.push(coordinate.slice());
-    if (done) {
-      this.finishCoordinate_ = coordinates[0];
-    }
-    this.geometryFunction_(this.sketchCoords_, geometry);
-  }
-  this.updateSketchFeatures_();
-  if (done) {
-    this.finishDrawing();
-  }
-};
-
-
-/**
- * Remove last point of the feature currently being drawn.
- * @api
- */
-ol.interaction.Draw.prototype.removeLastPoint = function() {
-  if (!this.sketchFeature_) {
-    return;
-  }
-  var geometry = /** @type {ol.geom.SimpleGeometry} */ (this.sketchFeature_.getGeometry());
-  var coordinates, sketchLineGeom;
-  if (this.mode_ === ol.interaction.Draw.Mode_.LINE_STRING) {
-    coordinates = this.sketchCoords_;
-    coordinates.splice(-2, 1);
-    this.geometryFunction_(coordinates, geometry);
-    if (coordinates.length >= 2) {
-      this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();
-    }
-  } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-    coordinates = this.sketchCoords_[0];
-    coordinates.splice(-2, 1);
-    sketchLineGeom = /** @type {ol.geom.LineString} */ (this.sketchLine_.getGeometry());
-    sketchLineGeom.setCoordinates(coordinates);
-    this.geometryFunction_(this.sketchCoords_, geometry);
-  }
-
-  if (coordinates.length === 0) {
-    this.finishCoordinate_ = null;
-  }
-
-  this.updateSketchFeatures_();
-};
-
-
-/**
- * Stop drawing and add the sketch feature to the target layer.
- * The {@link ol.interaction.DrawEventType.DRAWEND} event is dispatched before
- * inserting the feature.
- * @api
- */
-ol.interaction.Draw.prototype.finishDrawing = function() {
-  var sketchFeature = this.abortDrawing_();
-  var coordinates = this.sketchCoords_;
-  var geometry = /** @type {ol.geom.SimpleGeometry} */ (sketchFeature.getGeometry());
-  if (this.mode_ === ol.interaction.Draw.Mode_.LINE_STRING) {
-    // remove the redundant last point
-    coordinates.pop();
-    this.geometryFunction_(coordinates, geometry);
-  } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-    // remove the redundant last point in ring
-    coordinates[0].pop();
-    this.geometryFunction_(coordinates, geometry);
-    coordinates = geometry.getCoordinates();
-  }
-
-  // cast multi-part geometries
-  if (this.type_ === ol.geom.GeometryType.MULTI_POINT) {
-    sketchFeature.setGeometry(new ol.geom.MultiPoint([coordinates]));
-  } else if (this.type_ === ol.geom.GeometryType.MULTI_LINE_STRING) {
-    sketchFeature.setGeometry(new ol.geom.MultiLineString([coordinates]));
-  } else if (this.type_ === ol.geom.GeometryType.MULTI_POLYGON) {
-    sketchFeature.setGeometry(new ol.geom.MultiPolygon([coordinates]));
-  }
-
-  // First dispatch event to allow full set up of feature
-  this.dispatchEvent(new ol.interaction.Draw.Event(
-      ol.interaction.DrawEventType.DRAWEND, sketchFeature));
-
-  // Then insert feature
-  if (this.features_) {
-    this.features_.push(sketchFeature);
-  }
-  if (this.source_) {
-    this.source_.addFeature(sketchFeature);
-  }
-};
-
-
-/**
- * Stop drawing without adding the sketch feature to the target layer.
- * @return {ol.Feature} The sketch feature (or null if none).
- * @private
- */
-ol.interaction.Draw.prototype.abortDrawing_ = function() {
-  this.finishCoordinate_ = null;
-  var sketchFeature = this.sketchFeature_;
-  if (sketchFeature) {
-    this.sketchFeature_ = null;
-    this.sketchPoint_ = null;
-    this.sketchLine_ = null;
-    this.overlay_.getSource().clear(true);
-  }
-  return sketchFeature;
-};
-
-
-/**
- * Extend an existing geometry by adding additional points. This only works
- * on features with `LineString` geometries, where the interaction will
- * extend lines by adding points to the end of the coordinates array.
- * @param {!ol.Feature} feature Feature to be extended.
- * @api
- */
-ol.interaction.Draw.prototype.extend = function(feature) {
-  var geometry = feature.getGeometry();
-  var lineString = /** @type {ol.geom.LineString} */ (geometry);
-  this.sketchFeature_ = feature;
-  this.sketchCoords_ = lineString.getCoordinates();
-  var last = this.sketchCoords_[this.sketchCoords_.length - 1];
-  this.finishCoordinate_ = last.slice();
-  this.sketchCoords_.push(last.slice());
-  this.updateSketchFeatures_();
-  this.dispatchEvent(new ol.interaction.Draw.Event(
-      ol.interaction.DrawEventType.DRAWSTART, this.sketchFeature_));
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Draw.prototype.shouldStopEvent = ol.functions.FALSE;
-
-
-/**
- * Redraw the sketch features.
- * @private
- */
-ol.interaction.Draw.prototype.updateSketchFeatures_ = function() {
-  var sketchFeatures = [];
-  if (this.sketchFeature_) {
-    sketchFeatures.push(this.sketchFeature_);
-  }
-  if (this.sketchLine_) {
-    sketchFeatures.push(this.sketchLine_);
-  }
-  if (this.sketchPoint_) {
-    sketchFeatures.push(this.sketchPoint_);
-  }
-  var overlaySource = this.overlay_.getSource();
-  overlaySource.clear(true);
-  overlaySource.addFeatures(sketchFeatures);
-};
-
-
-/**
- * @private
- */
-ol.interaction.Draw.prototype.updateState_ = function() {
-  var map = this.getMap();
-  var active = this.getActive();
-  if (!map || !active) {
-    this.abortDrawing_();
-  }
-  this.overlay_.setMap(active ? map : null);
-};
-
-
-/**
- * Create a `geometryFunction` for `type: 'Circle'` that will create a regular
- * polygon with a user specified number of sides and start angle instead of an
- * `ol.geom.Circle` geometry.
- * @param {number=} opt_sides Number of sides of the regular polygon. Default is
- *     32.
- * @param {number=} opt_angle Angle of the first point in radians. 0 means East.
- *     Default is the angle defined by the heading from the center of the
- *     regular polygon to the current pointer position.
- * @return {ol.DrawGeometryFunctionType} Function that draws a
- *     polygon.
- * @api
- */
-ol.interaction.Draw.createRegularPolygon = function(opt_sides, opt_angle) {
-  return (
-      /**
-       * @param {ol.Coordinate|Array.<ol.Coordinate>|Array.<Array.<ol.Coordinate>>} coordinates
-       * @param {ol.geom.SimpleGeometry=} opt_geometry
-       * @return {ol.geom.SimpleGeometry}
-       */
-      function(coordinates, opt_geometry) {
-        var center = coordinates[0];
-        var end = coordinates[1];
-        var radius = Math.sqrt(
-            ol.coordinate.squaredDistance(center, end));
-        var geometry = opt_geometry ? /** @type {ol.geom.Polygon} */ (opt_geometry) :
-            ol.geom.Polygon.fromCircle(new ol.geom.Circle(center), opt_sides);
-        var angle = opt_angle ? opt_angle :
-            Math.atan((end[1] - center[1]) / (end[0] - center[0]));
-        ol.geom.Polygon.makeRegular(geometry, center, radius, angle);
-        return geometry;
-      }
-  );
-};
-
-
-/**
- * Create a `geometryFunction` that will create a box-shaped polygon (aligned
- * with the coordinate system axes).  Use this with the draw interaction and
- * `type: 'Circle'` to return a box instead of a circle geometry.
- * @return {ol.DrawGeometryFunctionType} Function that draws a box-shaped polygon.
- * @api
- */
-ol.interaction.Draw.createBox = function() {
-  return (
-    /**
-     * @param {Array.<ol.Coordinate>} coordinates
-     * @param {ol.geom.SimpleGeometry=} opt_geometry
-     * @return {ol.geom.SimpleGeometry}
-     */
-    function(coordinates, opt_geometry) {
-      var extent = ol.extent.boundingExtent(coordinates);
-      var geometry = opt_geometry || new ol.geom.Polygon(null);
-      geometry.setCoordinates([[
-        ol.extent.getBottomLeft(extent),
-        ol.extent.getBottomRight(extent),
-        ol.extent.getTopRight(extent),
-        ol.extent.getTopLeft(extent),
-        ol.extent.getBottomLeft(extent)
-      ]]);
-      return geometry;
-    }
-  );
-};
-
-
-/**
- * Get the drawing mode.  The mode for mult-part geometries is the same as for
- * their single-part cousins.
- * @param {ol.geom.GeometryType} type Geometry type.
- * @return {ol.interaction.Draw.Mode_} Drawing mode.
- * @private
- */
-ol.interaction.Draw.getMode_ = function(type) {
-  var mode;
-  if (type === ol.geom.GeometryType.POINT ||
-      type === ol.geom.GeometryType.MULTI_POINT) {
-    mode = ol.interaction.Draw.Mode_.POINT;
-  } else if (type === ol.geom.GeometryType.LINE_STRING ||
-      type === ol.geom.GeometryType.MULTI_LINE_STRING) {
-    mode = ol.interaction.Draw.Mode_.LINE_STRING;
-  } else if (type === ol.geom.GeometryType.POLYGON ||
-      type === ol.geom.GeometryType.MULTI_POLYGON) {
-    mode = ol.interaction.Draw.Mode_.POLYGON;
-  } else if (type === ol.geom.GeometryType.CIRCLE) {
-    mode = ol.interaction.Draw.Mode_.CIRCLE;
-  }
-  return /** @type {!ol.interaction.Draw.Mode_} */ (mode);
-};
-
-
-/**
- * Draw mode.  This collapses multi-part geometry types with their single-part
- * cousins.
- * @enum {string}
- * @private
- */
-ol.interaction.Draw.Mode_ = {
-  POINT: 'Point',
-  LINE_STRING: 'LineString',
-  POLYGON: 'Polygon',
-  CIRCLE: 'Circle'
-};
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Draw} instances are instances of
- * this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.DrawEvent}
- * @param {ol.interaction.DrawEventType} type Type.
- * @param {ol.Feature} feature The feature drawn.
- */
-ol.interaction.Draw.Event = function(type, feature) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The feature being drawn.
-   * @type {ol.Feature}
-   * @api
-   */
-  this.feature = feature;
-
-};
-ol.inherits(ol.interaction.Draw.Event, ol.events.Event);
-
-goog.provide('ol.interaction.Extent');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.MapBrowserPointerEvent');
-goog.require('ol.coordinate');
-goog.require('ol.events.Event');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.layer.Vector');
-goog.require('ol.source.Vector');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Allows the user to draw a vector box by clicking and dragging on the map.
- * Once drawn, the vector box can be modified by dragging its vertices or edges.
- * This interaction is only supported for mouse devices.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @fires ol.interaction.Extent.Event
- * @param {olx.interaction.ExtentOptions=} opt_options Options.
- * @api
- */
-ol.interaction.Extent = function(opt_options) {
-
-  /**
-   * Extent of the drawn box
-   * @type {ol.Extent}
-   * @private
-   */
-  this.extent_ = null;
-
-  /**
-   * Handler for pointer move events
-   * @type {function (ol.Coordinate): ol.Extent|null}
-   * @private
-   */
-  this.pointerHandler_ = null;
-
-  /**
-   * Pixel threshold to snap to extent
-   * @type {number}
-   * @private
-   */
-  this.pixelTolerance_ = 10;
-
-  /**
-   * Is the pointer snapped to an extent vertex
-   * @type {boolean}
-   * @private
-   */
-  this.snappedToVertex_ = false;
-
-  /**
-   * Feature for displaying the visible extent
-   * @type {ol.Feature}
-   * @private
-   */
-  this.extentFeature_ = null;
-
-  /**
-   * Feature for displaying the visible pointer
-   * @type {ol.Feature}
-   * @private
-   */
-  this.vertexFeature_ = null;
-
-  if (!opt_options) {
-    opt_options = {};
-  }
-
-  if (opt_options.extent) {
-    this.setExtent(opt_options.extent);
-  }
-
-  /* Inherit ol.interaction.Pointer */
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.Extent.handleDownEvent_,
-    handleDragEvent: ol.interaction.Extent.handleDragEvent_,
-    handleEvent: ol.interaction.Extent.handleEvent_,
-    handleUpEvent: ol.interaction.Extent.handleUpEvent_
-  });
-
-  /**
-   * Layer for the extentFeature
-   * @type {ol.layer.Vector}
-   * @private
-   */
-  this.extentOverlay_ = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      useSpatialIndex: false,
-      wrapX: !!opt_options.wrapX
-    }),
-    style: opt_options.boxStyle ? opt_options.boxStyle : ol.interaction.Extent.getDefaultExtentStyleFunction_(),
-    updateWhileAnimating: true,
-    updateWhileInteracting: true
-  });
-
-  /**
-   * Layer for the vertexFeature
-   * @type {ol.layer.Vector}
-   * @private
-   */
-  this.vertexOverlay_ = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      useSpatialIndex: false,
-      wrapX: !!opt_options.wrapX
-    }),
-    style: opt_options.pointerStyle ? opt_options.pointerStyle : ol.interaction.Extent.getDefaultPointerStyleFunction_(),
-    updateWhileAnimating: true,
-    updateWhileInteracting: true
-  });
-};
-
-ol.inherits(ol.interaction.Extent, ol.interaction.Pointer);
-
-/**
- * @param {ol.MapBrowserEvent} mapBrowserEvent Event.
- * @return {boolean} Propagate event?
- * @this {ol.interaction.Extent}
- * @private
- */
-ol.interaction.Extent.handleEvent_ = function(mapBrowserEvent) {
-  if (!(mapBrowserEvent instanceof ol.MapBrowserPointerEvent)) {
-    return true;
-  }
-  //display pointer (if not dragging)
-  if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE && !this.handlingDownUpSequence) {
-    this.handlePointerMove_(mapBrowserEvent);
-  }
-  //call pointer to determine up/down/drag
-  ol.interaction.Pointer.handleEvent.call(this, mapBrowserEvent);
-  //return false to stop propagation
-  return false;
-};
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Event handled?
- * @this {ol.interaction.Extent}
- * @private
- */
-ol.interaction.Extent.handleDownEvent_ = function(mapBrowserEvent) {
-  var pixel = mapBrowserEvent.pixel;
-  var map = mapBrowserEvent.map;
-
-  var extent = this.getExtent();
-  var vertex = this.snapToVertex_(pixel, map);
-
-  //find the extent corner opposite the passed corner
-  var getOpposingPoint = function(point) {
-    var x_ = null;
-    var y_ = null;
-    if (point[0] == extent[0]) {
-      x_ = extent[2];
-    } else if (point[0] == extent[2]) {
-      x_ = extent[0];
-    }
-    if (point[1] == extent[1]) {
-      y_ = extent[3];
-    } else if (point[1] == extent[3]) {
-      y_ = extent[1];
-    }
-    if (x_ !== null && y_ !== null) {
-      return [x_, y_];
-    }
-    return null;
-  };
-  if (vertex && extent) {
-    var x = (vertex[0] == extent[0] || vertex[0] == extent[2]) ? vertex[0] : null;
-    var y = (vertex[1] == extent[1] || vertex[1] == extent[3]) ? vertex[1] : null;
-
-    //snap to point
-    if (x !== null && y !== null) {
-      this.pointerHandler_ = ol.interaction.Extent.getPointHandler_(getOpposingPoint(vertex));
-    //snap to edge
-    } else if (x !== null) {
-      this.pointerHandler_ = ol.interaction.Extent.getEdgeHandler_(
-        getOpposingPoint([x, extent[1]]),
-        getOpposingPoint([x, extent[3]])
-      );
-    } else if (y !== null) {
-      this.pointerHandler_ = ol.interaction.Extent.getEdgeHandler_(
-        getOpposingPoint([extent[0], y]),
-        getOpposingPoint([extent[2], y])
-      );
-    }
-  //no snap - new bbox
-  } else {
-    vertex = map.getCoordinateFromPixel(pixel);
-    this.setExtent([vertex[0], vertex[1], vertex[0], vertex[1]]);
-    this.pointerHandler_ = ol.interaction.Extent.getPointHandler_(vertex);
-  }
-  return true; //event handled; start downup sequence
-};
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Event handled?
- * @this {ol.interaction.Extent}
- * @private
- */
-ol.interaction.Extent.handleDragEvent_ = function(mapBrowserEvent) {
-  if (this.pointerHandler_) {
-    var pixelCoordinate = mapBrowserEvent.coordinate;
-    this.setExtent(this.pointerHandler_(pixelCoordinate));
-    this.createOrUpdatePointerFeature_(pixelCoordinate);
-  }
-  return true;
-};
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.Extent}
- * @private
- */
-ol.interaction.Extent.handleUpEvent_ = function(mapBrowserEvent) {
-  this.pointerHandler_ = null;
-  //If bbox is zero area, set to null;
-  var extent = this.getExtent();
-  if (!extent || ol.extent.getArea(extent) === 0) {
-    this.setExtent(null);
-  }
-  return false; //Stop handling downup sequence
-};
-
-/**
- * Returns the default style for the drawn bbox
- *
- * @return {ol.StyleFunction} Default Extent style
- * @private
- */
-ol.interaction.Extent.getDefaultExtentStyleFunction_ = function() {
-  var style = ol.style.Style.createDefaultEditing();
-  return function(feature, resolution) {
-    return style[ol.geom.GeometryType.POLYGON];
-  };
-};
-
-/**
- * Returns the default style for the pointer
- *
- * @return {ol.StyleFunction} Default pointer style
- * @private
- */
-ol.interaction.Extent.getDefaultPointerStyleFunction_ = function() {
-  var style = ol.style.Style.createDefaultEditing();
-  return function(feature, resolution) {
-    return style[ol.geom.GeometryType.POINT];
-  };
-};
-
-/**
- * @param {ol.Coordinate} fixedPoint corner that will be unchanged in the new extent
- * @returns {function (ol.Coordinate): ol.Extent} event handler
- * @private
- */
-ol.interaction.Extent.getPointHandler_ = function(fixedPoint) {
-  return function(point) {
-    return ol.extent.boundingExtent([fixedPoint, point]);
-  };
-};
-
-/**
- * @param {ol.Coordinate} fixedP1 first corner that will be unchanged in the new extent
- * @param {ol.Coordinate} fixedP2 second corner that will be unchanged in the new extent
- * @returns {function (ol.Coordinate): ol.Extent|null} event handler
- * @private
- */
-ol.interaction.Extent.getEdgeHandler_ = function(fixedP1, fixedP2) {
-  if (fixedP1[0] == fixedP2[0]) {
-    return function(point) {
-      return ol.extent.boundingExtent([fixedP1, [point[0], fixedP2[1]]]);
-    };
-  } else if (fixedP1[1] == fixedP2[1]) {
-    return function(point) {
-      return ol.extent.boundingExtent([fixedP1, [fixedP2[0], point[1]]]);
-    };
-  } else {
-    return null;
-  }
-};
-
-/**
- * @param {ol.Extent} extent extent
- * @returns {Array<Array<ol.Coordinate>>} extent line segments
- * @private
- */
-ol.interaction.Extent.getSegments_ = function(extent) {
-  return [
-    [[extent[0], extent[1]], [extent[0], extent[3]]],
-    [[extent[0], extent[3]], [extent[2], extent[3]]],
-    [[extent[2], extent[3]], [extent[2], extent[1]]],
-    [[extent[2], extent[1]], [extent[0], extent[1]]]
-  ];
-};
-
-/**
- * @param {ol.Pixel} pixel cursor location
- * @param {ol.Map} map map
- * @returns {ol.Coordinate|null} snapped vertex on extent
- * @private
- */
-ol.interaction.Extent.prototype.snapToVertex_ = function(pixel, map) {
-  var pixelCoordinate = map.getCoordinateFromPixel(pixel);
-  var sortByDistance = function(a, b) {
-    return ol.coordinate.squaredDistanceToSegment(pixelCoordinate, a) -
-        ol.coordinate.squaredDistanceToSegment(pixelCoordinate, b);
-  };
-  var extent = this.getExtent();
-  if (extent) {
-    //convert extents to line segments and find the segment closest to pixelCoordinate
-    var segments = ol.interaction.Extent.getSegments_(extent);
-    segments.sort(sortByDistance);
-    var closestSegment = segments[0];
-
-    var vertex = (ol.coordinate.closestOnSegment(pixelCoordinate,
-        closestSegment));
-    var vertexPixel = map.getPixelFromCoordinate(vertex);
-
-    //if the distance is within tolerance, snap to the segment
-    if (ol.coordinate.distance(pixel, vertexPixel) <= this.pixelTolerance_) {
-      //test if we should further snap to a vertex
-      var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);
-      var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);
-      var squaredDist1 = ol.coordinate.squaredDistance(vertexPixel, pixel1);
-      var squaredDist2 = ol.coordinate.squaredDistance(vertexPixel, pixel2);
-      var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));
-      this.snappedToVertex_ = dist <= this.pixelTolerance_;
-      if (this.snappedToVertex_) {
-        vertex = squaredDist1 > squaredDist2 ?
-            closestSegment[1] : closestSegment[0];
-      }
-      return vertex;
-    }
-  }
-  return null;
-};
-
-/**
- * @param {ol.MapBrowserEvent} mapBrowserEvent pointer move event
- * @private
- */
-ol.interaction.Extent.prototype.handlePointerMove_ = function(mapBrowserEvent) {
-  var pixel = mapBrowserEvent.pixel;
-  var map = mapBrowserEvent.map;
-
-  var vertex = this.snapToVertex_(pixel, map);
-  if (!vertex) {
-    vertex = map.getCoordinateFromPixel(pixel);
-  }
-  this.createOrUpdatePointerFeature_(vertex);
-};
-
-/**
- * @param {ol.Extent} extent extent
- * @returns {ol.Feature} extent as featrue
- * @private
- */
-ol.interaction.Extent.prototype.createOrUpdateExtentFeature_ = function(extent) {
-  var extentFeature = this.extentFeature_;
-
-  if (!extentFeature) {
-    if (!extent) {
-      extentFeature = new ol.Feature({});
-    } else {
-      extentFeature = new ol.Feature(ol.geom.Polygon.fromExtent(extent));
-    }
-    this.extentFeature_ = extentFeature;
-    this.extentOverlay_.getSource().addFeature(extentFeature);
-  } else {
-    if (!extent) {
-      extentFeature.setGeometry(undefined);
-    } else {
-      extentFeature.setGeometry(ol.geom.Polygon.fromExtent(extent));
-    }
-  }
-  return extentFeature;
-};
-
-
-/**
- * @param {ol.Coordinate} vertex location of feature
- * @returns {ol.Feature} vertex as feature
- * @private
- */
-ol.interaction.Extent.prototype.createOrUpdatePointerFeature_ = function(vertex) {
-  var vertexFeature = this.vertexFeature_;
-  if (!vertexFeature) {
-    vertexFeature = new ol.Feature(new ol.geom.Point(vertex));
-    this.vertexFeature_ = vertexFeature;
-    this.vertexOverlay_.getSource().addFeature(vertexFeature);
-  } else {
-    var geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());
-    geometry.setCoordinates(vertex);
-  }
-  return vertexFeature;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Extent.prototype.setMap = function(map) {
-  this.extentOverlay_.setMap(map);
-  this.vertexOverlay_.setMap(map);
-  ol.interaction.Pointer.prototype.setMap.call(this, map);
-};
-
-/**
- * Returns the current drawn extent in the view projection
- *
- * @return {ol.Extent} Drawn extent in the view projection.
- * @api
- */
-ol.interaction.Extent.prototype.getExtent = function() {
-  return this.extent_;
-};
-
-/**
- * Manually sets the drawn extent, using the view projection.
- *
- * @param {ol.Extent} extent Extent
- * @api
- */
-ol.interaction.Extent.prototype.setExtent = function(extent) {
-  //Null extent means no bbox
-  this.extent_ = extent ? extent : null;
-  this.createOrUpdateExtentFeature_(extent);
-  this.dispatchEvent(new ol.interaction.Extent.Event(this.extent_));
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Extent} instances are instances of
- * this type.
- *
- * @constructor
- * @param {ol.Extent} extent the new extent
- * @extends {ol.events.Event}
- */
-ol.interaction.Extent.Event = function(extent) {
-  ol.events.Event.call(this, ol.interaction.Extent.EventType_.EXTENTCHANGED);
-
-  /**
-   * The current extent.
-   * @type {ol.Extent}
-   * @api
-   */
-  this.extent_ = extent;
-};
-ol.inherits(ol.interaction.Extent.Event, ol.events.Event);
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.interaction.Extent.EventType_ = {
-  /**
-   * Triggered after the extent is changed
-   * @event ol.interaction.Extent.Event
-   * @api
-   */
-  EXTENTCHANGED: 'extentchanged'
-};
-
-goog.provide('ol.interaction.ModifyEventType');
-
-
-/**
- * @enum {string}
- */
-ol.interaction.ModifyEventType = {
-  /**
-   * Triggered upon feature modification start
-   * @event ol.interaction.Modify.Event#modifystart
-   * @api
-   */
-  MODIFYSTART: 'modifystart',
-  /**
-   * Triggered upon feature modification end
-   * @event ol.interaction.Modify.Event#modifyend
-   * @api
-   */
-  MODIFYEND: 'modifyend'
-};
-
-goog.provide('ol.interaction.Modify');
-
-goog.require('ol');
-goog.require('ol.CollectionEventType');
-goog.require('ol.Feature');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.MapBrowserPointerEvent');
-goog.require('ol.ViewHint');
-goog.require('ol.array');
-goog.require('ol.coordinate');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.events.condition');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.Point');
-goog.require('ol.interaction.ModifyEventType');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.layer.Vector');
-goog.require('ol.source.Vector');
-goog.require('ol.structs.RBush');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Interaction for modifying feature geometries.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.ModifyOptions} options Options.
- * @fires ol.interaction.Modify.Event
- * @api
- */
-ol.interaction.Modify = function(options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.Modify.handleDownEvent_,
-    handleDragEvent: ol.interaction.Modify.handleDragEvent_,
-    handleEvent: ol.interaction.Modify.handleEvent,
-    handleUpEvent: ol.interaction.Modify.handleUpEvent_
-  });
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-      options.condition : ol.events.condition.primaryAction;
-
-
-  /**
-   * @private
-   * @param {ol.MapBrowserEvent} mapBrowserEvent Browser event.
-   * @return {boolean} Combined condition result.
-   */
-  this.defaultDeleteCondition_ = function(mapBrowserEvent) {
-    return ol.events.condition.noModifierKeys(mapBrowserEvent) &&
-      ol.events.condition.singleClick(mapBrowserEvent);
-  };
-
-  /**
-   * @type {ol.EventsConditionType}
-   * @private
-   */
-  this.deleteCondition_ = options.deleteCondition ?
-      options.deleteCondition : this.defaultDeleteCondition_;
-
-  /**
-   * @type {ol.EventsConditionType}
-   * @private
-   */
-  this.insertVertexCondition_ = options.insertVertexCondition ?
-      options.insertVertexCondition : ol.events.condition.always;
-
-  /**
-   * Editing vertex.
-   * @type {ol.Feature}
-   * @private
-   */
-  this.vertexFeature_ = null;
-
-  /**
-   * Segments intersecting {@link this.vertexFeature_} by segment uid.
-   * @type {Object.<string, boolean>}
-   * @private
-   */
-  this.vertexSegments_ = null;
-
-  /**
-   * @type {ol.Pixel}
-   * @private
-   */
-  this.lastPixel_ = [0, 0];
-
-  /**
-   * Tracks if the next `singleclick` event should be ignored to prevent
-   * accidental deletion right after vertex creation.
-   * @type {boolean}
-   * @private
-   */
-  this.ignoreNextSingleClick_ = false;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.modified_ = false;
-
-  /**
-   * Segment RTree for each layer
-   * @type {ol.structs.RBush.<ol.ModifySegmentDataType>}
-   * @private
-   */
-  this.rBush_ = new ol.structs.RBush();
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.pixelTolerance_ = options.pixelTolerance !== undefined ?
-      options.pixelTolerance : 10;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.snappedToVertex_ = false;
-
-  /**
-   * Indicate whether the interaction is currently changing a feature's
-   * coordinates.
-   * @type {boolean}
-   * @private
-   */
-  this.changingFeature_ = false;
-
-  /**
-   * @type {Array}
-   * @private
-   */
-  this.dragSegments_ = [];
-
-  /**
-   * Draw overlay where sketch features are drawn.
-   * @type {ol.layer.Vector}
-   * @private
-   */
-  this.overlay_ = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      useSpatialIndex: false,
-      wrapX: !!options.wrapX
-    }),
-    style: options.style ? options.style :
-        ol.interaction.Modify.getDefaultStyleFunction(),
-    updateWhileAnimating: true,
-    updateWhileInteracting: true
-  });
-
-  /**
-  * @const
-  * @private
-  * @type {Object.<string, function(ol.Feature, ol.geom.Geometry)>}
-  */
-  this.SEGMENT_WRITERS_ = {
-    'Point': this.writePointGeometry_,
-    'LineString': this.writeLineStringGeometry_,
-    'LinearRing': this.writeLineStringGeometry_,
-    'Polygon': this.writePolygonGeometry_,
-    'MultiPoint': this.writeMultiPointGeometry_,
-    'MultiLineString': this.writeMultiLineStringGeometry_,
-    'MultiPolygon': this.writeMultiPolygonGeometry_,
-    'Circle': this.writeCircleGeometry_,
-    'GeometryCollection': this.writeGeometryCollectionGeometry_
-  };
-
-  /**
-   * @type {ol.Collection.<ol.Feature>}
-   * @private
-   */
-  this.features_ = options.features;
-
-  this.features_.forEach(this.addFeature_, this);
-  ol.events.listen(this.features_, ol.CollectionEventType.ADD,
-      this.handleFeatureAdd_, this);
-  ol.events.listen(this.features_, ol.CollectionEventType.REMOVE,
-      this.handleFeatureRemove_, this);
-
-  /**
-   * @type {ol.MapBrowserPointerEvent}
-   * @private
-   */
-  this.lastPointerEvent_ = null;
-
-};
-ol.inherits(ol.interaction.Modify, ol.interaction.Pointer);
-
-
-/**
- * @define {number} The segment index assigned to a circle's center when
- * breaking up a cicrle into ModifySegmentDataType segments.
- */
-ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CENTER_INDEX = 0;
-
-/**
- * @define {number} The segment index assigned to a circle's circumference when
- * breaking up a circle into ModifySegmentDataType segments.
- */
-ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX = 1;
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.interaction.Modify.prototype.addFeature_ = function(feature) {
-  var geometry = feature.getGeometry();
-  if (geometry && geometry.getType() in this.SEGMENT_WRITERS_) {
-    this.SEGMENT_WRITERS_[geometry.getType()].call(this, feature, geometry);
-  }
-  var map = this.getMap();
-  if (map && map.isRendered() && this.getActive()) {
-    this.handlePointerAtPixel_(this.lastPixel_, map);
-  }
-  ol.events.listen(feature, ol.events.EventType.CHANGE,
-      this.handleFeatureChange_, this);
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} evt Map browser event
- * @private
- */
-ol.interaction.Modify.prototype.willModifyFeatures_ = function(evt) {
-  if (!this.modified_) {
-    this.modified_ = true;
-    this.dispatchEvent(new ol.interaction.Modify.Event(
-        ol.interaction.ModifyEventType.MODIFYSTART, this.features_, evt));
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.interaction.Modify.prototype.removeFeature_ = function(feature) {
-  this.removeFeatureSegmentData_(feature);
-  // Remove the vertex feature if the collection of canditate features
-  // is empty.
-  if (this.vertexFeature_ && this.features_.getLength() === 0) {
-    this.overlay_.getSource().removeFeature(this.vertexFeature_);
-    this.vertexFeature_ = null;
-  }
-  ol.events.unlisten(feature, ol.events.EventType.CHANGE,
-      this.handleFeatureChange_, this);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.interaction.Modify.prototype.removeFeatureSegmentData_ = function(feature) {
-  var rBush = this.rBush_;
-  var /** @type {Array.<ol.ModifySegmentDataType>} */ nodesToRemove = [];
-  rBush.forEach(
-      /**
-       * @param {ol.ModifySegmentDataType} node RTree node.
-       */
-      function(node) {
-        if (feature === node.feature) {
-          nodesToRemove.push(node);
-        }
-      });
-  for (var i = nodesToRemove.length - 1; i >= 0; --i) {
-    rBush.remove(nodesToRemove[i]);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Modify.prototype.setActive = function(active) {
-  if (this.vertexFeature_ && !active) {
-    this.overlay_.getSource().removeFeature(this.vertexFeature_);
-    this.vertexFeature_ = null;
-  }
-  ol.interaction.Pointer.prototype.setActive.call(this, active);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Modify.prototype.setMap = function(map) {
-  this.overlay_.setMap(map);
-  ol.interaction.Pointer.prototype.setMap.call(this, map);
-};
-
-
-/**
- * @param {ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Modify.prototype.handleFeatureAdd_ = function(evt) {
-  this.addFeature_(/** @type {ol.Feature} */ (evt.element));
-};
-
-
-/**
- * @param {ol.events.Event} evt Event.
- * @private
- */
-ol.interaction.Modify.prototype.handleFeatureChange_ = function(evt) {
-  if (!this.changingFeature_) {
-    var feature = /** @type {ol.Feature} */ (evt.target);
-    this.removeFeature_(feature);
-    this.addFeature_(feature);
-  }
-};
-
-
-/**
- * @param {ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Modify.prototype.handleFeatureRemove_ = function(evt) {
-  var feature = /** @type {ol.Feature} */ (evt.element);
-  this.removeFeature_(feature);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.Point} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writePointGeometry_ = function(feature, geometry) {
-  var coordinates = geometry.getCoordinates();
-  var segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-    feature: feature,
-    geometry: geometry,
-    segment: [coordinates, coordinates]
-  });
-  this.rBush_.insert(geometry.getExtent(), segmentData);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiPoint} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
-  var points = geometry.getCoordinates();
-  var coordinates, i, ii, segmentData;
-  for (i = 0, ii = points.length; i < ii; ++i) {
-    coordinates = points[i];
-    segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-      feature: feature,
-      geometry: geometry,
-      depth: [i],
-      index: i,
-      segment: [coordinates, coordinates]
-    });
-    this.rBush_.insert(geometry.getExtent(), segmentData);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.LineString} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeLineStringGeometry_ = function(feature, geometry) {
-  var coordinates = geometry.getCoordinates();
-  var i, ii, segment, segmentData;
-  for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-    segment = coordinates.slice(i, i + 2);
-    segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-      feature: feature,
-      geometry: geometry,
-      index: i,
-      segment: segment
-    });
-    this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiLineString} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
-  var lines = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, segment, segmentData;
-  for (j = 0, jj = lines.length; j < jj; ++j) {
-    coordinates = lines[j];
-    for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-      segment = coordinates.slice(i, i + 2);
-      segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-        feature: feature,
-        geometry: geometry,
-        depth: [j],
-        index: i,
-        segment: segment
-      });
-      this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.Polygon} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writePolygonGeometry_ = function(feature, geometry) {
-  var rings = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, segment, segmentData;
-  for (j = 0, jj = rings.length; j < jj; ++j) {
-    coordinates = rings[j];
-    for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-      segment = coordinates.slice(i, i + 2);
-      segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-        feature: feature,
-        geometry: geometry,
-        depth: [j],
-        index: i,
-        segment: segment
-      });
-      this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiPolygon} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
-  var polygons = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, k, kk, rings, segment, segmentData;
-  for (k = 0, kk = polygons.length; k < kk; ++k) {
-    rings = polygons[k];
-    for (j = 0, jj = rings.length; j < jj; ++j) {
-      coordinates = rings[j];
-      for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-        segment = coordinates.slice(i, i + 2);
-        segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-          feature: feature,
-          geometry: geometry,
-          depth: [j, k],
-          index: i,
-          segment: segment
-        });
-        this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-      }
-    }
-  }
-};
-
-
-/**
- * We convert a circle into two segments.  The segment at index
- * {@link ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CENTER_INDEX} is the
- * circle's center (a point).  The segment at index
- * {@link ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX} is
- * the circumference, and is not a line segment.
- *
- * @param {ol.Feature} feature Feature.
- * @param {ol.geom.Circle} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeCircleGeometry_ = function(feature, geometry) {
-  var coordinates = geometry.getCenter();
-  var centerSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
-    feature: feature,
-    geometry: geometry,
-    index: ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CENTER_INDEX,
-    segment: [coordinates, coordinates]
-  });
-  var circumferenceSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
-    feature: feature,
-    geometry: geometry,
-    index: ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX,
-    segment: [coordinates, coordinates]
-  });
-  var featureSegments = [centerSegmentData, circumferenceSegmentData];
-  centerSegmentData.featureSegments = circumferenceSegmentData.featureSegments = featureSegments;
-  this.rBush_.insert(ol.extent.createOrUpdateFromCoordinate(coordinates), centerSegmentData);
-  this.rBush_.insert(geometry.getExtent(), circumferenceSegmentData);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.GeometryCollection} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
-  var i, geometries = geometry.getGeometriesArray();
-  for (i = 0; i < geometries.length; ++i) {
-    this.SEGMENT_WRITERS_[geometries[i].getType()].call(
-        this, feature, geometries[i]);
-  }
-};
-
-
-/**
- * @param {ol.Coordinate} coordinates Coordinates.
- * @return {ol.Feature} Vertex feature.
- * @private
- */
-ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ = function(coordinates) {
-  var vertexFeature = this.vertexFeature_;
-  if (!vertexFeature) {
-    vertexFeature = new ol.Feature(new ol.geom.Point(coordinates));
-    this.vertexFeature_ = vertexFeature;
-    this.overlay_.getSource().addFeature(vertexFeature);
-  } else {
-    var geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());
-    geometry.setCoordinates(coordinates);
-  }
-  return vertexFeature;
-};
-
-
-/**
- * @param {ol.ModifySegmentDataType} a The first segment data.
- * @param {ol.ModifySegmentDataType} b The second segment data.
- * @return {number} The difference in indexes.
- * @private
- */
-ol.interaction.Modify.compareIndexes_ = function(a, b) {
-  return a.index - b.index;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} evt Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.Modify}
- * @private
- */
-ol.interaction.Modify.handleDownEvent_ = function(evt) {
-  if (!this.condition_(evt)) {
-    return false;
-  }
-  this.handlePointerAtPixel_(evt.pixel, evt.map);
-  var pixelCoordinate = evt.map.getCoordinateFromPixel(evt.pixel);
-  this.dragSegments_.length = 0;
-  this.modified_ = false;
-  var vertexFeature = this.vertexFeature_;
-  if (vertexFeature) {
-    var insertVertices = [];
-    var geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());
-    var vertex = geometry.getCoordinates();
-    var vertexExtent = ol.extent.boundingExtent([vertex]);
-    var segmentDataMatches = this.rBush_.getInExtent(vertexExtent);
-    var componentSegments = {};
-    segmentDataMatches.sort(ol.interaction.Modify.compareIndexes_);
-    for (var i = 0, ii = segmentDataMatches.length; i < ii; ++i) {
-      var segmentDataMatch = segmentDataMatches[i];
-      var segment = segmentDataMatch.segment;
-      var uid = ol.getUid(segmentDataMatch.feature);
-      var depth = segmentDataMatch.depth;
-      if (depth) {
-        uid += '-' + depth.join('-'); // separate feature components
-      }
-      if (!componentSegments[uid]) {
-        componentSegments[uid] = new Array(2);
-      }
-      if (segmentDataMatch.geometry.getType() === ol.geom.GeometryType.CIRCLE &&
-      segmentDataMatch.index === ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX) {
-
-        var closestVertex = ol.interaction.Modify.closestOnSegmentData_(pixelCoordinate, segmentDataMatch);
-        if (ol.coordinate.equals(closestVertex, vertex) && !componentSegments[uid][0]) {
-          this.dragSegments_.push([segmentDataMatch, 0]);
-          componentSegments[uid][0] = segmentDataMatch;
-        }
-      } else if (ol.coordinate.equals(segment[0], vertex) &&
-          !componentSegments[uid][0]) {
-        this.dragSegments_.push([segmentDataMatch, 0]);
-        componentSegments[uid][0] = segmentDataMatch;
-      } else if (ol.coordinate.equals(segment[1], vertex) &&
-          !componentSegments[uid][1]) {
-
-        // prevent dragging closed linestrings by the connecting node
-        if ((segmentDataMatch.geometry.getType() ===
-            ol.geom.GeometryType.LINE_STRING ||
-            segmentDataMatch.geometry.getType() ===
-            ol.geom.GeometryType.MULTI_LINE_STRING) &&
-            componentSegments[uid][0] &&
-            componentSegments[uid][0].index === 0) {
-          continue;
-        }
-
-        this.dragSegments_.push([segmentDataMatch, 1]);
-        componentSegments[uid][1] = segmentDataMatch;
-      } else if (this.insertVertexCondition_(evt) && ol.getUid(segment) in this.vertexSegments_ &&
-          (!componentSegments[uid][0] && !componentSegments[uid][1])) {
-        insertVertices.push([segmentDataMatch, vertex]);
-      }
-    }
-    if (insertVertices.length) {
-      this.willModifyFeatures_(evt);
-    }
-    for (var j = insertVertices.length - 1; j >= 0; --j) {
-      this.insertVertex_.apply(this, insertVertices[j]);
-    }
-  }
-  return !!this.vertexFeature_;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} evt Event.
- * @this {ol.interaction.Modify}
- * @private
- */
-ol.interaction.Modify.handleDragEvent_ = function(evt) {
-  this.ignoreNextSingleClick_ = false;
-  this.willModifyFeatures_(evt);
-
-  var vertex = evt.coordinate;
-  for (var i = 0, ii = this.dragSegments_.length; i < ii; ++i) {
-    var dragSegment = this.dragSegments_[i];
-    var segmentData = dragSegment[0];
-    var depth = segmentData.depth;
-    var geometry = segmentData.geometry;
-    var coordinates;
-    var segment = segmentData.segment;
-    var index = dragSegment[1];
-
-    while (vertex.length < geometry.getStride()) {
-      vertex.push(segment[index][vertex.length]);
-    }
-
-    switch (geometry.getType()) {
-      case ol.geom.GeometryType.POINT:
-        coordinates = vertex;
-        segment[0] = segment[1] = vertex;
-        break;
-      case ol.geom.GeometryType.MULTI_POINT:
-        coordinates = geometry.getCoordinates();
-        coordinates[segmentData.index] = vertex;
-        segment[0] = segment[1] = vertex;
-        break;
-      case ol.geom.GeometryType.LINE_STRING:
-        coordinates = geometry.getCoordinates();
-        coordinates[segmentData.index + index] = vertex;
-        segment[index] = vertex;
-        break;
-      case ol.geom.GeometryType.MULTI_LINE_STRING:
-        coordinates = geometry.getCoordinates();
-        coordinates[depth[0]][segmentData.index + index] = vertex;
-        segment[index] = vertex;
-        break;
-      case ol.geom.GeometryType.POLYGON:
-        coordinates = geometry.getCoordinates();
-        coordinates[depth[0]][segmentData.index + index] = vertex;
-        segment[index] = vertex;
-        break;
-      case ol.geom.GeometryType.MULTI_POLYGON:
-        coordinates = geometry.getCoordinates();
-        coordinates[depth[1]][depth[0]][segmentData.index + index] = vertex;
-        segment[index] = vertex;
-        break;
-      case ol.geom.GeometryType.CIRCLE:
-        segment[0] = segment[1] = vertex;
-        if (segmentData.index === ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CENTER_INDEX) {
-          this.changingFeature_ = true;
-          geometry.setCenter(vertex);
-          this.changingFeature_ = false;
-        } else { // We're dragging the circle's circumference:
-          this.changingFeature_ = true;
-          geometry.setRadius(ol.coordinate.distance(geometry.getCenter(), vertex));
-          this.changingFeature_ = false;
-        }
-        break;
-      default:
-        // pass
-    }
-
-    if (coordinates) {
-      this.setGeometryCoordinates_(geometry, coordinates);
-    }
-  }
-  this.createOrUpdateVertexFeature_(vertex);
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} evt Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.Modify}
- * @private
- */
-ol.interaction.Modify.handleUpEvent_ = function(evt) {
-  var segmentData;
-  var geometry;
-  for (var i = this.dragSegments_.length - 1; i >= 0; --i) {
-    segmentData = this.dragSegments_[i][0];
-    geometry = segmentData.geometry;
-    if (geometry.getType() === ol.geom.GeometryType.CIRCLE) {
-      // Update a circle object in the R* bush:
-      var coordinates = geometry.getCenter();
-      var centerSegmentData = segmentData.featureSegments[0];
-      var circumferenceSegmentData = segmentData.featureSegments[1];
-      centerSegmentData.segment[0] = centerSegmentData.segment[1] = coordinates;
-      circumferenceSegmentData.segment[0] = circumferenceSegmentData.segment[1] = coordinates;
-      this.rBush_.update(ol.extent.createOrUpdateFromCoordinate(coordinates), centerSegmentData);
-      this.rBush_.update(geometry.getExtent(), circumferenceSegmentData);
-    } else {
-      this.rBush_.update(ol.extent.boundingExtent(segmentData.segment),
-          segmentData);
-    }
-  }
-  if (this.modified_) {
-    this.dispatchEvent(new ol.interaction.Modify.Event(
-        ol.interaction.ModifyEventType.MODIFYEND, this.features_, evt));
-    this.modified_ = false;
-  }
-  return false;
-};
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} and may modify the
- * geometry.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.Modify}
- * @api
- */
-ol.interaction.Modify.handleEvent = function(mapBrowserEvent) {
-  if (!(mapBrowserEvent instanceof ol.MapBrowserPointerEvent)) {
-    return true;
-  }
-  this.lastPointerEvent_ = mapBrowserEvent;
-
-  var handled;
-  if (!mapBrowserEvent.map.getView().getHints()[ol.ViewHint.INTERACTING] &&
-      mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE &&
-      !this.handlingDownUpSequence) {
-    this.handlePointerMove_(mapBrowserEvent);
-  }
-  if (this.vertexFeature_ && this.deleteCondition_(mapBrowserEvent)) {
-    if (mapBrowserEvent.type != ol.MapBrowserEventType.SINGLECLICK ||
-        !this.ignoreNextSingleClick_) {
-      handled = this.removePoint();
-    } else {
-      handled = true;
-    }
-  }
-
-  if (mapBrowserEvent.type == ol.MapBrowserEventType.SINGLECLICK) {
-    this.ignoreNextSingleClick_ = false;
-  }
-
-  return ol.interaction.Pointer.handleEvent.call(this, mapBrowserEvent) &&
-      !handled;
-};
-
-
-/**
- * @param {ol.MapBrowserEvent} evt Event.
- * @private
- */
-ol.interaction.Modify.prototype.handlePointerMove_ = function(evt) {
-  this.lastPixel_ = evt.pixel;
-  this.handlePointerAtPixel_(evt.pixel, evt.map);
-};
-
-
-/**
- * @param {ol.Pixel} pixel Pixel
- * @param {ol.Map} map Map.
- * @private
- */
-ol.interaction.Modify.prototype.handlePointerAtPixel_ = function(pixel, map) {
-  var pixelCoordinate = map.getCoordinateFromPixel(pixel);
-  var sortByDistance = function(a, b) {
-    return ol.interaction.Modify.pointDistanceToSegmentDataSquared_(pixelCoordinate, a) -
-        ol.interaction.Modify.pointDistanceToSegmentDataSquared_(pixelCoordinate, b);
-  };
-
-  var box = ol.extent.buffer(
-      ol.extent.createOrUpdateFromCoordinate(pixelCoordinate),
-      map.getView().getResolution() * this.pixelTolerance_);
-
-  var rBush = this.rBush_;
-  var nodes = rBush.getInExtent(box);
-  if (nodes.length > 0) {
-    nodes.sort(sortByDistance);
-    var node = nodes[0];
-    var closestSegment = node.segment;
-    var vertex = ol.interaction.Modify.closestOnSegmentData_(pixelCoordinate, node);
-    var vertexPixel = map.getPixelFromCoordinate(vertex);
-    var dist = ol.coordinate.distance(pixel, vertexPixel);
-    if (dist <= this.pixelTolerance_) {
-      var vertexSegments = {};
-
-      if (node.geometry.getType() === ol.geom.GeometryType.CIRCLE &&
-      node.index === ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX) {
-
-        this.snappedToVertex_ = true;
-        this.createOrUpdateVertexFeature_(vertex);
-      } else {
-        var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);
-        var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);
-        var squaredDist1 = ol.coordinate.squaredDistance(vertexPixel, pixel1);
-        var squaredDist2 = ol.coordinate.squaredDistance(vertexPixel, pixel2);
-        dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));
-        this.snappedToVertex_ = dist <= this.pixelTolerance_;
-        if (this.snappedToVertex_) {
-          vertex = squaredDist1 > squaredDist2 ?
-              closestSegment[1] : closestSegment[0];
-        }
-        this.createOrUpdateVertexFeature_(vertex);
-        var segment;
-        for (var i = 1, ii = nodes.length; i < ii; ++i) {
-          segment = nodes[i].segment;
-          if ((ol.coordinate.equals(closestSegment[0], segment[0]) &&
-              ol.coordinate.equals(closestSegment[1], segment[1]) ||
-              (ol.coordinate.equals(closestSegment[0], segment[1]) &&
-              ol.coordinate.equals(closestSegment[1], segment[0])))) {
-            vertexSegments[ol.getUid(segment)] = true;
-          } else {
-            break;
-          }
-        }
-      }
-
-      vertexSegments[ol.getUid(closestSegment)] = true;
-      this.vertexSegments_ = vertexSegments;
-      return;
-    }
-  }
-  if (this.vertexFeature_) {
-    this.overlay_.getSource().removeFeature(this.vertexFeature_);
-    this.vertexFeature_ = null;
-  }
-};
-
-
-/**
- * Returns the distance from a point to a line segment.
- *
- * @param {ol.Coordinate} pointCoordinates The coordinates of the point from
- *        which to calculate the distance.
- * @param {ol.ModifySegmentDataType} segmentData The object describing the line
- *        segment we are calculating the distance to.
- * @return {number} The square of the distance between a point and a line segment.
- */
-ol.interaction.Modify.pointDistanceToSegmentDataSquared_ = function(pointCoordinates, segmentData) {
-  var geometry = segmentData.geometry;
-
-  if (geometry.getType() === ol.geom.GeometryType.CIRCLE) {
-    var circleGeometry = /** @type {ol.geom.Circle} */ (geometry);
-
-    if (segmentData.index === ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX) {
-      var distanceToCenterSquared =
-            ol.coordinate.squaredDistance(circleGeometry.getCenter(), pointCoordinates);
-      var distanceToCircumference =
-            Math.sqrt(distanceToCenterSquared) - circleGeometry.getRadius();
-      return distanceToCircumference * distanceToCircumference;
-    }
-  }
-  return ol.coordinate.squaredDistanceToSegment(pointCoordinates, segmentData.segment);
-};
-
-/**
- * Returns the point closest to a given line segment.
- *
- * @param {ol.Coordinate} pointCoordinates The point to which a closest point
- *        should be found.
- * @param {ol.ModifySegmentDataType} segmentData The object describing the line
- *        segment which should contain the closest point.
- * @return {ol.Coordinate} The point closest to the specified line segment.
- */
-ol.interaction.Modify.closestOnSegmentData_ = function(pointCoordinates, segmentData) {
-  var geometry = segmentData.geometry;
-
-  if (geometry.getType() === ol.geom.GeometryType.CIRCLE &&
-  segmentData.index === ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX) {
-    return geometry.getClosestPoint(pointCoordinates);
-  }
-  return ol.coordinate.closestOnSegment(pointCoordinates, segmentData.segment);
-};
-
-
-/**
- * @param {ol.ModifySegmentDataType} segmentData Segment data.
- * @param {ol.Coordinate} vertex Vertex.
- * @private
- */
-ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {
-  var segment = segmentData.segment;
-  var feature = segmentData.feature;
-  var geometry = segmentData.geometry;
-  var depth = segmentData.depth;
-  var index = /** @type {number} */ (segmentData.index);
-  var coordinates;
-
-  while (vertex.length < geometry.getStride()) {
-    vertex.push(0);
-  }
-
-  switch (geometry.getType()) {
-    case ol.geom.GeometryType.MULTI_LINE_STRING:
-      coordinates = geometry.getCoordinates();
-      coordinates[depth[0]].splice(index + 1, 0, vertex);
-      break;
-    case ol.geom.GeometryType.POLYGON:
-      coordinates = geometry.getCoordinates();
-      coordinates[depth[0]].splice(index + 1, 0, vertex);
-      break;
-    case ol.geom.GeometryType.MULTI_POLYGON:
-      coordinates = geometry.getCoordinates();
-      coordinates[depth[1]][depth[0]].splice(index + 1, 0, vertex);
-      break;
-    case ol.geom.GeometryType.LINE_STRING:
-      coordinates = geometry.getCoordinates();
-      coordinates.splice(index + 1, 0, vertex);
-      break;
-    default:
-      return;
-  }
-
-  this.setGeometryCoordinates_(geometry, coordinates);
-  var rTree = this.rBush_;
-  rTree.remove(segmentData);
-  this.updateSegmentIndices_(geometry, index, depth, 1);
-  var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
-    segment: [segment[0], vertex],
-    feature: feature,
-    geometry: geometry,
-    depth: depth,
-    index: index
-  });
-  rTree.insert(ol.extent.boundingExtent(newSegmentData.segment),
-      newSegmentData);
-  this.dragSegments_.push([newSegmentData, 1]);
-
-  var newSegmentData2 = /** @type {ol.ModifySegmentDataType} */ ({
-    segment: [vertex, segment[1]],
-    feature: feature,
-    geometry: geometry,
-    depth: depth,
-    index: index + 1
-  });
-  rTree.insert(ol.extent.boundingExtent(newSegmentData2.segment),
-      newSegmentData2);
-  this.dragSegments_.push([newSegmentData2, 0]);
-  this.ignoreNextSingleClick_ = true;
-};
-
-/**
- * Removes the vertex currently being pointed.
- * @return {boolean} True when a vertex was removed.
- * @api
- */
-ol.interaction.Modify.prototype.removePoint = function() {
-  if (this.lastPointerEvent_ && this.lastPointerEvent_.type != ol.MapBrowserEventType.POINTERDRAG) {
-    var evt = this.lastPointerEvent_;
-    this.willModifyFeatures_(evt);
-    this.removeVertex_();
-    this.dispatchEvent(new ol.interaction.Modify.Event(
-        ol.interaction.ModifyEventType.MODIFYEND, this.features_, evt));
-    this.modified_ = false;
-    return true;
-  }
-  return false;
-};
-
-/**
- * Removes a vertex from all matching features.
- * @return {boolean} True when a vertex was removed.
- * @private
- */
-ol.interaction.Modify.prototype.removeVertex_ = function() {
-  var dragSegments = this.dragSegments_;
-  var segmentsByFeature = {};
-  var deleted = false;
-  var component, coordinates, dragSegment, geometry, i, index, left;
-  var newIndex, right, segmentData, uid;
-  for (i = dragSegments.length - 1; i >= 0; --i) {
-    dragSegment = dragSegments[i];
-    segmentData = dragSegment[0];
-    uid = ol.getUid(segmentData.feature);
-    if (segmentData.depth) {
-      // separate feature components
-      uid += '-' + segmentData.depth.join('-');
-    }
-    if (!(uid in segmentsByFeature)) {
-      segmentsByFeature[uid] = {};
-    }
-    if (dragSegment[1] === 0) {
-      segmentsByFeature[uid].right = segmentData;
-      segmentsByFeature[uid].index = segmentData.index;
-    } else if (dragSegment[1] == 1) {
-      segmentsByFeature[uid].left = segmentData;
-      segmentsByFeature[uid].index = segmentData.index + 1;
-    }
-
-  }
-  for (uid in segmentsByFeature) {
-    right = segmentsByFeature[uid].right;
-    left = segmentsByFeature[uid].left;
-    index = segmentsByFeature[uid].index;
-    newIndex = index - 1;
-    if (left !== undefined) {
-      segmentData = left;
-    } else {
-      segmentData = right;
-    }
-    if (newIndex < 0) {
-      newIndex = 0;
-    }
-    geometry = segmentData.geometry;
-    coordinates = geometry.getCoordinates();
-    component = coordinates;
-    deleted = false;
-    switch (geometry.getType()) {
-      case ol.geom.GeometryType.MULTI_LINE_STRING:
-        if (coordinates[segmentData.depth[0]].length > 2) {
-          coordinates[segmentData.depth[0]].splice(index, 1);
-          deleted = true;
-        }
-        break;
-      case ol.geom.GeometryType.LINE_STRING:
-        if (coordinates.length > 2) {
-          coordinates.splice(index, 1);
-          deleted = true;
-        }
-        break;
-      case ol.geom.GeometryType.MULTI_POLYGON:
-        component = component[segmentData.depth[1]];
-        /* falls through */
-      case ol.geom.GeometryType.POLYGON:
-        component = component[segmentData.depth[0]];
-        if (component.length > 4) {
-          if (index == component.length - 1) {
-            index = 0;
-          }
-          component.splice(index, 1);
-          deleted = true;
-          if (index === 0) {
-            // close the ring again
-            component.pop();
-            component.push(component[0]);
-            newIndex = component.length - 1;
-          }
-        }
-        break;
-      default:
-        // pass
-    }
-
-    if (deleted) {
-      this.setGeometryCoordinates_(geometry, coordinates);
-      var segments = [];
-      if (left !== undefined) {
-        this.rBush_.remove(left);
-        segments.push(left.segment[0]);
-      }
-      if (right !== undefined) {
-        this.rBush_.remove(right);
-        segments.push(right.segment[1]);
-      }
-      if (left !== undefined && right !== undefined) {
-        var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
-          depth: segmentData.depth,
-          feature: segmentData.feature,
-          geometry: segmentData.geometry,
-          index: newIndex,
-          segment: segments
-        });
-        this.rBush_.insert(ol.extent.boundingExtent(newSegmentData.segment),
-            newSegmentData);
-      }
-      this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);
-      if (this.vertexFeature_) {
-        this.overlay_.getSource().removeFeature(this.vertexFeature_);
-        this.vertexFeature_ = null;
-      }
-      dragSegments.length = 0;
-    }
-
-  }
-  return deleted;
-};
-
-
-/**
- * @param {ol.geom.SimpleGeometry} geometry Geometry.
- * @param {Array} coordinates Coordinates.
- * @private
- */
-ol.interaction.Modify.prototype.setGeometryCoordinates_ = function(geometry, coordinates) {
-  this.changingFeature_ = true;
-  geometry.setCoordinates(coordinates);
-  this.changingFeature_ = false;
-};
-
-
-/**
- * @param {ol.geom.SimpleGeometry} geometry Geometry.
- * @param {number} index Index.
- * @param {Array.<number>|undefined} depth Depth.
- * @param {number} delta Delta (1 or -1).
- * @private
- */
-ol.interaction.Modify.prototype.updateSegmentIndices_ = function(
-    geometry, index, depth, delta) {
-  this.rBush_.forEachInExtent(geometry.getExtent(), function(segmentDataMatch) {
-    if (segmentDataMatch.geometry === geometry &&
-        (depth === undefined || segmentDataMatch.depth === undefined ||
-        ol.array.equals(segmentDataMatch.depth, depth)) &&
-        segmentDataMatch.index > index) {
-      segmentDataMatch.index += delta;
-    }
-  });
-};
-
-
-/**
- * @return {ol.StyleFunction} Styles.
- */
-ol.interaction.Modify.getDefaultStyleFunction = function() {
-  var style = ol.style.Style.createDefaultEditing();
-  return function(feature, resolution) {
-    return style[ol.geom.GeometryType.POINT];
-  };
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Modify} instances are instances of
- * this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.ModifyEvent}
- * @param {ol.interaction.ModifyEventType} type Type.
- * @param {ol.Collection.<ol.Feature>} features The features modified.
- * @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated
- *     {@link ol.MapBrowserPointerEvent}.
- */
-ol.interaction.Modify.Event = function(type, features, mapBrowserPointerEvent) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The features being modified.
-   * @type {ol.Collection.<ol.Feature>}
-   * @api
-   */
-  this.features = features;
-
-  /**
-   * Associated {@link ol.MapBrowserEvent}.
-   * @type {ol.MapBrowserEvent}
-   * @api
-   */
-  this.mapBrowserEvent = mapBrowserPointerEvent;
-};
-ol.inherits(ol.interaction.Modify.Event, ol.events.Event);
-
-goog.provide('ol.interaction.Select');
-
-goog.require('ol');
-goog.require('ol.CollectionEventType');
-goog.require('ol.array');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.condition');
-goog.require('ol.functions');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.layer.Vector');
-goog.require('ol.obj');
-goog.require('ol.source.Vector');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Interaction for selecting vector features. By default, selected features are
- * styled differently, so this interaction can be used for visual highlighting,
- * as well as selecting features for other actions, such as modification or
- * output. There are three ways of controlling which features are selected:
- * using the browser event as defined by the `condition` and optionally the
- * `toggle`, `add`/`remove`, and `multi` options; a `layers` filter; and a
- * further feature filter using the `filter` option.
- *
- * Selected features are added to an internal unmanaged layer.
- *
- * @constructor
- * @extends {ol.interaction.Interaction}
- * @param {olx.interaction.SelectOptions=} opt_options Options.
- * @fires ol.interaction.Select.Event
- * @api
- */
-ol.interaction.Select = function(opt_options) {
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.Select.handleEvent
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-      options.condition : ol.events.condition.singleClick;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.addCondition_ = options.addCondition ?
-      options.addCondition : ol.events.condition.never;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.removeCondition_ = options.removeCondition ?
-      options.removeCondition : ol.events.condition.never;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.toggleCondition_ = options.toggleCondition ?
-      options.toggleCondition : ol.events.condition.shiftKeyOnly;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.multi_ = options.multi ? options.multi : false;
-
-  /**
-   * @private
-   * @type {ol.SelectFilterFunction}
-   */
-  this.filter_ = options.filter ? options.filter :
-      ol.functions.TRUE;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;
-
-  var featureOverlay = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      useSpatialIndex: false,
-      features: options.features,
-      wrapX: options.wrapX
-    }),
-    style: options.style ? options.style :
-        ol.interaction.Select.getDefaultStyleFunction(),
-    updateWhileAnimating: true,
-    updateWhileInteracting: true
-  });
-
-  /**
-   * @private
-   * @type {ol.layer.Vector}
-   */
-  this.featureOverlay_ = featureOverlay;
-
-  /** @type {function(ol.layer.Layer): boolean} */
-  var layerFilter;
-  if (options.layers) {
-    if (typeof options.layers === 'function') {
-      layerFilter = options.layers;
-    } else {
-      var layers = options.layers;
-      layerFilter = function(layer) {
-        return ol.array.includes(layers, layer);
-      };
-    }
-  } else {
-    layerFilter = ol.functions.TRUE;
-  }
-
-  /**
-   * @private
-   * @type {function(ol.layer.Layer): boolean}
-   */
-  this.layerFilter_ = layerFilter;
-
-  /**
-   * An association between selected feature (key)
-   * and layer (value)
-   * @private
-   * @type {Object.<number, ol.layer.Layer>}
-   */
-  this.featureLayerAssociation_ = {};
-
-  var features = this.featureOverlay_.getSource().getFeaturesCollection();
-  ol.events.listen(features, ol.CollectionEventType.ADD,
-      this.addFeature_, this);
-  ol.events.listen(features, ol.CollectionEventType.REMOVE,
-      this.removeFeature_, this);
-
-};
-ol.inherits(ol.interaction.Select, ol.interaction.Interaction);
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {ol.layer.Layer} layer Layer.
- * @private
- */
-ol.interaction.Select.prototype.addFeatureLayerAssociation_ = function(feature, layer) {
-  var key = ol.getUid(feature);
-  this.featureLayerAssociation_[key] = layer;
-};
-
-
-/**
- * Get the selected features.
- * @return {ol.Collection.<ol.Feature>} Features collection.
- * @api
- */
-ol.interaction.Select.prototype.getFeatures = function() {
-  return this.featureOverlay_.getSource().getFeaturesCollection();
-};
-
-
-/**
- * Returns the Hit-detection tolerance.
- * @returns {number} Hit tolerance in pixels.
- * @api
- */
-ol.interaction.Select.prototype.getHitTolerance = function() {
-  return this.hitTolerance_;
-};
-
-
-/**
- * Returns the associated {@link ol.layer.Vector vectorlayer} of
- * the (last) selected feature. Note that this will not work with any
- * programmatic method like pushing features to
- * {@link ol.interaction.Select#getFeatures collection}.
- * @param {ol.Feature|ol.render.Feature} feature Feature
- * @return {ol.layer.Vector} Layer.
- * @api
- */
-ol.interaction.Select.prototype.getLayer = function(feature) {
-  var key = ol.getUid(feature);
-  return /** @type {ol.layer.Vector} */ (this.featureLayerAssociation_[key]);
-};
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} and may change the
- * selected state of features.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.Select}
- * @api
- */
-ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
-  if (!this.condition_(mapBrowserEvent)) {
-    return true;
-  }
-  var add = this.addCondition_(mapBrowserEvent);
-  var remove = this.removeCondition_(mapBrowserEvent);
-  var toggle = this.toggleCondition_(mapBrowserEvent);
-  var set = !add && !remove && !toggle;
-  var map = mapBrowserEvent.map;
-  var features = this.featureOverlay_.getSource().getFeaturesCollection();
-  var deselected = [];
-  var selected = [];
-  if (set) {
-    // Replace the currently selected feature(s) with the feature(s) at the
-    // pixel, or clear the selected feature(s) if there is no feature at
-    // the pixel.
-    ol.obj.clear(this.featureLayerAssociation_);
-    map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
-      (/**
-         * @param {ol.Feature|ol.render.Feature} feature Feature.
-         * @param {ol.layer.Layer} layer Layer.
-         * @return {boolean|undefined} Continue to iterate over the features.
-         */
-        function(feature, layer) {
-          if (this.filter_(feature, layer)) {
-            selected.push(feature);
-            this.addFeatureLayerAssociation_(feature, layer);
-            return !this.multi_;
-          }
-        }).bind(this), {
-          layerFilter: this.layerFilter_,
-          hitTolerance: this.hitTolerance_
-        });
-    var i;
-    for (i = features.getLength() - 1; i >= 0; --i) {
-      var feature = features.item(i);
-      var index = selected.indexOf(feature);
-      if (index > -1) {
-        // feature is already selected
-        selected.splice(index, 1);
-      } else {
-        features.remove(feature);
-        deselected.push(feature);
-      }
-    }
-    if (selected.length !== 0) {
-      features.extend(selected);
-    }
-  } else {
-    // Modify the currently selected feature(s).
-    map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
-      (/**
-         * @param {ol.Feature|ol.render.Feature} feature Feature.
-         * @param {ol.layer.Layer} layer Layer.
-         * @return {boolean|undefined} Continue to iterate over the features.
-         */
-        function(feature, layer) {
-          if (this.filter_(feature, layer)) {
-            if ((add || toggle) &&
-                !ol.array.includes(features.getArray(), feature)) {
-              selected.push(feature);
-              this.addFeatureLayerAssociation_(feature, layer);
-            } else if ((remove || toggle) &&
-                ol.array.includes(features.getArray(), feature)) {
-              deselected.push(feature);
-              this.removeFeatureLayerAssociation_(feature);
-            }
-            return !this.multi_;
-          }
-        }).bind(this), {
-          layerFilter: this.layerFilter_,
-          hitTolerance: this.hitTolerance_
-        });
-    var j;
-    for (j = deselected.length - 1; j >= 0; --j) {
-      features.remove(deselected[j]);
-    }
-    features.extend(selected);
-  }
-  if (selected.length > 0 || deselected.length > 0) {
-    this.dispatchEvent(
-        new ol.interaction.Select.Event(ol.interaction.Select.EventType_.SELECT,
-            selected, deselected, mapBrowserEvent));
-  }
-  return ol.events.condition.pointerMove(mapBrowserEvent);
-};
-
-
-/**
- * Hit-detection tolerance. Pixels inside the radius around the given position
- * will be checked for features. This only works for the canvas renderer and
- * not for WebGL.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @api
- */
-ol.interaction.Select.prototype.setHitTolerance = function(hitTolerance) {
-  this.hitTolerance_ = hitTolerance;
-};
-
-
-/**
- * Remove the interaction from its current map, if any,  and attach it to a new
- * map, if any. Pass `null` to just remove the interaction from the current map.
- * @param {ol.Map} map Map.
- * @override
- * @api
- */
-ol.interaction.Select.prototype.setMap = function(map) {
-  var currentMap = this.getMap();
-  var selectedFeatures =
-      this.featureOverlay_.getSource().getFeaturesCollection();
-  if (currentMap) {
-    selectedFeatures.forEach(currentMap.unskipFeature, currentMap);
-  }
-  ol.interaction.Interaction.prototype.setMap.call(this, map);
-  this.featureOverlay_.setMap(map);
-  if (map) {
-    selectedFeatures.forEach(map.skipFeature, map);
-  }
-};
-
-
-/**
- * @return {ol.StyleFunction} Styles.
- */
-ol.interaction.Select.getDefaultStyleFunction = function() {
-  var styles = ol.style.Style.createDefaultEditing();
-  ol.array.extend(styles[ol.geom.GeometryType.POLYGON],
-      styles[ol.geom.GeometryType.LINE_STRING]);
-  ol.array.extend(styles[ol.geom.GeometryType.GEOMETRY_COLLECTION],
-      styles[ol.geom.GeometryType.LINE_STRING]);
-
-  return function(feature, resolution) {
-    if (!feature.getGeometry()) {
-      return null;
-    }
-    return styles[feature.getGeometry().getType()];
-  };
-};
-
-
-/**
- * @param {ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Select.prototype.addFeature_ = function(evt) {
-  var map = this.getMap();
-  if (map) {
-    map.skipFeature(/** @type {ol.Feature} */ (evt.element));
-  }
-};
-
-
-/**
- * @param {ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Select.prototype.removeFeature_ = function(evt) {
-  var map = this.getMap();
-  if (map) {
-    map.unskipFeature(/** @type {ol.Feature} */ (evt.element));
-  }
-};
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.interaction.Select.prototype.removeFeatureLayerAssociation_ = function(feature) {
-  var key = ol.getUid(feature);
-  delete this.featureLayerAssociation_[key];
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Select} instances are instances of
- * this type.
- *
- * @param {ol.interaction.Select.EventType_} type The event type.
- * @param {Array.<ol.Feature>} selected Selected features.
- * @param {Array.<ol.Feature>} deselected Deselected features.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Associated
- *     {@link ol.MapBrowserEvent}.
- * @implements {oli.SelectEvent}
- * @extends {ol.events.Event}
- * @constructor
- */
-ol.interaction.Select.Event = function(type, selected, deselected, mapBrowserEvent) {
-  ol.events.Event.call(this, type);
-
-  /**
-   * Selected features array.
-   * @type {Array.<ol.Feature>}
-   * @api
-   */
-  this.selected = selected;
-
-  /**
-   * Deselected features array.
-   * @type {Array.<ol.Feature>}
-   * @api
-   */
-  this.deselected = deselected;
-
-  /**
-   * Associated {@link ol.MapBrowserEvent}.
-   * @type {ol.MapBrowserEvent}
-   * @api
-   */
-  this.mapBrowserEvent = mapBrowserEvent;
-};
-ol.inherits(ol.interaction.Select.Event, ol.events.Event);
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.interaction.Select.EventType_ = {
-  /**
-   * Triggered when feature(s) has been (de)selected.
-   * @event ol.interaction.Select.Event#select
-   * @api
-   */
-  SELECT: 'select'
-};
-
-goog.provide('ol.interaction.Snap');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.CollectionEventType');
-goog.require('ol.coordinate');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.Polygon');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.obj');
-goog.require('ol.source.Vector');
-goog.require('ol.source.VectorEventType');
-goog.require('ol.structs.RBush');
-
-
-/**
- * @classdesc
- * Handles snapping of vector features while modifying or drawing them.  The
- * features can come from a {@link ol.source.Vector} or {@link ol.Collection}
- * Any interaction object that allows the user to interact
- * with the features using the mouse can benefit from the snapping, as long
- * as it is added before.
- *
- * The snap interaction modifies map browser event `coordinate` and `pixel`
- * properties to force the snap to occur to any interaction that them.
- *
- * Example:
- *
- *     var snap = new ol.interaction.Snap({
- *       source: source
- *     });
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.SnapOptions=} opt_options Options.
- * @api
- */
-ol.interaction.Snap = function(opt_options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleEvent: ol.interaction.Snap.handleEvent_,
-    handleDownEvent: ol.functions.TRUE,
-    handleUpEvent: ol.interaction.Snap.handleUpEvent_
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {ol.source.Vector}
-   * @private
-   */
-  this.source_ = options.source ? options.source : null;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.vertex_ = options.vertex !== undefined ? options.vertex : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.edge_ = options.edge !== undefined ? options.edge : true;
-
-  /**
-   * @type {ol.Collection.<ol.Feature>}
-   * @private
-   */
-  this.features_ = options.features ? options.features : null;
-
-  /**
-   * @type {Array.<ol.EventsKey>}
-   * @private
-   */
-  this.featuresListenerKeys_ = [];
-
-  /**
-   * @type {Object.<number, ol.EventsKey>}
-   * @private
-   */
-  this.featureChangeListenerKeys_ = {};
-
-  /**
-   * Extents are preserved so indexed segment can be quickly removed
-   * when its feature geometry changes
-   * @type {Object.<number, ol.Extent>}
-   * @private
-   */
-  this.indexedFeaturesExtents_ = {};
-
-  /**
-   * If a feature geometry changes while a pointer drag|move event occurs, the
-   * feature doesn't get updated right away.  It will be at the next 'pointerup'
-   * event fired.
-   * @type {Object.<number, ol.Feature>}
-   * @private
-   */
-  this.pendingFeatures_ = {};
-
-  /**
-   * Used for distance sorting in sortByDistance_
-   * @type {ol.Coordinate}
-   * @private
-   */
-  this.pixelCoordinate_ = null;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.pixelTolerance_ = options.pixelTolerance !== undefined ?
-      options.pixelTolerance : 10;
-
-  /**
-   * @type {function(ol.SnapSegmentDataType, ol.SnapSegmentDataType): number}
-   * @private
-   */
-  this.sortByDistance_ = ol.interaction.Snap.sortByDistance.bind(this);
-
-
-  /**
-  * Segment RTree for each layer
-  * @type {ol.structs.RBush.<ol.SnapSegmentDataType>}
-  * @private
-  */
-  this.rBush_ = new ol.structs.RBush();
-
-
-  /**
-  * @const
-  * @private
-  * @type {Object.<string, function(ol.Feature, ol.geom.Geometry)>}
-  */
-  this.SEGMENT_WRITERS_ = {
-    'Point': this.writePointGeometry_,
-    'LineString': this.writeLineStringGeometry_,
-    'LinearRing': this.writeLineStringGeometry_,
-    'Polygon': this.writePolygonGeometry_,
-    'MultiPoint': this.writeMultiPointGeometry_,
-    'MultiLineString': this.writeMultiLineStringGeometry_,
-    'MultiPolygon': this.writeMultiPolygonGeometry_,
-    'GeometryCollection': this.writeGeometryCollectionGeometry_,
-    'Circle': this.writeCircleGeometry_
-  };
-};
-ol.inherits(ol.interaction.Snap, ol.interaction.Pointer);
-
-
-/**
- * Add a feature to the collection of features that we may snap to.
- * @param {ol.Feature} feature Feature.
- * @param {boolean=} opt_listen Whether to listen to the feature change or not
- *     Defaults to `true`.
- * @api
- */
-ol.interaction.Snap.prototype.addFeature = function(feature, opt_listen) {
-  var listen = opt_listen !== undefined ? opt_listen : true;
-  var feature_uid = ol.getUid(feature);
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    var segmentWriter = this.SEGMENT_WRITERS_[geometry.getType()];
-    if (segmentWriter) {
-      this.indexedFeaturesExtents_[feature_uid] = geometry.getExtent(
-          ol.extent.createEmpty());
-      segmentWriter.call(this, feature, geometry);
-    }
-  }
-
-  if (listen) {
-    this.featureChangeListenerKeys_[feature_uid] = ol.events.listen(
-        feature,
-        ol.events.EventType.CHANGE,
-        this.handleFeatureChange_, this);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.interaction.Snap.prototype.forEachFeatureAdd_ = function(feature) {
-  this.addFeature(feature);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.interaction.Snap.prototype.forEachFeatureRemove_ = function(feature) {
-  this.removeFeature(feature);
-};
-
-
-/**
- * @return {ol.Collection.<ol.Feature>|Array.<ol.Feature>} Features.
- * @private
- */
-ol.interaction.Snap.prototype.getFeatures_ = function() {
-  var features;
-  if (this.features_) {
-    features = this.features_;
-  } else if (this.source_) {
-    features = this.source_.getFeatures();
-  }
-  return /** @type {!Array.<ol.Feature>|!ol.Collection.<ol.Feature>} */ (features);
-};
-
-
-/**
- * @param {ol.source.Vector.Event|ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Snap.prototype.handleFeatureAdd_ = function(evt) {
-  var feature;
-  if (evt instanceof ol.source.Vector.Event) {
-    feature = evt.feature;
-  } else if (evt instanceof ol.Collection.Event) {
-    feature = evt.element;
-  }
-  this.addFeature(/** @type {ol.Feature} */ (feature));
-};
-
-
-/**
- * @param {ol.source.Vector.Event|ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Snap.prototype.handleFeatureRemove_ = function(evt) {
-  var feature;
-  if (evt instanceof ol.source.Vector.Event) {
-    feature = evt.feature;
-  } else if (evt instanceof ol.Collection.Event) {
-    feature = evt.element;
-  }
-  this.removeFeature(/** @type {ol.Feature} */ (feature));
-};
-
-
-/**
- * @param {ol.events.Event} evt Event.
- * @private
- */
-ol.interaction.Snap.prototype.handleFeatureChange_ = function(evt) {
-  var feature = /** @type {ol.Feature} */ (evt.target);
-  if (this.handlingDownUpSequence) {
-    var uid = ol.getUid(feature);
-    if (!(uid in this.pendingFeatures_)) {
-      this.pendingFeatures_[uid] = feature;
-    }
-  } else {
-    this.updateFeature_(feature);
-  }
-};
-
-
-/**
- * Remove a feature from the collection of features that we may snap to.
- * @param {ol.Feature} feature Feature
- * @param {boolean=} opt_unlisten Whether to unlisten to the feature change
- *     or not. Defaults to `true`.
- * @api
- */
-ol.interaction.Snap.prototype.removeFeature = function(feature, opt_unlisten) {
-  var unlisten = opt_unlisten !== undefined ? opt_unlisten : true;
-  var feature_uid = ol.getUid(feature);
-  var extent = this.indexedFeaturesExtents_[feature_uid];
-  if (extent) {
-    var rBush = this.rBush_;
-    var i, nodesToRemove = [];
-    rBush.forEachInExtent(extent, function(node) {
-      if (feature === node.feature) {
-        nodesToRemove.push(node);
-      }
-    });
-    for (i = nodesToRemove.length - 1; i >= 0; --i) {
-      rBush.remove(nodesToRemove[i]);
-    }
-  }
-
-  if (unlisten) {
-    ol.events.unlistenByKey(this.featureChangeListenerKeys_[feature_uid]);
-    delete this.featureChangeListenerKeys_[feature_uid];
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Snap.prototype.setMap = function(map) {
-  var currentMap = this.getMap();
-  var keys = this.featuresListenerKeys_;
-  var features = this.getFeatures_();
-
-  if (currentMap) {
-    keys.forEach(ol.events.unlistenByKey);
-    keys.length = 0;
-    features.forEach(this.forEachFeatureRemove_, this);
-  }
-  ol.interaction.Pointer.prototype.setMap.call(this, map);
-
-  if (map) {
-    if (this.features_) {
-      keys.push(
-        ol.events.listen(this.features_, ol.CollectionEventType.ADD,
-            this.handleFeatureAdd_, this),
-        ol.events.listen(this.features_, ol.CollectionEventType.REMOVE,
-            this.handleFeatureRemove_, this)
-      );
-    } else if (this.source_) {
-      keys.push(
-        ol.events.listen(this.source_, ol.source.VectorEventType.ADDFEATURE,
-            this.handleFeatureAdd_, this),
-        ol.events.listen(this.source_, ol.source.VectorEventType.REMOVEFEATURE,
-            this.handleFeatureRemove_, this)
-      );
-    }
-    features.forEach(this.forEachFeatureAdd_, this);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Snap.prototype.shouldStopEvent = ol.functions.FALSE;
-
-
-/**
- * @param {ol.Pixel} pixel Pixel
- * @param {ol.Coordinate} pixelCoordinate Coordinate
- * @param {ol.Map} map Map.
- * @return {ol.SnapResultType} Snap result
- */
-ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
-
-  var lowerLeft = map.getCoordinateFromPixel(
-      [pixel[0] - this.pixelTolerance_, pixel[1] + this.pixelTolerance_]);
-  var upperRight = map.getCoordinateFromPixel(
-      [pixel[0] + this.pixelTolerance_, pixel[1] - this.pixelTolerance_]);
-  var box = ol.extent.boundingExtent([lowerLeft, upperRight]);
-
-  var segments = this.rBush_.getInExtent(box);
-
-  // If snapping on vertices only, don't consider circles
-  if (this.vertex_ && !this.edge_) {
-    segments = segments.filter(function(segment) {
-      return segment.feature.getGeometry().getType() !==
-          ol.geom.GeometryType.CIRCLE;
-    });
-  }
-
-  var snappedToVertex = false;
-  var snapped = false;
-  var vertex = null;
-  var vertexPixel = null;
-  var dist, pixel1, pixel2, squaredDist1, squaredDist2;
-  if (segments.length > 0) {
-    this.pixelCoordinate_ = pixelCoordinate;
-    segments.sort(this.sortByDistance_);
-    var closestSegment = segments[0].segment;
-    var isCircle = segments[0].feature.getGeometry().getType() ===
-        ol.geom.GeometryType.CIRCLE;
-    if (this.vertex_ && !this.edge_) {
-      pixel1 = map.getPixelFromCoordinate(closestSegment[0]);
-      pixel2 = map.getPixelFromCoordinate(closestSegment[1]);
-      squaredDist1 = ol.coordinate.squaredDistance(pixel, pixel1);
-      squaredDist2 = ol.coordinate.squaredDistance(pixel, pixel2);
-      dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));
-      snappedToVertex = dist <= this.pixelTolerance_;
-      if (snappedToVertex) {
-        snapped = true;
-        vertex = squaredDist1 > squaredDist2 ?
-            closestSegment[1] : closestSegment[0];
-        vertexPixel = map.getPixelFromCoordinate(vertex);
-      }
-    } else if (this.edge_) {
-      if (isCircle) {
-        vertex = ol.coordinate.closestOnCircle(pixelCoordinate,
-            /** @type {ol.geom.Circle} */ (segments[0].feature.getGeometry()));
-      } else {
-        vertex = (ol.coordinate.closestOnSegment(pixelCoordinate,
-            closestSegment));
-      }
-      vertexPixel = map.getPixelFromCoordinate(vertex);
-      if (ol.coordinate.distance(pixel, vertexPixel) <= this.pixelTolerance_) {
-        snapped = true;
-        if (this.vertex_ && !isCircle) {
-          pixel1 = map.getPixelFromCoordinate(closestSegment[0]);
-          pixel2 = map.getPixelFromCoordinate(closestSegment[1]);
-          squaredDist1 = ol.coordinate.squaredDistance(vertexPixel, pixel1);
-          squaredDist2 = ol.coordinate.squaredDistance(vertexPixel, pixel2);
-          dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));
-          snappedToVertex = dist <= this.pixelTolerance_;
-          if (snappedToVertex) {
-            vertex = squaredDist1 > squaredDist2 ?
-                closestSegment[1] : closestSegment[0];
-            vertexPixel = map.getPixelFromCoordinate(vertex);
-          }
-        }
-      }
-    }
-    if (snapped) {
-      vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])];
-    }
-  }
-  return /** @type {ol.SnapResultType} */ ({
-    snapped: snapped,
-    vertex: vertex,
-    vertexPixel: vertexPixel
-  });
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @private
- */
-ol.interaction.Snap.prototype.updateFeature_ = function(feature) {
-  this.removeFeature(feature, false);
-  this.addFeature(feature, false);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.Circle} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeCircleGeometry_ = function(feature, geometry) {
-  var polygon = ol.geom.Polygon.fromCircle(geometry);
-  var coordinates = polygon.getCoordinates()[0];
-  var i, ii, segment, segmentData;
-  for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-    segment = coordinates.slice(i, i + 2);
-    segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-      feature: feature,
-      segment: segment
-    });
-    this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.GeometryCollection} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
-  var i, geometries = geometry.getGeometriesArray();
-  for (i = 0; i < geometries.length; ++i) {
-    var segmentWriter = this.SEGMENT_WRITERS_[geometries[i].getType()];
-    if (segmentWriter) {
-      segmentWriter.call(this, feature, geometries[i]);
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.LineString} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeLineStringGeometry_ = function(feature, geometry) {
-  var coordinates = geometry.getCoordinates();
-  var i, ii, segment, segmentData;
-  for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-    segment = coordinates.slice(i, i + 2);
-    segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-      feature: feature,
-      segment: segment
-    });
-    this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiLineString} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
-  var lines = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, segment, segmentData;
-  for (j = 0, jj = lines.length; j < jj; ++j) {
-    coordinates = lines[j];
-    for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-      segment = coordinates.slice(i, i + 2);
-      segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-        feature: feature,
-        segment: segment
-      });
-      this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiPoint} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
-  var points = geometry.getCoordinates();
-  var coordinates, i, ii, segmentData;
-  for (i = 0, ii = points.length; i < ii; ++i) {
-    coordinates = points[i];
-    segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-      feature: feature,
-      segment: [coordinates, coordinates]
-    });
-    this.rBush_.insert(geometry.getExtent(), segmentData);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiPolygon} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
-  var polygons = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, k, kk, rings, segment, segmentData;
-  for (k = 0, kk = polygons.length; k < kk; ++k) {
-    rings = polygons[k];
-    for (j = 0, jj = rings.length; j < jj; ++j) {
-      coordinates = rings[j];
-      for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-        segment = coordinates.slice(i, i + 2);
-        segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-          feature: feature,
-          segment: segment
-        });
-        this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-      }
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.Point} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writePointGeometry_ = function(feature, geometry) {
-  var coordinates = geometry.getCoordinates();
-  var segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-    feature: feature,
-    segment: [coordinates, coordinates]
-  });
-  this.rBush_.insert(geometry.getExtent(), segmentData);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.Polygon} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writePolygonGeometry_ = function(feature, geometry) {
-  var rings = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, segment, segmentData;
-  for (j = 0, jj = rings.length; j < jj; ++j) {
-    coordinates = rings[j];
-    for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-      segment = coordinates.slice(i, i + 2);
-      segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-        feature: feature,
-        segment: segment
-      });
-      this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-    }
-  }
-};
-
-
-/**
- * Handle all pointer events events.
- * @param {ol.MapBrowserEvent} evt A move event.
- * @return {boolean} Pass the event to other interactions.
- * @this {ol.interaction.Snap}
- * @private
- */
-ol.interaction.Snap.handleEvent_ = function(evt) {
-  var result = this.snapTo(evt.pixel, evt.coordinate, evt.map);
-  if (result.snapped) {
-    evt.coordinate = result.vertex.slice(0, 2);
-    evt.pixel = result.vertexPixel;
-  }
-  return ol.interaction.Pointer.handleEvent.call(this, evt);
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} evt Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.Snap}
- * @private
- */
-ol.interaction.Snap.handleUpEvent_ = function(evt) {
-  var featuresToUpdate = ol.obj.getValues(this.pendingFeatures_);
-  if (featuresToUpdate.length) {
-    featuresToUpdate.forEach(this.updateFeature_, this);
-    this.pendingFeatures_ = {};
-  }
-  return false;
-};
-
-
-/**
- * Sort segments by distance, helper function
- * @param {ol.SnapSegmentDataType} a The first segment data.
- * @param {ol.SnapSegmentDataType} b The second segment data.
- * @return {number} The difference in distance.
- * @this {ol.interaction.Snap}
- */
-ol.interaction.Snap.sortByDistance = function(a, b) {
-  return ol.coordinate.squaredDistanceToSegment(
-      this.pixelCoordinate_, a.segment) -
-      ol.coordinate.squaredDistanceToSegment(
-      this.pixelCoordinate_, b.segment);
-};
-
-goog.provide('ol.interaction.TranslateEventType');
-
-
-/**
- * @enum {string}
- */
-ol.interaction.TranslateEventType = {
-  /**
-   * Triggered upon feature translation start.
-   * @event ol.interaction.Translate.Event#translatestart
-   * @api
-   */
-  TRANSLATESTART: 'translatestart',
-  /**
-   * Triggered upon feature translation.
-   * @event ol.interaction.Translate.Event#translating
-   * @api
-   */
-  TRANSLATING: 'translating',
-  /**
-   * Triggered upon feature translation end.
-   * @event ol.interaction.Translate.Event#translateend
-   * @api
-   */
-  TRANSLATEEND: 'translateend'
-};
-
-goog.provide('ol.interaction.Translate');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.Object');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.functions');
-goog.require('ol.array');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.interaction.Property');
-goog.require('ol.interaction.TranslateEventType');
-
-
-/**
- * @classdesc
- * Interaction for translating (moving) features.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @fires ol.interaction.Translate.Event
- * @param {olx.interaction.TranslateOptions=} opt_options Options.
- * @api
- */
-ol.interaction.Translate = function(opt_options) {
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.Translate.handleDownEvent_,
-    handleDragEvent: ol.interaction.Translate.handleDragEvent_,
-    handleMoveEvent: ol.interaction.Translate.handleMoveEvent_,
-    handleUpEvent: ol.interaction.Translate.handleUpEvent_
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * The last position we translated to.
-   * @type {ol.Coordinate}
-   * @private
-   */
-  this.lastCoordinate_ = null;
-
-
-  /**
-   * @type {ol.Collection.<ol.Feature>}
-   * @private
-   */
-  this.features_ = options.features !== undefined ? options.features : null;
-
-  /** @type {function(ol.layer.Layer): boolean} */
-  var layerFilter;
-  if (options.layers) {
-    if (typeof options.layers === 'function') {
-      layerFilter = options.layers;
-    } else {
-      var layers = options.layers;
-      layerFilter = function(layer) {
-        return ol.array.includes(layers, layer);
-      };
-    }
-  } else {
-    layerFilter = ol.functions.TRUE;
-  }
-
-  /**
-   * @private
-   * @type {function(ol.layer.Layer): boolean}
-   */
-  this.layerFilter_ = layerFilter;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;
-
-  /**
-   * @type {ol.Feature}
-   * @private
-   */
-  this.lastFeature_ = null;
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.interaction.Property.ACTIVE),
-      this.handleActiveChanged_, this);
-
-};
-ol.inherits(ol.interaction.Translate, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} event Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.Translate}
- * @private
- */
-ol.interaction.Translate.handleDownEvent_ = function(event) {
-  this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map);
-  if (!this.lastCoordinate_ && this.lastFeature_) {
-    this.lastCoordinate_ = event.coordinate;
-    ol.interaction.Translate.handleMoveEvent_.call(this, event);
-
-    var features = this.features_ || new ol.Collection([this.lastFeature_]);
-
-    this.dispatchEvent(
-        new ol.interaction.Translate.Event(
-            ol.interaction.TranslateEventType.TRANSLATESTART, features,
-            event.coordinate));
-    return true;
-  }
-  return false;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} event Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.Translate}
- * @private
- */
-ol.interaction.Translate.handleUpEvent_ = function(event) {
-  if (this.lastCoordinate_) {
-    this.lastCoordinate_ = null;
-    ol.interaction.Translate.handleMoveEvent_.call(this, event);
-
-    var features = this.features_ || new ol.Collection([this.lastFeature_]);
-
-    this.dispatchEvent(
-        new ol.interaction.Translate.Event(
-            ol.interaction.TranslateEventType.TRANSLATEEND, features,
-            event.coordinate));
-    return true;
-  }
-  return false;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} event Event.
- * @this {ol.interaction.Translate}
- * @private
- */
-ol.interaction.Translate.handleDragEvent_ = function(event) {
-  if (this.lastCoordinate_) {
-    var newCoordinate = event.coordinate;
-    var deltaX = newCoordinate[0] - this.lastCoordinate_[0];
-    var deltaY = newCoordinate[1] - this.lastCoordinate_[1];
-
-    var features = this.features_ || new ol.Collection([this.lastFeature_]);
-
-    features.forEach(function(feature) {
-      var geom = feature.getGeometry();
-      geom.translate(deltaX, deltaY);
-      feature.setGeometry(geom);
-    });
-
-    this.lastCoordinate_ = newCoordinate;
-    this.dispatchEvent(
-        new ol.interaction.Translate.Event(
-            ol.interaction.TranslateEventType.TRANSLATING, features,
-            newCoordinate));
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserEvent} event Event.
- * @this {ol.interaction.Translate}
- * @private
- */
-ol.interaction.Translate.handleMoveEvent_ = function(event) {
-  var elem = event.map.getViewport();
-
-  // Change the cursor to grab/grabbing if hovering any of the features managed
-  // by the interaction
-  if (this.featuresAtPixel_(event.pixel, event.map)) {
-    elem.classList.remove(this.lastCoordinate_ ? 'ol-grab' : 'ol-grabbing');
-    elem.classList.add(this.lastCoordinate_ ? 'ol-grabbing' : 'ol-grab');
-  } else {
-    elem.classList.remove('ol-grab', 'ol-grabbing');
-  }
-};
-
-
-/**
- * Tests to see if the given coordinates intersects any of our selected
- * features.
- * @param {ol.Pixel} pixel Pixel coordinate to test for intersection.
- * @param {ol.Map} map Map to test the intersection on.
- * @return {ol.Feature} Returns the feature found at the specified pixel
- * coordinates.
- * @private
- */
-ol.interaction.Translate.prototype.featuresAtPixel_ = function(pixel, map) {
-  return map.forEachFeatureAtPixel(pixel,
-      function(feature) {
-        if (!this.features_ ||
-            ol.array.includes(this.features_.getArray(), feature)) {
-          return feature;
-        }
-      }.bind(this), {
-        layerFilter: this.layerFilter_,
-        hitTolerance: this.hitTolerance_
-      });
-};
-
-
-/**
- * Returns the Hit-detection tolerance.
- * @returns {number} Hit tolerance in pixels.
- * @api
- */
-ol.interaction.Translate.prototype.getHitTolerance = function() {
-  return this.hitTolerance_;
-};
-
-
-/**
- * Hit-detection tolerance. Pixels inside the radius around the given position
- * will be checked for features. This only works for the canvas renderer and
- * not for WebGL.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @api
- */
-ol.interaction.Translate.prototype.setHitTolerance = function(hitTolerance) {
-  this.hitTolerance_ = hitTolerance;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Translate.prototype.setMap = function(map) {
-  var oldMap = this.getMap();
-  ol.interaction.Pointer.prototype.setMap.call(this, map);
-  this.updateState_(oldMap);
-};
-
-
-/**
- * @private
- */
-ol.interaction.Translate.prototype.handleActiveChanged_ = function() {
-  this.updateState_(null);
-};
-
-
-/**
- * @param {ol.Map} oldMap Old map.
- * @private
- */
-ol.interaction.Translate.prototype.updateState_ = function(oldMap) {
-  var map = this.getMap();
-  var active = this.getActive();
-  if ((!map || !active)) {
-    if (!map) {
-      map = oldMap;
-    }
-
-    var elem = map.getViewport();
-    elem.classList.remove('ol-grab', 'ol-grabbing');
-  }
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Translate} instances are instances of
- * this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.interaction.TranslateEvent}
- * @param {ol.interaction.TranslateEventType} type Type.
- * @param {ol.Collection.<ol.Feature>} features The features translated.
- * @param {ol.Coordinate} coordinate The event coordinate.
- */
-ol.interaction.Translate.Event = function(type, features, coordinate) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The features being translated.
-   * @type {ol.Collection.<ol.Feature>}
-   * @api
-   */
-  this.features = features;
-
-  /**
-   * The coordinate of the drag event.
-   * @const
-   * @type {ol.Coordinate}
-   * @api
-   */
-  this.coordinate = coordinate;
-};
-ol.inherits(ol.interaction.Translate.Event, ol.events.Event);
-
-goog.provide('ol.layer.Heatmap');
-
-goog.require('ol.events');
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.dom');
-goog.require('ol.layer.Vector');
-goog.require('ol.math');
-goog.require('ol.obj');
-goog.require('ol.render.EventType');
-goog.require('ol.style.Icon');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Layer for rendering vector data as a heatmap.
- * Note that any property set in the options is set as a {@link ol.Object}
- * property on the layer object; for example, setting `title: 'My Title'` in the
- * options means that `title` is observable, and has get/set accessors.
- *
- * @constructor
- * @extends {ol.layer.Vector}
- * @fires ol.render.Event
- * @param {olx.layer.HeatmapOptions=} opt_options Options.
- * @api
- */
-ol.layer.Heatmap = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  var baseOptions = ol.obj.assign({}, options);
-
-  delete baseOptions.gradient;
-  delete baseOptions.radius;
-  delete baseOptions.blur;
-  delete baseOptions.shadow;
-  delete baseOptions.weight;
-  ol.layer.Vector.call(this, /** @type {olx.layer.VectorOptions} */ (baseOptions));
-
-  /**
-   * @private
-   * @type {Uint8ClampedArray}
-   */
-  this.gradient_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.shadow_ = options.shadow !== undefined ? options.shadow : 250;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.circleImage_ = undefined;
-
-  /**
-   * @private
-   * @type {Array.<Array.<ol.style.Style>>}
-   */
-  this.styleCache_ = null;
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.layer.Heatmap.Property_.GRADIENT),
-      this.handleGradientChanged_, this);
-
-  this.setGradient(options.gradient ?
-      options.gradient : ol.layer.Heatmap.DEFAULT_GRADIENT);
-
-  this.setBlur(options.blur !== undefined ? options.blur : 15);
-
-  this.setRadius(options.radius !== undefined ? options.radius : 8);
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.layer.Heatmap.Property_.BLUR),
-      this.handleStyleChanged_, this);
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.layer.Heatmap.Property_.RADIUS),
-      this.handleStyleChanged_, this);
-
-  this.handleStyleChanged_();
-
-  var weight = options.weight ? options.weight : 'weight';
-  var weightFunction;
-  if (typeof weight === 'string') {
-    weightFunction = function(feature) {
-      return feature.get(weight);
-    };
-  } else {
-    weightFunction = weight;
-  }
-
-  this.setStyle(function(feature, resolution) {
-    var weight = weightFunction(feature);
-    var opacity = weight !== undefined ? ol.math.clamp(weight, 0, 1) : 1;
-    // cast to 8 bits
-    var index = (255 * opacity) | 0;
-    var style = this.styleCache_[index];
-    if (!style) {
-      style = [
-        new ol.style.Style({
-          image: new ol.style.Icon({
-            opacity: opacity,
-            src: this.circleImage_
-          })
-        })
-      ];
-      this.styleCache_[index] = style;
-    }
-    return style;
-  }.bind(this));
-
-  // For performance reasons, don't sort the features before rendering.
-  // The render order is not relevant for a heatmap representation.
-  this.setRenderOrder(null);
-
-  ol.events.listen(this, ol.render.EventType.RENDER, this.handleRender_, this);
-};
-ol.inherits(ol.layer.Heatmap, ol.layer.Vector);
-
-
-/**
- * @const
- * @type {Array.<string>}
- */
-ol.layer.Heatmap.DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
-
-
-/**
- * @param {Array.<string>} colors A list of colored.
- * @return {Uint8ClampedArray} An array.
- * @private
- */
-ol.layer.Heatmap.createGradient_ = function(colors) {
-  var width = 1;
-  var height = 256;
-  var context = ol.dom.createCanvasContext2D(width, height);
-
-  var gradient = context.createLinearGradient(0, 0, width, height);
-  var step = 1 / (colors.length - 1);
-  for (var i = 0, ii = colors.length; i < ii; ++i) {
-    gradient.addColorStop(i * step, colors[i]);
-  }
-
-  context.fillStyle = gradient;
-  context.fillRect(0, 0, width, height);
-
-  return context.getImageData(0, 0, width, height).data;
-};
-
-
-/**
- * @return {string} Data URL for a circle.
- * @private
- */
-ol.layer.Heatmap.prototype.createCircle_ = function() {
-  var radius = this.getRadius();
-  var blur = this.getBlur();
-  var halfSize = radius + blur + 1;
-  var size = 2 * halfSize;
-  var context = ol.dom.createCanvasContext2D(size, size);
-  context.shadowOffsetX = context.shadowOffsetY = this.shadow_;
-  context.shadowBlur = blur;
-  context.shadowColor = '#000';
-  context.beginPath();
-  var center = halfSize - this.shadow_;
-  context.arc(center, center, radius, 0, Math.PI * 2, true);
-  context.fill();
-  return context.canvas.toDataURL();
-};
-
-
-/**
- * Return the blur size in pixels.
- * @return {number} Blur size in pixels.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.getBlur = function() {
-  return /** @type {number} */ (this.get(ol.layer.Heatmap.Property_.BLUR));
-};
-
-
-/**
- * Return the gradient colors as array of strings.
- * @return {Array.<string>} Colors.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.getGradient = function() {
-  return /** @type {Array.<string>} */ (
-      this.get(ol.layer.Heatmap.Property_.GRADIENT));
-};
-
-
-/**
- * Return the size of the radius in pixels.
- * @return {number} Radius size in pixel.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.getRadius = function() {
-  return /** @type {number} */ (this.get(ol.layer.Heatmap.Property_.RADIUS));
-};
-
-
-/**
- * @private
- */
-ol.layer.Heatmap.prototype.handleGradientChanged_ = function() {
-  this.gradient_ = ol.layer.Heatmap.createGradient_(this.getGradient());
-};
-
-
-/**
- * @private
- */
-ol.layer.Heatmap.prototype.handleStyleChanged_ = function() {
-  this.circleImage_ = this.createCircle_();
-  this.styleCache_ = new Array(256);
-  this.changed();
-};
-
-
-/**
- * @param {ol.render.Event} event Post compose event
- * @private
- */
-ol.layer.Heatmap.prototype.handleRender_ = function(event) {
-  var context = event.context;
-  var canvas = context.canvas;
-  var image = context.getImageData(0, 0, canvas.width, canvas.height);
-  var view8 = image.data;
-  var i, ii, alpha;
-  for (i = 0, ii = view8.length; i < ii; i += 4) {
-    alpha = view8[i + 3] * 4;
-    if (alpha) {
-      view8[i] = this.gradient_[alpha];
-      view8[i + 1] = this.gradient_[alpha + 1];
-      view8[i + 2] = this.gradient_[alpha + 2];
-    }
-  }
-  context.putImageData(image, 0, 0);
-};
-
-
-/**
- * Set the blur size in pixels.
- * @param {number} blur Blur size in pixels.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.setBlur = function(blur) {
-  this.set(ol.layer.Heatmap.Property_.BLUR, blur);
-};
-
-
-/**
- * Set the gradient colors as array of strings.
- * @param {Array.<string>} colors Gradient.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.setGradient = function(colors) {
-  this.set(ol.layer.Heatmap.Property_.GRADIENT, colors);
-};
-
-
-/**
- * Set the size of the radius in pixels.
- * @param {number} radius Radius size in pixel.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.setRadius = function(radius) {
-  this.set(ol.layer.Heatmap.Property_.RADIUS, radius);
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.layer.Heatmap.Property_ = {
-  BLUR: 'blur',
-  GRADIENT: 'gradient',
-  RADIUS: 'radius'
-};
-
-goog.provide('ol.renderer.canvas.IntermediateCanvas');
-
-goog.require('ol');
-goog.require('ol.coordinate');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.renderer.canvas.Layer');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.renderer.canvas.Layer}
- * @param {ol.layer.Layer} layer Layer.
- */
-ol.renderer.canvas.IntermediateCanvas = function(layer) {
-
-  ol.renderer.canvas.Layer.call(this, layer);
-
-  /**
-   * @protected
-   * @type {ol.Transform}
-   */
-  this.coordinateToCanvasPixelTransform = ol.transform.create();
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.hitCanvasContext_ = null;
-
-};
-ol.inherits(ol.renderer.canvas.IntermediateCanvas, ol.renderer.canvas.Layer);
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.IntermediateCanvas.prototype.composeFrame = function(frameState, layerState, context) {
-
-  this.preCompose(context, frameState);
-
-  var image = this.getImage();
-  if (image) {
-
-    // clipped rendering if layer extent is set
-    var extent = layerState.extent;
-    var clipped = extent !== undefined &&
-        !ol.extent.containsExtent(extent, frameState.extent) &&
-        ol.extent.intersects(extent, frameState.extent);
-    if (clipped) {
-      this.clip(context, frameState, /** @type {ol.Extent} */ (extent));
-    }
-
-    var imageTransform = this.getImageTransform();
-    // for performance reasons, context.save / context.restore is not used
-    // to save and restore the transformation matrix and the opacity.
-    // see http://jsperf.com/context-save-restore-versus-variable
-    var alpha = context.globalAlpha;
-    context.globalAlpha = layerState.opacity;
-
-    // for performance reasons, context.setTransform is only used
-    // when the view is rotated. see http://jsperf.com/canvas-transform
-    var dx = imageTransform[4];
-    var dy = imageTransform[5];
-    var dw = image.width * imageTransform[0];
-    var dh = image.height * imageTransform[3];
-    context.drawImage(image, 0, 0, +image.width, +image.height,
-        Math.round(dx), Math.round(dy), Math.round(dw), Math.round(dh));
-    context.globalAlpha = alpha;
-
-    if (clipped) {
-      context.restore();
-    }
-  }
-
-  this.postCompose(context, frameState, layerState);
-};
-
-
-/**
- * @abstract
- * @return {HTMLCanvasElement|HTMLVideoElement|Image} Canvas.
- */
-ol.renderer.canvas.IntermediateCanvas.prototype.getImage = function() {};
-
-
-/**
- * @abstract
- * @return {!ol.Transform} Image transform.
- */
-ol.renderer.canvas.IntermediateCanvas.prototype.getImageTransform = function() {};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.IntermediateCanvas.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-  var layer = this.getLayer();
-  var source = layer.getSource();
-  var resolution = frameState.viewState.resolution;
-  var rotation = frameState.viewState.rotation;
-  var skippedFeatureUids = frameState.skippedFeatureUids;
-  return source.forEachFeatureAtCoordinate(
-      coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
-      /**
-       * @param {ol.Feature|ol.render.Feature} feature Feature.
-       * @return {?} Callback result.
-       */
-      function(feature) {
-        return callback.call(thisArg, feature, layer);
-      });
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.IntermediateCanvas.prototype.forEachLayerAtCoordinate = function(coordinate, frameState, callback, thisArg) {
-  if (!this.getImage()) {
-    return undefined;
-  }
-
-  if (this.getLayer().getSource().forEachFeatureAtCoordinate !== ol.nullFunction) {
-    // for ImageVector sources use the original hit-detection logic,
-    // so that for example also transparent polygons are detected
-    return ol.renderer.canvas.Layer.prototype.forEachLayerAtCoordinate.apply(this, arguments);
-  } else {
-    var pixel = ol.transform.apply(this.coordinateToCanvasPixelTransform, coordinate.slice());
-    ol.coordinate.scale(pixel, frameState.viewState.resolution / this.renderedResolution);
-
-    if (!this.hitCanvasContext_) {
-      this.hitCanvasContext_ = ol.dom.createCanvasContext2D(1, 1);
-    }
-
-    this.hitCanvasContext_.clearRect(0, 0, 1, 1);
-    this.hitCanvasContext_.drawImage(this.getImage(), pixel[0], pixel[1], 1, 1, 0, 0, 1, 1);
-
-    var imageData = this.hitCanvasContext_.getImageData(0, 0, 1, 1).data;
-    if (imageData[3] > 0) {
-      return callback.call(thisArg, this.getLayer(),  imageData);
-    } else {
-      return undefined;
-    }
-  }
-};
-
-goog.provide('ol.renderer.canvas.ImageLayer');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.extent');
-goog.require('ol.renderer.canvas.IntermediateCanvas');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.canvas.IntermediateCanvas}
- * @param {ol.layer.Image} imageLayer Single image layer.
- */
-ol.renderer.canvas.ImageLayer = function(imageLayer) {
-
-  ol.renderer.canvas.IntermediateCanvas.call(this, imageLayer);
-
-  /**
-   * @private
-   * @type {?ol.ImageBase}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.imageTransform_ = ol.transform.create();
-
-};
-ol.inherits(ol.renderer.canvas.ImageLayer, ol.renderer.canvas.IntermediateCanvas);
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.ImageLayer.prototype.getImage = function() {
-  return !this.image_ ? null : this.image_.getImage();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.ImageLayer.prototype.getImageTransform = function() {
-  return this.imageTransform_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.ImageLayer.prototype.prepareFrame = function(frameState, layerState) {
-
-  var pixelRatio = frameState.pixelRatio;
-  var size = frameState.size;
-  var viewState = frameState.viewState;
-  var viewCenter = viewState.center;
-  var viewResolution = viewState.resolution;
-
-  var image;
-  var imageLayer = /** @type {ol.layer.Image} */ (this.getLayer());
-  var imageSource = imageLayer.getSource();
-
-  var hints = frameState.viewHints;
-
-  var renderedExtent = frameState.extent;
-  if (layerState.extent !== undefined) {
-    renderedExtent = ol.extent.getIntersection(
-        renderedExtent, layerState.extent);
-  }
-
-  if (!hints[ol.ViewHint.ANIMATING] && !hints[ol.ViewHint.INTERACTING] &&
-      !ol.extent.isEmpty(renderedExtent)) {
-    var projection = viewState.projection;
-    if (!ol.ENABLE_RASTER_REPROJECTION) {
-      var sourceProjection = imageSource.getProjection();
-      if (sourceProjection) {
-        projection = sourceProjection;
-      }
-    }
-    image = imageSource.getImage(
-        renderedExtent, viewResolution, pixelRatio, projection);
-    if (image) {
-      var loaded = this.loadImage(image);
-      if (loaded) {
-        this.image_ = image;
-      }
-    }
-  }
-
-  if (this.image_) {
-    image = this.image_;
-    var imageExtent = image.getExtent();
-    var imageResolution = image.getResolution();
-    var imagePixelRatio = image.getPixelRatio();
-    var scale = pixelRatio * imageResolution /
-        (viewResolution * imagePixelRatio);
-    var transform = ol.transform.compose(this.imageTransform_,
-        pixelRatio * size[0] / 2, pixelRatio * size[1] / 2,
-        scale, scale,
-        0,
-        imagePixelRatio * (imageExtent[0] - viewCenter[0]) / imageResolution,
-        imagePixelRatio * (viewCenter[1] - imageExtent[3]) / imageResolution);
-    ol.transform.compose(this.coordinateToCanvasPixelTransform,
-        pixelRatio * size[0] / 2 - transform[4], pixelRatio * size[1] / 2 - transform[5],
-        pixelRatio / viewResolution, -pixelRatio / viewResolution,
-        0,
-        -viewCenter[0], -viewCenter[1]);
-
-    this.updateAttributions(frameState.attributions, image.getAttributions());
-    this.updateLogos(frameState, imageSource);
-    this.renderedResolution = viewResolution * pixelRatio / imagePixelRatio;
-  }
-
-  return !!this.image_;
-};
-
-goog.provide('ol.reproj');
-
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.proj');
-
-
-/**
- * Calculates ideal resolution to use from the source in order to achieve
- * pixel mapping as close as possible to 1:1 during reprojection.
- * The resolution is calculated regardless of what resolutions
- * are actually available in the dataset (TileGrid, Image, ...).
- *
- * @param {ol.proj.Projection} sourceProj Source projection.
- * @param {ol.proj.Projection} targetProj Target projection.
- * @param {ol.Coordinate} targetCenter Target center.
- * @param {number} targetResolution Target resolution.
- * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.
- */
-ol.reproj.calculateSourceResolution = function(sourceProj, targetProj,
-    targetCenter, targetResolution) {
-
-  var sourceCenter = ol.proj.transform(targetCenter, targetProj, sourceProj);
-
-  // calculate the ideal resolution of the source data
-  var sourceResolution =
-      ol.proj.getPointResolution(targetProj, targetResolution, targetCenter);
-
-  var targetMetersPerUnit = targetProj.getMetersPerUnit();
-  if (targetMetersPerUnit !== undefined) {
-    sourceResolution *= targetMetersPerUnit;
-  }
-  var sourceMetersPerUnit = sourceProj.getMetersPerUnit();
-  if (sourceMetersPerUnit !== undefined) {
-    sourceResolution /= sourceMetersPerUnit;
-  }
-
-  // Based on the projection properties, the point resolution at the specified
-  // coordinates may be slightly different. We need to reverse-compensate this
-  // in order to achieve optimal results.
-
-  var compensationFactor =
-      ol.proj.getPointResolution(sourceProj, sourceResolution, sourceCenter) /
-      sourceResolution;
-
-  if (isFinite(compensationFactor) && compensationFactor > 0) {
-    sourceResolution /= compensationFactor;
-  }
-
-  return sourceResolution;
-};
-
-
-/**
- * Enlarge the clipping triangle point by 1 pixel to ensure the edges overlap
- * in order to mask gaps caused by antialiasing.
- *
- * @param {number} centroidX Centroid of the triangle (x coordinate in pixels).
- * @param {number} centroidY Centroid of the triangle (y coordinate in pixels).
- * @param {number} x X coordinate of the point (in pixels).
- * @param {number} y Y coordinate of the point (in pixels).
- * @return {ol.Coordinate} New point 1 px farther from the centroid.
- * @private
- */
-ol.reproj.enlargeClipPoint_ = function(centroidX, centroidY, x, y) {
-  var dX = x - centroidX, dY = y - centroidY;
-  var distance = Math.sqrt(dX * dX + dY * dY);
-  return [Math.round(x + dX / distance), Math.round(y + dY / distance)];
-};
-
-
-/**
- * Renders the source data into new canvas based on the triangulation.
- *
- * @param {number} width Width of the canvas.
- * @param {number} height Height of the canvas.
- * @param {number} pixelRatio Pixel ratio.
- * @param {number} sourceResolution Source resolution.
- * @param {ol.Extent} sourceExtent Extent of the data source.
- * @param {number} targetResolution Target resolution.
- * @param {ol.Extent} targetExtent Target extent.
- * @param {ol.reproj.Triangulation} triangulation Calculated triangulation.
- * @param {Array.<{extent: ol.Extent,
- *                 image: (HTMLCanvasElement|Image|HTMLVideoElement)}>} sources
- *             Array of sources.
- * @param {number} gutter Gutter of the sources.
- * @param {boolean=} opt_renderEdges Render reprojection edges.
- * @return {HTMLCanvasElement} Canvas with reprojected data.
- */
-ol.reproj.render = function(width, height, pixelRatio,
-    sourceResolution, sourceExtent, targetResolution, targetExtent,
-    triangulation, sources, gutter, opt_renderEdges) {
-
-  var context = ol.dom.createCanvasContext2D(Math.round(pixelRatio * width),
-                                             Math.round(pixelRatio * height));
-
-  if (sources.length === 0) {
-    return context.canvas;
-  }
-
-  context.scale(pixelRatio, pixelRatio);
-
-  var sourceDataExtent = ol.extent.createEmpty();
-  sources.forEach(function(src, i, arr) {
-    ol.extent.extend(sourceDataExtent, src.extent);
-  });
-
-  var canvasWidthInUnits = ol.extent.getWidth(sourceDataExtent);
-  var canvasHeightInUnits = ol.extent.getHeight(sourceDataExtent);
-  var stitchContext = ol.dom.createCanvasContext2D(
-      Math.round(pixelRatio * canvasWidthInUnits / sourceResolution),
-      Math.round(pixelRatio * canvasHeightInUnits / sourceResolution));
-
-  var stitchScale = pixelRatio / sourceResolution;
-
-  sources.forEach(function(src, i, arr) {
-    var xPos = src.extent[0] - sourceDataExtent[0];
-    var yPos = -(src.extent[3] - sourceDataExtent[3]);
-    var srcWidth = ol.extent.getWidth(src.extent);
-    var srcHeight = ol.extent.getHeight(src.extent);
-
-    stitchContext.drawImage(
-        src.image,
-        gutter, gutter,
-        src.image.width - 2 * gutter, src.image.height - 2 * gutter,
-        xPos * stitchScale, yPos * stitchScale,
-        srcWidth * stitchScale, srcHeight * stitchScale);
-  });
-
-  var targetTopLeft = ol.extent.getTopLeft(targetExtent);
-
-  triangulation.getTriangles().forEach(function(triangle, i, arr) {
-    /* Calculate affine transform (src -> dst)
-     * Resulting matrix can be used to transform coordinate
-     * from `sourceProjection` to destination pixels.
-     *
-     * To optimize number of context calls and increase numerical stability,
-     * we also do the following operations:
-     * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)
-     * here before solving the linear system so [ui, vi] are pixel coordinates.
-     *
-     * Src points: xi, yi
-     * Dst points: ui, vi
-     * Affine coefficients: aij
-     *
-     * | x0 y0 1  0  0 0 |   |a00|   |u0|
-     * | x1 y1 1  0  0 0 |   |a01|   |u1|
-     * | x2 y2 1  0  0 0 | x |a02| = |u2|
-     * |  0  0 0 x0 y0 1 |   |a10|   |v0|
-     * |  0  0 0 x1 y1 1 |   |a11|   |v1|
-     * |  0  0 0 x2 y2 1 |   |a12|   |v2|
-     */
-    var source = triangle.source, target = triangle.target;
-    var x0 = source[0][0], y0 = source[0][1],
-        x1 = source[1][0], y1 = source[1][1],
-        x2 = source[2][0], y2 = source[2][1];
-    var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution,
-        v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;
-    var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution,
-        v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;
-    var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution,
-        v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;
-
-    // Shift all the source points to improve numerical stability
-    // of all the subsequent calculations. The [x0, y0] is used here.
-    // This is also used to simplify the linear system.
-    var sourceNumericalShiftX = x0, sourceNumericalShiftY = y0;
-    x0 = 0;
-    y0 = 0;
-    x1 -= sourceNumericalShiftX;
-    y1 -= sourceNumericalShiftY;
-    x2 -= sourceNumericalShiftX;
-    y2 -= sourceNumericalShiftY;
-
-    var augmentedMatrix = [
-      [x1, y1, 0, 0, u1 - u0],
-      [x2, y2, 0, 0, u2 - u0],
-      [0, 0, x1, y1, v1 - v0],
-      [0, 0, x2, y2, v2 - v0]
-    ];
-    var affineCoefs = ol.math.solveLinearSystem(augmentedMatrix);
-    if (!affineCoefs) {
-      return;
-    }
-
-    context.save();
-    context.beginPath();
-    var centroidX = (u0 + u1 + u2) / 3, centroidY = (v0 + v1 + v2) / 3;
-    var p0 = ol.reproj.enlargeClipPoint_(centroidX, centroidY, u0, v0);
-    var p1 = ol.reproj.enlargeClipPoint_(centroidX, centroidY, u1, v1);
-    var p2 = ol.reproj.enlargeClipPoint_(centroidX, centroidY, u2, v2);
-
-    context.moveTo(p1[0], p1[1]);
-    context.lineTo(p0[0], p0[1]);
-    context.lineTo(p2[0], p2[1]);
-    context.clip();
-
-    context.transform(
-        affineCoefs[0], affineCoefs[2], affineCoefs[1], affineCoefs[3], u0, v0);
-
-    context.translate(sourceDataExtent[0] - sourceNumericalShiftX,
-                      sourceDataExtent[3] - sourceNumericalShiftY);
-
-    context.scale(sourceResolution / pixelRatio,
-                  -sourceResolution / pixelRatio);
-
-    context.drawImage(stitchContext.canvas, 0, 0);
-    context.restore();
-  });
-
-  if (opt_renderEdges) {
-    context.save();
-
-    context.strokeStyle = 'black';
-    context.lineWidth = 1;
-
-    triangulation.getTriangles().forEach(function(triangle, i, arr) {
-      var target = triangle.target;
-      var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution,
-          v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;
-      var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution,
-          v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;
-      var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution,
-          v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;
-
-      context.beginPath();
-      context.moveTo(u1, v1);
-      context.lineTo(u0, v0);
-      context.lineTo(u2, v2);
-      context.closePath();
-      context.stroke();
-    });
-
-    context.restore();
-  }
-  return context.canvas;
-};
-
-goog.provide('ol.reproj.Triangulation');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Class containing triangulation of the given target extent.
- * Used for determining source data and the reprojection itself.
- *
- * @param {ol.proj.Projection} sourceProj Source projection.
- * @param {ol.proj.Projection} targetProj Target projection.
- * @param {ol.Extent} targetExtent Target extent to triangulate.
- * @param {ol.Extent} maxSourceExtent Maximal source extent that can be used.
- * @param {number} errorThreshold Acceptable error (in source units).
- * @constructor
- */
-ol.reproj.Triangulation = function(sourceProj, targetProj, targetExtent,
-    maxSourceExtent, errorThreshold) {
-
-  /**
-   * @type {ol.proj.Projection}
-   * @private
-   */
-  this.sourceProj_ = sourceProj;
-
-  /**
-   * @type {ol.proj.Projection}
-   * @private
-   */
-  this.targetProj_ = targetProj;
-
-  /** @type {!Object.<string, ol.Coordinate>} */
-  var transformInvCache = {};
-  var transformInv = ol.proj.getTransform(this.targetProj_, this.sourceProj_);
-
-  /**
-   * @param {ol.Coordinate} c A coordinate.
-   * @return {ol.Coordinate} Transformed coordinate.
-   * @private
-   */
-  this.transformInv_ = function(c) {
-    var key = c[0] + '/' + c[1];
-    if (!transformInvCache[key]) {
-      transformInvCache[key] = transformInv(c);
-    }
-    return transformInvCache[key];
-  };
-
-  /**
-   * @type {ol.Extent}
-   * @private
-   */
-  this.maxSourceExtent_ = maxSourceExtent;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.errorThresholdSquared_ = errorThreshold * errorThreshold;
-
-  /**
-   * @type {Array.<ol.ReprojTriangle>}
-   * @private
-   */
-  this.triangles_ = [];
-
-  /**
-   * Indicates that the triangulation crosses edge of the source projection.
-   * @type {boolean}
-   * @private
-   */
-  this.wrapsXInSource_ = false;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.canWrapXInSource_ = this.sourceProj_.canWrapX() &&
-      !!maxSourceExtent &&
-      !!this.sourceProj_.getExtent() &&
-      (ol.extent.getWidth(maxSourceExtent) ==
-       ol.extent.getWidth(this.sourceProj_.getExtent()));
-
-  /**
-   * @type {?number}
-   * @private
-   */
-  this.sourceWorldWidth_ = this.sourceProj_.getExtent() ?
-      ol.extent.getWidth(this.sourceProj_.getExtent()) : null;
-
-  /**
-   * @type {?number}
-   * @private
-   */
-  this.targetWorldWidth_ = this.targetProj_.getExtent() ?
-      ol.extent.getWidth(this.targetProj_.getExtent()) : null;
-
-  var destinationTopLeft = ol.extent.getTopLeft(targetExtent);
-  var destinationTopRight = ol.extent.getTopRight(targetExtent);
-  var destinationBottomRight = ol.extent.getBottomRight(targetExtent);
-  var destinationBottomLeft = ol.extent.getBottomLeft(targetExtent);
-  var sourceTopLeft = this.transformInv_(destinationTopLeft);
-  var sourceTopRight = this.transformInv_(destinationTopRight);
-  var sourceBottomRight = this.transformInv_(destinationBottomRight);
-  var sourceBottomLeft = this.transformInv_(destinationBottomLeft);
-
-  this.addQuad_(
-      destinationTopLeft, destinationTopRight,
-      destinationBottomRight, destinationBottomLeft,
-      sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft,
-      ol.RASTER_REPROJECTION_MAX_SUBDIVISION);
-
-  if (this.wrapsXInSource_) {
-    var leftBound = Infinity;
-    this.triangles_.forEach(function(triangle, i, arr) {
-      leftBound = Math.min(leftBound,
-          triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]);
-    });
-
-    // Shift triangles to be as close to `leftBound` as possible
-    // (if the distance is more than `worldWidth / 2` it can be closer.
-    this.triangles_.forEach(function(triangle) {
-      if (Math.max(triangle.source[0][0], triangle.source[1][0],
-          triangle.source[2][0]) - leftBound > this.sourceWorldWidth_ / 2) {
-        var newTriangle = [[triangle.source[0][0], triangle.source[0][1]],
-                           [triangle.source[1][0], triangle.source[1][1]],
-                           [triangle.source[2][0], triangle.source[2][1]]];
-        if ((newTriangle[0][0] - leftBound) > this.sourceWorldWidth_ / 2) {
-          newTriangle[0][0] -= this.sourceWorldWidth_;
-        }
-        if ((newTriangle[1][0] - leftBound) > this.sourceWorldWidth_ / 2) {
-          newTriangle[1][0] -= this.sourceWorldWidth_;
-        }
-        if ((newTriangle[2][0] - leftBound) > this.sourceWorldWidth_ / 2) {
-          newTriangle[2][0] -= this.sourceWorldWidth_;
-        }
-
-        // Rarely (if the extent contains both the dateline and prime meridian)
-        // the shift can in turn break some triangles.
-        // Detect this here and don't shift in such cases.
-        var minX = Math.min(
-            newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);
-        var maxX = Math.max(
-            newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);
-        if ((maxX - minX) < this.sourceWorldWidth_ / 2) {
-          triangle.source = newTriangle;
-        }
-      }
-    }, this);
-  }
-
-  transformInvCache = {};
-};
-
-
-/**
- * Adds triangle to the triangulation.
- * @param {ol.Coordinate} a The target a coordinate.
- * @param {ol.Coordinate} b The target b coordinate.
- * @param {ol.Coordinate} c The target c coordinate.
- * @param {ol.Coordinate} aSrc The source a coordinate.
- * @param {ol.Coordinate} bSrc The source b coordinate.
- * @param {ol.Coordinate} cSrc The source c coordinate.
- * @private
- */
-ol.reproj.Triangulation.prototype.addTriangle_ = function(a, b, c,
-    aSrc, bSrc, cSrc) {
-  this.triangles_.push({
-    source: [aSrc, bSrc, cSrc],
-    target: [a, b, c]
-  });
-};
-
-
-/**
- * Adds quad (points in clock-wise order) to the triangulation
- * (and reprojects the vertices) if valid.
- * Performs quad subdivision if needed to increase precision.
- *
- * @param {ol.Coordinate} a The target a coordinate.
- * @param {ol.Coordinate} b The target b coordinate.
- * @param {ol.Coordinate} c The target c coordinate.
- * @param {ol.Coordinate} d The target d coordinate.
- * @param {ol.Coordinate} aSrc The source a coordinate.
- * @param {ol.Coordinate} bSrc The source b coordinate.
- * @param {ol.Coordinate} cSrc The source c coordinate.
- * @param {ol.Coordinate} dSrc The source d coordinate.
- * @param {number} maxSubdivision Maximal allowed subdivision of the quad.
- * @private
- */
-ol.reproj.Triangulation.prototype.addQuad_ = function(a, b, c, d,
-    aSrc, bSrc, cSrc, dSrc, maxSubdivision) {
-
-  var sourceQuadExtent = ol.extent.boundingExtent([aSrc, bSrc, cSrc, dSrc]);
-  var sourceCoverageX = this.sourceWorldWidth_ ?
-      ol.extent.getWidth(sourceQuadExtent) / this.sourceWorldWidth_ : null;
-  var sourceWorldWidth = /** @type {number} */ (this.sourceWorldWidth_);
-
-  // when the quad is wrapped in the source projection
-  // it covers most of the projection extent, but not fully
-  var wrapsX = this.sourceProj_.canWrapX() &&
-               sourceCoverageX > 0.5 && sourceCoverageX < 1;
-
-  var needsSubdivision = false;
-
-  if (maxSubdivision > 0) {
-    if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {
-      var targetQuadExtent = ol.extent.boundingExtent([a, b, c, d]);
-      var targetCoverageX =
-          ol.extent.getWidth(targetQuadExtent) / this.targetWorldWidth_;
-      needsSubdivision |=
-          targetCoverageX > ol.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH;
-    }
-    if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {
-      needsSubdivision |=
-          sourceCoverageX > ol.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH;
-    }
-  }
-
-  if (!needsSubdivision && this.maxSourceExtent_) {
-    if (!ol.extent.intersects(sourceQuadExtent, this.maxSourceExtent_)) {
-      // whole quad outside source projection extent -> ignore
-      return;
-    }
-  }
-
-  if (!needsSubdivision) {
-    if (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ||
-        !isFinite(bSrc[0]) || !isFinite(bSrc[1]) ||
-        !isFinite(cSrc[0]) || !isFinite(cSrc[1]) ||
-        !isFinite(dSrc[0]) || !isFinite(dSrc[1])) {
-      if (maxSubdivision > 0) {
-        needsSubdivision = true;
-      } else {
-        return;
-      }
-    }
-  }
-
-  if (maxSubdivision > 0) {
-    if (!needsSubdivision) {
-      var center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];
-      var centerSrc = this.transformInv_(center);
-
-      var dx;
-      if (wrapsX) {
-        var centerSrcEstimX =
-            (ol.math.modulo(aSrc[0], sourceWorldWidth) +
-             ol.math.modulo(cSrc[0], sourceWorldWidth)) / 2;
-        dx = centerSrcEstimX -
-            ol.math.modulo(centerSrc[0], sourceWorldWidth);
-      } else {
-        dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];
-      }
-      var dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];
-      var centerSrcErrorSquared = dx * dx + dy * dy;
-      needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;
-    }
-    if (needsSubdivision) {
-      if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {
-        // split horizontally (top & bottom)
-        var bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];
-        var bcSrc = this.transformInv_(bc);
-        var da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];
-        var daSrc = this.transformInv_(da);
-
-        this.addQuad_(
-            a, b, bc, da, aSrc, bSrc, bcSrc, daSrc, maxSubdivision - 1);
-        this.addQuad_(
-            da, bc, c, d, daSrc, bcSrc, cSrc, dSrc, maxSubdivision - 1);
-      } else {
-        // split vertically (left & right)
-        var ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];
-        var abSrc = this.transformInv_(ab);
-        var cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];
-        var cdSrc = this.transformInv_(cd);
-
-        this.addQuad_(
-            a, ab, cd, d, aSrc, abSrc, cdSrc, dSrc, maxSubdivision - 1);
-        this.addQuad_(
-            ab, b, c, cd, abSrc, bSrc, cSrc, cdSrc, maxSubdivision - 1);
-      }
-      return;
-    }
-  }
-
-  if (wrapsX) {
-    if (!this.canWrapXInSource_) {
-      return;
-    }
-    this.wrapsXInSource_ = true;
-  }
-
-  this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);
-  this.addTriangle_(a, b, c, aSrc, bSrc, cSrc);
-};
-
-
-/**
- * Calculates extent of the 'source' coordinates from all the triangles.
- *
- * @return {ol.Extent} Calculated extent.
- */
-ol.reproj.Triangulation.prototype.calculateSourceExtent = function() {
-  var extent = ol.extent.createEmpty();
-
-  this.triangles_.forEach(function(triangle, i, arr) {
-    var src = triangle.source;
-    ol.extent.extendCoordinate(extent, src[0]);
-    ol.extent.extendCoordinate(extent, src[1]);
-    ol.extent.extendCoordinate(extent, src[2]);
-  });
-
-  return extent;
-};
-
-
-/**
- * @return {Array.<ol.ReprojTriangle>} Array of the calculated triangles.
- */
-ol.reproj.Triangulation.prototype.getTriangles = function() {
-  return this.triangles_;
-};
-
-goog.provide('ol.reproj.Image');
-
-goog.require('ol');
-goog.require('ol.ImageBase');
-goog.require('ol.ImageState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.reproj');
-goog.require('ol.reproj.Triangulation');
-
-
-/**
- * @classdesc
- * Class encapsulating single reprojected image.
- * See {@link ol.source.Image}.
- *
- * @constructor
- * @extends {ol.ImageBase}
- * @param {ol.proj.Projection} sourceProj Source projection (of the data).
- * @param {ol.proj.Projection} targetProj Target projection.
- * @param {ol.Extent} targetExtent Target extent.
- * @param {number} targetResolution Target resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.ReprojImageFunctionType} getImageFunction
- *     Function returning source images (extent, resolution, pixelRatio).
- */
-ol.reproj.Image = function(sourceProj, targetProj,
-    targetExtent, targetResolution, pixelRatio, getImageFunction) {
-
-  /**
-   * @private
-   * @type {ol.proj.Projection}
-   */
-  this.targetProj_ = targetProj;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.maxSourceExtent_ = sourceProj.getExtent();
-  var maxTargetExtent = targetProj.getExtent();
-
-  var limitedTargetExtent = maxTargetExtent ?
-      ol.extent.getIntersection(targetExtent, maxTargetExtent) : targetExtent;
-
-  var targetCenter = ol.extent.getCenter(limitedTargetExtent);
-  var sourceResolution = ol.reproj.calculateSourceResolution(
-      sourceProj, targetProj, targetCenter, targetResolution);
-
-  var errorThresholdInPixels = ol.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD;
-
-  /**
-   * @private
-   * @type {!ol.reproj.Triangulation}
-   */
-  this.triangulation_ = new ol.reproj.Triangulation(
-      sourceProj, targetProj, limitedTargetExtent, this.maxSourceExtent_,
-      sourceResolution * errorThresholdInPixels);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.targetResolution_ = targetResolution;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.targetExtent_ = targetExtent;
-
-  var sourceExtent = this.triangulation_.calculateSourceExtent();
-
-  /**
-   * @private
-   * @type {ol.ImageBase}
-   */
-  this.sourceImage_ =
-      getImageFunction(sourceExtent, sourceResolution, pixelRatio);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.sourcePixelRatio_ =
-      this.sourceImage_ ? this.sourceImage_.getPixelRatio() : 1;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = null;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.sourceListenerKey_ = null;
-
-
-  var state = ol.ImageState.LOADED;
-  var attributions = [];
-
-  if (this.sourceImage_) {
-    state = ol.ImageState.IDLE;
-    attributions = this.sourceImage_.getAttributions();
-  }
-
-  ol.ImageBase.call(this, targetExtent, targetResolution, this.sourcePixelRatio_,
-            state, attributions);
-};
-ol.inherits(ol.reproj.Image, ol.ImageBase);
-
-
-/**
- * @inheritDoc
- */
-ol.reproj.Image.prototype.disposeInternal = function() {
-  if (this.state == ol.ImageState.LOADING) {
-    this.unlistenSource_();
-  }
-  ol.ImageBase.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.reproj.Image.prototype.getImage = function(opt_context) {
-  return this.canvas_;
-};
-
-
-/**
- * @return {ol.proj.Projection} Projection.
- */
-ol.reproj.Image.prototype.getProjection = function() {
-  return this.targetProj_;
-};
-
-
-/**
- * @private
- */
-ol.reproj.Image.prototype.reproject_ = function() {
-  var sourceState = this.sourceImage_.getState();
-  if (sourceState == ol.ImageState.LOADED) {
-    var width = ol.extent.getWidth(this.targetExtent_) / this.targetResolution_;
-    var height =
-        ol.extent.getHeight(this.targetExtent_) / this.targetResolution_;
-
-    this.canvas_ = ol.reproj.render(width, height, this.sourcePixelRatio_,
-        this.sourceImage_.getResolution(), this.maxSourceExtent_,
-        this.targetResolution_, this.targetExtent_, this.triangulation_, [{
-          extent: this.sourceImage_.getExtent(),
-          image: this.sourceImage_.getImage()
-        }], 0);
-  }
-  this.state = sourceState;
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.reproj.Image.prototype.load = function() {
-  if (this.state == ol.ImageState.IDLE) {
-    this.state = ol.ImageState.LOADING;
-    this.changed();
-
-    var sourceState = this.sourceImage_.getState();
-    if (sourceState == ol.ImageState.LOADED ||
-        sourceState == ol.ImageState.ERROR) {
-      this.reproject_();
-    } else {
-      this.sourceListenerKey_ = ol.events.listen(this.sourceImage_,
-          ol.events.EventType.CHANGE, function(e) {
-            var sourceState = this.sourceImage_.getState();
-            if (sourceState == ol.ImageState.LOADED ||
-                sourceState == ol.ImageState.ERROR) {
-              this.unlistenSource_();
-              this.reproject_();
-            }
-          }, this);
-      this.sourceImage_.load();
-    }
-  }
-};
-
-
-/**
- * @private
- */
-ol.reproj.Image.prototype.unlistenSource_ = function() {
-  ol.events.unlistenByKey(/** @type {!ol.EventsKey} */ (this.sourceListenerKey_));
-  this.sourceListenerKey_ = null;
-};
-
-goog.provide('ol.source.Image');
-
-goog.require('ol');
-goog.require('ol.ImageState');
-goog.require('ol.array');
-goog.require('ol.events.Event');
-goog.require('ol.extent');
-goog.require('ol.proj');
-goog.require('ol.reproj.Image');
-goog.require('ol.source.Source');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for sources providing a single image.
- *
- * @constructor
- * @abstract
- * @extends {ol.source.Source}
- * @param {ol.SourceImageOptions} options Single image source options.
- * @api
- */
-ol.source.Image = function(options) {
-  ol.source.Source.call(this, {
-    attributions: options.attributions,
-    extent: options.extent,
-    logo: options.logo,
-    projection: options.projection,
-    state: options.state
-  });
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.resolutions_ = options.resolutions !== undefined ?
-      options.resolutions : null;
-
-
-  /**
-   * @private
-   * @type {ol.reproj.Image}
-   */
-  this.reprojectedImage_ = null;
-
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.reprojectedRevision_ = 0;
-};
-ol.inherits(ol.source.Image, ol.source.Source);
-
-
-/**
- * @return {Array.<number>} Resolutions.
- * @override
- */
-ol.source.Image.prototype.getResolutions = function() {
-  return this.resolutions_;
-};
-
-
-/**
- * @protected
- * @param {number} resolution Resolution.
- * @return {number} Resolution.
- */
-ol.source.Image.prototype.findNearestResolution = function(resolution) {
-  if (this.resolutions_) {
-    var idx = ol.array.linearFindNearest(this.resolutions_, resolution, 0);
-    resolution = this.resolutions_[idx];
-  }
-  return resolution;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @return {ol.ImageBase} Single image.
- */
-ol.source.Image.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
-  var sourceProjection = this.getProjection();
-  if (!ol.ENABLE_RASTER_REPROJECTION ||
-      !sourceProjection ||
-      !projection ||
-      ol.proj.equivalent(sourceProjection, projection)) {
-    if (sourceProjection) {
-      projection = sourceProjection;
-    }
-    return this.getImageInternal(extent, resolution, pixelRatio, projection);
-  } else {
-    if (this.reprojectedImage_) {
-      if (this.reprojectedRevision_ == this.getRevision() &&
-          ol.proj.equivalent(
-              this.reprojectedImage_.getProjection(), projection) &&
-          this.reprojectedImage_.getResolution() == resolution &&
-          this.reprojectedImage_.getPixelRatio() == pixelRatio &&
-          ol.extent.equals(this.reprojectedImage_.getExtent(), extent)) {
-        return this.reprojectedImage_;
-      }
-      this.reprojectedImage_.dispose();
-      this.reprojectedImage_ = null;
-    }
-
-    this.reprojectedImage_ = new ol.reproj.Image(
-        sourceProjection, projection, extent, resolution, pixelRatio,
-        function(extent, resolution, pixelRatio) {
-          return this.getImageInternal(extent, resolution,
-              pixelRatio, sourceProjection);
-        }.bind(this));
-    this.reprojectedRevision_ = this.getRevision();
-
-    return this.reprojectedImage_;
-  }
-};
-
-
-/**
- * @abstract
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @return {ol.ImageBase} Single image.
- * @protected
- */
-ol.source.Image.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {};
-
-
-/**
- * Handle image change events.
- * @param {ol.events.Event} event Event.
- * @protected
- */
-ol.source.Image.prototype.handleImageChange = function(event) {
-  var image = /** @type {ol.Image} */ (event.target);
-  switch (image.getState()) {
-    case ol.ImageState.LOADING:
-      this.dispatchEvent(
-          new ol.source.Image.Event(ol.source.Image.EventType_.IMAGELOADSTART,
-              image));
-      break;
-    case ol.ImageState.LOADED:
-      this.dispatchEvent(
-          new ol.source.Image.Event(ol.source.Image.EventType_.IMAGELOADEND,
-              image));
-      break;
-    case ol.ImageState.ERROR:
-      this.dispatchEvent(
-          new ol.source.Image.Event(ol.source.Image.EventType_.IMAGELOADERROR,
-              image));
-      break;
-    default:
-      // pass
-  }
-};
-
-
-/**
- * Default image load function for image sources that use ol.Image image
- * instances.
- * @param {ol.Image} image Image.
- * @param {string} src Source.
- */
-ol.source.Image.defaultImageLoadFunction = function(image, src) {
-  image.getImage().src = src;
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.source.Image} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.source.ImageEvent}
- * @param {string} type Type.
- * @param {ol.Image} image The image.
- */
-ol.source.Image.Event = function(type, image) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The image related to the event.
-   * @type {ol.Image}
-   * @api
-   */
-  this.image = image;
-
-};
-ol.inherits(ol.source.Image.Event, ol.events.Event);
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.source.Image.EventType_ = {
-
-  /**
-   * Triggered when an image starts loading.
-   * @event ol.source.Image.Event#imageloadstart
-   * @api
-   */
-  IMAGELOADSTART: 'imageloadstart',
-
-  /**
-   * Triggered when an image finishes loading.
-   * @event ol.source.Image.Event#imageloadend
-   * @api
-   */
-  IMAGELOADEND: 'imageloadend',
-
-  /**
-   * Triggered if image loading results in an error.
-   * @event ol.source.Image.Event#imageloaderror
-   * @api
-   */
-  IMAGELOADERROR: 'imageloaderror'
-
-};
-
-goog.provide('ol.source.ImageCanvas');
-
-goog.require('ol');
-goog.require('ol.ImageCanvas');
-goog.require('ol.extent');
-goog.require('ol.source.Image');
-
-
-/**
- * @classdesc
- * Base class for image sources where a canvas element is the image.
- *
- * @constructor
- * @extends {ol.source.Image}
- * @param {olx.source.ImageCanvasOptions} options Constructor options.
- * @api
- */
-ol.source.ImageCanvas = function(options) {
-
-  ol.source.Image.call(this, {
-    attributions: options.attributions,
-    logo: options.logo,
-    projection: options.projection,
-    resolutions: options.resolutions,
-    state: options.state
-  });
-
-  /**
-   * @private
-   * @type {ol.CanvasFunctionType}
-   */
-  this.canvasFunction_ = options.canvasFunction;
-
-  /**
-   * @private
-   * @type {ol.ImageCanvas}
-   */
-  this.canvas_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.ratio_ = options.ratio !== undefined ?
-      options.ratio : 1.5;
-
-};
-ol.inherits(ol.source.ImageCanvas, ol.source.Image);
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageCanvas.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
-  resolution = this.findNearestResolution(resolution);
-
-  var canvas = this.canvas_;
-  if (canvas &&
-      this.renderedRevision_ == this.getRevision() &&
-      canvas.getResolution() == resolution &&
-      canvas.getPixelRatio() == pixelRatio &&
-      ol.extent.containsExtent(canvas.getExtent(), extent)) {
-    return canvas;
-  }
-
-  extent = extent.slice();
-  ol.extent.scaleFromCenter(extent, this.ratio_);
-  var width = ol.extent.getWidth(extent) / resolution;
-  var height = ol.extent.getHeight(extent) / resolution;
-  var size = [width * pixelRatio, height * pixelRatio];
-
-  var canvasElement = this.canvasFunction_(
-      extent, resolution, pixelRatio, size, projection);
-  if (canvasElement) {
-    canvas = new ol.ImageCanvas(extent, resolution, pixelRatio,
-        this.getAttributions(), canvasElement);
-  }
-  this.canvas_ = canvas;
-  this.renderedRevision_ = this.getRevision();
-
-  return canvas;
-};
-
-goog.provide('ol.source.ImageVector');
-
-goog.require('ol');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.render.canvas.ReplayGroup');
-goog.require('ol.renderer.vector');
-goog.require('ol.source.ImageCanvas');
-goog.require('ol.style.Style');
-goog.require('ol.transform');
-
-
-/**
- * @classdesc
- * An image source whose images are canvas elements into which vector features
- * read from a vector source (`ol.source.Vector`) are drawn. An
- * `ol.source.ImageVector` object is to be used as the `source` of an image
- * layer (`ol.layer.Image`). Image layers are rotated, scaled, and translated,
- * as opposed to being re-rendered, during animations and interactions. So, like
- * any other image layer, an image layer configured with an
- * `ol.source.ImageVector` will exhibit this behaviour. This is in contrast to a
- * vector layer, where vector features are re-drawn during animations and
- * interactions.
- *
- * @constructor
- * @extends {ol.source.ImageCanvas}
- * @param {olx.source.ImageVectorOptions} options Options.
- * @api
- */
-ol.source.ImageVector = function(options) {
-
-  /**
-   * @private
-   * @type {ol.source.Vector}
-   */
-  this.source_ = options.source;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.transform_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.canvasContext_ = ol.dom.createCanvasContext2D();
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.canvasSize_ = [0, 0];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderBuffer_ = options.renderBuffer == undefined ? 100 : options.renderBuffer;
-
-  /**
-   * @private
-   * @type {ol.render.canvas.ReplayGroup}
-   */
-  this.replayGroup_ = null;
-
-  ol.source.ImageCanvas.call(this, {
-    attributions: options.attributions,
-    canvasFunction: this.canvasFunctionInternal_.bind(this),
-    logo: options.logo,
-    projection: options.projection,
-    ratio: options.ratio,
-    resolutions: options.resolutions,
-    state: this.source_.getState()
-  });
-
-  /**
-   * User provided style.
-   * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
-   * @private
-   */
-  this.style_ = null;
-
-  /**
-   * Style function for use within the library.
-   * @type {ol.StyleFunction|undefined}
-   * @private
-   */
-  this.styleFunction_ = undefined;
-
-  this.setStyle(options.style);
-
-  ol.events.listen(this.source_, ol.events.EventType.CHANGE,
-      this.handleSourceChange_, this);
-
-};
-ol.inherits(ol.source.ImageVector, ol.source.ImageCanvas);
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.Size} size Size.
- * @param {ol.proj.Projection} projection Projection;
- * @return {HTMLCanvasElement} Canvas element.
- * @private
- */
-ol.source.ImageVector.prototype.canvasFunctionInternal_ = function(extent, resolution, pixelRatio, size, projection) {
-
-  var replayGroup = new ol.render.canvas.ReplayGroup(
-      ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
-      resolution, this.source_.getOverlaps(), this.renderBuffer_);
-
-  this.source_.loadFeatures(extent, resolution, projection);
-
-  var loading = false;
-  this.source_.forEachFeatureInExtent(extent,
-      /**
-       * @param {ol.Feature} feature Feature.
-       */
-      function(feature) {
-        loading = loading ||
-            this.renderFeature_(feature, resolution, pixelRatio, replayGroup);
-      }, this);
-  replayGroup.finish();
-
-  if (loading) {
-    return null;
-  }
-
-  if (this.canvasSize_[0] != size[0] || this.canvasSize_[1] != size[1]) {
-    this.canvasContext_.canvas.width = size[0];
-    this.canvasContext_.canvas.height = size[1];
-    this.canvasSize_[0] = size[0];
-    this.canvasSize_[1] = size[1];
-  } else {
-    this.canvasContext_.clearRect(0, 0, size[0], size[1]);
-  }
-
-  var transform = this.getTransform_(ol.extent.getCenter(extent),
-      resolution, pixelRatio, size);
-  replayGroup.replay(this.canvasContext_, pixelRatio, transform, 0, {});
-
-  this.replayGroup_ = replayGroup;
-
-  return this.canvasContext_.canvas;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageVector.prototype.forEachFeatureAtCoordinate = function(
-    coordinate, resolution, rotation, hitTolerance, skippedFeatureUids, callback) {
-  if (!this.replayGroup_) {
-    return undefined;
-  } else {
-    /** @type {Object.<string, boolean>} */
-    var features = {};
-    return this.replayGroup_.forEachFeatureAtCoordinate(
-        coordinate, resolution, 0, hitTolerance, skippedFeatureUids,
-        /**
-         * @param {ol.Feature|ol.render.Feature} feature Feature.
-         * @return {?} Callback result.
-         */
-        function(feature) {
-          var key = ol.getUid(feature).toString();
-          if (!(key in features)) {
-            features[key] = true;
-            return callback(feature);
-          }
-        });
-  }
-};
-
-
-/**
- * Get a reference to the wrapped source.
- * @return {ol.source.Vector} Source.
- * @api
- */
-ol.source.ImageVector.prototype.getSource = function() {
-  return this.source_;
-};
-
-
-/**
- * Get the style for features.  This returns whatever was passed to the `style`
- * option at construction or to the `setStyle` method.
- * @return {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
- *     Layer style.
- * @api
- */
-ol.source.ImageVector.prototype.getStyle = function() {
-  return this.style_;
-};
-
-
-/**
- * Get the style function.
- * @return {ol.StyleFunction|undefined} Layer style function.
- * @api
- */
-ol.source.ImageVector.prototype.getStyleFunction = function() {
-  return this.styleFunction_;
-};
-
-
-/**
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.Size} size Size.
- * @return {!ol.Transform} Transform.
- * @private
- */
-ol.source.ImageVector.prototype.getTransform_ = function(center, resolution, pixelRatio, size) {
-  var dx1 = size[0] / 2;
-  var dy1 = size[1] / 2;
-  var sx = pixelRatio / resolution;
-  var sy = -sx;
-  var dx2 = -center[0];
-  var dy2 = -center[1];
-
-  return ol.transform.compose(this.transform_, dx1, dy1, sx, sy, 0, dx2, dy2);
-};
-
-
-/**
- * Handle changes in image style state.
- * @param {ol.events.Event} event Image style change event.
- * @private
- */
-ol.source.ImageVector.prototype.handleImageChange_ = function(event) {
-  this.changed();
-};
-
-
-/**
- * @private
- */
-ol.source.ImageVector.prototype.handleSourceChange_ = function() {
-  // setState will trigger a CHANGE event, so we always rely
-  // change events by calling setState.
-  this.setState(this.source_.getState());
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
- * @return {boolean} `true` if an image is loading.
- * @private
- */
-ol.source.ImageVector.prototype.renderFeature_ = function(feature, resolution, pixelRatio, replayGroup) {
-  var styles;
-  var styleFunction = feature.getStyleFunction();
-  if (styleFunction) {
-    styles = styleFunction.call(feature, resolution);
-  } else if (this.styleFunction_) {
-    styles = this.styleFunction_(feature, resolution);
-  }
-  if (!styles) {
-    return false;
-  }
-  var i, ii, loading = false;
-  if (!Array.isArray(styles)) {
-    styles = [styles];
-  }
-  for (i = 0, ii = styles.length; i < ii; ++i) {
-    loading = ol.renderer.vector.renderFeature(
-        replayGroup, feature, styles[i],
-        ol.renderer.vector.getSquaredTolerance(resolution, pixelRatio),
-        this.handleImageChange_, this) || loading;
-  }
-  return loading;
-};
-
-
-/**
- * Set the style for features.  This can be a single style object, an array
- * of styles, or a function that takes a feature and resolution and returns
- * an array of styles. If it is `undefined` the default style is used. If
- * it is `null` the layer has no style (a `null` style), so only features
- * that have their own styles will be rendered in the layer. See
- * {@link ol.style} for information on the default style.
- * @param {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
- *     style Layer style.
- * @api
- */
-ol.source.ImageVector.prototype.setStyle = function(style) {
-  this.style_ = style !== undefined ? style : ol.style.Style.defaultFunction;
-  this.styleFunction_ = !style ?
-      undefined : ol.style.Style.createFunction(this.style_);
-  this.changed();
-};
-
-goog.provide('ol.renderer.webgl.ImageLayer');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.renderer.webgl.Layer');
-goog.require('ol.source.ImageVector');
-goog.require('ol.transform');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Context');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.renderer.webgl.Layer}
-   * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
-   * @param {ol.layer.Image} imageLayer Tile layer.
-   */
-  ol.renderer.webgl.ImageLayer = function(mapRenderer, imageLayer) {
-
-    ol.renderer.webgl.Layer.call(this, mapRenderer, imageLayer);
-
-    /**
-     * The last rendered image.
-     * @private
-     * @type {?ol.ImageBase}
-     */
-    this.image_ = null;
-
-    /**
-     * @private
-     * @type {CanvasRenderingContext2D}
-     */
-    this.hitCanvasContext_ = null;
-
-    /**
-     * @private
-     * @type {?ol.Transform}
-     */
-    this.hitTransformationMatrix_ = null;
-
-  };
-  ol.inherits(ol.renderer.webgl.ImageLayer, ol.renderer.webgl.Layer);
-
-
-  /**
-   * @param {ol.ImageBase} image Image.
-   * @private
-   * @return {WebGLTexture} Texture.
-   */
-  ol.renderer.webgl.ImageLayer.prototype.createTexture_ = function(image) {
-
-    // We meet the conditions to work with non-power of two textures.
-    // http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences#Non-Power_of_Two_Texture_Support
-    // http://learningwebgl.com/blog/?p=2101
-
-    var imageElement = image.getImage();
-    var gl = this.mapRenderer.getGL();
-
-    return ol.webgl.Context.createTexture(
-        gl, imageElement, ol.webgl.CLAMP_TO_EDGE, ol.webgl.CLAMP_TO_EDGE);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.ImageLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-    var layer = this.getLayer();
-    var source = layer.getSource();
-    var resolution = frameState.viewState.resolution;
-    var rotation = frameState.viewState.rotation;
-    var skippedFeatureUids = frameState.skippedFeatureUids;
-    return source.forEachFeatureAtCoordinate(
-        coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
-
-        /**
-         * @param {ol.Feature|ol.render.Feature} feature Feature.
-         * @return {?} Callback result.
-         */
-        function(feature) {
-          return callback.call(thisArg, feature, layer);
-        });
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.ImageLayer.prototype.prepareFrame = function(frameState, layerState, context) {
-
-    var gl = this.mapRenderer.getGL();
-
-    var pixelRatio = frameState.pixelRatio;
-    var viewState = frameState.viewState;
-    var viewCenter = viewState.center;
-    var viewResolution = viewState.resolution;
-    var viewRotation = viewState.rotation;
-
-    var image = this.image_;
-    var texture = this.texture;
-    var imageLayer = /** @type {ol.layer.Image} */ (this.getLayer());
-    var imageSource = imageLayer.getSource();
-
-    var hints = frameState.viewHints;
-
-    var renderedExtent = frameState.extent;
-    if (layerState.extent !== undefined) {
-      renderedExtent = ol.extent.getIntersection(
-          renderedExtent, layerState.extent);
-    }
-    if (!hints[ol.ViewHint.ANIMATING] && !hints[ol.ViewHint.INTERACTING] &&
-        !ol.extent.isEmpty(renderedExtent)) {
-      var projection = viewState.projection;
-      if (!ol.ENABLE_RASTER_REPROJECTION) {
-        var sourceProjection = imageSource.getProjection();
-        if (sourceProjection) {
-          projection = sourceProjection;
-        }
-      }
-      var image_ = imageSource.getImage(renderedExtent, viewResolution,
-          pixelRatio, projection);
-      if (image_) {
-        var loaded = this.loadImage(image_);
-        if (loaded) {
-          image = image_;
-          texture = this.createTexture_(image_);
-          if (this.texture) {
-            /**
-             * @param {WebGLRenderingContext} gl GL.
-             * @param {WebGLTexture} texture Texture.
-             */
-            var postRenderFunction = function(gl, texture) {
-              if (!gl.isContextLost()) {
-                gl.deleteTexture(texture);
-              }
-            }.bind(null, gl, this.texture);
-            frameState.postRenderFunctions.push(
-              /** @type {ol.PostRenderFunction} */ (postRenderFunction)
-            );
-          }
-        }
-      }
-    }
-
-    if (image) {
-      var canvas = this.mapRenderer.getContext().getCanvas();
-
-      this.updateProjectionMatrix_(canvas.width, canvas.height,
-          pixelRatio, viewCenter, viewResolution, viewRotation,
-          image.getExtent());
-      this.hitTransformationMatrix_ = null;
-
-      // Translate and scale to flip the Y coord.
-      var texCoordMatrix = this.texCoordMatrix;
-      ol.transform.reset(texCoordMatrix);
-      ol.transform.scale(texCoordMatrix, 1, -1);
-      ol.transform.translate(texCoordMatrix, 0, -1);
-
-      this.image_ = image;
-      this.texture = texture;
-
-      this.updateAttributions(frameState.attributions, image.getAttributions());
-      this.updateLogos(frameState, imageSource);
-    }
-
-    return !!image;
-  };
-
-
-  /**
-   * @param {number} canvasWidth Canvas width.
-   * @param {number} canvasHeight Canvas height.
-   * @param {number} pixelRatio Pixel ratio.
-   * @param {ol.Coordinate} viewCenter View center.
-   * @param {number} viewResolution View resolution.
-   * @param {number} viewRotation View rotation.
-   * @param {ol.Extent} imageExtent Image extent.
-   * @private
-   */
-  ol.renderer.webgl.ImageLayer.prototype.updateProjectionMatrix_ = function(canvasWidth, canvasHeight, pixelRatio,
-          viewCenter, viewResolution, viewRotation, imageExtent) {
-
-    var canvasExtentWidth = canvasWidth * viewResolution;
-    var canvasExtentHeight = canvasHeight * viewResolution;
-
-    var projectionMatrix = this.projectionMatrix;
-    ol.transform.reset(projectionMatrix);
-    ol.transform.scale(projectionMatrix,
-        pixelRatio * 2 / canvasExtentWidth,
-        pixelRatio * 2 / canvasExtentHeight);
-    ol.transform.rotate(projectionMatrix, -viewRotation);
-    ol.transform.translate(projectionMatrix,
-        imageExtent[0] - viewCenter[0],
-        imageExtent[1] - viewCenter[1]);
-    ol.transform.scale(projectionMatrix,
-        (imageExtent[2] - imageExtent[0]) / 2,
-        (imageExtent[3] - imageExtent[1]) / 2);
-    ol.transform.translate(projectionMatrix, 1, 1);
-
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.ImageLayer.prototype.hasFeatureAtCoordinate = function(coordinate, frameState) {
-    var hasFeature = this.forEachFeatureAtCoordinate(
-        coordinate, frameState, 0, ol.functions.TRUE, this);
-    return hasFeature !== undefined;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.ImageLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
-    if (!this.image_ || !this.image_.getImage()) {
-      return undefined;
-    }
-
-    if (this.getLayer().getSource() instanceof ol.source.ImageVector) {
-      // for ImageVector sources use the original hit-detection logic,
-      // so that for example also transparent polygons are detected
-      var coordinate = ol.transform.apply(
-          frameState.pixelToCoordinateTransform, pixel.slice());
-      var hasFeature = this.forEachFeatureAtCoordinate(
-          coordinate, frameState, 0, ol.functions.TRUE, this);
-
-      if (hasFeature) {
-        return callback.call(thisArg, this.getLayer(), null);
-      } else {
-        return undefined;
-      }
-    } else {
-      var imageSize =
-          [this.image_.getImage().width, this.image_.getImage().height];
-
-      if (!this.hitTransformationMatrix_) {
-        this.hitTransformationMatrix_ = this.getHitTransformationMatrix_(
-            frameState.size, imageSize);
-      }
-
-      var pixelOnFrameBuffer = ol.transform.apply(
-          this.hitTransformationMatrix_, pixel.slice());
-
-      if (pixelOnFrameBuffer[0] < 0 || pixelOnFrameBuffer[0] > imageSize[0] ||
-          pixelOnFrameBuffer[1] < 0 || pixelOnFrameBuffer[1] > imageSize[1]) {
-        // outside the image, no need to check
-        return undefined;
-      }
-
-      if (!this.hitCanvasContext_) {
-        this.hitCanvasContext_ = ol.dom.createCanvasContext2D(1, 1);
-      }
-
-      this.hitCanvasContext_.clearRect(0, 0, 1, 1);
-      this.hitCanvasContext_.drawImage(this.image_.getImage(),
-          pixelOnFrameBuffer[0], pixelOnFrameBuffer[1], 1, 1, 0, 0, 1, 1);
-
-      var imageData = this.hitCanvasContext_.getImageData(0, 0, 1, 1).data;
-      if (imageData[3] > 0) {
-        return callback.call(thisArg, this.getLayer(),  imageData);
-      } else {
-        return undefined;
-      }
-    }
-  };
-
-
-  /**
-   * The transformation matrix to get the pixel on the image for a
-   * pixel on the map.
-   * @param {ol.Size} mapSize The map size.
-   * @param {ol.Size} imageSize The image size.
-   * @return {ol.Transform} The transformation matrix.
-   * @private
-   */
-  ol.renderer.webgl.ImageLayer.prototype.getHitTransformationMatrix_ = function(mapSize, imageSize) {
-    // the first matrix takes a map pixel, flips the y-axis and scales to
-    // a range between -1 ... 1
-    var mapCoordTransform = ol.transform.create();
-    ol.transform.translate(mapCoordTransform, -1, -1);
-    ol.transform.scale(mapCoordTransform, 2 / mapSize[0], 2 / mapSize[1]);
-    ol.transform.translate(mapCoordTransform, 0, mapSize[1]);
-    ol.transform.scale(mapCoordTransform, 1, -1);
-
-    // the second matrix is the inverse of the projection matrix used in the
-    // shader for drawing
-    var projectionMatrixInv = ol.transform.invert(this.projectionMatrix.slice());
-
-    // the third matrix scales to the image dimensions and flips the y-axis again
-    var transform = ol.transform.create();
-    ol.transform.translate(transform, 0, imageSize[1]);
-    ol.transform.scale(transform, 1, -1);
-    ol.transform.scale(transform, imageSize[0] / 2, imageSize[1] / 2);
-    ol.transform.translate(transform, 1, 1);
-
-    ol.transform.multiply(transform, projectionMatrixInv);
-    ol.transform.multiply(transform, mapCoordTransform);
-
-    return transform;
-  };
-
-}
-
-goog.provide('ol.layer.Image');
-
-goog.require('ol');
-goog.require('ol.layer.Layer');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.canvas.ImageLayer');
-goog.require('ol.renderer.webgl.ImageLayer');
-
-
-/**
- * @classdesc
- * Server-rendered images that are available for arbitrary extents and
- * resolutions.
- * Note that any property set in the options is set as a {@link ol.Object}
- * property on the layer object; for example, setting `title: 'My Title'` in the
- * options means that `title` is observable, and has get/set accessors.
- *
- * @constructor
- * @extends {ol.layer.Layer}
- * @fires ol.render.Event
- * @param {olx.layer.ImageOptions=} opt_options Layer options.
- * @api
- */
-ol.layer.Image = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-  ol.layer.Layer.call(this,  /** @type {olx.layer.LayerOptions} */ (options));
-};
-ol.inherits(ol.layer.Image, ol.layer.Layer);
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Image.prototype.createRenderer = function(mapRenderer) {
-  var renderer = null;
-  var type = mapRenderer.getType();
-  if (ol.ENABLE_CANVAS && type === ol.renderer.Type.CANVAS) {
-    renderer = new ol.renderer.canvas.ImageLayer(this);
-  } else if (ol.ENABLE_WEBGL && type === ol.renderer.Type.WEBGL) {
-    renderer = new ol.renderer.webgl.ImageLayer(/** @type {ol.renderer.webgl.Map} */ (mapRenderer), this);
-  }
-  return renderer;
-};
-
-
-/**
- * Return the associated {@link ol.source.Image source} of the image layer.
- * @function
- * @return {ol.source.Image} Source.
- * @api
- */
-ol.layer.Image.prototype.getSource;
-
-goog.provide('ol.layer.TileProperty');
-
-/**
- * @enum {string}
- */
-ol.layer.TileProperty = {
-  PRELOAD: 'preload',
-  USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError'
-};
-
-// FIXME find correct globalCompositeOperation
-
-goog.provide('ol.renderer.canvas.TileLayer');
-
-goog.require('ol');
-goog.require('ol.TileRange');
-goog.require('ol.TileState');
-goog.require('ol.ViewHint');
-goog.require('ol.array');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.renderer.canvas.IntermediateCanvas');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.canvas.IntermediateCanvas}
- * @param {ol.layer.Tile|ol.layer.VectorTile} tileLayer Tile layer.
- */
-ol.renderer.canvas.TileLayer = function(tileLayer) {
-
-  ol.renderer.canvas.IntermediateCanvas.call(this, tileLayer);
-
-  /**
-   * @protected
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context = this.context === null ? null :  ol.dom.createCanvasContext2D();
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.oversampling_;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.renderedExtent_ = null;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.renderedRevision;
-
-  /**
-   * @protected
-   * @type {!Array.<ol.Tile>}
-   */
-  this.renderedTiles = [];
-
-  /**
-   * @protected
-   * @type {ol.Extent}
-   */
-  this.tmpExtent = ol.extent.createEmpty();
-
-  /**
-   * @private
-   * @type {ol.TileRange}
-   */
-  this.tmpTileRange_ = new ol.TileRange(0, 0, 0, 0);
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.imageTransform_ = ol.transform.create();
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.zDirection = 0;
-
-};
-ol.inherits(ol.renderer.canvas.TileLayer, ol.renderer.canvas.IntermediateCanvas);
-
-
-/**
- * @private
- * @param {ol.Tile} tile Tile.
- * @return {boolean} Tile is drawable.
- */
-ol.renderer.canvas.TileLayer.prototype.isDrawableTile_ = function(tile) {
-  var tileState = tile.getState();
-  var useInterimTilesOnError = this.getLayer().getUseInterimTilesOnError();
-  return tileState == ol.TileState.LOADED ||
-      tileState == ol.TileState.EMPTY ||
-      tileState == ol.TileState.ERROR && !useInterimTilesOnError;
-};
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.TileLayer.prototype.prepareFrame = function(frameState, layerState) {
-
-  var pixelRatio = frameState.pixelRatio;
-  var size = frameState.size;
-  var viewState = frameState.viewState;
-  var projection = viewState.projection;
-  var viewResolution = viewState.resolution;
-  var viewCenter = viewState.center;
-
-  var tileLayer = this.getLayer();
-  var tileSource = /** @type {ol.source.Tile} */ (tileLayer.getSource());
-  var sourceRevision = tileSource.getRevision();
-  var tileGrid = tileSource.getTileGridForProjection(projection);
-  var z = tileGrid.getZForResolution(viewResolution, this.zDirection);
-  var tileResolution = tileGrid.getResolution(z);
-  var oversampling = Math.round(viewResolution / tileResolution) || 1;
-  var extent = frameState.extent;
-
-  if (layerState.extent !== undefined) {
-    extent = ol.extent.getIntersection(extent, layerState.extent);
-  }
-  if (ol.extent.isEmpty(extent)) {
-    // Return false to prevent the rendering of the layer.
-    return false;
-  }
-
-  var tileRange = tileGrid.getTileRangeForExtentAndResolution(
-      extent, tileResolution);
-  var imageExtent = tileGrid.getTileRangeExtent(z, tileRange);
-
-  var tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);
-
-  /**
-   * @type {Object.<number, Object.<string, ol.Tile>>}
-   */
-  var tilesToDrawByZ = {};
-  tilesToDrawByZ[z] = {};
-
-  var findLoadedTiles = this.createLoadedTileFinder(
-      tileSource, projection, tilesToDrawByZ);
-
-  var tmpExtent = this.tmpExtent;
-  var tmpTileRange = this.tmpTileRange_;
-  var newTiles = false;
-  var tile, x, y;
-  for (x = tileRange.minX; x <= tileRange.maxX; ++x) {
-    for (y = tileRange.minY; y <= tileRange.maxY; ++y) {
-      tile = tileSource.getTile(z, x, y, pixelRatio, projection);
-      // When useInterimTilesOnError is false, we consider the error tile as loaded.
-      if (tile.getState() == ol.TileState.ERROR && !this.getLayer().getUseInterimTilesOnError()) {
-        tile.setState(ol.TileState.LOADED);
-      }
-      if (!this.isDrawableTile_(tile)) {
-        tile = tile.getInterimTile();
-      }
-      if (this.isDrawableTile_(tile)) {
-        if (tile.getState() == ol.TileState.LOADED) {
-          tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;
-          if (!newTiles && this.renderedTiles.indexOf(tile) == -1) {
-            newTiles = true;
-          }
-        }
-        continue;
-      }
-
-      var fullyLoaded = tileGrid.forEachTileCoordParentTileRange(
-          tile.tileCoord, findLoadedTiles, null, tmpTileRange, tmpExtent);
-      if (!fullyLoaded) {
-        var childTileRange = tileGrid.getTileCoordChildTileRange(
-            tile.tileCoord, tmpTileRange, tmpExtent);
-        if (childTileRange) {
-          findLoadedTiles(z + 1, childTileRange);
-        }
-      }
-
-    }
-  }
-
-  var renderedResolution = tileResolution * pixelRatio / tilePixelRatio * oversampling;
-  var hints = frameState.viewHints;
-  var animatingOrInteracting = hints[ol.ViewHint.ANIMATING] || hints[ol.ViewHint.INTERACTING];
-  if (!(this.renderedResolution && Date.now() - frameState.time > 16 && animatingOrInteracting) && (
-        newTiles ||
-        !(this.renderedExtent_ && ol.extent.containsExtent(this.renderedExtent_, extent)) ||
-        this.renderedRevision != sourceRevision ||
-        oversampling != this.oversampling_ ||
-        !animatingOrInteracting && renderedResolution != this.renderedResolution
-      )) {
-
-    var context = this.context;
-    if (context) {
-      var tilePixelSize = tileSource.getTilePixelSize(z, pixelRatio, projection);
-      var width = Math.round(tileRange.getWidth() * tilePixelSize[0] / oversampling);
-      var height = Math.round(tileRange.getHeight() * tilePixelSize[1] / oversampling);
-      var canvas = context.canvas;
-      if (canvas.width != width || canvas.height != height) {
-        this.oversampling_ = oversampling;
-        canvas.width = width;
-        canvas.height = height;
-      } else {
-        context.clearRect(0, 0, width, height);
-        oversampling = this.oversampling_;
-      }
-    }
-
-    this.renderedTiles.length = 0;
-    /** @type {Array.<number>} */
-    var zs = Object.keys(tilesToDrawByZ).map(Number);
-    zs.sort(ol.array.numberSafeCompareFunction);
-    var currentResolution, currentScale, currentTilePixelSize, currentZ, i, ii;
-    var tileExtent, tileGutter, tilesToDraw, w, h;
-    for (i = 0, ii = zs.length; i < ii; ++i) {
-      currentZ = zs[i];
-      currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);
-      currentResolution = tileGrid.getResolution(currentZ);
-      currentScale = currentResolution / tileResolution;
-      tileGutter = tilePixelRatio * tileSource.getGutter(projection);
-      tilesToDraw = tilesToDrawByZ[currentZ];
-      for (var tileCoordKey in tilesToDraw) {
-        tile = tilesToDraw[tileCoordKey];
-        tileExtent = tileGrid.getTileCoordExtent(tile.getTileCoord(), tmpExtent);
-        x = (tileExtent[0] - imageExtent[0]) / tileResolution * tilePixelRatio / oversampling;
-        y = (imageExtent[3] - tileExtent[3]) / tileResolution * tilePixelRatio / oversampling;
-        w = currentTilePixelSize[0] * currentScale / oversampling;
-        h = currentTilePixelSize[1] * currentScale / oversampling;
-        this.drawTileImage(tile, frameState, layerState, x, y, w, h, tileGutter);
-        this.renderedTiles.push(tile);
-      }
-    }
-
-    this.renderedRevision = sourceRevision;
-    this.renderedResolution = tileResolution * pixelRatio / tilePixelRatio * oversampling;
-    this.renderedExtent_ = imageExtent;
-  }
-
-  var scale = this.renderedResolution / viewResolution;
-  var transform = ol.transform.compose(this.imageTransform_,
-      pixelRatio * size[0] / 2, pixelRatio * size[1] / 2,
-      scale, scale,
-      0,
-      (this.renderedExtent_[0] - viewCenter[0]) / this.renderedResolution * pixelRatio,
-      (viewCenter[1] - this.renderedExtent_[3]) / this.renderedResolution * pixelRatio);
-  ol.transform.compose(this.coordinateToCanvasPixelTransform,
-      pixelRatio * size[0] / 2 - transform[4], pixelRatio * size[1] / 2 - transform[5],
-      pixelRatio / viewResolution, -pixelRatio / viewResolution,
-      0,
-      -viewCenter[0], -viewCenter[1]);
-
-
-  this.updateUsedTiles(frameState.usedTiles, tileSource, z, tileRange);
-  this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio,
-      projection, extent, z, tileLayer.getPreload());
-  this.scheduleExpireCache(frameState, tileSource);
-  this.updateLogos(frameState, tileSource);
-
-  return this.renderedTiles.length > 0;
-};
-
-
-/**
- * @param {ol.Tile} tile Tile.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @param {number} x Left of the tile.
- * @param {number} y Top of the tile.
- * @param {number} w Width of the tile.
- * @param {number} h Height of the tile.
- * @param {number} gutter Tile gutter.
- */
-ol.renderer.canvas.TileLayer.prototype.drawTileImage = function(tile, frameState, layerState, x, y, w, h, gutter) {
-  if (!this.getLayer().getSource().getOpaque(frameState.viewState.projection)) {
-    this.context.clearRect(x, y, w, h);
-  }
-  var image = tile.getImage();
-  if (image) {
-    this.context.drawImage(image, gutter, gutter,
-        image.width - 2 * gutter, image.height - 2 * gutter, x, y, w, h);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.TileLayer.prototype.getImage = function() {
-  var context = this.context;
-  return context ? context.canvas : null;
-};
-
-
-/**
- * @function
- * @return {ol.layer.Tile|ol.layer.VectorTile}
- */
-ol.renderer.canvas.TileLayer.prototype.getLayer;
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.TileLayer.prototype.getImageTransform = function() {
-  return this.imageTransform_;
-};
-
-// This file is automatically generated, do not edit
-/* eslint openlayers-internal/no-missing-requires: 0 */
-goog.provide('ol.renderer.webgl.tilelayershader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Fragment}
-   * @struct
-   */
-  ol.renderer.webgl.tilelayershader.Fragment = function() {
-    ol.webgl.Fragment.call(this, ol.renderer.webgl.tilelayershader.Fragment.SOURCE);
-  };
-  ol.inherits(ol.renderer.webgl.tilelayershader.Fragment, ol.webgl.Fragment);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.tilelayershader.Fragment.DEBUG_SOURCE = 'precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform sampler2D u_texture;\n\nvoid main(void) {\n  gl_FragColor = texture2D(u_texture, v_texCoord);\n}\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.tilelayershader.Fragment.OPTIMIZED_SOURCE = 'precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.tilelayershader.Fragment.SOURCE = ol.DEBUG_WEBGL ?
-      ol.renderer.webgl.tilelayershader.Fragment.DEBUG_SOURCE :
-      ol.renderer.webgl.tilelayershader.Fragment.OPTIMIZED_SOURCE;
-
-
-  ol.renderer.webgl.tilelayershader.fragment = new ol.renderer.webgl.tilelayershader.Fragment();
-
-
-  /**
-   * @constructor
-   * @extends {ol.webgl.Vertex}
-   * @struct
-   */
-  ol.renderer.webgl.tilelayershader.Vertex = function() {
-    ol.webgl.Vertex.call(this, ol.renderer.webgl.tilelayershader.Vertex.SOURCE);
-  };
-  ol.inherits(ol.renderer.webgl.tilelayershader.Vertex, ol.webgl.Vertex);
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.tilelayershader.Vertex.DEBUG_SOURCE = 'varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nuniform vec4 u_tileOffset;\n\nvoid main(void) {\n  gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\n  v_texCoord = a_texCoord;\n}\n\n\n';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.tilelayershader.Vertex.OPTIMIZED_SOURCE = 'varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}';
-
-
-  /**
-   * @const
-   * @type {string}
-   */
-  ol.renderer.webgl.tilelayershader.Vertex.SOURCE = ol.DEBUG_WEBGL ?
-      ol.renderer.webgl.tilelayershader.Vertex.DEBUG_SOURCE :
-      ol.renderer.webgl.tilelayershader.Vertex.OPTIMIZED_SOURCE;
-
-
-  ol.renderer.webgl.tilelayershader.vertex = new ol.renderer.webgl.tilelayershader.Vertex();
-
-
-  /**
-   * @constructor
-   * @param {WebGLRenderingContext} gl GL.
-   * @param {WebGLProgram} program Program.
-   * @struct
-   */
-  ol.renderer.webgl.tilelayershader.Locations = function(gl, program) {
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_texture = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_texture' : 'e');
-
-    /**
-     * @type {WebGLUniformLocation}
-     */
-    this.u_tileOffset = gl.getUniformLocation(
-        program, ol.DEBUG_WEBGL ? 'u_tileOffset' : 'd');
-
-    /**
-     * @type {number}
-     */
-    this.a_position = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_position' : 'b');
-
-    /**
-     * @type {number}
-     */
-    this.a_texCoord = gl.getAttribLocation(
-        program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'c');
-  };
-
-}
-
-// FIXME large resolutions lead to too large framebuffers :-(
-// FIXME animated shaders! check in redraw
-
-goog.provide('ol.renderer.webgl.TileLayer');
-
-goog.require('ol');
-goog.require('ol.TileState');
-goog.require('ol.TileRange');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.renderer.webgl.Layer');
-goog.require('ol.renderer.webgl.tilelayershader');
-goog.require('ol.size');
-goog.require('ol.transform');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-
-
-if (ol.ENABLE_WEBGL) {
-
-  /**
-   * @constructor
-   * @extends {ol.renderer.webgl.Layer}
-   * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
-   * @param {ol.layer.Tile} tileLayer Tile layer.
-   */
-  ol.renderer.webgl.TileLayer = function(mapRenderer, tileLayer) {
-
-    ol.renderer.webgl.Layer.call(this, mapRenderer, tileLayer);
-
-    /**
-     * @private
-     * @type {ol.webgl.Fragment}
-     */
-    this.fragmentShader_ = ol.renderer.webgl.tilelayershader.fragment;
-
-    /**
-     * @private
-     * @type {ol.webgl.Vertex}
-     */
-    this.vertexShader_ = ol.renderer.webgl.tilelayershader.vertex;
-
-    /**
-     * @private
-     * @type {ol.renderer.webgl.tilelayershader.Locations}
-     */
-    this.locations_ = null;
-
-    /**
-     * @private
-     * @type {ol.webgl.Buffer}
-     */
-    this.renderArrayBuffer_ = new ol.webgl.Buffer([
-      0, 0, 0, 1,
-      1, 0, 1, 1,
-      0, 1, 0, 0,
-      1, 1, 1, 0
-    ]);
-
-    /**
-     * @private
-     * @type {ol.TileRange}
-     */
-    this.renderedTileRange_ = null;
-
-    /**
-     * @private
-     * @type {ol.Extent}
-     */
-    this.renderedFramebufferExtent_ = null;
-
-    /**
-     * @private
-     * @type {number}
-     */
-    this.renderedRevision_ = -1;
-
-    /**
-     * @private
-     * @type {ol.Size}
-     */
-    this.tmpSize_ = [0, 0];
-
-  };
-  ol.inherits(ol.renderer.webgl.TileLayer, ol.renderer.webgl.Layer);
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.TileLayer.prototype.disposeInternal = function() {
-    var context = this.mapRenderer.getContext();
-    context.deleteBuffer(this.renderArrayBuffer_);
-    ol.renderer.webgl.Layer.prototype.disposeInternal.call(this);
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.TileLayer.prototype.createLoadedTileFinder = function(source, projection, tiles) {
-    var mapRenderer = this.mapRenderer;
-
-    return (
-        /**
-         * @param {number} zoom Zoom level.
-         * @param {ol.TileRange} tileRange Tile range.
-         * @return {boolean} The tile range is fully loaded.
-         */
-        function(zoom, tileRange) {
-          function callback(tile) {
-            var loaded = mapRenderer.isTileTextureLoaded(tile);
-            if (loaded) {
-              if (!tiles[zoom]) {
-                tiles[zoom] = {};
-              }
-              tiles[zoom][tile.tileCoord.toString()] = tile;
-            }
-            return loaded;
-          }
-          return source.forEachLoadedTile(projection, zoom, tileRange, callback);
-        });
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.TileLayer.prototype.handleWebGLContextLost = function() {
-    ol.renderer.webgl.Layer.prototype.handleWebGLContextLost.call(this);
-    this.locations_ = null;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.TileLayer.prototype.prepareFrame = function(frameState, layerState, context) {
-
-    var mapRenderer = this.mapRenderer;
-    var gl = context.getGL();
-
-    var viewState = frameState.viewState;
-    var projection = viewState.projection;
-
-    var tileLayer = /** @type {ol.layer.Tile} */ (this.getLayer());
-    var tileSource = tileLayer.getSource();
-    var tileGrid = tileSource.getTileGridForProjection(projection);
-    var z = tileGrid.getZForResolution(viewState.resolution);
-    var tileResolution = tileGrid.getResolution(z);
-
-    var tilePixelSize =
-        tileSource.getTilePixelSize(z, frameState.pixelRatio, projection);
-    var pixelRatio = tilePixelSize[0] /
-        ol.size.toSize(tileGrid.getTileSize(z), this.tmpSize_)[0];
-    var tilePixelResolution = tileResolution / pixelRatio;
-    var tileGutter = tileSource.getTilePixelRatio(pixelRatio) * tileSource.getGutter(projection);
-
-    var center = viewState.center;
-    var extent = frameState.extent;
-    var tileRange = tileGrid.getTileRangeForExtentAndResolution(
-        extent, tileResolution);
-
-    var framebufferExtent;
-    if (this.renderedTileRange_ &&
-        this.renderedTileRange_.equals(tileRange) &&
-        this.renderedRevision_ == tileSource.getRevision()) {
-      framebufferExtent = this.renderedFramebufferExtent_;
-    } else {
-
-      var tileRangeSize = tileRange.getSize();
-
-      var maxDimension = Math.max(
-          tileRangeSize[0] * tilePixelSize[0],
-          tileRangeSize[1] * tilePixelSize[1]);
-      var framebufferDimension = ol.math.roundUpToPowerOfTwo(maxDimension);
-      var framebufferExtentDimension = tilePixelResolution * framebufferDimension;
-      var origin = tileGrid.getOrigin(z);
-      var minX = origin[0] +
-          tileRange.minX * tilePixelSize[0] * tilePixelResolution;
-      var minY = origin[1] +
-          tileRange.minY * tilePixelSize[1] * tilePixelResolution;
-      framebufferExtent = [
-        minX, minY,
-        minX + framebufferExtentDimension, minY + framebufferExtentDimension
-      ];
-
-      this.bindFramebuffer(frameState, framebufferDimension);
-      gl.viewport(0, 0, framebufferDimension, framebufferDimension);
-
-      gl.clearColor(0, 0, 0, 0);
-      gl.clear(ol.webgl.COLOR_BUFFER_BIT);
-      gl.disable(ol.webgl.BLEND);
-
-      var program = context.getProgram(this.fragmentShader_, this.vertexShader_);
-      context.useProgram(program);
-      if (!this.locations_) {
-        // eslint-disable-next-line openlayers-internal/no-missing-requires
-        this.locations_ = new ol.renderer.webgl.tilelayershader.Locations(gl, program);
-      }
-
-      context.bindBuffer(ol.webgl.ARRAY_BUFFER, this.renderArrayBuffer_);
-      gl.enableVertexAttribArray(this.locations_.a_position);
-      gl.vertexAttribPointer(
-          this.locations_.a_position, 2, ol.webgl.FLOAT, false, 16, 0);
-      gl.enableVertexAttribArray(this.locations_.a_texCoord);
-      gl.vertexAttribPointer(
-          this.locations_.a_texCoord, 2, ol.webgl.FLOAT, false, 16, 8);
-      gl.uniform1i(this.locations_.u_texture, 0);
-
-      /**
-       * @type {Object.<number, Object.<string, ol.Tile>>}
-       */
-      var tilesToDrawByZ = {};
-      tilesToDrawByZ[z] = {};
-
-      var findLoadedTiles = this.createLoadedTileFinder(
-          tileSource, projection, tilesToDrawByZ);
-
-      var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();
-      var allTilesLoaded = true;
-      var tmpExtent = ol.extent.createEmpty();
-      var tmpTileRange = new ol.TileRange(0, 0, 0, 0);
-      var childTileRange, drawable, fullyLoaded, tile, tileState;
-      var x, y, tileExtent;
-      for (x = tileRange.minX; x <= tileRange.maxX; ++x) {
-        for (y = tileRange.minY; y <= tileRange.maxY; ++y) {
-
-          tile = tileSource.getTile(z, x, y, pixelRatio, projection);
-          if (layerState.extent !== undefined) {
-            // ignore tiles outside layer extent
-            tileExtent = tileGrid.getTileCoordExtent(tile.tileCoord, tmpExtent);
-            if (!ol.extent.intersects(tileExtent, layerState.extent)) {
-              continue;
-            }
-          }
-          tileState = tile.getState();
-          drawable = tileState == ol.TileState.LOADED ||
-              tileState == ol.TileState.EMPTY ||
-              tileState == ol.TileState.ERROR && !useInterimTilesOnError;
-          if (!drawable) {
-            tile = tile.getInterimTile();
-          }
-          tileState = tile.getState();
-          if (tileState == ol.TileState.LOADED) {
-            if (mapRenderer.isTileTextureLoaded(tile)) {
-              tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;
-              continue;
-            }
-          } else if (tileState == ol.TileState.EMPTY ||
-                     (tileState == ol.TileState.ERROR &&
-                      !useInterimTilesOnError)) {
-            continue;
-          }
-
-          allTilesLoaded = false;
-          fullyLoaded = tileGrid.forEachTileCoordParentTileRange(
-              tile.tileCoord, findLoadedTiles, null, tmpTileRange, tmpExtent);
-          if (!fullyLoaded) {
-            childTileRange = tileGrid.getTileCoordChildTileRange(
-                tile.tileCoord, tmpTileRange, tmpExtent);
-            if (childTileRange) {
-              findLoadedTiles(z + 1, childTileRange);
-            }
-          }
-
-        }
-
-      }
-
-      /** @type {Array.<number>} */
-      var zs = Object.keys(tilesToDrawByZ).map(Number);
-      zs.sort(ol.array.numberSafeCompareFunction);
-      var u_tileOffset = new Float32Array(4);
-      var i, ii, tileKey, tilesToDraw;
-      for (i = 0, ii = zs.length; i < ii; ++i) {
-        tilesToDraw = tilesToDrawByZ[zs[i]];
-        for (tileKey in tilesToDraw) {
-          tile = tilesToDraw[tileKey];
-          tileExtent = tileGrid.getTileCoordExtent(tile.tileCoord, tmpExtent);
-          u_tileOffset[0] = 2 * (tileExtent[2] - tileExtent[0]) /
-              framebufferExtentDimension;
-          u_tileOffset[1] = 2 * (tileExtent[3] - tileExtent[1]) /
-              framebufferExtentDimension;
-          u_tileOffset[2] = 2 * (tileExtent[0] - framebufferExtent[0]) /
-              framebufferExtentDimension - 1;
-          u_tileOffset[3] = 2 * (tileExtent[1] - framebufferExtent[1]) /
-              framebufferExtentDimension - 1;
-          gl.uniform4fv(this.locations_.u_tileOffset, u_tileOffset);
-          mapRenderer.bindTileTexture(tile, tilePixelSize,
-              tileGutter * pixelRatio, ol.webgl.LINEAR, ol.webgl.LINEAR);
-          gl.drawArrays(ol.webgl.TRIANGLE_STRIP, 0, 4);
-        }
-      }
-
-      if (allTilesLoaded) {
-        this.renderedTileRange_ = tileRange;
-        this.renderedFramebufferExtent_ = framebufferExtent;
-        this.renderedRevision_ = tileSource.getRevision();
-      } else {
-        this.renderedTileRange_ = null;
-        this.renderedFramebufferExtent_ = null;
-        this.renderedRevision_ = -1;
-        frameState.animate = true;
-      }
-
-    }
-
-    this.updateUsedTiles(frameState.usedTiles, tileSource, z, tileRange);
-    var tileTextureQueue = mapRenderer.getTileTextureQueue();
-    this.manageTilePyramid(
-        frameState, tileSource, tileGrid, pixelRatio, projection, extent, z,
-        tileLayer.getPreload(),
-        /**
-         * @param {ol.Tile} tile Tile.
-         */
-        function(tile) {
-          if (tile.getState() == ol.TileState.LOADED &&
-              !mapRenderer.isTileTextureLoaded(tile) &&
-              !tileTextureQueue.isKeyQueued(tile.getKey())) {
-            tileTextureQueue.enqueue([
-              tile,
-              tileGrid.getTileCoordCenter(tile.tileCoord),
-              tileGrid.getResolution(tile.tileCoord[0]),
-              tilePixelSize, tileGutter * pixelRatio
-            ]);
-          }
-        }, this);
-    this.scheduleExpireCache(frameState, tileSource);
-    this.updateLogos(frameState, tileSource);
-
-    var texCoordMatrix = this.texCoordMatrix;
-    ol.transform.reset(texCoordMatrix);
-    ol.transform.translate(texCoordMatrix,
-        (Math.round(center[0] / tileResolution) * tileResolution - framebufferExtent[0]) /
-            (framebufferExtent[2] - framebufferExtent[0]),
-        (Math.round(center[1] / tileResolution) * tileResolution - framebufferExtent[1]) /
-            (framebufferExtent[3] - framebufferExtent[1]));
-    if (viewState.rotation !== 0) {
-      ol.transform.rotate(texCoordMatrix, viewState.rotation);
-    }
-    ol.transform.scale(texCoordMatrix,
-        frameState.size[0] * viewState.resolution /
-            (framebufferExtent[2] - framebufferExtent[0]),
-        frameState.size[1] * viewState.resolution /
-            (framebufferExtent[3] - framebufferExtent[1]));
-    ol.transform.translate(texCoordMatrix, -0.5, -0.5);
-
-    return true;
-  };
-
-
-  /**
-   * @inheritDoc
-   */
-  ol.renderer.webgl.TileLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
-    if (!this.framebuffer) {
-      return undefined;
-    }
-
-    var pixelOnMapScaled = [
-      pixel[0] / frameState.size[0],
-      (frameState.size[1] - pixel[1]) / frameState.size[1]];
-
-    var pixelOnFrameBufferScaled = ol.transform.apply(
-        this.texCoordMatrix, pixelOnMapScaled.slice());
-    var pixelOnFrameBuffer = [
-      pixelOnFrameBufferScaled[0] * this.framebufferDimension,
-      pixelOnFrameBufferScaled[1] * this.framebufferDimension];
-
-    var gl = this.mapRenderer.getContext().getGL();
-    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);
-    var imageData = new Uint8Array(4);
-    gl.readPixels(pixelOnFrameBuffer[0], pixelOnFrameBuffer[1], 1, 1,
-        gl.RGBA, gl.UNSIGNED_BYTE, imageData);
-
-    if (imageData[3] > 0) {
-      return callback.call(thisArg, this.getLayer(), imageData);
-    } else {
-      return undefined;
-    }
-  };
-
-}
-
-goog.provide('ol.layer.Tile');
-
-goog.require('ol');
-goog.require('ol.layer.Layer');
-goog.require('ol.layer.TileProperty');
-goog.require('ol.obj');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.canvas.TileLayer');
-goog.require('ol.renderer.webgl.TileLayer');
-
-
-/**
- * @classdesc
- * For layer sources that provide pre-rendered, tiled images in grids that are
- * organized by zoom levels for specific resolutions.
- * Note that any property set in the options is set as a {@link ol.Object}
- * property on the layer object; for example, setting `title: 'My Title'` in the
- * options means that `title` is observable, and has get/set accessors.
- *
- * @constructor
- * @extends {ol.layer.Layer}
- * @fires ol.render.Event
- * @param {olx.layer.TileOptions=} opt_options Tile layer options.
- * @api
- */
-ol.layer.Tile = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  var baseOptions = ol.obj.assign({}, options);
-
-  delete baseOptions.preload;
-  delete baseOptions.useInterimTilesOnError;
-  ol.layer.Layer.call(this,  /** @type {olx.layer.LayerOptions} */ (baseOptions));
-
-  this.setPreload(options.preload !== undefined ? options.preload : 0);
-  this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?
-      options.useInterimTilesOnError : true);
-};
-ol.inherits(ol.layer.Tile, ol.layer.Layer);
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Tile.prototype.createRenderer = function(mapRenderer) {
-  var renderer = null;
-  var type = mapRenderer.getType();
-  if (ol.ENABLE_CANVAS && type === ol.renderer.Type.CANVAS) {
-    renderer = new ol.renderer.canvas.TileLayer(this);
-  } else if (ol.ENABLE_WEBGL && type === ol.renderer.Type.WEBGL) {
-    renderer = new ol.renderer.webgl.TileLayer(/** @type {ol.renderer.webgl.Map} */ (mapRenderer), this);
-  }
-  return renderer;
-};
-
-
-/**
- * Return the level as number to which we will preload tiles up to.
- * @return {number} The level to preload tiles up to.
- * @observable
- * @api
- */
-ol.layer.Tile.prototype.getPreload = function() {
-  return /** @type {number} */ (this.get(ol.layer.TileProperty.PRELOAD));
-};
-
-
-/**
- * Return the associated {@link ol.source.Tile tilesource} of the layer.
- * @function
- * @return {ol.source.Tile} Source.
- * @api
- */
-ol.layer.Tile.prototype.getSource;
-
-
-/**
- * Set the level as number to which we will preload tiles up to.
- * @param {number} preload The level to preload tiles up to.
- * @observable
- * @api
- */
-ol.layer.Tile.prototype.setPreload = function(preload) {
-  this.set(ol.layer.TileProperty.PRELOAD, preload);
-};
-
-
-/**
- * Whether we use interim tiles on error.
- * @return {boolean} Use interim tiles on error.
- * @observable
- * @api
- */
-ol.layer.Tile.prototype.getUseInterimTilesOnError = function() {
-  return /** @type {boolean} */ (
-      this.get(ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR));
-};
-
-
-/**
- * Set whether we use interim tiles on error.
- * @param {boolean} useInterimTilesOnError Use interim tiles on error.
- * @observable
- * @api
- */
-ol.layer.Tile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) {
-  this.set(
-      ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
-};
-
-goog.provide('ol.layer.VectorTileRenderType');
-
-/**
- * @enum {string}
- * Render mode for vector tiles:
- *  * `'image'`: Vector tiles are rendered as images. Great performance, but
- *    point symbols and texts are always rotated with the view and pixels are
- *    scaled during zoom animations.
- *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels
- *    are scaled during zoom animations. Point symbols and texts are accurately
- *    rendered as vectors and can stay upright on rotated views.
- *  * `'vector'`: Vector tiles are rendered as vectors. Most accurate rendering
- *    even during animations, but slower performance than the other options.
- * @api
- */
-ol.layer.VectorTileRenderType = {
-  IMAGE: 'image',
-  HYBRID: 'hybrid',
-  VECTOR: 'vector'
-};
-
-goog.provide('ol.renderer.canvas.VectorTileLayer');
-
-goog.require('ol');
-goog.require('ol.TileState');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.proj');
-goog.require('ol.proj.Units');
-goog.require('ol.layer.VectorTileRenderType');
-goog.require('ol.render.ReplayType');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.ReplayGroup');
-goog.require('ol.render.replay');
-goog.require('ol.renderer.canvas.TileLayer');
-goog.require('ol.renderer.vector');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.canvas.TileLayer}
- * @param {ol.layer.VectorTile} layer VectorTile layer.
- */
-ol.renderer.canvas.VectorTileLayer = function(layer) {
-
-  /**
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context = null;
-
-  ol.renderer.canvas.TileLayer.call(this, layer);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.dirty_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedLayerRevision_;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.tmpTransform_ = ol.transform.create();
-
-  // Use lower resolution for pure vector rendering. Closest resolution otherwise.
-  this.zDirection =
-      layer.getRenderMode() == ol.layer.VectorTileRenderType.VECTOR ? 1 : 0;
-
-};
-ol.inherits(ol.renderer.canvas.VectorTileLayer, ol.renderer.canvas.TileLayer);
-
-
-/**
- * @const
- * @type {!Object.<string, Array.<ol.render.ReplayType>>}
- */
-ol.renderer.canvas.VectorTileLayer.IMAGE_REPLAYS = {
-  'image': ol.render.replay.ORDER,
-  'hybrid': [ol.render.ReplayType.POLYGON, ol.render.ReplayType.LINE_STRING]
-};
-
-
-/**
- * @const
- * @type {!Object.<string, Array.<ol.render.ReplayType>>}
- */
-ol.renderer.canvas.VectorTileLayer.VECTOR_REPLAYS = {
-  'hybrid': [ol.render.ReplayType.IMAGE, ol.render.ReplayType.TEXT],
-  'vector': ol.render.replay.ORDER
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorTileLayer.prototype.prepareFrame = function(frameState, layerState) {
-  var layer = this.getLayer();
-  var layerRevision = layer.getRevision();
-  if (this.renderedLayerRevision_ != layerRevision) {
-    this.renderedTiles.length = 0;
-    var renderMode = layer.getRenderMode();
-    if (!this.context && renderMode != ol.layer.VectorTileRenderType.VECTOR) {
-      this.context = ol.dom.createCanvasContext2D();
-    }
-    if (this.context && renderMode == ol.layer.VectorTileRenderType.VECTOR) {
-      this.context = null;
-    }
-  }
-  this.renderedLayerRevision_ = layerRevision;
-  return ol.renderer.canvas.TileLayer.prototype.prepareFrame.apply(this, arguments);
-};
-
-
-/**
- * @param {ol.VectorImageTile} tile Tile.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.canvas.VectorTileLayer.prototype.createReplayGroup_ = function(
-    tile, frameState) {
-  var layer = this.getLayer();
-  var pixelRatio = frameState.pixelRatio;
-  var projection = frameState.viewState.projection;
-  var revision = layer.getRevision();
-  var renderOrder = /** @type {ol.RenderOrderFunction} */
-      (layer.getRenderOrder()) || null;
-
-  var replayState = tile.getReplayState();
-  if (!replayState.dirty && replayState.renderedRevision == revision &&
-      replayState.renderedRenderOrder == renderOrder) {
-    return;
-  }
-
-  for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {
-    var sourceTile = tile.getTile(tile.tileKeys[t]);
-    sourceTile.replayGroup = null;
-    replayState.dirty = false;
-
-    var source = /** @type {ol.source.VectorTile} */ (layer.getSource());
-    var sourceTileGrid = source.getTileGrid();
-    var sourceTileCoord = sourceTile.tileCoord;
-    var tileProjection = sourceTile.getProjection();
-    var tileGrid = source.getTileGridForProjection(projection);
-    var resolution = tileGrid.getResolution(tile.tileCoord[0]);
-    var sourceTileResolution = sourceTileGrid.getResolution(sourceTile.tileCoord[0]);
-    var tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);
-    var sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);
-    var sharedExtent = ol.extent.getIntersection(tileExtent, sourceTileExtent);
-    var extent, reproject, tileResolution;
-    if (tileProjection.getUnits() == ol.proj.Units.TILE_PIXELS) {
-      var tilePixelRatio = tileResolution = source.getTilePixelRatio();
-      var transform = ol.transform.compose(this.tmpTransform_,
-          0, 0,
-          1 / sourceTileResolution * tilePixelRatio, -1 / sourceTileResolution * tilePixelRatio,
-          0,
-          -sourceTileExtent[0], -sourceTileExtent[3]);
-      extent = (ol.transform.apply(transform, [sharedExtent[0], sharedExtent[3]])
-          .concat(ol.transform.apply(transform, [sharedExtent[2], sharedExtent[1]])));
-    } else {
-      tileResolution = resolution;
-      extent = sharedExtent;
-      if (!ol.proj.equivalent(projection, tileProjection)) {
-        reproject = true;
-        sourceTile.setProjection(projection);
-      }
-    }
-    replayState.dirty = false;
-    var replayGroup = new ol.render.canvas.ReplayGroup(0, extent,
-        tileResolution, source.getOverlaps(), layer.getRenderBuffer());
-    var squaredTolerance = ol.renderer.vector.getSquaredTolerance(
-        tileResolution, pixelRatio);
-
-    /**
-     * @param {ol.Feature|ol.render.Feature} feature Feature.
-     * @this {ol.renderer.canvas.VectorTileLayer}
-     */
-    var renderFeature = function(feature) {
-      var styles;
-      var styleFunction = feature.getStyleFunction();
-      if (styleFunction) {
-        styles = styleFunction.call(/** @type {ol.Feature} */ (feature), resolution);
-      } else {
-        styleFunction = layer.getStyleFunction();
-        if (styleFunction) {
-          styles = styleFunction(feature, resolution);
-        }
-      }
-      if (styles) {
-        if (!Array.isArray(styles)) {
-          styles = [styles];
-        }
-        var dirty = this.renderFeature(feature, squaredTolerance, styles,
-            replayGroup);
-        this.dirty_ = this.dirty_ || dirty;
-        replayState.dirty = replayState.dirty || dirty;
-      }
-    };
-
-    var features = sourceTile.getFeatures();
-    if (renderOrder && renderOrder !== replayState.renderedRenderOrder) {
-      features.sort(renderOrder);
-    }
-    var feature;
-    for (var i = 0, ii = features.length; i < ii; ++i) {
-      feature = features[i];
-      if (reproject) {
-        feature.getGeometry().transform(tileProjection, projection);
-      }
-      renderFeature.call(this, feature);
-    }
-    replayGroup.finish();
-    sourceTile.setReplayGroup(tile.tileCoord.toString(), replayGroup);
-  }
-  replayState.renderedRevision = revision;
-  replayState.renderedRenderOrder = renderOrder;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorTileLayer.prototype.drawTileImage = function(
-    tile, frameState, layerState, x, y, w, h, gutter) {
-  var vectorImageTile = /** @type {ol.VectorImageTile} */ (tile);
-  this.createReplayGroup_(vectorImageTile, frameState);
-  if (this.context) {
-    this.renderTileImage_(vectorImageTile, frameState, layerState);
-    ol.renderer.canvas.TileLayer.prototype.drawTileImage.apply(this, arguments);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorTileLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-  var resolution = frameState.viewState.resolution;
-  var rotation = frameState.viewState.rotation;
-  hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;
-  var layer = this.getLayer();
-  /** @type {Object.<string, boolean>} */
-  var features = {};
-
-  /** @type {Array.<ol.VectorImageTile>} */
-  var renderedTiles = this.renderedTiles;
-
-  var source = /** @type {ol.source.VectorTile} */ (layer.getSource());
-  var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);
-  var sourceTileGrid = source.getTileGrid();
-  var bufferedExtent, found, tileSpaceCoordinate;
-  var i, ii, origin, replayGroup;
-  var tile, tileCoord, tileExtent, tilePixelRatio, tileResolution;
-  for (i = 0, ii = renderedTiles.length; i < ii; ++i) {
-    tile = renderedTiles[i];
-    tileCoord = tile.tileCoord;
-    tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);
-    bufferedExtent = ol.extent.buffer(tileExtent, hitTolerance * resolution, bufferedExtent);
-    if (!ol.extent.containsCoordinate(bufferedExtent, coordinate)) {
-      continue;
-    }
-    for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {
-      var sourceTile = tile.getTile(tile.tileKeys[t]);
-      if (sourceTile.getProjection().getUnits() === ol.proj.Units.TILE_PIXELS) {
-        var sourceTileCoord = sourceTile.tileCoord;
-        var sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord, this.tmpExtent);
-        origin = ol.extent.getTopLeft(sourceTileExtent);
-        tilePixelRatio = source.getTilePixelRatio();
-        tileResolution = sourceTileGrid.getResolution(sourceTileCoord[0]) / tilePixelRatio;
-        tileSpaceCoordinate = [
-          (coordinate[0] - origin[0]) / tileResolution,
-          (origin[1] - coordinate[1]) / tileResolution
-        ];
-        resolution = tilePixelRatio;
-      } else {
-        tileSpaceCoordinate = coordinate;
-      }
-      replayGroup = sourceTile.getReplayGroup(tile.tileCoord);
-      found = found || replayGroup.forEachFeatureAtCoordinate(
-          tileSpaceCoordinate, resolution, rotation, hitTolerance, {},
-          /**
-           * @param {ol.Feature|ol.render.Feature} feature Feature.
-           * @return {?} Callback result.
-           */
-          function(feature) {
-            var key = ol.getUid(feature).toString();
-            if (!(key in features)) {
-              features[key] = true;
-              return callback.call(thisArg, feature, layer);
-            }
-          });
-    }
-  }
-  return found;
-};
-
-
-/**
- * @param {ol.VectorTile} tile Tile.
- * @param {olx.FrameState} frameState Frame state.
- * @return {ol.Transform} transform Transform.
- * @private
- */
-ol.renderer.canvas.VectorTileLayer.prototype.getReplayTransform_ = function(tile, frameState) {
-  if (tile.getProjection().getUnits() == ol.proj.Units.TILE_PIXELS) {
-    var layer = this.getLayer();
-    var source = /** @type {ol.source.VectorTile} */ (layer.getSource());
-    var tileGrid = source.getTileGrid();
-    var tileCoord = tile.tileCoord;
-    var tileResolution =
-        tileGrid.getResolution(tileCoord[0]) / source.getTilePixelRatio();
-    var viewState = frameState.viewState;
-    var pixelRatio = frameState.pixelRatio;
-    var renderResolution = viewState.resolution / pixelRatio;
-    var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);
-    var center = viewState.center;
-    var origin = ol.extent.getTopLeft(tileExtent);
-    var size = frameState.size;
-    var offsetX = Math.round(pixelRatio * size[0] / 2);
-    var offsetY = Math.round(pixelRatio * size[1] / 2);
-    return ol.transform.compose(this.tmpTransform_,
-        offsetX, offsetY,
-        tileResolution / renderResolution, tileResolution / renderResolution,
-        viewState.rotation,
-        (origin[0] - center[0]) / tileResolution,
-        (center[1] - origin[1]) / tileResolution);
-  } else {
-    return this.getTransform(frameState, 0);
-  }
-};
-
-
-/**
- * Handle changes in image style state.
- * @param {ol.events.Event} event Image style change event.
- * @private
- */
-ol.renderer.canvas.VectorTileLayer.prototype.handleStyleImageChange_ = function(event) {
-  this.renderIfReadyAndVisible();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorTileLayer.prototype.postCompose = function(context, frameState, layerState) {
-  var layer = this.getLayer();
-  var source = layer.getSource();
-  var renderMode = layer.getRenderMode();
-  var replays = ol.renderer.canvas.VectorTileLayer.VECTOR_REPLAYS[renderMode];
-  if (replays) {
-    var pixelRatio = frameState.pixelRatio;
-    var rotation = frameState.viewState.rotation;
-    var size = frameState.size;
-    var offsetX = Math.round(pixelRatio * size[0] / 2);
-    var offsetY = Math.round(pixelRatio * size[1] / 2);
-    var tiles = this.renderedTiles;
-    var tilePixelRatio = layer.getSource().getTilePixelRatio();
-    var sourceTileGrid = source.getTileGrid();
-    var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);
-    var clips = [];
-    var zs = [];
-    for (var i = tiles.length - 1; i >= 0; --i) {
-      var tile = /** @type {ol.VectorImageTile} */ (tiles[i]);
-      if (tile.getState() == ol.TileState.ABORT) {
-        continue;
-      }
-      var tileCoord = tile.tileCoord;
-      var worldOffset = tileGrid.getTileCoordExtent(tileCoord)[0] -
-          tileGrid.getTileCoordExtent(tile.wrappedTileCoord)[0];
-      for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {
-        var sourceTile = tile.getTile(tile.tileKeys[t]);
-        var currentZ = sourceTile.tileCoord[0];
-        var sourceResolution = sourceTileGrid.getResolution(currentZ);
-        var transform = this.getReplayTransform_(sourceTile, frameState);
-        ol.transform.translate(transform, worldOffset * tilePixelRatio / sourceResolution, 0);
-        var replayGroup = sourceTile.getReplayGroup(tileCoord.toString());
-        var currentClip = replayGroup.getClipCoords(transform);
-        context.save();
-        context.globalAlpha = layerState.opacity;
-        ol.render.canvas.rotateAtOffset(context, -rotation, offsetX, offsetY);
-        // Create a clip mask for regions in this low resolution tile that are
-        // already filled by a higher resolution tile
-        for (var j = 0, jj = clips.length; j < jj; ++j) {
-          var clip = clips[j];
-          if (currentZ < zs[j]) {
-            context.beginPath();
-            // counter-clockwise (outer ring) for current tile
-            context.moveTo(currentClip[0], currentClip[1]);
-            context.lineTo(currentClip[2], currentClip[3]);
-            context.lineTo(currentClip[4], currentClip[5]);
-            context.lineTo(currentClip[6], currentClip[7]);
-            // clockwise (inner ring) for higher resolution tile
-            context.moveTo(clip[6], clip[7]);
-            context.lineTo(clip[4], clip[5]);
-            context.lineTo(clip[2], clip[3]);
-            context.lineTo(clip[0], clip[1]);
-            context.clip();
-          }
-        }
-        replayGroup.replay(context, pixelRatio, transform, rotation, {}, replays);
-        context.restore();
-        clips.push(currentClip);
-        zs.push(currentZ);
-      }
-    }
-  }
-  ol.renderer.canvas.TileLayer.prototype.postCompose.apply(this, arguments);
-};
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
- *     styles.
- * @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
- * @return {boolean} `true` if an image is loading.
- */
-ol.renderer.canvas.VectorTileLayer.prototype.renderFeature = function(feature, squaredTolerance, styles, replayGroup) {
-  if (!styles) {
-    return false;
-  }
-  var loading = false;
-  if (Array.isArray(styles)) {
-    for (var i = 0, ii = styles.length; i < ii; ++i) {
-      loading = ol.renderer.vector.renderFeature(
-          replayGroup, feature, styles[i], squaredTolerance,
-          this.handleStyleImageChange_, this) || loading;
-    }
-  } else {
-    loading = ol.renderer.vector.renderFeature(
-        replayGroup, feature, styles, squaredTolerance,
-        this.handleStyleImageChange_, this) || loading;
-  }
-  return loading;
-};
-
-
-/**
- * @param {ol.VectorImageTile} tile Tile.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @private
- */
-ol.renderer.canvas.VectorTileLayer.prototype.renderTileImage_ = function(
-    tile, frameState, layerState) {
-  var layer = this.getLayer();
-  var replayState = tile.getReplayState();
-  var revision = layer.getRevision();
-  var replays = ol.renderer.canvas.VectorTileLayer.IMAGE_REPLAYS[layer.getRenderMode()];
-  if (replays && replayState.renderedTileRevision !== revision) {
-    replayState.renderedTileRevision = revision;
-    var tileCoord = tile.wrappedTileCoord;
-    var z = tileCoord[0];
-    var pixelRatio = frameState.pixelRatio;
-    var source = layer.getSource();
-    var sourceTileGrid = source.getTileGrid();
-    var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);
-    var resolution = tileGrid.getResolution(z);
-    var tilePixelRatio = source.getTilePixelRatio();
-    var context = tile.getContext();
-    var size = source.getTilePixelSize(z, pixelRatio, frameState.viewState.projection);
-    context.canvas.width = size[0];
-    context.canvas.height = size[1];
-    var tileExtent = tileGrid.getTileCoordExtent(tileCoord);
-    for (var i = 0, ii = tile.tileKeys.length; i < ii; ++i) {
-      var sourceTile = tile.getTile(tile.tileKeys[i]);
-      var sourceTileCoord = sourceTile.tileCoord;
-      var pixelScale = pixelRatio / resolution;
-      var transform = ol.transform.reset(this.tmpTransform_);
-      if (sourceTile.getProjection().getUnits() == ol.proj.Units.TILE_PIXELS) {
-        var sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord, this.tmpExtent);
-        var sourceResolution = sourceTileGrid.getResolution(sourceTileCoord[0]);
-        var renderPixelRatio = pixelRatio / tilePixelRatio * sourceResolution / resolution;
-        ol.transform.scale(transform, renderPixelRatio, renderPixelRatio);
-        var offsetX = (sourceTileExtent[0] - tileExtent[0]) / sourceResolution * tilePixelRatio;
-        var offsetY = (tileExtent[3] - sourceTileExtent[3]) / sourceResolution * tilePixelRatio;
-        ol.transform.translate(transform, Math.round(offsetX), Math.round(offsetY));
-      } else {
-        ol.transform.scale(transform, pixelScale, -pixelScale);
-        ol.transform.translate(transform, -tileExtent[0], -tileExtent[3]);
-      }
-      var replayGroup = sourceTile.getReplayGroup(tile.tileCoord.toString());
-      replayGroup.replay(context, pixelRatio, transform, 0, {}, replays);
-    }
-  }
-};
-
-goog.provide('ol.layer.VectorTile');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.layer.TileProperty');
-goog.require('ol.layer.Vector');
-goog.require('ol.layer.VectorTileRenderType');
-goog.require('ol.obj');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.canvas.VectorTileLayer');
-
-
-/**
- * @classdesc
- * Layer for vector tile data that is rendered client-side.
- * Note that any property set in the options is set as a {@link ol.Object}
- * property on the layer object; for example, setting `title: 'My Title'` in the
- * options means that `title` is observable, and has get/set accessors.
- *
- * @constructor
- * @extends {ol.layer.Vector}
- * @param {olx.layer.VectorTileOptions=} opt_options Options.
- * @api
- */
-ol.layer.VectorTile = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  var baseOptions = ol.obj.assign({}, options);
-
-  delete baseOptions.preload;
-  delete baseOptions.useInterimTilesOnError;
-  ol.layer.Vector.call(this,  /** @type {olx.layer.VectorOptions} */ (baseOptions));
-
-  this.setPreload(options.preload ? options.preload : 0);
-  this.setUseInterimTilesOnError(options.useInterimTilesOnError ?
-      options.useInterimTilesOnError : true);
-
-  ol.asserts.assert(options.renderMode == undefined ||
-      options.renderMode == ol.layer.VectorTileRenderType.IMAGE ||
-      options.renderMode == ol.layer.VectorTileRenderType.HYBRID ||
-      options.renderMode == ol.layer.VectorTileRenderType.VECTOR,
-      28); // `renderMode` must be `'image'`, `'hybrid'` or `'vector'`
-
-  /**
-   * @private
-   * @type {ol.layer.VectorTileRenderType|string}
-   */
-  this.renderMode_ = options.renderMode || ol.layer.VectorTileRenderType.HYBRID;
-
-};
-ol.inherits(ol.layer.VectorTile, ol.layer.Vector);
-
-
-/**
- * @inheritDoc
- */
-ol.layer.VectorTile.prototype.createRenderer = function(mapRenderer) {
-  var renderer = null;
-  var type = mapRenderer.getType();
-  if (ol.ENABLE_CANVAS && type === ol.renderer.Type.CANVAS) {
-    renderer = new ol.renderer.canvas.VectorTileLayer(this);
-  }
-  return renderer;
-};
-
-
-/**
- * Return the level as number to which we will preload tiles up to.
- * @return {number} The level to preload tiles up to.
- * @observable
- * @api
- */
-ol.layer.VectorTile.prototype.getPreload = function() {
-  return /** @type {number} */ (this.get(ol.layer.TileProperty.PRELOAD));
-};
-
-
-/**
- * @return {ol.layer.VectorTileRenderType|string} The render mode.
- */
-ol.layer.VectorTile.prototype.getRenderMode = function() {
-  return this.renderMode_;
-};
-
-
-/**
- * Whether we use interim tiles on error.
- * @return {boolean} Use interim tiles on error.
- * @observable
- * @api
- */
-ol.layer.VectorTile.prototype.getUseInterimTilesOnError = function() {
-  return /** @type {boolean} */ (
-      this.get(ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR));
-};
-
-
-/**
- * Set the level as number to which we will preload tiles up to.
- * @param {number} preload The level to preload tiles up to.
- * @observable
- * @api
- */
-ol.layer.VectorTile.prototype.setPreload = function(preload) {
-  this.set(ol.layer.TileProperty.PRELOAD, preload);
-};
-
-
-/**
- * Set whether we use interim tiles on error.
- * @param {boolean} useInterimTilesOnError Use interim tiles on error.
- * @observable
- * @api
- */
-ol.layer.VectorTile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) {
-  this.set(
-      ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
-};
-
-goog.provide('ol.net');
-
-goog.require('ol');
-
-
-/**
- * Simple JSONP helper. Supports error callbacks and a custom callback param.
- * The error callback will be called when no JSONP is executed after 10 seconds.
- *
- * @param {string} url Request url. A 'callback' query parameter will be
- *     appended.
- * @param {Function} callback Callback on success.
- * @param {function()=} opt_errback Callback on error.
- * @param {string=} opt_callbackParam Custom query parameter for the JSONP
- *     callback. Default is 'callback'.
- */
-ol.net.jsonp = function(url, callback, opt_errback, opt_callbackParam) {
-  var script = document.createElement('script');
-  var key = 'olc_' + ol.getUid(callback);
-  function cleanup() {
-    delete window[key];
-    script.parentNode.removeChild(script);
-  }
-  script.async = true;
-  script.src = url + (url.indexOf('?') == -1 ? '?' : '&') +
-      (opt_callbackParam || 'callback') + '=' + key;
-  var timer = setTimeout(function() {
-    cleanup();
-    if (opt_errback) {
-      opt_errback();
-    }
-  }, 10000);
-  window[key] = function(data) {
-    clearTimeout(timer);
-    cleanup();
-    callback(data);
-  };
-  document.getElementsByTagName('head')[0].appendChild(script);
-};
-
-goog.provide('ol.proj.common');
-
-goog.require('ol.proj');
-
-
-/**
- * Deprecated.  Transforms between EPSG:4326 and EPSG:3857 are now included by
- * default.  There is no need to call this function in application code and it
- * will be removed in a future major release.
- * @deprecated This function is no longer necessary.
- * @api
- */
-ol.proj.common.add = ol.proj.addCommon;
-
-goog.provide('ol.render');
-
-goog.require('ol.has');
-goog.require('ol.transform');
-goog.require('ol.render.canvas.Immediate');
-
-
-/**
- * Binds a Canvas Immediate API to a canvas context, to allow drawing geometries
- * to the context's canvas.
- *
- * The units for geometry coordinates are css pixels relative to the top left
- * corner of the canvas element.
- * ```js
- * var canvas = document.createElement('canvas');
- * var render = ol.render.toContext(canvas.getContext('2d'),
- *     { size: [100, 100] });
- * render.setFillStrokeStyle(new ol.style.Fill({ color: blue }));
- * render.drawPolygon(
- *     new ol.geom.Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]]));
- * ```
- *
- * @param {CanvasRenderingContext2D} context Canvas context.
- * @param {olx.render.ToContextOptions=} opt_options Options.
- * @return {ol.render.canvas.Immediate} Canvas Immediate.
- * @api
- */
-ol.render.toContext = function(context, opt_options) {
-  var canvas = context.canvas;
-  var options = opt_options ? opt_options : {};
-  var pixelRatio = options.pixelRatio || ol.has.DEVICE_PIXEL_RATIO;
-  var size = options.size;
-  if (size) {
-    canvas.width = size[0] * pixelRatio;
-    canvas.height = size[1] * pixelRatio;
-    canvas.style.width = size[0] + 'px';
-    canvas.style.height = size[1] + 'px';
-  }
-  var extent = [0, 0, canvas.width, canvas.height];
-  var transform = ol.transform.scale(ol.transform.create(), pixelRatio, pixelRatio);
-  return new ol.render.canvas.Immediate(context, pixelRatio, extent, transform,
-      0);
-};
-
-goog.provide('ol.reproj.Tile');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.reproj');
-goog.require('ol.reproj.Triangulation');
-
-
-/**
- * @classdesc
- * Class encapsulating single reprojected tile.
- * See {@link ol.source.TileImage}.
- *
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.proj.Projection} sourceProj Source projection.
- * @param {ol.tilegrid.TileGrid} sourceTileGrid Source tile grid.
- * @param {ol.proj.Projection} targetProj Target projection.
- * @param {ol.tilegrid.TileGrid} targetTileGrid Target tile grid.
- * @param {ol.TileCoord} tileCoord Coordinate of the tile.
- * @param {ol.TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.
- * @param {number} pixelRatio Pixel ratio.
- * @param {number} gutter Gutter of the source tiles.
- * @param {ol.ReprojTileFunctionType} getTileFunction
- *     Function returning source tiles (z, x, y, pixelRatio).
- * @param {number=} opt_errorThreshold Acceptable reprojection error (in px).
- * @param {boolean=} opt_renderEdges Render reprojection edges.
- */
-ol.reproj.Tile = function(sourceProj, sourceTileGrid,
-    targetProj, targetTileGrid, tileCoord, wrappedTileCoord,
-    pixelRatio, gutter, getTileFunction,
-    opt_errorThreshold,
-    opt_renderEdges) {
-  ol.Tile.call(this, tileCoord, ol.TileState.IDLE);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderEdges_ = opt_renderEdges !== undefined ? opt_renderEdges : false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelRatio_ = pixelRatio;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.gutter_ = gutter;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = null;
-
-  /**
-   * @private
-   * @type {ol.tilegrid.TileGrid}
-   */
-  this.sourceTileGrid_ = sourceTileGrid;
-
-  /**
-   * @private
-   * @type {ol.tilegrid.TileGrid}
-   */
-  this.targetTileGrid_ = targetTileGrid;
-
-  /**
-   * @private
-   * @type {ol.TileCoord}
-   */
-  this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;
-
-  /**
-   * @private
-   * @type {!Array.<ol.Tile>}
-   */
-  this.sourceTiles_ = [];
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.sourcesListenerKeys_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.sourceZ_ = 0;
-
-  var targetExtent = targetTileGrid.getTileCoordExtent(this.wrappedTileCoord_);
-  var maxTargetExtent = this.targetTileGrid_.getExtent();
-  var maxSourceExtent = this.sourceTileGrid_.getExtent();
-
-  var limitedTargetExtent = maxTargetExtent ?
-      ol.extent.getIntersection(targetExtent, maxTargetExtent) : targetExtent;
-
-  if (ol.extent.getArea(limitedTargetExtent) === 0) {
-    // Tile is completely outside range -> EMPTY
-    // TODO: is it actually correct that the source even creates the tile ?
-    this.state = ol.TileState.EMPTY;
-    return;
-  }
-
-  var sourceProjExtent = sourceProj.getExtent();
-  if (sourceProjExtent) {
-    if (!maxSourceExtent) {
-      maxSourceExtent = sourceProjExtent;
-    } else {
-      maxSourceExtent = ol.extent.getIntersection(
-          maxSourceExtent, sourceProjExtent);
-    }
-  }
-
-  var targetResolution = targetTileGrid.getResolution(
-      this.wrappedTileCoord_[0]);
-
-  var targetCenter = ol.extent.getCenter(limitedTargetExtent);
-  var sourceResolution = ol.reproj.calculateSourceResolution(
-      sourceProj, targetProj, targetCenter, targetResolution);
-
-  if (!isFinite(sourceResolution) || sourceResolution <= 0) {
-    // invalid sourceResolution -> EMPTY
-    // probably edges of the projections when no extent is defined
-    this.state = ol.TileState.EMPTY;
-    return;
-  }
-
-  var errorThresholdInPixels = opt_errorThreshold !== undefined ?
-      opt_errorThreshold : ol.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD;
-
-  /**
-   * @private
-   * @type {!ol.reproj.Triangulation}
-   */
-  this.triangulation_ = new ol.reproj.Triangulation(
-      sourceProj, targetProj, limitedTargetExtent, maxSourceExtent,
-      sourceResolution * errorThresholdInPixels);
-
-  if (this.triangulation_.getTriangles().length === 0) {
-    // no valid triangles -> EMPTY
-    this.state = ol.TileState.EMPTY;
-    return;
-  }
-
-  this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);
-  var sourceExtent = this.triangulation_.calculateSourceExtent();
-
-  if (maxSourceExtent) {
-    if (sourceProj.canWrapX()) {
-      sourceExtent[1] = ol.math.clamp(
-          sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);
-      sourceExtent[3] = ol.math.clamp(
-          sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);
-    } else {
-      sourceExtent = ol.extent.getIntersection(sourceExtent, maxSourceExtent);
-    }
-  }
-
-  if (!ol.extent.getArea(sourceExtent)) {
-    this.state = ol.TileState.EMPTY;
-  } else {
-    var sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(
-        sourceExtent, this.sourceZ_);
-
-    for (var srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {
-      for (var srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {
-        var tile = getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio);
-        if (tile) {
-          this.sourceTiles_.push(tile);
-        }
-      }
-    }
-
-    if (this.sourceTiles_.length === 0) {
-      this.state = ol.TileState.EMPTY;
-    }
-  }
-};
-ol.inherits(ol.reproj.Tile, ol.Tile);
-
-
-/**
- * @inheritDoc
- */
-ol.reproj.Tile.prototype.disposeInternal = function() {
-  if (this.state == ol.TileState.LOADING) {
-    this.unlistenSources_();
-  }
-  ol.Tile.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Get the HTML Canvas element for this tile.
- * @return {HTMLCanvasElement} Canvas.
- */
-ol.reproj.Tile.prototype.getImage = function() {
-  return this.canvas_;
-};
-
-
-/**
- * @private
- */
-ol.reproj.Tile.prototype.reproject_ = function() {
-  var sources = [];
-  this.sourceTiles_.forEach(function(tile, i, arr) {
-    if (tile && tile.getState() == ol.TileState.LOADED) {
-      sources.push({
-        extent: this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord),
-        image: tile.getImage()
-      });
-    }
-  }, this);
-  this.sourceTiles_.length = 0;
-
-  if (sources.length === 0) {
-    this.state = ol.TileState.ERROR;
-  } else {
-    var z = this.wrappedTileCoord_[0];
-    var size = this.targetTileGrid_.getTileSize(z);
-    var width = typeof size === 'number' ? size : size[0];
-    var height = typeof size === 'number' ? size : size[1];
-    var targetResolution = this.targetTileGrid_.getResolution(z);
-    var sourceResolution = this.sourceTileGrid_.getResolution(this.sourceZ_);
-
-    var targetExtent = this.targetTileGrid_.getTileCoordExtent(
-        this.wrappedTileCoord_);
-    this.canvas_ = ol.reproj.render(width, height, this.pixelRatio_,
-        sourceResolution, this.sourceTileGrid_.getExtent(),
-        targetResolution, targetExtent, this.triangulation_, sources,
-        this.gutter_, this.renderEdges_);
-
-    this.state = ol.TileState.LOADED;
-  }
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.reproj.Tile.prototype.load = function() {
-  if (this.state == ol.TileState.IDLE) {
-    this.state = ol.TileState.LOADING;
-    this.changed();
-
-    var leftToLoad = 0;
-
-    this.sourcesListenerKeys_ = [];
-    this.sourceTiles_.forEach(function(tile, i, arr) {
-      var state = tile.getState();
-      if (state == ol.TileState.IDLE || state == ol.TileState.LOADING) {
-        leftToLoad++;
-
-        var sourceListenKey;
-        sourceListenKey = ol.events.listen(tile, ol.events.EventType.CHANGE,
-            function(e) {
-              var state = tile.getState();
-              if (state == ol.TileState.LOADED ||
-                  state == ol.TileState.ERROR ||
-                  state == ol.TileState.EMPTY) {
-                ol.events.unlistenByKey(sourceListenKey);
-                leftToLoad--;
-                if (leftToLoad === 0) {
-                  this.unlistenSources_();
-                  this.reproject_();
-                }
-              }
-            }, this);
-        this.sourcesListenerKeys_.push(sourceListenKey);
-      }
-    }, this);
-
-    this.sourceTiles_.forEach(function(tile, i, arr) {
-      var state = tile.getState();
-      if (state == ol.TileState.IDLE) {
-        tile.load();
-      }
-    });
-
-    if (leftToLoad === 0) {
-      setTimeout(this.reproject_.bind(this), 0);
-    }
-  }
-};
-
-
-/**
- * @private
- */
-ol.reproj.Tile.prototype.unlistenSources_ = function() {
-  this.sourcesListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.sourcesListenerKeys_ = null;
-};
-
-goog.provide('ol.TileUrlFunction');
-
-goog.require('ol.asserts');
-goog.require('ol.math');
-goog.require('ol.tilecoord');
-
-
-/**
- * @param {string} template Template.
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @return {ol.TileUrlFunctionType} Tile URL function.
- */
-ol.TileUrlFunction.createFromTemplate = function(template, tileGrid) {
-  var zRegEx = /\{z\}/g;
-  var xRegEx = /\{x\}/g;
-  var yRegEx = /\{y\}/g;
-  var dashYRegEx = /\{-y\}/g;
-  return (
-      /**
-       * @param {ol.TileCoord} tileCoord Tile Coordinate.
-       * @param {number} pixelRatio Pixel ratio.
-       * @param {ol.proj.Projection} projection Projection.
-       * @return {string|undefined} Tile URL.
-       */
-      function(tileCoord, pixelRatio, projection) {
-        if (!tileCoord) {
-          return undefined;
-        } else {
-          return template.replace(zRegEx, tileCoord[0].toString())
-              .replace(xRegEx, tileCoord[1].toString())
-              .replace(yRegEx, function() {
-                var y = -tileCoord[2] - 1;
-                return y.toString();
-              })
-              .replace(dashYRegEx, function() {
-                var z = tileCoord[0];
-                var range = tileGrid.getFullTileRange(z);
-                ol.asserts.assert(range, 55); // The {-y} placeholder requires a tile grid with extent
-                var y = range.getHeight() + tileCoord[2];
-                return y.toString();
-              });
-        }
-      });
-};
-
-
-/**
- * @param {Array.<string>} templates Templates.
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @return {ol.TileUrlFunctionType} Tile URL function.
- */
-ol.TileUrlFunction.createFromTemplates = function(templates, tileGrid) {
-  var len = templates.length;
-  var tileUrlFunctions = new Array(len);
-  for (var i = 0; i < len; ++i) {
-    tileUrlFunctions[i] = ol.TileUrlFunction.createFromTemplate(
-        templates[i], tileGrid);
-  }
-  return ol.TileUrlFunction.createFromTileUrlFunctions(tileUrlFunctions);
-};
-
-
-/**
- * @param {Array.<ol.TileUrlFunctionType>} tileUrlFunctions Tile URL Functions.
- * @return {ol.TileUrlFunctionType} Tile URL function.
- */
-ol.TileUrlFunction.createFromTileUrlFunctions = function(tileUrlFunctions) {
-  if (tileUrlFunctions.length === 1) {
-    return tileUrlFunctions[0];
-  }
-  return (
-      /**
-       * @param {ol.TileCoord} tileCoord Tile Coordinate.
-       * @param {number} pixelRatio Pixel ratio.
-       * @param {ol.proj.Projection} projection Projection.
-       * @return {string|undefined} Tile URL.
-       */
-      function(tileCoord, pixelRatio, projection) {
-        if (!tileCoord) {
-          return undefined;
-        } else {
-          var h = ol.tilecoord.hash(tileCoord);
-          var index = ol.math.modulo(h, tileUrlFunctions.length);
-          return tileUrlFunctions[index](tileCoord, pixelRatio, projection);
-        }
-      });
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @return {string|undefined} Tile URL.
- */
-ol.TileUrlFunction.nullTileUrlFunction = function(tileCoord, pixelRatio, projection) {
-  return undefined;
-};
-
-
-/**
- * @param {string} url URL.
- * @return {Array.<string>} Array of urls.
- */
-ol.TileUrlFunction.expandUrl = function(url) {
-  var urls = [];
-  var match = /\{([a-z])-([a-z])\}/.exec(url);
-  if (match) {
-    // char range
-    var startCharCode = match[1].charCodeAt(0);
-    var stopCharCode = match[2].charCodeAt(0);
-    var charCode;
-    for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) {
-      urls.push(url.replace(match[0], String.fromCharCode(charCode)));
-    }
-    return urls;
-  }
-  match = match = /\{(\d+)-(\d+)\}/.exec(url);
-  if (match) {
-    // number range
-    var stop = parseInt(match[2], 10);
-    for (var i = parseInt(match[1], 10); i <= stop; i++) {
-      urls.push(url.replace(match[0], i.toString()));
-    }
-    return urls;
-  }
-  urls.push(url);
-  return urls;
-};
-
-goog.provide('ol.TileCache');
-
-goog.require('ol');
-goog.require('ol.structs.LRUCache');
-
-
-/**
- * @constructor
- * @extends {ol.structs.LRUCache.<ol.Tile>}
- * @param {number=} opt_highWaterMark High water mark.
- * @struct
- */
-ol.TileCache = function(opt_highWaterMark) {
-
-  ol.structs.LRUCache.call(this);
-
-  /**
-   * @type {number}
-   */
-  this.highWaterMark = opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;
-
-};
-ol.inherits(ol.TileCache, ol.structs.LRUCache);
-
-
-/**
- * @return {boolean} Can expire cache.
- */
-ol.TileCache.prototype.canExpireCache = function() {
-  return this.getCount() > this.highWaterMark;
-};
-
-
-/**
- * @param {Object.<string, ol.TileRange>} usedTiles Used tiles.
- */
-ol.TileCache.prototype.expireCache = function(usedTiles) {
-  var tile, zKey;
-  while (this.canExpireCache()) {
-    tile = this.peekLast();
-    zKey = tile.tileCoord[0].toString();
-    if (zKey in usedTiles && usedTiles[zKey].contains(tile.tileCoord)) {
-      break;
-    } else {
-      this.pop().dispose();
-    }
-  }
-};
-
-goog.provide('ol.source.Tile');
-
-goog.require('ol');
-goog.require('ol.TileCache');
-goog.require('ol.TileState');
-goog.require('ol.events.Event');
-goog.require('ol.proj');
-goog.require('ol.size');
-goog.require('ol.source.Source');
-goog.require('ol.tilecoord');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for sources providing images divided into a tile grid.
- *
- * @constructor
- * @abstract
- * @extends {ol.source.Source}
- * @param {ol.SourceTileOptions} options Tile source options.
- * @api
- */
-ol.source.Tile = function(options) {
-
-  ol.source.Source.call(this, {
-    attributions: options.attributions,
-    extent: options.extent,
-    logo: options.logo,
-    projection: options.projection,
-    state: options.state,
-    wrapX: options.wrapX
-  });
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.opaque_ = options.opaque !== undefined ? options.opaque : false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.tilePixelRatio_ = options.tilePixelRatio !== undefined ?
-      options.tilePixelRatio : 1;
-
-  /**
-   * @protected
-   * @type {ol.tilegrid.TileGrid}
-   */
-  this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;
-
-  /**
-   * @protected
-   * @type {ol.TileCache}
-   */
-  this.tileCache = new ol.TileCache(options.cacheSize);
-
-  /**
-   * @protected
-   * @type {ol.Size}
-   */
-  this.tmpSize = [0, 0];
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.key_ = '';
-
-};
-ol.inherits(ol.source.Tile, ol.source.Source);
-
-
-/**
- * @return {boolean} Can expire cache.
- */
-ol.source.Tile.prototype.canExpireCache = function() {
-  return this.tileCache.canExpireCache();
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @param {Object.<string, ol.TileRange>} usedTiles Used tiles.
- */
-ol.source.Tile.prototype.expireCache = function(projection, usedTiles) {
-  var tileCache = this.getTileCacheForProjection(projection);
-  if (tileCache) {
-    tileCache.expireCache(usedTiles);
-  }
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @param {number} z Zoom level.
- * @param {ol.TileRange} tileRange Tile range.
- * @param {function(ol.Tile):(boolean|undefined)} callback Called with each
- *     loaded tile.  If the callback returns `false`, the tile will not be
- *     considered loaded.
- * @return {boolean} The tile range is fully covered with loaded tiles.
- */
-ol.source.Tile.prototype.forEachLoadedTile = function(projection, z, tileRange, callback) {
-  var tileCache = this.getTileCacheForProjection(projection);
-  if (!tileCache) {
-    return false;
-  }
-
-  var covered = true;
-  var tile, tileCoordKey, loaded;
-  for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {
-    for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {
-      tileCoordKey = this.getKeyZXY(z, x, y);
-      loaded = false;
-      if (tileCache.containsKey(tileCoordKey)) {
-        tile = /** @type {!ol.Tile} */ (tileCache.get(tileCoordKey));
-        loaded = tile.getState() === ol.TileState.LOADED;
-        if (loaded) {
-          loaded = (callback(tile) !== false);
-        }
-      }
-      if (!loaded) {
-        covered = false;
-      }
-    }
-  }
-  return covered;
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @return {number} Gutter.
- */
-ol.source.Tile.prototype.getGutter = function(projection) {
-  return 0;
-};
-
-
-/**
- * Return the key to be used for all tiles in the source.
- * @return {string} The key for all tiles.
- * @protected
- */
-ol.source.Tile.prototype.getKey = function() {
-  return this.key_;
-};
-
-
-/**
- * Set the value to be used as the key for all tiles in the source.
- * @param {string} key The key for tiles.
- * @protected
- */
-ol.source.Tile.prototype.setKey = function(key) {
-  if (this.key_ !== key) {
-    this.key_ = key;
-    this.changed();
-  }
-};
-
-
-/**
- * @param {number} z Z.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {string} Key.
- * @protected
- */
-ol.source.Tile.prototype.getKeyZXY = ol.tilecoord.getKeyZXY;
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @return {boolean} Opaque.
- */
-ol.source.Tile.prototype.getOpaque = function(projection) {
-  return this.opaque_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.Tile.prototype.getResolutions = function() {
-  return this.tileGrid.getResolutions();
-};
-
-
-/**
- * @abstract
- * @param {number} z Tile coordinate z.
- * @param {number} x Tile coordinate x.
- * @param {number} y Tile coordinate y.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @return {!ol.Tile} Tile.
- */
-ol.source.Tile.prototype.getTile = function(z, x, y, pixelRatio, projection) {};
-
-
-/**
- * Return the tile grid of the tile source.
- * @return {ol.tilegrid.TileGrid} Tile grid.
- * @api
- */
-ol.source.Tile.prototype.getTileGrid = function() {
-  return this.tileGrid;
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @return {!ol.tilegrid.TileGrid} Tile grid.
- */
-ol.source.Tile.prototype.getTileGridForProjection = function(projection) {
-  if (!this.tileGrid) {
-    return ol.tilegrid.getForProjection(projection);
-  } else {
-    return this.tileGrid;
-  }
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @return {ol.TileCache} Tile cache.
- * @protected
- */
-ol.source.Tile.prototype.getTileCacheForProjection = function(projection) {
-  var thisProj = this.getProjection();
-  if (thisProj && !ol.proj.equivalent(thisProj, projection)) {
-    return null;
-  } else {
-    return this.tileCache;
-  }
-};
-
-
-/**
- * Get the tile pixel ratio for this source. Subclasses may override this
- * method, which is meant to return a supported pixel ratio that matches the
- * provided `opt_pixelRatio` as close as possible. When no `opt_pixelRatio` is
- * provided, it is meant to return `this.tilePixelRatio_`.
- * @param {number=} opt_pixelRatio Pixel ratio.
- * @return {number} Tile pixel ratio.
- */
-ol.source.Tile.prototype.getTilePixelRatio = function(opt_pixelRatio) {
-  return this.tilePixelRatio_;
-};
-
-
-/**
- * @param {number} z Z.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @return {ol.Size} Tile size.
- */
-ol.source.Tile.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
-  var tileGrid = this.getTileGridForProjection(projection);
-  var tilePixelRatio = this.getTilePixelRatio(pixelRatio);
-  var tileSize = ol.size.toSize(tileGrid.getTileSize(z), this.tmpSize);
-  if (tilePixelRatio == 1) {
-    return tileSize;
-  } else {
-    return ol.size.scale(tileSize, tilePixelRatio, this.tmpSize);
-  }
-};
-
-
-/**
- * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate
- * is outside the resolution and extent range of the tile grid, `null` will be
- * returned.
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.proj.Projection=} opt_projection Projection.
- * @return {ol.TileCoord} Tile coordinate to be passed to the tileUrlFunction or
- *     null if no tile URL should be created for the passed `tileCoord`.
- */
-ol.source.Tile.prototype.getTileCoordForTileUrlFunction = function(tileCoord, opt_projection) {
-  var projection = opt_projection !== undefined ?
-      opt_projection : this.getProjection();
-  var tileGrid = this.getTileGridForProjection(projection);
-  if (this.getWrapX() && projection.isGlobal()) {
-    tileCoord = ol.tilegrid.wrapX(tileGrid, tileCoord, projection);
-  }
-  return ol.tilecoord.withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.Tile.prototype.refresh = function() {
-  this.tileCache.clear();
-  this.changed();
-};
-
-
-/**
- * Marks a tile coord as being used, without triggering a load.
- * @param {number} z Tile coordinate z.
- * @param {number} x Tile coordinate x.
- * @param {number} y Tile coordinate y.
- * @param {ol.proj.Projection} projection Projection.
- */
-ol.source.Tile.prototype.useTile = ol.nullFunction;
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.source.Tile} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.source.Tile.Event}
- * @param {string} type Type.
- * @param {ol.Tile} tile The tile.
- */
-ol.source.Tile.Event = function(type, tile) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The tile related to the event.
-   * @type {ol.Tile}
-   * @api
-   */
-  this.tile = tile;
-
-};
-ol.inherits(ol.source.Tile.Event, ol.events.Event);
-
-goog.provide('ol.source.TileEventType');
-
-/**
- * @enum {string}
- */
-ol.source.TileEventType = {
-
-  /**
-   * Triggered when a tile starts loading.
-   * @event ol.source.Tile.Event#tileloadstart
-   * @api
-   */
-  TILELOADSTART: 'tileloadstart',
-
-  /**
-   * Triggered when a tile finishes loading.
-   * @event ol.source.Tile.Event#tileloadend
-   * @api
-   */
-  TILELOADEND: 'tileloadend',
-
-  /**
-   * Triggered if tile loading results in an error.
-   * @event ol.source.Tile.Event#tileloaderror
-   * @api
-   */
-  TILELOADERROR: 'tileloaderror'
-
-};
-
-goog.provide('ol.source.UrlTile');
-
-goog.require('ol');
-goog.require('ol.TileState');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.source.Tile');
-goog.require('ol.source.TileEventType');
-
-
-/**
- * @classdesc
- * Base class for sources providing tiles divided into a tile grid over http.
- *
- * @constructor
- * @abstract
- * @fires ol.source.Tile.Event
- * @extends {ol.source.Tile}
- * @param {ol.SourceUrlTileOptions} options Image tile options.
- */
-ol.source.UrlTile = function(options) {
-
-  ol.source.Tile.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    extent: options.extent,
-    logo: options.logo,
-    opaque: options.opaque,
-    projection: options.projection,
-    state: options.state,
-    tileGrid: options.tileGrid,
-    tilePixelRatio: options.tilePixelRatio,
-    wrapX: options.wrapX
-  });
-
-  /**
-   * @protected
-   * @type {ol.TileLoadFunctionType}
-   */
-  this.tileLoadFunction = options.tileLoadFunction;
-
-  /**
-   * @protected
-   * @type {ol.TileUrlFunctionType}
-   */
-  this.tileUrlFunction = this.fixedTileUrlFunction ?
-      this.fixedTileUrlFunction.bind(this) :
-      ol.TileUrlFunction.nullTileUrlFunction;
-
-  /**
-   * @protected
-   * @type {!Array.<string>|null}
-   */
-  this.urls = null;
-
-  if (options.urls) {
-    this.setUrls(options.urls);
-  } else if (options.url) {
-    this.setUrl(options.url);
-  }
-  if (options.tileUrlFunction) {
-    this.setTileUrlFunction(options.tileUrlFunction);
-  }
-
-};
-ol.inherits(ol.source.UrlTile, ol.source.Tile);
-
-
-/**
- * @type {ol.TileUrlFunctionType|undefined}
- * @protected
- */
-ol.source.UrlTile.prototype.fixedTileUrlFunction;
-
-/**
- * Return the tile load function of the source.
- * @return {ol.TileLoadFunctionType} TileLoadFunction
- * @api
- */
-ol.source.UrlTile.prototype.getTileLoadFunction = function() {
-  return this.tileLoadFunction;
-};
-
-
-/**
- * Return the tile URL function of the source.
- * @return {ol.TileUrlFunctionType} TileUrlFunction
- * @api
- */
-ol.source.UrlTile.prototype.getTileUrlFunction = function() {
-  return this.tileUrlFunction;
-};
-
-
-/**
- * Return the URLs used for this source.
- * When a tileUrlFunction is used instead of url or urls,
- * null will be returned.
- * @return {!Array.<string>|null} URLs.
- * @api
- */
-ol.source.UrlTile.prototype.getUrls = function() {
-  return this.urls;
-};
-
-
-/**
- * Handle tile change events.
- * @param {ol.events.Event} event Event.
- * @protected
- */
-ol.source.UrlTile.prototype.handleTileChange = function(event) {
-  var tile = /** @type {ol.Tile} */ (event.target);
-  switch (tile.getState()) {
-    case ol.TileState.LOADING:
-      this.dispatchEvent(
-          new ol.source.Tile.Event(ol.source.TileEventType.TILELOADSTART, tile));
-      break;
-    case ol.TileState.LOADED:
-      this.dispatchEvent(
-          new ol.source.Tile.Event(ol.source.TileEventType.TILELOADEND, tile));
-      break;
-    case ol.TileState.ERROR:
-      this.dispatchEvent(
-          new ol.source.Tile.Event(ol.source.TileEventType.TILELOADERROR, tile));
-      break;
-    default:
-      // pass
-  }
-};
-
-
-/**
- * Set the tile load function of the source.
- * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
- * @api
- */
-ol.source.UrlTile.prototype.setTileLoadFunction = function(tileLoadFunction) {
-  this.tileCache.clear();
-  this.tileLoadFunction = tileLoadFunction;
-  this.changed();
-};
-
-
-/**
- * Set the tile URL function of the source.
- * @param {ol.TileUrlFunctionType} tileUrlFunction Tile URL function.
- * @param {string=} opt_key Optional new tile key for the source.
- * @api
- */
-ol.source.UrlTile.prototype.setTileUrlFunction = function(tileUrlFunction, opt_key) {
-  this.tileUrlFunction = tileUrlFunction;
-  if (typeof opt_key !== 'undefined') {
-    this.setKey(opt_key);
-  } else {
-    this.changed();
-  }
-};
-
-
-/**
- * Set the URL to use for requests.
- * @param {string} url URL.
- * @api
- */
-ol.source.UrlTile.prototype.setUrl = function(url) {
-  var urls = this.urls = ol.TileUrlFunction.expandUrl(url);
-  this.setTileUrlFunction(this.fixedTileUrlFunction ?
-      this.fixedTileUrlFunction.bind(this) :
-      ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid), url);
-};
-
-
-/**
- * Set the URLs to use for requests.
- * @param {Array.<string>} urls URLs.
- * @api
- */
-ol.source.UrlTile.prototype.setUrls = function(urls) {
-  this.urls = urls;
-  var key = urls.join('\n');
-  this.setTileUrlFunction(this.fixedTileUrlFunction ?
-      this.fixedTileUrlFunction.bind(this) :
-      ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid), key);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.UrlTile.prototype.useTile = function(z, x, y) {
-  var tileCoordKey = this.getKeyZXY(z, x, y);
-  if (this.tileCache.containsKey(tileCoordKey)) {
-    this.tileCache.get(tileCoordKey);
-  }
-};
-
-goog.provide('ol.source.TileImage');
-
-goog.require('ol');
-goog.require('ol.ImageTile');
-goog.require('ol.TileCache');
-goog.require('ol.TileState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.proj');
-goog.require('ol.reproj.Tile');
-goog.require('ol.source.UrlTile');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Base class for sources providing images divided into a tile grid.
- *
- * @constructor
- * @fires ol.source.Tile.Event
- * @extends {ol.source.UrlTile}
- * @param {olx.source.TileImageOptions} options Image tile options.
- * @api
- */
-ol.source.TileImage = function(options) {
-
-  ol.source.UrlTile.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    extent: options.extent,
-    logo: options.logo,
-    opaque: options.opaque,
-    projection: options.projection,
-    state: options.state,
-    tileGrid: options.tileGrid,
-    tileLoadFunction: options.tileLoadFunction ?
-        options.tileLoadFunction : ol.source.TileImage.defaultTileLoadFunction,
-    tilePixelRatio: options.tilePixelRatio,
-    tileUrlFunction: options.tileUrlFunction,
-    url: options.url,
-    urls: options.urls,
-    wrapX: options.wrapX
-  });
-
-  /**
-   * @protected
-   * @type {?string}
-   */
-  this.crossOrigin =
-      options.crossOrigin !== undefined ? options.crossOrigin : null;
-
-  /**
-   * @protected
-   * @type {function(new: ol.ImageTile, ol.TileCoord, ol.TileState, string,
-   *        ?string, ol.TileLoadFunctionType)}
-   */
-  this.tileClass = options.tileClass !== undefined ?
-      options.tileClass : ol.ImageTile;
-
-  /**
-   * @protected
-   * @type {Object.<string, ol.TileCache>}
-   */
-  this.tileCacheForProjection = {};
-
-  /**
-   * @protected
-   * @type {Object.<string, ol.tilegrid.TileGrid>}
-   */
-  this.tileGridForProjection = {};
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderReprojectionEdges_ = false;
-};
-ol.inherits(ol.source.TileImage, ol.source.UrlTile);
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.canExpireCache = function() {
-  if (!ol.ENABLE_RASTER_REPROJECTION) {
-    return ol.source.UrlTile.prototype.canExpireCache.call(this);
-  }
-  if (this.tileCache.canExpireCache()) {
-    return true;
-  } else {
-    for (var key in this.tileCacheForProjection) {
-      if (this.tileCacheForProjection[key].canExpireCache()) {
-        return true;
-      }
-    }
-  }
-  return false;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.expireCache = function(projection, usedTiles) {
-  if (!ol.ENABLE_RASTER_REPROJECTION) {
-    ol.source.UrlTile.prototype.expireCache.call(this, projection, usedTiles);
-    return;
-  }
-  var usedTileCache = this.getTileCacheForProjection(projection);
-
-  this.tileCache.expireCache(this.tileCache == usedTileCache ? usedTiles : {});
-  for (var id in this.tileCacheForProjection) {
-    var tileCache = this.tileCacheForProjection[id];
-    tileCache.expireCache(tileCache == usedTileCache ? usedTiles : {});
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.getGutter = function(projection) {
-  if (ol.ENABLE_RASTER_REPROJECTION &&
-      this.getProjection() && projection &&
-      !ol.proj.equivalent(this.getProjection(), projection)) {
-    return 0;
-  } else {
-    return this.getGutterInternal();
-  }
-};
-
-
-/**
- * @protected
- * @return {number} Gutter.
- */
-ol.source.TileImage.prototype.getGutterInternal = function() {
-  return 0;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.getOpaque = function(projection) {
-  if (ol.ENABLE_RASTER_REPROJECTION &&
-      this.getProjection() && projection &&
-      !ol.proj.equivalent(this.getProjection(), projection)) {
-    return false;
-  } else {
-    return ol.source.UrlTile.prototype.getOpaque.call(this, projection);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.getTileGridForProjection = function(projection) {
-  if (!ol.ENABLE_RASTER_REPROJECTION) {
-    return ol.source.UrlTile.prototype.getTileGridForProjection.call(this, projection);
-  }
-  var thisProj = this.getProjection();
-  if (this.tileGrid &&
-      (!thisProj || ol.proj.equivalent(thisProj, projection))) {
-    return this.tileGrid;
-  } else {
-    var projKey = ol.getUid(projection).toString();
-    if (!(projKey in this.tileGridForProjection)) {
-      this.tileGridForProjection[projKey] =
-          ol.tilegrid.getForProjection(projection);
-    }
-    return /** @type {!ol.tilegrid.TileGrid} */ (this.tileGridForProjection[projKey]);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.getTileCacheForProjection = function(projection) {
-  if (!ol.ENABLE_RASTER_REPROJECTION) {
-    return ol.source.UrlTile.prototype.getTileCacheForProjection.call(this, projection);
-  }
-  var thisProj = this.getProjection();
-  if (!thisProj || ol.proj.equivalent(thisProj, projection)) {
-    return this.tileCache;
-  } else {
-    var projKey = ol.getUid(projection).toString();
-    if (!(projKey in this.tileCacheForProjection)) {
-      this.tileCacheForProjection[projKey] = new ol.TileCache(this.tileCache.highWaterMark);
-    }
-    return this.tileCacheForProjection[projKey];
-  }
-};
-
-
-/**
- * @param {number} z Tile coordinate z.
- * @param {number} x Tile coordinate x.
- * @param {number} y Tile coordinate y.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {string} key The key set on the tile.
- * @return {!ol.Tile} Tile.
- * @private
- */
-ol.source.TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key) {
-  var tileCoord = [z, x, y];
-  var urlTileCoord = this.getTileCoordForTileUrlFunction(
-      tileCoord, projection);
-  var tileUrl = urlTileCoord ?
-      this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;
-  var tile = new this.tileClass(
-      tileCoord,
-      tileUrl !== undefined ? ol.TileState.IDLE : ol.TileState.EMPTY,
-      tileUrl !== undefined ? tileUrl : '',
-      this.crossOrigin,
-      this.tileLoadFunction);
-  tile.key = key;
-  ol.events.listen(tile, ol.events.EventType.CHANGE,
-      this.handleTileChange, this);
-  return tile;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) {
-  if (!ol.ENABLE_RASTER_REPROJECTION ||
-      !this.getProjection() ||
-      !projection ||
-      ol.proj.equivalent(this.getProjection(), projection)) {
-    return this.getTileInternal(z, x, y, pixelRatio, /** @type {!ol.proj.Projection} */ (projection));
-  } else {
-    var cache = this.getTileCacheForProjection(projection);
-    var tileCoord = [z, x, y];
-    var tile;
-    var tileCoordKey = this.getKeyZXY.apply(this, tileCoord);
-    if (cache.containsKey(tileCoordKey)) {
-      tile = /** @type {!ol.Tile} */ (cache.get(tileCoordKey));
-    }
-    var key = this.getKey();
-    if (tile && tile.key == key) {
-      return tile;
-    } else {
-      var sourceProjection = /** @type {!ol.proj.Projection} */ (this.getProjection());
-      var sourceTileGrid = this.getTileGridForProjection(sourceProjection);
-      var targetTileGrid = this.getTileGridForProjection(projection);
-      var wrappedTileCoord =
-          this.getTileCoordForTileUrlFunction(tileCoord, projection);
-      var newTile = new ol.reproj.Tile(
-          sourceProjection, sourceTileGrid,
-          projection, targetTileGrid,
-          tileCoord, wrappedTileCoord, this.getTilePixelRatio(pixelRatio),
-          this.getGutterInternal(),
-          function(z, x, y, pixelRatio) {
-            return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);
-          }.bind(this), this.reprojectionErrorThreshold_,
-          this.renderReprojectionEdges_);
-      newTile.key = key;
-
-      if (tile) {
-        newTile.interimTile = tile;
-        cache.replace(tileCoordKey, newTile);
-      } else {
-        cache.set(tileCoordKey, newTile);
-      }
-      return newTile;
-    }
-  }
-};
-
-
-/**
- * @param {number} z Tile coordinate z.
- * @param {number} x Tile coordinate x.
- * @param {number} y Tile coordinate y.
- * @param {number} pixelRatio Pixel ratio.
- * @param {!ol.proj.Projection} projection Projection.
- * @return {!ol.Tile} Tile.
- * @protected
- */
-ol.source.TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) {
-  var tile = null;
-  var tileCoordKey = this.getKeyZXY(z, x, y);
-  var key = this.getKey();
-  if (!this.tileCache.containsKey(tileCoordKey)) {
-    tile = this.createTile_(z, x, y, pixelRatio, projection, key);
-    this.tileCache.set(tileCoordKey, tile);
-  } else {
-    tile = this.tileCache.get(tileCoordKey);
-    if (tile.key != key) {
-      // The source's params changed. If the tile has an interim tile and if we
-      // can use it then we use it. Otherwise we create a new tile.  In both
-      // cases we attempt to assign an interim tile to the new tile.
-      var interimTile = tile;
-      tile = this.createTile_(z, x, y, pixelRatio, projection, key);
-
-      //make the new tile the head of the list,
-      if (interimTile.getState() == ol.TileState.IDLE) {
-        //the old tile hasn't begun loading yet, and is now outdated, so we can simply discard it
-        tile.interimTile = interimTile.interimTile;
-      } else {
-        tile.interimTile = interimTile;
-      }
-      tile.refreshInterimChain();
-      this.tileCache.replace(tileCoordKey, tile);
-    }
-  }
-  return tile;
-};
-
-
-/**
- * Sets whether to render reprojection edges or not (usually for debugging).
- * @param {boolean} render Render the edges.
- * @api
- */
-ol.source.TileImage.prototype.setRenderReprojectionEdges = function(render) {
-  if (!ol.ENABLE_RASTER_REPROJECTION ||
-      this.renderReprojectionEdges_ == render) {
-    return;
-  }
-  this.renderReprojectionEdges_ = render;
-  for (var id in this.tileCacheForProjection) {
-    this.tileCacheForProjection[id].clear();
-  }
-  this.changed();
-};
-
-
-/**
- * Sets the tile grid to use when reprojecting the tiles to the given
- * projection instead of the default tile grid for the projection.
- *
- * This can be useful when the default tile grid cannot be created
- * (e.g. projection has no extent defined) or
- * for optimization reasons (custom tile size, resolutions, ...).
- *
- * @param {ol.ProjectionLike} projection Projection.
- * @param {ol.tilegrid.TileGrid} tilegrid Tile grid to use for the projection.
- * @api
- */
-ol.source.TileImage.prototype.setTileGridForProjection = function(projection, tilegrid) {
-  if (ol.ENABLE_RASTER_REPROJECTION) {
-    var proj = ol.proj.get(projection);
-    if (proj) {
-      var projKey = ol.getUid(proj).toString();
-      if (!(projKey in this.tileGridForProjection)) {
-        this.tileGridForProjection[projKey] = tilegrid;
-      }
-    }
-  }
-};
-
-
-/**
- * @param {ol.ImageTile} imageTile Image tile.
- * @param {string} src Source.
- */
-ol.source.TileImage.defaultTileLoadFunction = function(imageTile, src) {
-  imageTile.getImage().src = src;
-};
-
-goog.provide('ol.source.BingMaps');
-
-goog.require('ol');
-goog.require('ol.Attribution');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.extent');
-goog.require('ol.net');
-goog.require('ol.proj');
-goog.require('ol.source.State');
-goog.require('ol.source.TileImage');
-goog.require('ol.tilecoord');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Layer source for Bing Maps tile data.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.BingMapsOptions} options Bing Maps options.
- * @api
- */
-ol.source.BingMaps = function(options) {
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hidpi_ = options.hidpi !== undefined ? options.hidpi : false;
-
-  ol.source.TileImage.call(this, {
-    cacheSize: options.cacheSize,
-    crossOrigin: 'anonymous',
-    opaque: true,
-    projection: ol.proj.get('EPSG:3857'),
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    state: ol.source.State.LOADING,
-    tileLoadFunction: options.tileLoadFunction,
-    tilePixelRatio: this.hidpi_ ? 2 : 1,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true
-  });
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.culture_ = options.culture !== undefined ? options.culture : 'en-us';
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxZoom_ = options.maxZoom !== undefined ? options.maxZoom : -1;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.apiKey_ = options.key;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.imagerySet_ = options.imagerySet;
-
-  var url = 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/' +
-      this.imagerySet_ +
-      '?uriScheme=https&include=ImageryProviders&key=' + this.apiKey_;
-
-  ol.net.jsonp(url, this.handleImageryMetadataResponse.bind(this), undefined,
-      'jsonp');
-
-};
-ol.inherits(ol.source.BingMaps, ol.source.TileImage);
-
-
-/**
- * The attribution containing a link to the Microsoft® Bing™ Maps Platform APIs’
- * Terms Of Use.
- * @const
- * @type {ol.Attribution}
- * @api
- */
-ol.source.BingMaps.TOS_ATTRIBUTION = new ol.Attribution({
-  html: '<a class="ol-attribution-bing-tos" ' +
-      'href="http://www.microsoft.com/maps/product/terms.html">' +
-      'Terms of Use</a>'
-});
-
-
-/**
- * Get the api key used for this source.
- *
- * @return {string} The api key.
- * @api
- */
-ol.source.BingMaps.prototype.getApiKey = function() {
-  return this.apiKey_;
-};
-
-
-/**
- * Get the imagery set associated with this source.
- *
- * @return {string} The imagery set.
- * @api
- */
-ol.source.BingMaps.prototype.getImagerySet = function() {
-  return this.imagerySet_;
-};
-
-
-/**
- * @param {BingMapsImageryMetadataResponse} response Response.
- */
-ol.source.BingMaps.prototype.handleImageryMetadataResponse = function(response) {
-  if (response.statusCode != 200 ||
-      response.statusDescription != 'OK' ||
-      response.authenticationResultCode != 'ValidCredentials' ||
-      response.resourceSets.length != 1 ||
-      response.resourceSets[0].resources.length != 1) {
-    this.setState(ol.source.State.ERROR);
-    return;
-  }
-
-  var brandLogoUri = response.brandLogoUri;
-  if (brandLogoUri.indexOf('https') == -1) {
-    brandLogoUri = brandLogoUri.replace('http', 'https');
-  }
-  //var copyright = response.copyright;  // FIXME do we need to display this?
-  var resource = response.resourceSets[0].resources[0];
-  var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;
-
-  var sourceProjection = this.getProjection();
-  var extent = ol.tilegrid.extentFromProjection(sourceProjection);
-  var tileSize = resource.imageWidth == resource.imageHeight ?
-      resource.imageWidth : [resource.imageWidth, resource.imageHeight];
-  var tileGrid = ol.tilegrid.createXYZ({
-    extent: extent,
-    minZoom: resource.zoomMin,
-    maxZoom: maxZoom,
-    tileSize: tileSize / this.getTilePixelRatio()
-  });
-  this.tileGrid = tileGrid;
-
-  var culture = this.culture_;
-  var hidpi = this.hidpi_;
-  this.tileUrlFunction = ol.TileUrlFunction.createFromTileUrlFunctions(
-      resource.imageUrlSubdomains.map(function(subdomain) {
-        var quadKeyTileCoord = [0, 0, 0];
-        var imageUrl = resource.imageUrl
-            .replace('{subdomain}', subdomain)
-            .replace('{culture}', culture);
-        return (
-            /**
-             * @param {ol.TileCoord} tileCoord Tile coordinate.
-             * @param {number} pixelRatio Pixel ratio.
-             * @param {ol.proj.Projection} projection Projection.
-             * @return {string|undefined} Tile URL.
-             */
-            function(tileCoord, pixelRatio, projection) {
-              if (!tileCoord) {
-                return undefined;
-              } else {
-                ol.tilecoord.createOrUpdate(tileCoord[0], tileCoord[1],
-                    -tileCoord[2] - 1, quadKeyTileCoord);
-                var url = imageUrl;
-                if (hidpi) {
-                  url += '&dpi=d1&device=mobile';
-                }
-                return url.replace('{quadkey}', ol.tilecoord.quadKey(
-                    quadKeyTileCoord));
-              }
-            });
-      }));
-
-  if (resource.imageryProviders) {
-    var transform = ol.proj.getTransformFromProjections(
-        ol.proj.get('EPSG:4326'), this.getProjection());
-
-    var attributions = resource.imageryProviders.map(function(imageryProvider) {
-      var html = imageryProvider.attribution;
-      /** @type {Object.<string, Array.<ol.TileRange>>} */
-      var tileRanges = {};
-      imageryProvider.coverageAreas.forEach(function(coverageArea) {
-        var minZ = coverageArea.zoomMin;
-        var maxZ = Math.min(coverageArea.zoomMax, maxZoom);
-        var bbox = coverageArea.bbox;
-        var epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]];
-        var extent = ol.extent.applyTransform(epsg4326Extent, transform);
-        var tileRange, z, zKey;
-        for (z = minZ; z <= maxZ; ++z) {
-          zKey = z.toString();
-          tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);
-          if (zKey in tileRanges) {
-            tileRanges[zKey].push(tileRange);
-          } else {
-            tileRanges[zKey] = [tileRange];
-          }
-        }
-      });
-      return new ol.Attribution({html: html, tileRanges: tileRanges});
-    });
-    attributions.push(ol.source.BingMaps.TOS_ATTRIBUTION);
-    this.setAttributions(attributions);
-  }
-
-  this.setLogo(brandLogoUri);
-
-  this.setState(ol.source.State.READY);
-};
-
-goog.provide('ol.source.XYZ');
-
-goog.require('ol');
-goog.require('ol.source.TileImage');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Layer source for tile data with URLs in a set XYZ format that are
- * defined in a URL template. By default, this follows the widely-used
- * Google grid where `x` 0 and `y` 0 are in the top left. Grids like
- * TMS where `x` 0 and `y` 0 are in the bottom left can be used by
- * using the `{-y}` placeholder in the URL template, so long as the
- * source does not have a custom tile grid. In this case,
- * {@link ol.source.TileImage} can be used with a `tileUrlFunction`
- * such as:
- *
- *  tileUrlFunction: function(coordinate) {
- *    return 'http://mapserver.com/' + coordinate[0] + '/' +
- *        coordinate[1] + '/' + coordinate[2] + '.png';
- *    }
- *
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.XYZOptions=} opt_options XYZ options.
- * @api
- */
-ol.source.XYZ = function(opt_options) {
-  var options = opt_options || {};
-  var projection = options.projection !== undefined ?
-      options.projection : 'EPSG:3857';
-
-  var tileGrid = options.tileGrid !== undefined ? options.tileGrid :
-      ol.tilegrid.createXYZ({
-        extent: ol.tilegrid.extentFromProjection(projection),
-        maxZoom: options.maxZoom,
-        minZoom: options.minZoom,
-        tileSize: options.tileSize
-      });
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    opaque: options.opaque,
-    projection: projection,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileGrid: tileGrid,
-    tileLoadFunction: options.tileLoadFunction,
-    tilePixelRatio: options.tilePixelRatio,
-    tileUrlFunction: options.tileUrlFunction,
-    url: options.url,
-    urls: options.urls,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true
-  });
-
-};
-ol.inherits(ol.source.XYZ, ol.source.TileImage);
-
-goog.provide('ol.source.CartoDB');
-
-goog.require('ol');
-goog.require('ol.obj');
-goog.require('ol.source.State');
-goog.require('ol.source.XYZ');
-
-
-/**
- * @classdesc
- * Layer source for the CartoDB tiles.
- *
- * @constructor
- * @extends {ol.source.XYZ}
- * @param {olx.source.CartoDBOptions} options CartoDB options.
- * @api
- */
-ol.source.CartoDB = function(options) {
-
-  /**
-   * @type {string}
-   * @private
-   */
-  this.account_ = options.account;
-
-  /**
-   * @type {string}
-   * @private
-   */
-  this.mapId_ = options.map || '';
-
-  /**
-   * @type {!Object}
-   * @private
-   */
-  this.config_ = options.config || {};
-
-  /**
-   * @type {!Object.<string, CartoDBLayerInfo>}
-   * @private
-   */
-  this.templateCache_ = {};
-
-  ol.source.XYZ.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,
-    minZoom: options.minZoom,
-    projection: options.projection,
-    state: ol.source.State.LOADING,
-    wrapX: options.wrapX
-  });
-  this.initializeMap_();
-};
-ol.inherits(ol.source.CartoDB, ol.source.XYZ);
-
-
-/**
- * Returns the current config.
- * @return {!Object} The current configuration.
- * @api
- */
-ol.source.CartoDB.prototype.getConfig = function() {
-  return this.config_;
-};
-
-
-/**
- * Updates the carto db config.
- * @param {Object} config a key-value lookup. Values will replace current values
- *     in the config.
- * @api
- */
-ol.source.CartoDB.prototype.updateConfig = function(config) {
-  ol.obj.assign(this.config_, config);
-  this.initializeMap_();
-};
-
-
-/**
- * Sets the CartoDB config
- * @param {Object} config In the case of anonymous maps, a CartoDB configuration
- *     object.
- * If using named maps, a key-value lookup with the template parameters.
- * @api
- */
-ol.source.CartoDB.prototype.setConfig = function(config) {
-  this.config_ = config || {};
-  this.initializeMap_();
-};
-
-
-/**
- * Issue a request to initialize the CartoDB map.
- * @private
- */
-ol.source.CartoDB.prototype.initializeMap_ = function() {
-  var paramHash = JSON.stringify(this.config_);
-  if (this.templateCache_[paramHash]) {
-    this.applyTemplate_(this.templateCache_[paramHash]);
-    return;
-  }
-  var mapUrl = 'https://' + this.account_ + '.cartodb.com/api/v1/map';
-
-  if (this.mapId_) {
-    mapUrl += '/named/' + this.mapId_;
-  }
-
-  var client = new XMLHttpRequest();
-  client.addEventListener('load', this.handleInitResponse_.bind(this, paramHash));
-  client.addEventListener('error', this.handleInitError_.bind(this));
-  client.open('POST', mapUrl);
-  client.setRequestHeader('Content-type', 'application/json');
-  client.send(JSON.stringify(this.config_));
-};
-
-
-/**
- * Handle map initialization response.
- * @param {string} paramHash a hash representing the parameter set that was used
- *     for the request
- * @param {Event} event Event.
- * @private
- */
-ol.source.CartoDB.prototype.handleInitResponse_ = function(paramHash, event) {
-  var client = /** @type {XMLHttpRequest} */ (event.target);
-  // status will be 0 for file:// urls
-  if (!client.status || client.status >= 200 && client.status < 300) {
-    var response;
-    try {
-      response = /** @type {CartoDBLayerInfo} */(JSON.parse(client.responseText));
-    } catch (err) {
-      this.setState(ol.source.State.ERROR);
-      return;
-    }
-    this.applyTemplate_(response);
-    this.templateCache_[paramHash] = response;
-    this.setState(ol.source.State.READY);
-  } else {
-    this.setState(ol.source.State.ERROR);
-  }
-};
-
-
-/**
- * @private
- * @param {Event} event Event.
- */
-ol.source.CartoDB.prototype.handleInitError_ = function(event) {
-  this.setState(ol.source.State.ERROR);
-};
-
-
-/**
- * Apply the new tile urls returned by carto db
- * @param {CartoDBLayerInfo} data Result of carto db call.
- * @private
- */
-ol.source.CartoDB.prototype.applyTemplate_ = function(data) {
-  var tilesUrl = 'https://' + data.cdn_url.https + '/' + this.account_ +
-      '/api/v1/map/' + data.layergroupid + '/{z}/{x}/{y}.png';
-  this.setUrl(tilesUrl);
-};
-
-// FIXME keep cluster cache by resolution ?
-// FIXME distance not respected because of the centroid
-
-goog.provide('ol.source.Cluster');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.Feature');
-goog.require('ol.coordinate');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.geom.Point');
-goog.require('ol.source.Vector');
-
-
-/**
- * @classdesc
- * Layer source to cluster vector data. Works out of the box with point
- * geometries. For other geometry types, or if not all geometries should be
- * considered for clustering, a custom `geometryFunction` can be defined.
- *
- * @constructor
- * @param {olx.source.ClusterOptions} options Constructor options.
- * @extends {ol.source.Vector}
- * @api
- */
-ol.source.Cluster = function(options) {
-  ol.source.Vector.call(this, {
-    attributions: options.attributions,
-    extent: options.extent,
-    logo: options.logo,
-    projection: options.projection,
-    wrapX: options.wrapX
-  });
-
-  /**
-   * @type {number|undefined}
-   * @protected
-   */
-  this.resolution = undefined;
-
-  /**
-   * @type {number}
-   * @protected
-   */
-  this.distance = options.distance !== undefined ? options.distance : 20;
-
-  /**
-   * @type {Array.<ol.Feature>}
-   * @protected
-   */
-  this.features = [];
-
-  /**
-   * @param {ol.Feature} feature Feature.
-   * @return {ol.geom.Point} Cluster calculation point.
-   * @protected
-   */
-  this.geometryFunction = options.geometryFunction || function(feature) {
-    var geometry = /** @type {ol.geom.Point} */ (feature.getGeometry());
-    ol.asserts.assert(geometry instanceof ol.geom.Point,
-        10); // The default `geometryFunction` can only handle `ol.geom.Point` geometries
-    return geometry;
-  };
-
-  /**
-   * @type {ol.source.Vector}
-   * @protected
-   */
-  this.source = options.source;
-
-  this.source.on(ol.events.EventType.CHANGE,
-      ol.source.Cluster.prototype.refresh, this);
-};
-ol.inherits(ol.source.Cluster, ol.source.Vector);
-
-
-/**
- * Get the distance in pixels between clusters.
- * @return {number} Distance.
- * @api
- */
-ol.source.Cluster.prototype.getDistance = function() {
-  return this.distance;
-};
-
-
-/**
- * Get a reference to the wrapped source.
- * @return {ol.source.Vector} Source.
- * @api
- */
-ol.source.Cluster.prototype.getSource = function() {
-  return this.source;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.Cluster.prototype.loadFeatures = function(extent, resolution,
-    projection) {
-  this.source.loadFeatures(extent, resolution, projection);
-  if (resolution !== this.resolution) {
-    this.clear();
-    this.resolution = resolution;
-    this.cluster();
-    this.addFeatures(this.features);
-  }
-};
-
-
-/**
- * Set the distance in pixels between clusters.
- * @param {number} distance The distance in pixels.
- * @api
- */
-ol.source.Cluster.prototype.setDistance = function(distance) {
-  this.distance = distance;
-  this.refresh();
-};
-
-
-/**
- * handle the source changing
- * @override
- */
-ol.source.Cluster.prototype.refresh = function() {
-  this.clear();
-  this.cluster();
-  this.addFeatures(this.features);
-  ol.source.Vector.prototype.refresh.call(this);
-};
-
-
-/**
- * @protected
- */
-ol.source.Cluster.prototype.cluster = function() {
-  if (this.resolution === undefined) {
-    return;
-  }
-  this.features.length = 0;
-  var extent = ol.extent.createEmpty();
-  var mapDistance = this.distance * this.resolution;
-  var features = this.source.getFeatures();
-
-  /**
-   * @type {!Object.<string, boolean>}
-   */
-  var clustered = {};
-
-  for (var i = 0, ii = features.length; i < ii; i++) {
-    var feature = features[i];
-    if (!(ol.getUid(feature).toString() in clustered)) {
-      var geometry = this.geometryFunction(feature);
-      if (geometry) {
-        var coordinates = geometry.getCoordinates();
-        ol.extent.createOrUpdateFromCoordinate(coordinates, extent);
-        ol.extent.buffer(extent, mapDistance, extent);
-
-        var neighbors = this.source.getFeaturesInExtent(extent);
-        neighbors = neighbors.filter(function(neighbor) {
-          var uid = ol.getUid(neighbor).toString();
-          if (!(uid in clustered)) {
-            clustered[uid] = true;
-            return true;
-          } else {
-            return false;
-          }
-        });
-        this.features.push(this.createCluster(neighbors));
-      }
-    }
-  }
-};
-
-
-/**
- * @param {Array.<ol.Feature>} features Features
- * @return {ol.Feature} The cluster feature.
- * @protected
- */
-ol.source.Cluster.prototype.createCluster = function(features) {
-  var centroid = [0, 0];
-  for (var i = features.length - 1; i >= 0; --i) {
-    var geometry = this.geometryFunction(features[i]);
-    if (geometry) {
-      ol.coordinate.add(centroid, geometry.getCoordinates());
-    } else {
-      features.splice(i, 1);
-    }
-  }
-  ol.coordinate.scale(centroid, 1 / features.length);
-
-  var cluster = new ol.Feature(new ol.geom.Point(centroid));
-  cluster.set('features', features);
-  return cluster;
-};
-
-goog.provide('ol.uri');
-
-
-/**
- * Appends query parameters to a URI.
- *
- * @param {string} uri The original URI, which may already have query data.
- * @param {!Object} params An object where keys are URI-encoded parameter keys,
- *     and the values are arbitrary types or arrays.
- * @return {string} The new URI.
- */
-ol.uri.appendParams = function(uri, params) {
-  var keyParams = [];
-  // Skip any null or undefined parameter values
-  Object.keys(params).forEach(function(k) {
-    if (params[k] !== null && params[k] !== undefined) {
-      keyParams.push(k + '=' + encodeURIComponent(params[k]));
-    }
-  });
-  var qs = keyParams.join('&');
-  // remove any trailing ? or &
-  uri = uri.replace(/[?&]$/, '');
-  // append ? or & depending on whether uri has existing parameters
-  uri = uri.indexOf('?') === -1 ? uri + '?' : uri + '&';
-  return uri + qs;
-};
-
-goog.provide('ol.source.ImageArcGISRest');
-
-goog.require('ol');
-goog.require('ol.Image');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.source.Image');
-goog.require('ol.uri');
-
-
-/**
- * @classdesc
- * Source for data from ArcGIS Rest services providing single, untiled images.
- * Useful when underlying map service has labels.
- *
- * If underlying map service is not using labels,
- * take advantage of ol image caching and use
- * {@link ol.source.TileArcGISRest} data source.
- *
- * @constructor
- * @fires ol.source.Image.Event
- * @extends {ol.source.Image}
- * @param {olx.source.ImageArcGISRestOptions=} opt_options Image ArcGIS Rest Options.
- * @api
- */
-ol.source.ImageArcGISRest = function(opt_options) {
-
-  var options = opt_options || {};
-
-  ol.source.Image.call(this, {
-    attributions: options.attributions,
-    logo: options.logo,
-    projection: options.projection,
-    resolutions: options.resolutions
-  });
-
-  /**
-   * @private
-   * @type {?string}
-   */
-  this.crossOrigin_ =
-      options.crossOrigin !== undefined ? options.crossOrigin : null;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.url_ = options.url;
-
-  /**
-   * @private
-   * @type {ol.ImageLoadFunctionType}
-   */
-  this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?
-      options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
-
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.params_ = options.params || {};
-
-  /**
-   * @private
-   * @type {ol.Image}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.imageSize_ = [0, 0];
-
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;
-
-};
-ol.inherits(ol.source.ImageArcGISRest, ol.source.Image);
-
-
-/**
- * Get the user-provided params, i.e. those passed to the constructor through
- * the "params" option, and possibly updated using the updateParams method.
- * @return {Object} Params.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.getParams = function() {
-  return this.params_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageArcGISRest.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
-
-  if (this.url_ === undefined) {
-    return null;
-  }
-
-  resolution = this.findNearestResolution(resolution);
-  pixelRatio = this.hidpi_ ? pixelRatio : 1;
-
-  var image = this.image_;
-  if (image &&
-      this.renderedRevision_ == this.getRevision() &&
-      image.getResolution() == resolution &&
-      image.getPixelRatio() == pixelRatio &&
-      ol.extent.containsExtent(image.getExtent(), extent)) {
-    return image;
-  }
-
-  var params = {
-    'F': 'image',
-    'FORMAT': 'PNG32',
-    'TRANSPARENT': true
-  };
-  ol.obj.assign(params, this.params_);
-
-  extent = extent.slice();
-  var centerX = (extent[0] + extent[2]) / 2;
-  var centerY = (extent[1] + extent[3]) / 2;
-  if (this.ratio_ != 1) {
-    var halfWidth = this.ratio_ * ol.extent.getWidth(extent) / 2;
-    var halfHeight = this.ratio_ * ol.extent.getHeight(extent) / 2;
-    extent[0] = centerX - halfWidth;
-    extent[1] = centerY - halfHeight;
-    extent[2] = centerX + halfWidth;
-    extent[3] = centerY + halfHeight;
-  }
-
-  var imageResolution = resolution / pixelRatio;
-
-  // Compute an integer width and height.
-  var width = Math.ceil(ol.extent.getWidth(extent) / imageResolution);
-  var height = Math.ceil(ol.extent.getHeight(extent) / imageResolution);
-
-  // Modify the extent to match the integer width and height.
-  extent[0] = centerX - imageResolution * width / 2;
-  extent[2] = centerX + imageResolution * width / 2;
-  extent[1] = centerY - imageResolution * height / 2;
-  extent[3] = centerY + imageResolution * height / 2;
-
-  this.imageSize_[0] = width;
-  this.imageSize_[1] = height;
-
-  var url = this.getRequestUrl_(extent, this.imageSize_, pixelRatio,
-      projection, params);
-
-  this.image_ = new ol.Image(extent, resolution, pixelRatio,
-      this.getAttributions(), url, this.crossOrigin_, this.imageLoadFunction_);
-
-  this.renderedRevision_ = this.getRevision();
-
-  ol.events.listen(this.image_, ol.events.EventType.CHANGE,
-      this.handleImageChange, this);
-
-  return this.image_;
-
-};
-
-
-/**
- * Return the image load function of the source.
- * @return {ol.ImageLoadFunctionType} The image load function.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.getImageLoadFunction = function() {
-  return this.imageLoadFunction_;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {ol.Size} size Size.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {Object} params Params.
- * @return {string} Request URL.
- * @private
- */
-ol.source.ImageArcGISRest.prototype.getRequestUrl_ = function(extent, size, pixelRatio, projection, params) {
-  // ArcGIS Server only wants the numeric portion of the projection ID.
-  var srid = projection.getCode().split(':').pop();
-
-  params['SIZE'] = size[0] + ',' + size[1];
-  params['BBOX'] = extent.join(',');
-  params['BBOXSR'] = srid;
-  params['IMAGESR'] = srid;
-  params['DPI'] = Math.round(90 * pixelRatio);
-
-  var url = this.url_;
-
-  var modifiedUrl = url
-   .replace(/MapServer\/?$/, 'MapServer/export')
-   .replace(/ImageServer\/?$/, 'ImageServer/exportImage');
-  if (modifiedUrl == url) {
-    ol.asserts.assert(false, 50); // `options.featureTypes` should be an Array
-  }
-  return ol.uri.appendParams(modifiedUrl, params);
-};
-
-
-/**
- * Return the URL used for this ArcGIS source.
- * @return {string|undefined} URL.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.getUrl = function() {
-  return this.url_;
-};
-
-
-/**
- * Set the image load function of the source.
- * @param {ol.ImageLoadFunctionType} imageLoadFunction Image load function.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.setImageLoadFunction = function(imageLoadFunction) {
-  this.image_ = null;
-  this.imageLoadFunction_ = imageLoadFunction;
-  this.changed();
-};
-
-
-/**
- * Set the URL to use for requests.
- * @param {string|undefined} url URL.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.setUrl = function(url) {
-  if (url != this.url_) {
-    this.url_ = url;
-    this.image_ = null;
-    this.changed();
-  }
-};
-
-
-/**
- * Update the user-provided params.
- * @param {Object} params Params.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.updateParams = function(params) {
-  ol.obj.assign(this.params_, params);
-  this.image_ = null;
-  this.changed();
-};
-
-goog.provide('ol.source.ImageMapGuide');
-
-goog.require('ol');
-goog.require('ol.Image');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.source.Image');
-goog.require('ol.uri');
-
-
-/**
- * @classdesc
- * Source for images from Mapguide servers
- *
- * @constructor
- * @fires ol.source.Image.Event
- * @extends {ol.source.Image}
- * @param {olx.source.ImageMapGuideOptions} options Options.
- * @api
- */
-ol.source.ImageMapGuide = function(options) {
-
-  ol.source.Image.call(this, {
-    projection: options.projection,
-    resolutions: options.resolutions
-  });
-
-  /**
-   * @private
-   * @type {?string}
-   */
-  this.crossOrigin_ =
-      options.crossOrigin !== undefined ? options.crossOrigin : null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.displayDpi_ = options.displayDpi !== undefined ?
-      options.displayDpi : 96;
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.params_ = options.params || {};
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.url_ = options.url;
-
-  /**
-   * @private
-   * @type {ol.ImageLoadFunctionType}
-   */
-  this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?
-      options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.metersPerUnit_ = options.metersPerUnit !== undefined ?
-      options.metersPerUnit : 1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.ratio_ = options.ratio !== undefined ? options.ratio : 1;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.useOverlay_ = options.useOverlay !== undefined ?
-      options.useOverlay : false;
-
-  /**
-   * @private
-   * @type {ol.Image}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = 0;
-
-};
-ol.inherits(ol.source.ImageMapGuide, ol.source.Image);
-
-
-/**
- * Get the user-provided params, i.e. those passed to the constructor through
- * the "params" option, and possibly updated using the updateParams method.
- * @return {Object} Params.
- * @api
- */
-ol.source.ImageMapGuide.prototype.getParams = function() {
-  return this.params_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageMapGuide.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
-  resolution = this.findNearestResolution(resolution);
-  pixelRatio = this.hidpi_ ? pixelRatio : 1;
-
-  var image = this.image_;
-  if (image &&
-      this.renderedRevision_ == this.getRevision() &&
-      image.getResolution() == resolution &&
-      image.getPixelRatio() == pixelRatio &&
-      ol.extent.containsExtent(image.getExtent(), extent)) {
-    return image;
-  }
-
-  if (this.ratio_ != 1) {
-    extent = extent.slice();
-    ol.extent.scaleFromCenter(extent, this.ratio_);
-  }
-  var width = ol.extent.getWidth(extent) / resolution;
-  var height = ol.extent.getHeight(extent) / resolution;
-  var size = [width * pixelRatio, height * pixelRatio];
-
-  if (this.url_ !== undefined) {
-    var imageUrl = this.getUrl(this.url_, this.params_, extent, size,
-        projection);
-    image = new ol.Image(extent, resolution, pixelRatio,
-        this.getAttributions(), imageUrl, this.crossOrigin_,
-        this.imageLoadFunction_);
-    ol.events.listen(image, ol.events.EventType.CHANGE,
-        this.handleImageChange, this);
-  } else {
-    image = null;
-  }
-  this.image_ = image;
-  this.renderedRevision_ = this.getRevision();
-
-  return image;
-};
-
-
-/**
- * Return the image load function of the source.
- * @return {ol.ImageLoadFunctionType} The image load function.
- * @api
- */
-ol.source.ImageMapGuide.prototype.getImageLoadFunction = function() {
-  return this.imageLoadFunction_;
-};
-
-
-/**
- * @param {ol.Extent} extent The map extents.
- * @param {ol.Size} size The viewport size.
- * @param {number} metersPerUnit The meters-per-unit value.
- * @param {number} dpi The display resolution.
- * @return {number} The computed map scale.
- */
-ol.source.ImageMapGuide.getScale = function(extent, size, metersPerUnit, dpi) {
-  var mcsW = ol.extent.getWidth(extent);
-  var mcsH = ol.extent.getHeight(extent);
-  var devW = size[0];
-  var devH = size[1];
-  var mpp = 0.0254 / dpi;
-  if (devH * mcsW > devW * mcsH) {
-    return mcsW * metersPerUnit / (devW * mpp); // width limited
-  } else {
-    return mcsH * metersPerUnit / (devH * mpp); // height limited
-  }
-};
-
-
-/**
- * Update the user-provided params.
- * @param {Object} params Params.
- * @api
- */
-ol.source.ImageMapGuide.prototype.updateParams = function(params) {
-  ol.obj.assign(this.params_, params);
-  this.changed();
-};
-
-
-/**
- * @param {string} baseUrl The mapagent url.
- * @param {Object.<string, string|number>} params Request parameters.
- * @param {ol.Extent} extent Extent.
- * @param {ol.Size} size Size.
- * @param {ol.proj.Projection} projection Projection.
- * @return {string} The mapagent map image request URL.
- */
-ol.source.ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, projection) {
-  var scale = ol.source.ImageMapGuide.getScale(extent, size,
-      this.metersPerUnit_, this.displayDpi_);
-  var center = ol.extent.getCenter(extent);
-  var baseParams = {
-    'OPERATION': this.useOverlay_ ? 'GETDYNAMICMAPOVERLAYIMAGE' : 'GETMAPIMAGE',
-    'VERSION': '2.0.0',
-    'LOCALE': 'en',
-    'CLIENTAGENT': 'ol.source.ImageMapGuide source',
-    'CLIP': '1',
-    'SETDISPLAYDPI': this.displayDpi_,
-    'SETDISPLAYWIDTH': Math.round(size[0]),
-    'SETDISPLAYHEIGHT': Math.round(size[1]),
-    'SETVIEWSCALE': scale,
-    'SETVIEWCENTERX': center[0],
-    'SETVIEWCENTERY': center[1]
-  };
-  ol.obj.assign(baseParams, params);
-  return ol.uri.appendParams(baseUrl, baseParams);
-};
-
-
-/**
- * Set the image load function of the MapGuide source.
- * @param {ol.ImageLoadFunctionType} imageLoadFunction Image load function.
- * @api
- */
-ol.source.ImageMapGuide.prototype.setImageLoadFunction = function(
-    imageLoadFunction) {
-  this.image_ = null;
-  this.imageLoadFunction_ = imageLoadFunction;
-  this.changed();
-};
-
-goog.provide('ol.source.ImageStatic');
-
-goog.require('ol');
-goog.require('ol.Image');
-goog.require('ol.ImageState');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.proj');
-goog.require('ol.source.Image');
-
-
-/**
- * @classdesc
- * A layer source for displaying a single, static image.
- *
- * @constructor
- * @extends {ol.source.Image}
- * @param {olx.source.ImageStaticOptions} options Options.
- * @api
- */
-ol.source.ImageStatic = function(options) {
-  var imageExtent = options.imageExtent;
-
-  var crossOrigin = options.crossOrigin !== undefined ?
-      options.crossOrigin : null;
-
-  var /** @type {ol.ImageLoadFunctionType} */ imageLoadFunction =
-      options.imageLoadFunction !== undefined ?
-      options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
-
-  ol.source.Image.call(this, {
-    attributions: options.attributions,
-    logo: options.logo,
-    projection: ol.proj.get(options.projection)
-  });
-
-  /**
-   * @private
-   * @type {ol.Image}
-   */
-  this.image_ = new ol.Image(imageExtent, undefined, 1, this.getAttributions(),
-      options.url, crossOrigin, imageLoadFunction);
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.imageSize_ = options.imageSize ? options.imageSize : null;
-
-  ol.events.listen(this.image_, ol.events.EventType.CHANGE,
-      this.handleImageChange, this);
-
-};
-ol.inherits(ol.source.ImageStatic, ol.source.Image);
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageStatic.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
-  if (ol.extent.intersects(extent, this.image_.getExtent())) {
-    return this.image_;
-  }
-  return null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageStatic.prototype.handleImageChange = function(evt) {
-  if (this.image_.getState() == ol.ImageState.LOADED) {
-    var imageExtent = this.image_.getExtent();
-    var image = this.image_.getImage();
-    var imageWidth, imageHeight;
-    if (this.imageSize_) {
-      imageWidth = this.imageSize_[0];
-      imageHeight = this.imageSize_[1];
-    } else {
-      imageWidth = image.width;
-      imageHeight = image.height;
-    }
-    var resolution = ol.extent.getHeight(imageExtent) / imageHeight;
-    var targetWidth = Math.ceil(ol.extent.getWidth(imageExtent) / resolution);
-    if (targetWidth != imageWidth) {
-      var context = ol.dom.createCanvasContext2D(targetWidth, imageHeight);
-      var canvas = context.canvas;
-      context.drawImage(image, 0, 0, imageWidth, imageHeight,
-          0, 0, canvas.width, canvas.height);
-      this.image_.setImage(canvas);
-    }
-  }
-  ol.source.Image.prototype.handleImageChange.call(this, evt);
-};
-
-goog.provide('ol.source.WMSServerType');
-
-
-/**
- * Available server types: `'carmentaserver'`, `'geoserver'`, `'mapserver'`,
- *     `'qgis'`. These are servers that have vendor parameters beyond the WMS
- *     specification that OpenLayers can make use of.
- * @enum {string}
- */
-ol.source.WMSServerType = {
-  CARMENTA_SERVER: 'carmentaserver',
-  GEOSERVER: 'geoserver',
-  MAPSERVER: 'mapserver',
-  QGIS: 'qgis'
-};
-
-// FIXME cannot be shared between maps with different projections
-
-goog.provide('ol.source.ImageWMS');
-
-goog.require('ol');
-goog.require('ol.Image');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.source.Image');
-goog.require('ol.source.WMSServerType');
-goog.require('ol.string');
-goog.require('ol.uri');
-
-
-/**
- * @classdesc
- * Source for WMS servers providing single, untiled images.
- *
- * @constructor
- * @fires ol.source.Image.Event
- * @extends {ol.source.Image}
- * @param {olx.source.ImageWMSOptions=} opt_options Options.
- * @api
- */
-ol.source.ImageWMS = function(opt_options) {
-
-  var options = opt_options || {};
-
-  ol.source.Image.call(this, {
-    attributions: options.attributions,
-    logo: options.logo,
-    projection: options.projection,
-    resolutions: options.resolutions
-  });
-
-  /**
-   * @private
-   * @type {?string}
-   */
-  this.crossOrigin_ =
-      options.crossOrigin !== undefined ? options.crossOrigin : null;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.url_ = options.url;
-
-  /**
-   * @private
-   * @type {ol.ImageLoadFunctionType}
-   */
-  this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?
-      options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.params_ = options.params || {};
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.v13_ = true;
-  this.updateV13_();
-
-  /**
-   * @private
-   * @type {ol.source.WMSServerType|undefined}
-   */
-  this.serverType_ =
-      /** @type {ol.source.WMSServerType|undefined} */ (options.serverType);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
-
-  /**
-   * @private
-   * @type {ol.Image}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.imageSize_ = [0, 0];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;
-
-};
-ol.inherits(ol.source.ImageWMS, ol.source.Image);
-
-
-/**
- * @const
- * @type {ol.Size}
- * @private
- */
-ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_ = [101, 101];
-
-
-/**
- * Return the GetFeatureInfo URL for the passed coordinate, resolution, and
- * projection. Return `undefined` if the GetFeatureInfo URL cannot be
- * constructed.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {ol.ProjectionLike} projection Projection.
- * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should
- *     be provided. If `QUERY_LAYERS` is not provided then the layers specified
- *     in the `LAYERS` parameter will be used. `VERSION` should not be
- *     specified here.
- * @return {string|undefined} GetFeatureInfo URL.
- * @api
- */
-ol.source.ImageWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) {
-  if (this.url_ === undefined) {
-    return undefined;
-  }
-
-  var extent = ol.extent.getForViewAndSize(
-      coordinate, resolution, 0,
-      ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_);
-
-  var baseParams = {
-    'SERVICE': 'WMS',
-    'VERSION': ol.DEFAULT_WMS_VERSION,
-    'REQUEST': 'GetFeatureInfo',
-    'FORMAT': 'image/png',
-    'TRANSPARENT': true,
-    'QUERY_LAYERS': this.params_['LAYERS']
-  };
-  ol.obj.assign(baseParams, this.params_, params);
-
-  var x = Math.floor((coordinate[0] - extent[0]) / resolution);
-  var y = Math.floor((extent[3] - coordinate[1]) / resolution);
-  baseParams[this.v13_ ? 'I' : 'X'] = x;
-  baseParams[this.v13_ ? 'J' : 'Y'] = y;
-
-  return this.getRequestUrl_(
-      extent, ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_,
-      1, ol.proj.get(projection), baseParams);
-};
-
-
-/**
- * Get the user-provided params, i.e. those passed to the constructor through
- * the "params" option, and possibly updated using the updateParams method.
- * @return {Object} Params.
- * @api
- */
-ol.source.ImageWMS.prototype.getParams = function() {
-  return this.params_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageWMS.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
-
-  if (this.url_ === undefined) {
-    return null;
-  }
-
-  resolution = this.findNearestResolution(resolution);
-
-  if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {
-    pixelRatio = 1;
-  }
-
-  var imageResolution = resolution / pixelRatio;
-
-  var center = ol.extent.getCenter(extent);
-  var viewWidth = Math.ceil(ol.extent.getWidth(extent) / imageResolution);
-  var viewHeight = Math.ceil(ol.extent.getHeight(extent) / imageResolution);
-  var viewExtent = ol.extent.getForViewAndSize(center, imageResolution, 0,
-      [viewWidth, viewHeight]);
-  var requestWidth = Math.ceil(this.ratio_ * ol.extent.getWidth(extent) / imageResolution);
-  var requestHeight = Math.ceil(this.ratio_ * ol.extent.getHeight(extent) / imageResolution);
-  var requestExtent = ol.extent.getForViewAndSize(center, imageResolution, 0,
-      [requestWidth, requestHeight]);
-
-  var image = this.image_;
-  if (image &&
-      this.renderedRevision_ == this.getRevision() &&
-      image.getResolution() == resolution &&
-      image.getPixelRatio() == pixelRatio &&
-      ol.extent.containsExtent(image.getExtent(), viewExtent)) {
-    return image;
-  }
-
-  var params = {
-    'SERVICE': 'WMS',
-    'VERSION': ol.DEFAULT_WMS_VERSION,
-    'REQUEST': 'GetMap',
-    'FORMAT': 'image/png',
-    'TRANSPARENT': true
-  };
-  ol.obj.assign(params, this.params_);
-
-  this.imageSize_[0] = Math.round(ol.extent.getWidth(requestExtent) / imageResolution);
-  this.imageSize_[1] = Math.round(ol.extent.getHeight(requestExtent) / imageResolution);
-
-  var url = this.getRequestUrl_(requestExtent, this.imageSize_, pixelRatio,
-      projection, params);
-
-  this.image_ = new ol.Image(requestExtent, resolution, pixelRatio,
-      this.getAttributions(), url, this.crossOrigin_, this.imageLoadFunction_);
-
-  this.renderedRevision_ = this.getRevision();
-
-  ol.events.listen(this.image_, ol.events.EventType.CHANGE,
-      this.handleImageChange, this);
-
-  return this.image_;
-
-};
-
-
-/**
- * Return the image load function of the source.
- * @return {ol.ImageLoadFunctionType} The image load function.
- * @api
- */
-ol.source.ImageWMS.prototype.getImageLoadFunction = function() {
-  return this.imageLoadFunction_;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {ol.Size} size Size.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {Object} params Params.
- * @return {string} Request URL.
- * @private
- */
-ol.source.ImageWMS.prototype.getRequestUrl_ = function(extent, size, pixelRatio, projection, params) {
-
-  ol.asserts.assert(this.url_ !== undefined, 9); // `url` must be configured or set using `#setUrl()`
-
-  params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();
-
-  if (!('STYLES' in this.params_)) {
-    params['STYLES'] = '';
-  }
-
-  if (pixelRatio != 1) {
-    switch (this.serverType_) {
-      case ol.source.WMSServerType.GEOSERVER:
-        var dpi = (90 * pixelRatio + 0.5) | 0;
-        if ('FORMAT_OPTIONS' in params) {
-          params['FORMAT_OPTIONS'] += ';dpi:' + dpi;
-        } else {
-          params['FORMAT_OPTIONS'] = 'dpi:' + dpi;
-        }
-        break;
-      case ol.source.WMSServerType.MAPSERVER:
-        params['MAP_RESOLUTION'] = 90 * pixelRatio;
-        break;
-      case ol.source.WMSServerType.CARMENTA_SERVER:
-      case ol.source.WMSServerType.QGIS:
-        params['DPI'] = 90 * pixelRatio;
-        break;
-      default:
-        ol.asserts.assert(false, 8); // Unknown `serverType` configured
-        break;
-    }
-  }
-
-  params['WIDTH'] = size[0];
-  params['HEIGHT'] = size[1];
-
-  var axisOrientation = projection.getAxisOrientation();
-  var bbox;
-  if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {
-    bbox = [extent[1], extent[0], extent[3], extent[2]];
-  } else {
-    bbox = extent;
-  }
-  params['BBOX'] = bbox.join(',');
-
-  return ol.uri.appendParams(/** @type {string} */ (this.url_), params);
-};
-
-
-/**
- * Return the URL used for this WMS source.
- * @return {string|undefined} URL.
- * @api
- */
-ol.source.ImageWMS.prototype.getUrl = function() {
-  return this.url_;
-};
-
-
-/**
- * Set the image load function of the source.
- * @param {ol.ImageLoadFunctionType} imageLoadFunction Image load function.
- * @api
- */
-ol.source.ImageWMS.prototype.setImageLoadFunction = function(
-    imageLoadFunction) {
-  this.image_ = null;
-  this.imageLoadFunction_ = imageLoadFunction;
-  this.changed();
-};
-
-
-/**
- * Set the URL to use for requests.
- * @param {string|undefined} url URL.
- * @api
- */
-ol.source.ImageWMS.prototype.setUrl = function(url) {
-  if (url != this.url_) {
-    this.url_ = url;
-    this.image_ = null;
-    this.changed();
-  }
-};
-
-
-/**
- * Update the user-provided params.
- * @param {Object} params Params.
- * @api
- */
-ol.source.ImageWMS.prototype.updateParams = function(params) {
-  ol.obj.assign(this.params_, params);
-  this.updateV13_();
-  this.image_ = null;
-  this.changed();
-};
-
-
-/**
- * @private
- */
-ol.source.ImageWMS.prototype.updateV13_ = function() {
-  var version = this.params_['VERSION'] || ol.DEFAULT_WMS_VERSION;
-  this.v13_ = ol.string.compareVersions(version, '1.3') >= 0;
-};
-
-goog.provide('ol.source.OSM');
-
-goog.require('ol');
-goog.require('ol.Attribution');
-goog.require('ol.source.XYZ');
-
-
-/**
- * @classdesc
- * Layer source for the OpenStreetMap tile server.
- *
- * @constructor
- * @extends {ol.source.XYZ}
- * @param {olx.source.OSMOptions=} opt_options Open Street Map options.
- * @api
- */
-ol.source.OSM = function(opt_options) {
-
-  var options = opt_options || {};
-
-  var attributions;
-  if (options.attributions !== undefined) {
-    attributions = options.attributions;
-  } else {
-    attributions = [ol.source.OSM.ATTRIBUTION];
-  }
-
-  var crossOrigin = options.crossOrigin !== undefined ?
-      options.crossOrigin : 'anonymous';
-
-  var url = options.url !== undefined ?
-      options.url : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';
-
-  ol.source.XYZ.call(this, {
-    attributions: attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: crossOrigin,
-    opaque: options.opaque !== undefined ? options.opaque : true,
-    maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileLoadFunction: options.tileLoadFunction,
-    url: url,
-    wrapX: options.wrapX
-  });
-
-};
-ol.inherits(ol.source.OSM, ol.source.XYZ);
-
-
-/**
- * The attribution containing a link to the OpenStreetMap Copyright and License
- * page.
- * @const
- * @type {ol.Attribution}
- * @api
- */
-ol.source.OSM.ATTRIBUTION = new ol.Attribution({
-  html: '&copy; ' +
-      '<a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> ' +
-      'contributors.'
-});
-
-
-/**
- * @fileoverview
- * @suppress {accessControls, ambiguousFunctionDecl, checkDebuggerStatement, checkRegExp, checkTypes, checkVars, const, constantProperty, deprecated, duplicate, es5Strict, fileoverviewTags, missingProperties, nonStandardJsDocs, strictModuleDepCheck, suspiciousCode, undefinedNames, undefinedVars, unknownDefines, unusedLocalVariables, uselessCode, visibility}
- */
-goog.provide('ol.ext.pixelworks.Processor');
-
-/** @typedef {function(*)} */
-ol.ext.pixelworks.Processor = function() {};
-
-(function() {(function (exports) {
-'use strict';
-
-var hasImageData = true;
-try {
-  new ImageData(10, 10);
-} catch (_) {
-  hasImageData = false;
-}
-var context = document.createElement('canvas').getContext('2d');
-function newImageData$1(data, width, height) {
-  if (hasImageData) {
-    return new ImageData(data, width, height);
-  } else {
-    var imageData = context.createImageData(width, height);
-    imageData.data.set(data);
-    return imageData;
-  }
-}
-var newImageData_1 = newImageData$1;
-var util = {
-	newImageData: newImageData_1
-};
-
-var newImageData = util.newImageData;
-function createMinion(operation) {
-  var workerHasImageData = true;
-  try {
-    new ImageData(10, 10);
-  } catch (_) {
-    workerHasImageData = false;
-  }
-  function newWorkerImageData(data, width, height) {
-    if (workerHasImageData) {
-      return new ImageData(data, width, height);
-    } else {
-      return {data: data, width: width, height: height};
-    }
-  }
-  return function(data) {
-    var buffers = data['buffers'];
-    var meta = data['meta'];
-    var imageOps = data['imageOps'];
-    var width = data['width'];
-    var height = data['height'];
-    var numBuffers = buffers.length;
-    var numBytes = buffers[0].byteLength;
-    var output, b;
-    if (imageOps) {
-      var images = new Array(numBuffers);
-      for (b = 0; b < numBuffers; ++b) {
-        images[b] = newWorkerImageData(
-            new Uint8ClampedArray(buffers[b]), width, height);
-      }
-      output = operation(images, meta).data;
-    } else {
-      output = new Uint8ClampedArray(numBytes);
-      var arrays = new Array(numBuffers);
-      var pixels = new Array(numBuffers);
-      for (b = 0; b < numBuffers; ++b) {
-        arrays[b] = new Uint8ClampedArray(buffers[b]);
-        pixels[b] = [0, 0, 0, 0];
-      }
-      for (var i = 0; i < numBytes; i += 4) {
-        for (var j = 0; j < numBuffers; ++j) {
-          var array = arrays[j];
-          pixels[j][0] = array[i];
-          pixels[j][1] = array[i + 1];
-          pixels[j][2] = array[i + 2];
-          pixels[j][3] = array[i + 3];
-        }
-        var pixel = operation(pixels, meta);
-        output[i] = pixel[0];
-        output[i + 1] = pixel[1];
-        output[i + 2] = pixel[2];
-        output[i + 3] = pixel[3];
-      }
-    }
-    return output.buffer;
-  };
-}
-function createWorker(config, onMessage) {
-  var lib = Object.keys(config.lib || {}).map(function(name) {
-    return 'var ' + name + ' = ' + config.lib[name].toString() + ';';
-  });
-  var lines = lib.concat([
-    'var __minion__ = (' + createMinion.toString() + ')(', config.operation.toString(), ');',
-    'self.addEventListener("message", function(event) {',
-    '  var buffer = __minion__(event.data);',
-    '  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);',
-    '});'
-  ]);
-  var blob = new Blob(lines, {type: 'text/javascript'});
-  var source = URL.createObjectURL(blob);
-  var worker = new Worker(source);
-  worker.addEventListener('message', onMessage);
-  return worker;
-}
-function createFauxWorker(config, onMessage) {
-  var minion = createMinion(config.operation);
-  return {
-    postMessage: function(data) {
-      setTimeout(function() {
-        onMessage({'data': {'buffer': minion(data), 'meta': data['meta']}});
-      }, 0);
-    }
-  };
-}
-function Processor(config) {
-  this._imageOps = !!config.imageOps;
-  var threads;
-  if (config.threads === 0) {
-    threads = 0;
-  } else if (this._imageOps) {
-    threads = 1;
-  } else {
-    threads = config.threads || 1;
-  }
-  var workers = [];
-  if (threads) {
-    for (var i = 0; i < threads; ++i) {
-      workers[i] = createWorker(config, this._onWorkerMessage.bind(this, i));
-    }
-  } else {
-    workers[0] = createFauxWorker(config, this._onWorkerMessage.bind(this, 0));
-  }
-  this._workers = workers;
-  this._queue = [];
-  this._maxQueueLength = config.queue || Infinity;
-  this._running = 0;
-  this._dataLookup = {};
-  this._job = null;
-}
-Processor.prototype.process = function(inputs, meta, callback) {
-  this._enqueue({
-    inputs: inputs,
-    meta: meta,
-    callback: callback
-  });
-  this._dispatch();
-};
-Processor.prototype.destroy = function() {
-  for (var key in this) {
-    this[key] = null;
-  }
-  this._destroyed = true;
-};
-Processor.prototype._enqueue = function(job) {
-  this._queue.push(job);
-  while (this._queue.length > this._maxQueueLength) {
-    this._queue.shift().callback(null, null);
-  }
-};
-Processor.prototype._dispatch = function() {
-  if (this._running === 0 && this._queue.length > 0) {
-    var job = this._job = this._queue.shift();
-    var width = job.inputs[0].width;
-    var height = job.inputs[0].height;
-    var buffers = job.inputs.map(function(input) {
-      return input.data.buffer;
-    });
-    var threads = this._workers.length;
-    this._running = threads;
-    if (threads === 1) {
-      this._workers[0].postMessage({
-        'buffers': buffers,
-        'meta': job.meta,
-        'imageOps': this._imageOps,
-        'width': width,
-        'height': height
-      }, buffers);
-    } else {
-      var length = job.inputs[0].data.length;
-      var segmentLength = 4 * Math.ceil(length / 4 / threads);
-      for (var i = 0; i < threads; ++i) {
-        var offset = i * segmentLength;
-        var slices = [];
-        for (var j = 0, jj = buffers.length; j < jj; ++j) {
-          slices.push(buffers[i].slice(offset, offset + segmentLength));
-        }
-        this._workers[i].postMessage({
-          'buffers': slices,
-          'meta': job.meta,
-          'imageOps': this._imageOps,
-          'width': width,
-          'height': height
-        }, slices);
-      }
-    }
-  }
-};
-Processor.prototype._onWorkerMessage = function(index, event) {
-  if (this._destroyed) {
-    return;
-  }
-  this._dataLookup[index] = event.data;
-  --this._running;
-  if (this._running === 0) {
-    this._resolveJob();
-  }
-};
-Processor.prototype._resolveJob = function() {
-  var job = this._job;
-  var threads = this._workers.length;
-  var data, meta;
-  if (threads === 1) {
-    data = new Uint8ClampedArray(this._dataLookup[0]['buffer']);
-    meta = this._dataLookup[0]['meta'];
-  } else {
-    var length = job.inputs[0].data.length;
-    data = new Uint8ClampedArray(length);
-    meta = new Array(length);
-    var segmentLength = 4 * Math.ceil(length / 4 / threads);
-    for (var i = 0; i < threads; ++i) {
-      var buffer = this._dataLookup[i]['buffer'];
-      var offset = i * segmentLength;
-      data.set(new Uint8ClampedArray(buffer), offset);
-      meta[i] = this._dataLookup[i]['meta'];
-    }
-  }
-  this._job = null;
-  this._dataLookup = {};
-  job.callback(null,
-      newImageData(data, job.inputs[0].width, job.inputs[0].height), meta);
-  this._dispatch();
-};
-var processor = Processor;
-
-var Processor_1 = processor;
-var index = {
-	Processor: Processor_1
-};
-
-exports['default'] = index;
-exports.Processor = Processor_1;
-
-}((this.pixelworks = this.pixelworks || {})));}).call(ol.ext);
-
-goog.provide('ol.source.RasterOperationType');
-
-/**
- * Raster operation type. Supported values are `'pixel'` and `'image'`.
- * @enum {string}
- */
-ol.source.RasterOperationType = {
-  PIXEL: 'pixel',
-  IMAGE: 'image'
-};
-
-goog.provide('ol.source.Raster');
-
-goog.require('ol');
-goog.require('ol.ImageCanvas');
-goog.require('ol.TileQueue');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.ext.pixelworks.Processor');
-goog.require('ol.extent');
-goog.require('ol.layer.Image');
-goog.require('ol.layer.Tile');
-goog.require('ol.obj');
-goog.require('ol.renderer.canvas.ImageLayer');
-goog.require('ol.renderer.canvas.TileLayer');
-goog.require('ol.source.Image');
-goog.require('ol.source.RasterOperationType');
-goog.require('ol.source.State');
-goog.require('ol.source.Tile');
-goog.require('ol.transform');
-
-
-/**
- * @classdesc
- * A source that transforms data from any number of input sources using an array
- * of {@link ol.RasterOperation} functions to transform input pixel values into
- * output pixel values.
- *
- * @constructor
- * @extends {ol.source.Image}
- * @fires ol.source.Raster.Event
- * @param {olx.source.RasterOptions} options Options.
- * @api
- */
-ol.source.Raster = function(options) {
-
-  /**
-   * @private
-   * @type {*}
-   */
-  this.worker_ = null;
-
-  /**
-   * @private
-   * @type {ol.source.RasterOperationType}
-   */
-  this.operationType_ = options.operationType !== undefined ?
-      options.operationType : ol.source.RasterOperationType.PIXEL;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.threads_ = options.threads !== undefined ? options.threads : 1;
-
-  /**
-   * @private
-   * @type {Array.<ol.renderer.canvas.Layer>}
-   */
-  this.renderers_ = ol.source.Raster.createRenderers_(options.sources);
-
-  for (var r = 0, rr = this.renderers_.length; r < rr; ++r) {
-    ol.events.listen(this.renderers_[r], ol.events.EventType.CHANGE,
-        this.changed, this);
-  }
-
-  /**
-   * @private
-   * @type {ol.TileQueue}
-   */
-  this.tileQueue_ = new ol.TileQueue(
-      function() {
-        return 1;
-      },
-      this.changed.bind(this));
-
-  var layerStatesArray = ol.source.Raster.getLayerStatesArray_(this.renderers_);
-  var layerStates = {};
-  for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {
-    layerStates[ol.getUid(layerStatesArray[i].layer)] = layerStatesArray[i];
-  }
-
-  /**
-   * The most recently requested frame state.
-   * @type {olx.FrameState}
-   * @private
-   */
-  this.requestedFrameState_;
-
-  /**
-   * The most recently rendered image canvas.
-   * @type {ol.ImageCanvas}
-   * @private
-   */
-  this.renderedImageCanvas_ = null;
-
-  /**
-   * The most recently rendered revision.
-   * @type {number}
-   */
-  this.renderedRevision_;
-
-  /**
-   * @private
-   * @type {olx.FrameState}
-   */
-  this.frameState_ = {
-    animate: false,
-    attributions: {},
-    coordinateToPixelTransform: ol.transform.create(),
-    extent: null,
-    focus: null,
-    index: 0,
-    layerStates: layerStates,
-    layerStatesArray: layerStatesArray,
-    logos: {},
-    pixelRatio: 1,
-    pixelToCoordinateTransform: ol.transform.create(),
-    postRenderFunctions: [],
-    size: [0, 0],
-    skippedFeatureUids: {},
-    tileQueue: this.tileQueue_,
-    time: Date.now(),
-    usedTiles: {},
-    viewState: /** @type {olx.ViewState} */ ({
-      rotation: 0
-    }),
-    viewHints: [],
-    wantedTiles: {}
-  };
-
-  ol.source.Image.call(this, {});
-
-  if (options.operation !== undefined) {
-    this.setOperation(options.operation, options.lib);
-  }
-
-};
-ol.inherits(ol.source.Raster, ol.source.Image);
-
-
-/**
- * Set the operation.
- * @param {ol.RasterOperation} operation New operation.
- * @param {Object=} opt_lib Functions that will be available to operations run
- *     in a worker.
- * @api
- */
-ol.source.Raster.prototype.setOperation = function(operation, opt_lib) {
-  this.worker_ = new ol.ext.pixelworks.Processor({
-    operation: operation,
-    imageOps: this.operationType_ === ol.source.RasterOperationType.IMAGE,
-    queue: 1,
-    lib: opt_lib,
-    threads: this.threads_
-  });
-  this.changed();
-};
-
-
-/**
- * Update the stored frame state.
- * @param {ol.Extent} extent The view extent (in map units).
- * @param {number} resolution The view resolution.
- * @param {ol.proj.Projection} projection The view projection.
- * @return {olx.FrameState} The updated frame state.
- * @private
- */
-ol.source.Raster.prototype.updateFrameState_ = function(extent, resolution, projection) {
-
-  var frameState = /** @type {olx.FrameState} */ (
-      ol.obj.assign({}, this.frameState_));
-
-  frameState.viewState = /** @type {olx.ViewState} */ (
-      ol.obj.assign({}, frameState.viewState));
-
-  var center = ol.extent.getCenter(extent);
-
-  frameState.extent = extent.slice();
-  frameState.focus = center;
-  frameState.size[0] = Math.round(ol.extent.getWidth(extent) / resolution);
-  frameState.size[1] = Math.round(ol.extent.getHeight(extent) / resolution);
-
-  var viewState = frameState.viewState;
-  viewState.center = center;
-  viewState.projection = projection;
-  viewState.resolution = resolution;
-  return frameState;
-};
-
-
-/**
- * Determine if all sources are ready.
- * @return {boolean} All sources are ready.
- * @private
- */
-ol.source.Raster.prototype.allSourcesReady_ = function() {
-  var ready = true;
-  var source;
-  for (var i = 0, ii = this.renderers_.length; i < ii; ++i) {
-    source = this.renderers_[i].getLayer().getSource();
-    if (source.getState() !== ol.source.State.READY) {
-      ready = false;
-      break;
-    }
-  }
-  return ready;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.Raster.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
-  if (!this.allSourcesReady_()) {
-    return null;
-  }
-
-  var frameState = this.updateFrameState_(extent, resolution, projection);
-  this.requestedFrameState_ = frameState;
-
-  frameState.tileQueue.loadMoreTiles(16, 16);
-
-  // check if we can't reuse the existing ol.ImageCanvas
-  if (this.renderedImageCanvas_) {
-    var renderedResolution = this.renderedImageCanvas_.getResolution();
-    var renderedExtent = this.renderedImageCanvas_.getExtent();
-    if (resolution !== renderedResolution || !ol.extent.equals(extent, renderedExtent)) {
-      this.renderedImageCanvas_ = null;
-    }
-  }
-
-  if (!this.renderedImageCanvas_ || this.getRevision() !== this.renderedRevision_) {
-    this.processSources_();
-  }
-
-  return this.renderedImageCanvas_;
-};
-
-
-/**
- * Start processing source data.
- * @private
- */
-ol.source.Raster.prototype.processSources_ = function() {
-  var frameState = this.requestedFrameState_;
-  var len = this.renderers_.length;
-  var imageDatas = new Array(len);
-  for (var i = 0; i < len; ++i) {
-    var imageData = ol.source.Raster.getImageData_(
-        this.renderers_[i], frameState, frameState.layerStatesArray[i]);
-    if (imageData) {
-      imageDatas[i] = imageData;
-    } else {
-      return;
-    }
-  }
-
-  var data = {};
-  this.dispatchEvent(new ol.source.Raster.Event(
-      ol.source.Raster.EventType_.BEFOREOPERATIONS, frameState, data));
-  this.worker_.process(imageDatas, data,
-      this.onWorkerComplete_.bind(this, frameState));
-};
-
-
-/**
- * Called when pixel processing is complete.
- * @param {olx.FrameState} frameState The frame state.
- * @param {Error} err Any error during processing.
- * @param {ImageData} output The output image data.
- * @param {Object} data The user data.
- * @private
- */
-ol.source.Raster.prototype.onWorkerComplete_ = function(frameState, err, output, data) {
-  if (err || !output) {
-    return;
-  }
-
-  // do nothing if extent or resolution changed
-  var extent = frameState.extent;
-  var resolution = frameState.viewState.resolution;
-  if (resolution !== this.requestedFrameState_.viewState.resolution ||
-      !ol.extent.equals(extent, this.requestedFrameState_.extent)) {
-    return;
-  }
-
-  var context;
-  if (this.renderedImageCanvas_) {
-    context = this.renderedImageCanvas_.getImage().getContext('2d');
-  } else {
-    var width = Math.round(ol.extent.getWidth(extent) / resolution);
-    var height = Math.round(ol.extent.getHeight(extent) / resolution);
-    context = ol.dom.createCanvasContext2D(width, height);
-    this.renderedImageCanvas_ = new ol.ImageCanvas(
-        extent, resolution, 1, this.getAttributions(), context.canvas);
-  }
-  context.putImageData(output, 0, 0);
-
-  this.changed();
-  this.renderedRevision_ = this.getRevision();
-
-  this.dispatchEvent(new ol.source.Raster.Event(
-      ol.source.Raster.EventType_.AFTEROPERATIONS, frameState, data));
-};
-
-
-/**
- * Get image data from a renderer.
- * @param {ol.renderer.canvas.Layer} renderer Layer renderer.
- * @param {olx.FrameState} frameState The frame state.
- * @param {ol.LayerState} layerState The layer state.
- * @return {ImageData} The image data.
- * @private
- */
-ol.source.Raster.getImageData_ = function(renderer, frameState, layerState) {
-  if (!renderer.prepareFrame(frameState, layerState)) {
-    return null;
-  }
-  var width = frameState.size[0];
-  var height = frameState.size[1];
-  if (!ol.source.Raster.context_) {
-    ol.source.Raster.context_ = ol.dom.createCanvasContext2D(width, height);
-  } else {
-    var canvas = ol.source.Raster.context_.canvas;
-    if (canvas.width !== width || canvas.height !== height) {
-      ol.source.Raster.context_ = ol.dom.createCanvasContext2D(width, height);
-    } else {
-      ol.source.Raster.context_.clearRect(0, 0, width, height);
-    }
-  }
-  renderer.composeFrame(frameState, layerState, ol.source.Raster.context_);
-  return ol.source.Raster.context_.getImageData(0, 0, width, height);
-};
-
-
-/**
- * A reusable canvas context.
- * @type {CanvasRenderingContext2D}
- * @private
- */
-ol.source.Raster.context_ = null;
-
-
-/**
- * Get a list of layer states from a list of renderers.
- * @param {Array.<ol.renderer.canvas.Layer>} renderers Layer renderers.
- * @return {Array.<ol.LayerState>} The layer states.
- * @private
- */
-ol.source.Raster.getLayerStatesArray_ = function(renderers) {
-  return renderers.map(function(renderer) {
-    return renderer.getLayer().getLayerState();
-  });
-};
-
-
-/**
- * Create renderers for all sources.
- * @param {Array.<ol.source.Source>} sources The sources.
- * @return {Array.<ol.renderer.canvas.Layer>} Array of layer renderers.
- * @private
- */
-ol.source.Raster.createRenderers_ = function(sources) {
-  var len = sources.length;
-  var renderers = new Array(len);
-  for (var i = 0; i < len; ++i) {
-    renderers[i] = ol.source.Raster.createRenderer_(sources[i]);
-  }
-  return renderers;
-};
-
-
-/**
- * Create a renderer for the provided source.
- * @param {ol.source.Source} source The source.
- * @return {ol.renderer.canvas.Layer} The renderer.
- * @private
- */
-ol.source.Raster.createRenderer_ = function(source) {
-  var renderer = null;
-  if (source instanceof ol.source.Tile) {
-    renderer = ol.source.Raster.createTileRenderer_(source);
-  } else if (source instanceof ol.source.Image) {
-    renderer = ol.source.Raster.createImageRenderer_(source);
-  }
-  return renderer;
-};
-
-
-/**
- * Create an image renderer for the provided source.
- * @param {ol.source.Image} source The source.
- * @return {ol.renderer.canvas.Layer} The renderer.
- * @private
- */
-ol.source.Raster.createImageRenderer_ = function(source) {
-  var layer = new ol.layer.Image({source: source});
-  return new ol.renderer.canvas.ImageLayer(layer);
-};
-
-
-/**
- * Create a tile renderer for the provided source.
- * @param {ol.source.Tile} source The source.
- * @return {ol.renderer.canvas.Layer} The renderer.
- * @private
- */
-ol.source.Raster.createTileRenderer_ = function(source) {
-  var layer = new ol.layer.Tile({source: source});
-  return new ol.renderer.canvas.TileLayer(layer);
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.source.Raster} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.source.RasterEvent}
- * @param {string} type Type.
- * @param {olx.FrameState} frameState The frame state.
- * @param {Object} data An object made available to operations.
- */
-ol.source.Raster.Event = function(type, frameState, data) {
-  ol.events.Event.call(this, type);
-
-  /**
-   * The raster extent.
-   * @type {ol.Extent}
-   * @api
-   */
-  this.extent = frameState.extent;
-
-  /**
-   * The pixel resolution (map units per pixel).
-   * @type {number}
-   * @api
-   */
-  this.resolution = frameState.viewState.resolution / frameState.pixelRatio;
-
-  /**
-   * An object made available to all operations.  This can be used by operations
-   * as a storage object (e.g. for calculating statistics).
-   * @type {Object}
-   * @api
-   */
-  this.data = data;
-
-};
-ol.inherits(ol.source.Raster.Event, ol.events.Event);
-
-
-/**
- * @override
- */
-ol.source.Raster.prototype.getImageInternal = function() {
-  return null; // not implemented
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.source.Raster.EventType_ = {
-  /**
-   * Triggered before operations are run.
-   * @event ol.source.Raster.Event#beforeoperations
-   * @api
-   */
-  BEFOREOPERATIONS: 'beforeoperations',
-
-  /**
-   * Triggered after operations are run.
-   * @event ol.source.Raster.Event#afteroperations
-   * @api
-   */
-  AFTEROPERATIONS: 'afteroperations'
-};
-
-goog.provide('ol.source.Stamen');
-
-goog.require('ol');
-goog.require('ol.Attribution');
-goog.require('ol.source.OSM');
-goog.require('ol.source.XYZ');
-
-
-/**
- * @classdesc
- * Layer source for the Stamen tile server.
- *
- * @constructor
- * @extends {ol.source.XYZ}
- * @param {olx.source.StamenOptions} options Stamen options.
- * @api
- */
-ol.source.Stamen = function(options) {
-  var i = options.layer.indexOf('-');
-  var provider = i == -1 ? options.layer : options.layer.slice(0, i);
-  var providerConfig = ol.source.Stamen.ProviderConfig[provider];
-
-  var layerConfig = ol.source.Stamen.LayerConfig[options.layer];
-
-  var url = options.url !== undefined ? options.url :
-      'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' + options.layer +
-      '/{z}/{x}/{y}.' + layerConfig.extension;
-
-  ol.source.XYZ.call(this, {
-    attributions: ol.source.Stamen.ATTRIBUTIONS,
-    cacheSize: options.cacheSize,
-    crossOrigin: 'anonymous',
-    maxZoom: options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,
-    minZoom: options.minZoom != undefined ? options.minZoom : providerConfig.minZoom,
-    opaque: layerConfig.opaque,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileLoadFunction: options.tileLoadFunction,
-    url: url,
-    wrapX: options.wrapX
-  });
-};
-ol.inherits(ol.source.Stamen, ol.source.XYZ);
-
-
-/**
- * @const
- * @type {Array.<ol.Attribution>}
- */
-ol.source.Stamen.ATTRIBUTIONS = [
-  new ol.Attribution({
-    html: 'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, ' +
-        'under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY' +
-        ' 3.0</a>.'
-  }),
-  ol.source.OSM.ATTRIBUTION
-];
-
-/**
- * @type {Object.<string, {extension: string, opaque: boolean}>}
- */
-ol.source.Stamen.LayerConfig = {
-  'terrain': {
-    extension: 'jpg',
-    opaque: true
-  },
-  'terrain-background': {
-    extension: 'jpg',
-    opaque: true
-  },
-  'terrain-labels': {
-    extension: 'png',
-    opaque: false
-  },
-  'terrain-lines': {
-    extension: 'png',
-    opaque: false
-  },
-  'toner-background': {
-    extension: 'png',
-    opaque: true
-  },
-  'toner': {
-    extension: 'png',
-    opaque: true
-  },
-  'toner-hybrid': {
-    extension: 'png',
-    opaque: false
-  },
-  'toner-labels': {
-    extension: 'png',
-    opaque: false
-  },
-  'toner-lines': {
-    extension: 'png',
-    opaque: false
-  },
-  'toner-lite': {
-    extension: 'png',
-    opaque: true
-  },
-  'watercolor': {
-    extension: 'jpg',
-    opaque: true
-  }
-};
-
-/**
- * @type {Object.<string, {minZoom: number, maxZoom: number}>}
- */
-ol.source.Stamen.ProviderConfig = {
-  'terrain': {
-    minZoom: 4,
-    maxZoom: 18
-  },
-  'toner': {
-    minZoom: 0,
-    maxZoom: 20
-  },
-  'watercolor': {
-    minZoom: 1,
-    maxZoom: 16
-  }
-};
-
-goog.provide('ol.source.TileArcGISRest');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.obj');
-goog.require('ol.size');
-goog.require('ol.source.TileImage');
-goog.require('ol.tilecoord');
-goog.require('ol.uri');
-
-
-/**
- * @classdesc
- * Layer source for tile data from ArcGIS Rest services. Map and Image
- * Services are supported.
- *
- * For cached ArcGIS services, better performance is available using the
- * {@link ol.source.XYZ} data source.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.TileArcGISRestOptions=} opt_options Tile ArcGIS Rest
- *     options.
- * @api
- */
-ol.source.TileArcGISRest = function(opt_options) {
-
-  var options = opt_options || {};
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    projection: options.projection,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileGrid: options.tileGrid,
-    tileLoadFunction: options.tileLoadFunction,
-    url: options.url,
-    urls: options.urls,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true
-  });
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.params_ = options.params || {};
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.tmpExtent_ = ol.extent.createEmpty();
-
-  this.setKey(this.getKeyForParams_());
-};
-ol.inherits(ol.source.TileArcGISRest, ol.source.TileImage);
-
-
-/**
- * @private
- * @return {string} The key for the current params.
- */
-ol.source.TileArcGISRest.prototype.getKeyForParams_ = function() {
-  var i = 0;
-  var res = [];
-  for (var key in this.params_) {
-    res[i++] = key + '-' + this.params_[key];
-  }
-  return res.join('/');
-};
-
-
-/**
- * Get the user-provided params, i.e. those passed to the constructor through
- * the "params" option, and possibly updated using the updateParams method.
- * @return {Object} Params.
- * @api
- */
-ol.source.TileArcGISRest.prototype.getParams = function() {
-  return this.params_;
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.Size} tileSize Tile size.
- * @param {ol.Extent} tileExtent Tile extent.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {Object} params Params.
- * @return {string|undefined} Request URL.
- * @private
- */
-ol.source.TileArcGISRest.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
-        pixelRatio, projection, params) {
-
-  var urls = this.urls;
-  if (!urls) {
-    return undefined;
-  }
-
-  // ArcGIS Server only wants the numeric portion of the projection ID.
-  var srid = projection.getCode().split(':').pop();
-
-  params['SIZE'] = tileSize[0] + ',' + tileSize[1];
-  params['BBOX'] = tileExtent.join(',');
-  params['BBOXSR'] = srid;
-  params['IMAGESR'] = srid;
-  params['DPI'] = Math.round(
-      params['DPI'] ? params['DPI'] * pixelRatio : 90 * pixelRatio
-      );
-
-  var url;
-  if (urls.length == 1) {
-    url = urls[0];
-  } else {
-    var index = ol.math.modulo(ol.tilecoord.hash(tileCoord), urls.length);
-    url = urls[index];
-  }
-
-  var modifiedUrl = url
-      .replace(/MapServer\/?$/, 'MapServer/export')
-      .replace(/ImageServer\/?$/, 'ImageServer/exportImage');
-  return ol.uri.appendParams(modifiedUrl, params);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileArcGISRest.prototype.getTilePixelRatio = function(pixelRatio) {
-  return /** @type {number} */ (pixelRatio);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileArcGISRest.prototype.fixedTileUrlFunction = function(tileCoord, pixelRatio, projection) {
-
-  var tileGrid = this.getTileGrid();
-  if (!tileGrid) {
-    tileGrid = this.getTileGridForProjection(projection);
-  }
-
-  if (tileGrid.getResolutions().length <= tileCoord[0]) {
-    return undefined;
-  }
-
-  var tileExtent = tileGrid.getTileCoordExtent(
-      tileCoord, this.tmpExtent_);
-  var tileSize = ol.size.toSize(
-      tileGrid.getTileSize(tileCoord[0]), this.tmpSize);
-
-  if (pixelRatio != 1) {
-    tileSize = ol.size.scale(tileSize, pixelRatio, this.tmpSize);
-  }
-
-  // Apply default params and override with user specified values.
-  var baseParams = {
-    'F': 'image',
-    'FORMAT': 'PNG32',
-    'TRANSPARENT': true
-  };
-  ol.obj.assign(baseParams, this.params_);
-
-  return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
-      pixelRatio, projection, baseParams);
-};
-
-
-/**
- * Update the user-provided params.
- * @param {Object} params Params.
- * @api
- */
-ol.source.TileArcGISRest.prototype.updateParams = function(params) {
-  ol.obj.assign(this.params_, params);
-  this.setKey(this.getKeyForParams_());
-};
-
-goog.provide('ol.source.TileDebug');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-goog.require('ol.dom');
-goog.require('ol.size');
-goog.require('ol.source.Tile');
-
-
-/**
- * @classdesc
- * A pseudo tile source, which does not fetch tiles from a server, but renders
- * a grid outline for the tile grid/projection along with the coordinates for
- * each tile. See examples/canvas-tiles for an example.
- *
- * Uses Canvas context2d, so requires Canvas support.
- *
- * @constructor
- * @extends {ol.source.Tile}
- * @param {olx.source.TileDebugOptions} options Debug tile options.
- * @api
- */
-ol.source.TileDebug = function(options) {
-
-  ol.source.Tile.call(this, {
-    opaque: false,
-    projection: options.projection,
-    tileGrid: options.tileGrid,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true
-  });
-
-};
-ol.inherits(ol.source.TileDebug, ol.source.Tile);
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileDebug.prototype.getTile = function(z, x, y) {
-  var tileCoordKey = this.getKeyZXY(z, x, y);
-  if (this.tileCache.containsKey(tileCoordKey)) {
-    return /** @type {!ol.source.TileDebug.Tile_} */ (this.tileCache.get(tileCoordKey));
-  } else {
-    var tileSize = ol.size.toSize(this.tileGrid.getTileSize(z));
-    var tileCoord = [z, x, y];
-    var textTileCoord = this.getTileCoordForTileUrlFunction(tileCoord);
-    var text = !textTileCoord ? '' :
-        this.getTileCoordForTileUrlFunction(textTileCoord).toString();
-    var tile = new ol.source.TileDebug.Tile_(tileCoord, tileSize, text);
-    this.tileCache.set(tileCoordKey, tile);
-    return tile;
-  }
-};
-
-
-/**
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.Size} tileSize Tile size.
- * @param {string} text Text.
- * @private
- */
-ol.source.TileDebug.Tile_ = function(tileCoord, tileSize, text) {
-
-  ol.Tile.call(this, tileCoord, ol.TileState.LOADED);
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.tileSize_ = tileSize;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.text_ = text;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = null;
-
-};
-ol.inherits(ol.source.TileDebug.Tile_, ol.Tile);
-
-
-/**
- * Get the image element for this tile.
- * @return {HTMLCanvasElement} Image.
- */
-ol.source.TileDebug.Tile_.prototype.getImage = function() {
-  if (this.canvas_) {
-    return this.canvas_;
-  } else {
-    var tileSize = this.tileSize_;
-    var context = ol.dom.createCanvasContext2D(tileSize[0], tileSize[1]);
-
-    context.strokeStyle = 'black';
-    context.strokeRect(0.5, 0.5, tileSize[0] + 0.5, tileSize[1] + 0.5);
-
-    context.fillStyle = 'black';
-    context.textAlign = 'center';
-    context.textBaseline = 'middle';
-    context.font = '24px sans-serif';
-    context.fillText(this.text_, tileSize[0] / 2, tileSize[1] / 2);
-
-    this.canvas_ = context.canvas;
-    return context.canvas;
-  }
-};
-
-
-/**
- * @override
- */
-ol.source.TileDebug.Tile_.prototype.load = function() {};
-
-// FIXME check order of async callbacks
-
-/**
- * @see http://mapbox.com/developers/api/
- */
-
-goog.provide('ol.source.TileJSON');
-
-goog.require('ol');
-goog.require('ol.Attribution');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.asserts');
-goog.require('ol.extent');
-goog.require('ol.net');
-goog.require('ol.proj');
-goog.require('ol.source.State');
-goog.require('ol.source.TileImage');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Layer source for tile data in TileJSON format.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.TileJSONOptions} options TileJSON options.
- * @api
- */
-ol.source.TileJSON = function(options) {
-
-  /**
-   * @type {TileJSON}
-   * @private
-   */
-  this.tileJSON_ = null;
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    projection: ol.proj.get('EPSG:3857'),
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    state: ol.source.State.LOADING,
-    tileLoadFunction: options.tileLoadFunction,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true
-  });
-
-  if (options.url) {
-    if (options.jsonp) {
-      ol.net.jsonp(options.url, this.handleTileJSONResponse.bind(this),
-          this.handleTileJSONError.bind(this));
-    } else {
-      var client = new XMLHttpRequest();
-      client.addEventListener('load', this.onXHRLoad_.bind(this));
-      client.addEventListener('error', this.onXHRError_.bind(this));
-      client.open('GET', options.url);
-      client.send();
-    }
-  } else if (options.tileJSON) {
-    this.handleTileJSONResponse(options.tileJSON);
-  } else {
-    ol.asserts.assert(false, 51); // Either `url` or `tileJSON` options must be provided
-  }
-
-};
-ol.inherits(ol.source.TileJSON, ol.source.TileImage);
-
-
-/**
- * @private
- * @param {Event} event The load event.
- */
-ol.source.TileJSON.prototype.onXHRLoad_ = function(event) {
-  var client = /** @type {XMLHttpRequest} */ (event.target);
-  // status will be 0 for file:// urls
-  if (!client.status || client.status >= 200 && client.status < 300) {
-    var response;
-    try {
-      response = /** @type {TileJSON} */(JSON.parse(client.responseText));
-    } catch (err) {
-      this.handleTileJSONError();
-      return;
-    }
-    this.handleTileJSONResponse(response);
-  } else {
-    this.handleTileJSONError();
-  }
-};
-
-
-/**
- * @private
- * @param {Event} event The error event.
- */
-ol.source.TileJSON.prototype.onXHRError_ = function(event) {
-  this.handleTileJSONError();
-};
-
-
-/**
- * @return {TileJSON} The tilejson object.
- * @api
- */
-ol.source.TileJSON.prototype.getTileJSON = function() {
-  return this.tileJSON_;
-};
-
-
-/**
- * @protected
- * @param {TileJSON} tileJSON Tile JSON.
- */
-ol.source.TileJSON.prototype.handleTileJSONResponse = function(tileJSON) {
-
-  var epsg4326Projection = ol.proj.get('EPSG:4326');
-
-  var sourceProjection = this.getProjection();
-  var extent;
-  if (tileJSON.bounds !== undefined) {
-    var transform = ol.proj.getTransformFromProjections(
-        epsg4326Projection, sourceProjection);
-    extent = ol.extent.applyTransform(tileJSON.bounds, transform);
-  }
-
-  var minZoom = tileJSON.minzoom || 0;
-  var maxZoom = tileJSON.maxzoom || 22;
-  var tileGrid = ol.tilegrid.createXYZ({
-    extent: ol.tilegrid.extentFromProjection(sourceProjection),
-    maxZoom: maxZoom,
-    minZoom: minZoom
-  });
-  this.tileGrid = tileGrid;
-
-  this.tileUrlFunction =
-      ol.TileUrlFunction.createFromTemplates(tileJSON.tiles, tileGrid);
-
-  if (tileJSON.attribution !== undefined && !this.getAttributions()) {
-    var attributionExtent = extent !== undefined ?
-        extent : epsg4326Projection.getExtent();
-    /** @type {Object.<string, Array.<ol.TileRange>>} */
-    var tileRanges = {};
-    var z, zKey;
-    for (z = minZoom; z <= maxZoom; ++z) {
-      zKey = z.toString();
-      tileRanges[zKey] =
-          [tileGrid.getTileRangeForExtentAndZ(attributionExtent, z)];
-    }
-    this.setAttributions([
-      new ol.Attribution({
-        html: tileJSON.attribution,
-        tileRanges: tileRanges
-      })
-    ]);
-  }
-  this.tileJSON_ = tileJSON;
-  this.setState(ol.source.State.READY);
-
-};
-
-
-/**
- * @protected
- */
-ol.source.TileJSON.prototype.handleTileJSONError = function() {
-  this.setState(ol.source.State.ERROR);
-};
-
-goog.provide('ol.source.TileUTFGrid');
-
-goog.require('ol');
-goog.require('ol.Attribution');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.net');
-goog.require('ol.proj');
-goog.require('ol.source.State');
-goog.require('ol.source.Tile');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Layer source for UTFGrid interaction data loaded from TileJSON format.
- *
- * @constructor
- * @extends {ol.source.Tile}
- * @param {olx.source.TileUTFGridOptions} options Source options.
- * @api
- */
-ol.source.TileUTFGrid = function(options) {
-  ol.source.Tile.call(this, {
-    projection: ol.proj.get('EPSG:3857'),
-    state: ol.source.State.LOADING
-  });
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.preemptive_ = options.preemptive !== undefined ?
-      options.preemptive : true;
-
-  /**
-   * @private
-   * @type {!ol.TileUrlFunctionType}
-   */
-  this.tileUrlFunction_ = ol.TileUrlFunction.nullTileUrlFunction;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.template_ = undefined;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.jsonp_ = options.jsonp || false;
-
-  if (options.url) {
-    if (this.jsonp_) {
-      ol.net.jsonp(options.url, this.handleTileJSONResponse.bind(this),
-          this.handleTileJSONError.bind(this));
-    } else {
-      var client = new XMLHttpRequest();
-      client.addEventListener('load', this.onXHRLoad_.bind(this));
-      client.addEventListener('error', this.onXHRError_.bind(this));
-      client.open('GET', options.url);
-      client.send();
-    }
-  } else if (options.tileJSON) {
-    this.handleTileJSONResponse(options.tileJSON);
-  } else {
-    ol.asserts.assert(false, 51); // Either `url` or `tileJSON` options must be provided
-  }
-};
-ol.inherits(ol.source.TileUTFGrid, ol.source.Tile);
-
-
-/**
- * @private
- * @param {Event} event The load event.
- */
-ol.source.TileUTFGrid.prototype.onXHRLoad_ = function(event) {
-  var client = /** @type {XMLHttpRequest} */ (event.target);
-  // status will be 0 for file:// urls
-  if (!client.status || client.status >= 200 && client.status < 300) {
-    var response;
-    try {
-      response = /** @type {TileJSON} */(JSON.parse(client.responseText));
-    } catch (err) {
-      this.handleTileJSONError();
-      return;
-    }
-    this.handleTileJSONResponse(response);
-  } else {
-    this.handleTileJSONError();
-  }
-};
-
-
-/**
- * @private
- * @param {Event} event The error event.
- */
-ol.source.TileUTFGrid.prototype.onXHRError_ = function(event) {
-  this.handleTileJSONError();
-};
-
-
-/**
- * Return the template from TileJSON.
- * @return {string|undefined} The template from TileJSON.
- * @api
- */
-ol.source.TileUTFGrid.prototype.getTemplate = function() {
-  return this.template_;
-};
-
-
-/**
- * Calls the callback (synchronously by default) with the available data
- * for given coordinate and resolution (or `null` if not yet loaded or
- * in case of an error).
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {function(this: T, *)} callback Callback.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @param {boolean=} opt_request If `true` the callback is always async.
- *                               The tile data is requested if not yet loaded.
- * @template T
- * @api
- */
-ol.source.TileUTFGrid.prototype.forDataAtCoordinateAndResolution = function(
-    coordinate, resolution, callback, opt_this, opt_request) {
-  if (this.tileGrid) {
-    var tileCoord = this.tileGrid.getTileCoordForCoordAndResolution(
-        coordinate, resolution);
-    var tile = /** @type {!ol.source.TileUTFGrid.Tile_} */(this.getTile(
-        tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection()));
-    tile.forDataAtCoordinate(coordinate, callback, opt_this, opt_request);
-  } else {
-    if (opt_request === true) {
-      setTimeout(function() {
-        callback.call(opt_this, null);
-      }, 0);
-    } else {
-      callback.call(opt_this, null);
-    }
-  }
-};
-
-
-/**
- * @protected
- */
-ol.source.TileUTFGrid.prototype.handleTileJSONError = function() {
-  this.setState(ol.source.State.ERROR);
-};
-
-
-/**
- * TODO: very similar to ol.source.TileJSON#handleTileJSONResponse
- * @protected
- * @param {TileJSON} tileJSON Tile JSON.
- */
-ol.source.TileUTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
-
-  var epsg4326Projection = ol.proj.get('EPSG:4326');
-
-  var sourceProjection = this.getProjection();
-  var extent;
-  if (tileJSON.bounds !== undefined) {
-    var transform = ol.proj.getTransformFromProjections(
-        epsg4326Projection, sourceProjection);
-    extent = ol.extent.applyTransform(tileJSON.bounds, transform);
-  }
-
-  var minZoom = tileJSON.minzoom || 0;
-  var maxZoom = tileJSON.maxzoom || 22;
-  var tileGrid = ol.tilegrid.createXYZ({
-    extent: ol.tilegrid.extentFromProjection(sourceProjection),
-    maxZoom: maxZoom,
-    minZoom: minZoom
-  });
-  this.tileGrid = tileGrid;
-
-  this.template_ = tileJSON.template;
-
-  var grids = tileJSON.grids;
-  if (!grids) {
-    this.setState(ol.source.State.ERROR);
-    return;
-  }
-
-  this.tileUrlFunction_ =
-      ol.TileUrlFunction.createFromTemplates(grids, tileGrid);
-
-  if (tileJSON.attribution !== undefined) {
-    var attributionExtent = extent !== undefined ?
-        extent : epsg4326Projection.getExtent();
-    /** @type {Object.<string, Array.<ol.TileRange>>} */
-    var tileRanges = {};
-    var z, zKey;
-    for (z = minZoom; z <= maxZoom; ++z) {
-      zKey = z.toString();
-      tileRanges[zKey] =
-          [tileGrid.getTileRangeForExtentAndZ(attributionExtent, z)];
-    }
-    this.setAttributions([
-      new ol.Attribution({
-        html: tileJSON.attribution,
-        tileRanges: tileRanges
-      })
-    ]);
-  }
-
-  this.setState(ol.source.State.READY);
-
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileUTFGrid.prototype.getTile = function(z, x, y, pixelRatio, projection) {
-  var tileCoordKey = this.getKeyZXY(z, x, y);
-  if (this.tileCache.containsKey(tileCoordKey)) {
-    return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
-  } else {
-    var tileCoord = [z, x, y];
-    var urlTileCoord =
-        this.getTileCoordForTileUrlFunction(tileCoord, projection);
-    var tileUrl = this.tileUrlFunction_(urlTileCoord, pixelRatio, projection);
-    var tile = new ol.source.TileUTFGrid.Tile_(
-        tileCoord,
-        tileUrl !== undefined ? ol.TileState.IDLE : ol.TileState.EMPTY,
-        tileUrl !== undefined ? tileUrl : '',
-        this.tileGrid.getTileCoordExtent(tileCoord),
-        this.preemptive_,
-        this.jsonp_);
-    this.tileCache.set(tileCoordKey, tile);
-    return tile;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileUTFGrid.prototype.useTile = function(z, x, y) {
-  var tileCoordKey = this.getKeyZXY(z, x, y);
-  if (this.tileCache.containsKey(tileCoordKey)) {
-    this.tileCache.get(tileCoordKey);
-  }
-};
-
-
-/**
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {string} src Image source URI.
- * @param {ol.Extent} extent Extent of the tile.
- * @param {boolean} preemptive Load the tile when visible (before it's needed).
- * @param {boolean} jsonp Load the tile as a script.
- * @private
- */
-ol.source.TileUTFGrid.Tile_ = function(tileCoord, state, src, extent, preemptive, jsonp) {
-
-  ol.Tile.call(this, tileCoord, state);
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.src_ = src;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = extent;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.preemptive_ = preemptive;
-
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.grid_ = null;
-
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.keys_ = null;
-
-  /**
-   * @private
-   * @type {Object.<string, Object>|undefined}
-   */
-  this.data_ = null;
-
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.jsonp_ = jsonp;
-
-};
-ol.inherits(ol.source.TileUTFGrid.Tile_, ol.Tile);
-
-
-/**
- * Get the image element for this tile.
- * @return {Image} Image.
- */
-ol.source.TileUTFGrid.Tile_.prototype.getImage = function() {
-  return null;
-};
-
-
-/**
- * Synchronously returns data at given coordinate (if available).
- * @param {ol.Coordinate} coordinate Coordinate.
- * @return {*} The data.
- */
-ol.source.TileUTFGrid.Tile_.prototype.getData = function(coordinate) {
-  if (!this.grid_ || !this.keys_) {
-    return null;
-  }
-  var xRelative = (coordinate[0] - this.extent_[0]) /
-      (this.extent_[2] - this.extent_[0]);
-  var yRelative = (coordinate[1] - this.extent_[1]) /
-      (this.extent_[3] - this.extent_[1]);
-
-  var row = this.grid_[Math.floor((1 - yRelative) * this.grid_.length)];
-
-  if (typeof row !== 'string') {
-    return null;
-  }
-
-  var code = row.charCodeAt(Math.floor(xRelative * row.length));
-  if (code >= 93) {
-    code--;
-  }
-  if (code >= 35) {
-    code--;
-  }
-  code -= 32;
-
-  var data = null;
-  if (code in this.keys_) {
-    var id = this.keys_[code];
-    if (this.data_ && id in this.data_) {
-      data = this.data_[id];
-    } else {
-      data = id;
-    }
-  }
-  return data;
-};
-
-
-/**
- * Calls the callback (synchronously by default) with the available data
- * for given coordinate (or `null` if not yet loaded).
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {function(this: T, *)} callback Callback.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @param {boolean=} opt_request If `true` the callback is always async.
- *                               The tile data is requested if not yet loaded.
- * @template T
- */
-ol.source.TileUTFGrid.Tile_.prototype.forDataAtCoordinate = function(coordinate, callback, opt_this, opt_request) {
-  if (this.state == ol.TileState.IDLE && opt_request === true) {
-    ol.events.listenOnce(this, ol.events.EventType.CHANGE, function(e) {
-      callback.call(opt_this, this.getData(coordinate));
-    }, this);
-    this.loadInternal_();
-  } else {
-    if (opt_request === true) {
-      setTimeout(function() {
-        callback.call(opt_this, this.getData(coordinate));
-      }.bind(this), 0);
-    } else {
-      callback.call(opt_this, this.getData(coordinate));
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileUTFGrid.Tile_.prototype.getKey = function() {
-  return this.src_;
-};
-
-
-/**
- * @private
- */
-ol.source.TileUTFGrid.Tile_.prototype.handleError_ = function() {
-  this.state = ol.TileState.ERROR;
-  this.changed();
-};
-
-
-/**
- * @param {!UTFGridJSON} json UTFGrid data.
- * @private
- */
-ol.source.TileUTFGrid.Tile_.prototype.handleLoad_ = function(json) {
-  this.grid_ = json.grid;
-  this.keys_ = json.keys;
-  this.data_ = json.data;
-
-  this.state = ol.TileState.EMPTY;
-  this.changed();
-};
-
-
-/**
- * @private
- */
-ol.source.TileUTFGrid.Tile_.prototype.loadInternal_ = function() {
-  if (this.state == ol.TileState.IDLE) {
-    this.state = ol.TileState.LOADING;
-    if (this.jsonp_) {
-      ol.net.jsonp(this.src_, this.handleLoad_.bind(this),
-          this.handleError_.bind(this));
-    } else {
-      var client = new XMLHttpRequest();
-      client.addEventListener('load', this.onXHRLoad_.bind(this));
-      client.addEventListener('error', this.onXHRError_.bind(this));
-      client.open('GET', this.src_);
-      client.send();
-    }
-  }
-};
-
-
-/**
- * @private
- * @param {Event} event The load event.
- */
-ol.source.TileUTFGrid.Tile_.prototype.onXHRLoad_ = function(event) {
-  var client = /** @type {XMLHttpRequest} */ (event.target);
-  // status will be 0 for file:// urls
-  if (!client.status || client.status >= 200 && client.status < 300) {
-    var response;
-    try {
-      response = /** @type {!UTFGridJSON} */(JSON.parse(client.responseText));
-    } catch (err) {
-      this.handleError_();
-      return;
-    }
-    this.handleLoad_(response);
-  } else {
-    this.handleError_();
-  }
-};
-
-
-/**
- * @private
- * @param {Event} event The error event.
- */
-ol.source.TileUTFGrid.Tile_.prototype.onXHRError_ = function(event) {
-  this.handleError_();
-};
-
-
-/**
- * @override
- */
-ol.source.TileUTFGrid.Tile_.prototype.load = function() {
-  if (this.preemptive_) {
-    this.loadInternal_();
-  }
-};
-
-// FIXME add minZoom support
-// FIXME add date line wrap (tile coord transform)
-// FIXME cannot be shared between maps with different projections
-
-goog.provide('ol.source.TileWMS');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.math');
-goog.require('ol.proj');
-goog.require('ol.size');
-goog.require('ol.source.TileImage');
-goog.require('ol.source.WMSServerType');
-goog.require('ol.tilecoord');
-goog.require('ol.string');
-goog.require('ol.uri');
-
-/**
- * @classdesc
- * Layer source for tile data from WMS servers.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.TileWMSOptions=} opt_options Tile WMS options.
- * @api
- */
-ol.source.TileWMS = function(opt_options) {
-
-  var options = opt_options || {};
-
-  var params = options.params || {};
-
-  var transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    opaque: !transparent,
-    projection: options.projection,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileGrid: options.tileGrid,
-    tileLoadFunction: options.tileLoadFunction,
-    url: options.url,
-    urls: options.urls,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true
-  });
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.gutter_ = options.gutter !== undefined ? options.gutter : 0;
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.params_ = params;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.v13_ = true;
-
-  /**
-   * @private
-   * @type {ol.source.WMSServerType|undefined}
-   */
-  this.serverType_ =
-      /** @type {ol.source.WMSServerType|undefined} */ (options.serverType);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.coordKeyPrefix_ = '';
-  this.resetCoordKeyPrefix_();
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.tmpExtent_ = ol.extent.createEmpty();
-
-  this.updateV13_();
-  this.setKey(this.getKeyForParams_());
-
-};
-ol.inherits(ol.source.TileWMS, ol.source.TileImage);
-
-
-/**
- * Return the GetFeatureInfo URL for the passed coordinate, resolution, and
- * projection. Return `undefined` if the GetFeatureInfo URL cannot be
- * constructed.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {ol.ProjectionLike} projection Projection.
- * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should
- *     be provided. If `QUERY_LAYERS` is not provided then the layers specified
- *     in the `LAYERS` parameter will be used. `VERSION` should not be
- *     specified here.
- * @return {string|undefined} GetFeatureInfo URL.
- * @api
- */
-ol.source.TileWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) {
-  var projectionObj = ol.proj.get(projection);
-
-  var tileGrid = this.getTileGrid();
-  if (!tileGrid) {
-    tileGrid = this.getTileGridForProjection(projectionObj);
-  }
-
-  var tileCoord = tileGrid.getTileCoordForCoordAndResolution(
-      coordinate, resolution);
-
-  if (tileGrid.getResolutions().length <= tileCoord[0]) {
-    return undefined;
-  }
-
-  var tileResolution = tileGrid.getResolution(tileCoord[0]);
-  var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);
-  var tileSize = ol.size.toSize(
-      tileGrid.getTileSize(tileCoord[0]), this.tmpSize);
-
-  var gutter = this.gutter_;
-  if (gutter !== 0) {
-    tileSize = ol.size.buffer(tileSize, gutter, this.tmpSize);
-    tileExtent = ol.extent.buffer(tileExtent,
-        tileResolution * gutter, tileExtent);
-  }
-
-  var baseParams = {
-    'SERVICE': 'WMS',
-    'VERSION': ol.DEFAULT_WMS_VERSION,
-    'REQUEST': 'GetFeatureInfo',
-    'FORMAT': 'image/png',
-    'TRANSPARENT': true,
-    'QUERY_LAYERS': this.params_['LAYERS']
-  };
-  ol.obj.assign(baseParams, this.params_, params);
-
-  var x = Math.floor((coordinate[0] - tileExtent[0]) / tileResolution);
-  var y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);
-
-  baseParams[this.v13_ ? 'I' : 'X'] = x;
-  baseParams[this.v13_ ? 'J' : 'Y'] = y;
-
-  return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
-      1, projectionObj, baseParams);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileWMS.prototype.getGutterInternal = function() {
-  return this.gutter_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileWMS.prototype.getKeyZXY = function(z, x, y) {
-  return this.coordKeyPrefix_ + ol.source.TileImage.prototype.getKeyZXY.call(this, z, x, y);
-};
-
-
-/**
- * Get the user-provided params, i.e. those passed to the constructor through
- * the "params" option, and possibly updated using the updateParams method.
- * @return {Object} Params.
- * @api
- */
-ol.source.TileWMS.prototype.getParams = function() {
-  return this.params_;
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.Size} tileSize Tile size.
- * @param {ol.Extent} tileExtent Tile extent.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {Object} params Params.
- * @return {string|undefined} Request URL.
- * @private
- */
-ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
-        pixelRatio, projection, params) {
-
-  var urls = this.urls;
-  if (!urls) {
-    return undefined;
-  }
-
-  params['WIDTH'] = tileSize[0];
-  params['HEIGHT'] = tileSize[1];
-
-  params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();
-
-  if (!('STYLES' in this.params_)) {
-    params['STYLES'] = '';
-  }
-
-  if (pixelRatio != 1) {
-    switch (this.serverType_) {
-      case ol.source.WMSServerType.GEOSERVER:
-        var dpi = (90 * pixelRatio + 0.5) | 0;
-        if ('FORMAT_OPTIONS' in params) {
-          params['FORMAT_OPTIONS'] += ';dpi:' + dpi;
-        } else {
-          params['FORMAT_OPTIONS'] = 'dpi:' + dpi;
-        }
-        break;
-      case ol.source.WMSServerType.MAPSERVER:
-        params['MAP_RESOLUTION'] = 90 * pixelRatio;
-        break;
-      case ol.source.WMSServerType.CARMENTA_SERVER:
-      case ol.source.WMSServerType.QGIS:
-        params['DPI'] = 90 * pixelRatio;
-        break;
-      default:
-        ol.asserts.assert(false, 52); // Unknown `serverType` configured
-        break;
-    }
-  }
-
-  var axisOrientation = projection.getAxisOrientation();
-  var bbox = tileExtent;
-  if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {
-    var tmp;
-    tmp = tileExtent[0];
-    bbox[0] = tileExtent[1];
-    bbox[1] = tmp;
-    tmp = tileExtent[2];
-    bbox[2] = tileExtent[3];
-    bbox[3] = tmp;
-  }
-  params['BBOX'] = bbox.join(',');
-
-  var url;
-  if (urls.length == 1) {
-    url = urls[0];
-  } else {
-    var index = ol.math.modulo(ol.tilecoord.hash(tileCoord), urls.length);
-    url = urls[index];
-  }
-  return ol.uri.appendParams(url, params);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileWMS.prototype.getTilePixelRatio = function(pixelRatio) {
-  return (!this.hidpi_ || this.serverType_ === undefined) ? 1 :
-      /** @type {number} */ (pixelRatio);
-};
-
-
-/**
- * @private
- */
-ol.source.TileWMS.prototype.resetCoordKeyPrefix_ = function() {
-  var i = 0;
-  var res = [];
-
-  if (this.urls) {
-    var j, jj;
-    for (j = 0, jj = this.urls.length; j < jj; ++j) {
-      res[i++] = this.urls[j];
-    }
-  }
-
-  this.coordKeyPrefix_ = res.join('#');
-};
-
-
-/**
- * @private
- * @return {string} The key for the current params.
- */
-ol.source.TileWMS.prototype.getKeyForParams_ = function() {
-  var i = 0;
-  var res = [];
-  for (var key in this.params_) {
-    res[i++] = key + '-' + this.params_[key];
-  }
-  return res.join('/');
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRatio, projection) {
-
-  var tileGrid = this.getTileGrid();
-  if (!tileGrid) {
-    tileGrid = this.getTileGridForProjection(projection);
-  }
-
-  if (tileGrid.getResolutions().length <= tileCoord[0]) {
-    return undefined;
-  }
-
-  if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {
-    pixelRatio = 1;
-  }
-
-  var tileResolution = tileGrid.getResolution(tileCoord[0]);
-  var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);
-  var tileSize = ol.size.toSize(
-      tileGrid.getTileSize(tileCoord[0]), this.tmpSize);
-
-  var gutter = this.gutter_;
-  if (gutter !== 0) {
-    tileSize = ol.size.buffer(tileSize, gutter, this.tmpSize);
-    tileExtent = ol.extent.buffer(tileExtent,
-        tileResolution * gutter, tileExtent);
-  }
-
-  if (pixelRatio != 1) {
-    tileSize = ol.size.scale(tileSize, pixelRatio, this.tmpSize);
-  }
-
-  var baseParams = {
-    'SERVICE': 'WMS',
-    'VERSION': ol.DEFAULT_WMS_VERSION,
-    'REQUEST': 'GetMap',
-    'FORMAT': 'image/png',
-    'TRANSPARENT': true
-  };
-  ol.obj.assign(baseParams, this.params_);
-
-  return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
-      pixelRatio, projection, baseParams);
-};
-
-/**
- * @inheritDoc
- */
-ol.source.TileWMS.prototype.setUrls = function(urls) {
-  ol.source.TileImage.prototype.setUrls.call(this, urls);
-  this.resetCoordKeyPrefix_();
-};
-
-
-/**
- * Update the user-provided params.
- * @param {Object} params Params.
- * @api
- */
-ol.source.TileWMS.prototype.updateParams = function(params) {
-  ol.obj.assign(this.params_, params);
-  this.resetCoordKeyPrefix_();
-  this.updateV13_();
-  this.setKey(this.getKeyForParams_());
-};
-
-
-/**
- * @private
- */
-ol.source.TileWMS.prototype.updateV13_ = function() {
-  var version = this.params_['VERSION'] || ol.DEFAULT_WMS_VERSION;
-  this.v13_ = ol.string.compareVersions(version, '1.3') >= 0;
-};
-
-goog.provide('ol.VectorImageTile');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-goog.require('ol.array');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.extent');
-goog.require('ol.events.EventType');
-goog.require('ol.featureloader');
-
-
-/**
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {string} src Data source url.
- * @param {ol.format.Feature} format Feature format.
- * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
- * @param {ol.TileCoord} urlTileCoord Wrapped tile coordinate for source urls.
- * @param {ol.TileUrlFunctionType} tileUrlFunction Tile url function.
- * @param {ol.tilegrid.TileGrid} sourceTileGrid Tile grid of the source.
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid of the renderer.
- * @param {Object.<string,ol.VectorTile>} sourceTiles Source tiles.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {function(new: ol.VectorTile, ol.TileCoord, ol.TileState, string,
- *     ol.format.Feature, ol.TileLoadFunctionType)} tileClass Class to
- *     instantiate for source tiles.
- * @param {function(this: ol.source.VectorTile, ol.events.Event)} handleTileChange
- *     Function to call when a source tile's state changes.
- */
-ol.VectorImageTile = function(tileCoord, state, src, format, tileLoadFunction,
-    urlTileCoord, tileUrlFunction, sourceTileGrid, tileGrid, sourceTiles,
-    pixelRatio, projection, tileClass, handleTileChange) {
-
-  ol.Tile.call(this, tileCoord, state);
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context_ = null;
-
-  /**
-   * @private
-   * @type {ol.FeatureLoader}
-   */
-  this.loader_;
-
-  /**
-   * @private
-   * @type {ol.TileReplayState}
-   */
-  this.replayState_ = {
-    dirty: false,
-    renderedRenderOrder: null,
-    renderedRevision: -1,
-    renderedTileRevision: -1
-  };
-
-  /**
-   * @private
-   * @type {Object.<string,ol.VectorTile>}
-   */
-  this.sourceTiles_ = sourceTiles;
-
-  /**
-   * Keys of source tiles used by this tile. Use with {@link #getTile}.
-   * @type {Array.<string>}
-   */
-  this.tileKeys = [];
-
-  /**
-   * @type {string}
-   */
-  this.src_ = src;
-
-  /**
-   * @type {ol.TileCoord}
-   */
-  this.wrappedTileCoord = urlTileCoord;
-
-  /**
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.loadListenerKeys_ = [];
-
-  /**
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.sourceTileListenerKeys_ = [];
-
-  if (urlTileCoord) {
-    var extent = tileGrid.getTileCoordExtent(urlTileCoord);
-    var resolution = tileGrid.getResolution(tileCoord[0]);
-    var sourceZ = sourceTileGrid.getZForResolution(resolution);
-    sourceTileGrid.forEachTileCoord(extent, sourceZ, function(sourceTileCoord) {
-      var sharedExtent = ol.extent.getIntersection(extent,
-          sourceTileGrid.getTileCoordExtent(sourceTileCoord));
-      if (ol.extent.getWidth(sharedExtent) / resolution >= 0.5 &&
-          ol.extent.getHeight(sharedExtent) / resolution >= 0.5) {
-        // only include source tile if overlap is at least 1 pixel
-        var sourceTileKey = sourceTileCoord.toString();
-        var sourceTile = sourceTiles[sourceTileKey];
-        if (!sourceTile) {
-          var tileUrl = tileUrlFunction(sourceTileCoord, pixelRatio, projection);
-          sourceTile = sourceTiles[sourceTileKey] = new tileClass(sourceTileCoord,
-              tileUrl == undefined ? ol.TileState.EMPTY : ol.TileState.IDLE,
-              tileUrl == undefined ? '' : tileUrl,
-              format, tileLoadFunction);
-          this.sourceTileListenerKeys_.push(
-              ol.events.listen(sourceTile, ol.events.EventType.CHANGE, handleTileChange));
-        }
-        sourceTile.consumers++;
-        this.tileKeys.push(sourceTileKey);
-      }
-    }.bind(this));
-  }
-
-};
-ol.inherits(ol.VectorImageTile, ol.Tile);
-
-
-/**
- * @inheritDoc
- */
-ol.VectorImageTile.prototype.disposeInternal = function() {
-  for (var i = 0, ii = this.tileKeys.length; i < ii; ++i) {
-    var sourceTileKey = this.tileKeys[i];
-    var sourceTile = this.getTile(sourceTileKey);
-    sourceTile.consumers--;
-    if (sourceTile.consumers == 0) {
-      delete this.sourceTiles_[sourceTileKey];
-      sourceTile.dispose();
-    }
-  }
-  this.tileKeys.length = 0;
-  this.sourceTiles_ = null;
-  if (this.state == ol.TileState.LOADING) {
-    this.loadListenerKeys_.forEach(ol.events.unlistenByKey);
-    this.loadListenerKeys_.length = 0;
-  }
-  if (this.interimTile) {
-    this.interimTile.dispose();
-  }
-  this.state = ol.TileState.ABORT;
-  this.changed();
-  this.sourceTileListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.sourceTileListenerKeys_.length = 0;
-  ol.Tile.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @return {CanvasRenderingContext2D} The rendering context.
- */
-ol.VectorImageTile.prototype.getContext = function() {
-  if (!this.context_) {
-    this.context_ = ol.dom.createCanvasContext2D();
-  }
-  return this.context_;
-};
-
-
-/**
- * Get the Canvas for this tile.
- * @return {HTMLCanvasElement} Canvas.
- */
-ol.VectorImageTile.prototype.getImage = function() {
-  return this.replayState_.renderedTileRevision == -1 ?
-      null : this.context_.canvas;
-};
-
-
-/**
- * @return {ol.TileReplayState} The replay state.
- */
-ol.VectorImageTile.prototype.getReplayState = function() {
-  return this.replayState_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.VectorImageTile.prototype.getKey = function() {
-  return this.tileKeys.join('/') + '/' + this.src_;
-};
-
-
-/**
- * @param {string} tileKey Key (tileCoord) of the source tile.
- * @return {ol.VectorTile} Source tile.
- */
-ol.VectorImageTile.prototype.getTile = function(tileKey) {
-  return this.sourceTiles_[tileKey];
-};
-
-
-/**
- * @inheritDoc
- */
-ol.VectorImageTile.prototype.load = function() {
-  var leftToLoad = 0;
-  var errors = false;
-  if (this.state == ol.TileState.IDLE) {
-    this.setState(ol.TileState.LOADING);
-  }
-  if (this.state == ol.TileState.LOADING) {
-    this.tileKeys.forEach(function(sourceTileKey) {
-      var sourceTile = this.getTile(sourceTileKey);
-      if (sourceTile.state == ol.TileState.IDLE) {
-        sourceTile.setLoader(this.loader_);
-        sourceTile.load();
-      } else if (sourceTile.state == ol.TileState.ERROR) {
-        errors = true;
-      } else if (sourceTile.state == ol.TileState.EMPTY) {
-        ol.array.remove(this.tileKeys, sourceTileKey);
-      }
-      if (sourceTile.state == ol.TileState.LOADING) {
-        var key = ol.events.listen(sourceTile, ol.events.EventType.CHANGE, function(e) {
-          var state = sourceTile.getState();
-          if (state == ol.TileState.LOADED ||
-              state == ol.TileState.ERROR) {
-            --leftToLoad;
-            ol.events.unlistenByKey(key);
-            ol.array.remove(this.loadListenerKeys_, key);
-            if (state == ol.TileState.ERROR) {
-              ol.array.remove(this.tileKeys, sourceTileKey);
-              errors = true;
-            }
-            if (leftToLoad == 0) {
-              this.setState(this.tileKeys.length > 0 ?
-                  ol.TileState.LOADED : ol.TileState.ERROR);
-            }
-          }
-        }.bind(this));
-        this.loadListenerKeys_.push(key);
-        ++leftToLoad;
-      }
-    }.bind(this));
-  }
-  if (leftToLoad == 0) {
-    setTimeout(function() {
-      this.setState(this.tileKeys.length > 0 ?
-          ol.TileState.LOADED :
-          (errors ? ol.TileState.ERROR : ol.TileState.EMPTY));
-    }.bind(this), 0);
-  }
-};
-
-
-/**
- * Sets the loader for a tile.
- * @param {ol.VectorTile} tile Vector tile.
- * @param {string} url URL.
- */
-ol.VectorImageTile.defaultLoadFunction = function(tile, url) {
-  var loader = ol.featureloader.loadFeaturesXhr(
-      url, tile.getFormat(), tile.onLoad_.bind(tile), tile.onError_.bind(tile));
-
-  tile.setLoader(loader);
-};
-
-goog.provide('ol.VectorTile');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-
-
-/**
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {string} src Data source url.
- * @param {ol.format.Feature} format Feature format.
- * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
- */
-ol.VectorTile = function(tileCoord, state, src, format, tileLoadFunction) {
-
-  ol.Tile.call(this, tileCoord, state);
-
-  /**
-   * @type {number}
-   */
-  this.consumers = 0;
-
-  /**
-   * @private
-   * @type {ol.format.Feature}
-   */
-  this.format_ = format;
-
-  /**
-   * @private
-   * @type {Array.<ol.Feature>}
-   */
-  this.features_ = null;
-
-  /**
-   * @private
-   * @type {ol.FeatureLoader}
-   */
-  this.loader_;
-
-  /**
-   * Data projection
-   * @private
-   * @type {ol.proj.Projection}
-   */
-  this.projection_;
-
-  this.replayGroups_ = {};
-
-  /**
-   * @private
-   * @type {ol.TileLoadFunctionType}
-   */
-  this.tileLoadFunction_ = tileLoadFunction;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.url_ = src;
-
-};
-ol.inherits(ol.VectorTile, ol.Tile);
-
-
-/**
- * @inheritDoc
- */
-ol.VectorTile.prototype.disposeInternal = function() {
-  this.features_ = null;
-  this.replayGroups_ = {};
-  this.state = ol.TileState.ABORT;
-  this.changed();
-  ol.Tile.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Get the feature format assigned for reading this tile's features.
- * @return {ol.format.Feature} Feature format.
- * @api
- */
-ol.VectorTile.prototype.getFormat = function() {
-  return this.format_;
-};
-
-
-/**
- * Get the features for this tile. Geometries will be in the projection returned
- * by {@link #getProjection}.
- * @return {Array.<ol.Feature|ol.render.Feature>} Features.
- * @api
- */
-ol.VectorTile.prototype.getFeatures = function() {
-  return this.features_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.VectorTile.prototype.getKey = function() {
-  return this.url_;
-};
-
-
-/**
- * Get the feature projection of features returned by {@link #getFeatures}.
- * @return {ol.proj.Projection} Feature projection.
- * @api
- */
-ol.VectorTile.prototype.getProjection = function() {
-  return this.projection_;
-};
-
-
-ol.VectorTile.prototype.getReplayGroup = function(key) {
-  return this.replayGroups_[key];
-};
-
-
-/**
- * @inheritDoc
- */
-ol.VectorTile.prototype.load = function() {
-  if (this.state == ol.TileState.IDLE) {
-    this.setState(ol.TileState.LOADING);
-    this.tileLoadFunction_(this, this.url_);
-    this.loader_(null, NaN, null);
-  }
-};
-
-
-/**
- * Handler for successful tile load.
- * @param {Array.<ol.Feature>} features The loaded features.
- * @param {ol.proj.Projection} dataProjection Data projection.
- */
-ol.VectorTile.prototype.onLoad_ = function(features, dataProjection) {
-  this.setProjection(dataProjection);
-  this.setFeatures(features);
-};
-
-
-/**
- * Handler for tile load errors.
- */
-ol.VectorTile.prototype.onError_ = function() {
-  this.setState(ol.TileState.ERROR);
-};
-
-
-/**
- * @param {Array.<ol.Feature>} features Features.
- * @api
- */
-ol.VectorTile.prototype.setFeatures = function(features) {
-  this.features_ = features;
-  this.setState(ol.TileState.LOADED);
-};
-
-
-/**
- * Set the projection of the features that were added with {@link #setFeatures}.
- * @param {ol.proj.Projection} projection Feature projection.
- * @api
- */
-ol.VectorTile.prototype.setProjection = function(projection) {
-  this.projection_ = projection;
-};
-
-
-ol.VectorTile.prototype.setReplayGroup = function(key, replayGroup) {
-  this.replayGroups_[key] = replayGroup;
-};
-
-
-/**
- * Set the feature loader for reading this tile's features.
- * @param {ol.FeatureLoader} loader Feature loader.
- * @api
- */
-ol.VectorTile.prototype.setLoader = function(loader) {
-  this.loader_ = loader;
-};
-
-goog.provide('ol.source.VectorTile');
-
-goog.require('ol');
-goog.require('ol.TileState');
-goog.require('ol.VectorImageTile');
-goog.require('ol.VectorTile');
-goog.require('ol.proj');
-goog.require('ol.size');
-goog.require('ol.tilegrid');
-goog.require('ol.source.UrlTile');
-
-
-/**
- * @classdesc
- * Class for layer sources providing vector data divided into a tile grid, to be
- * used with {@link ol.layer.VectorTile}. Although this source receives tiles
- * with vector features from the server, it is not meant for feature editing.
- * Features are optimized for rendering, their geometries are clipped at or near
- * tile boundaries and simplified for a view resolution. See
- * {@link ol.source.Vector} for vector sources that are suitable for feature
- * editing.
- *
- * @constructor
- * @fires ol.source.Tile.Event
- * @extends {ol.source.UrlTile}
- * @param {olx.source.VectorTileOptions} options Vector tile options.
- * @api
- */
-ol.source.VectorTile = function(options) {
-
-  ol.source.UrlTile.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize !== undefined ? options.cacheSize : 128,
-    extent: options.extent,
-    logo: options.logo,
-    opaque: false,
-    projection: options.projection,
-    state: options.state,
-    tileGrid: options.tileGrid,
-    tileLoadFunction: options.tileLoadFunction ?
-        options.tileLoadFunction : ol.VectorImageTile.defaultLoadFunction,
-    tileUrlFunction: options.tileUrlFunction,
-    tilePixelRatio: options.tilePixelRatio,
-    url: options.url,
-    urls: options.urls,
-    wrapX: options.wrapX === undefined ? true : options.wrapX
-  });
-
-  /**
-   * @private
-   * @type {ol.format.Feature}
-   */
-  this.format_ = options.format ? options.format : null;
-
-  /**
-   * @private
-   * @type {Object.<string,ol.VectorTile>}
-   */
-  this.sourceTiles_ = {};
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;
-
-  /**
-   * @protected
-   * @type {function(new: ol.VectorTile, ol.TileCoord, ol.TileState, string,
-   *        ol.format.Feature, ol.TileLoadFunctionType)}
-   */
-  this.tileClass = options.tileClass ? options.tileClass : ol.VectorTile;
-
-  /**
-   * @private
-   * @type {Object.<string,ol.tilegrid.TileGrid>}
-   */
-  this.tileGrids_ = {};
-
-  if (!this.tileGrid) {
-    this.tileGrid = this.getTileGridForProjection(ol.proj.get(options.projection || 'EPSG:3857'));
-  }
-
-};
-ol.inherits(ol.source.VectorTile, ol.source.UrlTile);
-
-
-/**
- * @return {boolean} The source can have overlapping geometries.
- */
-ol.source.VectorTile.prototype.getOverlaps = function() {
-  return this.overlaps_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.VectorTile.prototype.getTile = function(z, x, y, pixelRatio, projection) {
-  var tileCoordKey = this.getKeyZXY(z, x, y);
-  if (this.tileCache.containsKey(tileCoordKey)) {
-    return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
-  } else {
-    var tileCoord = [z, x, y];
-    var urlTileCoord = this.getTileCoordForTileUrlFunction(
-        tileCoord, projection);
-    var tileUrl = urlTileCoord ?
-        this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;
-    var tile = new ol.VectorImageTile(
-        tileCoord,
-        tileUrl !== undefined ? ol.TileState.IDLE : ol.TileState.EMPTY,
-        tileUrl !== undefined ? tileUrl : '',
-        this.format_, this.tileLoadFunction, urlTileCoord, this.tileUrlFunction,
-        this.tileGrid, this.getTileGridForProjection(projection),
-        this.sourceTiles_, pixelRatio, projection, this.tileClass,
-        this.handleTileChange.bind(this));
-
-    this.tileCache.set(tileCoordKey, tile);
-    return tile;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.VectorTile.prototype.getTileGridForProjection = function(projection) {
-  var code = projection.getCode();
-  var tileGrid = this.tileGrids_[code];
-  if (!tileGrid) {
-    // A tile grid that matches the tile size of the source tile grid is more
-    // likely to have 1:1 relationships between source tiles and rendered tiles.
-    var sourceTileGrid = this.tileGrid;
-    tileGrid = this.tileGrids_[code] = ol.tilegrid.createForProjection(projection, undefined,
-        sourceTileGrid ? sourceTileGrid.getTileSize(sourceTileGrid.getMinZoom()) : undefined);
-  }
-  return tileGrid;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.VectorTile.prototype.getTilePixelRatio = function(opt_pixelRatio) {
-  return opt_pixelRatio == undefined ?
-      ol.source.UrlTile.prototype.getTilePixelRatio.call(this, opt_pixelRatio) :
-      opt_pixelRatio;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.VectorTile.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
-  var tileSize = ol.size.toSize(this.getTileGridForProjection(projection).getTileSize(z));
-  return [Math.round(tileSize[0] * pixelRatio), Math.round(tileSize[1] * pixelRatio)];
-};
-
-goog.provide('ol.source.WMTSRequestEncoding');
-
-/**
- * Request encoding. One of 'KVP', 'REST'.
- * @enum {string}
- */
-ol.source.WMTSRequestEncoding = {
-  KVP: 'KVP',  // see spec §8
-  REST: 'REST' // see spec §10
-};
-
-goog.provide('ol.tilegrid.WMTS');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.proj');
-goog.require('ol.tilegrid.TileGrid');
-
-
-/**
- * @classdesc
- * Set the grid pattern for sources accessing WMTS tiled-image servers.
- *
- * @constructor
- * @extends {ol.tilegrid.TileGrid}
- * @param {olx.tilegrid.WMTSOptions} options WMTS options.
- * @struct
- * @api
- */
-ol.tilegrid.WMTS = function(options) {
-  /**
-   * @private
-   * @type {!Array.<string>}
-   */
-  this.matrixIds_ = options.matrixIds;
-  // FIXME: should the matrixIds become optional?
-
-  ol.tilegrid.TileGrid.call(this, {
-    extent: options.extent,
-    origin: options.origin,
-    origins: options.origins,
-    resolutions: options.resolutions,
-    tileSize: options.tileSize,
-    tileSizes: options.tileSizes,
-    sizes: options.sizes
-  });
-};
-ol.inherits(ol.tilegrid.WMTS, ol.tilegrid.TileGrid);
-
-
-/**
- * @param {number} z Z.
- * @return {string} MatrixId..
- */
-ol.tilegrid.WMTS.prototype.getMatrixId = function(z) {
-  return this.matrixIds_[z];
-};
-
-
-/**
- * Get the list of matrix identifiers.
- * @return {Array.<string>} MatrixIds.
- * @api
- */
-ol.tilegrid.WMTS.prototype.getMatrixIds = function() {
-  return this.matrixIds_;
-};
-
-
-/**
- * Create a tile grid from a WMTS capabilities matrix set and an
- * optional TileMatrixSetLimits.
- * @param {Object} matrixSet An object representing a matrixSet in the
- *     capabilities document.
- * @param {ol.Extent=} opt_extent An optional extent to restrict the tile
- *     ranges the server provides.
- * @param {Array.<Object>=} opt_matrixLimits An optional object representing
- *     the available matrices for tileGrid.
- * @return {ol.tilegrid.WMTS} WMTS tileGrid instance.
- * @api
- */
-ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet = function(matrixSet, opt_extent,
- opt_matrixLimits) {
-
-  /** @type {!Array.<number>} */
-  var resolutions = [];
-  /** @type {!Array.<string>} */
-  var matrixIds = [];
-  /** @type {!Array.<ol.Coordinate>} */
-  var origins = [];
-  /** @type {!Array.<ol.Size>} */
-  var tileSizes = [];
-  /** @type {!Array.<ol.Size>} */
-  var sizes = [];
-
-  var matrixLimits = opt_matrixLimits !== undefined ? opt_matrixLimits : [];
-
-  var supportedCRSPropName = 'SupportedCRS';
-  var matrixIdsPropName = 'TileMatrix';
-  var identifierPropName = 'Identifier';
-  var scaleDenominatorPropName = 'ScaleDenominator';
-  var topLeftCornerPropName = 'TopLeftCorner';
-  var tileWidthPropName = 'TileWidth';
-  var tileHeightPropName = 'TileHeight';
-
-  var projection;
-  projection = ol.proj.get(matrixSet[supportedCRSPropName].replace(
-      /urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/, '$1:$3'));
-  var metersPerUnit = projection.getMetersPerUnit();
-  // swap origin x and y coordinates if axis orientation is lat/long
-  var switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';
-
-  matrixSet[matrixIdsPropName].sort(function(a, b) {
-    return b[scaleDenominatorPropName] - a[scaleDenominatorPropName];
-  });
-
-  matrixSet[matrixIdsPropName].forEach(function(elt, index, array) {
-
-    var matrixAvailable;
-    // use of matrixLimits to filter TileMatrices from GetCapabilities
-    // TileMatrixSet from unavailable matrix levels.
-    if (matrixLimits.length > 0) {
-      matrixAvailable = ol.array.find(matrixLimits,
-          function(elt_ml, index_ml, array_ml) {
-            return elt[identifierPropName] == elt_ml[matrixIdsPropName];
-          });
-    } else {
-      matrixAvailable = true;
-    }
-
-    if (matrixAvailable) {
-      matrixIds.push(elt[identifierPropName]);
-      var resolution = elt[scaleDenominatorPropName] * 0.28E-3 / metersPerUnit;
-      var tileWidth = elt[tileWidthPropName];
-      var tileHeight = elt[tileHeightPropName];
-      if (switchOriginXY) {
-        origins.push([elt[topLeftCornerPropName][1],
-          elt[topLeftCornerPropName][0]]);
-      } else {
-        origins.push(elt[topLeftCornerPropName]);
-      }
-      resolutions.push(resolution);
-      tileSizes.push(tileWidth == tileHeight ?
-          tileWidth : [tileWidth, tileHeight]);
-      // top-left origin, so height is negative
-      sizes.push([elt['MatrixWidth'], -elt['MatrixHeight']]);
-    }
-  });
-
-  return new ol.tilegrid.WMTS({
-    extent: opt_extent,
-    origins: origins,
-    resolutions: resolutions,
-    matrixIds: matrixIds,
-    tileSizes: tileSizes,
-    sizes: sizes
-  });
-};
-
-goog.provide('ol.source.WMTS');
-
-goog.require('ol');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.source.TileImage');
-goog.require('ol.source.WMTSRequestEncoding');
-goog.require('ol.tilegrid.WMTS');
-goog.require('ol.uri');
-
-
-/**
- * @classdesc
- * Layer source for tile data from WMTS servers.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.WMTSOptions} options WMTS options.
- * @api
- */
-ol.source.WMTS = function(options) {
-
-  // TODO: add support for TileMatrixLimits
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.version_ = options.version !== undefined ? options.version : '1.0.0';
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.format_ = options.format !== undefined ? options.format : 'image/jpeg';
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.dimensions_ = options.dimensions !== undefined ? options.dimensions : {};
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.layer_ = options.layer;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.matrixSet_ = options.matrixSet;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.style_ = options.style;
-
-  var urls = options.urls;
-  if (urls === undefined && options.url !== undefined) {
-    urls = ol.TileUrlFunction.expandUrl(options.url);
-  }
-
-  // FIXME: should we guess this requestEncoding from options.url(s)
-  //        structure? that would mean KVP only if a template is not provided.
-
-  /**
-   * @private
-   * @type {ol.source.WMTSRequestEncoding}
-   */
-  this.requestEncoding_ = options.requestEncoding !== undefined ?
-      /** @type {ol.source.WMTSRequestEncoding} */ (options.requestEncoding) :
-      ol.source.WMTSRequestEncoding.KVP;
-
-  var requestEncoding = this.requestEncoding_;
-
-  // FIXME: should we create a default tileGrid?
-  // we could issue a getCapabilities xhr to retrieve missing configuration
-  var tileGrid = options.tileGrid;
-
-  // context property names are lower case to allow for a case insensitive
-  // replacement as some services use different naming conventions
-  var context = {
-    'layer': this.layer_,
-    'style': this.style_,
-    'tilematrixset': this.matrixSet_
-  };
-
-  if (requestEncoding == ol.source.WMTSRequestEncoding.KVP) {
-    ol.obj.assign(context, {
-      'Service': 'WMTS',
-      'Request': 'GetTile',
-      'Version': this.version_,
-      'Format': this.format_
-    });
-  }
-
-  var dimensions = this.dimensions_;
-
-  /**
-   * @param {string} template Template.
-   * @return {ol.TileUrlFunctionType} Tile URL function.
-   */
-  function createFromWMTSTemplate(template) {
-
-    // TODO: we may want to create our own appendParams function so that params
-    // order conforms to wmts spec guidance, and so that we can avoid to escape
-    // special template params
-
-    template = (requestEncoding == ol.source.WMTSRequestEncoding.KVP) ?
-        ol.uri.appendParams(template, context) :
-        template.replace(/\{(\w+?)\}/g, function(m, p) {
-          return (p.toLowerCase() in context) ? context[p.toLowerCase()] : m;
-        });
-
-    return (
-        /**
-         * @param {ol.TileCoord} tileCoord Tile coordinate.
-         * @param {number} pixelRatio Pixel ratio.
-         * @param {ol.proj.Projection} projection Projection.
-         * @return {string|undefined} Tile URL.
-         */
-        function(tileCoord, pixelRatio, projection) {
-          if (!tileCoord) {
-            return undefined;
-          } else {
-            var localContext = {
-              'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),
-              'TileCol': tileCoord[1],
-              'TileRow': -tileCoord[2] - 1
-            };
-            ol.obj.assign(localContext, dimensions);
-            var url = template;
-            if (requestEncoding == ol.source.WMTSRequestEncoding.KVP) {
-              url = ol.uri.appendParams(url, localContext);
-            } else {
-              url = url.replace(/\{(\w+?)\}/g, function(m, p) {
-                return localContext[p];
-              });
-            }
-            return url;
-          }
-        });
-  }
-
-  var tileUrlFunction = (urls && urls.length > 0) ?
-      ol.TileUrlFunction.createFromTileUrlFunctions(
-          urls.map(createFromWMTSTemplate)) :
-      ol.TileUrlFunction.nullTileUrlFunction;
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    projection: options.projection,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileClass: options.tileClass,
-    tileGrid: tileGrid,
-    tileLoadFunction: options.tileLoadFunction,
-    tilePixelRatio: options.tilePixelRatio,
-    tileUrlFunction: tileUrlFunction,
-    urls: urls,
-    wrapX: options.wrapX !== undefined ? options.wrapX : false
-  });
-
-  this.setKey(this.getKeyForDimensions_());
-
-};
-ol.inherits(ol.source.WMTS, ol.source.TileImage);
-
-
-/**
- * Get the dimensions, i.e. those passed to the constructor through the
- * "dimensions" option, and possibly updated using the updateDimensions
- * method.
- * @return {!Object} Dimensions.
- * @api
- */
-ol.source.WMTS.prototype.getDimensions = function() {
-  return this.dimensions_;
-};
-
-
-/**
- * Return the image format of the WMTS source.
- * @return {string} Format.
- * @api
- */
-ol.source.WMTS.prototype.getFormat = function() {
-  return this.format_;
-};
-
-
-/**
- * Return the layer of the WMTS source.
- * @return {string} Layer.
- * @api
- */
-ol.source.WMTS.prototype.getLayer = function() {
-  return this.layer_;
-};
-
-
-/**
- * Return the matrix set of the WMTS source.
- * @return {string} MatrixSet.
- * @api
- */
-ol.source.WMTS.prototype.getMatrixSet = function() {
-  return this.matrixSet_;
-};
-
-
-/**
- * Return the request encoding, either "KVP" or "REST".
- * @return {ol.source.WMTSRequestEncoding} Request encoding.
- * @api
- */
-ol.source.WMTS.prototype.getRequestEncoding = function() {
-  return this.requestEncoding_;
-};
-
-
-/**
- * Return the style of the WMTS source.
- * @return {string} Style.
- * @api
- */
-ol.source.WMTS.prototype.getStyle = function() {
-  return this.style_;
-};
-
-
-/**
- * Return the version of the WMTS source.
- * @return {string} Version.
- * @api
- */
-ol.source.WMTS.prototype.getVersion = function() {
-  return this.version_;
-};
-
-
-/**
- * @private
- * @return {string} The key for the current dimensions.
- */
-ol.source.WMTS.prototype.getKeyForDimensions_ = function() {
-  var i = 0;
-  var res = [];
-  for (var key in this.dimensions_) {
-    res[i++] = key + '-' + this.dimensions_[key];
-  }
-  return res.join('/');
-};
-
-
-/**
- * Update the dimensions.
- * @param {Object} dimensions Dimensions.
- * @api
- */
-ol.source.WMTS.prototype.updateDimensions = function(dimensions) {
-  ol.obj.assign(this.dimensions_, dimensions);
-  this.setKey(this.getKeyForDimensions_());
-};
-
-
-/**
- * Generate source options from a capabilities object.
- * @param {Object} wmtsCap An object representing the capabilities document.
- * @param {Object} config Configuration properties for the layer.  Defaults for
- *                  the layer will apply if not provided.
- *
- * Required config properties:
- *  - layer - {string} The layer identifier.
- *
- * Optional config properties:
- *  - matrixSet - {string} The matrix set identifier, required if there is
- *       more than one matrix set in the layer capabilities.
- *  - projection - {string} The desired CRS when no matrixSet is specified.
- *       eg: "EPSG:3857". If the desired projection is not available,
- *       an error is thrown.
- *  - requestEncoding - {string} url encoding format for the layer. Default is
- *       the first tile url format found in the GetCapabilities response.
- *  - style - {string} The name of the style
- *  - format - {string} Image format for the layer. Default is the first
- *       format returned in the GetCapabilities response.
- *  - crossOrigin - {string|null|undefined} Cross origin. Default is `undefined`.
- * @return {?olx.source.WMTSOptions} WMTS source options object or `null` if the layer was not found.
- * @api
- */
-ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, config) {
-  var layers = wmtsCap['Contents']['Layer'];
-  var l = ol.array.find(layers, function(elt, index, array) {
-    return elt['Identifier'] == config['layer'];
-  });
-  if (l === null) {
-    return null;
-  }
-  var tileMatrixSets = wmtsCap['Contents']['TileMatrixSet'];
-  var idx, matrixSet, matrixLimits;
-  if (l['TileMatrixSetLink'].length > 1) {
-    if ('projection' in config) {
-      idx = ol.array.findIndex(l['TileMatrixSetLink'],
-          function(elt, index, array) {
-            var tileMatrixSet = ol.array.find(tileMatrixSets, function(el) {
-              return el['Identifier'] == elt['TileMatrixSet'];
-            });
-            var supportedCRS = tileMatrixSet['SupportedCRS'].replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/, '$1:$3');
-            var proj1 = ol.proj.get(supportedCRS);
-            var proj2 = ol.proj.get(config['projection']);
-            if (proj1 && proj2) {
-              return ol.proj.equivalent(proj1, proj2);
-            } else {
-              return supportedCRS == config['projection'];
-            }
-          });
-    } else {
-      idx = ol.array.findIndex(l['TileMatrixSetLink'],
-          function(elt, index, array) {
-            return elt['TileMatrixSet'] == config['matrixSet'];
-          });
-    }
-  } else {
-    idx = 0;
-  }
-  if (idx < 0) {
-    idx = 0;
-  }
-  matrixSet = /** @type {string} */
-      (l['TileMatrixSetLink'][idx]['TileMatrixSet']);
-  matrixLimits = /** @type {Array.<Object>} */
-      (l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);
-
-  var format = /** @type {string} */ (l['Format'][0]);
-  if ('format' in config) {
-    format = config['format'];
-  }
-  idx = ol.array.findIndex(l['Style'], function(elt, index, array) {
-    if ('style' in config) {
-      return elt['Title'] == config['style'];
-    } else {
-      return elt['isDefault'];
-    }
-  });
-  if (idx < 0) {
-    idx = 0;
-  }
-  var style = /** @type {string} */ (l['Style'][idx]['Identifier']);
-
-  var dimensions = {};
-  if ('Dimension' in l) {
-    l['Dimension'].forEach(function(elt, index, array) {
-      var key = elt['Identifier'];
-      var value = elt['Default'];
-      if (value === undefined) {
-        value = elt['Value'][0];
-      }
-      dimensions[key] = value;
-    });
-  }
-
-  var matrixSets = wmtsCap['Contents']['TileMatrixSet'];
-  var matrixSetObj = ol.array.find(matrixSets, function(elt, index, array) {
-    return elt['Identifier'] == matrixSet;
-  });
-
-  var projection;
-  if ('projection' in config) {
-    projection = ol.proj.get(config['projection']);
-  } else {
-    projection = ol.proj.get(matrixSetObj['SupportedCRS'].replace(
-        /urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/, '$1:$3'));
-  }
-
-  var wgs84BoundingBox = l['WGS84BoundingBox'];
-  var extent, wrapX;
-  if (wgs84BoundingBox !== undefined) {
-    var wgs84ProjectionExtent = ol.proj.get('EPSG:4326').getExtent();
-    wrapX = (wgs84BoundingBox[0] == wgs84ProjectionExtent[0] &&
-        wgs84BoundingBox[2] == wgs84ProjectionExtent[2]);
-    extent = ol.proj.transformExtent(
-        wgs84BoundingBox, 'EPSG:4326', projection);
-    var projectionExtent = projection.getExtent();
-    if (projectionExtent) {
-      // If possible, do a sanity check on the extent - it should never be
-      // bigger than the validity extent of the projection of a matrix set.
-      if (!ol.extent.containsExtent(projectionExtent, extent)) {
-        extent = undefined;
-      }
-    }
-  }
-
-  var tileGrid = ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet(
-      matrixSetObj, extent, matrixLimits);
-
-  /** @type {!Array.<string>} */
-  var urls = [];
-  var requestEncoding = config['requestEncoding'];
-  requestEncoding = requestEncoding !== undefined ? requestEncoding : '';
-
-  if ('OperationsMetadata' in wmtsCap && 'GetTile' in wmtsCap['OperationsMetadata']) {
-    var gets = wmtsCap['OperationsMetadata']['GetTile']['DCP']['HTTP']['Get'];
-
-    for (var i = 0, ii = gets.length; i < ii; ++i) {
-      var constraint = ol.array.find(gets[i]['Constraint'], function(element) {
-        return element['name'] == 'GetEncoding';
-      });
-      var encodings = constraint['AllowedValues']['Value'];
-
-      if (requestEncoding === '') {
-        // requestEncoding not provided, use the first encoding from the list
-        requestEncoding = encodings[0];
-      }
-      if (requestEncoding === ol.source.WMTSRequestEncoding.KVP) {
-        if (ol.array.includes(encodings, ol.source.WMTSRequestEncoding.KVP)) {
-          urls.push(/** @type {string} */ (gets[i]['href']));
-        }
-      } else {
-        break;
-      }
-    }
-  }
-  if (urls.length === 0) {
-    requestEncoding = ol.source.WMTSRequestEncoding.REST;
-    l['ResourceURL'].forEach(function(element) {
-      if (element['resourceType'] === 'tile') {
-        format = element['format'];
-        urls.push(/** @type {string} */ (element['template']));
-      }
-    });
-  }
-
-  return {
-    urls: urls,
-    layer: config['layer'],
-    matrixSet: matrixSet,
-    format: format,
-    projection: projection,
-    requestEncoding: requestEncoding,
-    tileGrid: tileGrid,
-    style: style,
-    dimensions: dimensions,
-    wrapX: wrapX,
-    crossOrigin: config['crossOrigin']
-  };
-};
-
-goog.provide('ol.source.Zoomify');
-
-goog.require('ol');
-goog.require('ol.ImageTile');
-goog.require('ol.TileState');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.asserts');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.source.TileImage');
-goog.require('ol.tilegrid.TileGrid');
-
-
-/**
- * @classdesc
- * Layer source for tile data in Zoomify format.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.ZoomifyOptions=} opt_options Options.
- * @api
- */
-ol.source.Zoomify = function(opt_options) {
-
-  var options = opt_options || {};
-
-  var size = options.size;
-  var tierSizeCalculation = options.tierSizeCalculation !== undefined ?
-      options.tierSizeCalculation :
-      ol.source.Zoomify.TierSizeCalculation_.DEFAULT;
-
-  var imageWidth = size[0];
-  var imageHeight = size[1];
-  var tierSizeInTiles = [];
-  var tileSize = ol.DEFAULT_TILE_SIZE;
-
-  switch (tierSizeCalculation) {
-    case ol.source.Zoomify.TierSizeCalculation_.DEFAULT:
-      while (imageWidth > tileSize || imageHeight > tileSize) {
-        tierSizeInTiles.push([
-          Math.ceil(imageWidth / tileSize),
-          Math.ceil(imageHeight / tileSize)
-        ]);
-        tileSize += tileSize;
-      }
-      break;
-    case ol.source.Zoomify.TierSizeCalculation_.TRUNCATED:
-      var width = imageWidth;
-      var height = imageHeight;
-      while (width > tileSize || height > tileSize) {
-        tierSizeInTiles.push([
-          Math.ceil(width / tileSize),
-          Math.ceil(height / tileSize)
-        ]);
-        width >>= 1;
-        height >>= 1;
-      }
-      break;
-    default:
-      ol.asserts.assert(false, 53); // Unknown `tierSizeCalculation` configured
-      break;
-  }
-
-  tierSizeInTiles.push([1, 1]);
-  tierSizeInTiles.reverse();
-
-  var resolutions = [1];
-  var tileCountUpToTier = [0];
-  var i, ii;
-  for (i = 1, ii = tierSizeInTiles.length; i < ii; i++) {
-    resolutions.push(1 << i);
-    tileCountUpToTier.push(
-        tierSizeInTiles[i - 1][0] * tierSizeInTiles[i - 1][1] +
-        tileCountUpToTier[i - 1]
-    );
-  }
-  resolutions.reverse();
-
-  var extent = [0, -size[1], size[0], 0];
-  var tileGrid = new ol.tilegrid.TileGrid({
-    extent: extent,
-    origin: ol.extent.getTopLeft(extent),
-    resolutions: resolutions
-  });
-
-  var url = options.url;
-  if (url && url.indexOf('{TileGroup}') == -1) {
-    url += '{TileGroup}/{z}-{x}-{y}.jpg';
-  }
-  var urls = ol.TileUrlFunction.expandUrl(url);
-
-  /**
-   * @param {string} template Template.
-   * @return {ol.TileUrlFunctionType} Tile URL function.
-   */
-  function createFromTemplate(template) {
-
-    return (
-      /**
-       * @param {ol.TileCoord} tileCoord Tile Coordinate.
-       * @param {number} pixelRatio Pixel ratio.
-       * @param {ol.proj.Projection} projection Projection.
-       * @return {string|undefined} Tile URL.
-       */
-      function(tileCoord, pixelRatio, projection) {
-        if (!tileCoord) {
-          return undefined;
-        } else {
-          var tileCoordZ = tileCoord[0];
-          var tileCoordX = tileCoord[1];
-          var tileCoordY = -tileCoord[2] - 1;
-          var tileIndex =
-              tileCoordX +
-              tileCoordY * tierSizeInTiles[tileCoordZ][0] +
-              tileCountUpToTier[tileCoordZ];
-          var tileGroup = (tileIndex / ol.DEFAULT_TILE_SIZE) | 0;
-          var localContext = {
-            'z': tileCoordZ,
-            'x': tileCoordX,
-            'y': tileCoordY,
-            'TileGroup': 'TileGroup' + tileGroup
-          };
-          return template.replace(/\{(\w+?)\}/g, function(m, p) {
-            return localContext[p];
-          });
-        }
-      });
-  }
-
-  var tileUrlFunction = ol.TileUrlFunction.createFromTileUrlFunctions(urls.map(createFromTemplate));
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    projection: options.projection,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileClass: ol.source.Zoomify.Tile_,
-    tileGrid: tileGrid,
-    tileUrlFunction: tileUrlFunction
-  });
-
-};
-ol.inherits(ol.source.Zoomify, ol.source.TileImage);
-
-
-/**
- * @constructor
- * @extends {ol.ImageTile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {string} src Image source URI.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
- * @private
- */
-ol.source.Zoomify.Tile_ = function(
-    tileCoord, state, src, crossOrigin, tileLoadFunction) {
-
-  ol.ImageTile.call(this, tileCoord, state, src, crossOrigin, tileLoadFunction);
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}
-   */
-  this.zoomifyImage_ = null;
-
-};
-ol.inherits(ol.source.Zoomify.Tile_, ol.ImageTile);
-
-
-/**
- * @inheritDoc
- */
-ol.source.Zoomify.Tile_.prototype.getImage = function() {
-  if (this.zoomifyImage_) {
-    return this.zoomifyImage_;
-  }
-  var tileSize = ol.DEFAULT_TILE_SIZE;
-  var image = ol.ImageTile.prototype.getImage.call(this);
-  if (this.state == ol.TileState.LOADED) {
-    if (image.width == tileSize && image.height == tileSize) {
-      this.zoomifyImage_ = image;
-      return image;
-    } else {
-      var context = ol.dom.createCanvasContext2D(tileSize, tileSize);
-      context.drawImage(image, 0, 0);
-      this.zoomifyImage_ = context.canvas;
-      return context.canvas;
-    }
-  } else {
-    return image;
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.source.Zoomify.TierSizeCalculation_ = {
-  DEFAULT: 'default',
-  TRUNCATED: 'truncated'
-};
-
-goog.provide('ol.style.Atlas');
-
-goog.require('ol.dom');
-
-
-/**
- * This class facilitates the creation of image atlases.
- *
- * Images added to an atlas will be rendered onto a single
- * atlas canvas. The distribution of images on the canvas is
- * managed with the bin packing algorithm described in:
- * http://www.blackpawn.com/texts/lightmaps/
- *
- * @constructor
- * @struct
- * @param {number} size The size in pixels of the sprite image.
- * @param {number} space The space in pixels between images.
- *    Because texture coordinates are float values, the edges of
- *    images might not be completely correct (in a way that the
- *    edges overlap when being rendered). To avoid this we add a
- *    padding around each image.
- */
-ol.style.Atlas = function(size, space) {
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.space_ = space;
-
-  /**
-   * @private
-   * @type {Array.<ol.AtlasBlock>}
-   */
-  this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}];
-
-  /**
-   * @private
-   * @type {Object.<string, ol.AtlasInfo>}
-   */
-  this.entries_ = {};
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context_ = ol.dom.createCanvasContext2D(size, size);
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = this.context_.canvas;
-};
-
-
-/**
- * @param {string} id The identifier of the entry to check.
- * @return {?ol.AtlasInfo} The atlas info.
- */
-ol.style.Atlas.prototype.get = function(id) {
-  return this.entries_[id] || null;
-};
-
-
-/**
- * @param {string} id The identifier of the entry to add.
- * @param {number} width The width.
- * @param {number} height The height.
- * @param {function(CanvasRenderingContext2D, number, number)} renderCallback
- *    Called to render the new image onto an atlas image.
- * @param {Object=} opt_this Value to use as `this` when executing
- *    `renderCallback`.
- * @return {?ol.AtlasInfo} The position and atlas image for the entry.
- */
-ol.style.Atlas.prototype.add = function(id, width, height, renderCallback, opt_this) {
-  var block, i, ii;
-  for (i = 0, ii = this.emptyBlocks_.length; i < ii; ++i) {
-    block = this.emptyBlocks_[i];
-    if (block.width >= width + this.space_ &&
-        block.height >= height + this.space_) {
-      // we found a block that is big enough for our entry
-      var entry = {
-        offsetX: block.x + this.space_,
-        offsetY: block.y + this.space_,
-        image: this.canvas_
-      };
-      this.entries_[id] = entry;
-
-      // render the image on the atlas image
-      renderCallback.call(opt_this, this.context_,
-          block.x + this.space_, block.y + this.space_);
-
-      // split the block after the insertion, either horizontally or vertically
-      this.split_(i, block, width + this.space_, height + this.space_);
-
-      return entry;
-    }
-  }
-
-  // there is no space for the new entry in this atlas
-  return null;
-};
-
-
-/**
- * @private
- * @param {number} index The index of the block.
- * @param {ol.AtlasBlock} block The block to split.
- * @param {number} width The width of the entry to insert.
- * @param {number} height The height of the entry to insert.
- */
-ol.style.Atlas.prototype.split_ = function(index, block, width, height) {
-  var deltaWidth = block.width - width;
-  var deltaHeight = block.height - height;
-
-  /** @type {ol.AtlasBlock} */
-  var newBlock1;
-  /** @type {ol.AtlasBlock} */
-  var newBlock2;
-
-  if (deltaWidth > deltaHeight) {
-    // split vertically
-    // block right of the inserted entry
-    newBlock1 = {
-      x: block.x + width,
-      y: block.y,
-      width: block.width - width,
-      height: block.height
-    };
-
-    // block below the inserted entry
-    newBlock2 = {
-      x: block.x,
-      y: block.y + height,
-      width: width,
-      height: block.height - height
-    };
-    this.updateBlocks_(index, newBlock1, newBlock2);
-  } else {
-    // split horizontally
-    // block right of the inserted entry
-    newBlock1 = {
-      x: block.x + width,
-      y: block.y,
-      width: block.width - width,
-      height: height
-    };
-
-    // block below the inserted entry
-    newBlock2 = {
-      x: block.x,
-      y: block.y + height,
-      width: block.width,
-      height: block.height - height
-    };
-    this.updateBlocks_(index, newBlock1, newBlock2);
-  }
-};
-
-
-/**
- * Remove the old block and insert new blocks at the same array position.
- * The new blocks are inserted at the same position, so that splitted
- * blocks (that are potentially smaller) are filled first.
- * @private
- * @param {number} index The index of the block to remove.
- * @param {ol.AtlasBlock} newBlock1 The 1st block to add.
- * @param {ol.AtlasBlock} newBlock2 The 2nd block to add.
- */
-ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) {
-  var args = [index, 1];
-  if (newBlock1.width > 0 && newBlock1.height > 0) {
-    args.push(newBlock1);
-  }
-  if (newBlock2.width > 0 && newBlock2.height > 0) {
-    args.push(newBlock2);
-  }
-  this.emptyBlocks_.splice.apply(this.emptyBlocks_, args);
-};
-
-goog.provide('ol.style.AtlasManager');
-
-goog.require('ol');
-goog.require('ol.style.Atlas');
-
-
-/**
- * Manages the creation of image atlases.
- *
- * Images added to this manager will be inserted into an atlas, which
- * will be used for rendering.
- * The `size` given in the constructor is the size for the first
- * atlas. After that, when new atlases are created, they will have
- * twice the size as the latest atlas (until `maxSize` is reached).
- *
- * If an application uses many images or very large images, it is recommended
- * to set a higher `size` value to avoid the creation of too many atlases.
- *
- * @constructor
- * @struct
- * @api
- * @param {olx.style.AtlasManagerOptions=} opt_options Options.
- */
-ol.style.AtlasManager = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * The size in pixels of the latest atlas image.
-   * @private
-   * @type {number}
-   */
-  this.currentSize_ = options.initialSize !== undefined ?
-      options.initialSize : ol.INITIAL_ATLAS_SIZE;
-
-  /**
-   * The maximum size in pixels of atlas images.
-   * @private
-   * @type {number}
-   */
-  this.maxSize_ = options.maxSize !== undefined ?
-      options.maxSize : ol.MAX_ATLAS_SIZE != -1 ?
-          ol.MAX_ATLAS_SIZE : ol.WEBGL_MAX_TEXTURE_SIZE !== undefined ?
-              ol.WEBGL_MAX_TEXTURE_SIZE : 2048;
-
-  /**
-   * The size in pixels between images.
-   * @private
-   * @type {number}
-   */
-  this.space_ = options.space !== undefined ? options.space : 1;
-
-  /**
-   * @private
-   * @type {Array.<ol.style.Atlas>}
-   */
-  this.atlases_ = [new ol.style.Atlas(this.currentSize_, this.space_)];
-
-  /**
-   * The size in pixels of the latest atlas image for hit-detection images.
-   * @private
-   * @type {number}
-   */
-  this.currentHitSize_ = this.currentSize_;
-
-  /**
-   * @private
-   * @type {Array.<ol.style.Atlas>}
-   */
-  this.hitAtlases_ = [new ol.style.Atlas(this.currentHitSize_, this.space_)];
-};
-
-
-/**
- * @param {string} id The identifier of the entry to check.
- * @return {?ol.AtlasManagerInfo} The position and atlas image for the
- *    entry, or `null` if the entry is not part of the atlas manager.
- */
-ol.style.AtlasManager.prototype.getInfo = function(id) {
-  /** @type {?ol.AtlasInfo} */
-  var info = this.getInfo_(this.atlases_, id);
-
-  if (!info) {
-    return null;
-  }
-  var hitInfo = /** @type {ol.AtlasInfo} */ (this.getInfo_(this.hitAtlases_, id));
-
-  return this.mergeInfos_(info, hitInfo);
-};
-
-
-/**
- * @private
- * @param {Array.<ol.style.Atlas>} atlases The atlases to search.
- * @param {string} id The identifier of the entry to check.
- * @return {?ol.AtlasInfo} The position and atlas image for the entry,
- *    or `null` if the entry is not part of the atlases.
- */
-ol.style.AtlasManager.prototype.getInfo_ = function(atlases, id) {
-  var atlas, info, i, ii;
-  for (i = 0, ii = atlases.length; i < ii; ++i) {
-    atlas = atlases[i];
-    info = atlas.get(id);
-    if (info) {
-      return info;
-    }
-  }
-  return null;
-};
-
-
-/**
- * @private
- * @param {ol.AtlasInfo} info The info for the real image.
- * @param {ol.AtlasInfo} hitInfo The info for the hit-detection
- *    image.
- * @return {?ol.AtlasManagerInfo} The position and atlas image for the
- *    entry, or `null` if the entry is not part of the atlases.
- */
-ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
-  return /** @type {ol.AtlasManagerInfo} */ ({
-    offsetX: info.offsetX,
-    offsetY: info.offsetY,
-    image: info.image,
-    hitImage: hitInfo.image
-  });
-};
-
-
-/**
- * Add an image to the atlas manager.
- *
- * If an entry for the given id already exists, the entry will
- * be overridden (but the space on the atlas graphic will not be freed).
- *
- * If `renderHitCallback` is provided, the image (or the hit-detection version
- * of the image) will be rendered into a separate hit-detection atlas image.
- *
- * @param {string} id The identifier of the entry to add.
- * @param {number} width The width.
- * @param {number} height The height.
- * @param {function(CanvasRenderingContext2D, number, number)} renderCallback
- *    Called to render the new image onto an atlas image.
- * @param {function(CanvasRenderingContext2D, number, number)=}
- *    opt_renderHitCallback Called to render a hit-detection image onto a hit
- *    detection atlas image.
- * @param {Object=} opt_this Value to use as `this` when executing
- *    `renderCallback` and `renderHitCallback`.
- * @return {?ol.AtlasManagerInfo}  The position and atlas image for the
- *    entry, or `null` if the image is too big.
- */
-ol.style.AtlasManager.prototype.add = function(id, width, height,
-        renderCallback, opt_renderHitCallback, opt_this) {
-  if (width + this.space_ > this.maxSize_ ||
-      height + this.space_ > this.maxSize_) {
-    return null;
-  }
-
-  /** @type {?ol.AtlasInfo} */
-  var info = this.add_(false,
-      id, width, height, renderCallback, opt_this);
-  if (!info) {
-    return null;
-  }
-
-  // even if no hit-detection entry is requested, we insert a fake entry into
-  // the hit-detection atlas, to make sure that the offset is the same for
-  // the original image and the hit-detection image.
-  var renderHitCallback = opt_renderHitCallback !== undefined ?
-      opt_renderHitCallback : ol.nullFunction;
-
-  var hitInfo = /** @type {ol.AtlasInfo} */ (this.add_(true,
-      id, width, height, renderHitCallback, opt_this));
-
-  return this.mergeInfos_(info, hitInfo);
-};
-
-
-/**
- * @private
- * @param {boolean} isHitAtlas If the hit-detection atlases are used.
- * @param {string} id The identifier of the entry to add.
- * @param {number} width The width.
- * @param {number} height The height.
- * @param {function(CanvasRenderingContext2D, number, number)} renderCallback
- *    Called to render the new image onto an atlas image.
- * @param {Object=} opt_this Value to use as `this` when executing
- *    `renderCallback` and `renderHitCallback`.
- * @return {?ol.AtlasInfo}  The position and atlas image for the entry,
- *    or `null` if the image is too big.
- */
-ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height,
-        renderCallback, opt_this) {
-  var atlases = (isHitAtlas) ? this.hitAtlases_ : this.atlases_;
-  var atlas, info, i, ii;
-  for (i = 0, ii = atlases.length; i < ii; ++i) {
-    atlas = atlases[i];
-    info = atlas.add(id, width, height, renderCallback, opt_this);
-    if (info) {
-      return info;
-    } else if (!info && i === ii - 1) {
-      // the entry could not be added to one of the existing atlases,
-      // create a new atlas that is twice as big and try to add to this one.
-      var size;
-      if (isHitAtlas) {
-        size = Math.min(this.currentHitSize_ * 2, this.maxSize_);
-        this.currentHitSize_ = size;
-      } else {
-        size = Math.min(this.currentSize_ * 2, this.maxSize_);
-        this.currentSize_ = size;
-      }
-      atlas = new ol.style.Atlas(size, this.space_);
-      atlases.push(atlas);
-      // run the loop another time
-      ++ii;
-    }
-  }
-  return null;
-};
-
-// Copyright 2009 The Closure Library Authors.
-// All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS-IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// This file has been auto-generated by GenJsDeps, please do not edit.
-
-goog.addDependency(
-    'demos/editor/equationeditor.js', ['goog.demos.editor.EquationEditor'],
-    ['goog.ui.equation.EquationEditorDialog']);
-goog.addDependency(
-    'demos/editor/helloworld.js', ['goog.demos.editor.HelloWorld'],
-    ['goog.dom', 'goog.dom.TagName', 'goog.editor.Plugin']);
-goog.addDependency(
-    'demos/editor/helloworlddialog.js',
-    [
-      'goog.demos.editor.HelloWorldDialog',
-      'goog.demos.editor.HelloWorldDialog.OkEvent'
-    ],
-    [
-      'goog.dom.TagName', 'goog.events.Event', 'goog.string',
-      'goog.ui.editor.AbstractDialog', 'goog.ui.editor.AbstractDialog.Builder',
-      'goog.ui.editor.AbstractDialog.EventType'
-    ]);
-goog.addDependency(
-    'demos/editor/helloworlddialogplugin.js',
-    [
-      'goog.demos.editor.HelloWorldDialogPlugin',
-      'goog.demos.editor.HelloWorldDialogPlugin.Command'
-    ],
-    [
-      'goog.demos.editor.HelloWorldDialog', 'goog.dom.TagName',
-      'goog.editor.plugins.AbstractDialogPlugin', 'goog.editor.range',
-      'goog.functions', 'goog.ui.editor.AbstractDialog.EventType'
-    ]);
-
-/**
- * @fileoverview Custom exports file.
- * @suppress {checkVars,extraRequire}
- */
-
-goog.require('ol');
-goog.require('ol.AssertionError');
-goog.require('ol.Attribution');
-goog.require('ol.Collection');
-goog.require('ol.DeviceOrientation');
-goog.require('ol.Feature');
-goog.require('ol.Geolocation');
-goog.require('ol.Graticule');
-goog.require('ol.Image');
-goog.require('ol.ImageTile');
-goog.require('ol.Kinetic');
-goog.require('ol.Map');
-goog.require('ol.MapBrowserEvent');
-goog.require('ol.MapEvent');
-goog.require('ol.Object');
-goog.require('ol.Observable');
-goog.require('ol.Overlay');
-goog.require('ol.Sphere');
-goog.require('ol.Tile');
-goog.require('ol.VectorTile');
-goog.require('ol.View');
-goog.require('ol.color');
-goog.require('ol.colorlike');
-goog.require('ol.control');
-goog.require('ol.control.Attribution');
-goog.require('ol.control.Control');
-goog.require('ol.control.FullScreen');
-goog.require('ol.control.MousePosition');
-goog.require('ol.control.OverviewMap');
-goog.require('ol.control.Rotate');
-goog.require('ol.control.ScaleLine');
-goog.require('ol.control.Zoom');
-goog.require('ol.control.ZoomSlider');
-goog.require('ol.control.ZoomToExtent');
-goog.require('ol.coordinate');
-goog.require('ol.easing');
-goog.require('ol.events.Event');
-goog.require('ol.events.condition');
-goog.require('ol.extent');
-goog.require('ol.featureloader');
-goog.require('ol.format.EsriJSON');
-goog.require('ol.format.Feature');
-goog.require('ol.format.GML');
-goog.require('ol.format.GML2');
-goog.require('ol.format.GML3');
-goog.require('ol.format.GMLBase');
-goog.require('ol.format.GPX');
-goog.require('ol.format.GeoJSON');
-goog.require('ol.format.IGC');
-goog.require('ol.format.KML');
-goog.require('ol.format.MVT');
-goog.require('ol.format.OSMXML');
-goog.require('ol.format.Polyline');
-goog.require('ol.format.TopoJSON');
-goog.require('ol.format.WFS');
-goog.require('ol.format.WKT');
-goog.require('ol.format.WMSCapabilities');
-goog.require('ol.format.WMSGetFeatureInfo');
-goog.require('ol.format.WMTSCapabilities');
-goog.require('ol.format.filter');
-goog.require('ol.format.filter.And');
-goog.require('ol.format.filter.Bbox');
-goog.require('ol.format.filter.Comparison');
-goog.require('ol.format.filter.ComparisonBinary');
-goog.require('ol.format.filter.During');
-goog.require('ol.format.filter.EqualTo');
-goog.require('ol.format.filter.Filter');
-goog.require('ol.format.filter.GreaterThan');
-goog.require('ol.format.filter.GreaterThanOrEqualTo');
-goog.require('ol.format.filter.Intersects');
-goog.require('ol.format.filter.IsBetween');
-goog.require('ol.format.filter.IsLike');
-goog.require('ol.format.filter.IsNull');
-goog.require('ol.format.filter.LessThan');
-goog.require('ol.format.filter.LessThanOrEqualTo');
-goog.require('ol.format.filter.Not');
-goog.require('ol.format.filter.NotEqualTo');
-goog.require('ol.format.filter.Or');
-goog.require('ol.format.filter.Spatial');
-goog.require('ol.format.filter.Within');
-goog.require('ol.geom.Circle');
-goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryCollection');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.LinearRing');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.has');
-goog.require('ol.interaction');
-goog.require('ol.interaction.DoubleClickZoom');
-goog.require('ol.interaction.DragAndDrop');
-goog.require('ol.interaction.DragBox');
-goog.require('ol.interaction.DragPan');
-goog.require('ol.interaction.DragRotate');
-goog.require('ol.interaction.DragRotateAndZoom');
-goog.require('ol.interaction.DragZoom');
-goog.require('ol.interaction.Draw');
-goog.require('ol.interaction.Extent');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.interaction.KeyboardPan');
-goog.require('ol.interaction.KeyboardZoom');
-goog.require('ol.interaction.Modify');
-goog.require('ol.interaction.MouseWheelZoom');
-goog.require('ol.interaction.PinchRotate');
-goog.require('ol.interaction.PinchZoom');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.interaction.Select');
-goog.require('ol.interaction.Snap');
-goog.require('ol.interaction.Translate');
-goog.require('ol.layer.Base');
-goog.require('ol.layer.Group');
-goog.require('ol.layer.Heatmap');
-goog.require('ol.layer.Image');
-goog.require('ol.layer.Layer');
-goog.require('ol.layer.Tile');
-goog.require('ol.layer.Vector');
-goog.require('ol.layer.VectorTile');
-goog.require('ol.loadingstrategy');
-goog.require('ol.proj');
-goog.require('ol.proj.Projection');
-goog.require('ol.proj.Units');
-goog.require('ol.proj.common');
-goog.require('ol.render');
-goog.require('ol.render.Event');
-goog.require('ol.render.Feature');
-goog.require('ol.render.VectorContext');
-goog.require('ol.render.canvas.Immediate');
-goog.require('ol.render.webgl.Immediate');
-goog.require('ol.size');
-goog.require('ol.source.BingMaps');
-goog.require('ol.source.CartoDB');
-goog.require('ol.source.Cluster');
-goog.require('ol.source.Image');
-goog.require('ol.source.ImageArcGISRest');
-goog.require('ol.source.ImageCanvas');
-goog.require('ol.source.ImageMapGuide');
-goog.require('ol.source.ImageStatic');
-goog.require('ol.source.ImageVector');
-goog.require('ol.source.ImageWMS');
-goog.require('ol.source.OSM');
-goog.require('ol.source.Raster');
-goog.require('ol.source.Source');
-goog.require('ol.source.Stamen');
-goog.require('ol.source.Tile');
-goog.require('ol.source.TileArcGISRest');
-goog.require('ol.source.TileDebug');
-goog.require('ol.source.TileImage');
-goog.require('ol.source.TileJSON');
-goog.require('ol.source.TileUTFGrid');
-goog.require('ol.source.TileWMS');
-goog.require('ol.source.UrlTile');
-goog.require('ol.source.Vector');
-goog.require('ol.source.VectorTile');
-goog.require('ol.source.WMTS');
-goog.require('ol.source.XYZ');
-goog.require('ol.source.Zoomify');
-goog.require('ol.style.AtlasManager');
-goog.require('ol.style.Circle');
-goog.require('ol.style.Fill');
-goog.require('ol.style.Icon');
-goog.require('ol.style.Image');
-goog.require('ol.style.RegularShape');
-goog.require('ol.style.Stroke');
-goog.require('ol.style.Style');
-goog.require('ol.style.Text');
-goog.require('ol.tilegrid');
-goog.require('ol.tilegrid.TileGrid');
-goog.require('ol.tilegrid.WMTS');
-goog.require('ol.webgl.Context');
-goog.require('ol.xml');
-
-
-
-goog.exportProperty(
-    ol.AssertionError.prototype,
-    'code',
-    ol.AssertionError.prototype.code);
-
-goog.exportSymbol(
-    'ol.Attribution',
-    ol.Attribution,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Attribution.prototype,
-    'getHTML',
-    ol.Attribution.prototype.getHTML);
-
-goog.exportSymbol(
-    'ol.Collection',
-    ol.Collection,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'clear',
-    ol.Collection.prototype.clear);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'extend',
-    ol.Collection.prototype.extend);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'forEach',
-    ol.Collection.prototype.forEach);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'getArray',
-    ol.Collection.prototype.getArray);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'item',
-    ol.Collection.prototype.item);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'getLength',
-    ol.Collection.prototype.getLength);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'insertAt',
-    ol.Collection.prototype.insertAt);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'pop',
-    ol.Collection.prototype.pop);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'push',
-    ol.Collection.prototype.push);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'remove',
-    ol.Collection.prototype.remove);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'removeAt',
-    ol.Collection.prototype.removeAt);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'setAt',
-    ol.Collection.prototype.setAt);
-
-goog.exportProperty(
-    ol.Collection.Event.prototype,
-    'element',
-    ol.Collection.Event.prototype.element);
-
-goog.exportSymbol(
-    'ol.color.asArray',
-    ol.color.asArray,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.color.asString',
-    ol.color.asString,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.colorlike.asColorLike',
-    ol.colorlike.asColorLike,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.defaults',
-    ol.control.defaults,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.add',
-    ol.coordinate.add,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.createStringXY',
-    ol.coordinate.createStringXY,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.format',
-    ol.coordinate.format,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.rotate',
-    ol.coordinate.rotate,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.toStringHDMS',
-    ol.coordinate.toStringHDMS,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.toStringXY',
-    ol.coordinate.toStringXY,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.DeviceOrientation',
-    ol.DeviceOrientation,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getAlpha',
-    ol.DeviceOrientation.prototype.getAlpha);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getBeta',
-    ol.DeviceOrientation.prototype.getBeta);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getGamma',
-    ol.DeviceOrientation.prototype.getGamma);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getHeading',
-    ol.DeviceOrientation.prototype.getHeading);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getTracking',
-    ol.DeviceOrientation.prototype.getTracking);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'setTracking',
-    ol.DeviceOrientation.prototype.setTracking);
-
-goog.exportSymbol(
-    'ol.easing.easeIn',
-    ol.easing.easeIn,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.easing.easeOut',
-    ol.easing.easeOut,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.easing.inAndOut',
-    ol.easing.inAndOut,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.easing.linear',
-    ol.easing.linear,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.easing.upAndDown',
-    ol.easing.upAndDown,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.boundingExtent',
-    ol.extent.boundingExtent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.buffer',
-    ol.extent.buffer,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.containsCoordinate',
-    ol.extent.containsCoordinate,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.containsExtent',
-    ol.extent.containsExtent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.containsXY',
-    ol.extent.containsXY,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.createEmpty',
-    ol.extent.createEmpty,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.equals',
-    ol.extent.equals,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.extend',
-    ol.extent.extend,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getArea',
-    ol.extent.getArea,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getBottomLeft',
-    ol.extent.getBottomLeft,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getBottomRight',
-    ol.extent.getBottomRight,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getCenter',
-    ol.extent.getCenter,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getHeight',
-    ol.extent.getHeight,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getIntersection',
-    ol.extent.getIntersection,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getSize',
-    ol.extent.getSize,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getTopLeft',
-    ol.extent.getTopLeft,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getTopRight',
-    ol.extent.getTopRight,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getWidth',
-    ol.extent.getWidth,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.intersects',
-    ol.extent.intersects,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.isEmpty',
-    ol.extent.isEmpty,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.applyTransform',
-    ol.extent.applyTransform,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Feature',
-    ol.Feature,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'clone',
-    ol.Feature.prototype.clone);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getGeometry',
-    ol.Feature.prototype.getGeometry);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getId',
-    ol.Feature.prototype.getId);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getGeometryName',
-    ol.Feature.prototype.getGeometryName);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getStyle',
-    ol.Feature.prototype.getStyle);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getStyleFunction',
-    ol.Feature.prototype.getStyleFunction);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'setGeometry',
-    ol.Feature.prototype.setGeometry);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'setStyle',
-    ol.Feature.prototype.setStyle);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'setId',
-    ol.Feature.prototype.setId);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'setGeometryName',
-    ol.Feature.prototype.setGeometryName);
-
-goog.exportSymbol(
-    'ol.featureloader.xhr',
-    ol.featureloader.xhr,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Geolocation',
-    ol.Geolocation,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getAccuracy',
-    ol.Geolocation.prototype.getAccuracy);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getAccuracyGeometry',
-    ol.Geolocation.prototype.getAccuracyGeometry);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getAltitude',
-    ol.Geolocation.prototype.getAltitude);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getAltitudeAccuracy',
-    ol.Geolocation.prototype.getAltitudeAccuracy);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getHeading',
-    ol.Geolocation.prototype.getHeading);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getPosition',
-    ol.Geolocation.prototype.getPosition);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getProjection',
-    ol.Geolocation.prototype.getProjection);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getSpeed',
-    ol.Geolocation.prototype.getSpeed);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getTracking',
-    ol.Geolocation.prototype.getTracking);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getTrackingOptions',
-    ol.Geolocation.prototype.getTrackingOptions);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'setProjection',
-    ol.Geolocation.prototype.setProjection);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'setTracking',
-    ol.Geolocation.prototype.setTracking);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'setTrackingOptions',
-    ol.Geolocation.prototype.setTrackingOptions);
-
-goog.exportSymbol(
-    'ol.Graticule',
-    ol.Graticule,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Graticule.prototype,
-    'getMap',
-    ol.Graticule.prototype.getMap);
-
-goog.exportProperty(
-    ol.Graticule.prototype,
-    'getMeridians',
-    ol.Graticule.prototype.getMeridians);
-
-goog.exportProperty(
-    ol.Graticule.prototype,
-    'getParallels',
-    ol.Graticule.prototype.getParallels);
-
-goog.exportProperty(
-    ol.Graticule.prototype,
-    'setMap',
-    ol.Graticule.prototype.setMap);
-
-goog.exportSymbol(
-    'ol.has.DEVICE_PIXEL_RATIO',
-    ol.has.DEVICE_PIXEL_RATIO,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.has.CANVAS',
-    ol.has.CANVAS,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.has.DEVICE_ORIENTATION',
-    ol.has.DEVICE_ORIENTATION,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.has.GEOLOCATION',
-    ol.has.GEOLOCATION,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.has.TOUCH',
-    ol.has.TOUCH,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.has.WEBGL',
-    ol.has.WEBGL,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Image.prototype,
-    'getImage',
-    ol.Image.prototype.getImage);
-
-goog.exportProperty(
-    ol.Image.prototype,
-    'load',
-    ol.Image.prototype.load);
-
-goog.exportProperty(
-    ol.ImageTile.prototype,
-    'getImage',
-    ol.ImageTile.prototype.getImage);
-
-goog.exportSymbol(
-    'ol.inherits',
-    ol.inherits,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.defaults',
-    ol.interaction.defaults,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Kinetic',
-    ol.Kinetic,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.loadingstrategy.all',
-    ol.loadingstrategy.all,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.loadingstrategy.bbox',
-    ol.loadingstrategy.bbox,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.loadingstrategy.tile',
-    ol.loadingstrategy.tile,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Map',
-    ol.Map,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'addControl',
-    ol.Map.prototype.addControl);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'addInteraction',
-    ol.Map.prototype.addInteraction);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'addLayer',
-    ol.Map.prototype.addLayer);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'addOverlay',
-    ol.Map.prototype.addOverlay);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'forEachFeatureAtPixel',
-    ol.Map.prototype.forEachFeatureAtPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'forEachLayerAtPixel',
-    ol.Map.prototype.forEachLayerAtPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'hasFeatureAtPixel',
-    ol.Map.prototype.hasFeatureAtPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getEventCoordinate',
-    ol.Map.prototype.getEventCoordinate);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getEventPixel',
-    ol.Map.prototype.getEventPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getTarget',
-    ol.Map.prototype.getTarget);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getTargetElement',
-    ol.Map.prototype.getTargetElement);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getCoordinateFromPixel',
-    ol.Map.prototype.getCoordinateFromPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getControls',
-    ol.Map.prototype.getControls);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getOverlays',
-    ol.Map.prototype.getOverlays);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getOverlayById',
-    ol.Map.prototype.getOverlayById);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getInteractions',
-    ol.Map.prototype.getInteractions);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getLayerGroup',
-    ol.Map.prototype.getLayerGroup);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getLayers',
-    ol.Map.prototype.getLayers);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getPixelFromCoordinate',
-    ol.Map.prototype.getPixelFromCoordinate);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getSize',
-    ol.Map.prototype.getSize);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getView',
-    ol.Map.prototype.getView);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getViewport',
-    ol.Map.prototype.getViewport);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'renderSync',
-    ol.Map.prototype.renderSync);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'render',
-    ol.Map.prototype.render);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'removeControl',
-    ol.Map.prototype.removeControl);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'removeInteraction',
-    ol.Map.prototype.removeInteraction);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'removeLayer',
-    ol.Map.prototype.removeLayer);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'removeOverlay',
-    ol.Map.prototype.removeOverlay);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'setLayerGroup',
-    ol.Map.prototype.setLayerGroup);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'setSize',
-    ol.Map.prototype.setSize);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'setTarget',
-    ol.Map.prototype.setTarget);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'setView',
-    ol.Map.prototype.setView);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'updateSize',
-    ol.Map.prototype.updateSize);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'originalEvent',
-    ol.MapBrowserEvent.prototype.originalEvent);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'pixel',
-    ol.MapBrowserEvent.prototype.pixel);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'coordinate',
-    ol.MapBrowserEvent.prototype.coordinate);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'dragging',
-    ol.MapBrowserEvent.prototype.dragging);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'map',
-    ol.MapEvent.prototype.map);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'frameState',
-    ol.MapEvent.prototype.frameState);
-
-goog.exportSymbol(
-    'ol.Object',
-    ol.Object,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'get',
-    ol.Object.prototype.get);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'getKeys',
-    ol.Object.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'getProperties',
-    ol.Object.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'set',
-    ol.Object.prototype.set);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'setProperties',
-    ol.Object.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'unset',
-    ol.Object.prototype.unset);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'key',
-    ol.Object.Event.prototype.key);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'oldValue',
-    ol.Object.Event.prototype.oldValue);
-
-goog.exportSymbol(
-    'ol.Observable',
-    ol.Observable,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Observable.unByKey',
-    ol.Observable.unByKey,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'changed',
-    ol.Observable.prototype.changed);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'dispatchEvent',
-    ol.Observable.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'getRevision',
-    ol.Observable.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'on',
-    ol.Observable.prototype.on);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'once',
-    ol.Observable.prototype.once);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'un',
-    ol.Observable.prototype.un);
-
-goog.exportSymbol(
-    'ol.Overlay',
-    ol.Overlay,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getElement',
-    ol.Overlay.prototype.getElement);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getId',
-    ol.Overlay.prototype.getId);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getMap',
-    ol.Overlay.prototype.getMap);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getOffset',
-    ol.Overlay.prototype.getOffset);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getPosition',
-    ol.Overlay.prototype.getPosition);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getPositioning',
-    ol.Overlay.prototype.getPositioning);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setElement',
-    ol.Overlay.prototype.setElement);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setMap',
-    ol.Overlay.prototype.setMap);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setOffset',
-    ol.Overlay.prototype.setOffset);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setPosition',
-    ol.Overlay.prototype.setPosition);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setPositioning',
-    ol.Overlay.prototype.setPositioning);
-
-goog.exportSymbol(
-    'ol.proj.METERS_PER_UNIT',
-    ol.proj.METERS_PER_UNIT,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.setProj4',
-    ol.proj.setProj4,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.getPointResolution',
-    ol.proj.getPointResolution,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.addEquivalentProjections',
-    ol.proj.addEquivalentProjections,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.addProjection',
-    ol.proj.addProjection,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.addCoordinateTransforms',
-    ol.proj.addCoordinateTransforms,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.fromLonLat',
-    ol.proj.fromLonLat,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.toLonLat',
-    ol.proj.toLonLat,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.get',
-    ol.proj.get,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.equivalent',
-    ol.proj.equivalent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.getTransform',
-    ol.proj.getTransform,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.transform',
-    ol.proj.transform,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.transformExtent',
-    ol.proj.transformExtent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.render.toContext',
-    ol.render.toContext,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.size.toSize',
-    ol.size.toSize,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Sphere',
-    ol.Sphere,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Sphere.prototype,
-    'geodesicArea',
-    ol.Sphere.prototype.geodesicArea);
-
-goog.exportProperty(
-    ol.Sphere.prototype,
-    'haversineDistance',
-    ol.Sphere.prototype.haversineDistance);
-
-goog.exportProperty(
-    ol.Tile.prototype,
-    'getTileCoord',
-    ol.Tile.prototype.getTileCoord);
-
-goog.exportProperty(
-    ol.Tile.prototype,
-    'load',
-    ol.Tile.prototype.load);
-
-goog.exportSymbol(
-    'ol.tilegrid.createXYZ',
-    ol.tilegrid.createXYZ,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'getFormat',
-    ol.VectorTile.prototype.getFormat);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'getFeatures',
-    ol.VectorTile.prototype.getFeatures);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'getProjection',
-    ol.VectorTile.prototype.getProjection);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'setFeatures',
-    ol.VectorTile.prototype.setFeatures);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'setProjection',
-    ol.VectorTile.prototype.setProjection);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'setLoader',
-    ol.VectorTile.prototype.setLoader);
-
-goog.exportSymbol(
-    'ol.View',
-    ol.View,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'animate',
-    ol.View.prototype.animate);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getAnimating',
-    ol.View.prototype.getAnimating);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getInteracting',
-    ol.View.prototype.getInteracting);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'cancelAnimations',
-    ol.View.prototype.cancelAnimations);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'constrainCenter',
-    ol.View.prototype.constrainCenter);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'constrainResolution',
-    ol.View.prototype.constrainResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'constrainRotation',
-    ol.View.prototype.constrainRotation);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getCenter',
-    ol.View.prototype.getCenter);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'calculateExtent',
-    ol.View.prototype.calculateExtent);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getMaxResolution',
-    ol.View.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getMinResolution',
-    ol.View.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getMaxZoom',
-    ol.View.prototype.getMaxZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setMaxZoom',
-    ol.View.prototype.setMaxZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getMinZoom',
-    ol.View.prototype.getMinZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setMinZoom',
-    ol.View.prototype.setMinZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getProjection',
-    ol.View.prototype.getProjection);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getResolution',
-    ol.View.prototype.getResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getResolutions',
-    ol.View.prototype.getResolutions);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getResolutionForExtent',
-    ol.View.prototype.getResolutionForExtent);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getRotation',
-    ol.View.prototype.getRotation);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getZoom',
-    ol.View.prototype.getZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getZoomForResolution',
-    ol.View.prototype.getZoomForResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'fit',
-    ol.View.prototype.fit);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'centerOn',
-    ol.View.prototype.centerOn);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'rotate',
-    ol.View.prototype.rotate);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setCenter',
-    ol.View.prototype.setCenter);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setResolution',
-    ol.View.prototype.setResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setRotation',
-    ol.View.prototype.setRotation);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setZoom',
-    ol.View.prototype.setZoom);
-
-goog.exportSymbol(
-    'ol.xml.getAllTextContent',
-    ol.xml.getAllTextContent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.xml.parse',
-    ol.xml.parse,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.webgl.Context.prototype,
-    'getGL',
-    ol.webgl.Context.prototype.getGL);
-
-goog.exportProperty(
-    ol.webgl.Context.prototype,
-    'useProgram',
-    ol.webgl.Context.prototype.useProgram);
-
-goog.exportSymbol(
-    'ol.tilegrid.TileGrid',
-    ol.tilegrid.TileGrid,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'forEachTileCoord',
-    ol.tilegrid.TileGrid.prototype.forEachTileCoord);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getMaxZoom',
-    ol.tilegrid.TileGrid.prototype.getMaxZoom);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getMinZoom',
-    ol.tilegrid.TileGrid.prototype.getMinZoom);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getOrigin',
-    ol.tilegrid.TileGrid.prototype.getOrigin);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getResolution',
-    ol.tilegrid.TileGrid.prototype.getResolution);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getResolutions',
-    ol.tilegrid.TileGrid.prototype.getResolutions);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getTileCoordExtent',
-    ol.tilegrid.TileGrid.prototype.getTileCoordExtent);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getTileCoordForCoordAndResolution',
-    ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndResolution);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getTileCoordForCoordAndZ',
-    ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndZ);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getTileSize',
-    ol.tilegrid.TileGrid.prototype.getTileSize);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getZForResolution',
-    ol.tilegrid.TileGrid.prototype.getZForResolution);
-
-goog.exportSymbol(
-    'ol.tilegrid.WMTS',
-    ol.tilegrid.WMTS,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getMatrixIds',
-    ol.tilegrid.WMTS.prototype.getMatrixIds);
-
-goog.exportSymbol(
-    'ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet',
-    ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.style.AtlasManager',
-    ol.style.AtlasManager,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.style.Circle',
-    ol.style.Circle,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'setRadius',
-    ol.style.Circle.prototype.setRadius);
-
-goog.exportSymbol(
-    'ol.style.Fill',
-    ol.style.Fill,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Fill.prototype,
-    'clone',
-    ol.style.Fill.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Fill.prototype,
-    'getColor',
-    ol.style.Fill.prototype.getColor);
-
-goog.exportProperty(
-    ol.style.Fill.prototype,
-    'setColor',
-    ol.style.Fill.prototype.setColor);
-
-goog.exportSymbol(
-    'ol.style.Icon',
-    ol.style.Icon,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'clone',
-    ol.style.Icon.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getAnchor',
-    ol.style.Icon.prototype.getAnchor);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getColor',
-    ol.style.Icon.prototype.getColor);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getImage',
-    ol.style.Icon.prototype.getImage);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getOrigin',
-    ol.style.Icon.prototype.getOrigin);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getSrc',
-    ol.style.Icon.prototype.getSrc);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getSize',
-    ol.style.Icon.prototype.getSize);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'load',
-    ol.style.Icon.prototype.load);
-
-goog.exportSymbol(
-    'ol.style.Image',
-    ol.style.Image,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'getOpacity',
-    ol.style.Image.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'getRotateWithView',
-    ol.style.Image.prototype.getRotateWithView);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'getRotation',
-    ol.style.Image.prototype.getRotation);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'getScale',
-    ol.style.Image.prototype.getScale);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'getSnapToPixel',
-    ol.style.Image.prototype.getSnapToPixel);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'setOpacity',
-    ol.style.Image.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'setRotation',
-    ol.style.Image.prototype.setRotation);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'setScale',
-    ol.style.Image.prototype.setScale);
-
-goog.exportSymbol(
-    'ol.style.RegularShape',
-    ol.style.RegularShape,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'clone',
-    ol.style.RegularShape.prototype.clone);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getAnchor',
-    ol.style.RegularShape.prototype.getAnchor);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getAngle',
-    ol.style.RegularShape.prototype.getAngle);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getFill',
-    ol.style.RegularShape.prototype.getFill);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getImage',
-    ol.style.RegularShape.prototype.getImage);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getOrigin',
-    ol.style.RegularShape.prototype.getOrigin);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getPoints',
-    ol.style.RegularShape.prototype.getPoints);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getRadius',
-    ol.style.RegularShape.prototype.getRadius);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getRadius2',
-    ol.style.RegularShape.prototype.getRadius2);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getSize',
-    ol.style.RegularShape.prototype.getSize);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getStroke',
-    ol.style.RegularShape.prototype.getStroke);
-
-goog.exportSymbol(
-    'ol.style.Stroke',
-    ol.style.Stroke,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'clone',
-    ol.style.Stroke.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getColor',
-    ol.style.Stroke.prototype.getColor);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getLineCap',
-    ol.style.Stroke.prototype.getLineCap);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getLineDash',
-    ol.style.Stroke.prototype.getLineDash);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getLineDashOffset',
-    ol.style.Stroke.prototype.getLineDashOffset);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getLineJoin',
-    ol.style.Stroke.prototype.getLineJoin);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getMiterLimit',
-    ol.style.Stroke.prototype.getMiterLimit);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getWidth',
-    ol.style.Stroke.prototype.getWidth);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setColor',
-    ol.style.Stroke.prototype.setColor);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setLineCap',
-    ol.style.Stroke.prototype.setLineCap);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setLineDash',
-    ol.style.Stroke.prototype.setLineDash);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setLineDashOffset',
-    ol.style.Stroke.prototype.setLineDashOffset);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setLineJoin',
-    ol.style.Stroke.prototype.setLineJoin);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setMiterLimit',
-    ol.style.Stroke.prototype.setMiterLimit);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setWidth',
-    ol.style.Stroke.prototype.setWidth);
-
-goog.exportSymbol(
-    'ol.style.Style',
-    ol.style.Style,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'clone',
-    ol.style.Style.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getGeometry',
-    ol.style.Style.prototype.getGeometry);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getGeometryFunction',
-    ol.style.Style.prototype.getGeometryFunction);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getFill',
-    ol.style.Style.prototype.getFill);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setFill',
-    ol.style.Style.prototype.setFill);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getImage',
-    ol.style.Style.prototype.getImage);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setImage',
-    ol.style.Style.prototype.setImage);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getStroke',
-    ol.style.Style.prototype.getStroke);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setStroke',
-    ol.style.Style.prototype.setStroke);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getText',
-    ol.style.Style.prototype.getText);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setText',
-    ol.style.Style.prototype.setText);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getZIndex',
-    ol.style.Style.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setGeometry',
-    ol.style.Style.prototype.setGeometry);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setZIndex',
-    ol.style.Style.prototype.setZIndex);
-
-goog.exportSymbol(
-    'ol.style.Text',
-    ol.style.Text,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'clone',
-    ol.style.Text.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getFont',
-    ol.style.Text.prototype.getFont);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getOffsetX',
-    ol.style.Text.prototype.getOffsetX);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getOffsetY',
-    ol.style.Text.prototype.getOffsetY);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getFill',
-    ol.style.Text.prototype.getFill);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getRotateWithView',
-    ol.style.Text.prototype.getRotateWithView);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getRotation',
-    ol.style.Text.prototype.getRotation);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getScale',
-    ol.style.Text.prototype.getScale);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getStroke',
-    ol.style.Text.prototype.getStroke);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getText',
-    ol.style.Text.prototype.getText);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getTextAlign',
-    ol.style.Text.prototype.getTextAlign);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getTextBaseline',
-    ol.style.Text.prototype.getTextBaseline);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setFont',
-    ol.style.Text.prototype.setFont);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setOffsetX',
-    ol.style.Text.prototype.setOffsetX);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setOffsetY',
-    ol.style.Text.prototype.setOffsetY);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setFill',
-    ol.style.Text.prototype.setFill);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setRotation',
-    ol.style.Text.prototype.setRotation);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setScale',
-    ol.style.Text.prototype.setScale);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setStroke',
-    ol.style.Text.prototype.setStroke);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setText',
-    ol.style.Text.prototype.setText);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setTextAlign',
-    ol.style.Text.prototype.setTextAlign);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setTextBaseline',
-    ol.style.Text.prototype.setTextBaseline);
-
-goog.exportSymbol(
-    'ol.source.BingMaps',
-    ol.source.BingMaps,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.BingMaps.TOS_ATTRIBUTION',
-    ol.source.BingMaps.TOS_ATTRIBUTION,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getApiKey',
-    ol.source.BingMaps.prototype.getApiKey);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getImagerySet',
-    ol.source.BingMaps.prototype.getImagerySet);
-
-goog.exportSymbol(
-    'ol.source.CartoDB',
-    ol.source.CartoDB,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getConfig',
-    ol.source.CartoDB.prototype.getConfig);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'updateConfig',
-    ol.source.CartoDB.prototype.updateConfig);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setConfig',
-    ol.source.CartoDB.prototype.setConfig);
-
-goog.exportSymbol(
-    'ol.source.Cluster',
-    ol.source.Cluster,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getDistance',
-    ol.source.Cluster.prototype.getDistance);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getSource',
-    ol.source.Cluster.prototype.getSource);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'setDistance',
-    ol.source.Cluster.prototype.setDistance);
-
-goog.exportSymbol(
-    'ol.source.Image',
-    ol.source.Image,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Image.Event.prototype,
-    'image',
-    ol.source.Image.Event.prototype.image);
-
-goog.exportSymbol(
-    'ol.source.ImageArcGISRest',
-    ol.source.ImageArcGISRest,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getParams',
-    ol.source.ImageArcGISRest.prototype.getParams);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getImageLoadFunction',
-    ol.source.ImageArcGISRest.prototype.getImageLoadFunction);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getUrl',
-    ol.source.ImageArcGISRest.prototype.getUrl);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'setImageLoadFunction',
-    ol.source.ImageArcGISRest.prototype.setImageLoadFunction);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'setUrl',
-    ol.source.ImageArcGISRest.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'updateParams',
-    ol.source.ImageArcGISRest.prototype.updateParams);
-
-goog.exportSymbol(
-    'ol.source.ImageCanvas',
-    ol.source.ImageCanvas,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.ImageMapGuide',
-    ol.source.ImageMapGuide,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getParams',
-    ol.source.ImageMapGuide.prototype.getParams);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getImageLoadFunction',
-    ol.source.ImageMapGuide.prototype.getImageLoadFunction);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'updateParams',
-    ol.source.ImageMapGuide.prototype.updateParams);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'setImageLoadFunction',
-    ol.source.ImageMapGuide.prototype.setImageLoadFunction);
-
-goog.exportSymbol(
-    'ol.source.ImageStatic',
-    ol.source.ImageStatic,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.ImageVector',
-    ol.source.ImageVector,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getSource',
-    ol.source.ImageVector.prototype.getSource);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getStyle',
-    ol.source.ImageVector.prototype.getStyle);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getStyleFunction',
-    ol.source.ImageVector.prototype.getStyleFunction);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'setStyle',
-    ol.source.ImageVector.prototype.setStyle);
-
-goog.exportSymbol(
-    'ol.source.ImageWMS',
-    ol.source.ImageWMS,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getGetFeatureInfoUrl',
-    ol.source.ImageWMS.prototype.getGetFeatureInfoUrl);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getParams',
-    ol.source.ImageWMS.prototype.getParams);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getImageLoadFunction',
-    ol.source.ImageWMS.prototype.getImageLoadFunction);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getUrl',
-    ol.source.ImageWMS.prototype.getUrl);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'setImageLoadFunction',
-    ol.source.ImageWMS.prototype.setImageLoadFunction);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'setUrl',
-    ol.source.ImageWMS.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'updateParams',
-    ol.source.ImageWMS.prototype.updateParams);
-
-goog.exportSymbol(
-    'ol.source.OSM',
-    ol.source.OSM,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.OSM.ATTRIBUTION',
-    ol.source.OSM.ATTRIBUTION,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.Raster',
-    ol.source.Raster,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'setOperation',
-    ol.source.Raster.prototype.setOperation);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'extent',
-    ol.source.Raster.Event.prototype.extent);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'resolution',
-    ol.source.Raster.Event.prototype.resolution);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'data',
-    ol.source.Raster.Event.prototype.data);
-
-goog.exportSymbol(
-    'ol.source.Source',
-    ol.source.Source,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getAttributions',
-    ol.source.Source.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getLogo',
-    ol.source.Source.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getProjection',
-    ol.source.Source.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getState',
-    ol.source.Source.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'refresh',
-    ol.source.Source.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'setAttributions',
-    ol.source.Source.prototype.setAttributions);
-
-goog.exportSymbol(
-    'ol.source.Stamen',
-    ol.source.Stamen,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.Tile',
-    ol.source.Tile,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getTileGrid',
-    ol.source.Tile.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.Tile.Event.prototype,
-    'tile',
-    ol.source.Tile.Event.prototype.tile);
-
-goog.exportSymbol(
-    'ol.source.TileArcGISRest',
-    ol.source.TileArcGISRest,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getParams',
-    ol.source.TileArcGISRest.prototype.getParams);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'updateParams',
-    ol.source.TileArcGISRest.prototype.updateParams);
-
-goog.exportSymbol(
-    'ol.source.TileDebug',
-    ol.source.TileDebug,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.TileImage',
-    ol.source.TileImage,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.TileImage.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setTileGridForProjection',
-    ol.source.TileImage.prototype.setTileGridForProjection);
-
-goog.exportSymbol(
-    'ol.source.TileJSON',
-    ol.source.TileJSON,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getTileJSON',
-    ol.source.TileJSON.prototype.getTileJSON);
-
-goog.exportSymbol(
-    'ol.source.TileUTFGrid',
-    ol.source.TileUTFGrid,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getTemplate',
-    ol.source.TileUTFGrid.prototype.getTemplate);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'forDataAtCoordinateAndResolution',
-    ol.source.TileUTFGrid.prototype.forDataAtCoordinateAndResolution);
-
-goog.exportSymbol(
-    'ol.source.TileWMS',
-    ol.source.TileWMS,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getGetFeatureInfoUrl',
-    ol.source.TileWMS.prototype.getGetFeatureInfoUrl);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getParams',
-    ol.source.TileWMS.prototype.getParams);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'updateParams',
-    ol.source.TileWMS.prototype.updateParams);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getTileLoadFunction',
-    ol.source.UrlTile.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getTileUrlFunction',
-    ol.source.UrlTile.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getUrls',
-    ol.source.UrlTile.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setTileLoadFunction',
-    ol.source.UrlTile.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setTileUrlFunction',
-    ol.source.UrlTile.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setUrl',
-    ol.source.UrlTile.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setUrls',
-    ol.source.UrlTile.prototype.setUrls);
-
-goog.exportSymbol(
-    'ol.source.Vector',
-    ol.source.Vector,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'addFeature',
-    ol.source.Vector.prototype.addFeature);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'addFeatures',
-    ol.source.Vector.prototype.addFeatures);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'clear',
-    ol.source.Vector.prototype.clear);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'forEachFeature',
-    ol.source.Vector.prototype.forEachFeature);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'forEachFeatureInExtent',
-    ol.source.Vector.prototype.forEachFeatureInExtent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'forEachFeatureIntersectingExtent',
-    ol.source.Vector.prototype.forEachFeatureIntersectingExtent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFeaturesCollection',
-    ol.source.Vector.prototype.getFeaturesCollection);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFeatures',
-    ol.source.Vector.prototype.getFeatures);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFeaturesAtCoordinate',
-    ol.source.Vector.prototype.getFeaturesAtCoordinate);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFeaturesInExtent',
-    ol.source.Vector.prototype.getFeaturesInExtent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getClosestFeatureToCoordinate',
-    ol.source.Vector.prototype.getClosestFeatureToCoordinate);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getExtent',
-    ol.source.Vector.prototype.getExtent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFeatureById',
-    ol.source.Vector.prototype.getFeatureById);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFormat',
-    ol.source.Vector.prototype.getFormat);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getUrl',
-    ol.source.Vector.prototype.getUrl);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'removeFeature',
-    ol.source.Vector.prototype.removeFeature);
-
-goog.exportProperty(
-    ol.source.Vector.Event.prototype,
-    'feature',
-    ol.source.Vector.Event.prototype.feature);
-
-goog.exportSymbol(
-    'ol.source.VectorTile',
-    ol.source.VectorTile,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.WMTS',
-    ol.source.WMTS,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getDimensions',
-    ol.source.WMTS.prototype.getDimensions);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getFormat',
-    ol.source.WMTS.prototype.getFormat);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getLayer',
-    ol.source.WMTS.prototype.getLayer);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getMatrixSet',
-    ol.source.WMTS.prototype.getMatrixSet);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getRequestEncoding',
-    ol.source.WMTS.prototype.getRequestEncoding);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getStyle',
-    ol.source.WMTS.prototype.getStyle);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getVersion',
-    ol.source.WMTS.prototype.getVersion);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'updateDimensions',
-    ol.source.WMTS.prototype.updateDimensions);
-
-goog.exportSymbol(
-    'ol.source.WMTS.optionsFromCapabilities',
-    ol.source.WMTS.optionsFromCapabilities,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.XYZ',
-    ol.source.XYZ,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.Zoomify',
-    ol.source.Zoomify,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'vectorContext',
-    ol.render.Event.prototype.vectorContext);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'frameState',
-    ol.render.Event.prototype.frameState);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'context',
-    ol.render.Event.prototype.context);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'glContext',
-    ol.render.Event.prototype.glContext);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'get',
-    ol.render.Feature.prototype.get);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'getExtent',
-    ol.render.Feature.prototype.getExtent);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'getId',
-    ol.render.Feature.prototype.getId);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'getGeometry',
-    ol.render.Feature.prototype.getGeometry);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'getProperties',
-    ol.render.Feature.prototype.getProperties);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'getType',
-    ol.render.Feature.prototype.getType);
-
-goog.exportSymbol(
-    'ol.render.VectorContext',
-    ol.render.VectorContext,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.render.webgl.Immediate.prototype,
-    'setStyle',
-    ol.render.webgl.Immediate.prototype.setStyle);
-
-goog.exportProperty(
-    ol.render.webgl.Immediate.prototype,
-    'drawGeometry',
-    ol.render.webgl.Immediate.prototype.drawGeometry);
-
-goog.exportProperty(
-    ol.render.webgl.Immediate.prototype,
-    'drawFeature',
-    ol.render.webgl.Immediate.prototype.drawFeature);
-
-goog.exportProperty(
-    ol.render.canvas.Immediate.prototype,
-    'drawCircle',
-    ol.render.canvas.Immediate.prototype.drawCircle);
-
-goog.exportProperty(
-    ol.render.canvas.Immediate.prototype,
-    'setStyle',
-    ol.render.canvas.Immediate.prototype.setStyle);
-
-goog.exportProperty(
-    ol.render.canvas.Immediate.prototype,
-    'drawGeometry',
-    ol.render.canvas.Immediate.prototype.drawGeometry);
-
-goog.exportProperty(
-    ol.render.canvas.Immediate.prototype,
-    'drawFeature',
-    ol.render.canvas.Immediate.prototype.drawFeature);
-
-goog.exportSymbol(
-    'ol.proj.common.add',
-    ol.proj.common.add,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.Projection',
-    ol.proj.Projection,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getCode',
-    ol.proj.Projection.prototype.getCode);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getExtent',
-    ol.proj.Projection.prototype.getExtent);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getUnits',
-    ol.proj.Projection.prototype.getUnits);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getMetersPerUnit',
-    ol.proj.Projection.prototype.getMetersPerUnit);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getWorldExtent',
-    ol.proj.Projection.prototype.getWorldExtent);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'isGlobal',
-    ol.proj.Projection.prototype.isGlobal);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'setGlobal',
-    ol.proj.Projection.prototype.setGlobal);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'setExtent',
-    ol.proj.Projection.prototype.setExtent);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'setWorldExtent',
-    ol.proj.Projection.prototype.setWorldExtent);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'setGetPointResolution',
-    ol.proj.Projection.prototype.setGetPointResolution);
-
-goog.exportSymbol(
-    'ol.proj.Units.METERS_PER_UNIT',
-    ol.proj.Units.METERS_PER_UNIT,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.layer.Base',
-    ol.layer.Base,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getExtent',
-    ol.layer.Base.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getMaxResolution',
-    ol.layer.Base.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getMinResolution',
-    ol.layer.Base.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getOpacity',
-    ol.layer.Base.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getVisible',
-    ol.layer.Base.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getZIndex',
-    ol.layer.Base.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setExtent',
-    ol.layer.Base.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setMaxResolution',
-    ol.layer.Base.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setMinResolution',
-    ol.layer.Base.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setOpacity',
-    ol.layer.Base.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setVisible',
-    ol.layer.Base.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setZIndex',
-    ol.layer.Base.prototype.setZIndex);
-
-goog.exportSymbol(
-    'ol.layer.Group',
-    ol.layer.Group,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getLayers',
-    ol.layer.Group.prototype.getLayers);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setLayers',
-    ol.layer.Group.prototype.setLayers);
-
-goog.exportSymbol(
-    'ol.layer.Heatmap',
-    ol.layer.Heatmap,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getBlur',
-    ol.layer.Heatmap.prototype.getBlur);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getGradient',
-    ol.layer.Heatmap.prototype.getGradient);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getRadius',
-    ol.layer.Heatmap.prototype.getRadius);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setBlur',
-    ol.layer.Heatmap.prototype.setBlur);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setGradient',
-    ol.layer.Heatmap.prototype.setGradient);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setRadius',
-    ol.layer.Heatmap.prototype.setRadius);
-
-goog.exportSymbol(
-    'ol.layer.Image',
-    ol.layer.Image,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getSource',
-    ol.layer.Image.prototype.getSource);
-
-goog.exportSymbol(
-    'ol.layer.Layer',
-    ol.layer.Layer,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getSource',
-    ol.layer.Layer.prototype.getSource);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setMap',
-    ol.layer.Layer.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setSource',
-    ol.layer.Layer.prototype.setSource);
-
-goog.exportSymbol(
-    'ol.layer.Tile',
-    ol.layer.Tile,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getPreload',
-    ol.layer.Tile.prototype.getPreload);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getSource',
-    ol.layer.Tile.prototype.getSource);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setPreload',
-    ol.layer.Tile.prototype.setPreload);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getUseInterimTilesOnError',
-    ol.layer.Tile.prototype.getUseInterimTilesOnError);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setUseInterimTilesOnError',
-    ol.layer.Tile.prototype.setUseInterimTilesOnError);
-
-goog.exportSymbol(
-    'ol.layer.Vector',
-    ol.layer.Vector,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getSource',
-    ol.layer.Vector.prototype.getSource);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getStyle',
-    ol.layer.Vector.prototype.getStyle);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getStyleFunction',
-    ol.layer.Vector.prototype.getStyleFunction);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setStyle',
-    ol.layer.Vector.prototype.setStyle);
-
-goog.exportSymbol(
-    'ol.layer.VectorTile',
-    ol.layer.VectorTile,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getPreload',
-    ol.layer.VectorTile.prototype.getPreload);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getUseInterimTilesOnError',
-    ol.layer.VectorTile.prototype.getUseInterimTilesOnError);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setPreload',
-    ol.layer.VectorTile.prototype.setPreload);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setUseInterimTilesOnError',
-    ol.layer.VectorTile.prototype.setUseInterimTilesOnError);
-
-goog.exportSymbol(
-    'ol.interaction.DoubleClickZoom',
-    ol.interaction.DoubleClickZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DoubleClickZoom.handleEvent',
-    ol.interaction.DoubleClickZoom.handleEvent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DragAndDrop',
-    ol.interaction.DragAndDrop,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DragAndDrop.handleEvent',
-    ol.interaction.DragAndDrop.handleEvent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'features',
-    ol.interaction.DragAndDrop.Event.prototype.features);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'file',
-    ol.interaction.DragAndDrop.Event.prototype.file);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'projection',
-    ol.interaction.DragAndDrop.Event.prototype.projection);
-
-goog.exportSymbol(
-    'ol.interaction.DragBox',
-    ol.interaction.DragBox,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getGeometry',
-    ol.interaction.DragBox.prototype.getGeometry);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'coordinate',
-    ol.interaction.DragBox.Event.prototype.coordinate);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'mapBrowserEvent',
-    ol.interaction.DragBox.Event.prototype.mapBrowserEvent);
-
-goog.exportSymbol(
-    'ol.interaction.DragPan',
-    ol.interaction.DragPan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DragRotate',
-    ol.interaction.DragRotate,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DragRotateAndZoom',
-    ol.interaction.DragRotateAndZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DragZoom',
-    ol.interaction.DragZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Draw',
-    ol.interaction.Draw,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Draw.handleEvent',
-    ol.interaction.Draw.handleEvent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'removeLastPoint',
-    ol.interaction.Draw.prototype.removeLastPoint);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'finishDrawing',
-    ol.interaction.Draw.prototype.finishDrawing);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'extend',
-    ol.interaction.Draw.prototype.extend);
-
-goog.exportSymbol(
-    'ol.interaction.Draw.createRegularPolygon',
-    ol.interaction.Draw.createRegularPolygon,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Draw.createBox',
-    ol.interaction.Draw.createBox,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Draw.Event.prototype,
-    'feature',
-    ol.interaction.Draw.Event.prototype.feature);
-
-goog.exportSymbol(
-    'ol.interaction.Extent',
-    ol.interaction.Extent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getExtent',
-    ol.interaction.Extent.prototype.getExtent);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'setExtent',
-    ol.interaction.Extent.prototype.setExtent);
-
-goog.exportProperty(
-    ol.interaction.Extent.Event.prototype,
-    'extent_',
-    ol.interaction.Extent.Event.prototype.extent_);
-
-goog.exportSymbol(
-    'ol.interaction.Interaction',
-    ol.interaction.Interaction,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'getActive',
-    ol.interaction.Interaction.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'getMap',
-    ol.interaction.Interaction.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'setActive',
-    ol.interaction.Interaction.prototype.setActive);
-
-goog.exportSymbol(
-    'ol.interaction.KeyboardPan',
-    ol.interaction.KeyboardPan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.KeyboardPan.handleEvent',
-    ol.interaction.KeyboardPan.handleEvent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.KeyboardZoom',
-    ol.interaction.KeyboardZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.KeyboardZoom.handleEvent',
-    ol.interaction.KeyboardZoom.handleEvent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Modify',
-    ol.interaction.Modify,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Modify.handleEvent',
-    ol.interaction.Modify.handleEvent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'removePoint',
-    ol.interaction.Modify.prototype.removePoint);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'features',
-    ol.interaction.Modify.Event.prototype.features);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'mapBrowserEvent',
-    ol.interaction.Modify.Event.prototype.mapBrowserEvent);
-
-goog.exportSymbol(
-    'ol.interaction.MouseWheelZoom',
-    ol.interaction.MouseWheelZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.MouseWheelZoom.handleEvent',
-    ol.interaction.MouseWheelZoom.handleEvent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'setMouseAnchor',
-    ol.interaction.MouseWheelZoom.prototype.setMouseAnchor);
-
-goog.exportSymbol(
-    'ol.interaction.PinchRotate',
-    ol.interaction.PinchRotate,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.PinchZoom',
-    ol.interaction.PinchZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Pointer',
-    ol.interaction.Pointer,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Pointer.handleEvent',
-    ol.interaction.Pointer.handleEvent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Select',
-    ol.interaction.Select,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getFeatures',
-    ol.interaction.Select.prototype.getFeatures);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getHitTolerance',
-    ol.interaction.Select.prototype.getHitTolerance);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getLayer',
-    ol.interaction.Select.prototype.getLayer);
-
-goog.exportSymbol(
-    'ol.interaction.Select.handleEvent',
-    ol.interaction.Select.handleEvent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'setHitTolerance',
-    ol.interaction.Select.prototype.setHitTolerance);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'setMap',
-    ol.interaction.Select.prototype.setMap);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'selected',
-    ol.interaction.Select.Event.prototype.selected);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'deselected',
-    ol.interaction.Select.Event.prototype.deselected);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'mapBrowserEvent',
-    ol.interaction.Select.Event.prototype.mapBrowserEvent);
-
-goog.exportSymbol(
-    'ol.interaction.Snap',
-    ol.interaction.Snap,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'addFeature',
-    ol.interaction.Snap.prototype.addFeature);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'removeFeature',
-    ol.interaction.Snap.prototype.removeFeature);
-
-goog.exportSymbol(
-    'ol.interaction.Translate',
-    ol.interaction.Translate,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getHitTolerance',
-    ol.interaction.Translate.prototype.getHitTolerance);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'setHitTolerance',
-    ol.interaction.Translate.prototype.setHitTolerance);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'features',
-    ol.interaction.Translate.Event.prototype.features);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'coordinate',
-    ol.interaction.Translate.Event.prototype.coordinate);
-
-goog.exportSymbol(
-    'ol.geom.Circle',
-    ol.geom.Circle,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'clone',
-    ol.geom.Circle.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getCenter',
-    ol.geom.Circle.prototype.getCenter);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getRadius',
-    ol.geom.Circle.prototype.getRadius);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getType',
-    ol.geom.Circle.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'intersectsExtent',
-    ol.geom.Circle.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'setCenter',
-    ol.geom.Circle.prototype.setCenter);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'setCenterAndRadius',
-    ol.geom.Circle.prototype.setCenterAndRadius);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'setRadius',
-    ol.geom.Circle.prototype.setRadius);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'transform',
-    ol.geom.Circle.prototype.transform);
-
-goog.exportSymbol(
-    'ol.geom.Geometry',
-    ol.geom.Geometry,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'getClosestPoint',
-    ol.geom.Geometry.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'intersectsCoordinate',
-    ol.geom.Geometry.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'getExtent',
-    ol.geom.Geometry.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'rotate',
-    ol.geom.Geometry.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'scale',
-    ol.geom.Geometry.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'simplify',
-    ol.geom.Geometry.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'transform',
-    ol.geom.Geometry.prototype.transform);
-
-goog.exportSymbol(
-    'ol.geom.GeometryCollection',
-    ol.geom.GeometryCollection,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'clone',
-    ol.geom.GeometryCollection.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getGeometries',
-    ol.geom.GeometryCollection.prototype.getGeometries);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getType',
-    ol.geom.GeometryCollection.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'intersectsExtent',
-    ol.geom.GeometryCollection.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'setGeometries',
-    ol.geom.GeometryCollection.prototype.setGeometries);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'applyTransform',
-    ol.geom.GeometryCollection.prototype.applyTransform);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'translate',
-    ol.geom.GeometryCollection.prototype.translate);
-
-goog.exportSymbol(
-    'ol.geom.LinearRing',
-    ol.geom.LinearRing,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'clone',
-    ol.geom.LinearRing.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getArea',
-    ol.geom.LinearRing.prototype.getArea);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getCoordinates',
-    ol.geom.LinearRing.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getType',
-    ol.geom.LinearRing.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'setCoordinates',
-    ol.geom.LinearRing.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.LineString',
-    ol.geom.LineString,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'appendCoordinate',
-    ol.geom.LineString.prototype.appendCoordinate);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'clone',
-    ol.geom.LineString.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'forEachSegment',
-    ol.geom.LineString.prototype.forEachSegment);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getCoordinateAtM',
-    ol.geom.LineString.prototype.getCoordinateAtM);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getCoordinates',
-    ol.geom.LineString.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getCoordinateAt',
-    ol.geom.LineString.prototype.getCoordinateAt);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getLength',
-    ol.geom.LineString.prototype.getLength);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getType',
-    ol.geom.LineString.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'intersectsExtent',
-    ol.geom.LineString.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'setCoordinates',
-    ol.geom.LineString.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.MultiLineString',
-    ol.geom.MultiLineString,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'appendLineString',
-    ol.geom.MultiLineString.prototype.appendLineString);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'clone',
-    ol.geom.MultiLineString.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getCoordinateAtM',
-    ol.geom.MultiLineString.prototype.getCoordinateAtM);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getCoordinates',
-    ol.geom.MultiLineString.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getLineString',
-    ol.geom.MultiLineString.prototype.getLineString);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getLineStrings',
-    ol.geom.MultiLineString.prototype.getLineStrings);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getType',
-    ol.geom.MultiLineString.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'intersectsExtent',
-    ol.geom.MultiLineString.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'setCoordinates',
-    ol.geom.MultiLineString.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.MultiPoint',
-    ol.geom.MultiPoint,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'appendPoint',
-    ol.geom.MultiPoint.prototype.appendPoint);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'clone',
-    ol.geom.MultiPoint.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getCoordinates',
-    ol.geom.MultiPoint.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getPoint',
-    ol.geom.MultiPoint.prototype.getPoint);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getPoints',
-    ol.geom.MultiPoint.prototype.getPoints);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getType',
-    ol.geom.MultiPoint.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'intersectsExtent',
-    ol.geom.MultiPoint.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'setCoordinates',
-    ol.geom.MultiPoint.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.MultiPolygon',
-    ol.geom.MultiPolygon,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'appendPolygon',
-    ol.geom.MultiPolygon.prototype.appendPolygon);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'clone',
-    ol.geom.MultiPolygon.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getArea',
-    ol.geom.MultiPolygon.prototype.getArea);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getCoordinates',
-    ol.geom.MultiPolygon.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getInteriorPoints',
-    ol.geom.MultiPolygon.prototype.getInteriorPoints);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getPolygon',
-    ol.geom.MultiPolygon.prototype.getPolygon);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getPolygons',
-    ol.geom.MultiPolygon.prototype.getPolygons);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getType',
-    ol.geom.MultiPolygon.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'intersectsExtent',
-    ol.geom.MultiPolygon.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'setCoordinates',
-    ol.geom.MultiPolygon.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.Point',
-    ol.geom.Point,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'clone',
-    ol.geom.Point.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getCoordinates',
-    ol.geom.Point.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getType',
-    ol.geom.Point.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'intersectsExtent',
-    ol.geom.Point.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'setCoordinates',
-    ol.geom.Point.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.Polygon',
-    ol.geom.Polygon,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'appendLinearRing',
-    ol.geom.Polygon.prototype.appendLinearRing);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'clone',
-    ol.geom.Polygon.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getArea',
-    ol.geom.Polygon.prototype.getArea);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getCoordinates',
-    ol.geom.Polygon.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getInteriorPoint',
-    ol.geom.Polygon.prototype.getInteriorPoint);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getLinearRingCount',
-    ol.geom.Polygon.prototype.getLinearRingCount);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getLinearRing',
-    ol.geom.Polygon.prototype.getLinearRing);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getLinearRings',
-    ol.geom.Polygon.prototype.getLinearRings);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getType',
-    ol.geom.Polygon.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'intersectsExtent',
-    ol.geom.Polygon.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'setCoordinates',
-    ol.geom.Polygon.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.Polygon.circular',
-    ol.geom.Polygon.circular,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.geom.Polygon.fromExtent',
-    ol.geom.Polygon.fromExtent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.geom.Polygon.fromCircle',
-    ol.geom.Polygon.fromCircle,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.geom.SimpleGeometry',
-    ol.geom.SimpleGeometry,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getFirstCoordinate',
-    ol.geom.SimpleGeometry.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getLastCoordinate',
-    ol.geom.SimpleGeometry.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getLayout',
-    ol.geom.SimpleGeometry.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'applyTransform',
-    ol.geom.SimpleGeometry.prototype.applyTransform);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'translate',
-    ol.geom.SimpleGeometry.prototype.translate);
-
-goog.exportSymbol(
-    'ol.format.EsriJSON',
-    ol.format.EsriJSON,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'readFeature',
-    ol.format.EsriJSON.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'readFeatures',
-    ol.format.EsriJSON.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'readGeometry',
-    ol.format.EsriJSON.prototype.readGeometry);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'readProjection',
-    ol.format.EsriJSON.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeGeometry',
-    ol.format.EsriJSON.prototype.writeGeometry);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeGeometryObject',
-    ol.format.EsriJSON.prototype.writeGeometryObject);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeFeature',
-    ol.format.EsriJSON.prototype.writeFeature);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeFeatureObject',
-    ol.format.EsriJSON.prototype.writeFeatureObject);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeFeatures',
-    ol.format.EsriJSON.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeFeaturesObject',
-    ol.format.EsriJSON.prototype.writeFeaturesObject);
-
-goog.exportSymbol(
-    'ol.format.Feature',
-    ol.format.Feature,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.and',
-    ol.format.filter.and,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.or',
-    ol.format.filter.or,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.not',
-    ol.format.filter.not,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.bbox',
-    ol.format.filter.bbox,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.intersects',
-    ol.format.filter.intersects,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.within',
-    ol.format.filter.within,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.equalTo',
-    ol.format.filter.equalTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.notEqualTo',
-    ol.format.filter.notEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.lessThan',
-    ol.format.filter.lessThan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.lessThanOrEqualTo',
-    ol.format.filter.lessThanOrEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.greaterThan',
-    ol.format.filter.greaterThan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.greaterThanOrEqualTo',
-    ol.format.filter.greaterThanOrEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.isNull',
-    ol.format.filter.isNull,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.between',
-    ol.format.filter.between,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.like',
-    ol.format.filter.like,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.during',
-    ol.format.filter.during,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.GeoJSON',
-    ol.format.GeoJSON,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'readFeature',
-    ol.format.GeoJSON.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'readFeatures',
-    ol.format.GeoJSON.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'readGeometry',
-    ol.format.GeoJSON.prototype.readGeometry);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'readProjection',
-    ol.format.GeoJSON.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeFeature',
-    ol.format.GeoJSON.prototype.writeFeature);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeFeatureObject',
-    ol.format.GeoJSON.prototype.writeFeatureObject);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeFeatures',
-    ol.format.GeoJSON.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeFeaturesObject',
-    ol.format.GeoJSON.prototype.writeFeaturesObject);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeGeometry',
-    ol.format.GeoJSON.prototype.writeGeometry);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeGeometryObject',
-    ol.format.GeoJSON.prototype.writeGeometryObject);
-
-goog.exportSymbol(
-    'ol.format.GML',
-    ol.format.GML,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.GML.prototype,
-    'writeFeatures',
-    ol.format.GML.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.GML.prototype,
-    'writeFeaturesNode',
-    ol.format.GML.prototype.writeFeaturesNode);
-
-goog.exportSymbol(
-    'ol.format.GML2',
-    ol.format.GML2,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.GML3',
-    ol.format.GML3,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.GML3.prototype,
-    'writeGeometryNode',
-    ol.format.GML3.prototype.writeGeometryNode);
-
-goog.exportProperty(
-    ol.format.GML3.prototype,
-    'writeFeatures',
-    ol.format.GML3.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.GML3.prototype,
-    'writeFeaturesNode',
-    ol.format.GML3.prototype.writeFeaturesNode);
-
-goog.exportProperty(
-    ol.format.GMLBase.prototype,
-    'readFeatures',
-    ol.format.GMLBase.prototype.readFeatures);
-
-goog.exportSymbol(
-    'ol.format.GPX',
-    ol.format.GPX,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.GPX.prototype,
-    'readFeature',
-    ol.format.GPX.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.GPX.prototype,
-    'readFeatures',
-    ol.format.GPX.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.GPX.prototype,
-    'readProjection',
-    ol.format.GPX.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.GPX.prototype,
-    'writeFeatures',
-    ol.format.GPX.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.GPX.prototype,
-    'writeFeaturesNode',
-    ol.format.GPX.prototype.writeFeaturesNode);
-
-goog.exportSymbol(
-    'ol.format.IGC',
-    ol.format.IGC,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.IGC.prototype,
-    'readFeature',
-    ol.format.IGC.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.IGC.prototype,
-    'readFeatures',
-    ol.format.IGC.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.IGC.prototype,
-    'readProjection',
-    ol.format.IGC.prototype.readProjection);
-
-goog.exportSymbol(
-    'ol.format.KML',
-    ol.format.KML,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readFeature',
-    ol.format.KML.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readFeatures',
-    ol.format.KML.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readName',
-    ol.format.KML.prototype.readName);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readNetworkLinks',
-    ol.format.KML.prototype.readNetworkLinks);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readRegion',
-    ol.format.KML.prototype.readRegion);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readRegionFromNode',
-    ol.format.KML.prototype.readRegionFromNode);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readProjection',
-    ol.format.KML.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'writeFeatures',
-    ol.format.KML.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'writeFeaturesNode',
-    ol.format.KML.prototype.writeFeaturesNode);
-
-goog.exportSymbol(
-    'ol.format.MVT',
-    ol.format.MVT,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.MVT.prototype,
-    'readFeatures',
-    ol.format.MVT.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.MVT.prototype,
-    'readProjection',
-    ol.format.MVT.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.MVT.prototype,
-    'setLayers',
-    ol.format.MVT.prototype.setLayers);
-
-goog.exportSymbol(
-    'ol.format.OSMXML',
-    ol.format.OSMXML,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.OSMXML.prototype,
-    'readFeatures',
-    ol.format.OSMXML.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.OSMXML.prototype,
-    'readProjection',
-    ol.format.OSMXML.prototype.readProjection);
-
-goog.exportSymbol(
-    'ol.format.Polyline',
-    ol.format.Polyline,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.Polyline.encodeDeltas',
-    ol.format.Polyline.encodeDeltas,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.Polyline.decodeDeltas',
-    ol.format.Polyline.decodeDeltas,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.Polyline.encodeFloats',
-    ol.format.Polyline.encodeFloats,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.Polyline.decodeFloats',
-    ol.format.Polyline.decodeFloats,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.Polyline.prototype,
-    'readFeature',
-    ol.format.Polyline.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.Polyline.prototype,
-    'readFeatures',
-    ol.format.Polyline.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.Polyline.prototype,
-    'readGeometry',
-    ol.format.Polyline.prototype.readGeometry);
-
-goog.exportProperty(
-    ol.format.Polyline.prototype,
-    'readProjection',
-    ol.format.Polyline.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.Polyline.prototype,
-    'writeGeometry',
-    ol.format.Polyline.prototype.writeGeometry);
-
-goog.exportSymbol(
-    'ol.format.TopoJSON',
-    ol.format.TopoJSON,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.TopoJSON.prototype,
-    'readFeatures',
-    ol.format.TopoJSON.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.TopoJSON.prototype,
-    'readProjection',
-    ol.format.TopoJSON.prototype.readProjection);
-
-goog.exportSymbol(
-    'ol.format.WFS',
-    ol.format.WFS,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'readFeatures',
-    ol.format.WFS.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'readTransactionResponse',
-    ol.format.WFS.prototype.readTransactionResponse);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'readFeatureCollectionMetadata',
-    ol.format.WFS.prototype.readFeatureCollectionMetadata);
-
-goog.exportSymbol(
-    'ol.format.WFS.writeFilter',
-    ol.format.WFS.writeFilter,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'writeGetFeature',
-    ol.format.WFS.prototype.writeGetFeature);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'writeTransaction',
-    ol.format.WFS.prototype.writeTransaction);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'readProjection',
-    ol.format.WFS.prototype.readProjection);
-
-goog.exportSymbol(
-    'ol.format.WKT',
-    ol.format.WKT,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'readFeature',
-    ol.format.WKT.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'readFeatures',
-    ol.format.WKT.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'readGeometry',
-    ol.format.WKT.prototype.readGeometry);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'writeFeature',
-    ol.format.WKT.prototype.writeFeature);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'writeFeatures',
-    ol.format.WKT.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'writeGeometry',
-    ol.format.WKT.prototype.writeGeometry);
-
-goog.exportSymbol(
-    'ol.format.WMSCapabilities',
-    ol.format.WMSCapabilities,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WMSCapabilities.prototype,
-    'read',
-    ol.format.WMSCapabilities.prototype.read);
-
-goog.exportSymbol(
-    'ol.format.WMSGetFeatureInfo',
-    ol.format.WMSGetFeatureInfo,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WMSGetFeatureInfo.prototype,
-    'readFeatures',
-    ol.format.WMSGetFeatureInfo.prototype.readFeatures);
-
-goog.exportSymbol(
-    'ol.format.WMTSCapabilities',
-    ol.format.WMTSCapabilities,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WMTSCapabilities.prototype,
-    'read',
-    ol.format.WMTSCapabilities.prototype.read);
-
-goog.exportSymbol(
-    'ol.format.filter.And',
-    ol.format.filter.And,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Bbox',
-    ol.format.filter.Bbox,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Comparison',
-    ol.format.filter.Comparison,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.ComparisonBinary',
-    ol.format.filter.ComparisonBinary,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.During',
-    ol.format.filter.During,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.EqualTo',
-    ol.format.filter.EqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Filter',
-    ol.format.filter.Filter,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.GreaterThan',
-    ol.format.filter.GreaterThan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.GreaterThanOrEqualTo',
-    ol.format.filter.GreaterThanOrEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Intersects',
-    ol.format.filter.Intersects,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.IsBetween',
-    ol.format.filter.IsBetween,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.IsLike',
-    ol.format.filter.IsLike,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.IsNull',
-    ol.format.filter.IsNull,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.LessThan',
-    ol.format.filter.LessThan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.LessThanOrEqualTo',
-    ol.format.filter.LessThanOrEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Not',
-    ol.format.filter.Not,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.NotEqualTo',
-    ol.format.filter.NotEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Or',
-    ol.format.filter.Or,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Spatial',
-    ol.format.filter.Spatial,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Within',
-    ol.format.filter.Within,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.altKeyOnly',
-    ol.events.condition.altKeyOnly,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.altShiftKeysOnly',
-    ol.events.condition.altShiftKeysOnly,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.always',
-    ol.events.condition.always,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.click',
-    ol.events.condition.click,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.never',
-    ol.events.condition.never,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.pointerMove',
-    ol.events.condition.pointerMove,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.singleClick',
-    ol.events.condition.singleClick,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.doubleClick',
-    ol.events.condition.doubleClick,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.noModifierKeys',
-    ol.events.condition.noModifierKeys,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.platformModifierKeyOnly',
-    ol.events.condition.platformModifierKeyOnly,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.shiftKeyOnly',
-    ol.events.condition.shiftKeyOnly,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.targetNotEditable',
-    ol.events.condition.targetNotEditable,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.mouseOnly',
-    ol.events.condition.mouseOnly,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.primaryAction',
-    ol.events.condition.primaryAction,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.events.Event.prototype,
-    'type',
-    ol.events.Event.prototype.type);
-
-goog.exportProperty(
-    ol.events.Event.prototype,
-    'target',
-    ol.events.Event.prototype.target);
-
-goog.exportProperty(
-    ol.events.Event.prototype,
-    'preventDefault',
-    ol.events.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.events.Event.prototype,
-    'stopPropagation',
-    ol.events.Event.prototype.stopPropagation);
-
-goog.exportSymbol(
-    'ol.control.Attribution',
-    ol.control.Attribution,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.Attribution.render',
-    ol.control.Attribution.render,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getCollapsible',
-    ol.control.Attribution.prototype.getCollapsible);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'setCollapsible',
-    ol.control.Attribution.prototype.setCollapsible);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'setCollapsed',
-    ol.control.Attribution.prototype.setCollapsed);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getCollapsed',
-    ol.control.Attribution.prototype.getCollapsed);
-
-goog.exportSymbol(
-    'ol.control.Control',
-    ol.control.Control,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'getMap',
-    ol.control.Control.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'setMap',
-    ol.control.Control.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'setTarget',
-    ol.control.Control.prototype.setTarget);
-
-goog.exportSymbol(
-    'ol.control.FullScreen',
-    ol.control.FullScreen,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.MousePosition',
-    ol.control.MousePosition,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.MousePosition.render',
-    ol.control.MousePosition.render,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getCoordinateFormat',
-    ol.control.MousePosition.prototype.getCoordinateFormat);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getProjection',
-    ol.control.MousePosition.prototype.getProjection);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'setCoordinateFormat',
-    ol.control.MousePosition.prototype.setCoordinateFormat);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'setProjection',
-    ol.control.MousePosition.prototype.setProjection);
-
-goog.exportSymbol(
-    'ol.control.OverviewMap',
-    ol.control.OverviewMap,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.OverviewMap.render',
-    ol.control.OverviewMap.render,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getCollapsible',
-    ol.control.OverviewMap.prototype.getCollapsible);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'setCollapsible',
-    ol.control.OverviewMap.prototype.setCollapsible);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'setCollapsed',
-    ol.control.OverviewMap.prototype.setCollapsed);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getCollapsed',
-    ol.control.OverviewMap.prototype.getCollapsed);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getOverviewMap',
-    ol.control.OverviewMap.prototype.getOverviewMap);
-
-goog.exportSymbol(
-    'ol.control.Rotate',
-    ol.control.Rotate,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.Rotate.render',
-    ol.control.Rotate.render,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.ScaleLine',
-    ol.control.ScaleLine,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'getUnits',
-    ol.control.ScaleLine.prototype.getUnits);
-
-goog.exportSymbol(
-    'ol.control.ScaleLine.render',
-    ol.control.ScaleLine.render,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'setUnits',
-    ol.control.ScaleLine.prototype.setUnits);
-
-goog.exportSymbol(
-    'ol.control.Zoom',
-    ol.control.Zoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.ZoomSlider',
-    ol.control.ZoomSlider,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.ZoomSlider.render',
-    ol.control.ZoomSlider.render,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.ZoomToExtent',
-    ol.control.ZoomToExtent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'changed',
-    ol.Object.prototype.changed);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'dispatchEvent',
-    ol.Object.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'getRevision',
-    ol.Object.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'on',
-    ol.Object.prototype.on);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'once',
-    ol.Object.prototype.once);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'un',
-    ol.Object.prototype.un);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'get',
-    ol.Collection.prototype.get);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'getKeys',
-    ol.Collection.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'getProperties',
-    ol.Collection.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'set',
-    ol.Collection.prototype.set);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'setProperties',
-    ol.Collection.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'unset',
-    ol.Collection.prototype.unset);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'changed',
-    ol.Collection.prototype.changed);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'dispatchEvent',
-    ol.Collection.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'getRevision',
-    ol.Collection.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'on',
-    ol.Collection.prototype.on);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'once',
-    ol.Collection.prototype.once);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'un',
-    ol.Collection.prototype.un);
-
-goog.exportProperty(
-    ol.Collection.Event.prototype,
-    'type',
-    ol.Collection.Event.prototype.type);
-
-goog.exportProperty(
-    ol.Collection.Event.prototype,
-    'target',
-    ol.Collection.Event.prototype.target);
-
-goog.exportProperty(
-    ol.Collection.Event.prototype,
-    'preventDefault',
-    ol.Collection.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.Collection.Event.prototype,
-    'stopPropagation',
-    ol.Collection.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'get',
-    ol.DeviceOrientation.prototype.get);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getKeys',
-    ol.DeviceOrientation.prototype.getKeys);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getProperties',
-    ol.DeviceOrientation.prototype.getProperties);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'set',
-    ol.DeviceOrientation.prototype.set);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'setProperties',
-    ol.DeviceOrientation.prototype.setProperties);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'unset',
-    ol.DeviceOrientation.prototype.unset);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'changed',
-    ol.DeviceOrientation.prototype.changed);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'dispatchEvent',
-    ol.DeviceOrientation.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getRevision',
-    ol.DeviceOrientation.prototype.getRevision);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'on',
-    ol.DeviceOrientation.prototype.on);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'once',
-    ol.DeviceOrientation.prototype.once);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'un',
-    ol.DeviceOrientation.prototype.un);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'get',
-    ol.Feature.prototype.get);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getKeys',
-    ol.Feature.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getProperties',
-    ol.Feature.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'set',
-    ol.Feature.prototype.set);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'setProperties',
-    ol.Feature.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'unset',
-    ol.Feature.prototype.unset);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'changed',
-    ol.Feature.prototype.changed);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'dispatchEvent',
-    ol.Feature.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getRevision',
-    ol.Feature.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'on',
-    ol.Feature.prototype.on);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'once',
-    ol.Feature.prototype.once);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'un',
-    ol.Feature.prototype.un);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'get',
-    ol.Geolocation.prototype.get);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getKeys',
-    ol.Geolocation.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getProperties',
-    ol.Geolocation.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'set',
-    ol.Geolocation.prototype.set);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'setProperties',
-    ol.Geolocation.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'unset',
-    ol.Geolocation.prototype.unset);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'changed',
-    ol.Geolocation.prototype.changed);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'dispatchEvent',
-    ol.Geolocation.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getRevision',
-    ol.Geolocation.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'on',
-    ol.Geolocation.prototype.on);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'once',
-    ol.Geolocation.prototype.once);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'un',
-    ol.Geolocation.prototype.un);
-
-goog.exportProperty(
-    ol.ImageTile.prototype,
-    'getTileCoord',
-    ol.ImageTile.prototype.getTileCoord);
-
-goog.exportProperty(
-    ol.ImageTile.prototype,
-    'load',
-    ol.ImageTile.prototype.load);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'get',
-    ol.Map.prototype.get);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getKeys',
-    ol.Map.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getProperties',
-    ol.Map.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'set',
-    ol.Map.prototype.set);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'setProperties',
-    ol.Map.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'unset',
-    ol.Map.prototype.unset);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'changed',
-    ol.Map.prototype.changed);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'dispatchEvent',
-    ol.Map.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getRevision',
-    ol.Map.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'on',
-    ol.Map.prototype.on);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'once',
-    ol.Map.prototype.once);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'un',
-    ol.Map.prototype.un);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'type',
-    ol.MapEvent.prototype.type);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'target',
-    ol.MapEvent.prototype.target);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'preventDefault',
-    ol.MapEvent.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'stopPropagation',
-    ol.MapEvent.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'map',
-    ol.MapBrowserEvent.prototype.map);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'frameState',
-    ol.MapBrowserEvent.prototype.frameState);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'type',
-    ol.MapBrowserEvent.prototype.type);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'target',
-    ol.MapBrowserEvent.prototype.target);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'preventDefault',
-    ol.MapBrowserEvent.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'stopPropagation',
-    ol.MapBrowserEvent.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'originalEvent',
-    ol.MapBrowserPointerEvent.prototype.originalEvent);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'pixel',
-    ol.MapBrowserPointerEvent.prototype.pixel);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'coordinate',
-    ol.MapBrowserPointerEvent.prototype.coordinate);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'dragging',
-    ol.MapBrowserPointerEvent.prototype.dragging);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'preventDefault',
-    ol.MapBrowserPointerEvent.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'stopPropagation',
-    ol.MapBrowserPointerEvent.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'map',
-    ol.MapBrowserPointerEvent.prototype.map);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'frameState',
-    ol.MapBrowserPointerEvent.prototype.frameState);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'type',
-    ol.MapBrowserPointerEvent.prototype.type);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'target',
-    ol.MapBrowserPointerEvent.prototype.target);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'type',
-    ol.Object.Event.prototype.type);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'target',
-    ol.Object.Event.prototype.target);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'preventDefault',
-    ol.Object.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'stopPropagation',
-    ol.Object.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'get',
-    ol.Overlay.prototype.get);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getKeys',
-    ol.Overlay.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getProperties',
-    ol.Overlay.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'set',
-    ol.Overlay.prototype.set);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setProperties',
-    ol.Overlay.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'unset',
-    ol.Overlay.prototype.unset);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'changed',
-    ol.Overlay.prototype.changed);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'dispatchEvent',
-    ol.Overlay.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getRevision',
-    ol.Overlay.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'on',
-    ol.Overlay.prototype.on);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'once',
-    ol.Overlay.prototype.once);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'un',
-    ol.Overlay.prototype.un);
-
-goog.exportProperty(
-    ol.VectorImageTile.prototype,
-    'getTileCoord',
-    ol.VectorImageTile.prototype.getTileCoord);
-
-goog.exportProperty(
-    ol.VectorImageTile.prototype,
-    'load',
-    ol.VectorImageTile.prototype.load);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'getTileCoord',
-    ol.VectorTile.prototype.getTileCoord);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'load',
-    ol.VectorTile.prototype.load);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'get',
-    ol.View.prototype.get);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getKeys',
-    ol.View.prototype.getKeys);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getProperties',
-    ol.View.prototype.getProperties);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'set',
-    ol.View.prototype.set);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setProperties',
-    ol.View.prototype.setProperties);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'unset',
-    ol.View.prototype.unset);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'changed',
-    ol.View.prototype.changed);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'dispatchEvent',
-    ol.View.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getRevision',
-    ol.View.prototype.getRevision);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'on',
-    ol.View.prototype.on);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'once',
-    ol.View.prototype.once);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'un',
-    ol.View.prototype.un);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'forEachTileCoord',
-    ol.tilegrid.WMTS.prototype.forEachTileCoord);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getMaxZoom',
-    ol.tilegrid.WMTS.prototype.getMaxZoom);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getMinZoom',
-    ol.tilegrid.WMTS.prototype.getMinZoom);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getOrigin',
-    ol.tilegrid.WMTS.prototype.getOrigin);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getResolution',
-    ol.tilegrid.WMTS.prototype.getResolution);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getResolutions',
-    ol.tilegrid.WMTS.prototype.getResolutions);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getTileCoordExtent',
-    ol.tilegrid.WMTS.prototype.getTileCoordExtent);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getTileCoordForCoordAndResolution',
-    ol.tilegrid.WMTS.prototype.getTileCoordForCoordAndResolution);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getTileCoordForCoordAndZ',
-    ol.tilegrid.WMTS.prototype.getTileCoordForCoordAndZ);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getTileSize',
-    ol.tilegrid.WMTS.prototype.getTileSize);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getZForResolution',
-    ol.tilegrid.WMTS.prototype.getZForResolution);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getOpacity',
-    ol.style.RegularShape.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getRotateWithView',
-    ol.style.RegularShape.prototype.getRotateWithView);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getRotation',
-    ol.style.RegularShape.prototype.getRotation);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getScale',
-    ol.style.RegularShape.prototype.getScale);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getSnapToPixel',
-    ol.style.RegularShape.prototype.getSnapToPixel);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'setOpacity',
-    ol.style.RegularShape.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'setRotation',
-    ol.style.RegularShape.prototype.setRotation);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'setScale',
-    ol.style.RegularShape.prototype.setScale);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'clone',
-    ol.style.Circle.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getAngle',
-    ol.style.Circle.prototype.getAngle);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getFill',
-    ol.style.Circle.prototype.getFill);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getPoints',
-    ol.style.Circle.prototype.getPoints);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getRadius',
-    ol.style.Circle.prototype.getRadius);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getRadius2',
-    ol.style.Circle.prototype.getRadius2);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getStroke',
-    ol.style.Circle.prototype.getStroke);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getOpacity',
-    ol.style.Circle.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getRotateWithView',
-    ol.style.Circle.prototype.getRotateWithView);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getRotation',
-    ol.style.Circle.prototype.getRotation);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getScale',
-    ol.style.Circle.prototype.getScale);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getSnapToPixel',
-    ol.style.Circle.prototype.getSnapToPixel);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'setOpacity',
-    ol.style.Circle.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'setRotation',
-    ol.style.Circle.prototype.setRotation);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'setScale',
-    ol.style.Circle.prototype.setScale);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getOpacity',
-    ol.style.Icon.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getRotateWithView',
-    ol.style.Icon.prototype.getRotateWithView);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getRotation',
-    ol.style.Icon.prototype.getRotation);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getScale',
-    ol.style.Icon.prototype.getScale);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getSnapToPixel',
-    ol.style.Icon.prototype.getSnapToPixel);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'setOpacity',
-    ol.style.Icon.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'setRotation',
-    ol.style.Icon.prototype.setRotation);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'setScale',
-    ol.style.Icon.prototype.setScale);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'get',
-    ol.source.Source.prototype.get);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getKeys',
-    ol.source.Source.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getProperties',
-    ol.source.Source.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'set',
-    ol.source.Source.prototype.set);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'setProperties',
-    ol.source.Source.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'unset',
-    ol.source.Source.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'changed',
-    ol.source.Source.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'dispatchEvent',
-    ol.source.Source.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getRevision',
-    ol.source.Source.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'on',
-    ol.source.Source.prototype.on);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'once',
-    ol.source.Source.prototype.once);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'un',
-    ol.source.Source.prototype.un);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getAttributions',
-    ol.source.Tile.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getLogo',
-    ol.source.Tile.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getProjection',
-    ol.source.Tile.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getState',
-    ol.source.Tile.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'refresh',
-    ol.source.Tile.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'setAttributions',
-    ol.source.Tile.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'get',
-    ol.source.Tile.prototype.get);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getKeys',
-    ol.source.Tile.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getProperties',
-    ol.source.Tile.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'set',
-    ol.source.Tile.prototype.set);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'setProperties',
-    ol.source.Tile.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'unset',
-    ol.source.Tile.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'changed',
-    ol.source.Tile.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'dispatchEvent',
-    ol.source.Tile.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getRevision',
-    ol.source.Tile.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'on',
-    ol.source.Tile.prototype.on);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'once',
-    ol.source.Tile.prototype.once);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'un',
-    ol.source.Tile.prototype.un);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getTileGrid',
-    ol.source.UrlTile.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'refresh',
-    ol.source.UrlTile.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getAttributions',
-    ol.source.UrlTile.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getLogo',
-    ol.source.UrlTile.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getProjection',
-    ol.source.UrlTile.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getState',
-    ol.source.UrlTile.prototype.getState);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setAttributions',
-    ol.source.UrlTile.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'get',
-    ol.source.UrlTile.prototype.get);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getKeys',
-    ol.source.UrlTile.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getProperties',
-    ol.source.UrlTile.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'set',
-    ol.source.UrlTile.prototype.set);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setProperties',
-    ol.source.UrlTile.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'unset',
-    ol.source.UrlTile.prototype.unset);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'changed',
-    ol.source.UrlTile.prototype.changed);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'dispatchEvent',
-    ol.source.UrlTile.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getRevision',
-    ol.source.UrlTile.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'on',
-    ol.source.UrlTile.prototype.on);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'once',
-    ol.source.UrlTile.prototype.once);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'un',
-    ol.source.UrlTile.prototype.un);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getTileLoadFunction',
-    ol.source.TileImage.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getTileUrlFunction',
-    ol.source.TileImage.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getUrls',
-    ol.source.TileImage.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setTileLoadFunction',
-    ol.source.TileImage.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setTileUrlFunction',
-    ol.source.TileImage.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setUrl',
-    ol.source.TileImage.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setUrls',
-    ol.source.TileImage.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getTileGrid',
-    ol.source.TileImage.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'refresh',
-    ol.source.TileImage.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getAttributions',
-    ol.source.TileImage.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getLogo',
-    ol.source.TileImage.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getProjection',
-    ol.source.TileImage.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getState',
-    ol.source.TileImage.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setAttributions',
-    ol.source.TileImage.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'get',
-    ol.source.TileImage.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getKeys',
-    ol.source.TileImage.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getProperties',
-    ol.source.TileImage.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'set',
-    ol.source.TileImage.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setProperties',
-    ol.source.TileImage.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'unset',
-    ol.source.TileImage.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'changed',
-    ol.source.TileImage.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'dispatchEvent',
-    ol.source.TileImage.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getRevision',
-    ol.source.TileImage.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'on',
-    ol.source.TileImage.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'once',
-    ol.source.TileImage.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'un',
-    ol.source.TileImage.prototype.un);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.BingMaps.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setTileGridForProjection',
-    ol.source.BingMaps.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getTileLoadFunction',
-    ol.source.BingMaps.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getTileUrlFunction',
-    ol.source.BingMaps.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getUrls',
-    ol.source.BingMaps.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setTileLoadFunction',
-    ol.source.BingMaps.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setTileUrlFunction',
-    ol.source.BingMaps.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setUrl',
-    ol.source.BingMaps.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setUrls',
-    ol.source.BingMaps.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getTileGrid',
-    ol.source.BingMaps.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'refresh',
-    ol.source.BingMaps.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getAttributions',
-    ol.source.BingMaps.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getLogo',
-    ol.source.BingMaps.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getProjection',
-    ol.source.BingMaps.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getState',
-    ol.source.BingMaps.prototype.getState);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setAttributions',
-    ol.source.BingMaps.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'get',
-    ol.source.BingMaps.prototype.get);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getKeys',
-    ol.source.BingMaps.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getProperties',
-    ol.source.BingMaps.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'set',
-    ol.source.BingMaps.prototype.set);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setProperties',
-    ol.source.BingMaps.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'unset',
-    ol.source.BingMaps.prototype.unset);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'changed',
-    ol.source.BingMaps.prototype.changed);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'dispatchEvent',
-    ol.source.BingMaps.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getRevision',
-    ol.source.BingMaps.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'on',
-    ol.source.BingMaps.prototype.on);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'once',
-    ol.source.BingMaps.prototype.once);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'un',
-    ol.source.BingMaps.prototype.un);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.XYZ.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setTileGridForProjection',
-    ol.source.XYZ.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getTileLoadFunction',
-    ol.source.XYZ.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getTileUrlFunction',
-    ol.source.XYZ.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getUrls',
-    ol.source.XYZ.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setTileLoadFunction',
-    ol.source.XYZ.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setTileUrlFunction',
-    ol.source.XYZ.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setUrl',
-    ol.source.XYZ.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setUrls',
-    ol.source.XYZ.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getTileGrid',
-    ol.source.XYZ.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'refresh',
-    ol.source.XYZ.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getAttributions',
-    ol.source.XYZ.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getLogo',
-    ol.source.XYZ.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getProjection',
-    ol.source.XYZ.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getState',
-    ol.source.XYZ.prototype.getState);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setAttributions',
-    ol.source.XYZ.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'get',
-    ol.source.XYZ.prototype.get);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getKeys',
-    ol.source.XYZ.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getProperties',
-    ol.source.XYZ.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'set',
-    ol.source.XYZ.prototype.set);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setProperties',
-    ol.source.XYZ.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'unset',
-    ol.source.XYZ.prototype.unset);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'changed',
-    ol.source.XYZ.prototype.changed);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'dispatchEvent',
-    ol.source.XYZ.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getRevision',
-    ol.source.XYZ.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'on',
-    ol.source.XYZ.prototype.on);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'once',
-    ol.source.XYZ.prototype.once);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'un',
-    ol.source.XYZ.prototype.un);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.CartoDB.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setTileGridForProjection',
-    ol.source.CartoDB.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getTileLoadFunction',
-    ol.source.CartoDB.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getTileUrlFunction',
-    ol.source.CartoDB.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getUrls',
-    ol.source.CartoDB.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setTileLoadFunction',
-    ol.source.CartoDB.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setTileUrlFunction',
-    ol.source.CartoDB.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setUrl',
-    ol.source.CartoDB.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setUrls',
-    ol.source.CartoDB.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getTileGrid',
-    ol.source.CartoDB.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'refresh',
-    ol.source.CartoDB.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getAttributions',
-    ol.source.CartoDB.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getLogo',
-    ol.source.CartoDB.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getProjection',
-    ol.source.CartoDB.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getState',
-    ol.source.CartoDB.prototype.getState);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setAttributions',
-    ol.source.CartoDB.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'get',
-    ol.source.CartoDB.prototype.get);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getKeys',
-    ol.source.CartoDB.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getProperties',
-    ol.source.CartoDB.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'set',
-    ol.source.CartoDB.prototype.set);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setProperties',
-    ol.source.CartoDB.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'unset',
-    ol.source.CartoDB.prototype.unset);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'changed',
-    ol.source.CartoDB.prototype.changed);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'dispatchEvent',
-    ol.source.CartoDB.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getRevision',
-    ol.source.CartoDB.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'on',
-    ol.source.CartoDB.prototype.on);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'once',
-    ol.source.CartoDB.prototype.once);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'un',
-    ol.source.CartoDB.prototype.un);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getAttributions',
-    ol.source.Vector.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getLogo',
-    ol.source.Vector.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getProjection',
-    ol.source.Vector.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getState',
-    ol.source.Vector.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'refresh',
-    ol.source.Vector.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'setAttributions',
-    ol.source.Vector.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'get',
-    ol.source.Vector.prototype.get);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getKeys',
-    ol.source.Vector.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getProperties',
-    ol.source.Vector.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'set',
-    ol.source.Vector.prototype.set);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'setProperties',
-    ol.source.Vector.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'unset',
-    ol.source.Vector.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'changed',
-    ol.source.Vector.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'dispatchEvent',
-    ol.source.Vector.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getRevision',
-    ol.source.Vector.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'on',
-    ol.source.Vector.prototype.on);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'once',
-    ol.source.Vector.prototype.once);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'un',
-    ol.source.Vector.prototype.un);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'addFeature',
-    ol.source.Cluster.prototype.addFeature);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'addFeatures',
-    ol.source.Cluster.prototype.addFeatures);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'clear',
-    ol.source.Cluster.prototype.clear);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'forEachFeature',
-    ol.source.Cluster.prototype.forEachFeature);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'forEachFeatureInExtent',
-    ol.source.Cluster.prototype.forEachFeatureInExtent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'forEachFeatureIntersectingExtent',
-    ol.source.Cluster.prototype.forEachFeatureIntersectingExtent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFeaturesCollection',
-    ol.source.Cluster.prototype.getFeaturesCollection);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFeatures',
-    ol.source.Cluster.prototype.getFeatures);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFeaturesAtCoordinate',
-    ol.source.Cluster.prototype.getFeaturesAtCoordinate);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFeaturesInExtent',
-    ol.source.Cluster.prototype.getFeaturesInExtent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getClosestFeatureToCoordinate',
-    ol.source.Cluster.prototype.getClosestFeatureToCoordinate);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getExtent',
-    ol.source.Cluster.prototype.getExtent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFeatureById',
-    ol.source.Cluster.prototype.getFeatureById);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFormat',
-    ol.source.Cluster.prototype.getFormat);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getUrl',
-    ol.source.Cluster.prototype.getUrl);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'removeFeature',
-    ol.source.Cluster.prototype.removeFeature);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getAttributions',
-    ol.source.Cluster.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getLogo',
-    ol.source.Cluster.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getProjection',
-    ol.source.Cluster.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getState',
-    ol.source.Cluster.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'refresh',
-    ol.source.Cluster.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'setAttributions',
-    ol.source.Cluster.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'get',
-    ol.source.Cluster.prototype.get);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getKeys',
-    ol.source.Cluster.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getProperties',
-    ol.source.Cluster.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'set',
-    ol.source.Cluster.prototype.set);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'setProperties',
-    ol.source.Cluster.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'unset',
-    ol.source.Cluster.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'changed',
-    ol.source.Cluster.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'dispatchEvent',
-    ol.source.Cluster.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getRevision',
-    ol.source.Cluster.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'on',
-    ol.source.Cluster.prototype.on);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'once',
-    ol.source.Cluster.prototype.once);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'un',
-    ol.source.Cluster.prototype.un);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getAttributions',
-    ol.source.Image.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getLogo',
-    ol.source.Image.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getProjection',
-    ol.source.Image.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getState',
-    ol.source.Image.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'refresh',
-    ol.source.Image.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'setAttributions',
-    ol.source.Image.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'get',
-    ol.source.Image.prototype.get);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getKeys',
-    ol.source.Image.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getProperties',
-    ol.source.Image.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'set',
-    ol.source.Image.prototype.set);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'setProperties',
-    ol.source.Image.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'unset',
-    ol.source.Image.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'changed',
-    ol.source.Image.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'dispatchEvent',
-    ol.source.Image.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getRevision',
-    ol.source.Image.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'on',
-    ol.source.Image.prototype.on);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'once',
-    ol.source.Image.prototype.once);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'un',
-    ol.source.Image.prototype.un);
-
-goog.exportProperty(
-    ol.source.Image.Event.prototype,
-    'type',
-    ol.source.Image.Event.prototype.type);
-
-goog.exportProperty(
-    ol.source.Image.Event.prototype,
-    'target',
-    ol.source.Image.Event.prototype.target);
-
-goog.exportProperty(
-    ol.source.Image.Event.prototype,
-    'preventDefault',
-    ol.source.Image.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.source.Image.Event.prototype,
-    'stopPropagation',
-    ol.source.Image.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getAttributions',
-    ol.source.ImageArcGISRest.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getLogo',
-    ol.source.ImageArcGISRest.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getProjection',
-    ol.source.ImageArcGISRest.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getState',
-    ol.source.ImageArcGISRest.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'refresh',
-    ol.source.ImageArcGISRest.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'setAttributions',
-    ol.source.ImageArcGISRest.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'get',
-    ol.source.ImageArcGISRest.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getKeys',
-    ol.source.ImageArcGISRest.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getProperties',
-    ol.source.ImageArcGISRest.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'set',
-    ol.source.ImageArcGISRest.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'setProperties',
-    ol.source.ImageArcGISRest.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'unset',
-    ol.source.ImageArcGISRest.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'changed',
-    ol.source.ImageArcGISRest.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'dispatchEvent',
-    ol.source.ImageArcGISRest.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getRevision',
-    ol.source.ImageArcGISRest.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'on',
-    ol.source.ImageArcGISRest.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'once',
-    ol.source.ImageArcGISRest.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'un',
-    ol.source.ImageArcGISRest.prototype.un);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getAttributions',
-    ol.source.ImageCanvas.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getLogo',
-    ol.source.ImageCanvas.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getProjection',
-    ol.source.ImageCanvas.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getState',
-    ol.source.ImageCanvas.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'refresh',
-    ol.source.ImageCanvas.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'setAttributions',
-    ol.source.ImageCanvas.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'get',
-    ol.source.ImageCanvas.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getKeys',
-    ol.source.ImageCanvas.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getProperties',
-    ol.source.ImageCanvas.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'set',
-    ol.source.ImageCanvas.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'setProperties',
-    ol.source.ImageCanvas.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'unset',
-    ol.source.ImageCanvas.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'changed',
-    ol.source.ImageCanvas.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'dispatchEvent',
-    ol.source.ImageCanvas.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getRevision',
-    ol.source.ImageCanvas.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'on',
-    ol.source.ImageCanvas.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'once',
-    ol.source.ImageCanvas.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'un',
-    ol.source.ImageCanvas.prototype.un);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getAttributions',
-    ol.source.ImageMapGuide.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getLogo',
-    ol.source.ImageMapGuide.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getProjection',
-    ol.source.ImageMapGuide.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getState',
-    ol.source.ImageMapGuide.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'refresh',
-    ol.source.ImageMapGuide.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'setAttributions',
-    ol.source.ImageMapGuide.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'get',
-    ol.source.ImageMapGuide.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getKeys',
-    ol.source.ImageMapGuide.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getProperties',
-    ol.source.ImageMapGuide.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'set',
-    ol.source.ImageMapGuide.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'setProperties',
-    ol.source.ImageMapGuide.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'unset',
-    ol.source.ImageMapGuide.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'changed',
-    ol.source.ImageMapGuide.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'dispatchEvent',
-    ol.source.ImageMapGuide.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getRevision',
-    ol.source.ImageMapGuide.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'on',
-    ol.source.ImageMapGuide.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'once',
-    ol.source.ImageMapGuide.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'un',
-    ol.source.ImageMapGuide.prototype.un);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getAttributions',
-    ol.source.ImageStatic.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getLogo',
-    ol.source.ImageStatic.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getProjection',
-    ol.source.ImageStatic.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getState',
-    ol.source.ImageStatic.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'refresh',
-    ol.source.ImageStatic.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'setAttributions',
-    ol.source.ImageStatic.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'get',
-    ol.source.ImageStatic.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getKeys',
-    ol.source.ImageStatic.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getProperties',
-    ol.source.ImageStatic.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'set',
-    ol.source.ImageStatic.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'setProperties',
-    ol.source.ImageStatic.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'unset',
-    ol.source.ImageStatic.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'changed',
-    ol.source.ImageStatic.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'dispatchEvent',
-    ol.source.ImageStatic.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getRevision',
-    ol.source.ImageStatic.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'on',
-    ol.source.ImageStatic.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'once',
-    ol.source.ImageStatic.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'un',
-    ol.source.ImageStatic.prototype.un);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getAttributions',
-    ol.source.ImageVector.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getLogo',
-    ol.source.ImageVector.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getProjection',
-    ol.source.ImageVector.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getState',
-    ol.source.ImageVector.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'refresh',
-    ol.source.ImageVector.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'setAttributions',
-    ol.source.ImageVector.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'get',
-    ol.source.ImageVector.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getKeys',
-    ol.source.ImageVector.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getProperties',
-    ol.source.ImageVector.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'set',
-    ol.source.ImageVector.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'setProperties',
-    ol.source.ImageVector.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'unset',
-    ol.source.ImageVector.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'changed',
-    ol.source.ImageVector.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'dispatchEvent',
-    ol.source.ImageVector.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getRevision',
-    ol.source.ImageVector.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'on',
-    ol.source.ImageVector.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'once',
-    ol.source.ImageVector.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'un',
-    ol.source.ImageVector.prototype.un);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getAttributions',
-    ol.source.ImageWMS.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getLogo',
-    ol.source.ImageWMS.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getProjection',
-    ol.source.ImageWMS.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getState',
-    ol.source.ImageWMS.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'refresh',
-    ol.source.ImageWMS.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'setAttributions',
-    ol.source.ImageWMS.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'get',
-    ol.source.ImageWMS.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getKeys',
-    ol.source.ImageWMS.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getProperties',
-    ol.source.ImageWMS.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'set',
-    ol.source.ImageWMS.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'setProperties',
-    ol.source.ImageWMS.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'unset',
-    ol.source.ImageWMS.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'changed',
-    ol.source.ImageWMS.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'dispatchEvent',
-    ol.source.ImageWMS.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getRevision',
-    ol.source.ImageWMS.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'on',
-    ol.source.ImageWMS.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'once',
-    ol.source.ImageWMS.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'un',
-    ol.source.ImageWMS.prototype.un);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.OSM.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setTileGridForProjection',
-    ol.source.OSM.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getTileLoadFunction',
-    ol.source.OSM.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getTileUrlFunction',
-    ol.source.OSM.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getUrls',
-    ol.source.OSM.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setTileLoadFunction',
-    ol.source.OSM.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setTileUrlFunction',
-    ol.source.OSM.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setUrl',
-    ol.source.OSM.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setUrls',
-    ol.source.OSM.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getTileGrid',
-    ol.source.OSM.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'refresh',
-    ol.source.OSM.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getAttributions',
-    ol.source.OSM.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getLogo',
-    ol.source.OSM.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getProjection',
-    ol.source.OSM.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getState',
-    ol.source.OSM.prototype.getState);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setAttributions',
-    ol.source.OSM.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'get',
-    ol.source.OSM.prototype.get);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getKeys',
-    ol.source.OSM.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getProperties',
-    ol.source.OSM.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'set',
-    ol.source.OSM.prototype.set);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setProperties',
-    ol.source.OSM.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'unset',
-    ol.source.OSM.prototype.unset);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'changed',
-    ol.source.OSM.prototype.changed);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'dispatchEvent',
-    ol.source.OSM.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getRevision',
-    ol.source.OSM.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'on',
-    ol.source.OSM.prototype.on);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'once',
-    ol.source.OSM.prototype.once);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'un',
-    ol.source.OSM.prototype.un);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getAttributions',
-    ol.source.Raster.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getLogo',
-    ol.source.Raster.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getProjection',
-    ol.source.Raster.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getState',
-    ol.source.Raster.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'refresh',
-    ol.source.Raster.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'setAttributions',
-    ol.source.Raster.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'get',
-    ol.source.Raster.prototype.get);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getKeys',
-    ol.source.Raster.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getProperties',
-    ol.source.Raster.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'set',
-    ol.source.Raster.prototype.set);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'setProperties',
-    ol.source.Raster.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'unset',
-    ol.source.Raster.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'changed',
-    ol.source.Raster.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'dispatchEvent',
-    ol.source.Raster.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getRevision',
-    ol.source.Raster.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'on',
-    ol.source.Raster.prototype.on);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'once',
-    ol.source.Raster.prototype.once);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'un',
-    ol.source.Raster.prototype.un);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'type',
-    ol.source.Raster.Event.prototype.type);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'target',
-    ol.source.Raster.Event.prototype.target);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'preventDefault',
-    ol.source.Raster.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'stopPropagation',
-    ol.source.Raster.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.Stamen.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setTileGridForProjection',
-    ol.source.Stamen.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getTileLoadFunction',
-    ol.source.Stamen.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getTileUrlFunction',
-    ol.source.Stamen.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getUrls',
-    ol.source.Stamen.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setTileLoadFunction',
-    ol.source.Stamen.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setTileUrlFunction',
-    ol.source.Stamen.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setUrl',
-    ol.source.Stamen.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setUrls',
-    ol.source.Stamen.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getTileGrid',
-    ol.source.Stamen.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'refresh',
-    ol.source.Stamen.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getAttributions',
-    ol.source.Stamen.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getLogo',
-    ol.source.Stamen.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getProjection',
-    ol.source.Stamen.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getState',
-    ol.source.Stamen.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setAttributions',
-    ol.source.Stamen.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'get',
-    ol.source.Stamen.prototype.get);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getKeys',
-    ol.source.Stamen.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getProperties',
-    ol.source.Stamen.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'set',
-    ol.source.Stamen.prototype.set);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setProperties',
-    ol.source.Stamen.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'unset',
-    ol.source.Stamen.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'changed',
-    ol.source.Stamen.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'dispatchEvent',
-    ol.source.Stamen.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getRevision',
-    ol.source.Stamen.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'on',
-    ol.source.Stamen.prototype.on);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'once',
-    ol.source.Stamen.prototype.once);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'un',
-    ol.source.Stamen.prototype.un);
-
-goog.exportProperty(
-    ol.source.Tile.Event.prototype,
-    'type',
-    ol.source.Tile.Event.prototype.type);
-
-goog.exportProperty(
-    ol.source.Tile.Event.prototype,
-    'target',
-    ol.source.Tile.Event.prototype.target);
-
-goog.exportProperty(
-    ol.source.Tile.Event.prototype,
-    'preventDefault',
-    ol.source.Tile.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.source.Tile.Event.prototype,
-    'stopPropagation',
-    ol.source.Tile.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.TileArcGISRest.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setTileGridForProjection',
-    ol.source.TileArcGISRest.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getTileLoadFunction',
-    ol.source.TileArcGISRest.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getTileUrlFunction',
-    ol.source.TileArcGISRest.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getUrls',
-    ol.source.TileArcGISRest.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setTileLoadFunction',
-    ol.source.TileArcGISRest.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setTileUrlFunction',
-    ol.source.TileArcGISRest.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setUrl',
-    ol.source.TileArcGISRest.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setUrls',
-    ol.source.TileArcGISRest.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getTileGrid',
-    ol.source.TileArcGISRest.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'refresh',
-    ol.source.TileArcGISRest.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getAttributions',
-    ol.source.TileArcGISRest.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getLogo',
-    ol.source.TileArcGISRest.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getProjection',
-    ol.source.TileArcGISRest.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getState',
-    ol.source.TileArcGISRest.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setAttributions',
-    ol.source.TileArcGISRest.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'get',
-    ol.source.TileArcGISRest.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getKeys',
-    ol.source.TileArcGISRest.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getProperties',
-    ol.source.TileArcGISRest.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'set',
-    ol.source.TileArcGISRest.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setProperties',
-    ol.source.TileArcGISRest.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'unset',
-    ol.source.TileArcGISRest.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'changed',
-    ol.source.TileArcGISRest.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'dispatchEvent',
-    ol.source.TileArcGISRest.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getRevision',
-    ol.source.TileArcGISRest.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'on',
-    ol.source.TileArcGISRest.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'once',
-    ol.source.TileArcGISRest.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'un',
-    ol.source.TileArcGISRest.prototype.un);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getTileGrid',
-    ol.source.TileDebug.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'refresh',
-    ol.source.TileDebug.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getAttributions',
-    ol.source.TileDebug.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getLogo',
-    ol.source.TileDebug.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getProjection',
-    ol.source.TileDebug.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getState',
-    ol.source.TileDebug.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'setAttributions',
-    ol.source.TileDebug.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'get',
-    ol.source.TileDebug.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getKeys',
-    ol.source.TileDebug.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getProperties',
-    ol.source.TileDebug.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'set',
-    ol.source.TileDebug.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'setProperties',
-    ol.source.TileDebug.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'unset',
-    ol.source.TileDebug.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'changed',
-    ol.source.TileDebug.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'dispatchEvent',
-    ol.source.TileDebug.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getRevision',
-    ol.source.TileDebug.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'on',
-    ol.source.TileDebug.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'once',
-    ol.source.TileDebug.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'un',
-    ol.source.TileDebug.prototype.un);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.TileJSON.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setTileGridForProjection',
-    ol.source.TileJSON.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getTileLoadFunction',
-    ol.source.TileJSON.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getTileUrlFunction',
-    ol.source.TileJSON.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getUrls',
-    ol.source.TileJSON.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setTileLoadFunction',
-    ol.source.TileJSON.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setTileUrlFunction',
-    ol.source.TileJSON.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setUrl',
-    ol.source.TileJSON.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setUrls',
-    ol.source.TileJSON.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getTileGrid',
-    ol.source.TileJSON.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'refresh',
-    ol.source.TileJSON.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getAttributions',
-    ol.source.TileJSON.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getLogo',
-    ol.source.TileJSON.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getProjection',
-    ol.source.TileJSON.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getState',
-    ol.source.TileJSON.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setAttributions',
-    ol.source.TileJSON.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'get',
-    ol.source.TileJSON.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getKeys',
-    ol.source.TileJSON.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getProperties',
-    ol.source.TileJSON.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'set',
-    ol.source.TileJSON.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setProperties',
-    ol.source.TileJSON.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'unset',
-    ol.source.TileJSON.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'changed',
-    ol.source.TileJSON.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'dispatchEvent',
-    ol.source.TileJSON.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getRevision',
-    ol.source.TileJSON.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'on',
-    ol.source.TileJSON.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'once',
-    ol.source.TileJSON.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'un',
-    ol.source.TileJSON.prototype.un);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getTileGrid',
-    ol.source.TileUTFGrid.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'refresh',
-    ol.source.TileUTFGrid.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getAttributions',
-    ol.source.TileUTFGrid.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getLogo',
-    ol.source.TileUTFGrid.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getProjection',
-    ol.source.TileUTFGrid.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getState',
-    ol.source.TileUTFGrid.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'setAttributions',
-    ol.source.TileUTFGrid.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'get',
-    ol.source.TileUTFGrid.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getKeys',
-    ol.source.TileUTFGrid.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getProperties',
-    ol.source.TileUTFGrid.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'set',
-    ol.source.TileUTFGrid.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'setProperties',
-    ol.source.TileUTFGrid.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'unset',
-    ol.source.TileUTFGrid.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'changed',
-    ol.source.TileUTFGrid.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'dispatchEvent',
-    ol.source.TileUTFGrid.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getRevision',
-    ol.source.TileUTFGrid.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'on',
-    ol.source.TileUTFGrid.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'once',
-    ol.source.TileUTFGrid.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'un',
-    ol.source.TileUTFGrid.prototype.un);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.TileWMS.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setTileGridForProjection',
-    ol.source.TileWMS.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getTileLoadFunction',
-    ol.source.TileWMS.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getTileUrlFunction',
-    ol.source.TileWMS.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getUrls',
-    ol.source.TileWMS.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setTileLoadFunction',
-    ol.source.TileWMS.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setTileUrlFunction',
-    ol.source.TileWMS.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setUrl',
-    ol.source.TileWMS.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setUrls',
-    ol.source.TileWMS.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getTileGrid',
-    ol.source.TileWMS.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'refresh',
-    ol.source.TileWMS.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getAttributions',
-    ol.source.TileWMS.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getLogo',
-    ol.source.TileWMS.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getProjection',
-    ol.source.TileWMS.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getState',
-    ol.source.TileWMS.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setAttributions',
-    ol.source.TileWMS.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'get',
-    ol.source.TileWMS.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getKeys',
-    ol.source.TileWMS.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getProperties',
-    ol.source.TileWMS.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'set',
-    ol.source.TileWMS.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setProperties',
-    ol.source.TileWMS.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'unset',
-    ol.source.TileWMS.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'changed',
-    ol.source.TileWMS.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'dispatchEvent',
-    ol.source.TileWMS.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getRevision',
-    ol.source.TileWMS.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'on',
-    ol.source.TileWMS.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'once',
-    ol.source.TileWMS.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'un',
-    ol.source.TileWMS.prototype.un);
-
-goog.exportProperty(
-    ol.source.Vector.Event.prototype,
-    'type',
-    ol.source.Vector.Event.prototype.type);
-
-goog.exportProperty(
-    ol.source.Vector.Event.prototype,
-    'target',
-    ol.source.Vector.Event.prototype.target);
-
-goog.exportProperty(
-    ol.source.Vector.Event.prototype,
-    'preventDefault',
-    ol.source.Vector.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.source.Vector.Event.prototype,
-    'stopPropagation',
-    ol.source.Vector.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getTileLoadFunction',
-    ol.source.VectorTile.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getTileUrlFunction',
-    ol.source.VectorTile.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getUrls',
-    ol.source.VectorTile.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setTileLoadFunction',
-    ol.source.VectorTile.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setTileUrlFunction',
-    ol.source.VectorTile.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setUrl',
-    ol.source.VectorTile.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setUrls',
-    ol.source.VectorTile.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getTileGrid',
-    ol.source.VectorTile.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'refresh',
-    ol.source.VectorTile.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getAttributions',
-    ol.source.VectorTile.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getLogo',
-    ol.source.VectorTile.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getProjection',
-    ol.source.VectorTile.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getState',
-    ol.source.VectorTile.prototype.getState);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setAttributions',
-    ol.source.VectorTile.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'get',
-    ol.source.VectorTile.prototype.get);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getKeys',
-    ol.source.VectorTile.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getProperties',
-    ol.source.VectorTile.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'set',
-    ol.source.VectorTile.prototype.set);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setProperties',
-    ol.source.VectorTile.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'unset',
-    ol.source.VectorTile.prototype.unset);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'changed',
-    ol.source.VectorTile.prototype.changed);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'dispatchEvent',
-    ol.source.VectorTile.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getRevision',
-    ol.source.VectorTile.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'on',
-    ol.source.VectorTile.prototype.on);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'once',
-    ol.source.VectorTile.prototype.once);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'un',
-    ol.source.VectorTile.prototype.un);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.WMTS.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setTileGridForProjection',
-    ol.source.WMTS.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getTileLoadFunction',
-    ol.source.WMTS.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getTileUrlFunction',
-    ol.source.WMTS.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getUrls',
-    ol.source.WMTS.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setTileLoadFunction',
-    ol.source.WMTS.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setTileUrlFunction',
-    ol.source.WMTS.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setUrl',
-    ol.source.WMTS.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setUrls',
-    ol.source.WMTS.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getTileGrid',
-    ol.source.WMTS.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'refresh',
-    ol.source.WMTS.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getAttributions',
-    ol.source.WMTS.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getLogo',
-    ol.source.WMTS.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getProjection',
-    ol.source.WMTS.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getState',
-    ol.source.WMTS.prototype.getState);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setAttributions',
-    ol.source.WMTS.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'get',
-    ol.source.WMTS.prototype.get);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getKeys',
-    ol.source.WMTS.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getProperties',
-    ol.source.WMTS.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'set',
-    ol.source.WMTS.prototype.set);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setProperties',
-    ol.source.WMTS.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'unset',
-    ol.source.WMTS.prototype.unset);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'changed',
-    ol.source.WMTS.prototype.changed);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'dispatchEvent',
-    ol.source.WMTS.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getRevision',
-    ol.source.WMTS.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'on',
-    ol.source.WMTS.prototype.on);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'once',
-    ol.source.WMTS.prototype.once);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'un',
-    ol.source.WMTS.prototype.un);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.Zoomify.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setTileGridForProjection',
-    ol.source.Zoomify.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getTileLoadFunction',
-    ol.source.Zoomify.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getTileUrlFunction',
-    ol.source.Zoomify.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getUrls',
-    ol.source.Zoomify.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setTileLoadFunction',
-    ol.source.Zoomify.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setTileUrlFunction',
-    ol.source.Zoomify.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setUrl',
-    ol.source.Zoomify.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setUrls',
-    ol.source.Zoomify.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getTileGrid',
-    ol.source.Zoomify.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'refresh',
-    ol.source.Zoomify.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getAttributions',
-    ol.source.Zoomify.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getLogo',
-    ol.source.Zoomify.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getProjection',
-    ol.source.Zoomify.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getState',
-    ol.source.Zoomify.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setAttributions',
-    ol.source.Zoomify.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'get',
-    ol.source.Zoomify.prototype.get);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getKeys',
-    ol.source.Zoomify.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getProperties',
-    ol.source.Zoomify.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'set',
-    ol.source.Zoomify.prototype.set);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setProperties',
-    ol.source.Zoomify.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'unset',
-    ol.source.Zoomify.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'changed',
-    ol.source.Zoomify.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'dispatchEvent',
-    ol.source.Zoomify.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getRevision',
-    ol.source.Zoomify.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'on',
-    ol.source.Zoomify.prototype.on);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'once',
-    ol.source.Zoomify.prototype.once);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'un',
-    ol.source.Zoomify.prototype.un);
-
-goog.exportProperty(
-    ol.reproj.Tile.prototype,
-    'getTileCoord',
-    ol.reproj.Tile.prototype.getTileCoord);
-
-goog.exportProperty(
-    ol.reproj.Tile.prototype,
-    'load',
-    ol.reproj.Tile.prototype.load);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'changed',
-    ol.renderer.Layer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'dispatchEvent',
-    ol.renderer.Layer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'getRevision',
-    ol.renderer.Layer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'on',
-    ol.renderer.Layer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'once',
-    ol.renderer.Layer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'un',
-    ol.renderer.Layer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'changed',
-    ol.renderer.webgl.Layer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'dispatchEvent',
-    ol.renderer.webgl.Layer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'getRevision',
-    ol.renderer.webgl.Layer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'on',
-    ol.renderer.webgl.Layer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'once',
-    ol.renderer.webgl.Layer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'un',
-    ol.renderer.webgl.Layer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'changed',
-    ol.renderer.webgl.ImageLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.webgl.ImageLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'getRevision',
-    ol.renderer.webgl.ImageLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'on',
-    ol.renderer.webgl.ImageLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'once',
-    ol.renderer.webgl.ImageLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'un',
-    ol.renderer.webgl.ImageLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'changed',
-    ol.renderer.webgl.TileLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.webgl.TileLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'getRevision',
-    ol.renderer.webgl.TileLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'on',
-    ol.renderer.webgl.TileLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'once',
-    ol.renderer.webgl.TileLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'un',
-    ol.renderer.webgl.TileLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'changed',
-    ol.renderer.webgl.VectorLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.webgl.VectorLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'getRevision',
-    ol.renderer.webgl.VectorLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'on',
-    ol.renderer.webgl.VectorLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'once',
-    ol.renderer.webgl.VectorLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'un',
-    ol.renderer.webgl.VectorLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'changed',
-    ol.renderer.canvas.Layer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.Layer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'getRevision',
-    ol.renderer.canvas.Layer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'on',
-    ol.renderer.canvas.Layer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'once',
-    ol.renderer.canvas.Layer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'un',
-    ol.renderer.canvas.Layer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'changed',
-    ol.renderer.canvas.IntermediateCanvas.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.IntermediateCanvas.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'getRevision',
-    ol.renderer.canvas.IntermediateCanvas.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'on',
-    ol.renderer.canvas.IntermediateCanvas.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'once',
-    ol.renderer.canvas.IntermediateCanvas.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'un',
-    ol.renderer.canvas.IntermediateCanvas.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'changed',
-    ol.renderer.canvas.ImageLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.ImageLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'getRevision',
-    ol.renderer.canvas.ImageLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'on',
-    ol.renderer.canvas.ImageLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'once',
-    ol.renderer.canvas.ImageLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'un',
-    ol.renderer.canvas.ImageLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'changed',
-    ol.renderer.canvas.TileLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.TileLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'getRevision',
-    ol.renderer.canvas.TileLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'on',
-    ol.renderer.canvas.TileLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'once',
-    ol.renderer.canvas.TileLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'un',
-    ol.renderer.canvas.TileLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'changed',
-    ol.renderer.canvas.VectorLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.VectorLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'getRevision',
-    ol.renderer.canvas.VectorLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'on',
-    ol.renderer.canvas.VectorLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'once',
-    ol.renderer.canvas.VectorLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'un',
-    ol.renderer.canvas.VectorLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'changed',
-    ol.renderer.canvas.VectorTileLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.VectorTileLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'getRevision',
-    ol.renderer.canvas.VectorTileLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'on',
-    ol.renderer.canvas.VectorTileLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'once',
-    ol.renderer.canvas.VectorTileLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'un',
-    ol.renderer.canvas.VectorTileLayer.prototype.un);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'type',
-    ol.render.Event.prototype.type);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'target',
-    ol.render.Event.prototype.target);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'preventDefault',
-    ol.render.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'stopPropagation',
-    ol.render.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.pointer.PointerEvent.prototype,
-    'type',
-    ol.pointer.PointerEvent.prototype.type);
-
-goog.exportProperty(
-    ol.pointer.PointerEvent.prototype,
-    'target',
-    ol.pointer.PointerEvent.prototype.target);
-
-goog.exportProperty(
-    ol.pointer.PointerEvent.prototype,
-    'preventDefault',
-    ol.pointer.PointerEvent.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.pointer.PointerEvent.prototype,
-    'stopPropagation',
-    ol.pointer.PointerEvent.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'get',
-    ol.layer.Base.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getKeys',
-    ol.layer.Base.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getProperties',
-    ol.layer.Base.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'set',
-    ol.layer.Base.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setProperties',
-    ol.layer.Base.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'unset',
-    ol.layer.Base.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'changed',
-    ol.layer.Base.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'dispatchEvent',
-    ol.layer.Base.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getRevision',
-    ol.layer.Base.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'on',
-    ol.layer.Base.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'once',
-    ol.layer.Base.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'un',
-    ol.layer.Base.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getExtent',
-    ol.layer.Group.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getMaxResolution',
-    ol.layer.Group.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getMinResolution',
-    ol.layer.Group.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getOpacity',
-    ol.layer.Group.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getVisible',
-    ol.layer.Group.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getZIndex',
-    ol.layer.Group.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setExtent',
-    ol.layer.Group.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setMaxResolution',
-    ol.layer.Group.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setMinResolution',
-    ol.layer.Group.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setOpacity',
-    ol.layer.Group.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setVisible',
-    ol.layer.Group.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setZIndex',
-    ol.layer.Group.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'get',
-    ol.layer.Group.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getKeys',
-    ol.layer.Group.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getProperties',
-    ol.layer.Group.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'set',
-    ol.layer.Group.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setProperties',
-    ol.layer.Group.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'unset',
-    ol.layer.Group.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'changed',
-    ol.layer.Group.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'dispatchEvent',
-    ol.layer.Group.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getRevision',
-    ol.layer.Group.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'on',
-    ol.layer.Group.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'once',
-    ol.layer.Group.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'un',
-    ol.layer.Group.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getExtent',
-    ol.layer.Layer.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getMaxResolution',
-    ol.layer.Layer.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getMinResolution',
-    ol.layer.Layer.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getOpacity',
-    ol.layer.Layer.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getVisible',
-    ol.layer.Layer.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getZIndex',
-    ol.layer.Layer.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setExtent',
-    ol.layer.Layer.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setMaxResolution',
-    ol.layer.Layer.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setMinResolution',
-    ol.layer.Layer.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setOpacity',
-    ol.layer.Layer.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setVisible',
-    ol.layer.Layer.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setZIndex',
-    ol.layer.Layer.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'get',
-    ol.layer.Layer.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getKeys',
-    ol.layer.Layer.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getProperties',
-    ol.layer.Layer.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'set',
-    ol.layer.Layer.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setProperties',
-    ol.layer.Layer.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'unset',
-    ol.layer.Layer.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'changed',
-    ol.layer.Layer.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'dispatchEvent',
-    ol.layer.Layer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getRevision',
-    ol.layer.Layer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'on',
-    ol.layer.Layer.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'once',
-    ol.layer.Layer.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'un',
-    ol.layer.Layer.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setMap',
-    ol.layer.Vector.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setSource',
-    ol.layer.Vector.prototype.setSource);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getExtent',
-    ol.layer.Vector.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getMaxResolution',
-    ol.layer.Vector.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getMinResolution',
-    ol.layer.Vector.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getOpacity',
-    ol.layer.Vector.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getVisible',
-    ol.layer.Vector.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getZIndex',
-    ol.layer.Vector.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setExtent',
-    ol.layer.Vector.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setMaxResolution',
-    ol.layer.Vector.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setMinResolution',
-    ol.layer.Vector.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setOpacity',
-    ol.layer.Vector.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setVisible',
-    ol.layer.Vector.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setZIndex',
-    ol.layer.Vector.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'get',
-    ol.layer.Vector.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getKeys',
-    ol.layer.Vector.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getProperties',
-    ol.layer.Vector.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'set',
-    ol.layer.Vector.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setProperties',
-    ol.layer.Vector.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'unset',
-    ol.layer.Vector.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'changed',
-    ol.layer.Vector.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'dispatchEvent',
-    ol.layer.Vector.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getRevision',
-    ol.layer.Vector.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'on',
-    ol.layer.Vector.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'once',
-    ol.layer.Vector.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'un',
-    ol.layer.Vector.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getSource',
-    ol.layer.Heatmap.prototype.getSource);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getStyle',
-    ol.layer.Heatmap.prototype.getStyle);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getStyleFunction',
-    ol.layer.Heatmap.prototype.getStyleFunction);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setStyle',
-    ol.layer.Heatmap.prototype.setStyle);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setMap',
-    ol.layer.Heatmap.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setSource',
-    ol.layer.Heatmap.prototype.setSource);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getExtent',
-    ol.layer.Heatmap.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getMaxResolution',
-    ol.layer.Heatmap.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getMinResolution',
-    ol.layer.Heatmap.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getOpacity',
-    ol.layer.Heatmap.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getVisible',
-    ol.layer.Heatmap.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getZIndex',
-    ol.layer.Heatmap.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setExtent',
-    ol.layer.Heatmap.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setMaxResolution',
-    ol.layer.Heatmap.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setMinResolution',
-    ol.layer.Heatmap.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setOpacity',
-    ol.layer.Heatmap.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setVisible',
-    ol.layer.Heatmap.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setZIndex',
-    ol.layer.Heatmap.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'get',
-    ol.layer.Heatmap.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getKeys',
-    ol.layer.Heatmap.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getProperties',
-    ol.layer.Heatmap.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'set',
-    ol.layer.Heatmap.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setProperties',
-    ol.layer.Heatmap.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'unset',
-    ol.layer.Heatmap.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'changed',
-    ol.layer.Heatmap.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'dispatchEvent',
-    ol.layer.Heatmap.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getRevision',
-    ol.layer.Heatmap.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'on',
-    ol.layer.Heatmap.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'once',
-    ol.layer.Heatmap.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'un',
-    ol.layer.Heatmap.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setMap',
-    ol.layer.Image.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setSource',
-    ol.layer.Image.prototype.setSource);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getExtent',
-    ol.layer.Image.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getMaxResolution',
-    ol.layer.Image.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getMinResolution',
-    ol.layer.Image.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getOpacity',
-    ol.layer.Image.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getVisible',
-    ol.layer.Image.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getZIndex',
-    ol.layer.Image.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setExtent',
-    ol.layer.Image.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setMaxResolution',
-    ol.layer.Image.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setMinResolution',
-    ol.layer.Image.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setOpacity',
-    ol.layer.Image.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setVisible',
-    ol.layer.Image.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setZIndex',
-    ol.layer.Image.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'get',
-    ol.layer.Image.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getKeys',
-    ol.layer.Image.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getProperties',
-    ol.layer.Image.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'set',
-    ol.layer.Image.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setProperties',
-    ol.layer.Image.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'unset',
-    ol.layer.Image.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'changed',
-    ol.layer.Image.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'dispatchEvent',
-    ol.layer.Image.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getRevision',
-    ol.layer.Image.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'on',
-    ol.layer.Image.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'once',
-    ol.layer.Image.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'un',
-    ol.layer.Image.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setMap',
-    ol.layer.Tile.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setSource',
-    ol.layer.Tile.prototype.setSource);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getExtent',
-    ol.layer.Tile.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getMaxResolution',
-    ol.layer.Tile.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getMinResolution',
-    ol.layer.Tile.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getOpacity',
-    ol.layer.Tile.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getVisible',
-    ol.layer.Tile.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getZIndex',
-    ol.layer.Tile.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setExtent',
-    ol.layer.Tile.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setMaxResolution',
-    ol.layer.Tile.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setMinResolution',
-    ol.layer.Tile.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setOpacity',
-    ol.layer.Tile.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setVisible',
-    ol.layer.Tile.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setZIndex',
-    ol.layer.Tile.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'get',
-    ol.layer.Tile.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getKeys',
-    ol.layer.Tile.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getProperties',
-    ol.layer.Tile.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'set',
-    ol.layer.Tile.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setProperties',
-    ol.layer.Tile.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'unset',
-    ol.layer.Tile.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'changed',
-    ol.layer.Tile.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'dispatchEvent',
-    ol.layer.Tile.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getRevision',
-    ol.layer.Tile.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'on',
-    ol.layer.Tile.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'once',
-    ol.layer.Tile.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'un',
-    ol.layer.Tile.prototype.un);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getSource',
-    ol.layer.VectorTile.prototype.getSource);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getStyle',
-    ol.layer.VectorTile.prototype.getStyle);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getStyleFunction',
-    ol.layer.VectorTile.prototype.getStyleFunction);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setStyle',
-    ol.layer.VectorTile.prototype.setStyle);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setMap',
-    ol.layer.VectorTile.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setSource',
-    ol.layer.VectorTile.prototype.setSource);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getExtent',
-    ol.layer.VectorTile.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getMaxResolution',
-    ol.layer.VectorTile.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getMinResolution',
-    ol.layer.VectorTile.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getOpacity',
-    ol.layer.VectorTile.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getVisible',
-    ol.layer.VectorTile.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getZIndex',
-    ol.layer.VectorTile.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setExtent',
-    ol.layer.VectorTile.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setMaxResolution',
-    ol.layer.VectorTile.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setMinResolution',
-    ol.layer.VectorTile.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setOpacity',
-    ol.layer.VectorTile.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setVisible',
-    ol.layer.VectorTile.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setZIndex',
-    ol.layer.VectorTile.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'get',
-    ol.layer.VectorTile.prototype.get);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getKeys',
-    ol.layer.VectorTile.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getProperties',
-    ol.layer.VectorTile.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'set',
-    ol.layer.VectorTile.prototype.set);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setProperties',
-    ol.layer.VectorTile.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'unset',
-    ol.layer.VectorTile.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'changed',
-    ol.layer.VectorTile.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'dispatchEvent',
-    ol.layer.VectorTile.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getRevision',
-    ol.layer.VectorTile.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'on',
-    ol.layer.VectorTile.prototype.on);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'once',
-    ol.layer.VectorTile.prototype.once);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'un',
-    ol.layer.VectorTile.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'get',
-    ol.interaction.Interaction.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'getKeys',
-    ol.interaction.Interaction.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'getProperties',
-    ol.interaction.Interaction.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'set',
-    ol.interaction.Interaction.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'setProperties',
-    ol.interaction.Interaction.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'unset',
-    ol.interaction.Interaction.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'changed',
-    ol.interaction.Interaction.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'dispatchEvent',
-    ol.interaction.Interaction.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'getRevision',
-    ol.interaction.Interaction.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'on',
-    ol.interaction.Interaction.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'once',
-    ol.interaction.Interaction.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'un',
-    ol.interaction.Interaction.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'getActive',
-    ol.interaction.DoubleClickZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'getMap',
-    ol.interaction.DoubleClickZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'setActive',
-    ol.interaction.DoubleClickZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'get',
-    ol.interaction.DoubleClickZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'getKeys',
-    ol.interaction.DoubleClickZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'getProperties',
-    ol.interaction.DoubleClickZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'set',
-    ol.interaction.DoubleClickZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'setProperties',
-    ol.interaction.DoubleClickZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'unset',
-    ol.interaction.DoubleClickZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'changed',
-    ol.interaction.DoubleClickZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.DoubleClickZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'getRevision',
-    ol.interaction.DoubleClickZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'on',
-    ol.interaction.DoubleClickZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'once',
-    ol.interaction.DoubleClickZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'un',
-    ol.interaction.DoubleClickZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'getActive',
-    ol.interaction.DragAndDrop.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'getMap',
-    ol.interaction.DragAndDrop.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'setActive',
-    ol.interaction.DragAndDrop.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'get',
-    ol.interaction.DragAndDrop.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'getKeys',
-    ol.interaction.DragAndDrop.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'getProperties',
-    ol.interaction.DragAndDrop.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'set',
-    ol.interaction.DragAndDrop.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'setProperties',
-    ol.interaction.DragAndDrop.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'unset',
-    ol.interaction.DragAndDrop.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'changed',
-    ol.interaction.DragAndDrop.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'dispatchEvent',
-    ol.interaction.DragAndDrop.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'getRevision',
-    ol.interaction.DragAndDrop.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'on',
-    ol.interaction.DragAndDrop.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'once',
-    ol.interaction.DragAndDrop.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'un',
-    ol.interaction.DragAndDrop.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'type',
-    ol.interaction.DragAndDrop.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'target',
-    ol.interaction.DragAndDrop.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'preventDefault',
-    ol.interaction.DragAndDrop.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'stopPropagation',
-    ol.interaction.DragAndDrop.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'getActive',
-    ol.interaction.Pointer.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'getMap',
-    ol.interaction.Pointer.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'setActive',
-    ol.interaction.Pointer.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'get',
-    ol.interaction.Pointer.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'getKeys',
-    ol.interaction.Pointer.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'getProperties',
-    ol.interaction.Pointer.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'set',
-    ol.interaction.Pointer.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'setProperties',
-    ol.interaction.Pointer.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'unset',
-    ol.interaction.Pointer.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'changed',
-    ol.interaction.Pointer.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'dispatchEvent',
-    ol.interaction.Pointer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'getRevision',
-    ol.interaction.Pointer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'on',
-    ol.interaction.Pointer.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'once',
-    ol.interaction.Pointer.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'un',
-    ol.interaction.Pointer.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getActive',
-    ol.interaction.DragBox.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getMap',
-    ol.interaction.DragBox.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'setActive',
-    ol.interaction.DragBox.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'get',
-    ol.interaction.DragBox.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getKeys',
-    ol.interaction.DragBox.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getProperties',
-    ol.interaction.DragBox.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'set',
-    ol.interaction.DragBox.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'setProperties',
-    ol.interaction.DragBox.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'unset',
-    ol.interaction.DragBox.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'changed',
-    ol.interaction.DragBox.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'dispatchEvent',
-    ol.interaction.DragBox.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getRevision',
-    ol.interaction.DragBox.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'on',
-    ol.interaction.DragBox.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'once',
-    ol.interaction.DragBox.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'un',
-    ol.interaction.DragBox.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'type',
-    ol.interaction.DragBox.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'target',
-    ol.interaction.DragBox.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'preventDefault',
-    ol.interaction.DragBox.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'stopPropagation',
-    ol.interaction.DragBox.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'getActive',
-    ol.interaction.DragPan.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'getMap',
-    ol.interaction.DragPan.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'setActive',
-    ol.interaction.DragPan.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'get',
-    ol.interaction.DragPan.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'getKeys',
-    ol.interaction.DragPan.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'getProperties',
-    ol.interaction.DragPan.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'set',
-    ol.interaction.DragPan.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'setProperties',
-    ol.interaction.DragPan.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'unset',
-    ol.interaction.DragPan.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'changed',
-    ol.interaction.DragPan.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'dispatchEvent',
-    ol.interaction.DragPan.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'getRevision',
-    ol.interaction.DragPan.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'on',
-    ol.interaction.DragPan.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'once',
-    ol.interaction.DragPan.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'un',
-    ol.interaction.DragPan.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'getActive',
-    ol.interaction.DragRotate.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'getMap',
-    ol.interaction.DragRotate.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'setActive',
-    ol.interaction.DragRotate.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'get',
-    ol.interaction.DragRotate.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'getKeys',
-    ol.interaction.DragRotate.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'getProperties',
-    ol.interaction.DragRotate.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'set',
-    ol.interaction.DragRotate.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'setProperties',
-    ol.interaction.DragRotate.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'unset',
-    ol.interaction.DragRotate.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'changed',
-    ol.interaction.DragRotate.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'dispatchEvent',
-    ol.interaction.DragRotate.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'getRevision',
-    ol.interaction.DragRotate.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'on',
-    ol.interaction.DragRotate.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'once',
-    ol.interaction.DragRotate.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'un',
-    ol.interaction.DragRotate.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'getActive',
-    ol.interaction.DragRotateAndZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'getMap',
-    ol.interaction.DragRotateAndZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'setActive',
-    ol.interaction.DragRotateAndZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'get',
-    ol.interaction.DragRotateAndZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'getKeys',
-    ol.interaction.DragRotateAndZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'getProperties',
-    ol.interaction.DragRotateAndZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'set',
-    ol.interaction.DragRotateAndZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'setProperties',
-    ol.interaction.DragRotateAndZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'unset',
-    ol.interaction.DragRotateAndZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'changed',
-    ol.interaction.DragRotateAndZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.DragRotateAndZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'getRevision',
-    ol.interaction.DragRotateAndZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'on',
-    ol.interaction.DragRotateAndZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'once',
-    ol.interaction.DragRotateAndZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'un',
-    ol.interaction.DragRotateAndZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getGeometry',
-    ol.interaction.DragZoom.prototype.getGeometry);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getActive',
-    ol.interaction.DragZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getMap',
-    ol.interaction.DragZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'setActive',
-    ol.interaction.DragZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'get',
-    ol.interaction.DragZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getKeys',
-    ol.interaction.DragZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getProperties',
-    ol.interaction.DragZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'set',
-    ol.interaction.DragZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'setProperties',
-    ol.interaction.DragZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'unset',
-    ol.interaction.DragZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'changed',
-    ol.interaction.DragZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.DragZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getRevision',
-    ol.interaction.DragZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'on',
-    ol.interaction.DragZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'once',
-    ol.interaction.DragZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'un',
-    ol.interaction.DragZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'getActive',
-    ol.interaction.Draw.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'getMap',
-    ol.interaction.Draw.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'setActive',
-    ol.interaction.Draw.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'get',
-    ol.interaction.Draw.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'getKeys',
-    ol.interaction.Draw.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'getProperties',
-    ol.interaction.Draw.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'set',
-    ol.interaction.Draw.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'setProperties',
-    ol.interaction.Draw.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'unset',
-    ol.interaction.Draw.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'changed',
-    ol.interaction.Draw.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'dispatchEvent',
-    ol.interaction.Draw.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'getRevision',
-    ol.interaction.Draw.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'on',
-    ol.interaction.Draw.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'once',
-    ol.interaction.Draw.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'un',
-    ol.interaction.Draw.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Draw.Event.prototype,
-    'type',
-    ol.interaction.Draw.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.Draw.Event.prototype,
-    'target',
-    ol.interaction.Draw.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.Draw.Event.prototype,
-    'preventDefault',
-    ol.interaction.Draw.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.Draw.Event.prototype,
-    'stopPropagation',
-    ol.interaction.Draw.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getActive',
-    ol.interaction.Extent.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getMap',
-    ol.interaction.Extent.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'setActive',
-    ol.interaction.Extent.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'get',
-    ol.interaction.Extent.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getKeys',
-    ol.interaction.Extent.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getProperties',
-    ol.interaction.Extent.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'set',
-    ol.interaction.Extent.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'setProperties',
-    ol.interaction.Extent.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'unset',
-    ol.interaction.Extent.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'changed',
-    ol.interaction.Extent.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'dispatchEvent',
-    ol.interaction.Extent.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getRevision',
-    ol.interaction.Extent.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'on',
-    ol.interaction.Extent.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'once',
-    ol.interaction.Extent.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'un',
-    ol.interaction.Extent.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Extent.Event.prototype,
-    'type',
-    ol.interaction.Extent.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.Extent.Event.prototype,
-    'target',
-    ol.interaction.Extent.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.Extent.Event.prototype,
-    'preventDefault',
-    ol.interaction.Extent.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.Extent.Event.prototype,
-    'stopPropagation',
-    ol.interaction.Extent.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'getActive',
-    ol.interaction.KeyboardPan.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'getMap',
-    ol.interaction.KeyboardPan.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'setActive',
-    ol.interaction.KeyboardPan.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'get',
-    ol.interaction.KeyboardPan.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'getKeys',
-    ol.interaction.KeyboardPan.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'getProperties',
-    ol.interaction.KeyboardPan.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'set',
-    ol.interaction.KeyboardPan.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'setProperties',
-    ol.interaction.KeyboardPan.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'unset',
-    ol.interaction.KeyboardPan.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'changed',
-    ol.interaction.KeyboardPan.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'dispatchEvent',
-    ol.interaction.KeyboardPan.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'getRevision',
-    ol.interaction.KeyboardPan.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'on',
-    ol.interaction.KeyboardPan.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'once',
-    ol.interaction.KeyboardPan.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'un',
-    ol.interaction.KeyboardPan.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'getActive',
-    ol.interaction.KeyboardZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'getMap',
-    ol.interaction.KeyboardZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'setActive',
-    ol.interaction.KeyboardZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'get',
-    ol.interaction.KeyboardZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'getKeys',
-    ol.interaction.KeyboardZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'getProperties',
-    ol.interaction.KeyboardZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'set',
-    ol.interaction.KeyboardZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'setProperties',
-    ol.interaction.KeyboardZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'unset',
-    ol.interaction.KeyboardZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'changed',
-    ol.interaction.KeyboardZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.KeyboardZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'getRevision',
-    ol.interaction.KeyboardZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'on',
-    ol.interaction.KeyboardZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'once',
-    ol.interaction.KeyboardZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'un',
-    ol.interaction.KeyboardZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'getActive',
-    ol.interaction.Modify.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'getMap',
-    ol.interaction.Modify.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'setActive',
-    ol.interaction.Modify.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'get',
-    ol.interaction.Modify.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'getKeys',
-    ol.interaction.Modify.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'getProperties',
-    ol.interaction.Modify.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'set',
-    ol.interaction.Modify.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'setProperties',
-    ol.interaction.Modify.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'unset',
-    ol.interaction.Modify.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'changed',
-    ol.interaction.Modify.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'dispatchEvent',
-    ol.interaction.Modify.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'getRevision',
-    ol.interaction.Modify.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'on',
-    ol.interaction.Modify.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'once',
-    ol.interaction.Modify.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'un',
-    ol.interaction.Modify.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'type',
-    ol.interaction.Modify.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'target',
-    ol.interaction.Modify.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'preventDefault',
-    ol.interaction.Modify.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'stopPropagation',
-    ol.interaction.Modify.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'getActive',
-    ol.interaction.MouseWheelZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'getMap',
-    ol.interaction.MouseWheelZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'setActive',
-    ol.interaction.MouseWheelZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'get',
-    ol.interaction.MouseWheelZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'getKeys',
-    ol.interaction.MouseWheelZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'getProperties',
-    ol.interaction.MouseWheelZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'set',
-    ol.interaction.MouseWheelZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'setProperties',
-    ol.interaction.MouseWheelZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'unset',
-    ol.interaction.MouseWheelZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'changed',
-    ol.interaction.MouseWheelZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.MouseWheelZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'getRevision',
-    ol.interaction.MouseWheelZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'on',
-    ol.interaction.MouseWheelZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'once',
-    ol.interaction.MouseWheelZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'un',
-    ol.interaction.MouseWheelZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'getActive',
-    ol.interaction.PinchRotate.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'getMap',
-    ol.interaction.PinchRotate.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'setActive',
-    ol.interaction.PinchRotate.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'get',
-    ol.interaction.PinchRotate.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'getKeys',
-    ol.interaction.PinchRotate.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'getProperties',
-    ol.interaction.PinchRotate.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'set',
-    ol.interaction.PinchRotate.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'setProperties',
-    ol.interaction.PinchRotate.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'unset',
-    ol.interaction.PinchRotate.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'changed',
-    ol.interaction.PinchRotate.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'dispatchEvent',
-    ol.interaction.PinchRotate.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'getRevision',
-    ol.interaction.PinchRotate.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'on',
-    ol.interaction.PinchRotate.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'once',
-    ol.interaction.PinchRotate.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'un',
-    ol.interaction.PinchRotate.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'getActive',
-    ol.interaction.PinchZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'getMap',
-    ol.interaction.PinchZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'setActive',
-    ol.interaction.PinchZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'get',
-    ol.interaction.PinchZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'getKeys',
-    ol.interaction.PinchZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'getProperties',
-    ol.interaction.PinchZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'set',
-    ol.interaction.PinchZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'setProperties',
-    ol.interaction.PinchZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'unset',
-    ol.interaction.PinchZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'changed',
-    ol.interaction.PinchZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.PinchZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'getRevision',
-    ol.interaction.PinchZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'on',
-    ol.interaction.PinchZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'once',
-    ol.interaction.PinchZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'un',
-    ol.interaction.PinchZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getActive',
-    ol.interaction.Select.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getMap',
-    ol.interaction.Select.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'setActive',
-    ol.interaction.Select.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'get',
-    ol.interaction.Select.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getKeys',
-    ol.interaction.Select.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getProperties',
-    ol.interaction.Select.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'set',
-    ol.interaction.Select.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'setProperties',
-    ol.interaction.Select.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'unset',
-    ol.interaction.Select.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'changed',
-    ol.interaction.Select.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'dispatchEvent',
-    ol.interaction.Select.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getRevision',
-    ol.interaction.Select.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'on',
-    ol.interaction.Select.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'once',
-    ol.interaction.Select.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'un',
-    ol.interaction.Select.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'type',
-    ol.interaction.Select.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'target',
-    ol.interaction.Select.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'preventDefault',
-    ol.interaction.Select.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'stopPropagation',
-    ol.interaction.Select.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'getActive',
-    ol.interaction.Snap.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'getMap',
-    ol.interaction.Snap.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'setActive',
-    ol.interaction.Snap.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'get',
-    ol.interaction.Snap.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'getKeys',
-    ol.interaction.Snap.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'getProperties',
-    ol.interaction.Snap.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'set',
-    ol.interaction.Snap.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'setProperties',
-    ol.interaction.Snap.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'unset',
-    ol.interaction.Snap.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'changed',
-    ol.interaction.Snap.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'dispatchEvent',
-    ol.interaction.Snap.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'getRevision',
-    ol.interaction.Snap.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'on',
-    ol.interaction.Snap.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'once',
-    ol.interaction.Snap.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'un',
-    ol.interaction.Snap.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getActive',
-    ol.interaction.Translate.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getMap',
-    ol.interaction.Translate.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'setActive',
-    ol.interaction.Translate.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'get',
-    ol.interaction.Translate.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getKeys',
-    ol.interaction.Translate.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getProperties',
-    ol.interaction.Translate.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'set',
-    ol.interaction.Translate.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'setProperties',
-    ol.interaction.Translate.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'unset',
-    ol.interaction.Translate.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'changed',
-    ol.interaction.Translate.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'dispatchEvent',
-    ol.interaction.Translate.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getRevision',
-    ol.interaction.Translate.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'on',
-    ol.interaction.Translate.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'once',
-    ol.interaction.Translate.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'un',
-    ol.interaction.Translate.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'type',
-    ol.interaction.Translate.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'target',
-    ol.interaction.Translate.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'preventDefault',
-    ol.interaction.Translate.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'stopPropagation',
-    ol.interaction.Translate.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'get',
-    ol.geom.Geometry.prototype.get);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'getKeys',
-    ol.geom.Geometry.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'getProperties',
-    ol.geom.Geometry.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'set',
-    ol.geom.Geometry.prototype.set);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'setProperties',
-    ol.geom.Geometry.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'unset',
-    ol.geom.Geometry.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'changed',
-    ol.geom.Geometry.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'dispatchEvent',
-    ol.geom.Geometry.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'getRevision',
-    ol.geom.Geometry.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'on',
-    ol.geom.Geometry.prototype.on);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'once',
-    ol.geom.Geometry.prototype.once);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'un',
-    ol.geom.Geometry.prototype.un);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getClosestPoint',
-    ol.geom.SimpleGeometry.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'intersectsCoordinate',
-    ol.geom.SimpleGeometry.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getExtent',
-    ol.geom.SimpleGeometry.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'rotate',
-    ol.geom.SimpleGeometry.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'scale',
-    ol.geom.SimpleGeometry.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'simplify',
-    ol.geom.SimpleGeometry.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'transform',
-    ol.geom.SimpleGeometry.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'get',
-    ol.geom.SimpleGeometry.prototype.get);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getKeys',
-    ol.geom.SimpleGeometry.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getProperties',
-    ol.geom.SimpleGeometry.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'set',
-    ol.geom.SimpleGeometry.prototype.set);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'setProperties',
-    ol.geom.SimpleGeometry.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'unset',
-    ol.geom.SimpleGeometry.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'changed',
-    ol.geom.SimpleGeometry.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'dispatchEvent',
-    ol.geom.SimpleGeometry.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getRevision',
-    ol.geom.SimpleGeometry.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'on',
-    ol.geom.SimpleGeometry.prototype.on);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'once',
-    ol.geom.SimpleGeometry.prototype.once);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'un',
-    ol.geom.SimpleGeometry.prototype.un);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getFirstCoordinate',
-    ol.geom.Circle.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getLastCoordinate',
-    ol.geom.Circle.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getLayout',
-    ol.geom.Circle.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'rotate',
-    ol.geom.Circle.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'scale',
-    ol.geom.Circle.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getClosestPoint',
-    ol.geom.Circle.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'intersectsCoordinate',
-    ol.geom.Circle.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getExtent',
-    ol.geom.Circle.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'simplify',
-    ol.geom.Circle.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'get',
-    ol.geom.Circle.prototype.get);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getKeys',
-    ol.geom.Circle.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getProperties',
-    ol.geom.Circle.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'set',
-    ol.geom.Circle.prototype.set);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'setProperties',
-    ol.geom.Circle.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'unset',
-    ol.geom.Circle.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'changed',
-    ol.geom.Circle.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'dispatchEvent',
-    ol.geom.Circle.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getRevision',
-    ol.geom.Circle.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'on',
-    ol.geom.Circle.prototype.on);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'once',
-    ol.geom.Circle.prototype.once);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'un',
-    ol.geom.Circle.prototype.un);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getClosestPoint',
-    ol.geom.GeometryCollection.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'intersectsCoordinate',
-    ol.geom.GeometryCollection.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getExtent',
-    ol.geom.GeometryCollection.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'rotate',
-    ol.geom.GeometryCollection.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'scale',
-    ol.geom.GeometryCollection.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'simplify',
-    ol.geom.GeometryCollection.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'transform',
-    ol.geom.GeometryCollection.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'get',
-    ol.geom.GeometryCollection.prototype.get);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getKeys',
-    ol.geom.GeometryCollection.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getProperties',
-    ol.geom.GeometryCollection.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'set',
-    ol.geom.GeometryCollection.prototype.set);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'setProperties',
-    ol.geom.GeometryCollection.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'unset',
-    ol.geom.GeometryCollection.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'changed',
-    ol.geom.GeometryCollection.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'dispatchEvent',
-    ol.geom.GeometryCollection.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getRevision',
-    ol.geom.GeometryCollection.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'on',
-    ol.geom.GeometryCollection.prototype.on);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'once',
-    ol.geom.GeometryCollection.prototype.once);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'un',
-    ol.geom.GeometryCollection.prototype.un);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getFirstCoordinate',
-    ol.geom.LinearRing.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getLastCoordinate',
-    ol.geom.LinearRing.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getLayout',
-    ol.geom.LinearRing.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'rotate',
-    ol.geom.LinearRing.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'scale',
-    ol.geom.LinearRing.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getClosestPoint',
-    ol.geom.LinearRing.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'intersectsCoordinate',
-    ol.geom.LinearRing.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getExtent',
-    ol.geom.LinearRing.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'simplify',
-    ol.geom.LinearRing.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'transform',
-    ol.geom.LinearRing.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'get',
-    ol.geom.LinearRing.prototype.get);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getKeys',
-    ol.geom.LinearRing.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getProperties',
-    ol.geom.LinearRing.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'set',
-    ol.geom.LinearRing.prototype.set);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'setProperties',
-    ol.geom.LinearRing.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'unset',
-    ol.geom.LinearRing.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'changed',
-    ol.geom.LinearRing.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'dispatchEvent',
-    ol.geom.LinearRing.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getRevision',
-    ol.geom.LinearRing.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'on',
-    ol.geom.LinearRing.prototype.on);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'once',
-    ol.geom.LinearRing.prototype.once);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'un',
-    ol.geom.LinearRing.prototype.un);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getFirstCoordinate',
-    ol.geom.LineString.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getLastCoordinate',
-    ol.geom.LineString.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getLayout',
-    ol.geom.LineString.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'rotate',
-    ol.geom.LineString.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'scale',
-    ol.geom.LineString.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getClosestPoint',
-    ol.geom.LineString.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'intersectsCoordinate',
-    ol.geom.LineString.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getExtent',
-    ol.geom.LineString.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'simplify',
-    ol.geom.LineString.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'transform',
-    ol.geom.LineString.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'get',
-    ol.geom.LineString.prototype.get);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getKeys',
-    ol.geom.LineString.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getProperties',
-    ol.geom.LineString.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'set',
-    ol.geom.LineString.prototype.set);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'setProperties',
-    ol.geom.LineString.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'unset',
-    ol.geom.LineString.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'changed',
-    ol.geom.LineString.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'dispatchEvent',
-    ol.geom.LineString.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getRevision',
-    ol.geom.LineString.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'on',
-    ol.geom.LineString.prototype.on);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'once',
-    ol.geom.LineString.prototype.once);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'un',
-    ol.geom.LineString.prototype.un);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getFirstCoordinate',
-    ol.geom.MultiLineString.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getLastCoordinate',
-    ol.geom.MultiLineString.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getLayout',
-    ol.geom.MultiLineString.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'rotate',
-    ol.geom.MultiLineString.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'scale',
-    ol.geom.MultiLineString.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getClosestPoint',
-    ol.geom.MultiLineString.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'intersectsCoordinate',
-    ol.geom.MultiLineString.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getExtent',
-    ol.geom.MultiLineString.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'simplify',
-    ol.geom.MultiLineString.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'transform',
-    ol.geom.MultiLineString.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'get',
-    ol.geom.MultiLineString.prototype.get);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getKeys',
-    ol.geom.MultiLineString.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getProperties',
-    ol.geom.MultiLineString.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'set',
-    ol.geom.MultiLineString.prototype.set);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'setProperties',
-    ol.geom.MultiLineString.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'unset',
-    ol.geom.MultiLineString.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'changed',
-    ol.geom.MultiLineString.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'dispatchEvent',
-    ol.geom.MultiLineString.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getRevision',
-    ol.geom.MultiLineString.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'on',
-    ol.geom.MultiLineString.prototype.on);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'once',
-    ol.geom.MultiLineString.prototype.once);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'un',
-    ol.geom.MultiLineString.prototype.un);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getFirstCoordinate',
-    ol.geom.MultiPoint.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getLastCoordinate',
-    ol.geom.MultiPoint.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getLayout',
-    ol.geom.MultiPoint.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'rotate',
-    ol.geom.MultiPoint.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'scale',
-    ol.geom.MultiPoint.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getClosestPoint',
-    ol.geom.MultiPoint.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'intersectsCoordinate',
-    ol.geom.MultiPoint.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getExtent',
-    ol.geom.MultiPoint.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'simplify',
-    ol.geom.MultiPoint.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'transform',
-    ol.geom.MultiPoint.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'get',
-    ol.geom.MultiPoint.prototype.get);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getKeys',
-    ol.geom.MultiPoint.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getProperties',
-    ol.geom.MultiPoint.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'set',
-    ol.geom.MultiPoint.prototype.set);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'setProperties',
-    ol.geom.MultiPoint.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'unset',
-    ol.geom.MultiPoint.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'changed',
-    ol.geom.MultiPoint.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'dispatchEvent',
-    ol.geom.MultiPoint.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getRevision',
-    ol.geom.MultiPoint.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'on',
-    ol.geom.MultiPoint.prototype.on);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'once',
-    ol.geom.MultiPoint.prototype.once);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'un',
-    ol.geom.MultiPoint.prototype.un);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getFirstCoordinate',
-    ol.geom.MultiPolygon.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getLastCoordinate',
-    ol.geom.MultiPolygon.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getLayout',
-    ol.geom.MultiPolygon.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'rotate',
-    ol.geom.MultiPolygon.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'scale',
-    ol.geom.MultiPolygon.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getClosestPoint',
-    ol.geom.MultiPolygon.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'intersectsCoordinate',
-    ol.geom.MultiPolygon.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getExtent',
-    ol.geom.MultiPolygon.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'simplify',
-    ol.geom.MultiPolygon.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'transform',
-    ol.geom.MultiPolygon.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'get',
-    ol.geom.MultiPolygon.prototype.get);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getKeys',
-    ol.geom.MultiPolygon.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getProperties',
-    ol.geom.MultiPolygon.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'set',
-    ol.geom.MultiPolygon.prototype.set);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'setProperties',
-    ol.geom.MultiPolygon.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'unset',
-    ol.geom.MultiPolygon.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'changed',
-    ol.geom.MultiPolygon.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'dispatchEvent',
-    ol.geom.MultiPolygon.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getRevision',
-    ol.geom.MultiPolygon.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'on',
-    ol.geom.MultiPolygon.prototype.on);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'once',
-    ol.geom.MultiPolygon.prototype.once);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'un',
-    ol.geom.MultiPolygon.prototype.un);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getFirstCoordinate',
-    ol.geom.Point.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getLastCoordinate',
-    ol.geom.Point.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getLayout',
-    ol.geom.Point.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'rotate',
-    ol.geom.Point.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'scale',
-    ol.geom.Point.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getClosestPoint',
-    ol.geom.Point.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'intersectsCoordinate',
-    ol.geom.Point.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getExtent',
-    ol.geom.Point.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'simplify',
-    ol.geom.Point.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'transform',
-    ol.geom.Point.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'get',
-    ol.geom.Point.prototype.get);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getKeys',
-    ol.geom.Point.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getProperties',
-    ol.geom.Point.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'set',
-    ol.geom.Point.prototype.set);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'setProperties',
-    ol.geom.Point.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'unset',
-    ol.geom.Point.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'changed',
-    ol.geom.Point.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'dispatchEvent',
-    ol.geom.Point.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getRevision',
-    ol.geom.Point.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'on',
-    ol.geom.Point.prototype.on);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'once',
-    ol.geom.Point.prototype.once);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'un',
-    ol.geom.Point.prototype.un);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getFirstCoordinate',
-    ol.geom.Polygon.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getLastCoordinate',
-    ol.geom.Polygon.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getLayout',
-    ol.geom.Polygon.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'rotate',
-    ol.geom.Polygon.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'scale',
-    ol.geom.Polygon.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getClosestPoint',
-    ol.geom.Polygon.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'intersectsCoordinate',
-    ol.geom.Polygon.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getExtent',
-    ol.geom.Polygon.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'simplify',
-    ol.geom.Polygon.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'transform',
-    ol.geom.Polygon.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'get',
-    ol.geom.Polygon.prototype.get);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getKeys',
-    ol.geom.Polygon.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getProperties',
-    ol.geom.Polygon.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'set',
-    ol.geom.Polygon.prototype.set);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'setProperties',
-    ol.geom.Polygon.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'unset',
-    ol.geom.Polygon.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'changed',
-    ol.geom.Polygon.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'dispatchEvent',
-    ol.geom.Polygon.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getRevision',
-    ol.geom.Polygon.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'on',
-    ol.geom.Polygon.prototype.on);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'once',
-    ol.geom.Polygon.prototype.once);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'un',
-    ol.geom.Polygon.prototype.un);
-
-goog.exportProperty(
-    ol.format.GML.prototype,
-    'readFeatures',
-    ol.format.GML.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.GML2.prototype,
-    'readFeatures',
-    ol.format.GML2.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.GML3.prototype,
-    'readFeatures',
-    ol.format.GML3.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'get',
-    ol.control.Control.prototype.get);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'getKeys',
-    ol.control.Control.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'getProperties',
-    ol.control.Control.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'set',
-    ol.control.Control.prototype.set);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'setProperties',
-    ol.control.Control.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'unset',
-    ol.control.Control.prototype.unset);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'changed',
-    ol.control.Control.prototype.changed);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'dispatchEvent',
-    ol.control.Control.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'getRevision',
-    ol.control.Control.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'on',
-    ol.control.Control.prototype.on);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'once',
-    ol.control.Control.prototype.once);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'un',
-    ol.control.Control.prototype.un);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getMap',
-    ol.control.Attribution.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'setMap',
-    ol.control.Attribution.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'setTarget',
-    ol.control.Attribution.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'get',
-    ol.control.Attribution.prototype.get);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getKeys',
-    ol.control.Attribution.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getProperties',
-    ol.control.Attribution.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'set',
-    ol.control.Attribution.prototype.set);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'setProperties',
-    ol.control.Attribution.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'unset',
-    ol.control.Attribution.prototype.unset);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'changed',
-    ol.control.Attribution.prototype.changed);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'dispatchEvent',
-    ol.control.Attribution.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getRevision',
-    ol.control.Attribution.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'on',
-    ol.control.Attribution.prototype.on);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'once',
-    ol.control.Attribution.prototype.once);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'un',
-    ol.control.Attribution.prototype.un);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'getMap',
-    ol.control.FullScreen.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'setMap',
-    ol.control.FullScreen.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'setTarget',
-    ol.control.FullScreen.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'get',
-    ol.control.FullScreen.prototype.get);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'getKeys',
-    ol.control.FullScreen.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'getProperties',
-    ol.control.FullScreen.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'set',
-    ol.control.FullScreen.prototype.set);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'setProperties',
-    ol.control.FullScreen.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'unset',
-    ol.control.FullScreen.prototype.unset);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'changed',
-    ol.control.FullScreen.prototype.changed);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'dispatchEvent',
-    ol.control.FullScreen.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'getRevision',
-    ol.control.FullScreen.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'on',
-    ol.control.FullScreen.prototype.on);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'once',
-    ol.control.FullScreen.prototype.once);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'un',
-    ol.control.FullScreen.prototype.un);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getMap',
-    ol.control.MousePosition.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'setMap',
-    ol.control.MousePosition.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'setTarget',
-    ol.control.MousePosition.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'get',
-    ol.control.MousePosition.prototype.get);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getKeys',
-    ol.control.MousePosition.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getProperties',
-    ol.control.MousePosition.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'set',
-    ol.control.MousePosition.prototype.set);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'setProperties',
-    ol.control.MousePosition.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'unset',
-    ol.control.MousePosition.prototype.unset);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'changed',
-    ol.control.MousePosition.prototype.changed);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'dispatchEvent',
-    ol.control.MousePosition.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getRevision',
-    ol.control.MousePosition.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'on',
-    ol.control.MousePosition.prototype.on);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'once',
-    ol.control.MousePosition.prototype.once);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'un',
-    ol.control.MousePosition.prototype.un);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getMap',
-    ol.control.OverviewMap.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'setMap',
-    ol.control.OverviewMap.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'setTarget',
-    ol.control.OverviewMap.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'get',
-    ol.control.OverviewMap.prototype.get);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getKeys',
-    ol.control.OverviewMap.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getProperties',
-    ol.control.OverviewMap.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'set',
-    ol.control.OverviewMap.prototype.set);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'setProperties',
-    ol.control.OverviewMap.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'unset',
-    ol.control.OverviewMap.prototype.unset);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'changed',
-    ol.control.OverviewMap.prototype.changed);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'dispatchEvent',
-    ol.control.OverviewMap.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getRevision',
-    ol.control.OverviewMap.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'on',
-    ol.control.OverviewMap.prototype.on);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'once',
-    ol.control.OverviewMap.prototype.once);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'un',
-    ol.control.OverviewMap.prototype.un);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'getMap',
-    ol.control.Rotate.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'setMap',
-    ol.control.Rotate.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'setTarget',
-    ol.control.Rotate.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'get',
-    ol.control.Rotate.prototype.get);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'getKeys',
-    ol.control.Rotate.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'getProperties',
-    ol.control.Rotate.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'set',
-    ol.control.Rotate.prototype.set);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'setProperties',
-    ol.control.Rotate.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'unset',
-    ol.control.Rotate.prototype.unset);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'changed',
-    ol.control.Rotate.prototype.changed);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'dispatchEvent',
-    ol.control.Rotate.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'getRevision',
-    ol.control.Rotate.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'on',
-    ol.control.Rotate.prototype.on);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'once',
-    ol.control.Rotate.prototype.once);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'un',
-    ol.control.Rotate.prototype.un);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'getMap',
-    ol.control.ScaleLine.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'setMap',
-    ol.control.ScaleLine.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'setTarget',
-    ol.control.ScaleLine.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'get',
-    ol.control.ScaleLine.prototype.get);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'getKeys',
-    ol.control.ScaleLine.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'getProperties',
-    ol.control.ScaleLine.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'set',
-    ol.control.ScaleLine.prototype.set);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'setProperties',
-    ol.control.ScaleLine.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'unset',
-    ol.control.ScaleLine.prototype.unset);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'changed',
-    ol.control.ScaleLine.prototype.changed);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'dispatchEvent',
-    ol.control.ScaleLine.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'getRevision',
-    ol.control.ScaleLine.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'on',
-    ol.control.ScaleLine.prototype.on);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'once',
-    ol.control.ScaleLine.prototype.once);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'un',
-    ol.control.ScaleLine.prototype.un);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'getMap',
-    ol.control.Zoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'setMap',
-    ol.control.Zoom.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'setTarget',
-    ol.control.Zoom.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'get',
-    ol.control.Zoom.prototype.get);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'getKeys',
-    ol.control.Zoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'getProperties',
-    ol.control.Zoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'set',
-    ol.control.Zoom.prototype.set);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'setProperties',
-    ol.control.Zoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'unset',
-    ol.control.Zoom.prototype.unset);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'changed',
-    ol.control.Zoom.prototype.changed);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'dispatchEvent',
-    ol.control.Zoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'getRevision',
-    ol.control.Zoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'on',
-    ol.control.Zoom.prototype.on);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'once',
-    ol.control.Zoom.prototype.once);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'un',
-    ol.control.Zoom.prototype.un);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'getMap',
-    ol.control.ZoomSlider.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'setMap',
-    ol.control.ZoomSlider.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'setTarget',
-    ol.control.ZoomSlider.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'get',
-    ol.control.ZoomSlider.prototype.get);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'getKeys',
-    ol.control.ZoomSlider.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'getProperties',
-    ol.control.ZoomSlider.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'set',
-    ol.control.ZoomSlider.prototype.set);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'setProperties',
-    ol.control.ZoomSlider.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'unset',
-    ol.control.ZoomSlider.prototype.unset);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'changed',
-    ol.control.ZoomSlider.prototype.changed);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'dispatchEvent',
-    ol.control.ZoomSlider.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'getRevision',
-    ol.control.ZoomSlider.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'on',
-    ol.control.ZoomSlider.prototype.on);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'once',
-    ol.control.ZoomSlider.prototype.once);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'un',
-    ol.control.ZoomSlider.prototype.un);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'getMap',
-    ol.control.ZoomToExtent.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'setMap',
-    ol.control.ZoomToExtent.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'setTarget',
-    ol.control.ZoomToExtent.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'get',
-    ol.control.ZoomToExtent.prototype.get);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'getKeys',
-    ol.control.ZoomToExtent.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'getProperties',
-    ol.control.ZoomToExtent.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'set',
-    ol.control.ZoomToExtent.prototype.set);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'setProperties',
-    ol.control.ZoomToExtent.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'unset',
-    ol.control.ZoomToExtent.prototype.unset);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'changed',
-    ol.control.ZoomToExtent.prototype.changed);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'dispatchEvent',
-    ol.control.ZoomToExtent.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'getRevision',
-    ol.control.ZoomToExtent.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'on',
-    ol.control.ZoomToExtent.prototype.on);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'once',
-    ol.control.ZoomToExtent.prototype.once);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'un',
-    ol.control.ZoomToExtent.prototype.un);
-ol.VERSION = 'v4.2.0';
-OPENLAYERS.ol = ol;
-
-  return OPENLAYERS.ol;
-}));
diff --git a/VIPSWeb/static/js/3rdparty/ol.js b/VIPSWeb/static/js/3rdparty/ol.js
index cca3486371f018addbab0d767ea9b421c812ae77..b8bd07dfd0c1638d214c01e8b6669851aa0d9878 100644
--- a/VIPSWeb/static/js/3rdparty/ol.js
+++ b/VIPSWeb/static/js/3rdparty/ol.js
@@ -1,1039 +1,3 @@
-// OpenLayers. See https://openlayers.org/
-// License: https://raw.githubusercontent.com/openlayers/openlayers/master/LICENSE.md
-// Version: v4.2.0
-;(function (root, factory) {
-  if (typeof exports === "object") {
-    module.exports = factory();
-  } else if (typeof define === "function" && define.amd) {
-    define([], factory);
-  } else {
-    root.ol = factory();
-  }
-}(this, function () {
-  var OPENLAYERS = {};
-  var k,aa=this;function t(a,b){var c=OPENLAYERS;a=a.split(".");c=c||aa;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};var ea,fa;function ia(a,b){return a>b?1:a<b?-1:0}function ja(a,b){return 0<=a.indexOf(b)}function ka(a,b,c){var d=a.length;if(a[0]<=b)return 0;if(!(b<=a[d-1]))if(0<c)for(c=1;c<d;++c){if(a[c]<b)return c-1}else if(0>c)for(c=1;c<d;++c){if(a[c]<=b)return c}else for(c=1;c<d;++c){if(a[c]==b)return c;if(a[c]<b)return a[c-1]-b<b-a[c]?c-1:c}return d-1}function la(a,b){var c=Array.isArray(b)?b:[b],d=c.length;for(b=0;b<d;b++)a[a.length]=c[b]}function ma(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}
-function na(a,b){for(var c=a.length>>>0,d,e=0;e<c;e++)if(d=a[e],b(d,e,a))return d;return null}function pa(a,b){var c=a.length;if(c!==b.length)return!1;for(var d=0;d<c;d++)if(a[d]!==b[d])return!1;return!0}function qa(a){var b=ra,c=a.length,d=Array(a.length),e;for(e=0;e<c;e++)d[e]={index:e,value:a[e]};d.sort(function(a,c){return b(a.value,c.value)||a.index-c.index});for(e=0;e<a.length;e++)a[e]=d[e].value}function sa(a,b){var c;return a.every(function(d,e){c=e;return!b(d,e,a)})?-1:c}
-function ta(a,b){var c=b||ia;return a.every(function(b,e){if(!e)return!0;b=c(a[e-1],b);return!(0<b||0===b)})};function v(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a}function ua(){}function w(a){return a.Vo||(a.Vo=++va)}var va=0;function wa(a){this.message="Assertion failed. See https://openlayers.org/en/v4.2.0/doc/errors/#"+a+" for details.";this.code=a;this.name="AssertionError"}v(wa,Error);function xa(a,b){if(!a)throw new wa(b);};function ya(a,b,c,d){this.ca=a;this.$=b;this.da=c;this.ia=d}function za(a,b,c){return a.ca<=b&&b<=a.$&&a.da<=c&&c<=a.ia}function Aa(a,b){return a.ca==b.ca&&a.da==b.da&&a.$==b.$&&a.ia==b.ia}function Ba(a,b){return a.ca<=b.$&&a.$>=b.ca&&a.da<=b.ia&&a.ia>=b.da};function Ca(a,b,c){return Math.min(Math.max(a,b),c)}var Da=function(){var a;"cosh"in Math?a=Math.cosh:a=function(a){a=Math.exp(a);return(a+1/a)/2};return a}();function Ea(a){xa(0<a,29);return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))}function Fa(a,b,c,d,e,f){var g=e-c,h=f-d;if(g||h){var l=((a-c)*g+(b-d)*h)/(g*g+h*h);1<l?(c=e,d=f):0<l&&(c+=g*l,d+=h*l)}return Ga(a,b,c,d)}function Ga(a,b,c,d){a=c-a;b=d-b;return a*a+b*b}function Ha(a){return a*Math.PI/180}function Ia(a,b){a%=b;return 0>a*b?a+b:a}
-function Ja(a,b,c){return a+c*(b-a)};function Ka(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]+2*b;c[1]=a[1]+2*b;return c}function La(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]*b+.5|0;c[1]=a[1]*b+.5|0;return c}function Ma(a,b){if(Array.isArray(a))return a;void 0===b?b=[a,a]:b[0]=b[1]=a;return b};function Na(a){for(var b=Oa(),c=0,d=a.length;c<d;++c)Pa(b,a[c]);return b}function Qa(a,b,c){return c?(c[0]=a[0]-b,c[1]=a[1]-b,c[2]=a[2]+b,c[3]=a[3]+b,c):[a[0]-b,a[1]-b,a[2]+b,a[3]+b]}function Ra(a,b){return b?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b):a.slice()}function Sa(a,b,c){b=b<a[0]?a[0]-b:a[2]<b?b-a[2]:0;a=c<a[1]?a[1]-c:a[3]<c?c-a[3]:0;return b*b+a*a}function Ta(a,b){return Ua(a,b[0],b[1])}function Va(a,b){return a[0]<=b[0]&&b[2]<=a[2]&&a[1]<=b[1]&&b[3]<=a[3]}
-function Ua(a,b,c){return a[0]<=b&&b<=a[2]&&a[1]<=c&&c<=a[3]}function Wa(a,b){var c=a[1],d=a[2],e=a[3],f=b[0];b=b[1];var g=0;f<a[0]?g|=16:f>d&&(g|=4);b<c?g|=8:b>e&&(g|=2);g||(g=1);return g}function Oa(){return[Infinity,Infinity,-Infinity,-Infinity]}function Xa(a,b,c,d,e){return e?(e[0]=a,e[1]=b,e[2]=c,e[3]=d,e):[a,b,c,d]}function Ya(a){return Xa(Infinity,Infinity,-Infinity,-Infinity,a)}function Za(a,b){var c=a[0];a=a[1];return Xa(c,a,c,a,b)}function $a(a,b,c,d,e){e=Ya(e);return ab(e,a,b,c,d)}
-function bb(a,b){return a[0]==b[0]&&a[2]==b[2]&&a[1]==b[1]&&a[3]==b[3]}function cb(a,b){b[0]<a[0]&&(a[0]=b[0]);b[2]>a[2]&&(a[2]=b[2]);b[1]<a[1]&&(a[1]=b[1]);b[3]>a[3]&&(a[3]=b[3]);return a}function Pa(a,b){b[0]<a[0]&&(a[0]=b[0]);b[0]>a[2]&&(a[2]=b[0]);b[1]<a[1]&&(a[1]=b[1]);b[1]>a[3]&&(a[3]=b[1])}function ab(a,b,c,d,e){for(;c<d;c+=e){var f=a,g=b[c],h=b[c+1];f[0]=Math.min(f[0],g);f[1]=Math.min(f[1],h);f[2]=Math.max(f[2],g);f[3]=Math.max(f[3],h)}return a}
-function db(a,b,c){var d;return(d=b.call(c,eb(a)))||(d=b.call(c,gb(a)))||(d=b.call(c,hb(a)))?d:(d=b.call(c,ib(a)))?d:!1}function jb(a){var b=0;kb(a)||(b=lb(a)*mb(a));return b}function eb(a){return[a[0],a[1]]}function gb(a){return[a[2],a[1]]}function nb(a){return[(a[0]+a[2])/2,(a[1]+a[3])/2]}
-function ob(a,b,c,d,e){var f=b*d[0]/2;d=b*d[1]/2;b=Math.cos(c);var g=Math.sin(c);c=f*b;f*=g;b*=d;var h=d*g,l=a[0],m=a[1];a=l-c+h;d=l-c-h;g=l+c-h;c=l+c+h;var h=m-f-b,l=m-f+b,n=m+f+b,f=m+f-b;return Xa(Math.min(a,d,g,c),Math.min(h,l,n,f),Math.max(a,d,g,c),Math.max(h,l,n,f),e)}function mb(a){return a[3]-a[1]}function pb(a,b,c){c=c?c:Oa();qb(a,b)&&(c[0]=a[0]>b[0]?a[0]:b[0],c[1]=a[1]>b[1]?a[1]:b[1],c[2]=a[2]<b[2]?a[2]:b[2],c[3]=a[3]<b[3]?a[3]:b[3]);return c}function ib(a){return[a[0],a[3]]}
-function hb(a){return[a[2],a[3]]}function lb(a){return a[2]-a[0]}function qb(a,b){return a[0]<=b[2]&&a[2]>=b[0]&&a[1]<=b[3]&&a[3]>=b[1]}function kb(a){return a[2]<a[0]||a[3]<a[1]}function rb(a,b){var c=(a[2]-a[0])/2*(b-1);b=(a[3]-a[1])/2*(b-1);a[0]-=c;a[2]+=c;a[1]-=b;a[3]+=b}
-function sb(a,b,c){a=[a[0],a[1],a[0],a[3],a[2],a[1],a[2],a[3]];b(a,a,2);var d=[a[0],a[2],a[4],a[6]],e=[a[1],a[3],a[5],a[7]];b=Math.min.apply(null,d);a=Math.min.apply(null,e);d=Math.max.apply(null,d);e=Math.max.apply(null,e);return Xa(b,a,d,e,c)};var tb="function"===typeof Object.assign?Object.assign:function(a,b){if(!a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(a),d=1,e=arguments.length;d<e;++d){var f=arguments[d];if(void 0!==f&&null!==f)for(var g in f)f.hasOwnProperty(g)&&(c[g]=f[g])}return c};function ub(a){for(var b in a)delete a[b]}function vb(a){var b=[],c;for(c in a)b.push(a[c]);return b}function wb(a){for(var b in a)return!1;return!b};/*
-
- Latitude/longitude spherical geodesy formulae taken from
- http://www.movable-type.co.uk/scripts/latlong.html
- Licensed under CC-BY-3.0.
-*/
-function xb(a){this.radius=a}xb.prototype.a=function(a){for(var b=0,c=a.length,d=a[c-1][0],e=a[c-1][1],f=0;f<c;f++)var g=a[f][0],h=a[f][1],b=b+Ha(g-d)*(2+Math.sin(Ha(e))+Math.sin(Ha(h))),d=g,e=h;return b*this.radius*this.radius/2};xb.prototype.b=function(a,b){var c=Ha(a[1]),d=Ha(b[1]),e=(d-c)/2;a=Ha(b[0]-a[0])/2;c=Math.sin(e)*Math.sin(e)+Math.sin(a)*Math.sin(a)*Math.cos(c)*Math.cos(d);return 2*this.radius*Math.atan2(Math.sqrt(c),Math.sqrt(1-c))};
-xb.prototype.offset=function(a,b,c){var d=Ha(a[1]);b/=this.radius;var e=Math.asin(Math.sin(d)*Math.cos(b)+Math.cos(d)*Math.sin(b)*Math.cos(c));return[180*(Ha(a[0])+Math.atan2(Math.sin(c)*Math.sin(b)*Math.cos(d),Math.cos(b)-Math.sin(d)*Math.sin(e)))/Math.PI,180*e/Math.PI]};var yb=new xb(6370997);var zb={};zb.degrees=2*Math.PI*yb.radius/360;zb.ft=.3048;zb.m=1;zb["us-ft"]=1200/3937;var Ab=null;function Bb(a){this.mb=a.code;this.a=a.units;this.f=void 0!==a.extent?a.extent:null;this.g=void 0!==a.worldExtent?a.worldExtent:null;this.b=void 0!==a.axisOrientation?a.axisOrientation:"enu";this.c=void 0!==a.global?a.global:!1;this.i=!(!this.c||!this.f);this.o=a.getPointResolution;this.j=null;this.l=a.metersPerUnit;var b=a.code,c=Ab||window.proj4;"function"==typeof c&&(b=c.defs(b),void 0!==b&&(void 0!==b.axis&&void 0===a.axisOrientation&&(this.b=b.axis),void 0===a.metersPerUnit&&(this.l=b.to_meter),
-void 0===a.units&&(this.a=b.units)))}k=Bb.prototype;k.Jk=function(){return this.mb};k.G=function(){return this.f};k.Un=function(){return this.a};k.sc=function(){return this.l||zb[this.a]};k.tl=function(){return this.g};k.dm=function(){return this.c};k.$p=function(a){this.c=a;this.i=!(!a||!this.f)};k.Vn=function(a){this.f=a;this.i=!(!this.c||!a)};k.kq=function(a){this.g=a};k.Zp=function(a){this.o=a};function Cb(a){Bb.call(this,{code:a,units:"m",extent:Db,global:!0,worldExtent:Eb,getPointResolution:function(a,c){return a/Da(c[1]/6378137)}})}v(Cb,Bb);var Fb=6378137*Math.PI,Db=[-Fb,-Fb,Fb,Fb],Eb=[-180,-85,180,85],Gb="EPSG:3857 EPSG:102100 EPSG:102113 EPSG:900913 urn:ogc:def:crs:EPSG:6.18:3:3857 urn:ogc:def:crs:EPSG::3857 http://www.opengis.net/gml/srs/epsg.xml#3857".split(" ").map(function(a){return new Cb(a)});
-function Hb(a,b,c){var d=a.length;c=1<c?c:2;void 0===b&&(2<c?b=a.slice():b=Array(d));for(var e=0;e<d;e+=c){b[e]=Fb*a[e]/180;var f=6378137*Math.log(Math.tan(Math.PI*(a[e+1]+90)/360));f>Fb?f=Fb:f<-Fb&&(f=-Fb);b[e+1]=f}return b}function Ib(a,b,c){var d=a.length;c=1<c?c:2;void 0===b&&(2<c?b=a.slice():b=Array(d));for(var e=0;e<d;e+=c)b[e]=180*a[e]/Fb,b[e+1]=360*Math.atan(Math.exp(a[e+1]/6378137))/Math.PI-90;return b};var Jb=new xb(6378137);function Kb(a,b){Bb.call(this,{code:a,units:"degrees",extent:Lb,axisOrientation:b,global:!0,metersPerUnit:Mb,worldExtent:Lb})}v(Kb,Bb);var Lb=[-180,-90,180,90],Mb=Math.PI*Jb.radius/180,Nb=[new Kb("CRS:84"),new Kb("EPSG:4326","neu"),new Kb("urn:ogc:def:crs:EPSG::4326","neu"),new Kb("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Kb("urn:ogc:def:crs:OGC:1.3:CRS84"),new Kb("urn:ogc:def:crs:OGC:2:84"),new Kb("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Kb("urn:x-ogc:def:crs:EPSG:4326","neu")];var Ob={};var Pb={};function Qb(a,b,c){a=a.mb;b=b.mb;a in Pb||(Pb[a]={});Pb[a][b]=c}function Rb(a,b){var c;a in Pb&&b in Pb[a]&&(c=Pb[a][b]);return c};function Sb(a,b,c){a=Tb(a);var d=a.o;d?b=d(b,c):"degrees"!=a.a&&(d=Vb(a,Tb("EPSG:4326")),b=[c[0]-b/2,c[1],c[0]+b/2,c[1],c[0],c[1]-b/2,c[0],c[1]+b/2],b=d(b,b,2),b=(yb.b(b.slice(0,2),b.slice(2,4))+yb.b(b.slice(4,6),b.slice(6,8)))/2,a=a.sc(),void 0!==a&&(b/=a));return b}function Wb(a){a.forEach(Xb);a.forEach(function(b){a.forEach(function(a){b!==a&&Qb(b,a,Yb)})})}function Zb(){Nb.forEach(function(a){Gb.forEach(function(b){Qb(a,b,Hb);Qb(b,a,Ib)})})}function Xb(a){Ob[a.mb]=a;Qb(a,a,Yb)}
-function $b(a){return a?"string"===typeof a?Tb(a):a:Tb("EPSG:3857")}function ac(a,b,c,d){a=Tb(a);b=Tb(b);Qb(a,b,cc(c));Qb(b,a,cc(d))}function cc(a){return function(b,c,d){var e=b.length;d=void 0!==d?d:2;c=void 0!==c?c:Array(e);var f;for(f=0;f<e;f+=d){var g=a([b[f],b[f+1]]);c[f]=g[0];c[f+1]=g[1];for(g=d-1;2<=g;--g)c[f+g]=b[f+g]}return c}}
-function Tb(a){var b=null;if(a instanceof Bb)b=a;else if("string"===typeof a){var b=Ob[a]||null,c=Ab||window.proj4;b||"function"!=typeof c||void 0===c.defs(a)||(b=new Bb({code:a}),Xb(b))}return b}function dc(a,b){if(a===b)return!0;var c=a.a===b.a;return a.mb===b.mb?c:Vb(a,b)===Yb&&c}function ec(a,b){a=Tb(a);b=Tb(b);return Vb(a,b)}
-function Vb(a,b){var c=a.mb,d=b.mb,e=Rb(c,d);if(!e){var f=Ab||window.proj4;if("function"==typeof f){var g=f.defs(c),h=f.defs(d);void 0!==g&&void 0!==h&&(g===h?Wb([b,a]):(e=f(d,c),ac(b,a,e.forward,e.inverse)),e=Rb(c,d))}}e||(e=fc);return e}function fc(a,b){if(void 0!==b&&a!==b){for(var c=0,d=a.length;c<d;++c)b[c]=a[c];a=b}return a}function Yb(a,b){if(void 0!==b){for(var c=0,d=a.length;c<d;++c)b[c]=a[c];a=b}else a=a.slice();return a}function gc(a,b,c){return ec(b,c)(a,void 0,a.length)}
-function hc(a,b,c){b=ec(b,c);return sb(a,b)}function ic(){Wb(Gb);Wb(Nb);Zb()}ic();function jc(a,b,c,d){return void 0!==d?(d[0]=a,d[1]=b,d[2]=c,d):[a,b,c]}function kc(a){var b=a[0],c=Array(b),d=1<<b-1,e;for(e=0;e<b;++e){var f=48;a[1]&d&&(f+=1);a[2]&d&&(f+=2);c[e]=String.fromCharCode(f);d>>=1}return c.join("")};function lc(a){this.minZoom=void 0!==a.minZoom?a.minZoom:0;this.b=a.resolutions;xa(ta(this.b,function(a,b){return b-a}),17);this.maxZoom=this.b.length-1;this.i=void 0!==a.origin?a.origin:null;this.c=null;void 0!==a.origins&&(this.c=a.origins,xa(this.c.length==this.b.length,20));var b=a.extent;void 0===b||this.i||this.c||(this.i=ib(b));xa(!this.i&&this.c||this.i&&!this.c,18);this.f=null;void 0!==a.tileSizes&&(this.f=a.tileSizes,xa(this.f.length==this.b.length,19));this.g=void 0!==a.tileSize?a.tileSize:
-this.f?null:256;xa(!this.g&&this.f||this.g&&!this.f,22);this.v=void 0!==b?b:null;this.a=null;this.j=[0,0];void 0!==a.sizes?this.a=a.sizes.map(function(a){return new ya(Math.min(0,a[0]),Math.max(a[0]-1,-1),Math.min(0,a[1]),Math.max(a[1]-1,-1))},this):b&&mc(this,b)}var nc=[0,0,0];k=lc.prototype;k.Rf=function(a,b,c){a=oc(this,a,b);for(var d=a.ca,e=a.$;d<=e;++d)for(var f=a.da,g=a.ia;f<=g;++f)c([b,d,f])};
-function pc(a,b,c,d,e){e=a.Aa(b,e);for(b=b[0]-1;b>=a.minZoom;){if(c.call(null,b,oc(a,e,b,d)))return!0;--b}return!1}k.G=function(){return this.v};k.Ti=function(){return this.maxZoom};k.Ui=function(){return this.minZoom};k.Pc=function(a){return this.i?this.i:this.c[a]};k.Da=function(a){return this.b[a]};k.Vi=function(){return this.b};function qc(a,b,c,d){return b[0]<a.maxZoom?(d=a.Aa(b,d),oc(a,d,b[0]+1,c)):null}
-function rc(a,b,c,d){sc(a,b[0],b[1],c,!1,nc);var e=nc[1],f=nc[2];sc(a,b[2],b[3],c,!0,nc);a=nc[1];b=nc[2];void 0!==d?(d.ca=e,d.$=a,d.da=f,d.ia=b):d=new ya(e,a,f,b);return d}function oc(a,b,c,d){return rc(a,b,a.Da(c),d)}function tc(a,b){var c=a.Pc(b[0]),d=a.Da(b[0]);a=Ma(a.gb(b[0]),a.j);return[c[0]+(b[1]+.5)*a[0]*d,c[1]+(b[2]+.5)*a[1]*d]}k.Aa=function(a,b){var c=this.Pc(a[0]),d=this.Da(a[0]),e=Ma(this.gb(a[0]),this.j),f=c[0]+a[1]*e[0]*d;a=c[1]+a[2]*e[1]*d;return Xa(f,a,f+e[0]*d,a+e[1]*d,b)};
-k.Be=function(a,b,c){return sc(this,a[0],a[1],b,!1,c)};function sc(a,b,c,d,e,f){var g=a.tc(d),h=d/a.Da(g),l=a.Pc(g);a=Ma(a.gb(g),a.j);b=h*Math.floor((b-l[0])/d+(e?.5:0))/a[0];c=h*Math.floor((c-l[1])/d+(e?0:.5))/a[1];e?(b=Math.ceil(b)-1,c=Math.ceil(c)-1):(b=Math.floor(b),c=Math.floor(c));return jc(g,b,c,f)}k.bg=function(a,b,c){return sc(this,a[0],a[1],this.Da(b),!1,c)};k.gb=function(a){return this.g?this.g:this.f[a]};k.tc=function(a,b){return Ca(ka(this.b,a,b||0),this.minZoom,this.maxZoom)};
-function mc(a,b){for(var c=a.b.length,d=Array(c),e=a.minZoom;e<c;++e)d[e]=oc(a,b,e);a.a=d};function vc(a){var b=a.j;b||(b=wc(a),a.j=b);return b}function xc(a){var b={};tb(b,a?a:{});void 0===b.extent&&(b.extent=Tb("EPSG:3857").G());b.resolutions=yc(b.extent,b.maxZoom,b.tileSize);delete b.maxZoom;return new lc(b)}function yc(a,b,c){b=void 0!==b?b:42;var d=mb(a);a=lb(a);c=Ma(void 0!==c?c:256);c=Math.max(a/c[0],d/c[1]);b+=1;d=Array(b);for(a=0;a<b;++a)d[a]=c/Math.pow(2,a);return d}function wc(a,b,c){a=zc(a);b=yc(a,b,c);return new lc({extent:a,origin:ib(a),resolutions:b,tileSize:c})}
-function zc(a){a=Tb(a);var b=a.G();b||(a=180*zb.degrees/a.sc(),b=Xa(-a,-a,a,a));return b};function Ac(a){this.b=a.html;this.a=a.tileRanges?a.tileRanges:null}Ac.prototype.i=function(){return this.b};function Bc(a){return function(b){if(b)return[Ca(b[0],a[0],a[2]),Ca(b[1],a[1],a[3])]}}function Cc(a){return a};function Dc(a){function b(b){var c=a.listener,e=a.lh||a.target;a.nh&&Ec(a);return c.call(e,b)}return a.mh=b}function Fc(a,b,c,d){for(var e,f=0,g=a.length;f<g;++f)if(e=a[f],e.listener===b&&e.lh===c)return d&&(e.deleteIndex=f),e}function Gc(a,b){return(a=a.fb)?a[b]:void 0}function Hc(a){var b=a.fb;b||(b=a.fb={});return b}function Ic(a,b){var c=Gc(a,b);if(c){for(var d=0,e=c.length;d<e;++d)a.removeEventListener(b,c[d].mh),ub(c[d]);c.length=0;if(c=a.fb)delete c[b],Object.keys(c).length||delete a.fb}}
-function y(a,b,c,d,e){var f=Hc(a),g=f[b];g||(g=f[b]=[]);(f=Fc(g,c,d,!1))?e||(f.nh=!1):(f={lh:d,nh:!!e,listener:c,target:a,type:b},a.addEventListener(b,Dc(f)),g.push(f));return f}function Jc(a,b,c,d){return y(a,b,c,d,!0)}function Kc(a,b,c,d){(a=Gc(a,b))&&(c=Fc(a,c,d,!0))&&Ec(c)}function Ec(a){if(a&&a.target){a.target.removeEventListener(a.type,a.mh);var b=Gc(a.target,a.type);if(b){var c="deleteIndex"in a?a.deleteIndex:b.indexOf(a);-1!==c&&b.splice(c,1);b.length||Ic(a.target,a.type)}ub(a)}}
-function Lc(a){var b=Hc(a),c;for(c in b)Ic(a,c)};function Mc(){}Mc.prototype.Jb=!1;function Nc(a){a.Jb||(a.Jb=!0,a.ka())}Mc.prototype.ka=ua;function Oc(a){this.type=a;this.target=null}Oc.prototype.preventDefault=Oc.prototype.stopPropagation=function(){this.qp=!0};function Pc(a){a.stopPropagation()};function Qc(){this.Ua={};this.ra={};this.oa={}}v(Qc,Mc);Qc.prototype.addEventListener=function(a,b){var c=this.oa[a];c||(c=this.oa[a]=[]);-1===c.indexOf(b)&&c.push(b)};
-Qc.prototype.b=function(a){var b="string"===typeof a?new Oc(a):a;a=b.type;b.target=this;var c=this.oa[a];if(c){a in this.ra||(this.ra[a]=0,this.Ua[a]=0);++this.ra[a];for(var d=0,e=c.length;d<e;++d)if(!1===c[d].call(this,b)||b.qp){var f=!1;break}--this.ra[a];if(!this.ra[a]){b=this.Ua[a];for(delete this.Ua[a];b--;)this.removeEventListener(a,ua);delete this.ra[a]}return f}};Qc.prototype.ka=function(){Lc(this)};function Rc(a,b){return b?b in a.oa:0<Object.keys(a.oa).length}
-Qc.prototype.removeEventListener=function(a,b){var c=this.oa[a];c&&(b=c.indexOf(b),a in this.Ua?(c[b]=ua,++this.Ua[a]):(c.splice(b,1),c.length||delete this.oa[a]))};function Sc(){Qc.call(this);this.i=0}v(Sc,Qc);k=Sc.prototype;k.s=function(){++this.i;this.b("change")};k.L=function(){return this.i};k.J=function(a,b,c){if(Array.isArray(a)){for(var d=a.length,e=Array(d),f=0;f<d;++f)e[f]=y(this,a[f],b,c);return e}return y(this,a,b,c)};k.once=function(a,b,c){if(Array.isArray(a)){for(var d=a.length,e=Array(d),f=0;f<d;++f)e[f]=Jc(this,a[f],b,c);return e}return Jc(this,a,b,c)};
-k.K=function(a,b,c){if(Array.isArray(a))for(var d=0,e=a.length;d<e;++d)Kc(this,a[d],b,c);else Kc(this,a,b,c)};function Tc(a){Sc.call(this);w(this);this.S={};void 0!==a&&this.H(a)}v(Tc,Sc);var Uc={};function Vc(a){return Uc.hasOwnProperty(a)?Uc[a]:Uc[a]="change:"+a}k=Tc.prototype;k.get=function(a){var b;this.S.hasOwnProperty(a)&&(b=this.S[a]);return b};k.O=function(){return Object.keys(this.S)};k.N=function(){return tb({},this.S)};function Wc(a,b,c){var d=Vc(b);a.b(new Xc(d,b,c));a.b(new Xc("propertychange",b,c))}k.set=function(a,b,c){c?this.S[a]=b:(c=this.S[a],this.S[a]=b,c!==b&&Wc(this,a,c))};
-k.H=function(a,b){for(var c in a)this.set(c,a[c],b)};k.P=function(a,b){if(a in this.S){var c=this.S[a];delete this.S[a];b||Wc(this,a,c)}};function Xc(a,b,c){Oc.call(this,a);this.key=b;this.oldValue=c}v(Xc,Oc);function Yc(a,b){Tc.call(this);this.c=!!(b||{}).unique;this.a=a?a:[];if(this.c)for(a=0,b=this.a.length;a<b;++a)Zc(this,this.a[a],a);$c(this)}v(Yc,Tc);k=Yc.prototype;k.clear=function(){for(;0<this.dc();)this.pop()};k.fg=function(a){var b;var c=0;for(b=a.length;c<b;++c)this.push(a[c]);return this};k.forEach=function(a,b){this.a.forEach(a,b)};k.tm=function(){return this.a};k.item=function(a){return this.a[a]};k.dc=function(){return this.get(ad)};
-k.He=function(a,b){this.c&&Zc(this,b);this.a.splice(a,0,b);$c(this);this.b(new bd("add",b))};k.pop=function(){return this.Hg(this.dc()-1)};k.push=function(a){this.c&&Zc(this,a);var b=this.dc();this.He(b,a);return this.dc()};k.remove=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)if(b[d]===a)return this.Hg(d)};k.Hg=function(a){var b=this.a[a];this.a.splice(a,1);$c(this);this.b(new bd("remove",b));return b};
-k.Wp=function(a,b){var c=this.dc();if(a<c)this.c&&Zc(this,b,a),c=this.a[a],this.a[a]=b,this.b(new bd("remove",c)),this.b(new bd("add",b));else{for(;c<a;++c)this.He(c,void 0);this.He(a,b)}};function $c(a){a.set(ad,a.a.length)}function Zc(a,b,c){for(var d=0,e=a.a.length;d<e;++d)if(a.a[d]===b&&d!==c)throw new wa(58);}var ad="length";function bd(a,b){Oc.call(this,a);this.element=b}v(bd,Oc);var cd=/^#(?:[0-9a-f]{3}){1,2}$/i,dd=/^([a-z]*)$/i;function ed(a){return Array.isArray(a)?a:fd(a)}function gd(a){if("string"!==typeof a){var b=a[0];b!=(b|0)&&(b=b+.5|0);var c=a[1];c!=(c|0)&&(c=c+.5|0);var d=a[2];d!=(d|0)&&(d=d+.5|0);a="rgba("+b+","+c+","+d+","+(void 0===a[3]?1:a[3])+")"}return a}
-var fd=function(){var a={},b=0;return function(c){if(a.hasOwnProperty(c))var d=a[c];else{if(1024<=b){d=0;for(var e in a)d++&3||(delete a[e],--b)}d=c;dd.exec(d)&&(e=document.createElement("div"),e.style.color=d,document.body.appendChild(e),d=getComputedStyle(e).color,document.body.removeChild(e));if(cd.exec(d)){var f=d.length-1;xa(3==f||6==f,54);var g=3==f?1:2;f=parseInt(d.substr(1+0*g,g),16);e=parseInt(d.substr(1+1*g,g),16);d=parseInt(d.substr(1+2*g,g),16);1==g&&(f=(f<<4)+f,e=(e<<4)+e,d=(d<<4)+d);
-f=[f,e,d,1]}else d.indexOf("rgba(")?d.indexOf("rgb(")?xa(!1,14):(d=d.slice(4,-1).split(",").map(Number),d.push(1),f=hd(d)):(d=d.slice(5,-1).split(",").map(Number),f=hd(d));d=f;a[c]=d;++b}return d}}();function hd(a){var b=[];b[0]=Ca(a[0]+.5|0,0,255);b[1]=Ca(a[1]+.5|0,0,255);b[2]=Ca(a[2]+.5|0,0,255);b[3]=Ca(a[3],0,1);return b};function id(a){return"string"===typeof a||a instanceof CanvasPattern||a instanceof CanvasGradient?a:gd(a)};function jd(a,b){var c=document.createElement("CANVAS");a&&(c.width=a);b&&(c.height=b);return c.getContext("2d")}function kd(a,b){var c=b.parentNode;c&&c.replaceChild(a,b)}function ld(a){a&&a.parentNode&&a.parentNode.removeChild(a)};function md(a){Tc.call(this);this.element=a.element?a.element:null;this.a=this.R=null;this.v=[];this.render=a.render?a.render:ua;a.target&&this.f(a.target)}v(md,Tc);md.prototype.ka=function(){ld(this.element);Tc.prototype.ka.call(this)};md.prototype.g=function(){return this.a};
-md.prototype.setMap=function(a){this.a&&ld(this.element);for(var b=0,c=this.v.length;b<c;++b)Ec(this.v[b]);this.v.length=0;if(this.a=a)(this.R?this.R:a.D).appendChild(this.element),this.render!==ua&&this.v.push(y(a,"postrender",this.render,this)),a.render()};md.prototype.f=function(a){this.R="string"===typeof a?document.getElementById(a):a};function nd(a){a=a?a:{};this.I=document.createElement("UL");this.u=document.createElement("LI");this.I.appendChild(this.u);this.u.style.display="none";this.c=void 0!==a.collapsed?a.collapsed:!0;this.o=void 0!==a.collapsible?a.collapsible:!0;this.o||(this.c=!1);var b=void 0!==a.className?a.className:"ol-attribution",c=void 0!==a.tipLabel?a.tipLabel:"Attributions",d=void 0!==a.collapseLabel?a.collapseLabel:"\u00bb";"string"===typeof d?(this.D=document.createElement("span"),this.D.textContent=d):this.D=
-d;d=void 0!==a.label?a.label:"i";"string"===typeof d?(this.C=document.createElement("span"),this.C.textContent=d):this.C=d;var e=this.o&&!this.c?this.D:this.C,d=document.createElement("button");d.setAttribute("type","button");d.title=c;d.appendChild(e);y(d,"click",this.Vm,this);c=document.createElement("div");c.className=b+" ol-unselectable ol-control"+(this.c&&this.o?" ol-collapsed":"")+(this.o?"":" ol-uncollapsible");c.appendChild(this.I);c.appendChild(d);md.call(this,{element:c,render:a.render?
-a.render:od,target:a.target});this.B=!0;this.l={};this.j={};this.T={}}v(nd,md);
-function od(a){if(a=a.frameState){var b,c,d,e,f,g=a.layerStatesArray,h=tb({},a.attributions),l={},m={},n=a.viewState.projection;var p=0;for(b=g.length;p<b;p++)if(e=g[p].layer.ha()){var q=w(e).toString();if(f=e.j){var r=0;for(c=f.length;r<c;r++){var u=f[r];var x=w(u).toString();if(!(x in h)){if(d=a.usedTiles[q]){var B=e.Ta(n);a:{var E=void 0;var A,L=u,oa=B,ha=n;if(L.a){for(E in d)if(E in L.a){var B=d[E];var ga=0;for(A=L.a[E].length;ga<A;++ga){var z=L.a[E][ga];if(Ba(z,B)){E=!0;break a}var M=oc(oa,zc(ha),
-parseInt(E,10)),ba=M.$-M.ca+1;if(B.ca<M.ca||B.$>M.$)if(Ba(z,new ya(Ia(B.ca,ba),Ia(B.$,ba),B.da,B.ia))||B.$-B.ca+1>ba&&Ba(z,M)){E=!0;break a}}}E=!1}else E=!0}}else E=!1;E?(x in l&&delete l[x],E=u.b,E in m||(m[E]=!0,h[x]=u)):l[x]=u}}}}b=[h,l];p=b[0];b=b[1];for(var da in this.l)da in p?(this.j[da]||(this.l[da].style.display="",this.j[da]=!0),delete p[da]):da in b?(this.j[da]&&(this.l[da].style.display="none",delete this.j[da]),delete b[da]):(ld(this.l[da]),delete this.l[da],delete this.j[da]);for(da in p)r=
-document.createElement("LI"),r.innerHTML=p[da].b,this.I.appendChild(r),this.l[da]=r,this.j[da]=!0;for(da in b)r=document.createElement("LI"),r.innerHTML=b[da].b,r.style.display="none",this.I.appendChild(r),this.l[da]=r;da=!wb(this.j)||!wb(a.logos);this.B!=da&&(this.element.style.display=da?"":"none",this.B=da);da&&wb(this.j)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only");a=a.logos;da=this.T;for(ca in da)ca in a||(ld(da[ca]),delete da[ca]);for(var fb in a)if(b=
-a[fb],b instanceof HTMLElement&&(this.u.appendChild(b),da[fb]=b),!(fb in da)){var ca=new Image;ca.src=fb;""===b?p=ca:(p=document.createElement("a"),p.href=b,p.appendChild(ca));this.u.appendChild(p);da[fb]=p}this.u.style.display=wb(a)?"none":""}else this.B&&(this.element.style.display="none",this.B=!1)}k=nd.prototype;k.Vm=function(a){a.preventDefault();pd(this)};function pd(a){a.element.classList.toggle("ol-collapsed");a.c?kd(a.D,a.C):kd(a.C,a.D);a.c=!a.c}k.Um=function(){return this.o};
-k.Xm=function(a){this.o!==a&&(this.o=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.c&&pd(this))};k.Wm=function(a){this.o&&this.c!==a&&pd(this)};k.Tm=function(){return this.c};function qd(a){return Math.pow(a,3)}function rd(a){return 1-qd(1-a)}function sd(a){return 3*a*a-2*a*a*a}function td(a){return a};function ud(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-rotate",c=void 0!==a.label?a.label:"\u21e7";this.c=null;"string"===typeof c?(this.c=document.createElement("span"),this.c.className="ol-compass",this.c.textContent=c):(this.c=c,this.c.classList.add("ol-compass"));var d=a.tipLabel?a.tipLabel:"Reset rotation",c=document.createElement("button");c.className=b+"-reset";c.setAttribute("type","button");c.title=d;c.appendChild(this.c);y(c,"click",ud.prototype.D,this);d=document.createElement("div");
-d.className=b+" ol-unselectable ol-control";d.appendChild(c);b=a.render?a.render:vd;this.o=a.resetNorth?a.resetNorth:void 0;md.call(this,{element:d,render:b,target:a.target});this.l=void 0!==a.duration?a.duration:250;this.j=void 0!==a.autoHide?a.autoHide:!0;this.u=void 0;this.j&&this.element.classList.add("ol-hidden")}v(ud,md);ud.prototype.D=function(a){a.preventDefault();this.o?this.o():(a=this.a.Z())&&void 0!==a.Qa()&&(0<this.l?a.animate({rotation:0,duration:this.l,easing:rd}):a.Oe(0))};
-function vd(a){if(a=a.frameState){a=a.viewState.rotation;if(a!=this.u){var b="rotate("+a+"rad)";if(this.j){var c=this.element.classList.contains("ol-hidden");c||a?c&&a&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.c.style.msTransform=b;this.c.style.webkitTransform=b;this.c.style.transform=b}this.u=a}};function wd(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-zoom",c=void 0!==a.delta?a.delta:1,d=void 0!==a.zoomInLabel?a.zoomInLabel:"+",e=void 0!==a.zoomOutLabel?a.zoomOutLabel:"\u2212",f=void 0!==a.zoomInTipLabel?a.zoomInTipLabel:"Zoom in",g=void 0!==a.zoomOutTipLabel?a.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=b+"-in";h.setAttribute("type","button");h.title=f;h.appendChild("string"===typeof d?document.createTextNode(d):d);y(h,"click",wd.prototype.j.bind(this,
-c));d=document.createElement("button");d.className=b+"-out";d.setAttribute("type","button");d.title=g;d.appendChild("string"===typeof e?document.createTextNode(e):e);y(d,"click",wd.prototype.j.bind(this,-c));c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(h);c.appendChild(d);md.call(this,{element:c,target:a.target});this.c=void 0!==a.duration?a.duration:250}v(wd,md);
-wd.prototype.j=function(a,b){b.preventDefault();if(b=this.a.Z()){var c=b.Pa();c&&(a=b.constrainResolution(c,a),0<this.c?(b.Ic()&&b.ed(),b.animate({resolution:a,duration:this.c,easing:rd})):b.Vc(a))}};function xd(a){a=a?a:{};var b=new Yc;(void 0!==a.zoom?a.zoom:1)&&b.push(new wd(a.zoomOptions));(void 0!==a.rotate?a.rotate:1)&&b.push(new ud(a.rotateOptions));(void 0!==a.attribution?a.attribution:1)&&b.push(new nd(a.attributionOptions));return b};function yd(a){a=a?a:{};this.c=void 0!==a.className?a.className:"ol-full-screen";var b=void 0!==a.label?a.label:"\u2922";this.o="string"===typeof b?document.createTextNode(b):b;b=void 0!==a.labelActive?a.labelActive:"\u00d7";this.l="string"===typeof b?document.createTextNode(b):b;var c=a.tipLabel?a.tipLabel:"Toggle full-screen",b=document.createElement("button");b.className=this.c+"-"+zd();b.setAttribute("type","button");b.title=c;b.appendChild(this.o);y(b,"click",this.C,this);c=document.createElement("div");
-c.className=this.c+" ol-unselectable ol-control "+(Ad()?"":"ol-unsupported");c.appendChild(b);md.call(this,{element:c,target:a.target});this.D=void 0!==a.keys?a.keys:!1;this.j=a.source}v(yd,md);
-yd.prototype.C=function(a){a.preventDefault();Ad()&&(a=this.a)&&(zd()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(a=this.j?"string"===typeof this.j?document.getElementById(this.j):this.j:a.jd(),this.D?a.mozRequestFullScreenWithKeys?a.mozRequestFullScreenWithKeys():a.webkitRequestFullscreen?a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):
-Bd(a):Bd(a)))};yd.prototype.u=function(){var a=this.element.firstElementChild,b=this.a;zd()?(a.className=this.c+"-true",kd(this.l,this.o)):(a.className=this.c+"-false",kd(this.o,this.l));b&&b.Ad()};yd.prototype.setMap=function(a){md.prototype.setMap.call(this,a);a&&this.v.push(y(document,Cd(),this.u,this))};
-function Ad(){var a=document.body;return!!(a.webkitRequestFullscreen||a.mozRequestFullScreen&&document.mozFullScreenEnabled||a.msRequestFullscreen&&document.msFullscreenEnabled||a.requestFullscreen&&document.fullscreenEnabled)}function zd(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}
-function Bd(a){a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()}var Cd=function(){var a;return function(){if(!a){var b=document.body;b.webkitRequestFullscreen?a="webkitfullscreenchange":b.mozRequestFullScreen?a="mozfullscreenchange":b.msRequestFullscreen?a="MSFullscreenChange":b.requestFullscreen&&(a="fullscreenchange")}return a}}();function Dd(a){a=a?a:{};var b=document.createElement("DIV");b.className=void 0!==a.className?a.className:"ol-mouse-position";md.call(this,{element:b,render:a.render?a.render:Ed,target:a.target});y(this,Vc(Fd),this.Ym,this);a.coordinateFormat&&this.kj(a.coordinateFormat);a.projection&&this.$h(a.projection);this.u=void 0!==a.undefinedHTML?a.undefinedHTML:"";this.l=b.innerHTML;this.o=this.j=this.c=null}v(Dd,md);
-function Ed(a){a=a.frameState;a?this.c!=a.viewState.projection&&(this.c=a.viewState.projection,this.j=null):this.c=null;Gd(this,this.o)}k=Dd.prototype;k.Ym=function(){this.j=null};k.xh=function(){return this.get(Hd)};k.Zh=function(){return this.get(Fd)};k.Ll=function(a){this.o=this.a.xe(a);Gd(this,this.o)};k.Ml=function(){Gd(this,null);this.o=null};k.setMap=function(a){md.prototype.setMap.call(this,a);a&&(a=a.a,this.v.push(y(a,"mousemove",this.Ll,this),y(a,"mouseout",this.Ml,this)))};
-k.kj=function(a){this.set(Hd,a)};k.$h=function(a){this.set(Fd,Tb(a))};function Gd(a,b){var c=a.u;if(b&&a.c){if(!a.j){var d=a.Zh();a.j=d?Vb(a.c,d):fc}if(b=a.a.Wa(b))a.j(b,b),c=(c=a.xh())?c(b):b.toString()}a.l&&c==a.l||(a.element.innerHTML=c,a.l=c)}var Fd="projection",Hd="coordinateFormat";function Id(a,b,c){Oc.call(this,a);this.map=b;this.frameState=void 0!==c?c:null}v(Id,Oc);function Jd(a,b,c,d,e){Id.call(this,a,b,e);this.originalEvent=c;this.pixel=b.xe(c);this.coordinate=b.Wa(this.pixel);this.dragging=void 0!==d?d:!1}v(Jd,Id);Jd.prototype.preventDefault=function(){Id.prototype.preventDefault.call(this);this.originalEvent.preventDefault()};Jd.prototype.stopPropagation=function(){Id.prototype.stopPropagation.call(this);this.originalEvent.stopPropagation()};var Kd=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Ld(a,b){var c,d,e=Kd.length;for(d=0;d<e;++d)try{if(c=a.getContext(Kd[d],b))return c}catch(f){}return null};var Md,Nd="undefined"!==typeof navigator?navigator.userAgent.toLowerCase():"",Od=-1!==Nd.indexOf("firefox"),Pd=-1!==Nd.indexOf("safari")&&-1==Nd.indexOf("chrom"),Qd=-1!==Nd.indexOf("webkit")&&-1==Nd.indexOf("edge"),Rd=-1!==Nd.indexOf("macintosh"),Sd=window.devicePixelRatio||1,Td=!1,Ud=function(){if(!("HTMLCanvasElement"in window))return!1;try{var a=document.createElement("CANVAS").getContext("2d");return a?(void 0!==a.setLineDash&&(Td=!0),!0):!1}catch(b){return!1}}(),Vd="DeviceOrientationEvent"in
-window,Wd="geolocation"in navigator,Xd="ontouchstart"in window,Yd="PointerEvent"in window,Zd=!!navigator.msPointerEnabled,$d=!1,ae,be=[];if("WebGLRenderingContext"in window)try{var ce=Ld(document.createElement("CANVAS"),{failIfMajorPerformanceCaveat:!0});ce&&($d=!0,ae=ce.getParameter(ce.MAX_TEXTURE_SIZE),be=ce.getSupportedExtensions())}catch(a){}Md=$d;fa=be;ea=ae;var de={Iq:"singleclick",xq:"click",yq:"dblclick",Bq:"pointerdrag",Eq:"pointermove",Aq:"pointerdown",Hq:"pointerup",Gq:"pointerover",Fq:"pointerout",Cq:"pointerenter",Dq:"pointerleave",zq:"pointercancel"};function ee(a,b,c,d,e){Jd.call(this,a,b,c.b,d,e);this.b=c}v(ee,Jd);function fe(a,b){this.b=a;this.f=b};function ge(a){fe.call(this,a,{mousedown:this.fm,mousemove:this.gm,mouseup:this.jm,mouseover:this.im,mouseout:this.hm});this.a=a.i;this.i=[]}v(ge,fe);function he(a,b){a=a.i;var c=b.clientX;b=b.clientY;for(var d=0,e=a.length,f;d<e&&(f=a[d]);d++){var g=Math.abs(b-f[1]);if(25>=Math.abs(c-f[0])&&25>=g)return!0}return!1}function ie(a){var b=je(a,a),c=b.preventDefault;b.preventDefault=function(){a.preventDefault();c()};b.pointerId=1;b.isPrimary=!0;b.pointerType="mouse";return b}k=ge.prototype;
-k.fm=function(a){if(!he(this,a)){(1).toString()in this.a&&this.cancel(a);var b=ie(a);this.a[(1).toString()]=a;ke(this.b,"pointerdown",b,a)}};k.gm=function(a){if(!he(this,a)){var b=ie(a);ke(this.b,"pointermove",b,a)}};k.jm=function(a){if(!he(this,a)){var b=this.a[(1).toString()];b&&b.button===a.button&&(b=ie(a),ke(this.b,"pointerup",b,a),delete this.a[(1).toString()])}};k.im=function(a){if(!he(this,a)){var b=ie(a);le(this.b,b,a)}};k.hm=function(a){if(!he(this,a)){var b=ie(a);me(this.b,b,a)}};
-k.cancel=function(a){var b=ie(a);this.b.cancel(b,a);delete this.a[(1).toString()]};function ne(a){fe.call(this,a,{MSPointerDown:this.om,MSPointerMove:this.pm,MSPointerUp:this.sm,MSPointerOut:this.qm,MSPointerOver:this.rm,MSPointerCancel:this.nm,MSGotPointerCapture:this.lm,MSLostPointerCapture:this.mm});this.a=a.i;this.i=["","unavailable","touch","pen","mouse"]}v(ne,fe);function oe(a,b){var c=b;"number"===typeof b.pointerType&&(c=je(b,b),c.pointerType=a.i[b.pointerType]);return c}k=ne.prototype;
-k.om=function(a){this.a[a.pointerId.toString()]=a;var b=oe(this,a);ke(this.b,"pointerdown",b,a)};k.pm=function(a){var b=oe(this,a);ke(this.b,"pointermove",b,a)};k.sm=function(a){var b=oe(this,a);ke(this.b,"pointerup",b,a);delete this.a[a.pointerId.toString()]};k.qm=function(a){var b=oe(this,a);me(this.b,b,a)};k.rm=function(a){var b=oe(this,a);le(this.b,b,a)};k.nm=function(a){var b=oe(this,a);this.b.cancel(b,a);delete this.a[a.pointerId.toString()]};
-k.mm=function(a){this.b.b(new pe("lostpointercapture",a,a))};k.lm=function(a){this.b.b(new pe("gotpointercapture",a,a))};function qe(a){fe.call(this,a,{pointerdown:this.ip,pointermove:this.jp,pointerup:this.mp,pointerout:this.kp,pointerover:this.lp,pointercancel:this.hp,gotpointercapture:this.ul,lostpointercapture:this.em})}v(qe,fe);k=qe.prototype;k.ip=function(a){re(this.b,a)};k.jp=function(a){re(this.b,a)};k.mp=function(a){re(this.b,a)};k.kp=function(a){re(this.b,a)};k.lp=function(a){re(this.b,a)};k.hp=function(a){re(this.b,a)};k.em=function(a){re(this.b,a)};k.ul=function(a){re(this.b,a)};function pe(a,b,c){Oc.call(this,a);this.b=b;a=c?c:{};this.buttons=se(a);this.pressure=te(a,this.buttons);this.bubbles="bubbles"in a?a.bubbles:!1;this.cancelable="cancelable"in a?a.cancelable:!1;this.view="view"in a?a.view:null;this.detail="detail"in a?a.detail:null;this.screenX="screenX"in a?a.screenX:0;this.screenY="screenY"in a?a.screenY:0;this.clientX="clientX"in a?a.clientX:0;this.clientY="clientY"in a?a.clientY:0;this.ctrlKey="ctrlKey"in a?a.ctrlKey:!1;this.altKey="altKey"in a?a.altKey:!1;this.shiftKey=
-"shiftKey"in a?a.shiftKey:!1;this.metaKey="metaKey"in a?a.metaKey:!1;this.button="button"in a?a.button:0;this.relatedTarget="relatedTarget"in a?a.relatedTarget:null;this.pointerId="pointerId"in a?a.pointerId:0;this.width="width"in a?a.width:0;this.height="height"in a?a.height:0;this.tiltX="tiltX"in a?a.tiltX:0;this.tiltY="tiltY"in a?a.tiltY:0;this.pointerType="pointerType"in a?a.pointerType:"";this.isPrimary="isPrimary"in a?a.isPrimary:!1;b.preventDefault&&(this.preventDefault=function(){b.preventDefault()})}
-v(pe,Oc);function se(a){if(a.buttons||ue)a=a.buttons;else switch(a.which){case 1:a=1;break;case 2:a=4;break;case 3:a=2;break;default:a=0}return a}function te(a,b){var c=0;a.pressure?c=a.pressure:c=b?.5:0;return c}var ue=!1;try{ue=1===(new MouseEvent("click",{buttons:1})).buttons}catch(a){};function ve(a,b){fe.call(this,a,{touchstart:this.rq,touchmove:this.qq,touchend:this.pq,touchcancel:this.oq});this.a=a.i;this.j=b;this.i=void 0;this.g=0;this.c=void 0}v(ve,fe);k=ve.prototype;k.ij=function(){this.g=0;this.c=void 0};
-function we(a,b,c){b=je(b,c);b.pointerId=c.identifier+2;b.bubbles=!0;b.cancelable=!0;b.detail=a.g;b.button=0;b.buttons=1;b.width=c.webkitRadiusX||c.radiusX||0;b.height=c.webkitRadiusY||c.radiusY||0;b.pressure=c.webkitForce||c.force||.5;b.isPrimary=a.i===c.identifier;b.pointerType="touch";b.clientX=c.clientX;b.clientY=c.clientY;b.screenX=c.screenX;b.screenY=c.screenY;return b}
-function xe(a,b,c){function d(){b.preventDefault()}var e=Array.prototype.slice.call(b.changedTouches),f=e.length,g;for(g=0;g<f;++g){var h=we(a,b,e[g]);h.preventDefault=d;c.call(a,b,h)}}
-k.rq=function(a){var b=a.touches,c=Object.keys(this.a),d=c.length;if(d>=b.length){var e=[],f;for(f=0;f<d;++f){var g=c[f];var h=this.a[g];var l;if(!(l=1==g))a:{for(var m=b.length,n=0;n<m;n++)if(l=b[n],l.identifier===g-2){l=!0;break a}l=!1}l||e.push(h.out)}for(f=0;f<e.length;++f)this.Kf(a,e[f])}b=a.changedTouches[0];c=Object.keys(this.a).length;if(!c||1===c&&(1).toString()in this.a)this.i=b.identifier,void 0!==this.c&&clearTimeout(this.c);ye(this,a);this.g++;xe(this,a,this.cp)};
-k.cp=function(a,b){this.a[b.pointerId]={target:b.target,out:b,Wi:b.target};var c=this.b;b.bubbles=!0;ke(c,"pointerover",b,a);c=this.b;b.bubbles=!1;ke(c,"pointerenter",b,a);ke(this.b,"pointerdown",b,a)};k.qq=function(a){a.preventDefault();xe(this,a,this.km)};
-k.km=function(a,b){var c=this.a[b.pointerId];if(c){var d=c.out,e=c.Wi;ke(this.b,"pointermove",b,a);d&&e!==b.target&&(d.relatedTarget=b.target,b.relatedTarget=e,d.target=e,b.target?(me(this.b,d,a),le(this.b,b,a)):(b.target=e,b.relatedTarget=null,this.Kf(a,b)));c.out=b;c.Wi=b.target}};k.pq=function(a){ye(this,a);xe(this,a,this.sq)};
-k.sq=function(a,b){ke(this.b,"pointerup",b,a);this.b.out(b,a);ze(this.b,b,a);delete this.a[b.pointerId];b.isPrimary&&(this.i=void 0,this.c=setTimeout(this.ij.bind(this),200))};k.oq=function(a){xe(this,a,this.Kf)};k.Kf=function(a,b){this.b.cancel(b,a);this.b.out(b,a);ze(this.b,b,a);delete this.a[b.pointerId];b.isPrimary&&(this.i=void 0,this.c=setTimeout(this.ij.bind(this),200))};
-function ye(a,b){var c=a.j.i;b=b.changedTouches[0];if(a.i===b.identifier){var d=[b.clientX,b.clientY];c.push(d);setTimeout(function(){ma(c,d)},2500)}};function Ae(a){Qc.call(this);this.g=a;this.i={};this.f={};this.a=[];Yd?Be(this,new qe(this)):Zd?Be(this,new ne(this)):(a=new ge(this),Be(this,a),Xd&&Be(this,new ve(this,a)));a=this.a.length;for(var b,c=0;c<a;c++)b=this.a[c],Ce(this,Object.keys(b.f))}v(Ae,Qc);function Be(a,b){var c=Object.keys(b.f);c&&(c.forEach(function(a){var c=b.f[a];c&&(this.f[a]=c.bind(b))},a),a.a.push(b))}Ae.prototype.c=function(a){var b=this.f[a.type];b&&b(a)};
-function Ce(a,b){b.forEach(function(a){y(this.g,a,this.c,this)},a)}function De(a,b){b.forEach(function(a){Kc(this.g,a,this.c,this)},a)}function je(a,b){for(var c={},d,e=0,f=Ee.length;e<f;e++)d=Ee[e][0],c[d]=a[d]||b[d]||Ee[e][1];return c}function ze(a,b,c){b.bubbles=!1;ke(a,"pointerleave",b,c)}Ae.prototype.out=function(a,b){a.bubbles=!0;ke(this,"pointerout",a,b)};Ae.prototype.cancel=function(a,b){ke(this,"pointercancel",a,b)};
-function me(a,b,c){a.out(b,c);var d=b.target,e=b.relatedTarget;d&&e&&d.contains(e)||ze(a,b,c)}function le(a,b,c){b.bubbles=!0;ke(a,"pointerover",b,c);var d=b.target,e=b.relatedTarget;d&&e&&d.contains(e)||(b.bubbles=!1,ke(a,"pointerenter",b,c))}function ke(a,b,c,d){a.b(new pe(b,d,c))}function re(a,b){a.b(new pe(b.type,b,b))}Ae.prototype.ka=function(){for(var a=this.a.length,b,c=0;c<a;c++)b=this.a[c],De(this,Object.keys(b.f));Qc.prototype.ka.call(this)};
-var Ee=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",!1],["type",""],["target",null],["currentTarget",null],["which",0]];function Fe(a,b){Qc.call(this);this.i=a;this.j=0;this.o=!1;this.f=[];this.D=b?b*Sd:Sd;this.c=null;a=this.i.a;this.S=0;this.u={};this.g=new Ae(a);this.a=null;this.l=y(this.g,"pointerdown",this.Ol,this);this.v=y(this.g,"pointermove",this.Lp,this)}v(Fe,Qc);function Ge(a,b){var c=new ee("click",a.i,b);a.b(c);a.j?(clearTimeout(a.j),a.j=0,c=new ee("dblclick",a.i,b),a.b(c)):a.j=setTimeout(function(){this.j=0;var a=new ee("singleclick",this.i,b);this.b(a)}.bind(a),250)}
-function He(a,b){"pointerup"==b.type||"pointercancel"==b.type?delete a.u[b.pointerId]:"pointerdown"==b.type&&(a.u[b.pointerId]=!0);a.S=Object.keys(a.u).length}k=Fe.prototype;k.Jh=function(a){He(this,a);var b=new ee("pointerup",this.i,a);this.b(b);this.o||a.button||Ge(this,this.c);this.S||(this.f.forEach(Ec),this.f.length=0,this.o=!1,this.c=null,Nc(this.a),this.a=null)};
-k.Ol=function(a){He(this,a);var b=new ee("pointerdown",this.i,a);this.b(b);this.c=a;this.f.length||(this.a=new Ae(document),this.f.push(y(this.a,"pointermove",this.Hm,this),y(this.a,"pointerup",this.Jh,this),y(this.g,"pointercancel",this.Jh,this)))};k.Hm=function(a){if(Ie(this,a)){this.o=!0;var b=new ee("pointerdrag",this.i,a,this.o);this.b(b)}a.preventDefault()};k.Lp=function(a){this.b(new ee(a.type,this.i,a,!(!this.c||!Ie(this,a))))};
-function Ie(a,b){return Math.abs(b.clientX-a.c.clientX)>a.D||Math.abs(b.clientY-a.c.clientY)>a.D}k.ka=function(){this.v&&(Ec(this.v),this.v=null);this.l&&(Ec(this.l),this.l=null);this.f.forEach(Ec);this.f.length=0;this.a&&(Nc(this.a),this.a=null);this.g&&(Nc(this.g),this.g=null);Qc.prototype.ka.call(this)};function Ke(a,b){this.l=a;this.c=b;this.b=[];this.i=[];this.a={}}Ke.prototype.clear=function(){this.b.length=0;this.i.length=0;ub(this.a)};function Le(a){var b=a.b,c=a.i,d=b[0];1==b.length?(b.length=0,c.length=0):(b[0]=b.pop(),c[0]=c.pop(),Me(a,0));b=a.c(d);delete a.a[b];return d}Ke.prototype.f=function(a){xa(!(this.c(a)in this.a),31);var b=this.l(a);return Infinity!=b?(this.b.push(a),this.i.push(b),this.a[this.c(a)]=!0,Ne(this,0,this.b.length-1),!0):!1};
-function Me(a,b){for(var c=a.b,d=a.i,e=c.length,f=c[b],g=d[b],h=b;b<e>>1;){var l=2*b+1,m=2*b+2,l=m<e&&d[m]<d[l]?m:l;c[b]=c[l];d[b]=d[l];b=l}c[b]=f;d[b]=g;Ne(a,h,b)}function Ne(a,b,c){var d=a.b;a=a.i;for(var e=d[c],f=a[c];c>b;){var g=c-1>>1;if(a[g]>f)d[c]=d[g],a[c]=a[g],c=g;else break}d[c]=e;a[c]=f}
-function Oe(a){var b=a.l,c=a.b,d=a.i,e=0,f=c.length,g;for(g=0;g<f;++g){var h=c[g];var l=b(h);Infinity==l?delete a.a[a.c(h)]:(d[e]=l,c[e++]=h)}c.length=e;d.length=e;for(b=(a.b.length>>1)-1;0<=b;b--)Me(a,b)};function Pe(a,b){Ke.call(this,function(b){return a.apply(null,b)},function(a){return a[0].bb()});this.v=b;this.j=0;this.g={}}v(Pe,Ke);Pe.prototype.f=function(a){var b=Ke.prototype.f.call(this,a);b&&y(a[0],"change",this.o,this);return b};Pe.prototype.o=function(a){a=a.target;var b=a.getState();if(2===b||3===b||4===b||5===b)Kc(a,"change",this.o,this),a=a.bb(),a in this.g&&(delete this.g[a],--this.j),this.v()};
-function Qe(a,b,c){for(var d=0,e,f;a.j<b&&d<c&&0<a.b.length;)e=Le(a)[0],f=e.bb(),0!==e.getState()||f in a.g||(a.g[f]=!0,++a.j,++d,e.load())};function Re(a){return function(b,c,d){if(void 0!==b)return b=ka(a,b,d),b=Ca(b+c,0,a.length-1),c=Math.floor(b),b!=c&&c<a.length-1?a[c]/Math.pow(a[c]/a[c+1],b-c):a[c]}}function Se(a,b,c){return function(d,e,f){if(void 0!==d)return d=Math.max(Math.floor(Math.log(b/d)/Math.log(a)+(-f/2+.5))+e,0),void 0!==c&&(d=Math.min(d,c)),b/Math.pow(a,d)}};function Te(a){if(void 0!==a)return 0}function Ue(a,b){if(void 0!==a)return a+b}function Ve(a){var b=2*Math.PI/a;return function(a,d){if(void 0!==a)return a=Math.floor((a+d)/b+.5)*b}}function We(){var a=Ha(5);return function(b,c){if(void 0!==b)return Math.abs(b+c)<=a?0:b+c}};function Xe(a,b){a=void 0!==b?a.toFixed(b):""+a;b=a.indexOf(".");b=-1===b?a.length:b;return 2<b?a:Array(3-b).join("0")+a}function Ye(a){a=(""+a).split(".");for(var b=["1","3"],c=0;c<Math.max(a.length,b.length);c++){var d=parseInt(a[c]||"0",10),e=parseInt(b[c]||"0",10);if(d>e)return 1;if(e>d)return-1}return 0};function Ze(a,b){a[0]+=b[0];a[1]+=b[1];return a}function $e(a,b){var c=b.pd(),d=b.wa();b=d[0];var d=d[1],e=a[0]-b;a=a[1]-d;e||a||(e=1);var f=Math.sqrt(e*e+a*a);return[b+c*e/f,d+c*a/f]}function af(a,b){var c=a[0];a=a[1];var d=b[0],e=b[1];b=d[0];var d=d[1],f=e[0],e=e[1],g=f-b,h=e-d,c=g||h?(g*(c-b)+h*(a-d))/(g*g+h*h||0):0;0>=c?(a=b,c=d):1<=c?(a=f,c=e):(a=b+c*g,c=d+c*h);return[a,c]}
-function bf(a,b,c){b=Ia(b+180,360)-180;var d=Math.abs(3600*b);c=c||0;var e=Math.pow(10,c),f=Math.floor(d/3600),g=Math.floor((d-3600*f)/60),d=Math.ceil((d-3600*f-60*g)*e)/e;60<=d&&(d=0,g+=1);60<=g&&(g=0,f+=1);return f+"\u00b0 "+Xe(g)+"\u2032 "+Xe(d,c)+"\u2033"+(b?" "+a.charAt(0>b?1:0):"")}function cf(a,b,c){return a?b.replace("{x}",a[0].toFixed(c)).replace("{y}",a[1].toFixed(c)):""}function df(a,b){for(var c=!0,d=a.length-1;0<=d;--d)if(a[d]!=b[d]){c=!1;break}return c}
-function ef(a,b){var c=Math.cos(b);b=Math.sin(b);var d=a[1]*c+a[0]*b;a[0]=a[0]*c-a[1]*b;a[1]=d;return a}function gf(a,b){a[0]*=b;a[1]*=b}function hf(a,b){var c=a[0]-b[0];a=a[1]-b[1];return c*c+a*a}function jf(a,b){return Math.sqrt(hf(a,b))}function kf(a,b){return hf(a,af(a,b))}function lf(a,b){return cf(a,"{x}, {y}",b)};function mf(){return!0}function nf(){return!1};function of(){Tc.call(this);this.l=Oa();this.v=-1;this.f={};this.o=this.g=0}v(of,Tc);k=of.prototype;k.Ab=function(a,b){b=b?b:[NaN,NaN];this.Kb(a[0],a[1],b,Infinity);return b};k.sb=function(a){return this.Mc(a[0],a[1])};k.Mc=nf;k.G=function(a){this.v!=this.i&&(this.l=this.se(this.l),this.v=this.i);var b=this.l;a?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):a=b;return a};k.Rb=function(a){return this.Vd(a*a)};k.tb=function(a,b){this.Dc(ec(a,b));return this};function pf(a,b,c,d,e,f){for(var g=f?f:[],h=0;b<c;b+=d){var l=a[b],m=a[b+1];g[h++]=e[0]*l+e[2]*m+e[4];g[h++]=e[1]*l+e[3]*m+e[5]}f&&g.length!=h&&(g.length=h);return g}function qf(a,b,c,d,e,f,g){for(var h=g?g:[],l=0,m;b<c;b+=d)for(h[l++]=a[b]+e,h[l++]=a[b+1]+f,m=b+2;m<b+d;++m)h[l++]=a[m];g&&h.length!=l&&(h.length=l);return h};function rf(){of.call(this);this.ja="XY";this.a=2;this.A=null}v(rf,of);function sf(a){var b;"XY"==a?b=2:"XYZ"==a||"XYM"==a?b=3:"XYZM"==a&&(b=4);return b}k=rf.prototype;k.Mc=nf;k.se=function(a){return $a(this.A,0,this.A.length,this.a,a)};k.ac=function(){return this.A.slice(0,this.a)};k.ga=function(){return this.A};k.bc=function(){return this.A.slice(this.A.length-this.a)};k.cc=function(){return this.ja};
-k.Vd=function(a){this.o!=this.i&&(ub(this.f),this.g=0,this.o=this.i);if(0>a||this.g&&a<=this.g)return this;var b=a.toString();if(this.f.hasOwnProperty(b))return this.f[b];var c=this.hd(a);if(c.ga().length<this.A.length)return this.f[b]=c;this.g=a;return this};k.hd=function(){return this};k.qa=function(){return this.a};function tf(a,b,c){a.a=sf(b);a.ja=b;a.A=c}
-function uf(a,b,c,d){if(b)c=sf(b);else{for(b=0;b<d;++b)if(c.length)c=c[0];else{a.ja="XY";a.a=2;return}c=c.length;var e;2==c?e="XY":3==c?e="XYZ":4==c&&(e="XYZM");b=e}a.ja=b;a.a=c}k.Dc=function(a){this.A&&(a(this.A,this.A,this.a),this.s())};
-k.rotate=function(a,b){var c=this.ga();if(c){var d=c.length,e=this.qa(),f=c?c:[],g=Math.cos(a);a=Math.sin(a);var h=b[0];b=b[1];for(var l=0,m=0;m<d;m+=e){var n=c[m]-h,p=c[m+1]-b;f[l++]=h+n*g-p*a;f[l++]=b+n*a+p*g;for(n=m+2;n<m+e;++n)f[l++]=c[n]}c&&f.length!=l&&(f.length=l);this.s()}};
-k.scale=function(a,b,c){var d=b;void 0===d&&(d=a);var e=c;e||(e=nb(this.G()));if(c=this.ga()){b=c.length;for(var f=this.qa(),g=c?c:[],h=e[0],e=e[1],l=0,m=0;m<b;m+=f){var n=c[m]-h,p=c[m+1]-e;g[l++]=h+a*n;g[l++]=e+d*p;for(n=m+2;n<m+f;++n)g[l++]=c[n]}c&&g.length!=l&&(g.length=l);this.s()}};k.translate=function(a,b){var c=this.ga();c&&(qf(c,0,c.length,this.qa(),a,b,c),this.s())};function vf(a,b,c,d){for(var e=0,f=a[c-d],g=a[c-d+1];b<c;b+=d)var h=a[b],l=a[b+1],e=e+(g*h-f*l),f=h,g=l;return e/2}function wf(a,b,c,d){var e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g],e=e+vf(a,b,h,d);b=h}return e};function xf(a,b,c,d,e,f,g){var h=a[b],l=a[b+1],m=a[c]-h,n=a[c+1]-l;if(m||n)if(f=((e-h)*m+(f-l)*n)/(m*m+n*n),1<f)b=c;else if(0<f){for(e=0;e<d;++e)g[e]=Ja(a[b+e],a[c+e],f);g.length=d;return}for(e=0;e<d;++e)g[e]=a[b+e];g.length=d}function yf(a,b,c,d,e){var f=a[b],g=a[b+1];for(b+=d;b<c;b+=d){var h=a[b],l=a[b+1],f=Ga(f,g,h,l);f>e&&(e=f);f=h;g=l}return e}function zf(a,b,c,d,e){var f;var g=0;for(f=c.length;g<f;++g){var h=c[g];e=yf(a,b,h,d,e);b=h}return e}
-function Af(a,b,c,d,e,f,g,h,l,m,n){if(b==c)return m;if(!e){var p=Ga(g,h,a[b],a[b+1]);if(p<m){for(n=0;n<d;++n)l[n]=a[b+n];l.length=d;return p}return m}for(var q=n?n:[NaN,NaN],r=b+d;r<c;)if(xf(a,r-d,r,d,g,h,q),p=Ga(g,h,q[0],q[1]),p<m){m=p;for(n=0;n<d;++n)l[n]=q[n];l.length=d;r+=d}else r+=d*Math.max((Math.sqrt(p)-Math.sqrt(m))/e|0,1);if(f&&(xf(a,c-d,b,d,g,h,q),p=Ga(g,h,q[0],q[1]),p<m)){m=p;for(n=0;n<d;++n)l[n]=q[n];l.length=d}return m}
-function Bf(a,b,c,d,e,f,g,h,l,m,n){n=n?n:[NaN,NaN];var p;var q=0;for(p=c.length;q<p;++q){var r=c[q];m=Af(a,b,r,d,e,f,g,h,l,m,n);b=r}return m};function Cf(a,b){var c=0,d;var e=0;for(d=b.length;e<d;++e)a[c++]=b[e];return c}function Df(a,b,c,d){var e;var f=0;for(e=c.length;f<e;++f){var g=c[f],h;for(h=0;h<d;++h)a[b++]=g[h]}return b}function Ef(a,b,c,d,e){e=e?e:[];var f=0,g;var h=0;for(g=c.length;h<g;++h)b=Df(a,b,c[h],d),e[f++]=b;e.length=f;return e};function Ff(a,b,c,d,e){e=void 0!==e?e:[];for(var f=0;b<c;b+=d)e[f++]=a.slice(b,b+d);e.length=f;return e}function Gf(a,b,c,d,e){e=void 0!==e?e:[];var f=0,g;var h=0;for(g=c.length;h<g;++h){var l=c[h];e[f++]=Ff(a,b,l,d,e[f]);b=l}e.length=f;return e};function Hf(a,b,c,d,e,f,g){var h=(c-b)/d;if(3>h){for(;b<c;b+=d)f[g++]=a[b],f[g++]=a[b+1];return g}var l=Array(h);l[0]=1;l[h-1]=1;c=[b,c-d];for(var m=0,n;0<c.length;){var p=c.pop(),q=c.pop(),r=0,u=a[q],x=a[q+1],B=a[p],E=a[p+1];for(n=q+d;n<p;n+=d){var A=Fa(a[n],a[n+1],u,x,B,E);A>r&&(m=n,r=A)}r>e&&(l[(m-b)/d]=1,q+d<m&&c.push(q,m),m+d<p&&c.push(m,p))}for(n=0;n<h;++n)l[n]&&(f[g++]=a[b+n*d],f[g++]=a[b+n*d+1]);return g}
-function If(a,b,c,d,e,f,g,h){var l;var m=0;for(l=c.length;m<l;++m){var n=c[m];a:{var p=a,q=n,r=d,u=e,x=f,B=g;if(b!=q){var E=u*Math.round(p[b]/u),A=u*Math.round(p[b+1]/u);b+=r;x[B++]=E;x[B++]=A;do{var L=u*Math.round(p[b]/u);g=u*Math.round(p[b+1]/u);b+=r;if(b==q){x[B++]=L;x[B++]=g;g=B;break a}}while(L==E&&g==A);for(;b<q;){var oa=u*Math.round(p[b]/u);var ha=u*Math.round(p[b+1]/u);b+=r;if(oa!=L||ha!=g){var ga=L-E,z=g-A,M=oa-E,ba=ha-A;ga*ba==z*M&&(0>ga&&M<ga||ga==M||0<ga&&M>ga)&&(0>z&&ba<z||z==ba||0<z&&
-ba>z)||(x[B++]=L,x[B++]=g,E=L,A=g);L=oa;g=ha}}x[B++]=L;x[B++]=g}g=B}h.push(g);b=n}return g};function Jf(a,b){rf.call(this);this.c=this.j=-1;this.ma(a,b)}v(Jf,rf);k=Jf.prototype;k.clone=function(){var a=new Jf(null);Kf(a,this.ja,this.A.slice());return a};k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;this.c!=this.i&&(this.j=Math.sqrt(yf(this.A,0,this.A.length,this.a,0)),this.c=this.i);return Af(this.A,0,this.A.length,this.a,this.j,!0,a,b,c,d)};k.qn=function(){return vf(this.A,0,this.A.length,this.a)};k.X=function(){return Ff(this.A,0,this.A.length,this.a)};
-k.hd=function(a){var b=[];b.length=Hf(this.A,0,this.A.length,this.a,a,b,0);a=new Jf(null);Kf(a,"XY",b);return a};k.U=function(){return"LinearRing"};k.Xa=function(){};k.ma=function(a,b){a?(uf(this,b,a,1),this.A||(this.A=[]),this.A.length=Df(this.A,0,a,this.a),this.s()):Kf(this,"XY",null)};function Kf(a,b,c){tf(a,b,c);a.s()};function C(a,b){rf.call(this);this.ma(a,b)}v(C,rf);k=C.prototype;k.clone=function(){var a=new C(null);a.ba(this.ja,this.A.slice());return a};k.Kb=function(a,b,c,d){var e=this.A;a=Ga(a,b,e[0],e[1]);if(a<d){d=this.a;for(b=0;b<d;++b)c[b]=e[b];c.length=d;return a}return d};k.X=function(){return this.A?this.A.slice():[]};k.se=function(a){return Za(this.A,a)};k.U=function(){return"Point"};k.Xa=function(a){return Ua(a,this.A[0],this.A[1])};
-k.ma=function(a,b){a?(uf(this,b,a,0),this.A||(this.A=[]),this.A.length=Cf(this.A,a),this.s()):this.ba("XY",null)};k.ba=function(a,b){tf(this,a,b);this.s()};function Lf(a,b,c,d,e){return!db(e,function(e){return!Mf(a,b,c,d,e[0],e[1])})}function Mf(a,b,c,d,e,f){for(var g=0,h=a[c-d],l=a[c-d+1];b<c;b+=d){var m=a[b],n=a[b+1];l<=f?n>f&&0<(m-h)*(f-l)-(e-h)*(n-l)&&g++:n<=f&&0>(m-h)*(f-l)-(e-h)*(n-l)&&g--;h=m;l=n}return!!g}function Nf(a,b,c,d,e,f){if(!c.length||!Mf(a,b,c[0],d,e,f))return!1;var g;b=1;for(g=c.length;b<g;++b)if(Mf(a,c[b-1],c[b],d,e,f))return!1;return!0};function Of(a,b,c,d,e,f,g){var h,l=e[f+1],m=[],n=c[0];var p=a[n-d];var q=a[n-d+1];for(h=b;h<n;h+=d){var r=a[h];var u=a[h+1];if(l<=q&&u<=l||q<=l&&l<=u)p=(l-q)/(u-q)*(r-p)+p,m.push(p);p=r;q=u}n=NaN;q=-Infinity;m.sort(ia);p=m[0];h=1;for(u=m.length;h<u;++h){r=m[h];var x=Math.abs(r-p);x>q&&(p=(p+r)/2,Nf(a,b,c,d,p,l)&&(n=p,q=x));p=r}isNaN(n)&&(n=e[f]);return g?(g.push(n,l),g):[n,l]};function Pf(a,b,c,d,e,f){for(var g=[a[b],a[b+1]],h=[],l;b+d<c;b+=d){h[0]=a[b+d];h[1]=a[b+d+1];if(l=e.call(f,g,h))return l;g[0]=h[0];g[1]=h[1]}return!1};function Qf(a,b,c,d,e){var f=ab(Oa(),a,b,c,d);return qb(e,f)?Va(e,f)||f[0]>=e[0]&&f[2]<=e[2]||f[1]>=e[1]&&f[3]<=e[3]?!0:Pf(a,b,c,d,function(a,b){var c=!1,d=Wa(e,a),f=Wa(e,b);if(1===d||1===f)c=!0;else{var g=e[0],h=e[1],r=e[2],u=e[3],x=b[0];b=b[1];a=(b-a[1])/(x-a[0]);f&2&&!(d&2)&&(c=x-(b-u)/a,c=c>=g&&c<=r);c||!(f&4)||d&4||(c=b-(x-r)*a,c=c>=h&&c<=u);c||!(f&8)||d&8||(c=x-(b-h)/a,c=c>=g&&c<=r);c||!(f&16)||d&16||(c=b-(x-g)*a,c=c>=h&&c<=u)}return c}):!1}
-function Rf(a,b,c,d,e){var f=c[0];if(!(Qf(a,b,f,d,e)||Mf(a,b,f,d,e[0],e[1])||Mf(a,b,f,d,e[0],e[3])||Mf(a,b,f,d,e[2],e[1])||Mf(a,b,f,d,e[2],e[3])))return!1;if(1===c.length)return!0;b=1;for(f=c.length;b<f;++b)if(Lf(a,c[b-1],c[b],d,e))return!1;return!0};function Sf(a,b,c,d){for(var e=0,f=a[c-d],g=a[c-d+1];b<c;b+=d)var h=a[b],l=a[b+1],e=e+(h-f)*(l+g),f=h,g=l;return 0<e}function Tf(a,b,c,d){var e=0;d=void 0!==d?d:!1;var f;var g=0;for(f=b.length;g<f;++g){var h=b[g],e=Sf(a,e,h,c);if(!g){if(d&&e||!d&&!e)return!1}else if(d&&!e||!d&&e)return!1;e=h}return!0}
-function Uf(a,b,c,d,e){e=void 0!==e?e:!1;var f;var g=0;for(f=c.length;g<f;++g){var h=c[g],l=Sf(a,b,h,d);if(g?e&&!l||!e&&l:e&&l||!e&&!l)for(var l=a,m=h,n=d;b<m-n;){var p;for(p=0;p<n;++p){var q=l[b+p];l[b+p]=l[m-n+p];l[m-n+p]=q}b+=n;m-=n}b=h}return b}function Vf(a,b,c,d){var e=0,f;var g=0;for(f=b.length;g<f;++g)e=Uf(a,e,b[g],c,d);return e};function D(a,b){rf.call(this);this.c=[];this.u=-1;this.D=null;this.I=this.C=this.B=-1;this.j=null;this.ma(a,b)}v(D,rf);k=D.prototype;k.pk=function(a){this.A?la(this.A,a.ga()):this.A=a.ga().slice();this.c.push(this.A.length);this.s()};k.clone=function(){var a=new D(null);a.ba(this.ja,this.A.slice(),this.c.slice());return a};
-k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;this.C!=this.i&&(this.B=Math.sqrt(zf(this.A,0,this.c,this.a,0)),this.C=this.i);return Bf(this.A,0,this.c,this.a,this.B,!0,a,b,c,d)};k.Mc=function(a,b){return Nf(this.ec(),0,this.c,this.a,a,b)};k.tn=function(){return wf(this.ec(),0,this.c,this.a)};k.X=function(a){if(void 0!==a){var b=this.ec().slice();Uf(b,0,this.c,this.a,a)}else b=this.A;return Gf(b,0,this.c,this.a)};k.Bb=function(){return this.c};
-function Wf(a){if(a.u!=a.i){var b=nb(a.G());a.D=Of(a.ec(),0,a.c,a.a,b,0);a.u=a.i}return a.D}k.Tk=function(){return new C(Wf(this))};k.Zk=function(){return this.c.length};k.Ch=function(a){if(0>a||this.c.length<=a)return null;var b=new Jf(null);Kf(b,this.ja,this.A.slice(a?this.c[a-1]:0,this.c[a]));return b};k.Sd=function(){var a=this.ja,b=this.A,c=this.c,d=[],e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g],l=new Jf(null);Kf(l,a,b.slice(e,h));d.push(l);e=h}return d};
-k.ec=function(){if(this.I!=this.i){var a=this.A;Tf(a,this.c,this.a)?this.j=a:(this.j=a.slice(),this.j.length=Uf(this.j,0,this.c,this.a));this.I=this.i}return this.j};k.hd=function(a){var b=[],c=[];b.length=If(this.A,0,this.c,this.a,Math.sqrt(a),b,0,c);a=new D(null);a.ba("XY",b,c);return a};k.U=function(){return"Polygon"};k.Xa=function(a){return Rf(this.ec(),0,this.c,this.a,a)};
-k.ma=function(a,b){a?(uf(this,b,a,2),this.A||(this.A=[]),a=Ef(this.A,0,a,this.a,this.c),this.A.length=a.length?a[a.length-1]:0,this.s()):this.ba("XY",null,this.c)};k.ba=function(a,b,c){tf(this,a,b);this.c=c;this.s()};function Xf(a,b,c,d){var e=d?d:32;d=[];var f;for(f=0;f<e;++f)la(d,a.offset(b,c,2*Math.PI*f/e));d.push(d[0],d[1]);a=new D(null);a.ba("XY",d,[d.length]);return a}function Yf(a){var b=a[0],c=a[1],d=a[2];a=a[3];b=[b,c,b,a,d,a,d,c,b,c];c=new D(null);c.ba("XY",b,[b.length]);return c}
-function Zf(a,b,c){var d=b?b:32,e=a.qa();b=a.ja;for(var f=new D(null,b),d=e*(d+1),e=Array(d),g=0;g<d;g++)e[g]=0;f.ba(b,e,[e.length]);$f(f,a.wa(),a.pd(),c);return f}function $f(a,b,c,d){var e=a.ga(),f=a.ja,g=a.qa(),h=a.Bb(),l=e.length/g-1;d=d?d:0;for(var m,n,p=0;p<=l;++p)n=p*g,m=d+2*Ia(p,l)*Math.PI/l,e[n]=b[0]+c*Math.cos(m),e[n+1]=b[1]+c*Math.sin(m);a.ba(f,e,h)};function F(a){Tc.call(this);a=tb({},a);this.o=[0,0];this.c=[];this.wf=this.wf.bind(this);this.v=$b(a.projection);ag(this,a)}v(F,Tc);
-function ag(a,b){var c={};c.center=void 0!==b.center?b.center:null;var d=void 0!==b.minZoom?b.minZoom:0;var e=void 0!==b.maxZoom?b.maxZoom:28;var f=void 0!==b.zoomFactor?b.zoomFactor:2;if(void 0!==b.resolutions){e=b.resolutions;var g=e[0];var h=e[e.length-1];e=Re(e)}else{g=$b(b.projection);h=g.G();var l=(h?Math.max(lb(h),mb(h)):360*zb.degrees/g.sc())/256/Math.pow(2,0),m=l/Math.pow(2,28);g=b.maxResolution;void 0!==g?d=0:g=l/Math.pow(f,d);h=b.minResolution;void 0===h&&(h=void 0!==b.maxZoom?void 0!==
-b.maxResolution?g/Math.pow(f,e):l/Math.pow(f,e):m);e=d+Math.floor(Math.log(g/h)/Math.log(f));h=g/Math.pow(f,e-d);e=Se(f,g,e-d)}a.a=g;a.f=h;a.C=f;a.j=b.resolutions;a.l=d;(void 0!==b.enableRotation?b.enableRotation:1)?(d=b.constrainRotation,d=void 0===d||!0===d?We():!1===d?Ue:"number"===typeof d?Ve(d):Ue):d=Te;a.g={center:void 0!==b.extent?Bc(b.extent):Cc,resolution:e,rotation:d};void 0!==b.resolution?c.resolution=b.resolution:void 0!==b.zoom&&(c.resolution=a.constrainResolution(a.a,b.zoom-a.l));c.rotation=
-void 0!==b.rotation?b.rotation:0;a.H(c);a.D=b}function bg(a,b){var c=tb({},a.D);void 0!==c.resolution?c.resolution=a.Pa():c.zoom=a.Hh();c.center=a.wa();c.rotation=a.Qa();return tb({},c,b)}k=F.prototype;
-k.animate=function(a){var b=Date.now(),c=this.wa().slice(),d=this.Pa(),e=this.Qa(),f=arguments.length;if(1<f&&"function"===typeof arguments[f-1]){var g=arguments[f-1];--f}for(var h=[],l=0;l<f;++l){var m=arguments[l],n={start:b,complete:!1,anchor:m.anchor,duration:void 0!==m.duration?m.duration:1E3,easing:m.easing||sd};m.center&&(n.Rg=c,n.Tg=m.center,c=n.Tg);void 0!==m.zoom?(n.tf=d,n.zd=this.constrainResolution(this.a,m.zoom-this.l,0),d=n.zd):m.resolution&&(n.tf=d,n.zd=m.resolution,d=n.zd);void 0!==
-m.rotation&&(n.Sg=e,n.uf=m.rotation,e=n.uf);n.callback=g;b+=n.duration;h.push(n)}this.c.push(h);cg(this,0,1);this.wf()};k.Ic=function(){return 0<dg(this)[0]};k.Rk=function(){return 0<dg(this)[1]};k.ed=function(){cg(this,0,-dg(this)[0]);for(var a=0,b=this.c.length;a<b;++a){var c=this.c[a];c[0].callback&&c[0].callback(!1)}this.c.length=0};
-k.wf=function(){void 0!==this.u&&(cancelAnimationFrame(this.u),this.u=void 0);if(this.Ic()){for(var a=Date.now(),b=!1,c=this.c.length-1;0<=c;--c){for(var d=this.c[c],e=!0,f=0,g=d.length;f<g;++f){var h=d[f];if(!h.complete){b=a-h.start;b=0<h.duration?b/h.duration:1;1<=b?(h.complete=!0,b=1):e=!1;b=h.easing(b);if(h.Rg){var l=h.Rg[0],m=h.Rg[1];this.set("center",[l+b*(h.Tg[0]-l),m+b*(h.Tg[1]-m)])}h.tf&&h.zd&&(l=1===b?h.zd:h.tf+b*(h.zd-h.tf),h.anchor&&this.set("center",eg(this,l,h.anchor)),this.set("resolution",
-l));void 0!==h.Sg&&void 0!==h.uf&&(b=1===b?h.uf:h.Sg+b*(h.uf-h.Sg),h.anchor&&this.set("center",fg(this,b,h.anchor)),this.set("rotation",b));b=!0;if(!h.complete)break}}e&&(this.c[c]=null,cg(this,0,-1),(d=d[0].callback)&&d(!0))}this.c=this.c.filter(Boolean);b&&void 0===this.u&&(this.u=requestAnimationFrame(this.wf))}};function fg(a,b,c){var d=a.wa();if(void 0!==d){var e=[d[0]-c[0],d[1]-c[1]];ef(e,b-a.Qa());Ze(e,c)}return e}
-function eg(a,b,c){var d,e=a.wa();a=a.Pa();void 0!==e&&void 0!==a&&(d=[c[0]-b*(c[0]-e[0])/a,c[1]-b*(c[1]-e[1])/a]);return d}function gg(a){var b=[100,100];a='.ol-viewport[data-view="'+w(a)+'"]';if(a=document.querySelector(a))a=getComputedStyle(a),b[0]=parseInt(a.width,10),b[1]=parseInt(a.height,10);return b}k.Ec=function(a){return this.g.center(a)};k.constrainResolution=function(a,b,c){return this.g.resolution(a,b||0,c||0)};k.constrainRotation=function(a,b){return this.g.rotation(a,b||0)};k.wa=function(){return this.get("center")};
-function dg(a,b){return void 0!==b?(b[0]=a.o[0],b[1]=a.o[1],b):a.o.slice()}k.dd=function(a){a=a||gg(this);var b=this.wa();xa(b,1);var c=this.Pa();xa(void 0!==c,2);var d=this.Qa();xa(void 0!==d,3);return ob(b,c,d,a)};k.Nm=function(){return this.a};k.Pm=function(){return this.f};k.Om=function(){return this.Ce(this.f)};k.eq=function(a){ag(this,bg(this,{maxZoom:a}))};k.Qm=function(){return this.Ce(this.a)};k.fq=function(a){ag(this,bg(this,{minZoom:a}))};k.Rm=function(){return this.v};k.Pa=function(){return this.get("resolution")};
-k.Sm=function(){return this.j};k.ze=function(a,b){b=b||gg(this);return Math.max(lb(a)/b[0],mb(a)/b[1])};function hg(a){var b=a.a,c=Math.log(b/a.f)/Math.log(2);return function(a){return b/Math.pow(2,a*c)}}k.Qa=function(){return this.get("rotation")};function ig(a){var b=a.a,c=Math.log(b/a.f)/Math.log(2);return function(a){return Math.log(b/a)/Math.log(2)/c}}k.getState=function(){var a=this.wa(),b=this.v,c=this.Pa(),d=this.Qa();return{center:a.slice(),projection:void 0!==b?b:null,resolution:c,rotation:d}};
-k.Hh=function(){var a,b=this.Pa();void 0!==b&&(a=this.Ce(b));return a};k.Ce=function(a){if(a>=this.f&&a<=this.a){var b=this.l||0;if(this.j){var c=ka(this.j,a,1);b+=c;if(c==this.j.length-1)return b;var d=this.j[c];c=d/this.j[c+1]}else d=this.a,c=this.C;b+=Math.log(d/a)/Math.log(c)}return b};
-k.Qf=function(a,b){b=b||{};var c=b.size;c||(c=gg(this));if(a instanceof rf)if("Circle"===a.U()){a=a.G();var d=Yf(a);d.rotate(this.Qa(),nb(a))}else d=a;else xa(Array.isArray(a),24),xa(!kb(a),25),d=Yf(a);var e=b.padding?b.padding:[0,0,0,0],f=void 0!==b.constrainResolution?b.constrainResolution:!0,g=void 0!==b.nearest?b.nearest:!1,h;void 0!==b.minResolution?h=b.minResolution:void 0!==b.maxZoom?h=this.constrainResolution(this.a,b.maxZoom-this.l,0):h=0;var l=d.ga(),m=this.Qa();a=Math.cos(-m);var m=Math.sin(-m),
-n=Infinity,p=Infinity,q=-Infinity,r=-Infinity;d=d.qa();for(var u=0,x=l.length;u<x;u+=d)var B=l[u]*a-l[u+1]*m,E=l[u]*m+l[u+1]*a,n=Math.min(n,B),p=Math.min(p,E),q=Math.max(q,B),r=Math.max(r,E);c=this.ze([n,p,q,r],[c[0]-e[1]-e[3],c[1]-e[0]-e[2]]);c=isNaN(c)?h:Math.max(c,h);f&&(h=this.constrainResolution(c,0,0),!g&&h<c&&(h=this.constrainResolution(h,-1,0)),c=h);m=-m;h=(n+q)/2+(e[1]-e[3])/2*c;e=(p+r)/2+(e[0]-e[2])/2*c;a=[h*a-e*m,e*a+h*m];e=b.callback?b.callback:ua;void 0!==b.duration?this.animate({resolution:c,
-center:a,duration:b.duration,easing:b.easing},e):(this.Vc(c),this.ob(a),setTimeout(e.bind(void 0,!0),0))};k.uk=function(a,b,c){var d=this.Qa(),e=Math.cos(-d),d=Math.sin(-d),f=a[0]*e-a[1]*d;a=a[1]*e+a[0]*d;var g=this.Pa(),f=f+(b[0]/2-c[0])*g;a+=(c[1]-b[1]/2)*g;d=-d;this.ob([f*e-a*d,a*e+f*d])};function jg(a){return!!a.wa()&&void 0!==a.Pa()}k.rotate=function(a,b){void 0!==b&&(b=fg(this,a,b),this.ob(b));this.Oe(a)};k.ob=function(a){this.set("center",a);this.Ic()&&this.ed()};
-function cg(a,b,c){a.o[b]+=c;a.s()}k.Vc=function(a){this.set("resolution",a);this.Ic()&&this.ed()};k.Oe=function(a){this.set("rotation",a);this.Ic()&&this.ed()};k.lq=function(a){a=this.constrainResolution(this.a,a-this.l,0);this.Vc(a)};function kg(a,b,c){this.f=a;this.c=b;this.g=c;this.b=[];this.a=this.i=0}function lg(a){a.b.length=0;a.i=0;a.a=0}function mg(a){if(6>a.b.length)return!1;var b=Date.now()-a.g,c=a.b.length-3;if(a.b[c+2]<b)return!1;for(var d=c-3;0<d&&a.b[d+2]>b;)d-=3;b=a.b[c+2]-a.b[d+2];if(b<1E3/60)return!1;var e=a.b[c]-a.b[d],c=a.b[c+1]-a.b[d+1];a.i=Math.atan2(c,e);a.a=Math.sqrt(e*e+c*c)/b;return a.a>a.c};function ng(a){Tc.call(this);this.v=null;this.Ha(!0);this.handleEvent=a.handleEvent}v(ng,Tc);ng.prototype.c=function(){return this.get("active")};ng.prototype.f=function(){return this.v};ng.prototype.Ha=function(a){this.set("active",a)};ng.prototype.setMap=function(a){this.v=a};function og(a,b,c,d){if(void 0!==b){var e=a.Qa(),f=a.wa();void 0!==e&&f&&0<d?a.animate({rotation:b,anchor:c,duration:d,easing:rd}):a.rotate(b,c)}}
-function pg(a,b,c,d){var e=a.Pa();b=a.constrainResolution(e,b,0);if(c&&void 0!==b&&b!==e){var f=a.wa();c=eg(a,b,c);c=a.Ec(c);c=[(b*f[0]-e*c[0])/(b-e),(b*f[1]-e*c[1])/(b-e)]}qg(a,b,c,d)}function qg(a,b,c,d){if(b){var e=a.Pa(),f=a.wa();void 0!==e&&f&&b!==e&&d?a.animate({resolution:b,anchor:c,duration:d,easing:rd}):(c&&(c=eg(a,b,c),a.ob(c)),a.Vc(b))}};function rg(a){a=a?a:{};this.a=a.delta?a.delta:1;ng.call(this,{handleEvent:sg});this.g=void 0!==a.duration?a.duration:250}v(rg,ng);function sg(a){var b=!1,c=a.originalEvent;if("dblclick"==a.type){var b=a.coordinate,c=c.shiftKey?-this.a:this.a,d=a.map.Z();pg(d,c,b,this.g);a.preventDefault();b=!0}return!b};function tg(a){a=a.originalEvent;return a.altKey&&!(a.metaKey||a.ctrlKey)&&a.shiftKey}function ug(a){a=a.originalEvent;return!a.button&&!(Qd&&Rd&&a.ctrlKey)}function vg(a){return"pointermove"==a.type}function wg(a){return"singleclick"==a.type}function xg(a){a=a.originalEvent;return!a.altKey&&!(a.metaKey||a.ctrlKey)&&!a.shiftKey}function yg(a){a=a.originalEvent;return!a.altKey&&!(a.metaKey||a.ctrlKey)&&a.shiftKey}
-function Ag(a){a=a.originalEvent.target.tagName;return"INPUT"!==a&&"SELECT"!==a&&"TEXTAREA"!==a}function Bg(a){xa(a.b,56);return"mouse"==a.b.pointerType}function Cg(a){a=a.b;return a.isPrimary&&0===a.button};function Dg(a){a=a?a:{};ng.call(this,{handleEvent:a.handleEvent?a.handleEvent:Eg});this.yf=a.handleDownEvent?a.handleDownEvent:nf;this.If=a.handleDragEvent?a.handleDragEvent:ua;this.Jf=a.handleMoveEvent?a.handleMoveEvent:ua;this.sk=a.handleUpEvent?a.handleUpEvent:nf;this.D=!1;this.na={};this.o=[]}v(Dg,ng);function Fg(a){for(var b=a.length,c=0,d=0,e=0;e<b;e++)c+=a[e].clientX,d+=a[e].clientY;return[c/b,d/b]}
-function Eg(a){if(!(a instanceof ee))return!0;var b=!1,c=a.type;if("pointerdown"===c||"pointerdrag"===c||"pointerup"===c)c=a.b,"pointerup"==a.type?delete this.na[c.pointerId]:"pointerdown"==a.type?this.na[c.pointerId]=c:c.pointerId in this.na&&(this.na[c.pointerId]=c),this.o=vb(this.na);this.D?"pointerdrag"==a.type?this.If(a):"pointerup"==a.type&&(this.D=this.sk(a)&&0<this.o.length):"pointerdown"==a.type?(this.D=a=this.yf(a),b=this.Xc(a)):"pointermove"==a.type&&this.Jf(a);return!b}
-Dg.prototype.Xc=function(a){return a};function Gg(a){Dg.call(this,{handleDownEvent:Hg,handleDragEvent:Ig,handleUpEvent:Jg});a=a?a:{};this.a=a.kinetic;this.g=null;this.u=a.condition?a.condition:xg;this.j=!1}v(Gg,Dg);function Ig(a){var b=this.o,c=Fg(b);if(b.length==this.l){if(this.a&&this.a.b.push(c[0],c[1],Date.now()),this.g){var d=this.g[0]-c[0],e=c[1]-this.g[1];a=a.map.Z();var f=a.getState(),d=[d,e];gf(d,f.resolution);ef(d,f.rotation);Ze(d,f.center);d=a.Ec(d);a.ob(d)}}else this.a&&lg(this.a);this.g=c;this.l=b.length}
-function Jg(a){var b=a.map;a=b.Z();if(this.o.length)return this.a&&lg(this.a),this.g=null,!0;if(!this.j&&this.a&&mg(this.a)){var c=this.a;c=(c.c-c.a)/c.f;var d=this.a.i,e=a.wa(),e=b.Ja(e),b=b.Wa([e[0]-c*Math.cos(d),e[1]-c*Math.sin(d)]);a.animate({center:a.Ec(b),duration:500,easing:rd})}cg(a,1,-1);return!1}
-function Hg(a){if(0<this.o.length&&this.u(a)){var b=a.map.Z();this.g=null;this.D||cg(b,1,1);dg(b)[0]&&b.ob(a.frameState.viewState.center);this.a&&lg(this.a);this.j=1<this.o.length;return!0}return!1}Gg.prototype.Xc=nf;function Kg(a){a=a?a:{};Dg.call(this,{handleDownEvent:Lg,handleDragEvent:Mg,handleUpEvent:Ng});this.g=a.condition?a.condition:tg;this.a=void 0;this.j=void 0!==a.duration?a.duration:250}v(Kg,Dg);function Mg(a){if(Bg(a)){var b=a.map,c=b.Z();if(c.g.rotation!==Te){b=b.Ob();a=a.pixel;a=Math.atan2(b[1]/2-a[1],a[0]-b[0]/2);if(void 0!==this.a){var b=a-this.a,d=c.Qa();og(c,d-b)}this.a=a}}}
-function Ng(a){if(!Bg(a))return!0;a=a.map.Z();cg(a,1,-1);var b=a.Qa(),c=this.j,b=a.constrainRotation(b,0);og(a,b,void 0,c);return!1}function Lg(a){return Bg(a)&&ug(a)&&this.g(a)?(cg(a.map.Z(),1,1),this.a=void 0,!0):!1}Kg.prototype.Xc=nf;function Og(a){this.Gc=null;this.a=document.createElement("div");this.a.style.position="absolute";this.a.className="ol-box "+a;this.i=this.c=this.b=null}v(Og,Mc);Og.prototype.ka=function(){this.setMap(null)};function Pg(a){var b=a.c,c=a.i;a=a.a.style;a.left=Math.min(b[0],c[0])+"px";a.top=Math.min(b[1],c[1])+"px";a.width=Math.abs(c[0]-b[0])+"px";a.height=Math.abs(c[1]-b[1])+"px"}
-Og.prototype.setMap=function(a){if(this.b){this.b.C.removeChild(this.a);var b=this.a.style;b.left=b.top=b.width=b.height="inherit"}(this.b=a)&&this.b.C.appendChild(this.a)};function Qg(a){var b=a.c,c=a.i,b=[b,[b[0],c[1]],c,[c[0],b[1]]].map(a.b.Wa,a.b);b[4]=b[0].slice();a.Gc?a.Gc.ma([b]):a.Gc=new D([b])}Og.prototype.V=function(){return this.Gc};function Rg(a){Dg.call(this,{handleDownEvent:Sg,handleDragEvent:Tg,handleUpEvent:Ug});a=a?a:{};this.a=new Og(a.className||"ol-dragbox");this.u=void 0!==a.minArea?a.minArea:64;this.g=null;this.C=a.condition?a.condition:mf;this.l=a.boxEndCondition?a.boxEndCondition:Vg}v(Rg,Dg);function Vg(a,b,c){a=c[0]-b[0];b=c[1]-b[1];return a*a+b*b>=this.u}function Tg(a){if(Bg(a)){var b=this.a,c=a.pixel;b.c=this.g;b.i=c;Qg(b);Pg(b);this.b(new Wg(Xg,a.coordinate,a))}}Rg.prototype.V=function(){return this.a.V()};
-Rg.prototype.j=ua;function Ug(a){if(!Bg(a))return!0;this.a.setMap(null);this.l(a,this.g,a.pixel)&&(this.j(a),this.b(new Wg(Yg,a.coordinate,a)));return!1}function Sg(a){if(Bg(a)&&ug(a)&&this.C(a)){this.g=a.pixel;this.a.setMap(a.map);var b=this.a,c=this.g;b.c=this.g;b.i=c;Qg(b);Pg(b);this.b(new Wg(Zg,a.coordinate,a));return!0}return!1}var Zg="boxstart",Xg="boxdrag",Yg="boxend";function Wg(a,b,c){Oc.call(this,a);this.coordinate=b;this.mapBrowserEvent=c}v(Wg,Oc);function $g(a){a=a?a:{};var b=a.condition?a.condition:yg;this.B=void 0!==a.duration?a.duration:200;this.I=void 0!==a.out?a.out:!1;Rg.call(this,{condition:b,className:a.className||"ol-dragzoom"})}v($g,Rg);
-$g.prototype.j=function(){var a=this.v,b=a.Z(),c=a.Ob(),d=this.V().G();if(this.I){var e=b.dd(c),d=[a.Ja(eb(d)),a.Ja(hb(d))],a=Ya(void 0),f;var g=0;for(f=d.length;g<f;++g)Pa(a,d[g]);d=b.ze(a,c);rb(e,1/d);d=e}c=b.constrainResolution(b.ze(d,c));e=nb(d);e=b.Ec(e);b.animate({resolution:c,center:e,duration:this.B,easing:rd})};function ah(a){ng.call(this,{handleEvent:bh});a=a||{};this.a=function(a){return xg(a)&&Ag(a)};this.g=a.condition?a.condition:this.a;this.j=void 0!==a.duration?a.duration:100;this.o=void 0!==a.pixelDelta?a.pixelDelta:128}v(ah,ng);
-function bh(a){var b=!1;if("keydown"==a.type){var c=a.originalEvent.keyCode;if(this.g(a)&&(40==c||37==c||39==c||38==c)){var b=a.map.Z(),d=b.Pa()*this.o,e=0,f=0;40==c?f=-d:37==c?e=-d:39==c?e=d:f=d;d=[e,f];ef(d,b.Qa());c=this.j;if(e=b.wa())d=b.Ec([e[0]+d[0],e[1]+d[1]]),c?b.animate({duration:c,easing:td,center:d}):b.ob(d);a.preventDefault();b=!0}}return!b};function ch(a){ng.call(this,{handleEvent:dh});a=a?a:{};this.g=a.condition?a.condition:Ag;this.a=a.delta?a.delta:1;this.j=void 0!==a.duration?a.duration:100}v(ch,ng);function dh(a){var b=!1;if("keydown"==a.type||"keypress"==a.type){var c=a.originalEvent.charCode;!this.g(a)||43!=c&&45!=c||(b=43==c?this.a:-this.a,c=a.map.Z(),pg(c,b,void 0,this.j),a.preventDefault(),b=!0)}return!b};function eh(a){ng.call(this,{handleEvent:fh});a=a||{};this.j=0;this.D=void 0!==a.duration?a.duration:250;this.na=void 0!==a.timeout?a.timeout:80;this.C=void 0!==a.useAnchor?a.useAnchor:!0;this.R=a.constrainResolution||!1;this.a=null;this.l=this.o=this.u=this.g=void 0}v(eh,ng);
-function fh(a){var b=a.type;if("wheel"!==b&&"mousewheel"!==b)return!0;a.preventDefault();var b=a.map,c=a.originalEvent;this.C&&(this.a=a.coordinate);if("wheel"==a.type){var d=c.deltaY;Od&&c.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(d/=Sd);c.deltaMode===WheelEvent.DOM_DELTA_LINE&&(d*=40)}else"mousewheel"==a.type&&(d=-c.wheelDeltaY,Pd&&(d/=3));if(0===d)return!1;a=Date.now();void 0===this.g&&(this.g=a);if(!this.o||400<a-this.g)this.o=4>Math.abs(d)?gh:hh;if(this.o===gh){b=b.Z();this.l?clearTimeout(this.l):
-cg(b,1,1);this.l=setTimeout(this.B.bind(this),400);var c=b.Pa()*Math.pow(2,d/300),e=b.f,f=b.a,g=0;c<e?(c=Math.max(c,e/1.5),g=1):c>f&&(c=Math.min(c,1.5*f),g=-1);if(this.a){var h=eg(b,c,this.a);b.ob(b.Ec(h))}b.Vc(c);!g&&this.R&&b.animate({resolution:b.constrainResolution(c,0<d?-1:1),easing:rd,anchor:this.a,duration:this.D});0<g?b.animate({resolution:e,easing:rd,anchor:this.a,duration:500}):0>g&&b.animate({resolution:f,easing:rd,anchor:this.a,duration:500});this.g=a;return!1}this.j+=d;d=Math.max(this.na-
-(a-this.g),0);clearTimeout(this.u);this.u=setTimeout(this.I.bind(this,b),d);return!1}eh.prototype.B=function(){this.l=void 0;cg(this.v.Z(),1,-1)};eh.prototype.I=function(a){a=a.Z();a.Ic()&&a.ed();pg(a,-Ca(this.j,-1,1),this.a,this.D);this.o=void 0;this.j=0;this.a=null;this.u=this.g=void 0};eh.prototype.T=function(a){this.C=a;a||(this.a=null)};var gh="trackpad",hh="wheel";function ih(a){Dg.call(this,{handleDownEvent:jh,handleDragEvent:kh,handleUpEvent:lh});a=a||{};this.g=null;this.j=void 0;this.a=!1;this.l=0;this.C=void 0!==a.threshold?a.threshold:.3;this.u=void 0!==a.duration?a.duration:250}v(ih,Dg);
-function kh(a){var b=0,c=this.o[0],d=this.o[1],c=Math.atan2(d.clientY-c.clientY,d.clientX-c.clientX);void 0!==this.j&&(b=c-this.j,this.l+=b,!this.a&&Math.abs(this.l)>this.C&&(this.a=!0));this.j=c;a=a.map;c=a.Z();if(c.g.rotation!==Te){var d=a.a.getBoundingClientRect(),e=Fg(this.o);e[0]-=d.left;e[1]-=d.top;this.g=a.Wa(e);this.a&&(d=c.Qa(),a.render(),og(c,d+b,this.g))}}
-function lh(a){if(2>this.o.length){a=a.map.Z();cg(a,1,-1);if(this.a){var b=a.Qa(),c=this.g,d=this.u,b=a.constrainRotation(b,0);og(a,b,c,d)}return!1}return!0}function jh(a){return 2<=this.o.length?(a=a.map,this.g=null,this.j=void 0,this.a=!1,this.l=0,this.D||cg(a.Z(),1,1),!0):!1}ih.prototype.Xc=nf;function mh(a){Dg.call(this,{handleDownEvent:nh,handleDragEvent:oh,handleUpEvent:ph});a=a?a:{};this.l=a.constrainResolution||!1;this.g=null;this.u=void 0!==a.duration?a.duration:400;this.a=void 0;this.j=1}v(mh,Dg);
-function oh(a){var b=1,c=this.o[0],d=this.o[1],e=c.clientX-d.clientX,c=c.clientY-d.clientY,e=Math.sqrt(e*e+c*c);void 0!==this.a&&(b=this.a/e);this.a=e;a=a.map;var e=a.Z(),d=e.Pa(),f=e.a,g=e.f,c=d*b;c>f?(b=f/d,c=f):c<g&&(b=g/d,c=g);1!=b&&(this.j=b);b=a.a.getBoundingClientRect();d=Fg(this.o);d[0]-=b.left;d[1]-=b.top;this.g=a.Wa(d);a.render();qg(e,c,this.g)}
-function ph(a){if(2>this.o.length){a=a.map.Z();cg(a,1,-1);var b=a.Pa();if(this.l||b<a.f||b>a.a){var c=this.g,d=this.u,b=a.constrainResolution(b,0,this.j-1);qg(a,b,c,d)}return!1}return!0}function nh(a){return 2<=this.o.length?(a=a.map,this.g=null,this.a=void 0,this.j=1,this.D||cg(a.Z(),1,1),!0):!1}mh.prototype.Xc=nf;function qh(a){a=a?a:{};var b=new Yc,c=new kg(-.005,.05,100);(void 0!==a.altShiftDragRotate?a.altShiftDragRotate:1)&&b.push(new Kg);(void 0!==a.doubleClickZoom?a.doubleClickZoom:1)&&b.push(new rg({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.dragPan?a.dragPan:1)&&b.push(new Gg({kinetic:c}));(void 0!==a.pinchRotate?a.pinchRotate:1)&&b.push(new ih);(void 0!==a.pinchZoom?a.pinchZoom:1)&&b.push(new mh({constrainResolution:a.constrainResolution,duration:a.zoomDuration}));if(void 0!==a.keyboard?
-a.keyboard:1)b.push(new ah),b.push(new ch({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.mouseWheelZoom?a.mouseWheelZoom:1)&&b.push(new eh({constrainResolution:a.constrainResolution,duration:a.zoomDuration}));(void 0!==a.shiftDragZoom?a.shiftDragZoom:1)&&b.push(new $g({duration:a.zoomDuration}));return b};function sh(a){Tc.call(this);var b=tb({},a);b.opacity=void 0!==a.opacity?a.opacity:1;b.visible=void 0!==a.visible?a.visible:!0;b.zIndex=void 0!==a.zIndex?a.zIndex:0;b.maxResolution=void 0!==a.maxResolution?a.maxResolution:Infinity;b.minResolution=void 0!==a.minResolution?a.minResolution:0;this.H(b);this.a={layer:this,Je:!0}}v(sh,Tc);
-function th(a){a.a.opacity=Ca(a.hc(),0,1);a.a.yj=a.$f();a.a.visible=a.Mb();a.a.extent=a.G();a.a.zIndex=a.Ba();a.a.maxResolution=a.fc();a.a.minResolution=Math.max(a.gc(),0);return a.a}k=sh.prototype;k.G=function(){return this.get("extent")};k.fc=function(){return this.get("maxResolution")};k.gc=function(){return this.get("minResolution")};k.hc=function(){return this.get("opacity")};k.Mb=function(){return this.get("visible")};k.Ba=function(){return this.get("zIndex")};
-k.vc=function(a){this.set("extent",a)};k.Ac=function(a){this.set("maxResolution",a)};k.Bc=function(a){this.set("minResolution",a)};k.wc=function(a){this.set("opacity",a)};k.xc=function(a){this.set("visible",a)};k.Vb=function(a){this.set("zIndex",a)};function uh(a){var b=a||{};a=tb({},b);delete a.layers;b=b.layers;sh.call(this,a);this.f=[];this.c={};y(this,Vc(vh),this.Hl,this);b?Array.isArray(b)?b=new Yc(b.slice(),{unique:!0}):xa(b instanceof Yc,43):b=new Yc(void 0,{unique:!0});this.xi(b)}v(uh,sh);k=uh.prototype;k.Fd=function(){};k.Fe=function(){this.Mb()&&this.s()};
-k.Hl=function(){this.f.forEach(Ec);this.f.length=0;var a=this.qd();this.f.push(y(a,"add",this.Gl,this),y(a,"remove",this.Il,this));for(var b in this.c)this.c[b].forEach(Ec);ub(this.c);var a=a.a,c;b=0;for(c=a.length;b<c;b++){var d=a[b];this.c[w(d).toString()]=[y(d,"propertychange",this.Fe,this),y(d,"change",this.Fe,this)]}this.s()};k.Gl=function(a){a=a.element;var b=w(a).toString();this.c[b]=[y(a,"propertychange",this.Fe,this),y(a,"change",this.Fe,this)];this.s()};
-k.Il=function(a){a=w(a.element).toString();this.c[a].forEach(Ec);delete this.c[a];this.s()};k.qd=function(){return this.get(vh)};k.xi=function(a){this.set(vh,a)};
-k.Yf=function(a){var b=void 0!==a?a:[],c=b.length;this.qd().forEach(function(a){a.Yf(b)});a=th(this);var d;for(d=b.length;c<d;c++){var e=b[c];e.opacity*=a.opacity;e.visible=e.visible&&a.visible;e.maxResolution=Math.min(e.maxResolution,a.maxResolution);e.minResolution=Math.max(e.minResolution,a.minResolution);void 0!==a.extent&&(e.extent=void 0!==e.extent?pb(e.extent,a.extent):a.extent)}return b};k.$f=function(){return"ready"};var vh="layers";function wh(a){var b=tb({},a);delete b.source;sh.call(this,b);this.v=this.l=this.o=null;a.map&&this.setMap(a.map);y(this,Vc("source"),this.Ul,this);this.Wc(a.source?a.source:null)}v(wh,sh);function xh(a,b){return a.visible&&b>=a.minResolution&&b<a.maxResolution}k=wh.prototype;k.Yf=function(a){a=a?a:[];a.push(th(this));return a};k.ha=function(){return this.get("source")||null};k.$f=function(){var a=this.ha();return a?a.getState():"undefined"};k.Tn=function(){this.s()};
-k.Ul=function(){this.v&&(Ec(this.v),this.v=null);var a=this.ha();a&&(this.v=y(a,"change",this.Tn,this));this.s()};k.setMap=function(a){this.o&&(Ec(this.o),this.o=null);a||this.s();this.l&&(Ec(this.l),this.l=null);a&&(this.o=y(a,"precompose",function(a){var b=th(this);b.Je=!1;b.zIndex=Infinity;a.frameState.layerStatesArray.push(b);a.frameState.layerStates[w(this)]=b},this),this.l=y(this,"change",a.render,a),this.s())};k.Wc=function(a){this.set("source",a)};function yh(){this.b={};this.a=0}yh.prototype.clear=function(){this.b={};this.a=0};yh.prototype.get=function(a,b,c){a=b+":"+a+":"+(c?gd(c):"null");return a in this.b?this.b[a]:null};yh.prototype.set=function(a,b,c,d){this.b[b+":"+a+":"+(c?gd(c):"null")]=d;++this.a};var zh=new yh;var Ah=Array(6);function Bh(){return[1,0,0,1,0,0]}function Ch(a){return Dh(a,1,0,0,1,0,0)}function Eh(a,b){var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],l=b[0],m=b[1],n=b[2],p=b[3],q=b[4];b=b[5];a[0]=c*l+e*m;a[1]=d*l+f*m;a[2]=c*n+e*p;a[3]=d*n+f*p;a[4]=c*q+e*b+g;a[5]=d*q+f*b+h;return a}function Dh(a,b,c,d,e,f,g){a[0]=b;a[1]=c;a[2]=d;a[3]=e;a[4]=f;a[5]=g;return a}function Fh(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];return a}
-function Gh(a,b){var c=b[0],d=b[1];b[0]=a[0]*c+a[2]*d+a[4];b[1]=a[1]*c+a[3]*d+a[5];return b}function Hh(a,b){var c=Math.cos(b);b=Math.sin(b);Eh(a,Dh(Ah,c,b,-b,c,0,0))}function Ih(a,b,c){return Eh(a,Dh(Ah,b,0,0,c,0,0))}function Jh(a,b,c){Eh(a,Dh(Ah,1,0,0,1,b,c))}function Kh(a,b,c,d,e,f,g,h){var l=Math.sin(f);f=Math.cos(f);a[0]=d*f;a[1]=e*l;a[2]=-d*l;a[3]=e*f;a[4]=g*d*f-h*d*l+b;a[5]=g*e*l+h*e*f+c;return a}
-function Lh(a){var b=a[0]*a[3]-a[1]*a[2];xa(!!b,32);var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5];a[0]=f/b;a[1]=-d/b;a[2]=-e/b;a[3]=c/b;a[4]=(e*h-f*g)/b;a[5]=-(c*h-d*g)/b;return a};function Mh(a,b){this.o=b;this.c={};this.v={}}v(Mh,Mc);function Nh(a){var b=a.viewState,c=a.coordinateToPixelTransform,d=a.pixelToCoordinateTransform;Kh(c,a.size[0]/2,a.size[1]/2,1/b.resolution,-1/b.resolution,-b.rotation,-b.center[0],-b.center[1]);Lh(Fh(d,c))}k=Mh.prototype;k.ka=function(){for(var a in this.c)Nc(this.c[a])};function Oh(){if(32<zh.a){var a=0,b;for(b in zh.b){var c=zh.b[b];a++&3||Rc(c)||(delete zh.b[b],--zh.a)}}}
-k.Ea=function(a,b,c,d,e,f,g){function h(a,c){var f=w(a).toString(),g=b.layerStates[w(c)].Je;if(!(f in b.skippedFeatureUids)||g)return d.call(e,a,g?c:null)}var l,m=b.viewState,n=m.resolution,p=m.projection,m=a;if(p.i){var p=p.G(),q=lb(p),r=a[0];if(r<p[0]||r>p[2])m=[r+q*Math.ceil((p[0]-r)/q),a[1]]}p=b.layerStatesArray;for(q=p.length-1;0<=q;--q){var u=p[q],r=u.layer;if(xh(u,n)&&f.call(g,r)&&(u=Ph(this,r),r.ha()&&(l=u.Ea(r.ha().u?m:a,b,c,h,e)),l))return l}};
-k.Ei=function(a,b,c,d,e){return void 0!==this.Ea(a,b,c,mf,this,d,e)};function Ph(a,b){var c=w(b).toString();if(c in a.c)return a.c[c];b=b.Fd(a);a.c[c]=b;a.v[c]=y(b,"change",a.Fl,a);return b}k.Fl=function(){this.o.render()};k.Jg=ua;k.Rp=function(a,b){for(var c in this.c)if(!(b&&c in b.layerStates)){a=c;var d=this.c[a];delete this.c[a];Ec(this.v[a]);delete this.v[a];Nc(d)}};function Qh(a,b){for(var c in a.c)if(!(c in b.layerStates)){b.postRenderFunctions.push(a.Rp.bind(a));break}}
-function ra(a,b){return a.zIndex-b.zIndex};function Rh(a,b,c,d,e){Oc.call(this,a);this.vectorContext=b;this.frameState=c;this.context=d;this.glContext=e}v(Rh,Oc);var Sh=[0,0,0,1],Th=[],Uh=[0,0,0,1];function Vh(a,b,c,d){b&&(a.translate(c,d),a.rotate(b),a.translate(-c,-d))};function Wh(){}k=Wh.prototype;k.zb=function(){};k.rd=function(){};k.Zb=function(){};k.te=function(){};k.ue=function(){};k.mc=function(){};k.nc=function(){};k.oc=function(){};k.pc=function(){};k.qc=function(){};k.rc=function(){};k.yc=function(){};k.Ma=function(){};k.Ub=function(){};k.Cb=function(){};function Xh(a,b,c,d,e){this.i=a;this.u=b;this.c=c;this.S=d;this.Yb=e;this.M=this.b=this.a=this.Ua=this.R=this.I=null;this.na=this.T=this.l=this.B=this.C=this.D=0;this.fa=!1;this.f=this.fb=0;this.pa=!1;this.oa=0;this.Ia="";this.va=this.Jb=0;this.Sa=!1;this.j=this.$a=0;this.ra=this.o=this.g=null;this.v=[];this.xb=Bh()}v(Xh,Wh);
-function Yh(a,b,c){if(a.M){b=pf(b,0,c,2,a.S,a.v);c=a.i;var d=a.xb,e=c.globalAlpha;1!=a.l&&(c.globalAlpha=e*a.l);var f=a.fb;a.fa&&(f+=a.Yb);var g;var h=0;for(g=b.length;h<g;h+=2){var l=b[h]-a.D,m=b[h+1]-a.C;a.pa&&(l=Math.round(l),m=Math.round(m));if(f||1!=a.f){var n=l+a.D,p=m+a.C;Kh(d,n,p,a.f,a.f,f,-n,-p);c.setTransform.apply(c,d)}c.drawImage(a.M,a.T,a.na,a.oa,a.B,l,m,a.oa,a.B)}(f||1!=a.f)&&c.setTransform(1,0,0,1,0,0);1!=a.l&&(c.globalAlpha=e)}}
-function Zh(a,b,c,d){var e=0;if(a.ra&&""!==a.Ia){a.g&&$h(a,a.g);a.o&&ai(a,a.o);var f=a.ra,g=a.i,h=a.Ua;h?(h.font!=f.font&&(h.font=g.font=f.font),h.textAlign!=f.textAlign&&(h.textAlign=g.textAlign=f.textAlign),h.textBaseline!=f.textBaseline&&(h.textBaseline=g.textBaseline=f.textBaseline)):(g.font=f.font,g.textAlign=f.textAlign,g.textBaseline=f.textBaseline,a.Ua={font:f.font,textAlign:f.textAlign,textBaseline:f.textBaseline});b=pf(b,e,c,d,a.S,a.v);f=a.i;g=a.$a;for(a.Sa&&(g+=a.Yb);e<c;e+=d){var h=b[e]+
-a.Jb,l=b[e+1]+a.va;if(g||1!=a.j){var m=Kh(a.xb,h,l,a.j,a.j,g,-h,-l);f.setTransform.apply(f,m)}a.o&&f.strokeText(a.Ia,h,l);a.g&&f.fillText(a.Ia,h,l)}(g||1!=a.j)&&f.setTransform(1,0,0,1,0,0)}}function bi(a,b,c,d,e,f){var g=a.i;a=pf(b,c,d,e,a.S,a.v);g.moveTo(a[0],a[1]);b=a.length;f&&(b-=2);for(c=2;c<b;c+=2)g.lineTo(a[c],a[c+1]);f&&g.closePath();return d}function ci(a,b,c,d,e){var f;var g=0;for(f=d.length;g<f;++g)c=bi(a,b,c,d[g],e,!0);return c}k=Xh.prototype;
-k.Zb=function(a){if(qb(this.c,a.G())){if(this.a||this.b){this.a&&$h(this,this.a);this.b&&ai(this,this.b);var b=this.S;var c=this.v,d=a.ga();b=d?pf(d,0,d.length,a.qa(),b,c):null;c=b[2]-b[0];d=b[3]-b[1];c=Math.sqrt(c*c+d*d);d=this.i;d.beginPath();d.arc(b[0],b[1],c,0,2*Math.PI);this.a&&d.fill();this.b&&d.stroke()}""!==this.Ia&&Zh(this,a.wa(),2,2)}};k.rd=function(a){this.Ma(a.Fa(),a.Ga());this.Ub(a.Y());this.Cb(a.Na())};
-k.zb=function(a){switch(a.U()){case "Point":this.qc(a);break;case "LineString":this.mc(a);break;case "Polygon":this.rc(a);break;case "MultiPoint":this.oc(a);break;case "MultiLineString":this.nc(a);break;case "MultiPolygon":this.pc(a);break;case "GeometryCollection":this.ue(a);break;case "Circle":this.Zb(a)}};k.te=function(a,b){(a=(0,b.Za)(a))&&qb(this.c,a.G())&&(this.rd(b),this.zb(a))};k.ue=function(a){a=a.a;var b;var c=0;for(b=a.length;c<b;++c)this.zb(a[c])};
-k.qc=function(a){var b=a.ga();a=a.qa();this.M&&Yh(this,b,b.length);""!==this.Ia&&Zh(this,b,b.length,a)};k.oc=function(a){var b=a.ga();a=a.qa();this.M&&Yh(this,b,b.length);""!==this.Ia&&Zh(this,b,b.length,a)};k.mc=function(a){if(qb(this.c,a.G())){if(this.b){ai(this,this.b);var b=this.i,c=a.ga();b.beginPath();bi(this,c,0,c.length,a.qa(),!1);b.stroke()}""!==this.Ia&&(a=di(a),Zh(this,a,2,2))}};
-k.nc=function(a){var b=a.G();if(qb(this.c,b)){if(this.b){ai(this,this.b);var b=this.i,c=a.ga(),d=0,e=a.Bb(),f=a.qa();b.beginPath();var g;var h=0;for(g=e.length;h<g;++h)d=bi(this,c,d,e[h],f,!1);b.stroke()}""!==this.Ia&&(a=ei(a),Zh(this,a,a.length,2))}};k.rc=function(a){if(qb(this.c,a.G())){if(this.b||this.a){this.a&&$h(this,this.a);this.b&&ai(this,this.b);var b=this.i;b.beginPath();ci(this,a.ec(),0,a.Bb(),a.qa());this.a&&b.fill();this.b&&b.stroke()}""!==this.Ia&&(a=Wf(a),Zh(this,a,2,2))}};
-k.pc=function(a){if(qb(this.c,a.G())){if(this.b||this.a){this.a&&$h(this,this.a);this.b&&ai(this,this.b);var b=this.i,c=fi(a),d=0,e=a.c,f=a.qa(),g;b.beginPath();var h=0;for(g=e.length;h<g;++h)d=ci(this,c,d,e[h],f);this.a&&b.fill();this.b&&b.stroke()}""!==this.Ia&&(a=gi(a),Zh(this,a,a.length,2))}};function $h(a,b){var c=a.i,d=a.I;d?d.fillStyle!=b.fillStyle&&(d.fillStyle=c.fillStyle=b.fillStyle):(c.fillStyle=b.fillStyle,a.I={fillStyle:b.fillStyle})}
-function ai(a,b){var c=a.i,d=a.R;d?(d.lineCap!=b.lineCap&&(d.lineCap=c.lineCap=b.lineCap),Td&&!pa(d.lineDash,b.lineDash)&&c.setLineDash(d.lineDash=b.lineDash),d.lineJoin!=b.lineJoin&&(d.lineJoin=c.lineJoin=b.lineJoin),d.lineWidth!=b.lineWidth&&(d.lineWidth=c.lineWidth=b.lineWidth),d.miterLimit!=b.miterLimit&&(d.miterLimit=c.miterLimit=b.miterLimit),d.strokeStyle!=b.strokeStyle&&(d.strokeStyle=c.strokeStyle=b.strokeStyle)):(c.lineCap=b.lineCap,Td&&c.setLineDash(b.lineDash),c.lineJoin=b.lineJoin,c.lineWidth=
-b.lineWidth,c.miterLimit=b.miterLimit,c.strokeStyle=b.strokeStyle,a.R={lineCap:b.lineCap,lineDash:b.lineDash,lineJoin:b.lineJoin,lineWidth:b.lineWidth,miterLimit:b.miterLimit,strokeStyle:b.strokeStyle})}
-k.Ma=function(a,b){a?(a=a.b,this.a={fillStyle:id(a?a:Sh)}):this.a=null;if(b){a=b.a;var c=b.f,d=b.i,e=b.g,f=b.j,g=b.c;b=b.o;this.b={lineCap:void 0!==c?c:"round",lineDash:d?d:Th,lineDashOffset:e?e:0,lineJoin:void 0!==f?f:"round",lineWidth:this.u*(void 0!==g?g:1),miterLimit:void 0!==b?b:10,strokeStyle:id(a?a:Uh)}}else this.b=null};
-k.Ub=function(a){if(a){var b=a.Hc(),c=a.Y(1),d=a.Oc(),e=a.ic();this.D=b[0];this.C=b[1];this.B=e[1];this.M=c;this.l=a.f;this.T=d[0];this.na=d[1];this.fa=a.l;this.fb=a.g;this.f=a.a;this.pa=a.v;this.oa=e[0]}else this.M=null};
-k.Cb=function(a){if(a){var b=a.Fa();b?(b=b.b,this.g={fillStyle:id(b?b:Sh)}):this.g=null;var c=a.Ga();if(c){var b=c.a,d=c.f,e=c.i,f=c.g,g=c.j,h=c.c,c=c.o;this.o={lineCap:void 0!==d?d:"round",lineDash:e?e:Th,lineDashOffset:f?f:0,lineJoin:void 0!==g?g:"round",lineWidth:void 0!==h?h:1,miterLimit:void 0!==c?c:10,strokeStyle:id(b?b:Uh)}}else this.o=null;var b=a.a,d=a.i,e=a.c,f=a.o,g=a.f,h=a.b,c=a.Na(),l=a.g;a=a.j;this.ra={font:void 0!==b?b:"10px sans-serif",textAlign:void 0!==l?l:"center",textBaseline:void 0!==
-a?a:"middle"};this.Ia=void 0!==c?c:"";this.Jb=void 0!==d?this.u*d:0;this.va=void 0!==e?this.u*e:0;this.Sa=void 0!==f?f:!1;this.$a=void 0!==g?g:0;this.j=this.u*(void 0!==h?h:1)}else this.Ia=""};function hi(a,b){Mh.call(this,0,b);this.i=jd();this.b=this.i.canvas;this.b.style.width="100%";this.b.style.height="100%";this.b.style.display="block";this.b.className="ol-unselectable";a.insertBefore(this.b,a.childNodes[0]||null);this.a=!0;this.f=Bh()}v(hi,Mh);
-function ii(a,b,c){var d=a.o,e=a.i;if(Rc(d,b)){var f=c.extent,g=c.pixelRatio,h=c.viewState.rotation,l=c.viewState,m=c.pixelRatio/l.resolution;a=Kh(a.f,a.b.width/2,a.b.height/2,m,-m,-l.rotation,-l.center[0],-l.center[1]);d.b(new Rh(b,new Xh(e,g,f,a,h),c,e,null))}}hi.prototype.U=function(){return"canvas"};
-hi.prototype.Jg=function(a){if(a){var b=this.i,c=a.pixelRatio,d=Math.round(a.size[0]*c),e=Math.round(a.size[1]*c);this.b.width!=d||this.b.height!=e?(this.b.width=d,this.b.height=e):b.clearRect(0,0,d,e);c=a.viewState.rotation;Nh(a);ii(this,"precompose",a);var f=a.layerStatesArray;qa(f);c&&(b.save(),Vh(b,c,d/2,e/2));var d=a.viewState.resolution,g,e=0;for(g=f.length;e<g;++e){var h=f[e];var l=h.layer;l=Ph(this,l);xh(h,d)&&"ready"==h.yj&&l.sd(a,h)&&l.S(a,h,b)}c&&b.restore();ii(this,"postcompose",a);this.a||
-(this.b.style.display="",this.a=!0);Qh(this,a);a.postRenderFunctions.push(Oh)}else this.a&&(this.b.style.display="none",this.a=!1)};hi.prototype.Di=function(a,b,c,d,e,f){var g=b.viewState.resolution,h=b.layerStatesArray,l=h.length;a=Gh(b.pixelToCoordinateTransform,a.slice());for(--l;0<=l;--l){var m=h[l];var n=m.layer;if(xh(m,g)&&e.call(f,n)&&(m=Ph(this,n).u(a,b,c,d)))return m}};var ji=["Polygon","Circle","LineString","Image","Text"];function ki(){};function li(a){this.b=a};function mi(a){this.b=a}v(mi,li);mi.prototype.U=function(){return 35632};function ni(a){this.b=a}v(ni,li);ni.prototype.U=function(){return 35633};function oi(){this.b="precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}"}
-v(oi,mi);var pi=new oi;
-function qi(){this.b="varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;if(f==0.0){offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}"}
-v(qi,ni);var ri=new qi;function si(a,b){this.B=a.getUniformLocation(b,"n");this.oa=a.getUniformLocation(b,"k");this.c=a.getUniformLocation(b,"j");this.f=a.getUniformLocation(b,"i");this.a=a.getUniformLocation(b,"m");this.ra=a.getUniformLocation(b,"l");this.i=a.getUniformLocation(b,"h");this.I=a.getUniformLocation(b,"p");this.R=a.getUniformLocation(b,"o");this.j=a.getAttribLocation(b,"f");this.b=a.getAttribLocation(b,"e");this.S=a.getAttribLocation(b,"g")};function ti(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function ui(a,b){a[0]=b[0];a[1]=b[1];a[4]=b[2];a[5]=b[3];a[12]=b[4];a[13]=b[5];return a};function vi(a,b){this.origin=nb(b);this.xb=Bh();this.Sa=Bh();this.$a=Bh();this.Jb=ti();this.b=[];this.o=null;this.i=[];this.f=[];this.a=[];this.l=null;this.g=void 0}v(vi,Wh);
-vi.prototype.La=function(a,b,c,d,e,f,g,h,l,m,n){var p=a.b;if(this.g){var q=p.isEnabled(p.STENCIL_TEST);var r=p.getParameter(p.STENCIL_FUNC);var u=p.getParameter(p.STENCIL_VALUE_MASK);var x=p.getParameter(p.STENCIL_REF);var B=p.getParameter(p.STENCIL_WRITEMASK);var E=p.getParameter(p.STENCIL_FAIL);var A=p.getParameter(p.STENCIL_PASS_DEPTH_PASS);var L=p.getParameter(p.STENCIL_PASS_DEPTH_FAIL);p.enable(p.STENCIL_TEST);p.clear(p.STENCIL_BUFFER_BIT);p.stencilMask(255);p.stencilFunc(p.ALWAYS,1,255);p.stencilOp(p.KEEP,
-p.KEEP,p.REPLACE);this.g.La(a,b,c,d,e,f,g,h,l,m,n);p.stencilMask(0);p.stencilFunc(p.NOTEQUAL,1,255)}wi(a,34962,this.l);wi(a,34963,this.o);f=this.rf(p,a,e,f);var oa=Ch(this.xb);Ih(oa,2/(c*e[0]),2/(c*e[1]));Hh(oa,-d);Jh(oa,-(b[0]-this.origin[0]),-(b[1]-this.origin[1]));b=Ch(this.$a);Ih(b,2/e[0],2/e[1]);e=Ch(this.Sa);d&&Hh(e,-d);p.uniformMatrix4fv(f.i,!1,ui(this.Jb,oa));p.uniformMatrix4fv(f.f,!1,ui(this.Jb,b));p.uniformMatrix4fv(f.c,!1,ui(this.Jb,e));p.uniform1f(f.a,g);if(l){m?a=this.ve(p,a,h,l,n):(p.clear(p.COLOR_BUFFER_BIT|
-p.DEPTH_BUFFER_BIT),this.Od(p,a,h,!0),a=(a=l(null))?a:void 0);var ha=a}else this.Od(p,a,h,!1);this.sf(p,f);this.g&&(q||p.disable(p.STENCIL_TEST),p.clear(p.STENCIL_BUFFER_BIT),p.stencilFunc(r,x,u),p.stencilMask(B),p.stencilOp(E,L,A));return ha};function xi(a,b,c,d){a.drawElements(4,d-c,b.g?5125:5123,c*(b.g?4:2))};var yi=[0,0,0,1],zi=[],Ai=[0,0,0,1];function Bi(a,b,c,d,e,f){a=(c-a)*(f-b)-(e-a)*(d-b);return a<=Ci&&a>=-Ci?void 0:0<a}var Ci=Number.EPSILON||2.220446049250313E-16;function Di(a){this.b=void 0!==a?a:[];this.a=Ei}var Ei=35044;function Fi(a,b){vi.call(this,0,b);this.v=null;this.j=[];this.u=[];this.S=0;this.c={fillColor:null,strokeColor:null,lineDash:null,lineDashOffset:void 0,lineWidth:void 0,s:!1}}v(Fi,vi);k=Fi.prototype;
-k.Zb=function(a,b){var c=a.pd(),d=a.qa();if(c){this.i.push(this.b.length);this.f.push(b);this.c.s&&(this.u.push(this.b.length),this.c.s=!1);this.S=c;a=a.ga();a=qf(a,0,2,d,-this.origin[0],-this.origin[1]);b=this.a.length;var c=this.b.length,e=b/4,f;for(f=0;2>f;f+=d)this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=0,this.a[b++]=this.S,this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=1,this.a[b++]=this.S,this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=2,this.a[b++]=this.S,this.a[b++]=a[f],this.a[b++]=
-a[f+1],this.a[b++]=3,this.a[b++]=this.S,this.b[c++]=e,this.b[c++]=e+1,this.b[c++]=e+2,this.b[c++]=e+2,this.b[c++]=e+3,this.b[c++]=e,e+=4}else this.c.s&&(this.j.pop(),this.j.length&&(d=this.j[this.j.length-1],this.c.fillColor=d[0],this.c.strokeColor=d[1],this.c.lineWidth=d[2],this.c.s=!1))};k.Db=function(){this.l=new Di(this.a);this.o=new Di(this.b);this.i.push(this.b.length);!this.u.length&&0<this.j.length&&(this.j=[]);this.b=this.a=null};
-k.Eb=function(a){var b=this.l,c=this.o;return function(){Gi(a,b);Gi(a,c)}};k.rf=function(a,b,c,d){var e=Hi(b,pi,ri);if(this.v)var f=this.v;else this.v=f=new si(a,e);b.Qc(e);a.enableVertexAttribArray(f.b);a.vertexAttribPointer(f.b,2,5126,!1,16,0);a.enableVertexAttribArray(f.j);a.vertexAttribPointer(f.j,1,5126,!1,16,8);a.enableVertexAttribArray(f.S);a.vertexAttribPointer(f.S,1,5126,!1,16,12);a.uniform2fv(f.I,c);a.uniform1f(f.ra,d);return f};
-k.sf=function(a,b){a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.j);a.disableVertexAttribArray(b.S)};
-k.Od=function(a,b,c){if(wb(c)){var d=this.i[this.i.length-1];for(c=this.u.length-1;0<=c;--c){var e=this.u[c];var f=this.j[c];a.uniform4fv(this.v.B,f[0]);Ii(this,a,f[1],f[2]);xi(a,b,e,d);d=e}}else{var g=this.i.length-2;f=d=this.i[g+1];for(e=this.u.length-1;0<=e;--e){var h=this.j[e];a.uniform4fv(this.v.B,h[0]);Ii(this,a,h[1],h[2]);for(h=this.u[e];0<=g&&this.i[g]>=h;){var l=this.i[g];var m=this.f[g];m=w(m).toString();c[m]&&(d!==f&&xi(a,b,d,f),f=l);g--;d=l}d!==f&&xi(a,b,d,f);d=f=h}}};
-k.ve=function(a,b,c,d,e){var f,g;var h=this.i.length-2;var l=this.i[h+1];for(f=this.u.length-1;0<=f;--f){var m=this.j[f];a.uniform4fv(this.v.B,m[0]);Ii(this,a,m[1],m[2]);for(g=this.u[f];0<=h&&this.i[h]>=g;){m=this.i[h];var n=this.f[h];var p=w(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||qb(e,n.V().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),xi(a,b,m,l),l=d(n)))return l;h--;l=m}}};function Ii(a,b,c,d){b.uniform4fv(a.v.R,c);b.uniform1f(a.v.oa,d)}
-k.Ma=function(a,b){if(b){var c=b.i;this.c.lineDash=c?c:zi;c=b.g;this.c.lineDashOffset=c?c:0;c=b.a;c instanceof CanvasGradient||c instanceof CanvasPattern?c=Ai:c=ed(c).map(function(a,b){return 3!=b?a/255:a})||Ai;b=b.c;b=void 0!==b?b:1}else c=[0,0,0,0],b=0;a=a?a.b:[0,0,0,0];a instanceof CanvasGradient||a instanceof CanvasPattern?a=yi:a=ed(a).map(function(a,b){return 3!=b?a/255:a})||yi;this.c.strokeColor&&pa(this.c.strokeColor,c)&&this.c.fillColor&&pa(this.c.fillColor,a)&&this.c.lineWidth===b||(this.c.s=
-!0,this.c.fillColor=a,this.c.strokeColor=c,this.c.lineWidth=b,this.j.push([a,c,b]))};function Ji(){this.b="precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}v(Ji,mi);var Ki=new Ji;
-function Li(){this.b="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}"}v(Li,ni);var Mi=new Li;
-function Ni(a,b){this.c=a.getUniformLocation(b,"j");this.f=a.getUniformLocation(b,"i");this.a=a.getUniformLocation(b,"k");this.i=a.getUniformLocation(b,"h");this.v=a.getAttribLocation(b,"e");this.u=a.getAttribLocation(b,"f");this.b=a.getAttribLocation(b,"c");this.D=a.getAttribLocation(b,"g");this.C=a.getAttribLocation(b,"d")};function Oi(a,b){this.j=a;this.b=b;this.a={};this.c={};this.i={};this.l=this.v=this.f=this.o=null;(this.g=ja(fa,"OES_element_index_uint"))&&b.getExtension("OES_element_index_uint");y(this.j,"webglcontextlost",this.Xo,this);y(this.j,"webglcontextrestored",this.Yo,this)}v(Oi,Mc);
-function wi(a,b,c){var d=a.b,e=c.b,f=String(w(c));if(f in a.a)d.bindBuffer(b,a.a[f].buffer);else{var g=d.createBuffer();d.bindBuffer(b,g);var h;34962==b?h=new Float32Array(e):34963==b&&(h=a.g?new Uint32Array(e):new Uint16Array(e));d.bufferData(b,h,c.a);a.a[f]={lc:c,buffer:g}}}function Gi(a,b){var c=a.b;b=String(w(b));var d=a.a[b];c.isContextLost()||c.deleteBuffer(d.buffer);delete a.a[b]}k=Oi.prototype;
-k.ka=function(){Lc(this.j);var a=this.b;if(!a.isContextLost()){for(var b in this.a)a.deleteBuffer(this.a[b].buffer);for(b in this.i)a.deleteProgram(this.i[b]);for(b in this.c)a.deleteShader(this.c[b]);a.deleteFramebuffer(this.f);a.deleteRenderbuffer(this.l);a.deleteTexture(this.v)}};k.Wo=function(){return this.b};
-function Pi(a){if(!a.f){var b=a.b,c=b.createFramebuffer();b.bindFramebuffer(b.FRAMEBUFFER,c);var d=Qi(b,1,1),e=b.createRenderbuffer();b.bindRenderbuffer(b.RENDERBUFFER,e);b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,1,1);b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,d,0);b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,e);b.bindTexture(b.TEXTURE_2D,null);b.bindRenderbuffer(b.RENDERBUFFER,null);b.bindFramebuffer(b.FRAMEBUFFER,null);a.f=c;
-a.v=d;a.l=e}return a.f}function Ri(a,b){var c=String(w(b));if(c in a.c)return a.c[c];var d=a.b,e=d.createShader(b.U());d.shaderSource(e,b.b);d.compileShader(e);return a.c[c]=e}function Hi(a,b,c){var d=w(b)+"/"+w(c);if(d in a.i)return a.i[d];var e=a.b,f=e.createProgram();e.attachShader(f,Ri(a,b));e.attachShader(f,Ri(a,c));e.linkProgram(f);return a.i[d]=f}k.Xo=function(){ub(this.a);ub(this.c);ub(this.i);this.l=this.v=this.f=this.o=null};k.Yo=function(){};
-k.Qc=function(a){if(a==this.o)return!1;this.b.useProgram(a);this.o=a;return!0};function Si(a,b,c){var d=a.createTexture();a.bindTexture(a.TEXTURE_2D,d);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);void 0!==b&&a.texParameteri(3553,10242,b);void 0!==c&&a.texParameteri(3553,10243,c);return d}function Qi(a,b,c){var d=Si(a,void 0,void 0);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,b,c,0,a.RGBA,a.UNSIGNED_BYTE,null);return d}
-function Ti(a,b){var c=Si(a,33071,33071);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);return c};function Ui(a,b){vi.call(this,0,b);this.C=this.D=void 0;this.S=[];this.v=[];this.oa=void 0;this.j=[];this.c=[];this.I=this.ra=void 0;this.B=null;this.fb=this.fa=this.na=this.T=this.Ua=this.R=void 0;this.va=[];this.u=[];this.pa=void 0}v(Ui,vi);k=Ui.prototype;k.Eb=function(a){var b=this.l,c=this.o,d=this.va,e=this.u,f=a.b;return function(){if(!f.isContextLost()){var g;var h=0;for(g=d.length;h<g;++h)f.deleteTexture(d[h]);h=0;for(g=e.length;h<g;++h)f.deleteTexture(e[h])}Gi(a,b);Gi(a,c)}};
-function Vi(a,b,c,d){var e=a.D,f=a.C,g=a.oa,h=a.ra,l=a.I,m=a.R,n=a.Ua,p=a.T,q=a.na?1:0,r=-a.fa,u=a.fb,x=a.pa,B=Math.cos(r),r=Math.sin(r),E=a.b.length,A=a.a.length,L;for(L=0;L<c;L+=d){var oa=b[L]-a.origin[0];var ha=b[L+1]-a.origin[1];var ga=A/8;var z=-u*e;var M=-u*(g-f);a.a[A++]=oa;a.a[A++]=ha;a.a[A++]=z*B-M*r;a.a[A++]=z*r+M*B;a.a[A++]=n/l;a.a[A++]=(p+g)/h;a.a[A++]=m;a.a[A++]=q;z=u*(x-e);M=-u*(g-f);a.a[A++]=oa;a.a[A++]=ha;a.a[A++]=z*B-M*r;a.a[A++]=z*r+M*B;a.a[A++]=(n+x)/l;a.a[A++]=(p+g)/h;a.a[A++]=
-m;a.a[A++]=q;z=u*(x-e);M=u*f;a.a[A++]=oa;a.a[A++]=ha;a.a[A++]=z*B-M*r;a.a[A++]=z*r+M*B;a.a[A++]=(n+x)/l;a.a[A++]=p/h;a.a[A++]=m;a.a[A++]=q;z=-u*e;M=u*f;a.a[A++]=oa;a.a[A++]=ha;a.a[A++]=z*B-M*r;a.a[A++]=z*r+M*B;a.a[A++]=n/l;a.a[A++]=p/h;a.a[A++]=m;a.a[A++]=q;a.b[E++]=ga;a.b[E++]=ga+1;a.b[E++]=ga+2;a.b[E++]=ga;a.b[E++]=ga+2;a.b[E++]=ga+3}}k.oc=function(a,b){this.i.push(this.b.length);this.f.push(b);b=a.ga();Vi(this,b,b.length,a.qa())};
-k.qc=function(a,b){this.i.push(this.b.length);this.f.push(b);b=a.ga();Vi(this,b,b.length,a.qa())};k.Db=function(a){a=a.b;this.S.push(this.b.length);this.v.push(this.b.length);this.l=new Di(this.a);this.o=new Di(this.b);var b={};Wi(this.va,this.j,b,a);Wi(this.u,this.c,b,a);this.oa=this.C=this.D=void 0;this.c=this.j=null;this.I=this.ra=void 0;this.b=null;this.fb=this.fa=this.na=this.T=this.Ua=this.R=void 0;this.a=null;this.pa=void 0};
-function Wi(a,b,c,d){var e,f=b.length;for(e=0;e<f;++e){var g=b[e];var h=w(g).toString();h in c?g=c[h]:(g=Ti(d,g),c[h]=g);a[e]=g}}
-k.rf=function(a,b){var c=Hi(b,Ki,Mi);if(this.B)var d=this.B;else this.B=d=new Ni(a,c);b.Qc(c);a.enableVertexAttribArray(d.b);a.vertexAttribPointer(d.b,2,5126,!1,32,0);a.enableVertexAttribArray(d.v);a.vertexAttribPointer(d.v,2,5126,!1,32,8);a.enableVertexAttribArray(d.C);a.vertexAttribPointer(d.C,2,5126,!1,32,16);a.enableVertexAttribArray(d.u);a.vertexAttribPointer(d.u,1,5126,!1,32,24);a.enableVertexAttribArray(d.D);a.vertexAttribPointer(d.D,1,5126,!1,32,28);return d};
-k.sf=function(a,b){a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.v);a.disableVertexAttribArray(b.C);a.disableVertexAttribArray(b.u);a.disableVertexAttribArray(b.D)};
-k.Od=function(a,b,c,d){var e=d?this.u:this.va;d=d?this.v:this.S;if(wb(c)){var f;c=0;var g=e.length;for(f=0;c<g;++c){a.bindTexture(3553,e[c]);var h=d[c];xi(a,b,f,h);f=h}}else for(f=g=0,h=e.length;f<h;++f){a.bindTexture(3553,e[f]);for(var l=0<f?d[f-1]:0,m=d[f],n=l;g<this.i.length&&this.i[g]<=m;){var p=w(this.f[g]).toString();void 0!==c[p]?(n!==l&&xi(a,b,n,l),l=n=g===this.i.length-1?m:this.i[g+1]):l=g===this.i.length-1?m:this.i[g+1];g++}n!==l&&xi(a,b,n,l)}};
-k.ve=function(a,b,c,d,e){var f,g,h=this.i.length-1;for(f=this.u.length-1;0<=f;--f){a.bindTexture(3553,this.u[f]);var l=0<f?this.v[f-1]:0;for(g=this.v[f];0<=h&&this.i[h]>=l;){var m=this.i[h];var n=this.f[h];var p=w(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||qb(e,n.V().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),xi(a,b,m,g),g=d(n)))return g;g=m;h--}}};
-k.Ub=function(a){var b=a.Hc(),c=a.Y(1),d=a.ye(),e=a.qg(1),f=a.f,g=a.Oc(),h=a.l,l=a.g,m=a.ic();a=a.a;if(this.j.length){var n=this.j[this.j.length-1];w(n)!=w(c)&&(this.S.push(this.b.length),this.j.push(c))}else this.j.push(c);this.c.length?(n=this.c[this.c.length-1],w(n)!=w(e)&&(this.v.push(this.b.length),this.c.push(e))):this.c.push(e);this.D=b[0];this.C=b[1];this.oa=m[1];this.ra=d[1];this.I=d[0];this.R=f;this.Ua=g[0];this.T=g[1];this.fa=l;this.na=h;this.fb=a;this.pa=m[0]};function Xi(a,b,c){var d=b-c;return a[0]===a[d]&&a[1]===a[d+1]&&3<(b-0)/c?!!vf(a,0,b,c):!1};function Yi(){this.b="precision mediump float;varying float a;varying vec2 b;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((b.x+1.0)/2.0*o.x*p,(b.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}v(Yi,mi);var Zi=new Yi;
-function $i(){this.b="varying float a;varying vec2 b;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;b=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}"}
-v($i,ni);var aj=new $i;function bj(a,b){this.B=a.getUniformLocation(b,"n");this.oa=a.getUniformLocation(b,"k");this.R=a.getUniformLocation(b,"l");this.c=a.getUniformLocation(b,"j");this.f=a.getUniformLocation(b,"i");this.a=a.getUniformLocation(b,"m");this.ra=a.getUniformLocation(b,"p");this.i=a.getUniformLocation(b,"h");this.I=a.getUniformLocation(b,"o");this.g=a.getAttribLocation(b,"g");this.o=a.getAttribLocation(b,"d");this.l=a.getAttribLocation(b,"f");this.b=a.getAttribLocation(b,"e")};function cj(a,b){vi.call(this,0,b);this.v=null;this.u=[];this.j=[];this.c={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,s:!1}}v(cj,vi);
-function dj(a,b,c,d){var e,f=a.a.length,g=a.b.length,h="bevel"===a.c.lineJoin?0:"miter"===a.c.lineJoin?1:2,l="butt"===a.c.lineCap?0:"square"===a.c.lineCap?1:2,m=Xi(b,c,d),n=g,p=1;for(e=0;e<c;e+=d){var q=f/7;var r=u;var u=x||[b[e],b[e+1]];if(e)if(e===c-d){if(m)var x=B;else r=r||[0,0],f=ej(a,r,u,[0,0],p*fj*(l||1),f),f=ej(a,r,u,[0,0],-p*fj*(l||1),f),a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=n,a.b[g++]=q+1,a.b[g++]=q,l&&(f=ej(a,r,u,[0,0],p*gj*l,f),f=ej(a,r,u,[0,0],-p*gj*l,f),a.b[g++]=q+2,a.b[g++]=q,
-a.b[g++]=q+1,a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q+2);break}else x=[b[e+d],b[e+d+1]];else{x=[b[e+d],b[e+d+1]];if(c-0===2*d&&pa(u,x))break;if(m){r=[b[c-2*d],b[c-2*d+1]];var B=x}else{l&&(f=ej(a,[0,0],u,x,p*hj*l,f),f=ej(a,[0,0],u,x,-p*hj*l,f),a.b[g++]=q+2,a.b[g++]=q,a.b[g++]=q+1,a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q+2);f=ej(a,[0,0],u,x,p*ij*(l||1),f);f=ej(a,[0,0],u,x,-p*ij*(l||1),f);n=f/7-1;continue}}var E=Bi(r[0],r[1],u[0],u[1],x[0],x[1])?-1:1;f=ej(a,r,u,x,E*jj*(h||1),f);f=ej(a,r,u,x,E*kj*(h||1),f);f=
-ej(a,r,u,x,-E*lj*(h||1),f);0<e&&(a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=q+2,a.b[g++]=q,a.b[g++]=0<p*E?n:n-1);a.b[g++]=q;a.b[g++]=q+2;a.b[g++]=q+1;n=q+2;p=E;h&&(f=ej(a,r,u,x,E*mj*h,f),a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q)}m&&(q=q||f/7,E=Sf([r[0],r[1],u[0],u[1],x[0],x[1]],0,6,2)?1:-1,f=ej(a,r,u,x,E*jj*(h||1),f),ej(a,r,u,x,-E*lj*(h||1),f),a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=q+1,a.b[g++]=q,a.b[g++]=0<p*E?n:n-1)}
-function ej(a,b,c,d,e,f){a.a[f++]=b[0];a.a[f++]=b[1];a.a[f++]=c[0];a.a[f++]=c[1];a.a[f++]=d[0];a.a[f++]=d[1];a.a[f++]=e;return f}function nj(a,b,c,d){c-=b;return c<2*d?!1:c===2*d?!pa([a[b],a[b+1]],[a[b+d],a[b+d+1]]):!0}k=cj.prototype;k.mc=function(a,b){var c=a.ga();a=a.qa();nj(c,0,c.length,a)&&(c=qf(c,0,c.length,a,-this.origin[0],-this.origin[1]),this.c.s&&(this.j.push(this.b.length),this.c.s=!1),this.i.push(this.b.length),this.f.push(b),dj(this,c,c.length,a))};
-k.nc=function(a,b){var c=this.b.length,d=a.Bb();d.unshift(0);var e=a.ga();a=a.qa();var f;if(1<d.length){var g=1;for(f=d.length;g<f;++g)if(nj(e,d[g-1],d[g],a)){var h=qf(e,d[g-1],d[g],a,-this.origin[0],-this.origin[1]);dj(this,h,h.length,a)}}this.b.length>c&&(this.i.push(c),this.f.push(b),this.c.s&&(this.j.push(c),this.c.s=!1))};
-function oj(a,b,c,d){Xi(b,b.length,d)||(b.push(b[0]),b.push(b[1]));dj(a,b,b.length,d);if(c.length){var e;b=0;for(e=c.length;b<e;++b)Xi(c[b],c[b].length,d)||(c[b].push(c[b][0]),c[b].push(c[b][1])),dj(a,c[b],c[b].length,d)}}function pj(a,b,c){c=void 0===c?a.b.length:c;a.i.push(c);a.f.push(b);a.c.s&&(a.j.push(c),a.c.s=!1)}k.Db=function(){this.l=new Di(this.a);this.o=new Di(this.b);this.i.push(this.b.length);!this.j.length&&0<this.u.length&&(this.u=[]);this.b=this.a=null};
-k.Eb=function(a){var b=this.l,c=this.o;return function(){Gi(a,b);Gi(a,c)}};
-k.rf=function(a,b,c,d){var e=Hi(b,Zi,aj);if(this.v)var f=this.v;else this.v=f=new bj(a,e);b.Qc(e);a.enableVertexAttribArray(f.o);a.vertexAttribPointer(f.o,2,5126,!1,28,0);a.enableVertexAttribArray(f.b);a.vertexAttribPointer(f.b,2,5126,!1,28,8);a.enableVertexAttribArray(f.l);a.vertexAttribPointer(f.l,2,5126,!1,28,16);a.enableVertexAttribArray(f.g);a.vertexAttribPointer(f.g,1,5126,!1,28,24);a.uniform2fv(f.I,c);a.uniform1f(f.ra,d);return f};
-k.sf=function(a,b){a.disableVertexAttribArray(b.o);a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.l);a.disableVertexAttribArray(b.g)};
-k.Od=function(a,b,c,d){var e=a.getParameter(a.DEPTH_FUNC),f=a.getParameter(a.DEPTH_WRITEMASK);d||(a.enable(a.DEPTH_TEST),a.depthMask(!0),a.depthFunc(a.NOTEQUAL));if(wb(c)){var g=this.i[this.i.length-1];for(c=this.j.length-1;0<=c;--c){var h=this.j[c];var l=this.u[c];qj(this,a,l[0],l[1],l[2]);xi(a,b,h,g);a.clear(a.DEPTH_BUFFER_BIT);g=h}}else{var m=this.i.length-2;l=g=this.i[m+1];for(h=this.j.length-1;0<=h;--h){var n=this.u[h];qj(this,a,n[0],n[1],n[2]);for(n=this.j[h];0<=m&&this.i[m]>=n;){var p=this.i[m];
-var q=this.f[m];q=w(q).toString();c[q]&&(g!==l&&(xi(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT)),l=p);m--;g=p}g!==l&&(xi(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT));g=l=n}}d||(a.disable(a.DEPTH_TEST),a.clear(a.DEPTH_BUFFER_BIT),a.depthMask(f),a.depthFunc(e))};
-k.ve=function(a,b,c,d,e){var f,g;var h=this.i.length-2;var l=this.i[h+1];for(f=this.j.length-1;0<=f;--f){var m=this.u[f];qj(this,a,m[0],m[1],m[2]);for(g=this.j[f];0<=h&&this.i[h]>=g;){m=this.i[h];var n=this.f[h];var p=w(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||qb(e,n.V().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),xi(a,b,m,l),l=d(n)))return l;h--;l=m}}};function qj(a,b,c,d,e){b.uniform4fv(a.v.B,c);b.uniform1f(a.v.oa,d);b.uniform1f(a.v.R,e)}
-k.Ma=function(a,b){a=b.f;this.c.lineCap=void 0!==a?a:"round";a=b.i;this.c.lineDash=a?a:zi;a=b.g;this.c.lineDashOffset=a?a:0;a=b.j;this.c.lineJoin=void 0!==a?a:"round";a=b.a;a instanceof CanvasGradient||a instanceof CanvasPattern?a=Ai:a=ed(a).map(function(a,b){return 3!=b?a/255:a})||Ai;var c=b.c,c=void 0!==c?c:1;b=b.o;b=void 0!==b?b:10;this.c.strokeColor&&pa(this.c.strokeColor,a)&&this.c.lineWidth===c&&this.c.miterLimit===b||(this.c.s=!0,this.c.strokeColor=a,this.c.lineWidth=c,this.c.miterLimit=b,
-this.u.push([a,c,b]))};var ij=3,fj=5,hj=7,gj=11,jj=13,kj=17,lj=19,mj=23;function rj(){this.b="precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}v(rj,mi);var sj=new rj;function tj(){this.b="attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}"}v(tj,ni);var uj=new tj;
-function vj(a,b){this.B=a.getUniformLocation(b,"e");this.c=a.getUniformLocation(b,"d");this.f=a.getUniformLocation(b,"c");this.a=a.getUniformLocation(b,"f");this.i=a.getUniformLocation(b,"b");this.b=a.getAttribLocation(b,"a")};function wj(a){a=a||{};this.a=void 0!==a.color?a.color:null;this.f=a.lineCap;this.i=void 0!==a.lineDash?a.lineDash:null;this.g=a.lineDashOffset;this.j=a.lineJoin;this.o=a.miterLimit;this.c=a.width;this.b=void 0}k=wj.prototype;k.clone=function(){var a=this.a;return new wj({color:a&&a.slice?a.slice():a||void 0,lineCap:this.f,lineDash:this.i?this.i.slice():void 0,lineDashOffset:this.g,lineJoin:this.j,miterLimit:this.o,width:this.c})};k.No=function(){return this.a};k.Vk=function(){return this.f};
-k.Oo=function(){return this.i};k.Wk=function(){return this.g};k.Xk=function(){return this.j};k.bl=function(){return this.o};k.Po=function(){return this.c};k.Qo=function(a){this.a=a;this.b=void 0};k.aq=function(a){this.f=a;this.b=void 0};k.setLineDash=function(a){this.i=a;this.b=void 0};k.bq=function(a){this.g=a;this.b=void 0};k.cq=function(a){this.j=a;this.b=void 0};k.gq=function(a){this.o=a;this.b=void 0};k.jq=function(a){this.c=a;this.b=void 0};function xj(a){this.b=this.a=this.i=void 0;this.f=void 0===a?!0:a;this.c=0}function yj(a){var b=a.b;if(b){var c=b.next,d=b.ub;c&&(c.ub=d);d&&(d.next=c);a.b=c||d;a.i===a.a?(a.b=void 0,a.i=void 0,a.a=void 0):a.i===b?a.i=a.b:a.a===b&&(a.a=d?a.b.ub:a.b);a.c--}}function zj(a){a.b=a.i;if(a.b)return a.b.data}function Aj(a){if(a.b&&a.b.next)return a.b=a.b.next,a.b.data}function Bj(a){if(a.b&&a.b.next)return a.b.next.data}function Cj(a){if(a.b&&a.b.ub)return a.b=a.b.ub,a.b.data}
-function Dj(a){if(a.b&&a.b.ub)return a.b.ub.data}function Ej(a){if(a.b)return a.b.data}xj.prototype.concat=function(a){if(a.b){if(this.b){var b=this.b.next;this.b.next=a.i;a.i.ub=this.b;b.ub=a.a;a.a.next=b;this.c+=a.c}else this.b=a.b,this.i=a.i,this.a=a.a,this.c=a.c;a.b=void 0;a.i=void 0;a.a=void 0;a.c=0}};var Fj={$d:function(){}};
-(function(a){function b(a,e,f,g,h){f=f||0;g=g||a.length-1;for(h=h||d;g>f;){if(600<g-f){var l=g-f+1,m=e-f+1,n=Math.log(l),p=.5*Math.exp(2*n/3),n=.5*Math.sqrt(n*p*(l-p)/l)*(0>m-l/2?-1:1);b(a,e,Math.max(f,Math.floor(e-m*p/l+n)),Math.min(g,Math.floor(e+(l-m)*p/l+n)),h)}l=a[e];m=f;p=g;c(a,f,e);for(0<h(a[g],l)&&c(a,f,g);m<p;){c(a,m,p);m++;for(p--;0>h(a[m],l);)m++;for(;0<h(a[p],l);)p--}0===h(a[f],l)?c(a,f,p):(p++,c(a,p,g));p<=e&&(f=p+1);e<=p&&(g=p-1)}}function c(a,b,c){var d=a[b];a[b]=a[c];a[c]=d}function d(a,
-b){return a<b?-1:a>b?1:0}function e(a,b){if(!(this instanceof e))return new e(a,b);this.Hf=Math.max(4,a||9);this.fh=Math.max(2,Math.ceil(.4*this.Hf));b&&this.ek(b);this.clear()}function f(a,b){g(a,0,a.children.length,b,a)}function g(a,b,c,d,e){e||(e=u(null));e.ca=Infinity;e.da=Infinity;e.$=-Infinity;e.ia=-Infinity;for(var f;b<c;b++)f=a.children[b],h(e,a.ib?d(f):f);return e}function h(a,b){a.ca=Math.min(a.ca,b.ca);a.da=Math.min(a.da,b.da);a.$=Math.max(a.$,b.$);a.ia=Math.max(a.ia,b.ia)}function l(a,
-b){return a.ca-b.ca}function m(a,b){return a.da-b.da}function n(a){return(a.$-a.ca)*(a.ia-a.da)}function p(a){return a.$-a.ca+(a.ia-a.da)}function q(a,b){return a.ca<=b.ca&&a.da<=b.da&&b.$<=a.$&&b.ia<=a.ia}function r(a,b){return b.ca<=a.$&&b.da<=a.ia&&b.$>=a.ca&&b.ia>=a.da}function u(a){return{children:a,height:1,ib:!0,ca:Infinity,da:Infinity,$:-Infinity,ia:-Infinity}}function x(a,b,c,d,e){for(var f=[b,c],g;f.length;)c=f.pop(),b=f.pop(),c-b<=d||(g=b+Math.ceil((c-b)/d/2)*d,B(a,g,b,c,e),f.push(b,g,
-g,c))}var B=b;e.prototype={all:function(){return this.$g(this.data,[])},search:function(a){var b=this.data,c=[],d=this.wb;if(!r(a,b))return c;for(var e=[],f,g,h,l;b;){f=0;for(g=b.children.length;f<g;f++)h=b.children[f],l=b.ib?d(h):h,r(a,l)&&(b.ib?c.push(h):q(a,l)?this.$g(h,c):e.push(h));b=e.pop()}return c},load:function(a){if(!a||!a.length)return this;if(a.length<this.fh){for(var b=0,c=a.length;b<c;b++)this.Ca(a[b]);return this}a=this.bh(a.slice(),0,a.length-1,0);this.data.children.length?this.data.height===
-a.height?this.hh(this.data,a):(this.data.height<a.height&&(b=this.data,this.data=a,a=b),this.eh(a,this.data.height-a.height-1,!0)):this.data=a;return this},Ca:function(a){a&&this.eh(a,this.data.height-1);return this},clear:function(){this.data=u([]);return this},remove:function(a,b){if(!a)return this;for(var c=this.data,d=this.wb(a),e=[],f=[],g,h,l,m;c||e.length;){c||(c=e.pop(),h=e[e.length-1],g=f.pop(),m=!0);if(c.ib){a:{l=a;var n=c.children,p=b;if(p){for(var r=0;r<n.length;r++)if(p(l,n[r])){l=r;
-break a}l=-1}else l=n.indexOf(l)}if(-1!==l){c.children.splice(l,1);e.push(c);this.ck(e);break}}m||c.ib||!q(c,d)?h?(g++,c=h.children[g],m=!1):c=null:(e.push(c),f.push(g),g=0,h=c,c=c.children[0])}return this},wb:function(a){return a},Lf:l,Mf:m,toJSON:function(){return this.data},$g:function(a,b){for(var c=[];a;)a.ib?b.push.apply(b,a.children):c.push.apply(c,a.children),a=c.pop();return b},bh:function(a,b,c,d){var e=c-b+1,g=this.Hf;if(e<=g){var h=u(a.slice(b,c+1));f(h,this.wb);return h}d||(d=Math.ceil(Math.log(e)/
-Math.log(g)),g=Math.ceil(e/Math.pow(g,d-1)));h=u([]);h.ib=!1;h.height=d;var e=Math.ceil(e/g),g=e*Math.ceil(Math.sqrt(g)),l;for(x(a,b,c,g,this.Lf);b<=c;b+=g){var m=Math.min(b+g-1,c);x(a,b,m,e,this.Mf);for(l=b;l<=m;l+=e){var n=Math.min(l+e-1,m);h.children.push(this.bh(a,l,n,d-1))}}f(h,this.wb);return h},bk:function(a,b,c,d){for(var e,f,g,h,l,m,p,q;;){d.push(b);if(b.ib||d.length-1===c)break;p=q=Infinity;e=0;for(f=b.children.length;e<f;e++)g=b.children[e],l=n(g),m=(Math.max(g.$,a.$)-Math.min(g.ca,a.ca))*
-(Math.max(g.ia,a.ia)-Math.min(g.da,a.da))-l,m<q?(q=m,p=l<p?l:p,h=g):m===q&&l<p&&(p=l,h=g);b=h||b.children[0]}return b},eh:function(a,b,c){var d=this.wb;c=c?a:d(a);var d=[],e=this.bk(c,this.data,b,d);e.children.push(a);for(h(e,c);0<=b;)if(d[b].children.length>this.Hf)this.jk(d,b),b--;else break;this.Zj(c,d,b)},jk:function(a,b){var c=a[b],d=c.children.length,e=this.fh;this.$j(c,e,d);d=this.ak(c,e,d);d=u(c.children.splice(d,c.children.length-d));d.height=c.height;d.ib=c.ib;f(c,this.wb);f(d,this.wb);
-b?a[b-1].children.push(d):this.hh(c,d)},hh:function(a,b){this.data=u([a,b]);this.data.height=a.height+1;this.data.ib=!1;f(this.data,this.wb)},ak:function(a,b,c){var d,e;var f=e=Infinity;for(d=b;d<=c-b;d++){var h=g(a,0,d,this.wb);var l=g(a,d,c,this.wb);var m=Math.max(0,Math.min(h.$,l.$)-Math.max(h.ca,l.ca))*Math.max(0,Math.min(h.ia,l.ia)-Math.max(h.da,l.da));h=n(h)+n(l);if(m<f){f=m;var p=d;e=h<e?h:e}else m===f&&h<e&&(e=h,p=d)}return p},$j:function(a,b,c){var d=a.ib?this.Lf:l,e=a.ib?this.Mf:m,f=this.ah(a,
-b,c,d);b=this.ah(a,b,c,e);f<b&&a.children.sort(d)},ah:function(a,b,c,d){a.children.sort(d);d=this.wb;var e=g(a,0,b,d),f=g(a,c-b,c,d),l=p(e)+p(f),m;for(m=b;m<c-b;m++){var n=a.children[m];h(e,a.ib?d(n):n);l+=p(e)}for(m=c-b-1;m>=b;m--)n=a.children[m],h(f,a.ib?d(n):n),l+=p(f);return l},Zj:function(a,b,c){for(;0<=c;c--)h(b[c],a)},ck:function(a){for(var b=a.length-1,c;0<=b;b--)0===a[b].children.length?0<b?(c=a[b-1].children,c.splice(c.indexOf(a[b]),1)):this.clear():f(a[b],this.wb)},ek:function(a){var b=
-["return a"," - b",";"];this.Lf=new Function("a","b",b.join(a[0]));this.Mf=new Function("a","b",b.join(a[1]));this.wb=new Function("a","return {minX: a"+a[0]+", minY: a"+a[1]+", maxX: a"+a[2]+", maxY: a"+a[3]+"};")}};a["default"]=e})(Fj.$d=Fj.$d||{});Fj.$d=Fj.$d.default;function Gj(a){this.a=Fj.$d(a);this.b={}}k=Gj.prototype;k.Ca=function(a,b){a={ca:a[0],da:a[1],$:a[2],ia:a[3],value:b};this.a.Ca(a);this.b[w(b)]=a};k.load=function(a,b){for(var c=Array(b.length),d=0,e=b.length;d<e;d++){var f=a[d],g=b[d],f={ca:f[0],da:f[1],$:f[2],ia:f[3],value:g};c[d]=f;this.b[w(g)]=f}this.a.load(c)};k.remove=function(a){a=w(a);var b=this.b[a];delete this.b[a];return null!==this.a.remove(b)};function Hj(a,b,c){var d=a.b[w(c)];bb([d.ca,d.da,d.$,d.ia],b)||(a.remove(c),a.Ca(b,c))}
-function Ij(a){return a.a.all().map(function(a){return a.value})}function Jj(a,b){return a.a.search({ca:b[0],da:b[1],$:b[2],ia:b[3]}).map(function(a){return a.value})}k.forEach=function(a,b){return Kj(Ij(this),a,b)};function Lj(a,b,c,d){return Kj(Jj(a,b),c,d)}function Kj(a,b,c){for(var d,e=0,f=a.length;e<f&&!(d=b.call(c,a[e]));e++);return d}k.clear=function(){this.a.clear();this.b={}};k.G=function(a){var b=this.a.data;return Xa(b.ca,b.da,b.$,b.ia,a)};
-k.concat=function(a){this.a.load(a.a.all());for(var b in a.b)this.b[b|0]=a.b[b|0]};function Mj(a,b){vi.call(this,0,b);this.g=new cj(0,b);this.v=null;this.u=[];this.c=[];this.j={fillColor:null,s:!1}}v(Mj,vi);
-function Nj(a,b,c,d){var e=new xj,f=new Gj;b=Oj(a,b,d,e,f,!0);if(c.length){var g,h=[];var l=0;for(g=c.length;l<g;++l){var m={list:new xj,$:void 0,Mg:new Gj};h.push(m);m.$=Oj(a,c[l],d,m.list,m.Mg,!1)}h.sort(function(a,b){return b.$[0]===a.$[0]?a.$[1]-b.$[1]:b.$[0]-a.$[0]});for(l=0;l<h.length;++l){c=h[l].list;g=d=zj(c);do{if(Pj(g,f).length){var n=!0;break}g=Aj(c)}while(d!==g);n||(Qj(c,h[l].Mg,!0),Rj(c,h[l].$[0],e,b[0],f)&&(f.concat(h[l].Mg),Qj(e,f,!1)))}}else Qj(e,f,!1);Sj(a,e,f)}
-function Oj(a,b,c,d,e,f){var g,h=a.a.length/2,l,m=[],n=[];if(f===Sf(b,0,b.length,c)){var p=l=Tj(a,b[0],b[1],h++);f=b[0];var q=b[1];var r=c;for(g=b.length;r<g;r+=c){var u=Tj(a,b[r],b[r+1],h++);n.push(Uj(p,u,d));m.push([Math.min(p.x,u.x),Math.min(p.y,u.y),Math.max(p.x,u.x),Math.max(p.y,u.y)]);b[r]>f&&(f=b[r],q=b[r+1]);p=u}}else for(r=b.length-c,p=l=Tj(a,b[r],b[r+1],h++),f=b[r],q=b[r+1],r-=c,g=0;r>=g;r-=c)u=Tj(a,b[r],b[r+1],h++),n.push(Uj(p,u,d)),m.push([Math.min(p.x,u.x),Math.min(p.y,u.y),Math.max(p.x,
-u.x),Math.max(p.y,u.y)]),b[r]>f&&(f=b[r],q=b[r+1]),p=u;n.push(Uj(u,l,d));m.push([Math.min(p.x,u.x),Math.min(p.y,u.y),Math.max(p.x,u.x),Math.max(p.y,u.y)]);e.load(m,n);return[f,q]}function Qj(a,b,c){var d=zj(a),e=d,f=Aj(a),g=!1;do{var h=c?Bi(f.W.x,f.W.y,e.W.x,e.W.y,e.aa.x,e.aa.y):Bi(e.aa.x,e.aa.y,e.W.x,e.W.y,f.W.x,f.W.y);void 0===h?(Vj(e,f,a,b),g=!0,f===d&&(d=Bj(a)),f=e,Cj(a)):e.W.Fb!==h&&(e.W.Fb=h,g=!0);e=f;f=Aj(a)}while(e!==d);return g}
-function Rj(a,b,c,d,e){for(var f=zj(a);f.W.x!==b;)f=Aj(a);b=f.W;d={x:d,y:b.y,hb:-1};var g=Infinity,h;var l=Pj({aa:b,W:d},e,!0);var m=0;for(h=l.length;m<h;++m){var n=l[m],p=Wj(b,d,n.aa,n.W,!0),q=Math.abs(b.x-p[0]);if(q<g&&void 0!==Bi(b.x,b.y,n.aa.x,n.aa.y,n.W.x,n.W.y)){g=q;var r={x:p[0],y:p[1],hb:-1};f=n}}if(Infinity===g)return!1;l=f.W;if(0<g&&(f=Xj(b,r,f.W,e),f.length))for(r=Infinity,m=0,h=f.length;m<h;++m)if(g=f[m],n=Math.atan2(b.y-g.y,d.x-g.x),n<r||n===r&&g.x<l.x)r=n,l=g;for(f=zj(c);f.W.x!==l.x||
-f.W.y!==l.y;)f=Aj(c);d={x:b.x,y:b.y,hb:b.hb,Fb:void 0};m={x:f.W.x,y:f.W.y,hb:f.W.hb,Fb:void 0};Bj(a).aa=d;Uj(b,f.W,a,e);Uj(m,d,a,e);f.W=m;a.f&&a.b&&(a.i=a.b,a.a=a.b.ub);c.concat(a);return!0}
-function Sj(a,b,c){for(var d=!1,e=Yj(b,c);3<b.c;)if(e){if(!Zj(a,b,c,e,d)&&!Qj(b,c,d)&&!ak(a,b,c,!0))break}else if(!Zj(a,b,c,e,d)&&!Qj(b,c,d)&&!ak(a,b,c))if(e=Yj(b,c)){var d=b,f=2*d.c,g=Array(f),h=zj(d),l=h,m=0;do g[m++]=l.aa.x,g[m++]=l.aa.y,l=Aj(d);while(l!==h);d=!Sf(g,0,f,2);Qj(b,c,d)}else{e=a;d=b;f=g=zj(d);do{h=Pj(f,c);if(h.length){g=h[0];h=Wj(f.aa,f.W,g.aa,g.W);h=Tj(e,h[0],h[1],e.a.length/2);l=new xj;m=new Gj;Uj(h,f.W,l,m);f.W=h;Hj(c,[Math.min(f.aa.x,h.x),Math.min(f.aa.y,h.y),Math.max(f.aa.x,h.x),
-Math.max(f.aa.y,h.y)],f);for(f=Aj(d);f!==g;)Uj(f.aa,f.W,l,m),c.remove(f),yj(d),f=Ej(d);Uj(g.aa,h,l,m);g.aa=h;Hj(c,[Math.min(g.W.x,h.x),Math.min(g.W.y,h.y),Math.max(g.W.x,h.x),Math.max(g.W.y,h.y)],g);Qj(d,c,!1);Sj(e,d,c);Qj(l,m,!1);Sj(e,l,m);break}f=Aj(d)}while(f!==g);break}3===b.c&&(e=a.b.length,a.b[e++]=Dj(b).aa.hb,a.b[e++]=Ej(b).aa.hb,a.b[e++]=Bj(b).aa.hb)}
-function Zj(a,b,c,d,e){var f=a.b.length,g=zj(b),h=Dj(b),l=g,m=Aj(b),n=Bj(b),p=!1;do{var q=l.aa;var r=l.W;var u=m.W;if(!1===r.Fb){var x=e?bk(n.W,u,r,q,h.aa):bk(h.aa,q,r,u,n.W);!d&&Pj({aa:q,W:u},c).length||!x||Xj(q,r,u,c,!0).length||!d&&!1!==q.Fb&&!1!==u.Fb&&Sf([h.aa.x,h.aa.y,q.x,q.y,r.x,r.y,u.x,u.y,n.W.x,n.W.y],0,10,2)!==!e||(a.b[f++]=q.hb,a.b[f++]=r.hb,a.b[f++]=u.hb,Vj(l,m,b,c),m===g&&(g=n),p=!0)}h=Dj(b);l=Ej(b);m=Aj(b);n=Bj(b)}while(l!==g&&3<b.c);return p}
-function ak(a,b,c,d){var e=zj(b);Aj(b);var f=e,g=Aj(b),h=!1;do{var l=Wj(f.aa,f.W,g.aa,g.W,d);if(l){var h=a.b.length,m=a.a.length/2,n=Cj(b);yj(b);c.remove(n);var p=n===e;d?(l[0]===f.aa.x&&l[1]===f.aa.y?(Cj(b),l=f.aa,g.aa=l,c.remove(f),p=p||f===e):(l=g.W,f.W=l,c.remove(g),p=p||g===e),yj(b)):(l=Tj(a,l[0],l[1],m),f.W=l,g.aa=l,Hj(c,[Math.min(f.aa.x,f.W.x),Math.min(f.aa.y,f.W.y),Math.max(f.aa.x,f.W.x),Math.max(f.aa.y,f.W.y)],f),Hj(c,[Math.min(g.aa.x,g.W.x),Math.min(g.aa.y,g.W.y),Math.max(g.aa.x,g.W.x),
-Math.max(g.aa.y,g.W.y)],g));a.b[h++]=n.aa.hb;a.b[h++]=n.W.hb;a.b[h++]=l.hb;h=!0;if(p)break}f=Dj(b);g=Aj(b)}while(f!==e);return h}function Yj(a,b){var c=zj(a),d=c;do{if(Pj(d,b).length)return!1;d=Aj(a)}while(d!==c);return!0}function Tj(a,b,c,d){var e=a.a.length;a.a[e++]=b;a.a[e++]=c;return{x:b,y:c,hb:d,Fb:void 0}}
-function Uj(a,b,c,d){var e={aa:a,W:b},f={ub:void 0,next:void 0,data:e},g=c.b;if(g){var h=g.next;f.ub=g;f.next=h;g.next=f;h&&(h.ub=f);g===c.a&&(c.a=f)}else c.i=f,c.a=f,c.f&&(f.next=f,f.ub=f);c.b=f;c.c++;d&&d.Ca([Math.min(a.x,b.x),Math.min(a.y,b.y),Math.max(a.x,b.x),Math.max(a.y,b.y)],e);return e}function Vj(a,b,c,d){Ej(c)===b&&(yj(c),a.W=b.W,d.remove(b),Hj(d,[Math.min(a.aa.x,a.W.x),Math.min(a.aa.y,a.W.y),Math.max(a.aa.x,a.W.x),Math.max(a.aa.y,a.W.y)],a))}
-function Xj(a,b,c,d,e){var f,g,h=[],l=Jj(d,[Math.min(a.x,b.x,c.x),Math.min(a.y,b.y,c.y),Math.max(a.x,b.x,c.x),Math.max(a.y,b.y,c.y)]);d=0;for(f=l.length;d<f;++d)for(g in l[d]){var m=l[d][g];"object"!==typeof m||e&&!m.Fb||m.x===a.x&&m.y===a.y||m.x===b.x&&m.y===b.y||m.x===c.x&&m.y===c.y||-1!==h.indexOf(m)||!Mf([a.x,a.y,b.x,b.y,c.x,c.y],0,6,2,m.x,m.y)||h.push(m)}return h}
-function Pj(a,b,c){var d=a.aa,e=a.W;b=Jj(b,[Math.min(d.x,e.x),Math.min(d.y,e.y),Math.max(d.x,e.x),Math.max(d.y,e.y)]);var f=[],g;var h=0;for(g=b.length;h<g;++h){var l=b[h];a!==l&&(c||l.aa!==e||l.W!==d)&&Wj(d,e,l.aa,l.W,c)&&f.push(l)}return f}
-function Wj(a,b,c,d,e){var f=(d.y-c.y)*(b.x-a.x)-(d.x-c.x)*(b.y-a.y);if(f&&(d=((d.x-c.x)*(a.y-c.y)-(d.y-c.y)*(a.x-c.x))/f,c=((b.x-a.x)*(a.y-c.y)-(b.y-a.y)*(a.x-c.x))/f,!e&&d>Ci&&d<1-Ci&&c>Ci&&c<1-Ci||e&&0<=d&&1>=d&&0<=c&&1>=c))return[a.x+d*(b.x-a.x),a.y+d*(b.y-a.y)]}
-function bk(a,b,c,d,e){if(void 0===b.Fb||void 0===d.Fb)return!1;var f=(c.x-d.x)*(b.y-d.y)>(c.y-d.y)*(b.x-d.x);e=(e.x-d.x)*(b.y-d.y)<(e.y-d.y)*(b.x-d.x);a=(a.x-b.x)*(d.y-b.y)>(a.y-b.y)*(d.x-b.x);c=(c.x-b.x)*(d.y-b.y)<(c.y-b.y)*(d.x-b.x);b=b.Fb?c||a:c&&a;return(d.Fb?e||f:e&&f)&&b}k=Mj.prototype;
-k.pc=function(a,b){var c=a.c,d=a.qa(),e=this.b.length,f=this.g.b.length;a=a.ga();var g,h,l;var m=h=0;for(g=c.length;m<g;++m){var n=c[m];if(0<n.length){var p=qf(a,h,n[0],d,-this.origin[0],-this.origin[1]);if(p.length){var q=[];h=1;for(l=n.length;h<l;++h)if(n[h]!==n[h-1]){var r=qf(a,n[h-1],n[h],d,-this.origin[0],-this.origin[1]);q.push(r)}oj(this.g,p,q,d);Nj(this,p,q,d)}}h=n[n.length-1]}this.b.length>e&&(this.i.push(e),this.f.push(b),this.j.s&&(this.c.push(e),this.j.s=!1));this.g.b.length>f&&pj(this.g,
-b,f)};k.rc=function(a,b){var c=a.Bb(),d=a.qa();if(0<c.length){a=a.ga().map(Number);var e=qf(a,0,c[0],d,-this.origin[0],-this.origin[1]);if(e.length){var f=[],g;var h=1;for(g=c.length;h<g;++h)if(c[h]!==c[h-1]){var l=qf(a,c[h-1],c[h],d,-this.origin[0],-this.origin[1]);f.push(l)}this.i.push(this.b.length);this.f.push(b);this.j.s&&(this.c.push(this.b.length),this.j.s=!1);pj(this.g,b);oj(this.g,e,f,d);Nj(this,e,f,d)}}};
-k.Db=function(a){this.l=new Di(this.a);this.o=new Di(this.b);this.i.push(this.b.length);this.g.Db(a);!this.c.length&&0<this.u.length&&(this.u=[]);this.b=this.a=null};k.Eb=function(a){var b=this.l,c=this.o,d=this.g.Eb(a);return function(){Gi(a,b);Gi(a,c);d()}};k.rf=function(a,b){var c=Hi(b,sj,uj);if(this.v)var d=this.v;else this.v=d=new vj(a,c);b.Qc(c);a.enableVertexAttribArray(d.b);a.vertexAttribPointer(d.b,2,5126,!1,8,0);return d};k.sf=function(a,b){a.disableVertexAttribArray(b.b)};
-k.Od=function(a,b,c,d){var e=a.getParameter(a.DEPTH_FUNC),f=a.getParameter(a.DEPTH_WRITEMASK);d||(a.enable(a.DEPTH_TEST),a.depthMask(!0),a.depthFunc(a.NOTEQUAL));if(wb(c)){var g=this.i[this.i.length-1];for(c=this.c.length-1;0<=c;--c){var h=this.c[c];var l=this.u[c];a.uniform4fv(this.v.B,l);xi(a,b,h,g);g=h}}else{var m=this.i.length-2;l=g=this.i[m+1];for(h=this.c.length-1;0<=h;--h){var n=this.u[h];a.uniform4fv(this.v.B,n);for(n=this.c[h];0<=m&&this.i[m]>=n;){var p=this.i[m];var q=this.f[m];q=w(q).toString();
-c[q]&&(g!==l&&(xi(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT)),l=p);m--;g=p}g!==l&&(xi(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT));g=l=n}}d||(a.disable(a.DEPTH_TEST),a.clear(a.DEPTH_BUFFER_BIT),a.depthMask(f),a.depthFunc(e))};
-k.ve=function(a,b,c,d,e){var f,g;var h=this.i.length-2;var l=this.i[h+1];for(f=this.c.length-1;0<=f;--f){var m=this.u[f];a.uniform4fv(this.v.B,m);for(g=this.c[f];0<=h&&this.i[h]>=g;){m=this.i[h];var n=this.f[h];var p=w(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||qb(e,n.V().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),xi(a,b,m,l),l=d(n)))return l;h--;l=m}}};
-k.Ma=function(a,b){a=a?a.b:[0,0,0,0];a instanceof CanvasGradient||a instanceof CanvasPattern?a=yi:a=ed(a).map(function(a,b){return 3!=b?a/255:a})||yi;this.j.fillColor&&pa(a,this.j.fillColor)||(this.j.fillColor=a,this.j.s=!0,this.u.push(a));b?this.g.Ma(null,b):this.g.Ma(null,new wj({color:[0,0,0,0],lineWidth:0}))};function ck(){}ck.prototype.La=function(){};function dk(a,b,c){this.f=b;this.g=a;this.c=c;this.a={}}v(dk,ki);function ek(a,b){var c=[],d;for(d in a.a){var e=a.a[d],f;for(f in e)c.push(e[f].Eb(b))}return function(){for(var a=c.length,b,d=0;d<a;d++)b=c[d].apply(this,arguments);return b}}function fk(a,b){for(var c in a.a){var d=a.a[c],e;for(e in d)d[e].Db(b)}}dk.prototype.b=function(a,b){var c=void 0!==a?a.toString():"0";a=this.a[c];void 0===a&&(a={},this.a[c]=a);c=a[b];void 0===c&&(c=new gk[b](this.g,this.f),a[b]=c);return c};
-dk.prototype.i=function(){return wb(this.a)};dk.prototype.La=function(a,b,c,d,e,f,g,h){var l=Object.keys(this.a).map(Number);l.sort(ia);var m,n;var p=0;for(m=l.length;p<m;++p){var q=this.a[l[p].toString()];var r=0;for(n=ji.length;r<n;++r){var u=q[ji[r]];void 0!==u&&u.La(a,b,c,d,e,f,g,h,void 0,!1)}}};
-function hk(a,b,c,d,e,f,g,h,l,m,n){var p=ik,q=Object.keys(a.a).map(Number);q.sort(function(a,b){return b-a});var r,u;var x=0;for(r=q.length;x<r;++x){var B=a.a[q[x].toString()];for(u=ji.length-1;0<=u;--u){var E=B[ji[u]];if(void 0!==E&&(E=E.La(b,c,d,e,p,f,g,h,l,m,n)))return E}}}
-dk.prototype.Ea=function(a,b,c,d,e,f,g,h,l,m){var n=b.b;n.bindFramebuffer(n.FRAMEBUFFER,Pi(b));var p;void 0!==this.c&&(p=Qa(Za(a),d*this.c));return hk(this,b,a,d,e,g,h,l,function(a){var b=new Uint8Array(4);n.readPixels(0,0,1,1,n.RGBA,n.UNSIGNED_BYTE,b);if(0<b[3]&&(a=m(a)))return a},!0,p)};
-function jk(a,b,c,d,e,f,g,h){var l=c.b;l.bindFramebuffer(l.FRAMEBUFFER,Pi(c));return void 0!==hk(a,c,b,d,e,f,g,h,function(){var a=new Uint8Array(4);l.readPixels(0,0,1,1,l.RGBA,l.UNSIGNED_BYTE,a);return 0<a[3]},!1)}var ik=[1,1],gk={Circle:Fi,Image:Ui,LineString:cj,Polygon:Mj,Text:ck};function kk(a,b,c,d,e,f,g){this.b=a;this.i=b;this.a=f;this.c=g;this.j=e;this.g=d;this.f=c;this.o=this.l=this.v=null}v(kk,Wh);k=kk.prototype;k.rd=function(a){this.Ma(a.Fa(),a.Ga());this.Ub(a.Y())};
-k.zb=function(a){switch(a.U()){case "Point":this.qc(a,null);break;case "LineString":this.mc(a,null);break;case "Polygon":this.rc(a,null);break;case "MultiPoint":this.oc(a,null);break;case "MultiLineString":this.nc(a,null);break;case "MultiPolygon":this.pc(a,null);break;case "GeometryCollection":this.ue(a,null);break;case "Circle":this.Zb(a,null)}};k.te=function(a,b){(a=(0,b.Za)(a))&&qb(this.a,a.G())&&(this.rd(b),this.zb(a))};k.ue=function(a){a=a.a;var b;var c=0;for(b=a.length;c<b;++c)this.zb(a[c])};
-k.qc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"Image");d.Ub(this.v);d.qc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};k.oc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"Image");d.Ub(this.v);d.oc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};
-k.mc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"LineString");d.Ma(null,this.o);d.mc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};k.nc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"LineString");d.Ma(null,this.o);d.nc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};
-k.rc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"Polygon");d.Ma(this.l,this.o);d.rc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};k.pc=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"Polygon");d.Ma(this.l,this.o);d.pc(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};
-k.Zb=function(a,b){var c=this.b,d=(new dk(1,this.a)).b(0,"Circle");d.Ma(this.l,this.o);d.Zb(a,b);d.Db(c);d.La(this.b,this.i,this.f,this.g,this.j,this.c,1,{},void 0,!1);d.Eb(c)()};k.Ub=function(a){this.v=a};k.Ma=function(a,b){this.l=a;this.o=b};function lk(){this.c=0;this.b={};this.i=this.a=null}k=lk.prototype;k.clear=function(){this.c=0;this.b={};this.i=this.a=null};k.forEach=function(a,b){for(var c=this.a;c;)a.call(b,c.Yc,c.uc,this),c=c.Nb};k.get=function(a){a=this.b[a];xa(!!a,15);if(a===this.i)return a.Yc;a===this.a?(this.a=this.a.Nb,this.a.vd=null):(a.Nb.vd=a.vd,a.vd.Nb=a.Nb);a.Nb=null;a.vd=this.i;this.i=this.i.Nb=a;return a.Yc};
-k.pop=function(){var a=this.a;delete this.b[a.uc];a.Nb&&(a.Nb.vd=null);this.a=a.Nb;this.a||(this.i=null);--this.c;return a.Yc};k.replace=function(a,b){this.get(a);this.b[a].Yc=b};k.set=function(a,b){xa(!(a in this.b),16);b={uc:a,Nb:null,vd:this.i,Yc:b};this.i?this.i.Nb=b:this.a=b;this.i=b;this.b[a]=b;++this.c};function mk(a,b){Mh.call(this,0,b);this.b=document.createElement("CANVAS");this.b.style.width="100%";this.b.style.height="100%";this.b.style.display="block";this.b.className="ol-unselectable";a.insertBefore(this.b,a.childNodes[0]||null);this.S=this.D=0;this.C=jd();this.l=!0;this.i=Ld(this.b,{antialias:!0,depth:!0,failIfMajorPerformanceCaveat:!0,preserveDrawingBuffer:!1,stencil:!0});this.f=new Oi(this.b,this.i);y(this.b,"webglcontextlost",this.Yn,this);y(this.b,"webglcontextrestored",this.Zn,this);
-this.a=new lk;this.u=null;this.j=new Ke(function(a){var b=a[1];a=a[2];var c=b[0]-this.u[0],b=b[1]-this.u[1];return 65536*Math.log(a)+Math.sqrt(c*c+b*b)/a}.bind(this),function(a){return a[0].bb()});this.B=function(){if(this.j.b.length){Oe(this.j);var a=Le(this.j);nk(this,a[0],a[3],a[4])}return!1}.bind(this);this.g=0;ok(this)}v(mk,Mh);
-function nk(a,b,c,d){var e=a.i,f=b.bb();if(a.a.b.hasOwnProperty(f))a=a.a.get(f),e.bindTexture(3553,a.Ib),9729!=a.Ph&&(e.texParameteri(3553,10240,9729),a.Ph=9729),9729!=a.Rh&&(e.texParameteri(3553,10241,9729),a.Rh=9729);else{var g=e.createTexture();e.bindTexture(3553,g);if(0<d){var h=a.C.canvas,l=a.C;a.D!==c[0]||a.S!==c[1]?(h.width=c[0],h.height=c[1],a.D=c[0],a.S=c[1]):l.clearRect(0,0,c[0],c[1]);l.drawImage(b.Y(),d,d,c[0],c[1],0,0,c[0],c[1]);e.texImage2D(3553,0,6408,6408,5121,h)}else e.texImage2D(3553,
-0,6408,6408,5121,b.Y());e.texParameteri(3553,10240,9729);e.texParameteri(3553,10241,9729);e.texParameteri(3553,10242,33071);e.texParameteri(3553,10243,33071);a.a.set(f,{Ib:g,Ph:9729,Rh:9729})}}function pk(a,b,c){var d=a.o;if(Rc(d,b)){a=a.f;var e=c.viewState;d.b(new Rh(b,new kk(a,e.center,e.resolution,e.rotation,c.size,c.extent,c.pixelRatio),c,null,a))}}k=mk.prototype;k.ka=function(){var a=this.i;a.isContextLost()||this.a.forEach(function(b){b&&a.deleteTexture(b.Ib)});Nc(this.f);Mh.prototype.ka.call(this)};
-k.xk=function(a,b){a=this.i;for(var c;1024<this.a.c-this.g;){if(c=this.a.a.Yc)a.deleteTexture(c.Ib);else if(+this.a.a.uc==b.index)break;else--this.g;this.a.pop()}};k.U=function(){return"webgl"};k.Yn=function(a){a.preventDefault();this.a.clear();this.g=0;a=this.c;for(var b in a)a[b].mg()};k.Zn=function(){ok(this);this.o.render()};function ok(a){a=a.i;a.activeTexture(33984);a.blendFuncSeparate(770,771,1,771);a.disable(2884);a.disable(2929);a.disable(3089);a.disable(2960)}
-k.Jg=function(a){var b=this.f,c=this.i;if(c.isContextLost())return!1;if(!a)return this.l&&(this.b.style.display="none",this.l=!1),!1;this.u=a.focus;this.a.set((-a.index).toString(),null);++this.g;pk(this,"precompose",a);var d=[],e=a.layerStatesArray;qa(e);var f=a.viewState.resolution,g;var h=0;for(g=e.length;h<g;++h){var l=e[h];if(xh(l,f)&&"ready"==l.yj){var m=Ph(this,l.layer);m.ng(a,l,b)&&d.push(l)}}e=a.size[0]*a.pixelRatio;f=a.size[1]*a.pixelRatio;if(this.b.width!=e||this.b.height!=f)this.b.width=
-e,this.b.height=f;c.bindFramebuffer(36160,null);c.clearColor(0,0,0,0);c.clear(16384);c.enable(3042);c.viewport(0,0,this.b.width,this.b.height);h=0;for(g=d.length;h<g;++h)l=d[h],m=Ph(this,l.layer),m.Gi(a,l,b);this.l||(this.b.style.display="",this.l=!0);Nh(a);1024<this.a.c-this.g&&a.postRenderFunctions.push(this.xk.bind(this));this.j.b.length&&(a.postRenderFunctions.push(this.B),a.animate=!0);pk(this,"postcompose",a);Qh(this,a);a.postRenderFunctions.push(Oh)};
-k.Ea=function(a,b,c,d,e,f,g){if(this.i.isContextLost())return!1;var h=b.viewState,l=b.layerStatesArray,m;for(m=l.length-1;0<=m;--m){var n=l[m];var p=n.layer;if(xh(n,h.resolution)&&f.call(g,p)&&(n=Ph(this,p).Ea(a,b,c,d,e)))return n}};k.Ei=function(a,b,c,d,e){c=!1;if(this.i.isContextLost())return!1;var f=b.viewState,g=b.layerStatesArray,h;for(h=g.length-1;0<=h;--h){var l=g[h],m=l.layer;if(xh(l,f.resolution)&&d.call(e,m)&&(c=Ph(this,m).Ue(a,b)))return!0}return c};
-k.Di=function(a,b,c,d,e){if(this.i.isContextLost())return!1;var f=b.viewState,g=b.layerStatesArray,h;for(h=g.length-1;0<=h;--h){var l=g[h];var m=l.layer;if(xh(l,f.resolution)&&e.call(d,m)&&(l=Ph(this,m).lg(a,b,c,d)))return l}};var qk=["canvas","webgl"];
-function G(a){Tc.call(this);var b=rk(a);this.Cf=void 0!==a.loadTilesWhileAnimating?a.loadTilesWhileAnimating:!1;this.Df=void 0!==a.loadTilesWhileInteracting?a.loadTilesWhileInteracting:!1;this.If=void 0!==a.pixelRatio?a.pixelRatio:Sd;this.yf=b.logos;this.pa=function(){this.j=void 0;this.Sp.call(this,Date.now())}.bind(this);this.Yb=Bh();this.Jf=Bh();this.ad=0;this.I=this.R=this.T=this.g=this.c=null;this.a=document.createElement("DIV");this.a.className="ol-viewport"+(Xd?" ol-touch":"");this.a.style.position=
-"relative";this.a.style.overflow="hidden";this.a.style.width="100%";this.a.style.height="100%";this.a.style.msTouchAction="none";this.a.style.touchAction="none";this.C=document.createElement("DIV");this.C.className="ol-overlaycontainer";this.a.appendChild(this.C);this.D=document.createElement("DIV");this.D.className="ol-overlaycontainer-stopevent";for(var c="click dblclick mousedown touchstart MSPointerDown pointerdown mousewheel wheel".split(" "),d=0,e=c.length;d<e;++d)y(this.D,c[d],Pc);this.a.appendChild(this.D);
-this.Sa=new Fe(this,a.moveTolerance);for(var f in de)y(this.Sa,de[f],this.Ih,this);this.va=b.keyboardEventTarget;this.u=null;y(this.a,"wheel",this.ld,this);y(this.a,"mousewheel",this.ld,this);this.l=b.controls;this.o=b.interactions;this.v=b.overlays;this.rg={};this.B=new b.Up(this.a,this);this.na=null;this.xb=[];this.$a=new Pe(this.ql.bind(this),this.Wl.bind(this));this.fa={};y(this,Vc("layergroup"),this.El,this);y(this,Vc("view"),this.Xl,this);y(this,Vc("size"),this.Tl,this);y(this,Vc("target"),
-this.Vl,this);this.H(b.values);this.l.forEach(function(a){a.setMap(this)},this);y(this.l,"add",function(a){a.element.setMap(this)},this);y(this.l,"remove",function(a){a.element.setMap(null)},this);this.o.forEach(function(a){a.setMap(this)},this);y(this.o,"add",function(a){a.element.setMap(this)},this);y(this.o,"remove",function(a){a.element.setMap(null)},this);this.v.forEach(this.kh,this);y(this.v,"add",function(a){this.kh(a.element)},this);y(this.v,"remove",function(a){var b=a.element.g;void 0!==
-b&&delete this.rg[b.toString()];a.element.setMap(null)},this)}v(G,Tc);k=G.prototype;k.kk=function(a){this.l.push(a)};k.lk=function(a){this.o.push(a)};k.ih=function(a){this.Kc().qd().push(a)};k.jh=function(a){this.v.push(a)};k.kh=function(a){var b=a.g;void 0!==b&&(this.rg[b.toString()]=a);a.setMap(this)};
-k.ka=function(){Nc(this.Sa);Nc(this.B);Kc(this.a,"wheel",this.ld,this);Kc(this.a,"mousewheel",this.ld,this);this.f&&(window.removeEventListener("resize",this.f,!1),this.f=void 0);this.j&&(cancelAnimationFrame(this.j),this.j=void 0);this.Le(null);Tc.prototype.ka.call(this)};k.we=function(a,b,c){if(this.c)return a=this.Wa(a),c=c?c:{},this.B.Ea(a,this.c,void 0!==c.hitTolerance?c.hitTolerance*this.c.pixelRatio:0,b,null,c.layerFilter?c.layerFilter:mf,null)};
-k.Im=function(a,b,c,d,e){if(this.c)return this.B.Di(a,this.c,b,void 0!==c?c:null,d?d:mf,void 0!==e?e:null)};k.Yl=function(a,b){if(!this.c)return!1;a=this.Wa(a);b=b?b:{};return this.B.Ei(a,this.c,void 0!==b.hitTolerance?b.hitTolerance*this.c.pixelRatio:0,b.layerFilter?b.layerFilter:mf,null)};k.Tf=function(a){return this.Wa(this.xe(a))};k.xe=function(a){var b=this.a.getBoundingClientRect();a=a.changedTouches?a.changedTouches[0]:a;return[a.clientX-b.left,a.clientY-b.top]};k.ag=function(){return this.get("target")};
-k.jd=function(){var a=this.ag();return void 0!==a?"string"===typeof a?document.getElementById(a):a:null};k.Wa=function(a){var b=this.c;return b?Gh(b.pixelToCoordinateTransform,a.slice()):null};k.Lk=function(){return this.l};k.fl=function(){return this.v};k.el=function(a){a=this.rg[a.toString()];return void 0!==a?a:null};k.Sk=function(){return this.o};k.Kc=function(){return this.get("layergroup")};k.Xh=function(){return this.Kc().qd()};
-k.Ja=function(a){var b=this.c;return b?Gh(b.coordinateToPixelTransform,a.slice(0,2)):null};k.Ob=function(){return this.get("size")};k.Z=function(){return this.get("view")};k.sl=function(){return this.a};k.ql=function(a,b,c,d){var e=this.c;if(!(e&&b in e.wantedTiles&&e.wantedTiles[b][a.bb()]))return Infinity;a=c[0]-e.focus[0];c=c[1]-e.focus[1];return 65536*Math.log(d)+Math.sqrt(a*a+c*c)/d};k.ld=function(a,b){a=new Jd(b||a.type,this,a);this.Ih(a)};
-k.Ih=function(a){if(this.c){this.na=a.coordinate;a.frameState=this.c;var b=this.o.a,c;if(!1!==this.b(a))for(c=b.length-1;0<=c;c--){var d=b[c];if(d.c()&&!d.handleEvent(a))break}}};k.Rl=function(){var a=this.c,b=this.$a;if(b.b.length){var c=16,d=c;if(a){var e=a.viewHints;e[0]&&(c=this.Cf?8:0,d=2);e[1]&&(c=this.Df?8:0,d=2)}b.j<c&&(Oe(b),Qe(b,c,d))}b=this.xb;c=0;for(d=b.length;c<d;++c)b[c](this,a);b.length=0};k.Tl=function(){this.render()};
-k.Vl=function(){var a;this.ag()&&(a=this.jd());if(this.u){for(var b=0,c=this.u.length;b<c;++b)Ec(this.u[b]);this.u=null}a?(a.appendChild(this.a),a=this.va?this.va:a,this.u=[y(a,"keydown",this.ld,this),y(a,"keypress",this.ld,this)],this.f||(this.f=this.Ad.bind(this),window.addEventListener("resize",this.f,!1))):(ld(this.a),this.f&&(window.removeEventListener("resize",this.f,!1),this.f=void 0));this.Ad()};k.Wl=function(){this.render()};k.Lh=function(){this.render()};
-k.Xl=function(){this.T&&(Ec(this.T),this.T=null);this.R&&(Ec(this.R),this.R=null);var a=this.Z();a&&(this.a.setAttribute("data-view",w(a)),this.T=y(a,"propertychange",this.Lh,this),this.R=y(a,"change",this.Lh,this));this.render()};k.El=function(){this.I&&(this.I.forEach(Ec),this.I=null);var a=this.Kc();a&&(this.I=[y(a,"propertychange",this.render,this),y(a,"change",this.render,this)]);this.render()};k.Tp=function(){this.j&&cancelAnimationFrame(this.j);this.pa()};
-k.render=function(){void 0===this.j&&(this.j=requestAnimationFrame(this.pa))};k.Mp=function(a){return this.l.remove(a)};k.Np=function(a){return this.o.remove(a)};k.Pp=function(a){return this.Kc().qd().remove(a)};k.Qp=function(a){return this.v.remove(a)};
-k.Sp=function(a){var b,c=this.Ob(),d=this.Z(),e=Oa(),f=this.c,g=null;if(void 0!==c&&0<c[0]&&0<c[1]&&d&&jg(d)){var g=dg(d,this.c?this.c.viewHints:void 0),h=this.Kc().Yf(),l={};var m=0;for(b=h.length;m<b;++m)l[w(h[m].layer)]=h[m];m=d.getState();g={animate:!1,attributions:{},coordinateToPixelTransform:this.Yb,extent:e,focus:this.na?this.na:m.center,index:this.ad++,layerStates:l,layerStatesArray:h,logos:tb({},this.yf),pixelRatio:this.If,pixelToCoordinateTransform:this.Jf,postRenderFunctions:[],size:c,
-skippedFeatureUids:this.fa,tileQueue:this.$a,time:a,usedTiles:{},viewState:m,viewHints:g,wantedTiles:{}}}g&&(g.extent=ob(m.center,m.resolution,m.rotation,g.size,e));this.c=g;this.B.Jg(g);g&&(g.animate&&this.render(),Array.prototype.push.apply(this.xb,g.postRenderFunctions),!f||this.g&&(kb(this.g)||bb(g.extent,this.g))||(this.b(new Id("movestart",this,f)),this.g=Ya(this.g)),!this.g||g.viewHints[0]||g.viewHints[1]||bb(g.extent,this.g)||(this.b(new Id("moveend",this,g)),Ra(g.extent,this.g)));this.b(new Id("postrender",
-this,g));setTimeout(this.Rl.bind(this),0)};k.qj=function(a){this.set("layergroup",a)};k.Qg=function(a){this.set("size",a)};k.Le=function(a){this.set("target",a)};k.iq=function(a){this.set("view",a)};k.xj=function(a){a=w(a).toString();this.fa[a]=!0;this.render()};
-k.Ad=function(){var a=this.jd();if(a){var b=getComputedStyle(a);this.Qg([a.offsetWidth-parseFloat(b.borderLeftWidth)-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight)-parseFloat(b.borderRightWidth),a.offsetHeight-parseFloat(b.borderTopWidth)-parseFloat(b.paddingTop)-parseFloat(b.paddingBottom)-parseFloat(b.borderBottomWidth)])}else this.Qg(void 0)};k.Cj=function(a){a=w(a).toString();delete this.fa[a];this.render()};
-function rk(a){var b=null;void 0!==a.keyboardEventTarget&&(b="string"===typeof a.keyboardEventTarget?document.getElementById(a.keyboardEventTarget):a.keyboardEventTarget);var c={},d={};if(void 0===a.logo||"boolean"===typeof a.logo&&a.logo)d["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAAB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RU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7ahgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCnB3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDgq82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC"]=
-"https://openlayers.org/";else{var e=a.logo;"string"===typeof e?d[e]="":e instanceof HTMLElement?d[w(e).toString()]=e:e&&(xa("string"==typeof e.href,44),xa("string"==typeof e.src,45),d[e.src]=e.href)}e=a.layers instanceof uh?a.layers:new uh({layers:a.layers});c.layergroup=e;c.target=a.target;c.view=void 0!==a.view?a.view:new F;var e=Mh,f;void 0!==a.renderer?(Array.isArray(a.renderer)?f=a.renderer:"string"===typeof a.renderer?f=[a.renderer]:xa(!1,46),0<=f.indexOf("dom")&&(f=f.concat(qk))):f=qk;var g;
-var h=0;for(g=f.length;h<g;++h){var l=f[h];if("canvas"==l){if(Ud){e=hi;break}}else if("webgl"==l&&Md){e=mk;break}}void 0!==a.controls?Array.isArray(a.controls)?f=new Yc(a.controls.slice()):(xa(a.controls instanceof Yc,47),f=a.controls):f=xd();void 0!==a.interactions?Array.isArray(a.interactions)?h=new Yc(a.interactions.slice()):(xa(a.interactions instanceof Yc,48),h=a.interactions):h=qh();void 0!==a.overlays?Array.isArray(a.overlays)?a=new Yc(a.overlays.slice()):(xa(a.overlays instanceof Yc,49),a=
-a.overlays):a=new Yc;return{controls:f,interactions:h,keyboardEventTarget:b,logos:d,overlays:a,Up:e,values:c}};function sk(a){Tc.call(this);this.g=a.id;this.l=void 0!==a.insertFirst?a.insertFirst:!0;this.v=void 0!==a.stopEvent?a.stopEvent:!0;this.c=document.createElement("DIV");this.c.className="ol-overlay-container ol-selectable";this.c.style.position="absolute";this.autoPan=void 0!==a.autoPan?a.autoPan:!1;this.j=a.autoPanAnimation||{};this.o=void 0!==a.autoPanMargin?a.autoPanMargin:20;this.a={re:"",Ie:"",nf:"",vf:"",visible:!0};this.f=null;y(this,Vc(tk),this.zl,this);y(this,Vc(uk),this.Jl,this);y(this,Vc(vk),
-this.Nl,this);y(this,Vc(wk),this.Pl,this);y(this,Vc(xk),this.Ql,this);void 0!==a.element&&this.lj(a.element);this.rj(void 0!==a.offset?a.offset:[0,0]);this.uj(void 0!==a.positioning?a.positioning:"top-left");void 0!==a.position&&this.Ne(a.position)}v(sk,Tc);k=sk.prototype;k.Rd=function(){return this.get(tk)};k.Jm=function(){return this.g};k.Me=function(){return this.get(uk)};k.Dh=function(){return this.get(vk)};k.Yh=function(){return this.get(wk)};k.Eh=function(){return this.get(xk)};
-k.zl=function(){for(var a=this.c;a.lastChild;)a.removeChild(a.lastChild);(a=this.Rd())&&this.c.appendChild(a)};k.Jl=function(){this.f&&(ld(this.c),Ec(this.f),this.f=null);var a=this.Me();a&&(this.f=y(a,"postrender",this.render,this),yk(this),a=this.v?a.D:a.C,this.l?a.insertBefore(this.c,a.childNodes[0]||null):a.appendChild(this.c))};k.render=function(){yk(this)};k.Nl=function(){yk(this)};
-k.Pl=function(){yk(this);if(this.get(wk)&&this.autoPan){var a=this.Me();if(a&&a.jd()){var b=zk(a.jd(),a.Ob()),c=this.Rd(),d=c.offsetWidth,e=getComputedStyle(c),d=d+(parseInt(e.marginLeft,10)+parseInt(e.marginRight,10)),e=c.offsetHeight,f=getComputedStyle(c),e=e+(parseInt(f.marginTop,10)+parseInt(f.marginBottom,10)),g=zk(c,[d,e]),c=this.o;Va(b,g)||(d=g[0]-b[0],e=b[2]-g[2],f=g[1]-b[1],g=b[3]-g[3],b=[0,0],0>d?b[0]=d-c:0>e&&(b[0]=Math.abs(e)+c),0>f?b[1]=f-c:0>g&&(b[1]=Math.abs(g)+c),0===b[0]&&0===b[1])||
-(c=a.Z().wa(),c=a.Ja(c),b=[c[0]+b[0],c[1]+b[1]],a.Z().animate({center:a.Wa(b),duration:this.j.duration,easing:this.j.easing}))}}};k.Ql=function(){yk(this)};k.lj=function(a){this.set(tk,a)};k.setMap=function(a){this.set(uk,a)};k.rj=function(a){this.set(vk,a)};k.Ne=function(a){this.set(wk,a)};function zk(a,b){var c=a.getBoundingClientRect();a=c.left+window.pageXOffset;c=c.top+window.pageYOffset;return[a,c,a+b[0],c+b[1]]}k.uj=function(a){this.set(xk,a)};
-function Ak(a,b){a.a.visible!==b&&(a.c.style.display=b?"":"none",a.a.visible=b)}
-function yk(a){var b=a.Me(),c=a.Yh();if(b&&b.c&&c){var c=b.Ja(c),d=b.Ob(),b=a.c.style,e=a.Dh(),f=a.Eh();Ak(a,!0);var g=e[0],e=e[1];if("bottom-right"==f||"center-right"==f||"top-right"==f)""!==a.a.Ie&&(a.a.Ie=b.left=""),g=Math.round(d[0]-c[0]-g)+"px",a.a.nf!=g&&(a.a.nf=b.right=g);else{""!==a.a.nf&&(a.a.nf=b.right="");if("bottom-center"==f||"center-center"==f||"top-center"==f)g-=a.c.offsetWidth/2;g=Math.round(c[0]+g)+"px";a.a.Ie!=g&&(a.a.Ie=b.left=g)}if("bottom-left"==f||"bottom-center"==f||"bottom-right"==
-f)""!==a.a.vf&&(a.a.vf=b.top=""),c=Math.round(d[1]-c[1]-e)+"px",a.a.re!=c&&(a.a.re=b.bottom=c);else{""!==a.a.re&&(a.a.re=b.bottom="");if("center-left"==f||"center-center"==f||"center-right"==f)e-=a.c.offsetHeight/2;c=Math.round(c[1]+e)+"px";a.a.vf!=c&&(a.a.vf=b.top=c)}}else Ak(a,!1)}var tk="element",uk="map",vk="offset",wk="position",xk="positioning";function Bk(a){function b(a){a=h.Tf(a);l.a.Z().ob(a);window.removeEventListener("mousemove",c);window.removeEventListener("mouseup",b)}function c(a){a=h.Tf({clientX:a.clientX-n.offsetWidth/2,clientY:a.clientY+n.offsetHeight/2});m.Ne(a)}a=a?a:{};this.j=void 0!==a.collapsed?a.collapsed:!0;this.o=void 0!==a.collapsible?a.collapsible:!0;this.o||(this.j=!1);var d=void 0!==a.className?a.className:"ol-overviewmap",e=void 0!==a.tipLabel?a.tipLabel:"Overview map",f=void 0!==a.collapseLabel?a.collapseLabel:
-"\u00ab";"string"===typeof f?(this.u=document.createElement("span"),this.u.textContent=f):this.u=f;f=void 0!==a.label?a.label:"\u00bb";"string"===typeof f?(this.D=document.createElement("span"),this.D.textContent=f):this.D=f;var g=this.o&&!this.j?this.u:this.D,f=document.createElement("button");f.setAttribute("type","button");f.title=e;f.appendChild(g);y(f,"click",this.an,this);this.C=document.createElement("DIV");this.C.className="ol-overviewmap-map";var h=this.c=new G({controls:new Yc,interactions:new Yc,
-view:a.view});a.layers&&a.layers.forEach(function(a){h.ih(a)},this);e=document.createElement("DIV");e.className="ol-overviewmap-box";e.style.boxSizing="border-box";this.l=new sk({position:[0,0],positioning:"bottom-left",element:e});this.c.jh(this.l);e=document.createElement("div");e.className=d+" ol-unselectable ol-control"+(this.j&&this.o?" ol-collapsed":"")+(this.o?"":" ol-uncollapsible");e.appendChild(this.C);e.appendChild(f);md.call(this,{element:e,render:a.render?a.render:Ck,target:a.target});
-var l=this,m=this.l,n=this.l.Rd();n.addEventListener("mousedown",function(){window.addEventListener("mousemove",c);window.addEventListener("mouseup",b)})}v(Bk,md);k=Bk.prototype;k.setMap=function(a){var b=this.a;a!==b&&(b&&((b=b.Z())&&Kc(b,Vc("rotation"),this.Ge,this),this.c.Le(null)),md.prototype.setMap.call(this,a),a&&(this.c.Le(this.C),this.v.push(y(a,"propertychange",this.Kl,this)),this.c.Xh().dc()||this.c.qj(a.Kc()),a=a.Z()))&&(y(a,Vc("rotation"),this.Ge,this),jg(a)&&(this.c.Ad(),Dk(this)))};
-k.Kl=function(a){"view"===a.key&&((a=a.oldValue)&&Kc(a,Vc("rotation"),this.Ge,this),a=this.a.Z(),y(a,Vc("rotation"),this.Ge,this))};k.Ge=function(){this.c.Z().Oe(this.a.Z().Qa())};function Ck(){var a=this.a,b=this.c;if(a.c&&b.c){var c=a.Ob(),a=a.Z().dd(c),d=b.Ob(),c=b.Z().dd(d),e=b.Ja(ib(a)),f=b.Ja(gb(a)),b=Math.abs(e[0]-f[0]),e=Math.abs(e[1]-f[1]),f=d[0],d=d[1];b<.1*f||e<.1*d||b>.75*f||e>.75*d?Dk(this):Va(c,a)||(a=this.c,c=this.a.Z(),a.Z().ob(c.wa()))}Ek(this)}
-function Dk(a){var b=a.a;a=a.c;var c=b.Ob(),b=b.Z().dd(c);a=a.Z();rb(b,1/(.1*Math.pow(2,Math.log(7.5)/Math.LN2/2)));a.Qf(b)}function Ek(a){var b=a.a,c=a.c;if(b.c&&c.c){var d=b.Ob(),e=b.Z(),f=c.Z(),c=e.Qa(),b=a.l,g=a.l.Rd(),h=e.dd(d),d=f.Pa(),e=eb(h),f=hb(h);if(a=a.a.Z().wa()){var l=[e[0]-a[0],e[1]-a[1]];ef(l,c);Ze(l,a)}b.Ne(l);g&&(g.style.width=Math.abs((e[0]-f[0])/d)+"px",g.style.height=Math.abs((f[1]-e[1])/d)+"px")}}k.an=function(a){a.preventDefault();Fk(this)};
-function Fk(a){a.element.classList.toggle("ol-collapsed");a.j?kd(a.u,a.D):kd(a.D,a.u);a.j=!a.j;var b=a.c;a.j||b.c||(b.Ad(),Dk(a),Jc(b,"postrender",function(){Ek(this)},a))}k.$m=function(){return this.o};k.cn=function(a){this.o!==a&&(this.o=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.j&&Fk(this))};k.bn=function(a){this.o&&this.j!==a&&Fk(this)};k.Zm=function(){return this.j};k.gl=function(){return this.c};function Gk(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-scale-line";this.o=document.createElement("DIV");this.o.className=b+"-inner";this.c=document.createElement("DIV");this.c.className=b+" ol-unselectable";this.c.appendChild(this.o);this.u=null;this.l=void 0!==a.minWidth?a.minWidth:64;this.j=!1;this.B=void 0;this.D="";md.call(this,{element:this.c,render:a.render?a.render:Hk,target:a.target});y(this,Vc(Ik),this.T,this);this.I(a.units||"metric")}v(Gk,md);var Jk=[1,2,5];Gk.prototype.C=function(){return this.get(Ik)};
-function Hk(a){(a=a.frameState)?this.u=a.viewState:this.u=null;Kk(this)}Gk.prototype.T=function(){Kk(this)};Gk.prototype.I=function(a){this.set(Ik,a)};
-function Kk(a){var b=a.u;if(b){var c=b.projection,d=c.sc(),b=Sb(c,b.resolution,b.center)*d,d=a.l*b,c="",e=a.C();"degrees"==e?(c=zb.degrees,b/=c,d<c/60?(c="\u2033",b*=3600):d<c?(c="\u2032",b*=60):c="\u00b0"):"imperial"==e?.9144>d?(c="in",b/=.0254):1609.344>d?(c="ft",b/=.3048):(c="mi",b/=1609.344):"nautical"==e?(b/=1852,c="nm"):"metric"==e?.001>d?(c="\u03bcm",b*=1E6):1>d?(c="mm",b*=1E3):1E3>d?c="m":(c="km",b/=1E3):"us"==e?.9144>d?(c="in",b*=39.37):1609.344>d?(c="ft",b/=.30480061):(c="mi",b/=1609.3472):
-xa(!1,33);for(var e=3*Math.floor(Math.log(a.l*b)/Math.log(10)),f;;){f=Jk[(e%3+3)%3]*Math.pow(10,Math.floor(e/3));d=Math.round(f/b);if(isNaN(d)){a.c.style.display="none";a.j=!1;return}if(d>=a.l)break;++e}b=f+" "+c;a.D!=b&&(a.o.innerHTML=b,a.D=b);a.B!=d&&(a.o.style.width=d+"px",a.B=d);a.j||(a.c.style.display="",a.j=!0)}else a.j&&(a.c.style.display="none",a.j=!1)}var Ik="units";function Lk(a){a=a?a:{};this.c=void 0;this.j=Mk;this.D=this.l=0;this.I=null;this.na=!1;this.T=void 0!==a.duration?a.duration:200;var b=void 0!==a.className?a.className:"ol-zoomslider",c=document.createElement("button");c.setAttribute("type","button");c.className=b+"-thumb ol-unselectable";var d=document.createElement("div");d.className=b+" ol-unselectable ol-control";d.appendChild(c);this.o=new Ae(d);y(this.o,"pointerdown",this.yl,this);y(this.o,"pointermove",this.wl,this);y(this.o,"pointerup",this.xl,
-this);y(d,"click",this.vl,this);y(c,"click",Pc);md.call(this,{element:d,render:a.render?a.render:Nk})}v(Lk,md);Lk.prototype.ka=function(){Nc(this.o);md.prototype.ka.call(this)};var Mk=0;k=Lk.prototype;k.setMap=function(a){md.prototype.setMap.call(this,a);a&&a.render()};
-function Nk(a){if(a.frameState){if(!this.na){var b=this.element,c=b.offsetWidth,d=b.offsetHeight,e=b.firstElementChild,f=getComputedStyle(e),b=e.offsetWidth+parseFloat(f.marginRight)+parseFloat(f.marginLeft),e=e.offsetHeight+parseFloat(f.marginTop)+parseFloat(f.marginBottom);this.I=[b,e];c>d?(this.j=1,this.D=c-b):(this.j=Mk,this.l=d-e);this.na=!0}a=a.frameState.viewState.resolution;a!==this.c&&(this.c=a,Ok(this,a))}}
-k.vl=function(a){var b=this.a.Z();a=Pk(this,Ca(1===this.j?(a.offsetX-this.I[0]/2)/this.D:(a.offsetY-this.I[1]/2)/this.l,0,1));b.animate({resolution:b.constrainResolution(a),duration:this.T,easing:rd})};k.yl=function(a){this.u||a.b.target!==this.element.firstElementChild||(cg(this.a.Z(),1,1),this.C=a.clientX,this.B=a.clientY,this.u=!0)};
-k.wl=function(a){if(this.u){var b=this.element.firstElementChild;this.c=Pk(this,Ca(1===this.j?(a.clientX-this.C+parseInt(b.style.left,10))/this.D:(a.clientY-this.B+parseInt(b.style.top,10))/this.l,0,1));this.a.Z().Vc(this.c);Ok(this,this.c);this.C=a.clientX;this.B=a.clientY}};k.xl=function(){if(this.u){var a=this.a.Z();cg(a,1,-1);a.animate({resolution:a.constrainResolution(this.c),duration:this.T,easing:rd});this.u=!1;this.B=this.C=void 0}};
-function Ok(a,b){b=1-ig(a.a.Z())(b);var c=a.element.firstElementChild;1==a.j?c.style.left=a.D*b+"px":c.style.top=a.l*b+"px"}function Pk(a,b){return hg(a.a.Z())(1-b)};function Qk(a){a=a?a:{};this.c=a.extent?a.extent:null;var b=void 0!==a.className?a.className:"ol-zoom-extent",c=void 0!==a.label?a.label:"E",d=void 0!==a.tipLabel?a.tipLabel:"Fit to extent",e=document.createElement("button");e.setAttribute("type","button");e.title=d;e.appendChild("string"===typeof c?document.createTextNode(c):c);y(e,"click",this.j,this);c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(e);md.call(this,{element:c,target:a.target})}v(Qk,md);
-Qk.prototype.j=function(a){a.preventDefault();a=this.a.Z();var b=this.c?this.c:a.v.G();a.Qf(b)};function Rk(a){Tc.call(this);a=a?a:{};this.a=null;y(this,Vc(Sk),this.vm,this);this.gg(void 0!==a.tracking?a.tracking:!1)}v(Rk,Tc);k=Rk.prototype;k.ka=function(){this.gg(!1);Tc.prototype.ka.call(this)};
-k.ap=function(a){if(null!==a.alpha){var b=Ha(a.alpha);this.set(Tk,b);"boolean"===typeof a.absolute&&a.absolute?this.set(Uk,b):"number"===typeof a.webkitCompassHeading&&-1!=a.webkitCompassAccuracy&&this.set(Uk,Ha(a.webkitCompassHeading))}null!==a.beta&&this.set(Vk,Ha(a.beta));null!==a.gamma&&this.set(Wk,Ha(a.gamma));this.s()};k.Fk=function(){return this.get(Tk)};k.Ik=function(){return this.get(Vk)};k.Ok=function(){return this.get(Wk)};k.um=function(){return this.get(Uk)};k.Th=function(){return this.get(Sk)};
-k.vm=function(){if(Vd){var a=this.Th();a&&!this.a?this.a=y(window,"deviceorientation",this.ap,this):a||null===this.a||(Ec(this.a),this.a=null)}};k.gg=function(a){this.set(Sk,a)};var Tk="alpha",Vk="beta",Wk="gamma",Uk="heading",Sk="tracking";function Xk(a){this.f=a.opacity;this.l=a.rotateWithView;this.g=a.rotation;this.a=a.scale;this.v=a.snapToPixel}k=Xk.prototype;k.Ze=function(){return this.f};k.$e=function(){return this.l};k.af=function(){return this.g};k.bf=function(){return this.a};k.Ae=function(){return this.v};k.td=function(a){this.f=a};k.cf=function(a){this.g=a};k.ud=function(a){this.a=a};function Yk(a){this.D=this.u=this.c=null;this.Va=void 0!==a.fill?a.fill:null;this.oa=[0,0];this.o=a.points;this.b=void 0!==a.radius?a.radius:a.radius1;this.i=a.radius2;this.j=void 0!==a.angle?a.angle:0;this.Ya=void 0!==a.stroke?a.stroke:null;this.B=this.ra=this.C=null;this.S=a.atlasManager;Zk(this,this.S);Xk.call(this,{opacity:1,rotateWithView:void 0!==a.rotateWithView?a.rotateWithView:!1,rotation:void 0!==a.rotation?a.rotation:0,scale:1,snapToPixel:void 0!==a.snapToPixel?a.snapToPixel:!0})}
-v(Yk,Xk);k=Yk.prototype;k.clone=function(){var a=new Yk({fill:this.Fa()?this.Fa().clone():void 0,points:this.o,radius:this.b,radius2:this.i,angle:this.j,snapToPixel:this.v,stroke:this.Ga()?this.Ga().clone():void 0,rotation:this.g,rotateWithView:this.l,atlasManager:this.S});a.td(this.f);a.ud(this.a);return a};k.Hc=function(){return this.C};k.Pi=function(){return this.j};k.Fa=function(){return this.Va};k.qg=function(){return this.D};k.Y=function(){return this.u};k.ye=function(){return this.B};
-k.Ye=function(){return 2};k.Oc=function(){return this.oa};k.Qi=function(){return this.o};k.Ri=function(){return this.b};k.Fh=function(){return this.i};k.ic=function(){return this.ra};k.Ga=function(){return this.Ya};k.Nh=function(){};k.load=function(){};k.Bj=function(){};
-function Zk(a,b){var c="",d="",e=0,f=null,g=0;if(a.Ya){var h=a.Ya.a;null===h&&(h=Uh);h=id(h);g=a.Ya.c;void 0===g&&(g=1);f=a.Ya.i;Td||(f=null);d=a.Ya.j;void 0===d&&(d="round");c=a.Ya.f;void 0===c&&(c="round");e=a.Ya.o;void 0===e&&(e=10)}var l=2*(a.b+g)+1,c={strokeStyle:h,zj:g,size:l,lineCap:c,lineDash:f,lineJoin:d,miterLimit:e};if(void 0===b){var m=jd(l,l);a.u=m.canvas;b=l=a.u.width;a.rh(c,m,0,0);a.Va?a.D=a.u:(m=jd(c.size,c.size),a.D=m.canvas,a.qh(c,m,0,0))}else l=Math.round(l),(d=!a.Va)&&(m=a.qh.bind(a,
-c)),a.Ya?(e=a.Ya,void 0===e.b&&(e.b="s",e.b=e.a?"string"===typeof e.a?e.b+e.a:e.b+w(e.a).toString():e.b+"-",e.b+=","+(void 0!==e.f?e.f.toString():"-")+","+(e.i?e.i.toString():"-")+","+(void 0!==e.g?e.g:"-")+","+(void 0!==e.j?e.j:"-")+","+(void 0!==e.o?e.o.toString():"-")+","+(void 0!==e.c?e.c.toString():"-")),e=e.b):e="-",a.Va?(f=a.Va,void 0===f.a&&(f.a=f.b instanceof CanvasPattern||f.b instanceof CanvasGradient?w(f.b).toString():"f"+(f.b?gd(f.b):"-")),f=f.a):f="-",a.c&&e==a.c[1]&&f==a.c[2]&&a.b==
-a.c[3]&&a.i==a.c[4]&&a.j==a.c[5]&&a.o==a.c[6]||(a.c=["r"+e+f+(void 0!==a.b?a.b.toString():"-")+(void 0!==a.i?a.i.toString():"-")+(void 0!==a.j?a.j.toString():"-")+(void 0!==a.o?a.o.toString():"-"),e,f,a.b,a.i,a.j,a.o]),m=b.add(a.c[0],l,l,a.rh.bind(a,c),m),a.u=m.image,a.oa=[m.offsetX,m.offsetY],b=m.image.width,a.D=d?m.Zl:a.u;a.C=[l/2,l/2];a.ra=[l,l];a.B=[b,b]}
-k.rh=function(a,b,c,d){b.setTransform(1,0,0,1,0,0);b.translate(c,d);b.beginPath();var e=this.o;if(Infinity===e)b.arc(a.size/2,a.size/2,this.b,0,2*Math.PI,!0);else{var f=void 0!==this.i?this.i:this.b;f!==this.b&&(e*=2);for(c=0;c<=e;c++){d=2*c*Math.PI/e-Math.PI/2+this.j;var g=c%2?f:this.b;b.lineTo(a.size/2+g*Math.cos(d),a.size/2+g*Math.sin(d))}}this.Va&&(c=this.Va.b,null===c&&(c=Sh),b.fillStyle=id(c),b.fill());this.Ya&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.zj,a.lineDash&&b.setLineDash(a.lineDash),
-b.lineCap=a.lineCap,b.lineJoin=a.lineJoin,b.miterLimit=a.miterLimit,b.stroke());b.closePath()};
-k.qh=function(a,b,c,d){b.setTransform(1,0,0,1,0,0);b.translate(c,d);b.beginPath();c=this.o;if(Infinity===c)b.arc(a.size/2,a.size/2,this.b,0,2*Math.PI,!0);else{d=void 0!==this.i?this.i:this.b;d!==this.b&&(c*=2);var e;for(e=0;e<=c;e++){var f=2*e*Math.PI/c-Math.PI/2+this.j;var g=e%2?d:this.b;b.lineTo(a.size/2+g*Math.cos(f),a.size/2+g*Math.sin(f))}}b.fillStyle=Sh;b.fill();this.Ya&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.zj,a.lineDash&&b.setLineDash(a.lineDash),b.stroke());b.closePath()};function $k(a){a=a||{};Yk.call(this,{points:Infinity,fill:a.fill,radius:a.radius,snapToPixel:a.snapToPixel,stroke:a.stroke,atlasManager:a.atlasManager})}v($k,Yk);$k.prototype.clone=function(){var a=new $k({fill:this.Fa()?this.Fa().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,radius:this.b,snapToPixel:this.v,atlasManager:this.S});a.td(this.f);a.ud(this.a);return a};$k.prototype.Uc=function(a){this.b=a;Zk(this,this.S)};function al(a){a=a||{};this.b=void 0!==a.color?a.color:null;this.a=void 0}al.prototype.clone=function(){var a=this.b;return new al({color:a&&a.slice?a.slice():a||void 0})};al.prototype.i=function(){return this.b};al.prototype.c=function(a){this.b=a;this.a=void 0};function bl(a){a=a||{};this.Gc=null;this.Za=cl;void 0!==a.geometry&&this.Ra(a.geometry);this.Va=void 0!==a.fill?a.fill:null;this.M=void 0!==a.image?a.image:null;this.Ya=void 0!==a.stroke?a.stroke:null;this.Ia=void 0!==a.text?a.text:null;this.Fj=a.zIndex}k=bl.prototype;
-k.clone=function(){var a=this.V();a&&a.clone&&(a=a.clone());return new bl({geometry:a,fill:this.Fa()?this.Fa().clone():void 0,image:this.Y()?this.Y().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,text:this.Na()?this.Na().clone():void 0,zIndex:this.Ba()})};k.V=function(){return this.Gc};k.Pk=function(){return this.Za};k.Fa=function(){return this.Va};k.pf=function(a){this.Va=a};k.Y=function(){return this.M};k.Og=function(a){this.M=a};k.Ga=function(){return this.Ya};
-k.qf=function(a){this.Ya=a};k.Na=function(){return this.Ia};k.xd=function(a){this.Ia=a};k.Ba=function(){return this.Fj};k.Ra=function(a){"function"===typeof a?this.Za=a:"string"===typeof a?this.Za=function(b){return b.get(a)}:a?a&&(this.Za=function(){return a}):this.Za=cl;this.Gc=a};k.Vb=function(a){this.Fj=a};function dl(a){if("function"!==typeof a){if(Array.isArray(a))var b=a;else xa(a instanceof bl,41),b=[a];a=function(){return b}}return a}var el=null;
-function fl(){if(!el){var a=new al({color:"rgba(255,255,255,0.4)"}),b=new wj({color:"#3399CC",width:1.25});el=[new bl({image:new $k({fill:a,stroke:b,radius:5}),fill:a,stroke:b})]}return el}
-function gl(){var a={},b=[255,255,255,1],c=[0,153,255,1];a.Polygon=[new bl({fill:new al({color:[255,255,255,.5]})})];a.MultiPolygon=a.Polygon;a.LineString=[new bl({stroke:new wj({color:b,width:5})}),new bl({stroke:new wj({color:c,width:3})})];a.MultiLineString=a.LineString;a.Circle=a.Polygon.concat(a.LineString);a.Point=[new bl({image:new $k({radius:6,fill:new al({color:c}),stroke:new wj({color:b,width:1.5})}),zIndex:Infinity})];a.MultiPoint=a.Point;a.GeometryCollection=a.Polygon.concat(a.LineString,
-a.Point);return a}function cl(a){return a.V()};function H(a){Tc.call(this);this.a=void 0;this.c="geometry";this.g=null;this.j=void 0;this.f=null;y(this,Vc(this.c),this.Ee,this);void 0!==a&&(a instanceof of||!a?this.Ra(a):this.H(a))}v(H,Tc);k=H.prototype;k.clone=function(){var a=new H(this.N());a.Tc(this.c);var b=this.V();b&&a.Ra(b.clone());(b=this.g)&&a.hg(b);return a};k.V=function(){return this.get(this.c)};k.wm=function(){return this.a};k.Qk=function(){return this.c};k.xm=function(){return this.g};k.Lc=function(){return this.j};k.Al=function(){this.s()};
-k.Ee=function(){this.f&&(Ec(this.f),this.f=null);var a=this.V();a&&(this.f=y(a,"change",this.Al,this));this.s()};k.Ra=function(a){this.set(this.c,a)};k.hg=function(a){this.j=(this.g=a)?hl(a):void 0;this.s()};k.jc=function(a){this.a=a;this.s()};k.Tc=function(a){Kc(this,Vc(this.c),this.Ee,this);this.c=a;y(this,Vc(this.c),this.Ee,this);this.Ee()};
-function hl(a){var b;if("function"===typeof a)2==a.length?b=function(b){return a(this,b)}:b=a;else{if(Array.isArray(a))var c=a;else xa(a instanceof bl,41),c=[a];b=function(){return c}}return b};var il=document.implementation.createDocument("","",null);function jl(a,b){return il.createElementNS(a,b)}function kl(a,b){return ll(a,b,[]).join("")}function ll(a,b,c){if(a.nodeType==Node.CDATA_SECTION_NODE||a.nodeType==Node.TEXT_NODE)b?c.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):c.push(a.nodeValue);else for(a=a.firstChild;a;a=a.nextSibling)ll(a,b,c);return c}function ml(a){return a instanceof Document}function nl(a){return a instanceof Node}
-function pl(a){return(new DOMParser).parseFromString(a,"application/xml")}function ql(a,b){return function(c,d){c=a.call(b,c,d);void 0!==c&&la(d[d.length-1],c)}}function rl(a,b){return function(c,d){c=a.call(void 0!==b?b:this,c,d);void 0!==c&&d[d.length-1].push(c)}}function sl(a,b){return function(c,d){c=a.call(void 0!==b?b:this,c,d);void 0!==c&&(d[d.length-1]=c)}}
-function tl(a){return function(b,c){var d=a.call(this,b,c);if(void 0!==d){c=c[c.length-1];b=b.localName;var e;b in c?e=c[b]:e=c[b]=[];e.push(d)}}}function I(a,b){return function(c,d){var e=a.call(this,c,d);void 0!==e&&(d[d.length-1][void 0!==b?b:c.localName]=e)}}function J(a,b){return function(c,d,e){a.call(void 0!==b?b:this,c,d,e);e[e.length-1].node.appendChild(c)}}
-function vl(a){var b,c;return function(d,e,f){if(!b){b={};var g={};g[d.localName]=a;b[d.namespaceURI]=g;c=wl(d.localName)}xl(b,c,e,f)}}function wl(a,b){return function(c,d,e){c=d[d.length-1].node;d=a;void 0===d&&(d=e);e=b;void 0===b&&(e=c.namespaceURI);return jl(e,d)}}var yl=wl();function zl(a,b){for(var c=b.length,d=Array(c),e=0;e<c;++e)d[e]=a[b[e]];return d}function K(a,b,c){c=void 0!==c?c:{};var d;var e=0;for(d=a.length;e<d;++e)c[a[e]]=b;return c}
-function Al(a,b,c,d){for(b=b.firstElementChild;b;b=b.nextElementSibling){var e=a[b.namespaceURI];void 0!==e&&(e=e[b.localName])&&e.call(d,b,c)}}function N(a,b,c,d,e){d.push(a);Al(b,c,d,e);return d.pop()}function xl(a,b,c,d,e,f){for(var g=(void 0!==e?e:c).length,h,l,m=0;m<g;++m)h=c[m],void 0!==h&&(l=b.call(f,h,d,void 0!==e?e[m]:void 0),void 0!==l&&a[l.namespaceURI][l.localName].call(f,l,h,d))}function Bl(a,b,c,d,e,f,g){e.push(a);xl(b,c,d,e,f,g);e.pop()};function Cl(a,b,c,d){return function(e,f,g){var h=new XMLHttpRequest;h.open("GET","function"===typeof a?a(e,f,g):a,!0);"arraybuffer"==b.U()&&(h.responseType="arraybuffer");h.onload=function(){if(!h.status||200<=h.status&&300>h.status){var a=b.U();if("json"==a||"text"==a)var e=h.responseText;else"xml"==a?(e=h.responseXML)||(e=pl(h.responseText)):"arraybuffer"==a&&(e=h.response);e?c.call(this,b.Oa(e,{featureProjection:g}),b.kb(e)):d.call(this)}else d.call(this)}.bind(this);h.onerror=function(){d.call(this)}.bind(this);
-h.send()}}function Dl(a,b){return Cl(a,b,function(a){this.cd(a)},ua)};function El(){this.f=this.defaultDataProjection=null}function Fl(a,b,c){var d;c&&(d={dataProjection:c.dataProjection?c.dataProjection:a.kb(b),featureProjection:c.featureProjection});return Gl(a,d)}function Gl(a,b){return tb({dataProjection:a.defaultDataProjection,featureProjection:a.f},b)}
-function Hl(a,b,c){var d=c?Tb(c.featureProjection):null,e=c?Tb(c.dataProjection):null,f;d&&e&&!dc(d,e)?a instanceof of?f=(b?a.clone():a).tb(b?d:e,b?e:d):f=hc(a,e,d):f=a;if(b&&c&&void 0!==c.decimals){var g=Math.pow(10,c.decimals);f===a&&(f=f.clone());f.Dc(function(a){for(var b=0,c=a.length;b<c;++b)a[b]=Math.round(a[b]*g)/g;return a})}return f};function Il(){El.call(this)}v(Il,El);function Jl(a){return"string"===typeof a?(a=JSON.parse(a))?a:null:null!==a?a:null}k=Il.prototype;k.U=function(){return"json"};k.Tb=function(a,b){return this.Rc(Jl(a),Fl(this,a,b))};k.Oa=function(a,b){return this.yg(Jl(a),Fl(this,a,b))};k.Sc=function(a,b){return this.Cg(Jl(a),Fl(this,a,b))};k.kb=function(a){return this.Fg(Jl(a))};k.Bd=function(a,b){return JSON.stringify(this.Zc(a,b))};k.Wb=function(a,b){return JSON.stringify(this.he(a,b))};
-k.$c=function(a,b){return JSON.stringify(this.je(a,b))};function Kl(a,b,c,d,e,f){var g=NaN,h=NaN,l=(c-b)/d;if(1===l)g=a[b],h=a[b+1];else if(2==l)g=(1-e)*a[b]+e*a[b+d],h=(1-e)*a[b+1]+e*a[b+d+1];else if(l){var h=a[b],l=a[b+1],m=0,g=[0],n;for(n=b+d;n<c;n+=d){var p=a[n],q=a[n+1],m=m+Math.sqrt((p-h)*(p-h)+(q-l)*(q-l));g.push(m);h=p;l=q}c=e*m;l=0;m=g.length;for(n=!1;l<m;)e=l+(m-l>>1),h=+ia(g[e],c),0>h?l=e+1:(m=e,n=!h);e=n?l:~l;0>e?(c=(c-g[-e-2])/(g[-e-1]-g[-e-2]),b+=(-e-2)*d,g=Ja(a[b],a[b+d],c),h=Ja(a[b+1],a[b+d+1],c)):(g=a[b+e*d],h=a[b+e*d+1])}return f?(f[0]=
-g,f[1]=h,f):[g,h]}function Ll(a,b,c,d,e,f){if(c==b)return null;if(e<a[b+d-1])return f?(c=a.slice(b,b+d),c[d-1]=e,c):null;if(a[c-1]<e)return f?(c=a.slice(c-d,c),c[d-1]=e,c):null;if(e==a[b+d-1])return a.slice(b,b+d);b/=d;for(c/=d;b<c;)f=b+c>>1,e<a[(f+1)*d-1]?c=f:b=f+1;c=a[b*d-1];if(e==c)return a.slice((b-1)*d,(b-1)*d+d);f=(e-c)/(a[(b+1)*d-1]-c);c=[];var g;for(g=0;g<d-1;++g)c.push(Ja(a[(b-1)*d+g],a[b*d+g],f));c.push(e);return c}
-function Ml(a,b,c,d,e,f){var g=0;if(f)return Ll(a,g,b[b.length-1],c,d,e);if(d<a[c-1])return e?(a=a.slice(0,c),a[c-1]=d,a):null;if(a[a.length-1]<d)return e?(a=a.slice(a.length-c),a[c-1]=d,a):null;e=0;for(f=b.length;e<f;++e){var h=b[e];if(g!=h){if(d<a[g+c-1])break;else if(d<=a[h-1])return Ll(a,g,h,c,d,!1);g=h}}return null};function O(a,b){rf.call(this);this.c=null;this.u=this.D=this.j=-1;this.ma(a,b)}v(O,rf);k=O.prototype;k.mk=function(a){this.A?la(this.A,a):this.A=a.slice();this.s()};k.clone=function(){var a=new O(null);a.ba(this.ja,this.A.slice());return a};k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;this.u!=this.i&&(this.D=Math.sqrt(yf(this.A,0,this.A.length,this.a,0)),this.u=this.i);return Af(this.A,0,this.A.length,this.a,this.D,!1,a,b,c,d)};
-k.Ck=function(a,b){return Pf(this.A,0,this.A.length,this.a,a,b)};k.nn=function(a,b){return"XYM"!=this.ja&&"XYZM"!=this.ja?null:Ll(this.A,0,this.A.length,this.a,a,void 0!==b?b:!1)};k.X=function(){return Ff(this.A,0,this.A.length,this.a)};k.wh=function(a,b){return Kl(this.A,0,this.A.length,this.a,a,b)};k.pn=function(){var a=this.A,b=this.a,c=a[0],d=a[1],e=0,f;for(f=0+b;f<this.A.length;f+=b)var g=a[f],h=a[f+1],e=e+Math.sqrt((g-c)*(g-c)+(h-d)*(h-d)),c=g,d=h;return e};
-function di(a){a.j!=a.i&&(a.c=a.wh(.5,a.c),a.j=a.i);return a.c}k.hd=function(a){var b=[];b.length=Hf(this.A,0,this.A.length,this.a,a,b,0);a=new O(null);a.ba("XY",b);return a};k.U=function(){return"LineString"};k.Xa=function(a){return Qf(this.A,0,this.A.length,this.a,a)};k.ma=function(a,b){a?(uf(this,b,a,1),this.A||(this.A=[]),this.A.length=Df(this.A,0,a,this.a),this.s()):this.ba("XY",null)};k.ba=function(a,b){tf(this,a,b);this.s()};function P(a,b){rf.call(this);this.c=[];this.j=this.u=-1;this.ma(a,b)}v(P,rf);k=P.prototype;k.nk=function(a){this.A?la(this.A,a.ga().slice()):this.A=a.ga().slice();this.c.push(this.A.length);this.s()};k.clone=function(){var a=new P(null);a.ba(this.ja,this.A.slice(),this.c.slice());return a};k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;this.j!=this.i&&(this.u=Math.sqrt(zf(this.A,0,this.c,this.a,0)),this.j=this.i);return Bf(this.A,0,this.c,this.a,this.u,!1,a,b,c,d)};
-k.rn=function(a,b,c){return"XYM"!=this.ja&&"XYZM"!=this.ja||!this.A.length?null:Ml(this.A,this.c,this.a,a,void 0!==b?b:!1,void 0!==c?c:!1)};k.X=function(){return Gf(this.A,0,this.c,this.a)};k.Bb=function(){return this.c};k.Yk=function(a){if(0>a||this.c.length<=a)return null;var b=new O(null);b.ba(this.ja,this.A.slice(a?this.c[a-1]:0,this.c[a]));return b};
-k.gd=function(){var a=this.A,b=this.c,c=this.ja,d=[],e=0,f;var g=0;for(f=b.length;g<f;++g){var h=b[g],l=new O(null);l.ba(c,a.slice(e,h));d.push(l);e=h}return d};function ei(a){var b=[],c=a.A,d=0,e=a.c;a=a.a;var f;var g=0;for(f=e.length;g<f;++g){var h=e[g],d=Kl(c,d,h,a,.5);la(b,d);d=h}return b}k.hd=function(a){var b=[],c=[],d=this.A,e=this.c,f=this.a,g=0,h=0,l;var m=0;for(l=e.length;m<l;++m){var n=e[m],h=Hf(d,g,n,f,a,b,h);c.push(h);g=n}b.length=h;a=new P(null);a.ba("XY",b,c);return a};k.U=function(){return"MultiLineString"};
-k.Xa=function(a){a:{var b=this.A,c=this.c,d=this.a,e=0,f;var g=0;for(f=c.length;g<f;++g){if(Qf(b,e,c[g],d,a)){a=!0;break a}e=c[g]}a=!1}return a};k.ma=function(a,b){a?(uf(this,b,a,2),this.A||(this.A=[]),a=Ef(this.A,0,a,this.a,this.c),this.A.length=a.length?a[a.length-1]:0,this.s()):this.ba("XY",null,this.c)};k.ba=function(a,b,c){tf(this,a,b);this.c=c;this.s()};function Nl(a,b){var c=a.ja,d=[],e=[],f;var g=0;for(f=b.length;g<f;++g){var h=b[g];g||(c=h.ja);la(d,h.ga());e.push(d.length)}a.ba(c,d,e)};function Q(a,b){rf.call(this);this.ma(a,b)}v(Q,rf);k=Q.prototype;k.qk=function(a){this.A?la(this.A,a.ga()):this.A=a.ga().slice();this.s()};k.clone=function(){var a=new Q(null);a.ba(this.ja,this.A.slice());return a};k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;var e=this.A,f=this.a,g;var h=0;for(g=e.length;h<g;h+=f){var l=Ga(a,b,e[h],e[h+1]);if(l<d){d=l;for(l=0;l<f;++l)c[l]=e[h+l];c.length=f}}return d};k.X=function(){return Ff(this.A,0,this.A.length,this.a)};
-k.il=function(a){var b=this.A?this.A.length/this.a:0;if(0>a||b<=a)return null;b=new C(null);b.ba(this.ja,this.A.slice(a*this.a,(a+1)*this.a));return b};k.Zd=function(){var a=this.A,b=this.ja,c=this.a,d=[],e;var f=0;for(e=a.length;f<e;f+=c){var g=new C(null);g.ba(b,a.slice(f,f+c));d.push(g)}return d};k.U=function(){return"MultiPoint"};k.Xa=function(a){var b=this.A,c=this.a,d;var e=0;for(d=b.length;e<d;e+=c){var f=b[e];var g=b[e+1];if(Ua(a,f,g))return!0}return!1};
-k.ma=function(a,b){a?(uf(this,b,a,1),this.A||(this.A=[]),this.A.length=Df(this.A,0,a,this.a),this.s()):this.ba("XY",null)};k.ba=function(a,b){tf(this,a,b);this.s()};function R(a,b){rf.call(this);this.c=[];this.u=-1;this.D=null;this.I=this.C=this.B=-1;this.j=null;this.ma(a,b)}v(R,rf);k=R.prototype;k.rk=function(a){if(this.A){var b=this.A.length;la(this.A,a.ga());a=a.Bb().slice();var c;var d=0;for(c=a.length;d<c;++d)a[d]+=b}else this.A=a.ga().slice(),a=a.Bb().slice(),this.c.push();this.c.push(a);this.s()};k.clone=function(){for(var a=new R(null),b=this.c.length,c=Array(b),d=0;d<b;++d)c[d]=this.c[d].slice();Ol(a,this.ja,this.A.slice(),c);return a};
-k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;if(this.C!=this.i){var e=this.c,f=0,g=0,h;var l=0;for(h=e.length;l<h;++l)var m=e[l],g=zf(this.A,f,m,this.a,g),f=m[m.length-1];this.B=Math.sqrt(g);this.C=this.i}e=fi(this);f=this.c;g=this.a;l=this.B;h=0;var m=[NaN,NaN],n;var p=0;for(n=f.length;p<n;++p){var q=f[p];d=Bf(e,h,q,g,l,!0,a,b,c,d,m);h=q[q.length-1]}return d};
-k.Mc=function(a,b){a:{var c=fi(this),d=this.c,e=0;if(d.length){var f;var g=0;for(f=d.length;g<f;++g){var h=d[g];if(Nf(c,e,h,this.a,a,b)){a=!0;break a}e=h[h.length-1]}}a=!1}return a};k.sn=function(){var a=fi(this),b=this.c,c=0,d=0,e;var f=0;for(e=b.length;f<e;++f)var g=b[f],d=d+wf(a,c,g,this.a),c=g[g.length-1];return d};
-k.X=function(a){if(void 0!==a){var b=fi(this).slice();Vf(b,this.c,this.a,a)}else b=this.A;a=b;b=this.c;var c=this.a,d=0,e=[],f=0,g;var h=0;for(g=b.length;h<g;++h){var l=b[h];e[f++]=Gf(a,d,l,c,e[f]);d=l[l.length-1]}e.length=f;return e};
-function gi(a){if(a.u!=a.i){var b=a.A,c=a.c,d=a.a,e=0,f=[],g;var h=0;for(g=c.length;h<g;++h){var l=c[h],e=$a(b,e,l[0],d);f.push((e[0]+e[2])/2,(e[1]+e[3])/2);e=l[l.length-1]}b=fi(a);c=a.c;d=a.a;h=0;g=[];l=0;for(e=c.length;l<e;++l){var m=c[l];g=Of(b,h,m,d,f,2*l,g);h=m[m.length-1]}a.D=g;a.u=a.i}return a.D}k.Uk=function(){var a=new Q(null);a.ba("XY",gi(this).slice());return a};
-function fi(a){if(a.I!=a.i){var b=a.A;a:{var c=a.c;var d;var e=0;for(d=c.length;e<d;++e)if(!Tf(b,c[e],a.a,void 0)){c=!1;break a}c=!0}c?a.j=b:(a.j=b.slice(),a.j.length=Vf(a.j,a.c,a.a));a.I=a.i}return a.j}k.hd=function(a){var b=[],c=[],d=this.A,e=this.c,f=this.a;a=Math.sqrt(a);var g=0,h=0,l;var m=0;for(l=e.length;m<l;++m){var n=e[m],p=[],h=If(d,g,n,f,a,b,h,p);c.push(p);g=n[n.length-1]}b.length=h;d=new R(null);Ol(d,"XY",b,c);return d};
-k.jl=function(a){if(0>a||this.c.length<=a)return null;if(a){var b=this.c[a-1];b=b[b.length-1]}else b=0;a=this.c[a].slice();var c=a[a.length-1];if(b){var d;var e=0;for(d=a.length;e<d;++e)a[e]-=b}e=new D(null);e.ba(this.ja,this.A.slice(b,c),a);return e};k.Td=function(){var a=this.ja,b=this.A,c=this.c,d=[],e=0,f,g;var h=0;for(f=c.length;h<f;++h){var l=c[h].slice(),m=l[l.length-1];if(e){var n=0;for(g=l.length;n<g;++n)l[n]-=e}n=new D(null);n.ba(a,b.slice(e,m),l);d.push(n);e=m}return d};k.U=function(){return"MultiPolygon"};
-k.Xa=function(a){a:{var b=fi(this),c=this.c,d=this.a,e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g];if(Rf(b,e,h,d,a)){a=!0;break a}e=h[h.length-1]}a=!1}return a};k.ma=function(a,b){if(a){uf(this,b,a,3);this.A||(this.A=[]);b=this.A;var c=this.a,d=this.c,e=0,d=d?d:[],f=0,g;var h=0;for(g=a.length;h<g;++h)e=Ef(b,e,a[h],c,d[f]),d[f++]=e,e=e[e.length-1];d.length=f;d.length?(a=d[d.length-1],this.A.length=a.length?a[a.length-1]:0):this.A.length=0;this.s()}else Ol(this,"XY",null,this.c)};
-function Ol(a,b,c,d){tf(a,b,c);a.c=d;a.s()}function Pl(a,b){var c=a.ja,d=[],e=[],f;var g=0;for(f=b.length;g<f;++g){var h=b[g];g||(c=h.ja);var l=d.length;var m=h.Bb();var n;var p=0;for(n=m.length;p<n;++p)m[p]+=l;la(d,h.ga());e.push(m)}Ol(a,c,d,e)};function Ql(a){a=a?a:{};El.call(this);this.b=a.geometryName}v(Ql,Il);
-function Rl(a,b){if(!a)return null;if("number"===typeof a.x&&"number"===typeof a.y)var c="Point";else if(a.points)c="MultiPoint";else if(a.paths)c=1===a.paths.length?"LineString":"MultiLineString";else if(a.rings){var d=a.rings,e=Sl(a),f=[],g=[];c=[];var h;var l=0;for(h=d.length;l<h;++l)f.length=0,Df(f,0,d[l],e.length),Sf(f,0,f.length,e.length)?g.push([d[l]]):c.push(d[l]);for(;c.length;){d=c.shift();e=!1;for(l=g.length-1;0<=l;l--)if(Va((new Jf(g[l][0])).G(),(new Jf(d)).G())){g[l].push(d);e=!0;break}e||
-g.push([d.reverse()])}a=tb({},a);1===g.length?(c="Polygon",a.rings=g[0]):(c="MultiPolygon",a.rings=g)}return Hl((0,Tl[c])(a),!1,b)}function Sl(a){var b="XY";!0===a.hasZ&&!0===a.hasM?b="XYZM":!0===a.hasZ?b="XYZ":!0===a.hasM&&(b="XYM");return b}function Ul(a){a=a.ja;return{hasZ:"XYZ"===a||"XYZM"===a,hasM:"XYM"===a||"XYZM"===a}}
-var Tl={Point:function(a){return void 0!==a.m&&void 0!==a.z?new C([a.x,a.y,a.z,a.m],"XYZM"):void 0!==a.z?new C([a.x,a.y,a.z],"XYZ"):void 0!==a.m?new C([a.x,a.y,a.m],"XYM"):new C([a.x,a.y])},LineString:function(a){return new O(a.paths[0],Sl(a))},Polygon:function(a){return new D(a.rings,Sl(a))},MultiPoint:function(a){return new Q(a.points,Sl(a))},MultiLineString:function(a){return new P(a.paths,Sl(a))},MultiPolygon:function(a){return new R(a.rings,Sl(a))}},Vl={Point:function(a){var b=a.X(),c;a=a.ja;
-"XYZ"===a?c={x:b[0],y:b[1],z:b[2]}:"XYM"===a?c={x:b[0],y:b[1],m:b[2]}:"XYZM"===a?c={x:b[0],y:b[1],z:b[2],m:b[3]}:"XY"===a?c={x:b[0],y:b[1]}:xa(!1,34);return c},LineString:function(a){var b=Ul(a);return{hasZ:b.hasZ,hasM:b.hasM,paths:[a.X()]}},Polygon:function(a){var b=Ul(a);return{hasZ:b.hasZ,hasM:b.hasM,rings:a.X(!1)}},MultiPoint:function(a){var b=Ul(a);return{hasZ:b.hasZ,hasM:b.hasM,points:a.X()}},MultiLineString:function(a){var b=Ul(a);return{hasZ:b.hasZ,hasM:b.hasM,paths:a.X()}},MultiPolygon:function(a){var b=
-Ul(a);a=a.X(!1);for(var c=[],d=0;d<a.length;d++)for(var e=a[d].length-1;0<=e;e--)c.push(a[d][e]);return{hasZ:b.hasZ,hasM:b.hasM,rings:c}}};k=Ql.prototype;k.Rc=function(a,b){var c=Rl(a.geometry,b),d=new H;this.b&&d.Tc(this.b);d.Ra(c);b&&b.dg&&a.attributes[b.dg]&&d.jc(a.attributes[b.dg]);a.attributes&&d.H(a.attributes);return d};k.yg=function(a,b){b=b?b:{};if(a.features){var c=[],d=a.features,e;b.dg=a.objectIdFieldName;a=0;for(e=d.length;a<e;++a)c.push(this.Rc(d[a],b));return c}return[this.Rc(a,b)]};
-k.Cg=function(a,b){return Rl(a,b)};k.Fg=function(a){return a.spatialReference&&a.spatialReference.wkid?Tb("EPSG:"+a.spatialReference.wkid):null};function Wl(a,b){return(0,Vl[a.U()])(Hl(a,!0,b),b)}k.je=function(a,b){return Wl(a,Gl(this,b))};k.Zc=function(a,b){b=Gl(this,b);var c={},d=a.V();d&&(c.geometry=Wl(d,b));d=a.N();delete d[a.c];c.attributes=wb(d)?{}:d;b&&b.featureProjection&&(c.spatialReference={wkid:Tb(b.featureProjection).mb.split(":").pop()});return c};
-k.he=function(a,b){b=Gl(this,b);var c=[],d;var e=0;for(d=a.length;e<d;++e)c.push(this.Zc(a[e],b));return{features:c}};function Xl(a){this.kc=a};function Yl(a,b){this.kc=a;this.b=Array.prototype.slice.call(arguments,1);xa(2<=this.b.length,57)}v(Yl,Xl);function Zl(a){var b=["And"].concat(Array.prototype.slice.call(arguments));Yl.apply(this,b)}v(Zl,Yl);function $l(a,b,c){this.kc="BBOX";this.geometryName=a;this.extent=b;this.srsName=c}v($l,Xl);function am(a,b){this.kc=a;this.b=b}v(am,Xl);function bm(a,b,c){am.call(this,"During",a);this.a=b;this.i=c}v(bm,am);function cm(a,b,c,d){am.call(this,a,b);this.i=c;this.a=d}v(cm,am);function dm(a,b,c){cm.call(this,"PropertyIsEqualTo",a,b,c)}v(dm,cm);function em(a,b){cm.call(this,"PropertyIsGreaterThan",a,b)}v(em,cm);function fm(a,b){cm.call(this,"PropertyIsGreaterThanOrEqualTo",a,b)}v(fm,cm);function gm(a,b,c,d){this.kc=a;this.geometryName=b||"the_geom";this.geometry=c;this.srsName=d}v(gm,Xl);function hm(a,b,c){gm.call(this,"Intersects",a,b,c)}v(hm,gm);function im(a,b,c){am.call(this,"PropertyIsBetween",a);this.a=b;this.i=c}v(im,am);function jm(a,b,c,d,e,f){am.call(this,"PropertyIsLike",a);this.c=b;this.g=void 0!==c?c:"*";this.f=void 0!==d?d:".";this.i=void 0!==e?e:"!";this.a=f}v(jm,am);function km(a){am.call(this,"PropertyIsNull",a)}v(km,am);function lm(a,b){cm.call(this,"PropertyIsLessThan",a,b)}v(lm,cm);function mm(a,b){cm.call(this,"PropertyIsLessThanOrEqualTo",a,b)}v(mm,cm);function nm(a){this.kc="Not";this.condition=a}v(nm,Xl);function om(a,b,c){cm.call(this,"PropertyIsNotEqualTo",a,b,c)}v(om,cm);function pm(a){var b=["Or"].concat(Array.prototype.slice.call(arguments));Yl.apply(this,b)}v(pm,Yl);function qm(a,b,c){gm.call(this,"Within",a,b,c)}v(qm,gm);function rm(a){var b=[null].concat(Array.prototype.slice.call(arguments));return new (Function.prototype.bind.apply(Zl,b))}function sm(a,b,c){return new $l(a,b,c)};function tm(a){of.call(this);this.a=a?a:null;um(this)}v(tm,of);function vm(a){var b=[],c;var d=0;for(c=a.length;d<c;++d)b.push(a[d].clone());return b}function wm(a){var b;if(a.a){var c=0;for(b=a.a.length;c<b;++c)Kc(a.a[c],"change",a.s,a)}}function um(a){var b;if(a.a){var c=0;for(b=a.a.length;c<b;++c)y(a.a[c],"change",a.s,a)}}k=tm.prototype;k.clone=function(){var a=new tm(null);a.oj(this.a);return a};
-k.Kb=function(a,b,c,d){if(d<Sa(this.G(),a,b))return d;var e=this.a,f;var g=0;for(f=e.length;g<f;++g)d=e[g].Kb(a,b,c,d);return d};k.Mc=function(a,b){var c=this.a,d;var e=0;for(d=c.length;e<d;++e)if(c[e].Mc(a,b))return!0;return!1};k.se=function(a){Ya(a);for(var b=this.a,c=0,d=b.length;c<d;++c)cb(a,b[c].G());return a};k.Vf=function(){return vm(this.a)};
-k.Vd=function(a){this.o!=this.i&&(ub(this.f),this.g=0,this.o=this.i);if(0>a||this.g&&a<this.g)return this;var b=a.toString();if(this.f.hasOwnProperty(b))return this.f[b];var c=[],d=this.a,e=!1,f;var g=0;for(f=d.length;g<f;++g){var h=d[g],l=h.Vd(a);c.push(l);l!==h&&(e=!0)}if(e)return a=new tm(null),wm(a),a.a=c,um(a),a.s(),this.f[b]=a;this.g=a;return this};k.U=function(){return"GeometryCollection"};k.Xa=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)if(b[d].Xa(a))return!0;return!1};
-k.rotate=function(a,b){for(var c=this.a,d=0,e=c.length;d<e;++d)c[d].rotate(a,b);this.s()};k.scale=function(a,b,c){c||(c=nb(this.G()));for(var d=this.a,e=0,f=d.length;e<f;++e)d[e].scale(a,b,c);this.s()};k.oj=function(a){a=vm(a);wm(this);this.a=a;um(this);this.s()};k.Dc=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)b[d].Dc(a);this.s()};k.translate=function(a,b){var c=this.a,d;var e=0;for(d=c.length;e<d;++e)c[e].translate(a,b);this.s()};k.ka=function(){wm(this);of.prototype.ka.call(this)};function xm(a){a=a?a:{};El.call(this);this.defaultDataProjection=Tb(a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326");a.featureProjection&&(this.f=Tb(a.featureProjection));this.b=a.geometryName}v(xm,Il);function ym(a,b){return a?Hl((0,zm[a.type])(a),!1,b):null}function Am(a,b){return(0,Bm[a.U()])(Hl(a,!0,b),b)}
-var zm={Point:function(a){return new C(a.coordinates)},LineString:function(a){return new O(a.coordinates)},Polygon:function(a){return new D(a.coordinates)},MultiPoint:function(a){return new Q(a.coordinates)},MultiLineString:function(a){return new P(a.coordinates)},MultiPolygon:function(a){return new R(a.coordinates)},GeometryCollection:function(a,b){a=a.geometries.map(function(a){return ym(a,b)});return new tm(a)}},Bm={Point:function(a){return{type:"Point",coordinates:a.X()}},LineString:function(a){return{type:"LineString",
-coordinates:a.X()}},Polygon:function(a,b){if(b)var c=b.rightHanded;return{type:"Polygon",coordinates:a.X(c)}},MultiPoint:function(a){return{type:"MultiPoint",coordinates:a.X()}},MultiLineString:function(a){return{type:"MultiLineString",coordinates:a.X()}},MultiPolygon:function(a,b){if(b)var c=b.rightHanded;return{type:"MultiPolygon",coordinates:a.X(c)}},GeometryCollection:function(a,b){return{type:"GeometryCollection",geometries:a.a.map(function(a){var c=tb({},b);delete c.featureProjection;return Am(a,
-c)})}},Circle:function(){return{type:"GeometryCollection",geometries:[]}}};k=xm.prototype;k.Rc=function(a,b){a="Feature"===a.type?a:{type:"Feature",geometry:a};b=ym(a.geometry,b);var c=new H;this.b&&c.Tc(this.b);c.Ra(b);void 0!==a.id&&c.jc(a.id);a.properties&&c.H(a.properties);return c};k.yg=function(a,b){if("FeatureCollection"===a.type){var c=[];a=a.features;var d;var e=0;for(d=a.length;e<d;++e)c.push(this.Rc(a[e],b))}else c=[this.Rc(a,b)];return c};k.Cg=function(a,b){return ym(a,b)};
-k.Fg=function(a){a=a.crs;var b;a?"name"==a.type?b=Tb(a.properties.name):"EPSG"==a.type?b=Tb("EPSG:"+a.properties.code):xa(!1,36):b=this.defaultDataProjection;return b};k.Zc=function(a,b){b=Gl(this,b);var c={type:"Feature"},d=a.a;void 0!==d&&(c.id=d);(d=a.V())?c.geometry=Am(d,b):c.geometry=null;b=a.N();delete b[a.c];wb(b)?c.properties=null:c.properties=b;return c};k.he=function(a,b){b=Gl(this,b);var c=[],d;var e=0;for(d=a.length;e<d;++e)c.push(this.Zc(a[e],b));return{type:"FeatureCollection",features:c}};
-k.je=function(a,b){return Am(a,Gl(this,b))};function Cm(){this.i=new XMLSerializer;El.call(this)}v(Cm,El);k=Cm.prototype;k.U=function(){return"xml"};k.Tb=function(a,b){return ml(a)?Dm(this,a,b):nl(a)?this.xg(a,b):"string"===typeof a?(a=pl(a),Dm(this,a,b)):null};function Dm(a,b,c){a=Em(a,b,c);return 0<a.length?a[0]:null}k.xg=function(){return null};k.Oa=function(a,b){return ml(a)?Em(this,a,b):nl(a)?this.zc(a,b):"string"===typeof a?(a=pl(a),Em(this,a,b)):[]};
-function Em(a,b,c){var d=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&la(d,a.zc(b,c));return d}k.Sc=function(a,b){if(ml(a))return null;if(nl(a))return this.aj(a,b);"string"===typeof a&&pl(a);return null};k.aj=function(){return null};k.kb=function(a){return ml(a)?this.Eg(a):nl(a)?this.kf(a):"string"===typeof a?(a=pl(a),this.Eg(a)):null};k.Eg=function(){return this.defaultDataProjection};k.kf=function(){return this.defaultDataProjection};
-k.Bd=function(a,b){return this.i.serializeToString(this.Vg(a,b))};k.Vg=function(){return null};k.Wb=function(a,b){a=this.Xb(a,b);return this.i.serializeToString(a)};k.Xb=function(){return null};k.$c=function(a,b){a=this.ie(a,b);return this.i.serializeToString(a)};k.ie=function(){return null};function Fm(a){a=a?a:{};this.featureType=a.featureType;this.featureNS=a.featureNS;this.srsName=a.srsName;this.schemaLocation="";this.b={};this.b["http://www.opengis.net/gml"]={featureMember:sl(Fm.prototype.be),featureMembers:sl(Fm.prototype.be)};Cm.call(this)}v(Fm,Cm);var Gm=/^[\s\xa0]*$/;k=Fm.prototype;
-k.be=function(a,b){var c=a.localName,d=null;if("FeatureCollection"==c)"http://www.opengis.net/wfs"===a.namespaceURI?d=N([],this.b,a,b,this):d=N(null,this.b,a,b,this);else if("featureMembers"==c||"featureMember"==c){var e=b[0],f=e.featureType,g=e.featureNS,h;if(!f&&a.childNodes){f=[];g={};var l=0;for(h=a.childNodes.length;l<h;++l){var m=a.childNodes[l];if(1===m.nodeType){var n=m.nodeName.split(":").pop();if(-1===f.indexOf(n)){var p="",q=0,m=m.namespaceURI,r;for(r in g){if(g[r]===m){p=r;break}++q}p||
-(p="p"+q,g[p]=m);f.push(p+":"+n)}}}"featureMember"!=c&&(e.featureType=f,e.featureNS=g)}"string"===typeof g&&(l=g,g={},g.p0=l);var e={},f=Array.isArray(f)?f:[f],u;for(u in g){n={};l=0;for(h=f.length;l<h;++l)(-1===f[l].indexOf(":")?"p0":f[l].split(":")[0])===u&&(n[f[l].split(":").pop()]="featureMembers"==c?rl(this.wg,this):sl(this.wg,this));e[g[u]]=n}"featureMember"==c?d=N(void 0,e,a,b):d=N([],e,a,b)}null===d&&(d=[]);return d};
-k.gf=function(a,b){var c=b[0];c.srsName=a.firstElementChild.getAttribute("srsName");if(a=N(null,this.Zg,a,b,this))return Hl(a,!1,c)};
-k.wg=function(a,b){var c;(c=a.getAttribute("fid"))||(c=a.getAttributeNS("http://www.opengis.net/gml","id")||"");var d={},e;for(a=a.firstElementChild;a;a=a.nextElementSibling){var f=a.localName;if(0===a.childNodes.length||1===a.childNodes.length&&(3===a.firstChild.nodeType||4===a.firstChild.nodeType)){var g=kl(a,!1);Gm.test(g)&&(g=void 0);d[f]=g}else"boundedBy"!==f&&(e=f),d[f]=this.gf(a,b)}b=new H(d);e&&b.Tc(e);c&&b.jc(c);return b};
-k.fj=function(a,b){if(a=this.ff(a,b))return b=new C(null),b.ba("XYZ",a),b};k.dj=function(a,b){if(a=N([],this.Nj,a,b,this))return new Q(a)};k.cj=function(a,b){if(a=N([],this.Mj,a,b,this))return b=new P(null),Nl(b,a),b};k.ej=function(a,b){if(a=N([],this.Oj,a,b,this))return b=new R(null),Pl(b,a),b};k.Xi=function(a,b){Al(this.Rj,a,b,this)};k.Mh=function(a,b){Al(this.Kj,a,b,this)};k.Yi=function(a,b){Al(this.Sj,a,b,this)};k.hf=function(a,b){if(a=this.ff(a,b))return b=new O(null),b.ba("XYZ",a),b};
-k.wp=function(a,b){if(a=N(null,this.ke,a,b,this))return a};k.bj=function(a,b){if(a=this.ff(a,b))return b=new Jf(null),Kf(b,"XYZ",a),b};k.jf=function(a,b){if((a=N([null],this.zf,a,b,this))&&a[0]){b=new D(null);var c=a[0],d=[c.length],e;var f=1;for(e=a.length;f<e;++f)la(c,a[f]),d.push(c.length);b.ba("XYZ",c,d);return b}};k.ff=function(a,b){return N(null,this.ke,a,b,this)};k.Nj={"http://www.opengis.net/gml":{pointMember:rl(Fm.prototype.Xi),pointMembers:rl(Fm.prototype.Xi)}};
-k.Mj={"http://www.opengis.net/gml":{lineStringMember:rl(Fm.prototype.Mh),lineStringMembers:rl(Fm.prototype.Mh)}};k.Oj={"http://www.opengis.net/gml":{polygonMember:rl(Fm.prototype.Yi),polygonMembers:rl(Fm.prototype.Yi)}};k.Rj={"http://www.opengis.net/gml":{Point:rl(Fm.prototype.ff)}};k.Kj={"http://www.opengis.net/gml":{LineString:rl(Fm.prototype.hf)}};k.Sj={"http://www.opengis.net/gml":{Polygon:rl(Fm.prototype.jf)}};k.le={"http://www.opengis.net/gml":{LinearRing:sl(Fm.prototype.wp)}};
-k.aj=function(a,b){return(a=this.gf(a,[Fl(this,a,b?b:{})]))?a:null};k.zc=function(a,b){var c={featureType:this.featureType,featureNS:this.featureNS};b&&tb(c,Fl(this,a,b));return this.be(a,[c])||[]};k.kf=function(a){return Tb(this.srsName?this.srsName:a.firstElementChild.getAttribute("srsName"))};function Hm(a){a=kl(a,!1);return Im(a)}function Im(a){if(a=/^\s*(true|1)|(false|0)\s*$/.exec(a))return void 0!==a[1]||!1}function Jm(a){a=kl(a,!1);a=Date.parse(a);return isNaN(a)?void 0:a/1E3}function Km(a){a=kl(a,!1);return Lm(a)}function Lm(a){if(a=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(a))return parseFloat(a[1])}function Mm(a){a=kl(a,!1);return Nm(a)}function Nm(a){if(a=/^\s*(\d+)\s*$/.exec(a))return parseInt(a[1],10)}function S(a){return kl(a,!1).trim()}
-function Om(a,b){Pm(a,b?"1":"0")}function Qm(a,b){a.appendChild(il.createTextNode(b.toPrecision()))}function Rm(a,b){a.appendChild(il.createTextNode(b.toString()))}function Pm(a,b){a.appendChild(il.createTextNode(b))};function Sm(a){a=a?a:{};Fm.call(this,a);this.l=void 0!==a.surface?a.surface:!1;this.c=void 0!==a.curve?a.curve:!1;this.g=void 0!==a.multiCurve?a.multiCurve:!0;this.j=void 0!==a.multiSurface?a.multiSurface:!0;this.schemaLocation=a.schemaLocation?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd"}v(Sm,Fm);k=Sm.prototype;k.Ap=function(a,b){if(a=N([],this.Lj,a,b,this))return b=new P(null),Nl(b,a),b};
-k.Bp=function(a,b){if(a=N([],this.Pj,a,b,this))return b=new R(null),Pl(b,a),b};k.ph=function(a,b){Al(this.Hj,a,b,this)};k.Aj=function(a,b){Al(this.Uj,a,b,this)};k.Ep=function(a,b){return N([null],this.Qj,a,b,this)};k.Hp=function(a,b){return N([null],this.Tj,a,b,this)};k.Fp=function(a,b){return N([null],this.zf,a,b,this)};k.zp=function(a,b){return N([null],this.ke,a,b,this)};k.cm=function(a,b){(a=N(void 0,this.le,a,b,this))&&b[b.length-1].push(a)};
-k.yk=function(a,b){(a=N(void 0,this.le,a,b,this))&&(b[b.length-1][0]=a)};k.gj=function(a,b){if((a=N([null],this.Vj,a,b,this))&&a[0]){b=new D(null);var c=a[0],d=[c.length],e;var f=1;for(e=a.length;f<e;++f)la(c,a[f]),d.push(c.length);b.ba("XYZ",c,d);return b}};k.Zi=function(a,b){if(a=N([null],this.Ij,a,b,this))return b=new O(null),b.ba("XYZ",a),b};k.vp=function(a,b){a=N([null],this.Jj,a,b,this);return Xa(a[1][0],a[1][1],a[2][0],a[2][1])};
-k.xp=function(a,b){var c=kl(a,!1),d=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/;a=[];for(var e;e=d.exec(c);)a.push(parseFloat(e[1])),c=c.substr(e[0].length);if(""===c){b=b[0].srsName;c="enu";b&&(c=Tb(b).b);if("neu"===c)for(b=0,c=a.length;b<c;b+=3)d=a[b],a[b]=a[b+1],a[b+1]=d;b=a.length;2==b&&a.push(0);if(b)return a}};
-k.Bg=function(a,b){var c=kl(a,!1).replace(/^\s*|\s*$/g,""),d=b[0].srsName,e=a.parentNode.getAttribute("srsDimension");b="enu";d&&(b=Tb(d).b);c=c.split(/\s+/);d=2;a.getAttribute("srsDimension")?d=Nm(a.getAttribute("srsDimension")):a.getAttribute("dimension")?d=Nm(a.getAttribute("dimension")):e&&(d=Nm(e));for(var f,g=[],h=0,l=c.length;h<l;h+=d)a=parseFloat(c[h]),e=parseFloat(c[h+1]),f=3===d?parseFloat(c[h+2]):0,"en"===b.substr(0,2)?g.push(a,e,f):g.push(e,a,f);return g};
-k.ke={"http://www.opengis.net/gml":{pos:sl(Sm.prototype.xp),posList:sl(Sm.prototype.Bg)}};k.zf={"http://www.opengis.net/gml":{interior:Sm.prototype.cm,exterior:Sm.prototype.yk}};
-k.Zg={"http://www.opengis.net/gml":{Point:sl(Fm.prototype.fj),MultiPoint:sl(Fm.prototype.dj),LineString:sl(Fm.prototype.hf),MultiLineString:sl(Fm.prototype.cj),LinearRing:sl(Fm.prototype.bj),Polygon:sl(Fm.prototype.jf),MultiPolygon:sl(Fm.prototype.ej),Surface:sl(Sm.prototype.gj),MultiSurface:sl(Sm.prototype.Bp),Curve:sl(Sm.prototype.Zi),MultiCurve:sl(Sm.prototype.Ap),Envelope:sl(Sm.prototype.vp)}};k.Lj={"http://www.opengis.net/gml":{curveMember:rl(Sm.prototype.ph),curveMembers:rl(Sm.prototype.ph)}};
-k.Pj={"http://www.opengis.net/gml":{surfaceMember:rl(Sm.prototype.Aj),surfaceMembers:rl(Sm.prototype.Aj)}};k.Hj={"http://www.opengis.net/gml":{LineString:rl(Fm.prototype.hf),Curve:rl(Sm.prototype.Zi)}};k.Uj={"http://www.opengis.net/gml":{Polygon:rl(Fm.prototype.jf),Surface:rl(Sm.prototype.gj)}};k.Vj={"http://www.opengis.net/gml":{patches:sl(Sm.prototype.Ep)}};k.Ij={"http://www.opengis.net/gml":{segments:sl(Sm.prototype.Hp)}};k.Jj={"http://www.opengis.net/gml":{lowerCorner:rl(Sm.prototype.Bg),upperCorner:rl(Sm.prototype.Bg)}};
-k.Qj={"http://www.opengis.net/gml":{PolygonPatch:sl(Sm.prototype.Fp)}};k.Tj={"http://www.opengis.net/gml":{LineStringSegment:sl(Sm.prototype.zp)}};function Tm(a,b,c){var d=c[c.length-1];c=d.hasZ;d=d.srsName;b=b.X();for(var e=b.length,f=Array(e),g,h=0;h<e;++h){g=b[h];var l=h,m=c,n="enu";d&&(n=Tb(d).b);n="en"===n.substr(0,2)?g[0]+" "+g[1]:g[1]+" "+g[0];m&&(n+=" "+(g[2]||0));f[l]=n}Pm(a,f.join(" "))}
-k.ni=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=jl(a.namespaceURI,"pos");a.appendChild(d);c=c[c.length-1];a=c.hasZ;var e=c.srsName;c="enu";e&&(c=Tb(e).b);b=b.X();c="en"===c.substr(0,2)?b[0]+" "+b[1]:b[1]+" "+b[0];a&&(c+=" "+(b[2]||0));Pm(d,c)};var Um={"http://www.opengis.net/gml":{lowerCorner:J(Pm),upperCorner:J(Pm)}};k=Sm.prototype;
-k.jn=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);Bl({node:a},Um,yl,[b[0]+" "+b[1],b[2]+" "+b[3]],c,["lowerCorner","upperCorner"],this)};k.ki=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=jl(a.namespaceURI,"posList");a.appendChild(d);Tm(d,b,c)};k.hn=function(a,b){a=b[b.length-1];b=a.node;var c=a.exteriorWritten;void 0===c&&(a.exteriorWritten=!0);return jl(b.namespaceURI,void 0!==c?"interior":"exterior")};
-k.Se=function(a,b,c){var d=c[c.length-1],e=d.hasZ,d=d.srsName;"PolygonPatch"!==a.nodeName&&d&&a.setAttribute("srsName",d);"Polygon"===a.nodeName||"PolygonPatch"===a.nodeName?(b=b.Sd(),Bl({node:a,hasZ:e,srsName:d},Vm,this.hn,b,c,void 0,this)):"Surface"===a.nodeName&&(e=jl(a.namespaceURI,"patches"),a.appendChild(e),a=jl(e.namespaceURI,"PolygonPatch"),e.appendChild(a),this.Se(a,b,c))};
-k.Re=function(a,b,c){var d=c[c.length-1].srsName;"LineStringSegment"!==a.nodeName&&d&&a.setAttribute("srsName",d);"LineString"===a.nodeName||"LineStringSegment"===a.nodeName?(d=jl(a.namespaceURI,"posList"),a.appendChild(d),Tm(d,b,c)):"Curve"===a.nodeName&&(d=jl(a.namespaceURI,"segments"),a.appendChild(d),a=jl(d.namespaceURI,"LineStringSegment"),d.appendChild(a),this.Re(a,b,c))};
-k.mi=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName,d=d.surface;f&&a.setAttribute("srsName",f);b=b.Td();Bl({node:a,hasZ:e,srsName:f,surface:d},Wm,this.o,b,c,void 0,this)};k.kn=function(a,b,c){var d=c[c.length-1],e=d.srsName,d=d.hasZ;e&&a.setAttribute("srsName",e);b=b.Zd();Bl({node:a,hasZ:d,srsName:e},Xm,wl("pointMember"),b,c,void 0,this)};
-k.li=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName,d=d.curve;f&&a.setAttribute("srsName",f);b=b.gd();Bl({node:a,hasZ:e,srsName:f,curve:d},Ym,this.o,b,c,void 0,this)};k.oi=function(a,b,c){var d=jl(a.namespaceURI,"LinearRing");a.appendChild(d);this.ki(d,b,c)};k.pi=function(a,b,c){var d=this.a(b,c);d&&(a.appendChild(d),this.Se(d,b,c))};k.ln=function(a,b,c){var d=jl(a.namespaceURI,"Point");a.appendChild(d);this.ni(d,b,c)};
-k.ji=function(a,b,c){var d=this.a(b,c);d&&(a.appendChild(d),this.Re(d,b,c))};k.od=function(a,b,c){var d=c[c.length-1],e=tb({},d);e.node=a;var f;Array.isArray(b)?d.dataProjection?f=hc(b,d.featureProjection,d.dataProjection):f=b:f=Hl(b,!0,d);Bl(e,Zm,this.a,[f],c,void 0,this)};
-k.ii=function(a,b,c){var d=b.a;d&&a.setAttribute("fid",d);var d=c[c.length-1],e=d.featureNS,f=b.c;d.lb||(d.lb={},d.lb[e]={});var g=b.N();b=[];var h=[];for(m in g){var l=g[m];null!==l&&(b.push(m),h.push(l),m==f||l instanceof of?m in d.lb[e]||(d.lb[e][m]=J(this.od,this)):m in d.lb[e]||(d.lb[e][m]=J(Pm)))}var m=tb({},d);m.node=a;Bl(m,d.lb,wl(void 0,e),h,c,b)};
-var Wm={"http://www.opengis.net/gml":{surfaceMember:J(Sm.prototype.pi),polygonMember:J(Sm.prototype.pi)}},Xm={"http://www.opengis.net/gml":{pointMember:J(Sm.prototype.ln)}},Ym={"http://www.opengis.net/gml":{lineStringMember:J(Sm.prototype.ji),curveMember:J(Sm.prototype.ji)}},Vm={"http://www.opengis.net/gml":{exterior:J(Sm.prototype.oi),interior:J(Sm.prototype.oi)}},Zm={"http://www.opengis.net/gml":{Curve:J(Sm.prototype.Re),MultiCurve:J(Sm.prototype.li),Point:J(Sm.prototype.ni),MultiPoint:J(Sm.prototype.kn),
-LineString:J(Sm.prototype.Re),MultiLineString:J(Sm.prototype.li),LinearRing:J(Sm.prototype.ki),Polygon:J(Sm.prototype.Se),MultiPolygon:J(Sm.prototype.mi),Surface:J(Sm.prototype.Se),MultiSurface:J(Sm.prototype.mi),Envelope:J(Sm.prototype.jn)}},$m={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};Sm.prototype.o=function(a,b){return jl("http://www.opengis.net/gml",$m[b[b.length-1].node.nodeName])};
-Sm.prototype.a=function(a,b){var c=b[b.length-1];b=c.multiSurface;var d=c.surface,e=c.curve,c=c.multiCurve;Array.isArray(a)?a="Envelope":(a=a.U(),"MultiPolygon"===a&&!0===b?a="MultiSurface":"Polygon"===a&&!0===d?a="Surface":"LineString"===a&&!0===e?a="Curve":"MultiLineString"===a&&!0===c&&(a="MultiCurve"));return jl("http://www.opengis.net/gml",a)};
-Sm.prototype.ie=function(a,b){b=Gl(this,b);var c=jl("http://www.opengis.net/gml","geom"),d={node:c,hasZ:this.hasZ,srsName:this.srsName,curve:this.c,surface:this.l,multiSurface:this.j,multiCurve:this.g};b&&tb(d,b);this.od(c,a,[d]);return c};
-Sm.prototype.Xb=function(a,b){b=Gl(this,b);var c=jl("http://www.opengis.net/gml","featureMembers");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.schemaLocation);var d={srsName:this.srsName,hasZ:this.hasZ,curve:this.c,surface:this.l,multiSurface:this.j,multiCurve:this.g,featureNS:this.featureNS,featureType:this.featureType};b&&tb(d,b);b=[d];var e=b[b.length-1],d=e.featureType,f=e.featureNS,g={};g[f]={};g[f][d]=J(this.ii,this);e=tb({},e);e.node=c;Bl(e,g,wl(d,
-f),a,b);return c};function an(a){a=a?a:{};Fm.call(this,a);this.b["http://www.opengis.net/gml"].featureMember=rl(Fm.prototype.be);this.schemaLocation=a.schemaLocation?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd"}v(an,Fm);k=an.prototype;
-k.$i=function(a,b){a=kl(a,!1).replace(/^\s*|\s*$/g,"");var c=b[0].srsName;b="enu";c&&(c=Tb(c))&&(b=c.b);a=a.trim().split(/\s+/);for(var d,e,f=[],g=0,h=a.length;g<h;g++)e=a[g].split(/,+/),c=parseFloat(e[0]),d=parseFloat(e[1]),e=3===e.length?parseFloat(e[2]):0,"en"===b.substr(0,2)?f.push(c,d,e):f.push(d,c,e);return f};k.tp=function(a,b){a=N([null],this.Gj,a,b,this);return Xa(a[1][0],a[1][1],a[1][3],a[1][4])};k.am=function(a,b){(a=N(void 0,this.le,a,b,this))&&b[b.length-1].push(a)};
-k.bp=function(a,b){(a=N(void 0,this.le,a,b,this))&&(b[b.length-1][0]=a)};k.ke={"http://www.opengis.net/gml":{coordinates:sl(an.prototype.$i)}};k.zf={"http://www.opengis.net/gml":{innerBoundaryIs:an.prototype.am,outerBoundaryIs:an.prototype.bp}};k.Gj={"http://www.opengis.net/gml":{coordinates:rl(an.prototype.$i)}};
-k.Zg={"http://www.opengis.net/gml":{Point:sl(Fm.prototype.fj),MultiPoint:sl(Fm.prototype.dj),LineString:sl(Fm.prototype.hf),MultiLineString:sl(Fm.prototype.cj),LinearRing:sl(Fm.prototype.bj),Polygon:sl(Fm.prototype.jf),MultiPolygon:sl(Fm.prototype.ej),Box:sl(an.prototype.tp)}};
-k.jg=function(a,b){var c=b[b.length-1];b=c.multiSurface;var d=c.surface,c=c.multiCurve;Array.isArray(a)?a="Envelope":(a=a.U(),"MultiPolygon"===a&&!0===b?a="MultiSurface":"Polygon"===a&&!0===d?a="Surface":"MultiLineString"===a&&!0===c&&(a="MultiCurve"));return jl("http://www.opengis.net/gml",a)};k.ai=function(a,b,c){var d=c[c.length-1],e=tb({},d);e.node=a;var f;Array.isArray(b)?d.dataProjection?f=hc(b,d.featureProjection,d.dataProjection):f=b:f=Hl(b,!0,d);Bl(e,bn,this.jg,[f],c,void 0,this)};
-k.Pe=function(a,b,c){var d=c[c.length-1].srsName;"LineStringSegment"!==a.nodeName&&d&&a.setAttribute("srsName",d);"LineString"===a.nodeName||"LineStringSegment"===a.nodeName?(d=cn(a.namespaceURI),a.appendChild(d),dn(d,b,c)):"Curve"===a.nodeName&&(d=jl(a.namespaceURI,"segments"),a.appendChild(d),a=jl(d.namespaceURI,"LineStringSegment"),d.appendChild(a),this.Pe(a,b,c))};function cn(a){a=jl(a,"coordinates");a.setAttribute("decimal",".");a.setAttribute("cs",",");a.setAttribute("ts"," ");return a}
-function dn(a,b,c){var d=c[c.length-1];c=d.hasZ;d=d.srsName;b=b.X();for(var e=b.length,f=Array(e),g,h=0;h<e;++h)g=b[h],f[h]=en(g,d,c);Pm(a,f.join(" "))}
-k.Qe=function(a,b,c){var d=c[c.length-1],e=d.hasZ,d=d.srsName;"PolygonPatch"!==a.nodeName&&d&&a.setAttribute("srsName",d);"Polygon"===a.nodeName||"PolygonPatch"===a.nodeName?(b=b.Sd(),Bl({node:a,hasZ:e,srsName:d},fn,this.dn,b,c,void 0,this)):"Surface"===a.nodeName&&(e=jl(a.namespaceURI,"patches"),a.appendChild(e),a=jl(e.namespaceURI,"PolygonPatch"),e.appendChild(a),this.Qe(a,b,c))};
-k.dn=function(a,b){a=b[b.length-1];b=a.node;var c=a.exteriorWritten;void 0===c&&(a.exteriorWritten=!0);return jl(b.namespaceURI,void 0!==c?"innerBoundaryIs":"outerBoundaryIs")};k.gi=function(a,b,c){var d=jl(a.namespaceURI,"LinearRing");a.appendChild(d);this.ci(d,b,c)};function en(a,b,c){var d="enu";b&&(d=Tb(b).b);b="en"===d.substr(0,2)?a[0]+","+a[1]:a[1]+","+a[0];c&&(b+=","+(a[2]||0));return b}
-k.di=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName,d=d.curve;f&&a.setAttribute("srsName",f);b=b.gd();Bl({node:a,hasZ:e,srsName:f,curve:d},gn,this.a,b,c,void 0,this)};k.fi=function(a,b,c){var d=c[c.length-1];c=d.hasZ;var e=d.srsName;e&&a.setAttribute("srsName",e);d=cn(a.namespaceURI);a.appendChild(d);a=b.X();a=en(a,e,c);Pm(d,a)};
-k.fn=function(a,b,c){var d=c[c.length-1],e=d.hasZ;(d=d.srsName)&&a.setAttribute("srsName",d);b=b.Zd();Bl({node:a,hasZ:e,srsName:d},hn,wl("pointMember"),b,c,void 0,this)};k.gn=function(a,b,c){var d=jl(a.namespaceURI,"Point");a.appendChild(d);this.fi(d,b,c)};k.bi=function(a,b,c){var d=this.jg(b,c);d&&(a.appendChild(d),this.Pe(d,b,c))};k.ci=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=cn(a.namespaceURI);a.appendChild(d);dn(d,b,c)};
-k.ei=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName,d=d.surface;f&&a.setAttribute("srsName",f);b=b.Td();Bl({node:a,hasZ:e,srsName:f,surface:d},jn,this.a,b,c,void 0,this)};k.hi=function(a,b,c){var d=this.jg(b,c);d&&(a.appendChild(d),this.Qe(d,b,c))};k.en=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);Bl({node:a},kn,yl,[b[0]+" "+b[1],b[2]+" "+b[3]],c,["lowerCorner","upperCorner"],this)};
-var bn={"http://www.opengis.net/gml":{Curve:J(an.prototype.Pe),MultiCurve:J(an.prototype.di),Point:J(an.prototype.fi),MultiPoint:J(an.prototype.fn),LineString:J(an.prototype.Pe),MultiLineString:J(an.prototype.di),LinearRing:J(an.prototype.ci),Polygon:J(an.prototype.Qe),MultiPolygon:J(an.prototype.ei),Surface:J(an.prototype.Qe),MultiSurface:J(an.prototype.ei),Envelope:J(an.prototype.en)}},fn={"http://www.opengis.net/gml":{outerBoundaryIs:J(an.prototype.gi),innerBoundaryIs:J(an.prototype.gi)}},hn={"http://www.opengis.net/gml":{pointMember:J(an.prototype.gn)}},
-gn={"http://www.opengis.net/gml":{lineStringMember:J(an.prototype.bi),curveMember:J(an.prototype.bi)}};an.prototype.a=function(a,b){return jl("http://www.opengis.net/gml",ln[b[b.length-1].node.nodeName])};var ln={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},jn={"http://www.opengis.net/gml":{surfaceMember:J(an.prototype.hi),polygonMember:J(an.prototype.hi)}},kn={"http://www.opengis.net/gml":{lowerCorner:J(Pm),upperCorner:J(Pm)}};function mn(a){a=a?a:{};Cm.call(this);this.defaultDataProjection=Tb("EPSG:4326");this.b=a.readExtensions}v(mn,Cm);var nn=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"];function on(a,b,c,d){a.push(parseFloat(c.getAttribute("lon")),parseFloat(c.getAttribute("lat")));"ele"in d?(a.push(d.ele),delete d.ele,b.hasZ=!0):a.push(0);"time"in d?(a.push(d.time),delete d.time,b.hasM=!0):a.push(0);return a}
-function pn(a,b,c){var d="XY",e=2;a.hasZ&&a.hasM?(d="XYZM",e=4):a.hasZ?(d="XYZ",e=3):a.hasM&&(d="XYM",e=3);if(4!==e){var f;var g=0;for(f=b.length/4;g<f;g++)b[g*e]=b[4*g],b[g*e+1]=b[4*g+1],a.hasZ&&(b[g*e+2]=b[4*g+2]),a.hasM&&(b[g*e+2]=b[4*g+3]);b.length=b.length/4*e;if(c)for(g=0,f=c.length;g<f;g++)c[g]=c[g]/4*e}return d}function qn(a,b){var c=b[b.length-1],d=a.getAttribute("href");null!==d&&(c.link=d);Al(rn,a,b)}function sn(a,b){b[b.length-1].extensionsNode_=a}
-function tn(a,b){var c=b[0];if(a=N({flatCoordinates:[],layoutOptions:{}},un,a,b)){b=a.flatCoordinates;delete a.flatCoordinates;var d=a.layoutOptions;delete a.layoutOptions;var d=pn(d,b),e=new O(null);e.ba(d,b);Hl(e,!1,c);c=new H(e);c.H(a);return c}}
-function vn(a,b){var c=b[0];if(a=N({flatCoordinates:[],ends:[],layoutOptions:{}},wn,a,b)){b=a.flatCoordinates;delete a.flatCoordinates;var d=a.ends;delete a.ends;var e=a.layoutOptions;delete a.layoutOptions;var e=pn(e,b,d),f=new P(null);f.ba(e,b,d);Hl(f,!1,c);c=new H(f);c.H(a);return c}}function xn(a,b){var c=b[0];if(b=N({},yn,a,b)){var d={};a=on([],d,a,b);d=pn(d,a);a=new C(a,d);Hl(a,!1,c);c=new H(a);c.H(b);return c}}
-var zn={rte:tn,trk:vn,wpt:xn},An=K(nn,{rte:rl(tn),trk:rl(vn),wpt:rl(xn)}),rn=K(nn,{text:I(S,"linkText"),type:I(S,"linkType")}),un=K(nn,{name:I(S),cmt:I(S),desc:I(S),src:I(S),link:qn,number:I(Mm),extensions:sn,type:I(S),rtept:function(a,b){var c=N({},Bn,a,b);c&&(b=b[b.length-1],on(b.flatCoordinates,b.layoutOptions,a,c))}}),Bn=K(nn,{ele:I(Km),time:I(Jm)}),wn=K(nn,{name:I(S),cmt:I(S),desc:I(S),src:I(S),link:qn,number:I(Mm),type:I(S),extensions:sn,trkseg:function(a,b){var c=b[b.length-1];Al(Cn,a,b);c.ends.push(c.flatCoordinates.length)}}),
-Cn=K(nn,{trkpt:function(a,b){var c=N({},Dn,a,b);c&&(b=b[b.length-1],on(b.flatCoordinates,b.layoutOptions,a,c))}}),Dn=K(nn,{ele:I(Km),time:I(Jm)}),yn=K(nn,{ele:I(Km),time:I(Jm),magvar:I(Km),geoidheight:I(Km),name:I(S),cmt:I(S),desc:I(S),src:I(S),link:qn,sym:I(S),type:I(S),fix:I(S),sat:I(Mm),hdop:I(Km),vdop:I(Km),pdop:I(Km),ageofdgpsdata:I(Km),dgpsid:I(Mm),extensions:sn});
-function En(a,b){b||(b=[]);for(var c=0,d=b.length;c<d;++c){var e=b[c];if(a.b){var f=e.get("extensionsNode_")||null;a.b(e,f)}e.set("extensionsNode_",void 0)}}mn.prototype.xg=function(a,b){if(!ja(nn,a.namespaceURI))return null;var c=zn[a.localName];if(!c)return null;a=c(a,[Fl(this,a,b)]);if(!a)return null;En(this,[a]);return a};mn.prototype.zc=function(a,b){return ja(nn,a.namespaceURI)?"gpx"==a.localName&&(a=N([],An,a,[Fl(this,a,b)]))?(En(this,a),a):[]:[]};
-function Fn(a,b,c){a.setAttribute("href",b);b=c[c.length-1].properties;Bl({node:a},Gn,yl,[b.linkText,b.linkType],c,Hn)}function In(a,b,c){var d=c[c.length-1],e=d.node.namespaceURI,f=d.properties;a.setAttributeNS(null,"lat",b[1]);a.setAttributeNS(null,"lon",b[0]);switch(d.geometryLayout){case "XYZM":b[3]&&(f.time=b[3]);case "XYZ":b[2]&&(f.ele=b[2]);break;case "XYM":b[2]&&(f.time=b[2])}b="rtept"==a.nodeName?Jn[e]:Kn[e];d=zl(f,b);Bl({node:a,properties:f},Ln,yl,d,c,b)}
-var Hn=["text","type"],Gn=K(nn,{text:J(Pm),type:J(Pm)}),Mn=K(nn,"name cmt desc src link number type rtept".split(" ")),Nn=K(nn,{name:J(Pm),cmt:J(Pm),desc:J(Pm),src:J(Pm),link:J(Fn),number:J(Rm),type:J(Pm),rtept:vl(J(In))}),Jn=K(nn,["ele","time"]),On=K(nn,"name cmt desc src link number type trkseg".split(" ")),Rn=K(nn,{name:J(Pm),cmt:J(Pm),desc:J(Pm),src:J(Pm),link:J(Fn),number:J(Rm),type:J(Pm),trkseg:vl(J(function(a,b,c){Bl({node:a,geometryLayout:b.ja,properties:{}},Pn,Qn,b.X(),c)}))}),Qn=wl("trkpt"),
-Pn=K(nn,{trkpt:J(In)}),Kn=K(nn,"ele time magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid".split(" ")),Ln=K(nn,{ele:J(Qm),time:J(function(a,b){b=new Date(1E3*b);a.appendChild(il.createTextNode(b.getUTCFullYear()+"-"+Xe(b.getUTCMonth()+1)+"-"+Xe(b.getUTCDate())+"T"+Xe(b.getUTCHours())+":"+Xe(b.getUTCMinutes())+":"+Xe(b.getUTCSeconds())+"Z"))}),magvar:J(Qm),geoidheight:J(Qm),name:J(Pm),cmt:J(Pm),desc:J(Pm),src:J(Pm),link:J(Fn),sym:J(Pm),type:J(Pm),fix:J(Pm),
-sat:J(Rm),hdop:J(Qm),vdop:J(Qm),pdop:J(Qm),ageofdgpsdata:J(Qm),dgpsid:J(Rm)}),Sn={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function Tn(a,b){if(a=a.V())if(a=Sn[a.U()])return jl(b[b.length-1].node.namespaceURI,a)}
-var Un=K(nn,{rte:J(function(a,b,c){var d=c[0],e=b.N();a={node:a,properties:e};if(b=b.V())b=Hl(b,!0,d),a.geometryLayout=b.ja,e.rtept=b.X();d=Mn[c[c.length-1].node.namespaceURI];e=zl(e,d);Bl(a,Nn,yl,e,c,d)}),trk:J(function(a,b,c){var d=c[0],e=b.N();a={node:a,properties:e};if(b=b.V())b=Hl(b,!0,d),e.trkseg=b.gd();d=On[c[c.length-1].node.namespaceURI];e=zl(e,d);Bl(a,Rn,yl,e,c,d)}),wpt:J(function(a,b,c){var d=c[0],e=c[c.length-1];e.properties=b.N();if(b=b.V())b=Hl(b,!0,d),e.geometryLayout=b.ja,In(a,b.X(),
-c)})});mn.prototype.Xb=function(a,b){b=Gl(this,b);var c=jl("http://www.topografix.com/GPX/1/1","gpx");c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd");c.setAttribute("version","1.1");c.setAttribute("creator","OpenLayers");Bl({node:c},Un,Tn,a,[b]);return c};function Vn(){El.call(this)}v(Vn,El);function Wn(a){return"string"===typeof a?a:""}k=Vn.prototype;k.U=function(){return"text"};k.Tb=function(a,b){return this.ae(Wn(a),Gl(this,b))};k.Oa=function(a,b){return this.zg(Wn(a),Gl(this,b))};k.Sc=function(a,b){return this.wd(Wn(a),Gl(this,b))};k.kb=function(){return this.defaultDataProjection};k.Bd=function(a,b){return this.ge(a,Gl(this,b))};k.Wb=function(a,b){return this.Wg(a,Gl(this,b))};k.$c=function(a,b){return this.Cd(a,Gl(this,b))};function Xn(a){a=a?a:{};El.call(this);this.defaultDataProjection=Tb("EPSG:4326");this.b=a.altitudeMode?a.altitudeMode:"none"}v(Xn,Vn);var Yn=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Zn=/^H.([A-Z]{3}).*?:(.*)/,$n=/^HFDTE(\d{2})(\d{2})(\d{2})/,ao=/\r\n|\r|\n/;k=Xn.prototype;
-k.ae=function(a,b){var c=this.b,d=a.split(ao);a={};var e=[],f=2E3,g=0,h=1,l=-1,m;var n=0;for(m=d.length;n<m;++n){var p=d[n],q;if("B"==p.charAt(0)){if(q=Yn.exec(p)){var p=parseInt(q[1],10),r=parseInt(q[2],10),u=parseInt(q[3],10),x=parseInt(q[4],10)+parseInt(q[5],10)/6E4;"S"==q[6]&&(x=-x);var B=parseInt(q[7],10)+parseInt(q[8],10)/6E4;"W"==q[9]&&(B=-B);e.push(B,x);"none"!=c&&e.push("gps"==c?parseInt(q[11],10):"barometric"==c?parseInt(q[12],10):0);q=Date.UTC(f,g,h,p,r,u);q<l&&(q=Date.UTC(f,g,h+1,p,r,
-u));e.push(q/1E3);l=q}}else"H"==p.charAt(0)&&((q=$n.exec(p))?(h=parseInt(q[1],10),g=parseInt(q[2],10)-1,f=2E3+parseInt(q[3],10)):(q=Zn.exec(p))&&(a[q[1]]=q[2].trim()))}if(!e.length)return null;d=new O(null);d.ba("none"==c?"XYM":"XYZM",e);b=new H(Hl(d,!1,b));b.H(a);return b};k.zg=function(a,b){return(a=this.ae(a,b))?[a]:[]};k.ge=function(){};k.Wg=function(){};k.Cd=function(){};k.wd=function(){};function bo(a,b,c,d,e,f){Qc.call(this);this.j=null;this.M=a?a:new Image;null!==d&&(this.M.crossOrigin=d);this.c=f?document.createElement("CANVAS"):null;this.g=f;this.f=null;this.i=e;this.a=c;this.o=b;this.l=!1;2==this.i&&co(this)}v(bo,Qc);function co(a){var b=jd(1,1);try{b.drawImage(a.M,0,0),b.getImageData(0,0,1,1)}catch(c){a.l=!0}}bo.prototype.v=function(){this.i=3;this.f.forEach(Ec);this.f=null;this.b("change")};
-bo.prototype.u=function(){this.i=2;this.a&&(this.M.width=this.a[0],this.M.height=this.a[1]);this.a=[this.M.width,this.M.height];this.f.forEach(Ec);this.f=null;co(this);if(!this.l&&null!==this.g){this.c.width=this.M.width;this.c.height=this.M.height;var a=this.c.getContext("2d");a.drawImage(this.M,0,0);for(var b=a.getImageData(0,0,this.M.width,this.M.height),c=b.data,d=this.g[0]/255,e=this.g[1]/255,f=this.g[2]/255,g=0,h=c.length;g<h;g+=4)c[g]*=d,c[g+1]*=e,c[g+2]*=f;a.putImageData(b,0,0)}this.b("change")};
-bo.prototype.Y=function(){return this.c?this.c:this.M};bo.prototype.load=function(){if(0==this.i){this.i=1;this.f=[Jc(this.M,"error",this.v,this),Jc(this.M,"load",this.u,this)];try{this.M.src=this.o}catch(a){this.v()}}};function eo(a){a=a||{};this.o=void 0!==a.anchor?a.anchor:[.5,.5];this.u=null;this.i=void 0!==a.anchorOrigin?a.anchorOrigin:"top-left";this.C=void 0!==a.anchorXUnits?a.anchorXUnits:"fraction";this.B=void 0!==a.anchorYUnits?a.anchorYUnits:"fraction";this.ra=void 0!==a.crossOrigin?a.crossOrigin:null;var b=void 0!==a.img?a.img:null,c=void 0!==a.imgSize?a.imgSize:null,d=a.src;xa(!(void 0!==d&&b),4);xa(!b||b&&c,5);void 0!==d&&d.length||!b||(d=b.src||w(b).toString());xa(void 0!==d&&0<d.length,6);var e=void 0!==
-a.src?0:2;this.j=void 0!==a.color?ed(a.color):null;var f=this.ra,g=this.j,h=zh.get(d,f,g);h||(h=new bo(b,d,c,f,e,g),zh.set(d,f,g,h));this.b=h;this.oa=void 0!==a.offset?a.offset:[0,0];this.c=void 0!==a.offsetOrigin?a.offsetOrigin:"top-left";this.S=null;this.D=void 0!==a.size?a.size:null;Xk.call(this,{opacity:void 0!==a.opacity?a.opacity:1,rotation:void 0!==a.rotation?a.rotation:0,scale:void 0!==a.scale?a.scale:1,snapToPixel:void 0!==a.snapToPixel?a.snapToPixel:!0,rotateWithView:void 0!==a.rotateWithView?
-a.rotateWithView:!1})}v(eo,Xk);k=eo.prototype;
-k.clone=function(){var a=this.Y(1);if(2===this.b.i)if("IMG"===a.tagName.toUpperCase())var b=a.cloneNode(!0);else{b=document.createElement("canvas");var c=b.getContext("2d");b.width=a.width;b.height=a.height;c.drawImage(a,0,0)}return new eo({anchor:this.o.slice(),anchorOrigin:this.i,anchorXUnits:this.C,anchorYUnits:this.B,crossOrigin:this.ra,color:this.j&&this.j.slice?this.j.slice():this.j||void 0,img:b?b:void 0,imgSize:b?this.b.a.slice():void 0,src:b?void 0:this.b.o,offset:this.oa.slice(),offsetOrigin:this.c,
-size:null!==this.D?this.D.slice():void 0,opacity:this.f,scale:this.a,snapToPixel:this.v,rotation:this.g,rotateWithView:this.l})};
-k.Hc=function(){if(this.u)return this.u;var a=this.o,b=this.ic();if("fraction"==this.C||"fraction"==this.B){if(!b)return null;a=this.o.slice();"fraction"==this.C&&(a[0]*=b[0]);"fraction"==this.B&&(a[1]*=b[1])}if("top-left"!=this.i){if(!b)return null;a===this.o&&(a=this.o.slice());if("top-right"==this.i||"bottom-right"==this.i)a[0]=-a[0]+b[0];if("bottom-left"==this.i||"bottom-right"==this.i)a[1]=-a[1]+b[1]}return this.u=a};k.Lo=function(){return this.j};k.Y=function(a){return this.b.Y(a)};k.ye=function(){return this.b.a};
-k.Ye=function(){return this.b.i};k.qg=function(){var a=this.b;if(!a.j)if(a.l){var b=a.a[0],c=a.a[1],d=jd(b,c);d.fillRect(0,0,b,c);a.j=d.canvas}else a.j=a.M;return a.j};k.Oc=function(){if(this.S)return this.S;var a=this.oa;if("top-left"!=this.c){var b=this.ic(),c=this.b.a;if(!b||!c)return null;a=a.slice();if("top-right"==this.c||"bottom-right"==this.c)a[0]=c[0]-b[0]-a[0];if("bottom-left"==this.c||"bottom-right"==this.c)a[1]=c[1]-b[1]-a[1]}return this.S=a};k.Mo=function(){return this.b.o};
-k.ic=function(){return this.D?this.D:this.b.a};k.Nh=function(a,b){return y(this.b,"change",a,b)};k.load=function(){this.b.load()};k.Bj=function(a,b){Kc(this.b,"change",a,b)};function fo(a){a=a||{};this.a=a.font;this.f=a.rotation;this.o=a.rotateWithView;this.b=a.scale;this.Ia=a.text;this.g=a.textAlign;this.j=a.textBaseline;this.Va=void 0!==a.fill?a.fill:new al({color:"#333"});this.Ya=void 0!==a.stroke?a.stroke:null;this.i=void 0!==a.offsetX?a.offsetX:0;this.c=void 0!==a.offsetY?a.offsetY:0}k=fo.prototype;
-k.clone=function(){return new fo({font:this.a,rotation:this.f,rotateWithView:this.o,scale:this.b,text:this.Na(),textAlign:this.g,textBaseline:this.j,fill:this.Fa()?this.Fa().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,offsetX:this.i,offsetY:this.c})};k.Nk=function(){return this.a};k.cl=function(){return this.i};k.dl=function(){return this.c};k.Fa=function(){return this.Va};k.Ro=function(){return this.o};k.So=function(){return this.f};k.To=function(){return this.b};k.Ga=function(){return this.Ya};
-k.Na=function(){return this.Ia};k.nl=function(){return this.g};k.ol=function(){return this.j};k.nj=function(a){this.a=a};k.sj=function(a){this.i=a};k.tj=function(a){this.c=a};k.pf=function(a){this.Va=a};k.Uo=function(a){this.f=a};k.Si=function(a){this.b=a};k.qf=function(a){this.Ya=a};k.xd=function(a){this.Ia=a};k.vj=function(a){this.g=a};k.hq=function(a){this.j=a};function go(a){a=a?a:{};Cm.call(this);ho||(io=[255,255,255,1],jo=new al({color:io}),ko=[20,2],lo=mo="pixels",no=[64,64],oo="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",po=.5,qo=new eo({anchor:ko,anchorOrigin:"bottom-left",anchorXUnits:mo,anchorYUnits:lo,crossOrigin:"anonymous",rotation:0,scale:po,size:no,src:oo}),ro="NO_IMAGE",so=new wj({color:io,width:1}),to=new wj({color:[51,51,51,1],width:2}),uo=new fo({font:"bold 16px Helvetica",fill:jo,stroke:to,scale:.8}),vo=new bl({fill:jo,
-image:qo,text:uo,stroke:so,zIndex:0}),ho=[vo]);this.defaultDataProjection=Tb("EPSG:4326");this.a=a.defaultStyle?a.defaultStyle:ho;this.c=void 0!==a.extractStyles?a.extractStyles:!0;this.j=void 0!==a.writeStyles?a.writeStyles:!0;this.b={};this.g=void 0!==a.showPointNames?a.showPointNames:!0}var ho,io,jo,ko,mo,lo,no,oo,po,qo,ro,so,to,uo,vo;v(go,Cm);
-var wo=["http://www.google.com/kml/ext/2.2"],xo=[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"],yo={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"};
-function zo(a,b){var c=[0,0],d="start";if(a.Y()){var e=a.Y().ye();null===e&&(e=no);2==e.length&&(d=a.Y().a,c[0]=d*e[0]/2,c[1]=-d*e[1]/2,d="left")}null!==a.Na()?(e=a.Na(),a=e.clone(),a.nj(e.a||uo.a),a.Si(e.b||uo.b),a.pf(e.Fa()||uo.Fa()),a.qf(e.Ga()||to)):a=uo.clone();a.xd(b);a.sj(c[0]);a.tj(c[1]);a.vj(d);return new bl({text:a})}
-function Ao(a,b,c,d,e){return function(){var f=e,g="";f&&this.V()&&(f="Point"===this.V().U());f&&(g=this.get("name"),f=f&&g);if(a)return f?(f=zo(a[0],g),a.concat(f)):a;if(b){var h=Bo(b,c,d);return f?(f=zo(h[0],g),h.concat(f)):h}return f?(f=zo(c[0],g),c.concat(f)):c}}function Bo(a,b,c){return Array.isArray(a)?a:"string"===typeof a?(!(a in c)&&"#"+a in c&&(a="#"+a),Bo(c[a],b,c)):b}
-function Co(a){a=kl(a,!1);if(a=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(a))return a=a[1],[parseInt(a.substr(6,2),16),parseInt(a.substr(4,2),16),parseInt(a.substr(2,2),16),parseInt(a.substr(0,2),16)/255]}function Do(a){a=kl(a,!1);for(var b=[],c=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i,d;d=c.exec(a);)b.push(parseFloat(d[1]),parseFloat(d[2]),d[3]?parseFloat(d[3]):0),a=a.substr(d[0].length);if(""===a)return b}
-function Eo(a){var b=kl(a,!1).trim();return a.baseURI&&"about:blank"!==a.baseURI?(new URL(b,a.baseURI)).href:b}function Fo(a){return Km(a)}function Go(a,b){return N(null,Ho,a,b)}function Io(a,b){if(b=N({A:[],Ej:[]},Jo,a,b)){a=b.A;b=b.Ej;var c;var d=0;for(c=Math.min(a.length,b.length);d<c;++d)a[4*d+3]=b[d];b=new O(null);b.ba("XYZM",a);return b}}function Ko(a,b){var c=N({},Lo,a,b);if(a=N(null,Mo,a,b))return b=new O(null),b.ba("XYZ",a),b.H(c),b}
-function No(a,b){var c=N({},Lo,a,b);if(a=N(null,Mo,a,b))return b=new D(null),b.ba("XYZ",a,[a.length]),b.H(c),b}
-function Oo(a,b){a=N([],Po,a,b);if(!a)return null;if(!a.length)return new tm(a);var c=!0,d=a[0].U(),e;var f=1;for(e=a.length;f<e;++f)if(b=a[f],b.U()!=d){c=!1;break}if(c)if("Point"==d){var g=a[0];c=g.ja;d=g.ga();f=1;for(e=a.length;f<e;++f)b=a[f],la(d,b.ga());g=new Q(null);g.ba(c,d);Qo(g,a)}else"LineString"==d?(g=new P(null),Nl(g,a),Qo(g,a)):"Polygon"==d?(g=new R(null),Pl(g,a),Qo(g,a)):"GeometryCollection"==d?g=new tm(a):xa(!1,37);else g=new tm(a);return g}
-function Ro(a,b){var c=N({},Lo,a,b);if(a=N(null,Mo,a,b))return b=new C(null),b.ba("XYZ",a),b.H(c),b}function So(a,b){var c=N({},Lo,a,b);if((a=N([null],To,a,b))&&a[0]){b=new D(null);var d=a[0],e=[d.length],f;var g=1;for(f=a.length;g<f;++g)la(d,a[g]),e.push(d.length);b.ba("XYZ",d,e);b.H(c);return b}}
-function Uo(a,b){b=N({},Vo,a,b);if(!b)return null;a="fillStyle"in b?b.fillStyle:jo;var c=b.fill;void 0===c||c||(a=null);c="imageStyle"in b?b.imageStyle:qo;c==ro&&(c=void 0);var d="textStyle"in b?b.textStyle:uo,e="strokeStyle"in b?b.strokeStyle:so;b=b.outline;void 0===b||b||(e=null);return[new bl({fill:a,image:c,stroke:e,text:d,zIndex:void 0})]}
-function Qo(a,b){var c=b.length,d=Array(b.length),e=Array(b.length),f,g;var h=g=!1;for(f=0;f<c;++f){var l=b[f];d[f]=l.get("extrude");e[f]=l.get("altitudeMode");h=h||void 0!==d[f];g=g||e[f]}h&&a.set("extrude",d);g&&a.set("altitudeMode",e)}function Wo(a,b){Al(Xo,a,b)}function Yo(a,b){Al(Zo,a,b)}
-var $o=K(xo,{displayName:I(S),value:I(S)}),Xo=K(xo,{Data:function(a,b){var c=a.getAttribute("name");Al($o,a,b);a=b[b.length-1];null!==c?a[c]=a.value:null!==a.displayName&&(a[a.displayName]=a.value)},SchemaData:function(a,b){Al(ap,a,b)}}),Zo=K(xo,{LatLonAltBox:function(a,b){if(a=N({},bp,a,b))b=b[b.length-1],b.extent=[parseFloat(a.west),parseFloat(a.south),parseFloat(a.east),parseFloat(a.north)],b.altitudeMode=a.altitudeMode,b.minAltitude=parseFloat(a.minAltitude),b.maxAltitude=parseFloat(a.maxAltitude)},
-Lod:function(a,b){if(a=N({},cp,a,b))b=b[b.length-1],b.minLodPixels=parseFloat(a.minLodPixels),b.maxLodPixels=parseFloat(a.maxLodPixels),b.minFadeExtent=parseFloat(a.minFadeExtent),b.maxFadeExtent=parseFloat(a.maxFadeExtent)}}),bp=K(xo,{altitudeMode:I(S),minAltitude:I(Km),maxAltitude:I(Km),north:I(Km),south:I(Km),east:I(Km),west:I(Km)}),cp=K(xo,{minLodPixels:I(Km),maxLodPixels:I(Km),minFadeExtent:I(Km),maxFadeExtent:I(Km)}),Lo=K(xo,{extrude:I(Hm),altitudeMode:I(S)}),Ho=K(xo,{coordinates:sl(Do)}),To=
-K(xo,{innerBoundaryIs:function(a,b){(a=N(void 0,dp,a,b))&&b[b.length-1].push(a)},outerBoundaryIs:function(a,b){(a=N(void 0,ep,a,b))&&(b[b.length-1][0]=a)}}),Jo=K(xo,{when:function(a,b){b=b[b.length-1].Ej;a=kl(a,!1);a=Date.parse(a);b.push(isNaN(a)?0:a)}},K(wo,{coord:function(a,b){b=b[b.length-1].A;a=kl(a,!1);(a=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(a))?b.push(parseFloat(a[1]),parseFloat(a[2]),parseFloat(a[3]),
-0):b.push(0,0,0,0)}})),Mo=K(xo,{coordinates:sl(Do)}),fp=K(xo,{href:I(Eo)},K(wo,{x:I(Km),y:I(Km),w:I(Km),h:I(Km)})),gp=K(xo,{Icon:I(function(a,b){return(a=N({},fp,a,b))?a:null}),heading:I(Km),hotSpot:I(function(a){var b=a.getAttribute("xunits"),c=a.getAttribute("yunits");var d="insetPixels"!==b?"insetPixels"!==c?"bottom-left":"top-left":"insetPixels"!==c?"bottom-right":"top-right";return{x:parseFloat(a.getAttribute("x")),Xg:yo[b],y:parseFloat(a.getAttribute("y")),Yg:yo[c],origin:d}}),scale:I(Fo)}),
-dp=K(xo,{LinearRing:sl(Go)}),hp=K(xo,{color:I(Co),scale:I(Fo)}),ip=K(xo,{color:I(Co),width:I(Km)}),Po=K(xo,{LineString:rl(Ko),LinearRing:rl(No),MultiGeometry:rl(Oo),Point:rl(Ro),Polygon:rl(So)}),jp=K(wo,{Track:rl(Io)}),lp=K(xo,{ExtendedData:Wo,Region:Yo,Link:function(a,b){Al(kp,a,b)},address:I(S),description:I(S),name:I(S),open:I(Hm),phoneNumber:I(S),visibility:I(Hm)}),kp=K(xo,{href:I(Eo)}),ep=K(xo,{LinearRing:sl(Go)}),mp=K(xo,{Style:I(Uo),key:I(S),styleUrl:I(Eo)}),op=K(xo,{ExtendedData:Wo,Region:Yo,
-MultiGeometry:I(Oo,"geometry"),LineString:I(Ko,"geometry"),LinearRing:I(No,"geometry"),Point:I(Ro,"geometry"),Polygon:I(So,"geometry"),Style:I(Uo),StyleMap:function(a,b){if(a=N(void 0,np,a,b))b=b[b.length-1],Array.isArray(a)?b.Style=a:"string"===typeof a?b.styleUrl=a:xa(!1,38)},address:I(S),description:I(S),name:I(S),open:I(Hm),phoneNumber:I(S),styleUrl:I(Eo),visibility:I(Hm)},K(wo,{MultiTrack:I(function(a,b){if(a=N([],jp,a,b))return b=new P(null),Nl(b,a),b},"geometry"),Track:I(Io,"geometry")})),
-pp=K(xo,{color:I(Co),fill:I(Hm),outline:I(Hm)}),ap=K(xo,{SimpleData:function(a,b){var c=a.getAttribute("name");null!==c&&(a=S(a),b[b.length-1][c]=a)}}),Vo=K(xo,{IconStyle:function(a,b){if(a=N({},gp,a,b)){b=b[b.length-1];var c="Icon"in a?a.Icon:{},d=!("Icon"in a)||0<Object.keys(c).length,e,f=c.href;f?e=f:d&&(e=oo);var f="bottom-left",g=a.hotSpot;if(g){var h=[g.x,g.y];var l=g.Xg;var m=g.Yg;f=g.origin}else e===oo?(h=ko,l=mo,m=lo):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(e)&&(h=[.5,0],m=l="fraction");
-var n,g=c.x,p=c.y;void 0!==g&&void 0!==p&&(n=[g,p]);var q,g=c.w,c=c.h;void 0!==g&&void 0!==c&&(q=[g,c]);var r,c=a.heading;void 0!==c&&(r=Ha(c));a=a.scale;d?(e==oo&&(q=no,void 0===a&&(a=po)),e=new eo({anchor:h,anchorOrigin:f,anchorXUnits:l,anchorYUnits:m,crossOrigin:"anonymous",offset:n,offsetOrigin:"bottom-left",rotation:r,scale:a,size:q,src:e}),b.imageStyle=e):b.imageStyle=ro}},LabelStyle:function(a,b){(a=N({},hp,a,b))&&(b[b.length-1].textStyle=new fo({fill:new al({color:"color"in a?a.color:io}),
-scale:a.scale}))},LineStyle:function(a,b){(a=N({},ip,a,b))&&(b[b.length-1].strokeStyle=new wj({color:"color"in a?a.color:io,width:"width"in a?a.width:1}))},PolyStyle:function(a,b){if(a=N({},pp,a,b)){b=b[b.length-1];b.fillStyle=new al({color:"color"in a?a.color:io});var c=a.fill;void 0!==c&&(b.fill=c);a=a.outline;void 0!==a&&(b.outline=a)}}}),np=K(xo,{Pair:function(a,b){if(a=N({},mp,a,b)){var c=a.key;c&&"normal"==c&&((c=a.styleUrl)&&(b[b.length-1]=c),(a=a.Style)&&(b[b.length-1]=a))}}});k=go.prototype;
-k.vg=function(a,b){var c=K(xo,{Document:ql(this.vg,this),Folder:ql(this.vg,this),Placemark:rl(this.Dg,this),Style:this.Jp.bind(this),StyleMap:this.Ip.bind(this)});if(a=N([],c,a,b,this))return a};k.Dg=function(a,b){var c=N({geometry:null},op,a,b);if(c){var d=new H;a=a.getAttribute("id");null!==a&&d.jc(a);b=b[0];(a=c.geometry)&&Hl(a,!1,b);d.Ra(a);delete c.geometry;this.c&&d.hg(Ao(c.Style,c.styleUrl,this.a,this.b,this.g));delete c.Style;d.H(c);return d}};
-k.Jp=function(a,b){var c=a.getAttribute("id");null!==c&&(b=Uo(a,b))&&(a=a.baseURI&&"about:blank"!==a.baseURI?(new URL("#"+c,a.baseURI)).href:"#"+c,this.b[a]=b)};k.Ip=function(a,b){var c=a.getAttribute("id");null!==c&&(b=N(void 0,np,a,b))&&(a=a.baseURI&&"about:blank"!==a.baseURI?(new URL("#"+c,a.baseURI)).href:"#"+c,this.b[a]=b)};k.xg=function(a,b){return ja(xo,a.namespaceURI)?(a=this.Dg(a,[Fl(this,a,b)]))?a:null:null};
-k.zc=function(a,b){if(!ja(xo,a.namespaceURI))return[];var c=a.localName;if("Document"==c||"Folder"==c)return(c=this.vg(a,[Fl(this,a,b)]))?c:[];if("Placemark"==c)return(b=this.Dg(a,[Fl(this,a,b)]))?[b]:[];if("kml"==c){c=[];for(a=a.firstElementChild;a;a=a.nextElementSibling){var d=this.zc(a,b);d&&la(c,d)}return c}return[]};k.Cp=function(a){if(ml(a))return qp(this,a);if(nl(a))return rp(this,a);if("string"===typeof a)return a=pl(a),qp(this,a)};
-function qp(a,b){for(b=b.firstChild;b;b=b.nextSibling)if(b.nodeType==Node.ELEMENT_NODE){var c=rp(a,b);if(c)return c}}function rp(a,b){var c;for(c=b.firstElementChild;c;c=c.nextElementSibling)if(ja(xo,c.namespaceURI)&&"name"==c.localName)return S(c);for(c=b.firstElementChild;c;c=c.nextElementSibling)if(b=c.localName,ja(xo,c.namespaceURI)&&("Document"==b||"Folder"==b||"Placemark"==b||"kml"==b)&&(b=rp(a,c)))return b}
-k.Dp=function(a){var b=[];ml(a)?la(b,sp(this,a)):nl(a)?la(b,tp(this,a)):"string"===typeof a&&(a=pl(a),la(b,sp(this,a)));return b};function sp(a,b){var c=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&la(c,tp(a,b));return c}
-function tp(a,b){var c,d=[];for(c=b.firstElementChild;c;c=c.nextElementSibling)if(ja(xo,c.namespaceURI)&&"NetworkLink"==c.localName){var e=N({},lp,c,[]);d.push(e)}for(c=b.firstElementChild;c;c=c.nextElementSibling)b=c.localName,!ja(xo,c.namespaceURI)||"Document"!=b&&"Folder"!=b&&"kml"!=b||la(d,tp(a,c));return d}k.Gp=function(a){var b=[];ml(a)?la(b,up(this,a)):nl(a)?la(b,this.lf(a)):"string"===typeof a&&(a=pl(a),la(b,up(this,a)));return b};
-function up(a,b){var c=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&la(c,a.lf(b));return c}k.lf=function(a){var b,c=[];for(b=a.firstElementChild;b;b=b.nextElementSibling)if(ja(xo,b.namespaceURI)&&"Region"==b.localName){var d=N({},Zo,b,[]);c.push(d)}for(b=a.firstElementChild;b;b=b.nextElementSibling)a=b.localName,!ja(xo,b.namespaceURI)||"Document"!=a&&"Folder"!=a&&"kml"!=a||la(c,this.lf(b));return c};
-function vp(a,b){b=ed(b);b=[255*(4==b.length?b[3]:1),b[2],b[1],b[0]];var c;for(c=0;4>c;++c){var d=parseInt(b[c],10).toString(16);b[c]=1==d.length?"0"+d:d}Pm(a,b.join(""))}function wp(a,b,c){a={node:a};var d=b.U();if("GeometryCollection"==d){var e=b.Vf();var f=xp}else"MultiPoint"==d?(e=b.Zd(),f=yp):"MultiLineString"==d?(e=b.gd(),f=zp):"MultiPolygon"==d?(e=b.Td(),f=Ap):xa(!1,39);Bl(a,Bp,f,e,c)}function Cp(a,b,c){Bl({node:a},Dp,Ep,[b],c)}
-function Fp(a,b,c){var d={node:a};b.a&&a.setAttribute("id",b.a);a=b.N();var e={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};e[b.c]=1;var f=Object.keys(a||{}).sort().filter(function(a){return!e[a]});if(0<f.length){var g=zl(a,f);Bl(d,Gp,Hp,[{names:f,values:g}],c)}if(f=b.Lc())if(f=f.call(b,0))f=Array.isArray(f)?f[0]:f,this.j&&(a.Style=f),(f=f.Na())&&(a.name=f.Na());f=Ip[c[c.length-1].node.namespaceURI];a=zl(a,f);Bl(d,Gp,yl,a,c,f);a=c[0];(b=b.V())&&(b=Hl(b,!0,a));Bl(d,
-Gp,xp,[b],c)}function Jp(a,b,c){var d=b.ga();a={node:a};a.layout=b.ja;a.stride=b.qa();Bl(a,Kp,Lp,[d],c)}function Mp(a,b,c){b=b.Sd();var d=b.shift();a={node:a};Bl(a,Np,Op,b,c);Bl(a,Np,Pp,[d],c)}function Qp(a,b){Qm(a,Math.round(1E6*b)/1E6)}
-var Rp=K(xo,["Document","Placemark"]),Up=K(xo,{Document:J(function(a,b,c){Bl({node:a},Sp,Tp,b,c,void 0,this)}),Placemark:J(Fp)}),Sp=K(xo,{Placemark:J(Fp)}),Vp=K(xo,{Data:J(function(a,b,c){a.setAttribute("name",b.name);a={node:a};b=b.value;"object"==typeof b?(null!==b&&b.displayName&&Bl(a,Vp,yl,[b.displayName],c,["displayName"]),null!==b&&b.value&&Bl(a,Vp,yl,[b.value],c,["value"])):Bl(a,Vp,yl,[b],c,["value"])}),value:J(function(a,b){Pm(a,b)}),displayName:J(function(a,b){a.appendChild(il.createCDATASection(b))})}),
-Wp={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},Xp=K(xo,["href"],K(wo,["x","y","w","h"])),Yp=K(xo,{href:J(Pm)},K(wo,{x:J(Qm),y:J(Qm),w:J(Qm),h:J(Qm)})),Zp=K(xo,["scale","heading","Icon","hotSpot"]),aq=K(xo,{Icon:J(function(a,b,c){a={node:a};var d=Xp[c[c.length-1].node.namespaceURI],e=zl(b,d);Bl(a,Yp,yl,e,c,d);d=Xp[wo[0]];e=zl(b,d);Bl(a,Yp,
-$p,e,c,d)}),heading:J(Qm),hotSpot:J(function(a,b){a.setAttribute("x",b.x);a.setAttribute("y",b.y);a.setAttribute("xunits",b.Xg);a.setAttribute("yunits",b.Yg)}),scale:J(Qp)}),bq=K(xo,["color","scale"]),cq=K(xo,{color:J(vp),scale:J(Qp)}),dq=K(xo,["color","width"]),eq=K(xo,{color:J(vp),width:J(Qm)}),Dp=K(xo,{LinearRing:J(Jp)}),Bp=K(xo,{LineString:J(Jp),Point:J(Jp),Polygon:J(Mp),GeometryCollection:J(wp)}),Ip=K(xo,"name open visibility address phoneNumber description styleUrl Style".split(" ")),Gp=K(xo,
-{ExtendedData:J(function(a,b,c){a={node:a};var d=b.names;b=b.values;for(var e=d.length,f=0;f<e;f++)Bl(a,Vp,fq,[{name:d[f],value:b[f]}],c)}),MultiGeometry:J(wp),LineString:J(Jp),LinearRing:J(Jp),Point:J(Jp),Polygon:J(Mp),Style:J(function(a,b,c){a={node:a};var d={},e=b.Fa(),f=b.Ga(),g=b.Y();b=b.Na();g instanceof eo&&(d.IconStyle=g);b&&(d.LabelStyle=b);f&&(d.LineStyle=f);e&&(d.PolyStyle=e);b=gq[c[c.length-1].node.namespaceURI];d=zl(d,b);Bl(a,hq,yl,d,c,b)}),address:J(Pm),description:J(Pm),name:J(Pm),
-open:J(Om),phoneNumber:J(Pm),styleUrl:J(Pm),visibility:J(Om)}),Kp=K(xo,{coordinates:J(function(a,b,c){c=c[c.length-1];var d=c.layout;c=c.stride;var e;"XY"==d||"XYM"==d?e=2:"XYZ"==d||"XYZM"==d?e=3:xa(!1,34);var f,g=b.length,h="";if(0<g){h+=b[0];for(d=1;d<e;++d)h+=","+b[d];for(f=c;f<g;f+=c)for(h+=" "+b[f],d=1;d<e;++d)h+=","+b[f+d]}Pm(a,h)})}),Np=K(xo,{outerBoundaryIs:J(Cp),innerBoundaryIs:J(Cp)}),iq=K(xo,{color:J(vp)}),gq=K(xo,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),hq=K(xo,{IconStyle:J(function(a,
-b,c){a={node:a};var d={},e=b.ic(),f=b.ye(),g={href:b.b.o};if(e){g.w=e[0];g.h=e[1];var h=b.Hc(),l=b.Oc();l&&f&&l[0]&&l[1]!==e[1]&&(g.x=l[0],g.y=f[1]-(l[1]+e[1]));h&&h[0]&&h[1]!==e[1]&&(d.hotSpot={x:h[0],Xg:"pixels",y:e[1]-h[1],Yg:"pixels"})}d.Icon=g;e=b.a;1!==e&&(d.scale=e);(b=b.g)&&(d.heading=b);b=Zp[c[c.length-1].node.namespaceURI];d=zl(d,b);Bl(a,aq,yl,d,c,b)}),LabelStyle:J(function(a,b,c){a={node:a};var d={},e=b.Fa();e&&(d.color=e.b);(b=b.b)&&1!==b&&(d.scale=b);b=bq[c[c.length-1].node.namespaceURI];
-d=zl(d,b);Bl(a,cq,yl,d,c,b)}),LineStyle:J(function(a,b,c){a={node:a};var d=dq[c[c.length-1].node.namespaceURI];b=zl({color:b.a,width:b.c},d);Bl(a,eq,yl,b,c,d)}),PolyStyle:J(function(a,b,c){Bl({node:a},iq,jq,[b.b],c)})});function $p(a,b,c){return jl(wo[0],"gx:"+c)}function Tp(a,b){return jl(b[b.length-1].node.namespaceURI,"Placemark")}function xp(a,b){if(a)return jl(b[b.length-1].node.namespaceURI,Wp[a.U()])}
-var jq=wl("color"),Lp=wl("coordinates"),fq=wl("Data"),Hp=wl("ExtendedData"),Op=wl("innerBoundaryIs"),yp=wl("Point"),zp=wl("LineString"),Ep=wl("LinearRing"),Ap=wl("Polygon"),Pp=wl("outerBoundaryIs");
-go.prototype.Xb=function(a,b){b=Gl(this,b);var c=jl(xo[4],"kml");c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:gx",wo[0]);c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var d={node:c},e={};1<a.length?e.Document=a:1==a.length&&(e.Placemark=a[0]);a=Rp[c.namespaceURI];
-e=zl(e,a);Bl(d,Up,yl,e,[b],a,this);return c};Fj.Dd=function(){};
-(function(a){function b(a){this.lc=ArrayBuffer.isView&&ArrayBuffer.isView(a)?a:new Uint8Array(a||0);this.type=this.ea=0;this.length=this.lc.length}function c(a,b,c){var e=c.lc;var f=e[c.ea++];var g=(f&112)>>4;if(128>f)return d(a,g,b);f=e[c.ea++];g|=(f&127)<<3;if(128>f)return d(a,g,b);f=e[c.ea++];g|=(f&127)<<10;if(128>f)return d(a,g,b);f=e[c.ea++];g|=(f&127)<<17;if(128>f)return d(a,g,b);f=e[c.ea++];g|=(f&127)<<24;if(128>f)return d(a,g,b);f=e[c.ea++];if(128>f)return d(a,g|(f&1)<<31,b);throw Error("Expected varint not more than 10 bytes");
-}function d(a,b,c){return c?4294967296*b+(a>>>0):4294967296*(b>>>0)+(a>>>0)}var e={read:function(a,b,c,d,e){var f=8*e-d-1;var g=(1<<f)-1,h=g>>1,l=-7;e=c?e-1:0;var m=c?-1:1,x=a[b+e];e+=m;c=x&(1<<-l)-1;x>>=-l;for(l+=f;0<l;c=256*c+a[b+e],e+=m,l-=8);f=c&(1<<-l)-1;c>>=-l;for(l+=d;0<l;f=256*f+a[b+e],e+=m,l-=8);if(0===c)c=1-h;else{if(c===g)return f?NaN:Infinity*(x?-1:1);f+=Math.pow(2,d);c-=h}return(x?-1:1)*f*Math.pow(2,c-d)},write:function(a,b,c,d,e,n){var f,g=8*n-e-1,h=(1<<g)-1,l=h>>1,m=23===e?Math.pow(2,
--24)-Math.pow(2,-77):0;n=d?0:n-1;var B=d?1:-1,E=0>b||0===b&&0>1/b?1:0;b=Math.abs(b);isNaN(b)||Infinity===b?(b=isNaN(b)?1:0,d=h):(d=Math.floor(Math.log(b)/Math.LN2),1>b*(f=Math.pow(2,-d))&&(d--,f*=2),b=1<=d+l?b+m/f:b+m*Math.pow(2,1-l),2<=b*f&&(d++,f/=2),d+l>=h?(b=0,d=h):1<=d+l?(b=(b*f-1)*Math.pow(2,e),d+=l):(b=b*Math.pow(2,l-1)*Math.pow(2,e),d=0));for(;8<=e;a[c+n]=b&255,n+=B,b/=256,e-=8);d=d<<e|b;for(g+=e;0<g;a[c+n]=d&255,n+=B,d/=256,g-=8);a[c+n-B]|=128*E}};b.c=0;b.i=1;b.b=2;b.a=5;b.prototype={Ag:function(a,
-b,c){for(c=c||this.length;this.ea<c;){var d=this.Ka(),e=d>>3,f=this.ea;this.type=d&7;a(e,b,this);this.ea===f&&this.mq(d)}return b},yp:function(){var a=e.read(this.lc,this.ea,!0,23,4);this.ea+=4;return a},up:function(){var a=e.read(this.lc,this.ea,!0,52,8);this.ea+=8;return a},Ka:function(a){var b=this.lc;var d=b[this.ea++];var e=d&127;if(128>d)return e;d=b[this.ea++];e|=(d&127)<<7;if(128>d)return e;d=b[this.ea++];e|=(d&127)<<14;if(128>d)return e;d=b[this.ea++];e|=(d&127)<<21;if(128>d)return e;d=b[this.ea];
-return c(e|(d&15)<<28,a,this)},Kp:function(){return this.Ka(!0)},ce:function(){var a=this.Ka();return 1===a%2?(a+1)/-2:a/2},sp:function(){return!!this.Ka()},Gg:function(){for(var a=this.Ka()+this.ea,b=this.lc,c="",d=this.ea;d<a;){var e=b[d],n=null,p=239<e?4:223<e?3:191<e?2:1;if(d+p>a)break;if(1===p)128>e&&(n=e);else if(2===p){var q=b[d+1];128===(q&192)&&(n=(e&31)<<6|q&63,127>=n&&(n=null))}else if(3===p){q=b[d+1];var r=b[d+2];128===(q&192)&&128===(r&192)&&(n=(e&15)<<12|(q&63)<<6|r&63,2047>=n||55296<=
-n&&57343>=n)&&(n=null)}else if(4===p){q=b[d+1];r=b[d+2];var u=b[d+3];128===(q&192)&&128===(r&192)&&128===(u&192)&&(n=(e&15)<<18|(q&63)<<12|(r&63)<<6|u&63,65535>=n||1114112<=n)&&(n=null)}null===n?(n=65533,p=1):65535<n&&(n-=65536,c+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023);c+=String.fromCharCode(n);d+=p}this.ea=a;return c},mq:function(a){a&=7;if(a===b.c)for(;127<this.lc[this.ea++];);else if(a===b.b)this.ea=this.Ka()+this.ea;else if(a===b.a)this.ea+=4;else if(a===b.i)this.ea+=8;else throw Error("Unimplemented type: "+
-a);}};a["default"]=b})(Fj.Dd=Fj.Dd||{});Fj.Dd=Fj.Dd.default;Fj.xf={};Fj.xf.Bf=function(){};
-(function(a){function b(a,b){this.layers=a.Ag(l,{},b)}function c(a,b){this.x=a;this.y=b}function d(a,b,c,d,f){this.properties={};this.extent=c;this.type=0;this.Cc=a;this.Ef=-1;this.ne=d;this.pe=f;a.Ag(e,this,b)}function e(a,b,c){if(1==a)b.id=c.Ka();else if(2==a)for(a=c.Ka()+c.ea;c.ea<a;){var d=b.ne[c.Ka()],e=b.pe[c.Ka()];b.properties[d]=e}else 3==a?b.type=c.Ka():4==a&&(b.Ef=c.ea)}function f(a,b){this.version=1;this.name=null;this.extent=4096;this.length=0;this.Cc=a;this.ne=[];this.pe=[];this.me=[];
-a.Ag(g,this,b);this.length=this.me.length}function g(a,b,c){15===a?b.version=c.Ka():1===a?b.name=c.Gg():5===a?b.extent=c.Ka():2===a?b.me.push(c.ea):3===a?b.ne.push(c.Gg()):4===a&&b.pe.push(h(c))}function h(a){for(var b=null,c=a.Ka()+a.ea;a.ea<c;)b=a.Ka()>>3,b=1===b?a.Gg():2===b?a.yp():3===b?a.up():4===b?a.Kp():5===b?a.Ka():6===b?a.ce():7===b?a.sp():null;return b}function l(a,b,c){3===a&&(a=new m(c,c.Ka()+c.ea),a.length&&(b[a.name]=a))}c.prototype={clone:function(){return new c(this.x,this.y)},add:function(a){return this.clone().Yj(a)},
-rotate:function(a){return this.clone().hk(a)},round:function(){return this.clone().ik()},angle:function(){return Math.atan2(this.y,this.x)},Yj:function(a){this.x+=a.x;this.y+=a.y;return this},hk:function(a){var b=Math.cos(a);a=Math.sin(a);var c=a*this.x+b*this.y;this.x=b*this.x-a*this.y;this.y=c;return this},ik:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}};c.Kq=function(a){return a instanceof c?a:Array.isArray(a)?new c(a[0],a[1]):a};d.b=["Unknown","Point","LineString",
-"Polygon"];d.prototype.Oh=function(){var a=this.Cc;a.ea=this.Ef;for(var b=a.Ka()+a.ea,d=1,e=0,f=0,g=0,h=[],l;a.ea<b;)if(e||(e=a.Ka(),d=e&7,e>>=3),e--,1===d||2===d)f+=a.ce(),g+=a.ce(),1===d&&(l&&h.push(l),l=[]),l.push(new c(f,g));else if(7===d)l&&l.push(l[0].clone());else throw Error("unknown command "+d);l&&h.push(l);return h};d.prototype.bbox=function(){var a=this.Cc;a.ea=this.Ef;for(var b=a.Ka()+a.ea,c=1,d=0,e=0,f=0,g=Infinity,h=-Infinity,l=Infinity,m=-Infinity;a.ea<b;)if(d||(d=a.Ka(),c=d&7,d>>=
-3),d--,1===c||2===c)e+=a.ce(),f+=a.ce(),e<g&&(g=e),e>h&&(h=e),f<l&&(l=f),f>m&&(m=f);else if(7!==c)throw Error("unknown command "+c);return[g,l,h,m]};var m=f;f.prototype.feature=function(a){if(0>a||a>=this.me.length)throw Error("feature index out of bounds");this.Cc.ea=this.me[a];a=this.Cc.Ka()+this.Cc.ea;return new d(this.Cc,a,this.extent,this.ne,this.pe)};var n=m;a["default"]={Bf:b,Wj:d,Xj:n};a.Bf=b;a.Wj=d;a.Xj=n})(Fj.xf=Fj.xf||{});function kq(a,b,c,d,e){this.g=e;this.i=a;this.b=b;this.f=c;this.c=d}k=kq.prototype;k.get=function(a){return this.c[a]};k.Bb=function(){return this.f};k.G=function(){this.a||(this.a="Point"===this.i?Za(this.b):$a(this.b,0,this.b.length,2));return this.a};k.Wn=function(){return this.g};k.ec=function(){return this.b};k.ga=kq.prototype.ec;k.V=function(){return this};k.Xn=function(){return this.c};k.Vd=kq.prototype.V;k.qa=function(){return 2};k.Lc=ua;k.U=function(){return this.i};function lq(a){El.call(this);a=a?a:{};this.defaultDataProjection=new Bb({code:"",units:"tile-pixels"});this.b=a.featureClass?a.featureClass:kq;this.a=a.geometryName;this.i=a.layerName?a.layerName:"layer";this.c=a.layers?a.layers:null}v(lq,El);k=lq.prototype;k.U=function(){return"arraybuffer"};
-k.Oa=function(a,b){var c=this.c;a=new Fj.Dd(a);a=new Fj.xf.Bf(a);var d=[],e=this.b,f;for(f in a.layers)if(!c||-1!=c.indexOf(f)){var g=a.layers[f];for(var h=0,l=g.length;h<l;++h){if(e===kq){var m=void 0;var n=g.feature(h),p=f,q=n.Oh(),r=[],u=[];mq(q,u,r);var x=n.type;1===x?m=1===q.length?"Point":"MultiPoint":2===x?m=1===q.length?"LineString":"MultiLineString":3===x&&(m="Polygon");q=n.properties;q[this.i]=p;m=new this.b(m,u,r,q,n.id)}else{x=g.feature(h);u=f;r=b;m=new this.b;n=x.id;p=x.properties;p[this.i]=
-u;this.a&&m.Tc(this.a);u=void 0;q=x.type;if(0===q)u=null;else{var x=x.Oh(),B=[],E=[];mq(x,E,B);1===q?u=1===x.length?new C(null):new Q(null):2===q?1===x.length?u=new O(null):u=new P(null):3===q&&(u=new D(null));u.ba("XY",E,B)}r=Hl(u,!1,Gl(this,r));m.Ra(r);m.jc(n);m.H(p)}d.push(m)}}return d};k.kb=function(){return this.defaultDataProjection};k.mn=function(a){this.c=a};
-function mq(a,b,c){for(var d=0,e=0,f=a.length;e<f;++e){var g=a[e],h;var l=0;for(h=g.length;l<h;++l){var m=g[l];b.push(m.x,m.y)}d+=2*l;c.push(d)}}k.Tb=function(){};k.Sc=function(){};k.Bd=function(){};k.$c=function(){};k.Wb=function(){};function nq(){Cm.call(this);this.defaultDataProjection=Tb("EPSG:4326")}v(nq,Cm);function oq(a,b){b[b.length-1].fe[a.getAttribute("k")]=a.getAttribute("v")}
-var pq=[null],qq=K(pq,{nd:function(a,b){b[b.length-1].md.push(a.getAttribute("ref"))},tag:oq}),sq=K(pq,{node:function(a,b){var c=b[0],d=b[b.length-1],e=a.getAttribute("id"),f=[parseFloat(a.getAttribute("lon")),parseFloat(a.getAttribute("lat"))];d.Sh[e]=f;a=N({fe:{}},rq,a,b);wb(a.fe)||(f=new C(f),Hl(f,!1,c),c=new H(f),c.jc(e),c.H(a.fe),d.features.push(c))},way:function(a,b){var c=b[0],d=a.getAttribute("id");a=N({md:[],fe:{}},qq,a,b);b=b[b.length-1];for(var e=[],f=0,g=a.md.length;f<g;f++)la(e,b.Sh[a.md[f]]);
-a.md[0]==a.md[a.md.length-1]?(f=new D(null),f.ba("XY",e,[e.length])):(f=new O(null),f.ba("XY",e));Hl(f,!1,c);c=new H(f);c.jc(d);c.H(a.fe);b.features.push(c)}}),rq=K(pq,{tag:oq});nq.prototype.zc=function(a,b){b=Fl(this,a,b);return"osm"==a.localName&&(a=N({Sh:{},features:[]},sq,a,[b]),a.features)?a.features:[]};nq.prototype.Vg=function(){};nq.prototype.Xb=function(){};nq.prototype.ie=function(){};function tq(a){return a.getAttributeNS("http://www.w3.org/1999/xlink","href")};function uq(){}uq.prototype.read=function(a){return ml(a)?this.a(a):nl(a)?this.b(a):"string"===typeof a?(a=pl(a),this.a(a)):null};function vq(){}v(vq,uq);vq.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};vq.prototype.b=function(a){return(a=N({},wq,a,[]))?a:null};
-var xq=[null,"http://www.opengis.net/ows/1.1"],wq=K(xq,{ServiceIdentification:I(function(a,b){return N({},yq,a,b)}),ServiceProvider:I(function(a,b){return N({},zq,a,b)}),OperationsMetadata:I(function(a,b){return N({},Aq,a,b)})}),Cq=K(xq,{DeliveryPoint:I(S),City:I(S),AdministrativeArea:I(S),PostalCode:I(S),Country:I(S),ElectronicMailAddress:I(S)}),Dq=K(xq,{Value:tl(function(a){return S(a)})}),Eq=K(xq,{AllowedValues:I(function(a,b){return N({},Dq,a,b)})}),Gq=K(xq,{Phone:I(function(a,b){return N({},
-Fq,a,b)}),Address:I(function(a,b){return N({},Cq,a,b)})}),Iq=K(xq,{HTTP:I(function(a,b){return N({},Hq,a,b)})}),Hq=K(xq,{Get:tl(function(a,b){var c=tq(a);if(c)return N({href:c},Jq,a,b)}),Post:void 0}),Kq=K(xq,{DCP:I(function(a,b){return N({},Iq,a,b)})}),Aq=K(xq,{Operation:function(a,b){var c=a.getAttribute("name");(a=N({},Kq,a,b))&&(b[b.length-1][c]=a)}}),Fq=K(xq,{Voice:I(S),Facsimile:I(S)}),Jq=K(xq,{Constraint:tl(function(a,b){var c=a.getAttribute("name");if(c)return N({name:c},Eq,a,b)})}),Lq=K(xq,
-{IndividualName:I(S),PositionName:I(S),ContactInfo:I(function(a,b){return N({},Gq,a,b)})}),yq=K(xq,{Title:I(S),ServiceTypeVersion:I(S),ServiceType:I(S)}),zq=K(xq,{ProviderName:I(S),ProviderSite:I(tq),ServiceContact:I(function(a,b){return N({},Lq,a,b)})});function Mq(a,b,c,d){var e;void 0!==d?e=d:e=[];for(var f=d=0;f<b;){var g=a[f++];e[d++]=a[f++];e[d++]=g;for(g=2;g<c;++g)e[d++]=a[f++]}e.length=d};function Nq(a){a=a?a:{};El.call(this);this.defaultDataProjection=Tb("EPSG:4326");this.b=a.factor?a.factor:1E5;this.a=a.geometryLayout?a.geometryLayout:"XY"}v(Nq,Vn);function Oq(a,b,c){var d,e=Array(b);for(d=0;d<b;++d)e[d]=0;var f;var g=0;for(f=a.length;g<f;)for(d=0;d<b;++d,++g){var h=a[g],l=h-e[d];e[d]=h;a[g]=l}return Pq(a,c?c:1E5)}function Qq(a,b,c){var d,e=Array(b);for(d=0;d<b;++d)e[d]=0;a=Rq(a,c?c:1E5);var f;c=0;for(f=a.length;c<f;)for(d=0;d<b;++d,++c)e[d]+=a[c],a[c]=e[d];return a}
-function Pq(a,b){b=b?b:1E5;var c;var d=0;for(c=a.length;d<c;++d)a[d]=Math.round(a[d]*b);b=0;for(d=a.length;b<d;++b)c=a[b],a[b]=0>c?~(c<<1):c<<1;b="";d=0;for(c=a.length;d<c;++d){for(var e,f=a[d],g="";32<=f;)e=(32|f&31)+63,g+=String.fromCharCode(e),f>>=5;g+=String.fromCharCode(f+63);b+=g}return b}
-function Rq(a,b){b=b?b:1E5;var c=[],d=0,e=0,f;var g=0;for(f=a.length;g<f;++g){var h=a.charCodeAt(g)-63,d=d|(h&31)<<e;32>h?(c.push(d),e=d=0):e+=5}a=0;for(d=c.length;a<d;++a)e=c[a],c[a]=e&1?~(e>>1):e>>1;a=0;for(d=c.length;a<d;++a)c[a]/=b;return c}k=Nq.prototype;k.ae=function(a,b){a=this.wd(a,b);return new H(a)};k.zg=function(a,b){return[this.ae(a,b)]};k.wd=function(a,b){var c=sf(this.a);a=Qq(a,c,this.b);Mq(a,a.length,c,a);c=Ff(a,0,a.length,c);return Hl(new O(c,this.a),!1,Gl(this,b))};
-k.ge=function(a,b){if(a=a.V())return this.Cd(a,b);xa(!1,40);return""};k.Wg=function(a,b){return this.ge(a[0],b)};k.Cd=function(a,b){a=Hl(a,!0,Gl(this,b));b=a.ga();a=a.qa();Mq(b,b.length,a,b);return Oq(b,a,this.b)};function Sq(a){a=a?a:{};El.call(this);this.a=a.layerName;this.b=a.layers?a.layers:null;this.defaultDataProjection=Tb(a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326")}v(Sq,Il);function Tq(a,b){var c=[],d,e;var f=0;for(e=a.length;f<e;++f){var g=a[f];0<f&&c.pop();0<=g?d=b[g]:d=b[~g].slice().reverse();c.push.apply(c,d)}a=0;for(b=c.length;a<b;++a)c[a]=c[a].slice();return c}
-function Uq(a,b,c,d,e,f,g){a=a.geometries;var h=[],l;var m=0;for(l=a.length;m<l;++m)h[m]=Vq(a[m],b,c,d,e,f,g);return h}function Vq(a,b,c,d,e,f,g){var h=a.type,l=Wq[h];c="Point"===h||"MultiPoint"===h?l(a,c,d):l(a,b);b=new H;b.Ra(Hl(c,!1,g));void 0!==a.id&&b.jc(a.id);a=a.properties;e&&(a||(a={}),a[e]=f);a&&b.H(a);return b}
-Sq.prototype.yg=function(a,b){if("Topology"==a.type){var c=null,d=null;if(a.transform){var e=a.transform;c=e.scale;d=e.translate}var f=a.arcs;if(e){e=c;var g=d,h;var l=0;for(h=f.length;l<h;++l){var m,n=f[l],p=e,q=g,r=0,u=0;var x=0;for(m=n.length;x<m;++x){var B=n[x];r+=B[0];u+=B[1];B[0]=r;B[1]=u;Xq(B,p,q)}}}e=[];a=a.objects;var g=this.a,E;for(E in a)this.b&&-1==this.b.indexOf(E)||("GeometryCollection"===a[E].type?(l=a[E],e.push.apply(e,Uq(l,f,c,d,g,E,b))):(l=a[E],e.push(Vq(l,f,c,d,g,E,b))));return e}return[]};
-function Xq(a,b,c){a[0]=a[0]*b[0]+c[0];a[1]=a[1]*b[1]+c[1]}Sq.prototype.Fg=function(){return this.defaultDataProjection};
-var Wq={Point:function(a,b,c){a=a.coordinates;b&&c&&Xq(a,b,c);return new C(a)},LineString:function(a,b){a=Tq(a.arcs,b);return new O(a)},Polygon:function(a,b){var c=[],d;var e=0;for(d=a.arcs.length;e<d;++e)c[e]=Tq(a.arcs[e],b);return new D(c)},MultiPoint:function(a,b,c){a=a.coordinates;var d;if(b&&c){var e=0;for(d=a.length;e<d;++e)Xq(a[e],b,c)}return new Q(a)},MultiLineString:function(a,b){var c=[],d;var e=0;for(d=a.arcs.length;e<d;++e)c[e]=Tq(a.arcs[e],b);return new P(c)},MultiPolygon:function(a,
-b){var c=[],d,e;var f=0;for(e=a.arcs.length;f<e;++f){var g=a.arcs[f];var h=[];var l=0;for(d=g.length;l<d;++l)h[l]=Tq(g[l],b);c[f]=h}return new R(c)}};k=Sq.prototype;k.Zc=function(){};k.he=function(){};k.je=function(){};k.Cg=function(){};k.Rc=function(){};function Yq(a){a=a?a:{};this.c=a.featureType;this.a=a.featureNS;this.b=a.gmlFormat?a.gmlFormat:new Sm;this.o=a.schemaLocation?a.schemaLocation:Zq["1.1.0"];Cm.call(this)}v(Yq,Cm);var Zq={"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"};
-Yq.prototype.zc=function(a,b){var c={featureType:this.c,featureNS:this.a};tb(c,Fl(this,a,b?b:{}));b=[c];this.b.b["http://www.opengis.net/gml"].featureMember=rl(Fm.prototype.be);(a=N([],this.b.b,a,b,this.b))||(a=[]);return a};Yq.prototype.j=function(a){if(ml(a))return $q(a);if(nl(a))return N({},ar,a,[]);if("string"===typeof a)return a=pl(a),$q(a)};Yq.prototype.g=function(a){if(ml(a))return br(this,a);if(nl(a))return cr(this,a);if("string"===typeof a)return a=pl(a),br(this,a)};
-function br(a,b){for(b=b.firstChild;b;b=b.nextSibling)if(b.nodeType==Node.ELEMENT_NODE)return cr(a,b)}var dr={"http://www.opengis.net/gml":{boundedBy:I(Fm.prototype.gf,"bounds")}};function cr(a,b){var c={},d=Nm(b.getAttribute("numberOfFeatures"));c.numberOfFeatures=d;return N(c,dr,b,[],a.b)}
-var er={"http://www.opengis.net/wfs":{totalInserted:I(Mm),totalUpdated:I(Mm),totalDeleted:I(Mm)}},fr={"http://www.opengis.net/ogc":{FeatureId:rl(function(a){return a.getAttribute("fid")})}},gr={"http://www.opengis.net/wfs":{Feature:function(a,b){Al(fr,a,b)}}},ar={"http://www.opengis.net/wfs":{TransactionSummary:I(function(a,b){return N({},er,a,b)},"transactionSummary"),InsertResults:I(function(a,b){return N([],gr,a,b)},"insertIds")}};
-function $q(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return N({},ar,a,[])}var hr={"http://www.opengis.net/wfs":{PropertyName:J(Pm)}};function ir(a,b){var c=jl("http://www.opengis.net/ogc","Filter"),d=jl("http://www.opengis.net/ogc","FeatureId");c.appendChild(d);d.setAttribute("fid",b);a.appendChild(c)}function jr(a,b){a=(a?a:"feature")+":";return b.indexOf(a)?a+b:b}
-var kr={"http://www.opengis.net/wfs":{Insert:J(function(a,b,c){var d=c[c.length-1],e=d.gmlVersion,d=jl(d.featureNS,d.featureType);a.appendChild(d);if(2===e){a=an.prototype;(e=b.a)&&d.setAttribute("fid",e);var e=c[c.length-1],f=e.featureNS,g=b.c;e.lb||(e.lb={},e.lb[f]={});var h=b.N();b=[];var l=[];for(n in h){var m=h[n];null!==m&&(b.push(n),l.push(m),n==g||m instanceof of?n in e.lb[f]||(e.lb[f][n]=J(a.ai,a)):n in e.lb[f]||(e.lb[f][n]=J(Pm)))}var n=tb({},e);n.node=d;Bl(n,e.lb,wl(void 0,f),l,c,b)}else Sm.prototype.ii(d,
-b,c)}),Update:J(function(a,b,c){var d=c[c.length-1];xa(void 0!==b.a,27);var e=d.featurePrefix,f=d.featureNS;a.setAttribute("typeName",jr(e,d.featureType));a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,f);e=b.a;if(void 0!==e){for(var f=b.O(),g=[],h=0,l=f.length;h<l;h++){var m=b.get(f[h]);void 0!==m&&g.push({name:f[h],value:m})}Bl({gmlVersion:d.gmlVersion,node:a,hasZ:d.hasZ,srsName:d.srsName},kr,wl("Property"),g,c);ir(a,e)}}),Delete:J(function(a,b,c){c=c[c.length-1];xa(void 0!==b.a,26);
-var d=c.featurePrefix,e=c.featureNS;a.setAttribute("typeName",jr(d,c.featureType));a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+d,e);b=b.a;void 0!==b&&ir(a,b)}),Property:J(function(a,b,c){var d=jl("http://www.opengis.net/wfs","Name"),e=c[c.length-1].gmlVersion;a.appendChild(d);Pm(d,b.name);void 0!==b.value&&null!==b.value&&(d=jl("http://www.opengis.net/wfs","Value"),a.appendChild(d),b.value instanceof of?2===e?an.prototype.ai(d,b.value,c):Sm.prototype.od(d,b.value,c):Pm(d,b.value))}),
-Native:J(function(a,b){b.vq&&a.setAttribute("vendorId",b.vq);void 0!==b.Vp&&a.setAttribute("safeToIgnore",b.Vp);void 0!==b.value&&Pm(a,b.value)})}};function lr(a,b,c){var d={node:a};b.b.forEach(function(a){Bl(d,mr,wl(a.kc),[a],c)})}function nr(a,b){void 0!==b.a&&a.setAttribute("matchCase",b.a.toString());or(a,b.b);pr(a,""+b.i)}function qr(a,b,c){a=jl("http://www.opengis.net/ogc",a);Pm(a,c);b.appendChild(a)}function or(a,b){qr("PropertyName",a,b)}function pr(a,b){qr("Literal",a,b)}
-function rr(a,b){var c=jl("http://www.opengis.net/gml","TimeInstant");a.appendChild(c);a=jl("http://www.opengis.net/gml","timePosition");c.appendChild(a);Pm(a,b)}
-var mr={"http://www.opengis.net/wfs":{Query:J(function(a,b,c){var d=c[c.length-1],e=d.featurePrefix,f=d.featureNS,g=d.propertyNames,h=d.srsName;a.setAttribute("typeName",e?jr(e,b):b);h&&a.setAttribute("srsName",h);f&&a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,f);b=tb({},d);b.node=a;Bl(b,hr,wl("PropertyName"),g,c);if(d=d.filter)g=jl("http://www.opengis.net/ogc","Filter"),a.appendChild(g),Bl({node:g},mr,wl(d.kc),[d],c)})},"http://www.opengis.net/ogc":{During:J(function(a,b){var c=jl("http://www.opengis.net/fes",
-"ValueReference");Pm(c,b.b);a.appendChild(c);c=jl("http://www.opengis.net/gml","TimePeriod");a.appendChild(c);a=jl("http://www.opengis.net/gml","begin");c.appendChild(a);rr(a,b.a);a=jl("http://www.opengis.net/gml","end");c.appendChild(a);rr(a,b.i)}),And:J(lr),Or:J(lr),Not:J(function(a,b,c){b=b.condition;Bl({node:a},mr,wl(b.kc),[b],c)}),BBOX:J(function(a,b,c){c[c.length-1].srsName=b.srsName;or(a,b.geometryName);Sm.prototype.od(a,b.extent,c)}),Intersects:J(function(a,b,c){c[c.length-1].srsName=b.srsName;
-or(a,b.geometryName);Sm.prototype.od(a,b.geometry,c)}),Within:J(function(a,b,c){c[c.length-1].srsName=b.srsName;or(a,b.geometryName);Sm.prototype.od(a,b.geometry,c)}),PropertyIsEqualTo:J(nr),PropertyIsNotEqualTo:J(nr),PropertyIsLessThan:J(nr),PropertyIsLessThanOrEqualTo:J(nr),PropertyIsGreaterThan:J(nr),PropertyIsGreaterThanOrEqualTo:J(nr),PropertyIsNull:J(function(a,b){or(a,b.b)}),PropertyIsBetween:J(function(a,b){or(a,b.b);var c=jl("http://www.opengis.net/ogc","LowerBoundary");a.appendChild(c);
-pr(c,""+b.a);c=jl("http://www.opengis.net/ogc","UpperBoundary");a.appendChild(c);pr(c,""+b.i)}),PropertyIsLike:J(function(a,b){a.setAttribute("wildCard",b.g);a.setAttribute("singleChar",b.f);a.setAttribute("escapeChar",b.i);void 0!==b.a&&a.setAttribute("matchCase",b.a.toString());or(a,b.b);pr(a,""+b.c)})}};
-Yq.prototype.l=function(a){var b=jl("http://www.opengis.net/wfs","GetFeature");b.setAttribute("service","WFS");b.setAttribute("version","1.1.0");if(a){a.handle&&b.setAttribute("handle",a.handle);a.outputFormat&&b.setAttribute("outputFormat",a.outputFormat);void 0!==a.maxFeatures&&b.setAttribute("maxFeatures",a.maxFeatures);a.resultType&&b.setAttribute("resultType",a.resultType);void 0!==a.startIndex&&b.setAttribute("startIndex",a.startIndex);void 0!==a.count&&b.setAttribute("count",a.count);var c=
-a.filter;if(a.bbox){xa(a.geometryName,12);var d=sm(a.geometryName,a.bbox,a.srsName);c?c=rm(c,d):c=d}}b.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.o);c={node:b,srsName:a.srsName,featureNS:a.featureNS?a.featureNS:this.a,featurePrefix:a.featurePrefix,geometryName:a.geometryName,filter:c,propertyNames:a.propertyNames?a.propertyNames:[]};xa(Array.isArray(a.featureTypes),11);a=a.featureTypes;c=[c];d=tb({},c[c.length-1]);d.node=b;Bl(d,mr,wl("Query"),a,c);return b};
-Yq.prototype.v=function(a,b,c,d){var e=[],f=jl("http://www.opengis.net/wfs","Transaction"),g=d.version?d.version:"1.1.0",h="1.0.0"===g?2:3;f.setAttribute("service","WFS");f.setAttribute("version",g);if(d){var l=d.gmlOptions?d.gmlOptions:{};d.handle&&f.setAttribute("handle",d.handle)}f.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",Zq[g]);a&&(g={node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,hasZ:d.hasZ,srsName:d.srsName},
-tb(g,l),Bl(g,kr,wl("Insert"),a,e));b&&(g={node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,hasZ:d.hasZ,srsName:d.srsName},tb(g,l),Bl(g,kr,wl("Update"),b,e));c&&Bl({node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,srsName:d.srsName},kr,wl("Delete"),c,e);d.nativeElements&&Bl({node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:d.featurePrefix,gmlVersion:h,srsName:d.srsName},kr,wl("Native"),
-d.nativeElements,e);return f};Yq.prototype.Eg=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.kf(a);return null};Yq.prototype.kf=function(a){if(a.firstElementChild&&a.firstElementChild.firstElementChild)for(a=a.firstElementChild.firstElementChild,a=a.firstElementChild;a;a=a.nextElementSibling)if(0!==a.childNodes.length&&(1!==a.childNodes.length||3!==a.firstChild.nodeType)){var b=[{}];this.b.gf(a,b);return Tb(b.pop().srsName)}return null};function sr(a){a=a?a:{};El.call(this);this.b=void 0!==a.splitCollection?a.splitCollection:!1}v(sr,Vn);function tr(a){a=a.X();return a.length?a.join(" "):""}function ur(a){a=a.X();for(var b=[],c=0,d=a.length;c<d;++c)b.push(a[c].join(" "));return b.join(",")}function vr(a){var b=[];a=a.Sd();for(var c=0,d=a.length;c<d;++c)b.push("("+ur(a[c])+")");return b.join(",")}
-function wr(a){var b=a.U(),c=(0,xr[b])(a),b=b.toUpperCase();if(a instanceof rf){a=a.ja;var d="";if("XYZ"===a||"XYZM"===a)d+="Z";if("XYM"===a||"XYZM"===a)d+="M";a=d;0<a.length&&(b+=" "+a)}return c.length?b+"("+c+")":b+" EMPTY"}
-var xr={Point:tr,LineString:ur,Polygon:vr,MultiPoint:function(a){var b=[];a=a.Zd();for(var c=0,d=a.length;c<d;++c)b.push("("+tr(a[c])+")");return b.join(",")},MultiLineString:function(a){var b=[];a=a.gd();for(var c=0,d=a.length;c<d;++c)b.push("("+ur(a[c])+")");return b.join(",")},MultiPolygon:function(a){var b=[];a=a.Td();for(var c=0,d=a.length;c<d;++c)b.push("("+vr(a[c])+")");return b.join(",")},GeometryCollection:function(a){var b=[];a=a.Vf();for(var c=0,d=a.length;c<d;++c)b.push(wr(a[c]));return b.join(",")}};
-k=sr.prototype;k.ae=function(a,b){return(a=this.wd(a,b))?(b=new H,b.Ra(a),b):null};k.zg=function(a,b){var c=[];a=this.wd(a,b);this.b&&"GeometryCollection"==a.U()?c=a.a:c=[a];b=[];for(var d=0,e=c.length;d<e;++d)a=new H,a.Ra(c[d]),b.push(a);return b};k.wd=function(a,b){a=new yr(new zr(a));Ar(a);return(a=Br(a))?Hl(a,!1,b):null};k.ge=function(a,b){return(a=a.V())?this.Cd(a,b):""};
-k.Wg=function(a,b){if(1==a.length)return this.ge(a[0],b);for(var c=[],d=0,e=a.length;d<e;++d)c.push(a[d].V());a=new tm(c);return this.Cd(a,b)};k.Cd=function(a,b){return wr(Hl(a,!0,b))};function zr(a){this.a=a;this.b=-1}
-function Cr(a){var b=a.a.charAt(++a.b),c={position:a.b,value:b};if("("==b)c.type=2;else if(","==b)c.type=5;else if(")"==b)c.type=3;else if("0"<=b&&"9">=b||"."==b||"-"==b){c.type=4;var b=a.b,d=!1,e=!1;do{if("."==f)d=!0;else if("e"==f||"E"==f)e=!0;var f=a.a.charAt(++a.b)}while("0"<=f&&"9">=f||"."==f&&(void 0===d||!d)||!e&&("e"==f||"E"==f)||e&&("-"==f||"+"==f));a=parseFloat(a.a.substring(b,a.b--));c.value=a}else if("a"<=b&&"z">=b||"A"<=b&&"Z">=b){c.type=1;b=a.b;do f=a.a.charAt(++a.b);while("a"<=f&&"z">=
-f||"A"<=f&&"Z">=f);a=a.a.substring(b,a.b--).toUpperCase();c.value=a}else{if(" "==b||"\t"==b||"\r"==b||"\n"==b)return Cr(a);if(""===b)c.type=6;else throw Error("Unexpected character: "+b);}return c}function yr(a){this.i=a;this.a="XY"}function Ar(a){a.b=Cr(a.i)}function Dr(a,b){(b=a.b.type==b)&&Ar(a);return b}
-function Br(a){var b=a.b;if(Dr(a,1)){var b=b.value,c="XY",d=a.b;1==a.b.type&&(d=d.value,"Z"===d?c="XYZ":"M"===d?c="XYM":"ZM"===d&&(c="XYZM"),"XY"!==c&&Ar(a));a.a=c;if("GEOMETRYCOLLECTION"==b){a:{if(Dr(a,2)){b=[];do b.push(Br(a));while(Dr(a,5));if(Dr(a,3)){a=b;break a}}else if(Er(a)){a=[];break a}throw Error(Fr(a));}return new tm(a)}d=Gr[b];c=Hr[b];if(!d||!c)throw Error("Invalid geometry type: "+b);b=d.call(a);return new c(b,a.a)}throw Error(Fr(a));}k=yr.prototype;
-k.tg=function(){if(Dr(this,2)){var a=Ir(this);if(Dr(this,3))return a}else if(Er(this))return null;throw Error(Fr(this));};k.sg=function(){if(Dr(this,2)){var a=Jr(this);if(Dr(this,3))return a}else if(Er(this))return[];throw Error(Fr(this));};k.ug=function(){if(Dr(this,2)){var a=Kr(this);if(Dr(this,3))return a}else if(Er(this))return[];throw Error(Fr(this));};
-k.fp=function(){if(Dr(this,2)){var a;if(2==this.b.type)for(a=[this.tg()];Dr(this,5);)a.push(this.tg());else a=Jr(this);if(Dr(this,3))return a}else if(Er(this))return[];throw Error(Fr(this));};k.ep=function(){if(Dr(this,2)){var a=Kr(this);if(Dr(this,3))return a}else if(Er(this))return[];throw Error(Fr(this));};k.gp=function(){if(Dr(this,2)){for(var a=[this.ug()];Dr(this,5);)a.push(this.ug());if(Dr(this,3))return a}else if(Er(this))return[];throw Error(Fr(this));};
-function Ir(a){for(var b=[],c=a.a.length,d=0;d<c;++d){var e=a.b;if(Dr(a,4))b.push(e.value);else break}if(b.length==c)return b;throw Error(Fr(a));}function Jr(a){for(var b=[Ir(a)];Dr(a,5);)b.push(Ir(a));return b}function Kr(a){for(var b=[a.sg()];Dr(a,5);)b.push(a.sg());return b}function Er(a){var b=1==a.b.type&&"EMPTY"==a.b.value;b&&Ar(a);return b}function Fr(a){return"Unexpected `"+a.b.value+"` at position "+a.b.position+" in `"+a.i.a+"`"}
-var Hr={POINT:C,LINESTRING:O,POLYGON:D,MULTIPOINT:Q,MULTILINESTRING:P,MULTIPOLYGON:R},Gr={POINT:yr.prototype.tg,LINESTRING:yr.prototype.sg,POLYGON:yr.prototype.ug,MULTIPOINT:yr.prototype.fp,MULTILINESTRING:yr.prototype.ep,MULTIPOLYGON:yr.prototype.gp};function Lr(){this.version=void 0}v(Lr,uq);Lr.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};Lr.prototype.b=function(a){this.version=a.getAttribute("version").trim();return(a=N({version:this.version},Mr,a,[]))?a:null};function Nr(a,b){return N({},Or,a,b)}function Pr(a,b){return N({},Qr,a,b)}function Rr(a,b){if(b=Nr(a,b))return a=[Nm(a.getAttribute("width")),Nm(a.getAttribute("height"))],b.size=a,b}
-function Sr(a,b){return N([],Tr,a,b)}
-var Ur=[null,"http://www.opengis.net/wms"],Mr=K(Ur,{Service:I(function(a,b){return N({},Vr,a,b)}),Capability:I(function(a,b){return N({},Wr,a,b)})}),Wr=K(Ur,{Request:I(function(a,b){return N({},Xr,a,b)}),Exception:I(function(a,b){return N([],Yr,a,b)}),Layer:I(function(a,b){return N({},Zr,a,b)})}),Vr=K(Ur,{Name:I(S),Title:I(S),Abstract:I(S),KeywordList:I(Sr),OnlineResource:I(tq),ContactInformation:I(function(a,b){return N({},$r,a,b)}),Fees:I(S),AccessConstraints:I(S),LayerLimit:I(Mm),MaxWidth:I(Mm),
-MaxHeight:I(Mm)}),$r=K(Ur,{ContactPersonPrimary:I(function(a,b){return N({},as,a,b)}),ContactPosition:I(S),ContactAddress:I(function(a,b){return N({},bs,a,b)}),ContactVoiceTelephone:I(S),ContactFacsimileTelephone:I(S),ContactElectronicMailAddress:I(S)}),as=K(Ur,{ContactPerson:I(S),ContactOrganization:I(S)}),bs=K(Ur,{AddressType:I(S),Address:I(S),City:I(S),StateOrProvince:I(S),PostCode:I(S),Country:I(S)}),Yr=K(Ur,{Format:rl(S)}),Zr=K(Ur,{Name:I(S),Title:I(S),Abstract:I(S),KeywordList:I(Sr),CRS:tl(S),
-EX_GeographicBoundingBox:I(function(a,b){var c=N({},cs,a,b);if(c){a=c.westBoundLongitude;b=c.southBoundLatitude;var d=c.eastBoundLongitude,c=c.northBoundLatitude;if(void 0!==a&&void 0!==b&&void 0!==d&&void 0!==c)return[a,b,d,c]}}),BoundingBox:tl(function(a){var b=[Lm(a.getAttribute("minx")),Lm(a.getAttribute("miny")),Lm(a.getAttribute("maxx")),Lm(a.getAttribute("maxy"))],c=[Lm(a.getAttribute("resx")),Lm(a.getAttribute("resy"))];return{crs:a.getAttribute("CRS"),extent:b,res:c}}),Dimension:tl(function(a){return{name:a.getAttribute("name"),
-units:a.getAttribute("units"),unitSymbol:a.getAttribute("unitSymbol"),"default":a.getAttribute("default"),multipleValues:Im(a.getAttribute("multipleValues")),nearestValue:Im(a.getAttribute("nearestValue")),current:Im(a.getAttribute("current")),values:S(a)}}),Attribution:I(function(a,b){return N({},ds,a,b)}),AuthorityURL:tl(function(a,b){if(b=Nr(a,b))return b.name=a.getAttribute("name"),b}),Identifier:tl(S),MetadataURL:tl(function(a,b){if(b=Nr(a,b))return b.type=a.getAttribute("type"),b}),DataURL:tl(Nr),
-FeatureListURL:tl(Nr),Style:tl(function(a,b){return N({},es,a,b)}),MinScaleDenominator:I(Km),MaxScaleDenominator:I(Km),Layer:tl(function(a,b){var c=b[b.length-1],d=N({},Zr,a,b);if(d)return b=Im(a.getAttribute("queryable")),void 0===b&&(b=c.queryable),d.queryable=void 0!==b?b:!1,b=Nm(a.getAttribute("cascaded")),void 0===b&&(b=c.cascaded),d.cascaded=b,b=Im(a.getAttribute("opaque")),void 0===b&&(b=c.opaque),d.opaque=void 0!==b?b:!1,b=Im(a.getAttribute("noSubsets")),void 0===b&&(b=c.noSubsets),d.noSubsets=
-void 0!==b?b:!1,(b=Lm(a.getAttribute("fixedWidth")))||(b=c.fixedWidth),d.fixedWidth=b,(a=Lm(a.getAttribute("fixedHeight")))||(a=c.fixedHeight),d.fixedHeight=a,["Style","CRS","AuthorityURL"].forEach(function(a){a in c&&(d[a]=(d[a]||[]).concat(c[a]))}),"EX_GeographicBoundingBox BoundingBox Dimension Attribution MinScaleDenominator MaxScaleDenominator".split(" ").forEach(function(a){a in d||(d[a]=c[a])}),d})}),ds=K(Ur,{Title:I(S),OnlineResource:I(tq),LogoURL:I(Rr)}),cs=K(Ur,{westBoundLongitude:I(Km),
-eastBoundLongitude:I(Km),southBoundLatitude:I(Km),northBoundLatitude:I(Km)}),Xr=K(Ur,{GetCapabilities:I(Pr),GetMap:I(Pr),GetFeatureInfo:I(Pr)}),Qr=K(Ur,{Format:tl(S),DCPType:tl(function(a,b){return N({},fs,a,b)})}),fs=K(Ur,{HTTP:I(function(a,b){return N({},gs,a,b)})}),gs=K(Ur,{Get:I(Nr),Post:I(Nr)}),es=K(Ur,{Name:I(S),Title:I(S),Abstract:I(S),LegendURL:tl(Rr),StyleSheetURL:I(Nr),StyleURL:I(Nr)}),Or=K(Ur,{Format:I(S),OnlineResource:I(tq)}),Tr=K(Ur,{Keyword:rl(S)});function hs(a){a=a?a:{};this.a="http://mapserver.gis.umn.edu/mapserver";this.b=new an;this.c=a.layers?a.layers:null;Cm.call(this)}v(hs,Cm);
-hs.prototype.zc=function(a,b){var c={};b&&tb(c,Fl(this,a,b));c=[c];a.setAttribute("namespaceURI",this.a);var d=a.localName;b=[];if(a.childNodes.length){if("msGMLOutput"==d)for(var e=0,f=a.childNodes.length;e<f;e++){var g=a.childNodes[e];if(g.nodeType===Node.ELEMENT_NODE){var h=c[0],l=g.localName.replace("_layer","");if(!this.c||ja(this.c,l)){l+="_feature";h.featureType=l;h.featureNS=this.a;var m={};m[l]=rl(this.b.wg,this.b);h=K([h.featureNS,null],m);g.setAttribute("namespaceURI",this.a);(g=N([],h,
-g,c,this.b))&&la(b,g)}}}"FeatureCollection"==d&&(a=N([],this.b.b,a,[{}],this.b))&&(b=a)}return b};hs.prototype.Vg=function(){};hs.prototype.Xb=function(){};hs.prototype.ie=function(){};function is(){this.i=new vq}v(is,uq);is.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};is.prototype.b=function(a){var b=a.getAttribute("version").trim(),c=this.i.b(a);if(!c)return null;c.version=b;return(c=N(c,js,a,[]))?c:null};function ks(a){var b=S(a).split(" ");if(b&&2==b.length&&(a=+b[0],b=+b[1],!isNaN(a)&&!isNaN(b)))return[a,b]}
-var ls=[null,"http://www.opengis.net/wmts/1.0"],ms=[null,"http://www.opengis.net/ows/1.1"],js=K(ls,{Contents:I(function(a,b){return N({},ns,a,b)})}),ns=K(ls,{Layer:tl(function(a,b){return N({},os,a,b)}),TileMatrixSet:tl(function(a,b){return N({},ps,a,b)})}),os=K(ls,{Style:tl(function(a,b){if(b=N({},qs,a,b))return a="true"===a.getAttribute("isDefault"),b.isDefault=a,b}),Format:tl(S),TileMatrixSetLink:tl(function(a,b){return N({},rs,a,b)}),Dimension:tl(function(a,b){return N({},ss,a,b)}),ResourceURL:tl(function(a){var b=
-a.getAttribute("format"),c=a.getAttribute("template");a=a.getAttribute("resourceType");var d={};b&&(d.format=b);c&&(d.template=c);a&&(d.resourceType=a);return d})},K(ms,{Title:I(S),Abstract:I(S),WGS84BoundingBox:I(function(a,b){a=N([],ts,a,b);if(2==a.length)return Na(a)}),Identifier:I(S)})),qs=K(ls,{LegendURL:tl(function(a){var b={};b.format=a.getAttribute("format");b.href=tq(a);return b})},K(ms,{Title:I(S),Identifier:I(S)})),rs=K(ls,{TileMatrixSet:I(S),TileMatrixSetLimits:I(function(a,b){return N([],
-us,a,b)})}),us=K(ls,{TileMatrixLimits:rl(function(a,b){return N({},vs,a,b)})}),vs=K(ls,{TileMatrix:I(S),MinTileRow:I(Mm),MaxTileRow:I(Mm),MinTileCol:I(Mm),MaxTileCol:I(Mm)}),ss=K(ls,{Default:I(S),Value:tl(S)},K(ms,{Identifier:I(S)})),ts=K(ms,{LowerCorner:rl(ks),UpperCorner:rl(ks)}),ps=K(ls,{WellKnownScaleSet:I(S),TileMatrix:tl(function(a,b){return N({},ws,a,b)})},K(ms,{SupportedCRS:I(S),Identifier:I(S)})),ws=K(ls,{TopLeftCorner:I(ks),ScaleDenominator:I(Km),TileWidth:I(Mm),TileHeight:I(Mm),MatrixWidth:I(Mm),
-MatrixHeight:I(Mm)},K(ms,{Identifier:I(S)}));function xs(a){Tc.call(this);a=a||{};this.a=null;this.f=fc;this.c=void 0;y(this,Vc("projection"),this.Am,this);y(this,Vc("tracking"),this.Bm,this);void 0!==a.projection&&this.Wh(a.projection);void 0!==a.trackingOptions&&this.wj(a.trackingOptions);this.Ke(void 0!==a.tracking?a.tracking:!1)}v(xs,Tc);k=xs.prototype;k.ka=function(){this.Ke(!1);Tc.prototype.ka.call(this)};k.Am=function(){var a=this.Uh();a&&(this.f=Vb(Tb("EPSG:4326"),a),this.a&&this.set("position",this.f(this.a)))};
-k.Bm=function(){if(Wd){var a=this.Vh();a&&void 0===this.c?this.c=navigator.geolocation.watchPosition(this.np.bind(this),this.op.bind(this),this.Gh()):a||void 0===this.c||(navigator.geolocation.clearWatch(this.c),this.c=void 0)}};
-k.np=function(a){a=a.coords;this.set("accuracy",a.accuracy);this.set("altitude",null===a.altitude?void 0:a.altitude);this.set("altitudeAccuracy",null===a.altitudeAccuracy?void 0:a.altitudeAccuracy);this.set("heading",null===a.heading?void 0:Ha(a.heading));this.a?(this.a[0]=a.longitude,this.a[1]=a.latitude):this.a=[a.longitude,a.latitude];var b=this.f(this.a);this.set("position",b);this.set("speed",null===a.speed?void 0:a.speed);a=Xf(Jb,this.a,a.accuracy);a.Dc(this.f);this.set("accuracyGeometry",a);
-this.s()};k.op=function(a){a.type="error";this.Ke(!1);this.b(a)};k.Dk=function(){return this.get("accuracy")};k.Ek=function(){return this.get("accuracyGeometry")||null};k.Gk=function(){return this.get("altitude")};k.Hk=function(){return this.get("altitudeAccuracy")};k.ym=function(){return this.get("heading")};k.zm=function(){return this.get("position")};k.Uh=function(){return this.get("projection")};k.ll=function(){return this.get("speed")};k.Vh=function(){return this.get("tracking")};k.Gh=function(){return this.get("trackingOptions")};
-k.Wh=function(a){this.set("projection",Tb(a))};k.Ke=function(a){this.set("tracking",a)};k.wj=function(a){this.set("trackingOptions",a)};function ys(a,b,c){rf.call(this);this.Ng(a,b?b:0,c)}v(ys,rf);k=ys.prototype;k.clone=function(){var a=new ys(null);tf(a,this.ja,this.A.slice());a.s();return a};k.Kb=function(a,b,c,d){var e=this.A;a-=e[0];var f=b-e[1];b=a*a+f*f;if(b<d){if(b)for(d=this.pd()/Math.sqrt(b),c[0]=e[0]+d*a,c[1]=e[1]+d*f,d=2;d<this.a;++d)c[d]=e[d];else for(d=0;d<this.a;++d)c[d]=e[d];c.length=this.a;return b}return d};k.Mc=function(a,b){var c=this.A;a-=c[0];b-=c[1];return a*a+b*b<=zs(this)};
-k.wa=function(){return this.A.slice(0,this.a)};k.se=function(a){var b=this.A,c=b[this.a]-b[0];return Xa(b[0]-c,b[1]-c,b[0]+c,b[1]+c,a)};k.pd=function(){return Math.sqrt(zs(this))};function zs(a){var b=a.A[a.a]-a.A[0];a=a.A[a.a+1]-a.A[1];return b*b+a*a}k.U=function(){return"Circle"};k.Xa=function(a){var b=this.G();return qb(a,b)?(b=this.wa(),a[0]<=b[0]&&a[2]>=b[0]||a[1]<=b[1]&&a[3]>=b[1]?!0:db(a,this.sb,this)):!1};
-k.ob=function(a){var b=this.a,c=a.slice();c[b]=c[0]+(this.A[b]-this.A[0]);var d;for(d=1;d<b;++d)c[b+d]=a[d];tf(this,this.ja,c);this.s()};k.Ng=function(a,b,c){if(a){uf(this,c,a,0);this.A||(this.A=[]);c=this.A;a=Cf(c,a);c[a++]=c[0]+b;var d;b=1;for(d=this.a;b<d;++b)c[a++]=c[b];c.length=a}else tf(this,"XY",null);this.s()};k.X=function(){};k.ma=function(){};k.Uc=function(a){this.A[this.a]=this.A[0]+a;this.s()};function As(a,b,c){for(var d=[],e=a(0),f=a(1),g=b(e),h=b(f),l=[f,e],m=[h,g],n=[1,0],p={},q=1E5,r,u,x,B,E;0<--q&&0<n.length;)x=n.pop(),e=l.pop(),g=m.pop(),f=x.toString(),f in p||(d.push(g[0],g[1]),p[f]=!0),B=n.pop(),f=l.pop(),h=m.pop(),E=(x+B)/2,r=a(E),u=b(r),Fa(u[0],u[1],g[0],g[1],h[0],h[1])<c?(d.push(h[0],h[1]),f=B.toString(),p[f]=!0):(n.push(B,E,E,x),m.push(h,u,u,g),l.push(f,r,r,e));return d}function Bs(a,b,c,d,e){var f=Tb("EPSG:4326");return As(function(d){return[a,b+(c-b)*d]},ec(f,d),e)}
-function Cs(a,b,c,d,e){var f=Tb("EPSG:4326");return As(function(d){return[b+(c-b)*d,a]},ec(f,d),e)};function Ds(a){a=a||{};this.j=this.v=null;this.f=this.o=Infinity;this.g=this.l=-Infinity;this.ra=this.oa=Infinity;this.R=this.I=-Infinity;this.Jb=void 0!==a.targetSize?a.targetSize:100;this.fb=void 0!==a.maxLines?a.maxLines:100;this.i=[];this.c=[];this.pa=void 0!==a.strokeStyle?a.strokeStyle:Es;this.D=this.u=void 0;this.a=this.b=this.S=null;1==a.showLabels&&(this.na=a.lonLabelFormatter?a.lonLabelFormatter:bf.bind(this,"EW"),this.Ua=a.latLabelFormatter?a.latLabelFormatter:bf.bind(this,"NS"),this.fa=
-void 0==a.lonLabelPosition?0:a.lonLabelPosition,this.T=void 0==a.latLabelPosition?1:a.latLabelPosition,this.B=void 0!==a.lonLabelStyle?a.lonLabelStyle:new fo({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new al({color:"rgba(0,0,0,1)"}),stroke:new wj({color:"rgba(255,255,255,1)",width:3})}),this.C=void 0!==a.latLabelStyle?a.latLabelStyle:new fo({font:"12px Calibri,sans-serif",textAlign:"end",fill:new al({color:"rgba(0,0,0,1)"}),stroke:new wj({color:"rgba(255,255,255,1)",width:3})}),this.b=
-[],this.a=[]);this.setMap(void 0!==a.map?a.map:null)}var Es=new wj({color:"rgba(0,0,0,0.2)"}),Fs=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001];function Gs(a,b,c,d,e,f,g){var h=g;c=Bs(b,c,d,a.j,e);h=void 0!==a.i[h]?a.i[h]:new O(null);h.ba("XY",c);qb(h.G(),f)&&(a.b&&(c=g,d=h.ga(),f=[d[0],Ca(f[1]+Math.abs(f[1]-f[3])*a.fa,Math.max(f[1],d[1]),Math.min(f[3],d[d.length-1]))],c=a.b[c]?a.b[c].Qd:new C(null),c.ma(f),a.b[g]={Qd:c,text:a.na(b)}),a.i[g++]=h);return g}
-function Hs(a,b,c,d,e){var f=e;c=Cs(b,a.g,a.f,a.j,c);f=void 0!==a.c[f]?a.c[f]:new O(null);f.ba("XY",c);if(qb(f.G(),d)){if(a.a){c=e;var g=f.ga();d=[Ca(d[0]+Math.abs(d[0]-d[2])*a.T,Math.max(d[0],g[0]),Math.min(d[2],g[g.length-2])),g[1]];c=a.a[c]?a.a[c].Qd:new C(null);c.ma(d);a.a[e]={Qd:c,text:a.Ua(b)}}a.c[e++]=f}return e}k=Ds.prototype;k.Cm=function(){return this.v};k.al=function(){return this.i};k.hl=function(){return this.c};
-k.Kh=function(a){var b=a.vectorContext,c=a.frameState,d=c.extent;a=c.viewState;var e=a.center,f=a.projection,g=a.resolution;a=c.pixelRatio;a=g*g/(4*a*a);if(!this.j||!dc(this.j,f)){var h=Tb("EPSG:4326"),l=f.G(),m=f.g,n=hc(m,h,f),p=m[2],q=m[1],r=m[0],u=n[3],x=n[2],B=n[1],n=n[0];this.o=m[3];this.f=p;this.l=q;this.g=r;this.oa=u;this.ra=x;this.I=B;this.R=n;this.u=ec(h,f);this.D=ec(f,h);this.S=this.D(nb(l));this.j=f}f.i&&(f=f.G(),h=lb(f),c=c.focus[0],c<f[0]||c>f[2])&&(c=h*Math.ceil((f[0]-c)/h),d=[d[0]+
-c,d[1],d[2]+c,d[3]]);c=this.S[0];f=this.S[1];h=-1;m=Math.pow(this.Jb*g,2);p=[];q=[];g=0;for(l=Fs.length;g<l;++g){r=Fs[g]/2;p[0]=c-r;p[1]=f-r;q[0]=c+r;q[1]=f+r;this.u(p,p);this.u(q,q);r=Math.pow(q[0]-p[0],2)+Math.pow(q[1]-p[1],2);if(r<=m)break;h=Fs[g]}g=h;if(-1==g)this.i.length=this.c.length=0,this.b&&(this.b.length=0),this.a&&(this.a.length=0);else{c=this.D(e);e=c[0];c=c[1];f=this.fb;h=[Math.max(d[0],this.R),Math.max(d[1],this.I),Math.min(d[2],this.ra),Math.min(d[3],this.oa)];h=hc(h,this.j,"EPSG:4326");
-m=h[3];q=h[1];e=Math.floor(e/g)*g;p=Ca(e,this.g,this.f);l=Gs(this,p,q,m,a,d,0);for(h=0;p!=this.g&&h++<f;)p=Math.max(p-g,this.g),l=Gs(this,p,q,m,a,d,l);p=Ca(e,this.g,this.f);for(h=0;p!=this.f&&h++<f;)p=Math.min(p+g,this.f),l=Gs(this,p,q,m,a,d,l);this.i.length=l;this.b&&(this.b.length=l);c=Math.floor(c/g)*g;e=Ca(c,this.l,this.o);l=Hs(this,e,a,d,0);for(h=0;e!=this.l&&h++<f;)e=Math.max(e-g,this.l),l=Hs(this,e,a,d,l);e=Ca(c,this.l,this.o);for(h=0;e!=this.o&&h++<f;)e=Math.min(e+g,this.o),l=Hs(this,e,a,
-d,l);this.c.length=l;this.a&&(this.a.length=l)}b.Ma(null,this.pa);a=0;for(e=this.i.length;a<e;++a)g=this.i[a],b.zb(g);a=0;for(e=this.c.length;a<e;++a)g=this.c[a],b.zb(g);if(this.b)for(a=0,e=this.b.length;a<e;++a)g=this.b[a],this.B.xd(g.text),b.Cb(this.B),b.zb(g.Qd);if(this.a)for(a=0,e=this.a.length;a<e;++a)g=this.a[a],this.C.xd(g.text),b.Cb(this.C),b.zb(g.Qd)};
-k.setMap=function(a){this.v&&(this.v.K("postcompose",this.Kh,this),this.v.render());a&&(a.J("postcompose",this.Kh,this),a.render());this.v=a};function Is(a,b,c,d,e){Qc.call(this);this.f=e;this.extent=a;this.a=c;this.resolution=b;this.state=d}v(Is,Qc);Is.prototype.s=function(){this.b("change")};Is.prototype.G=function(){return this.extent};Is.prototype.getState=function(){return this.state};function Js(a,b,c,d,e,f,g){Is.call(this,a,b,c,0,d);this.j=e;this.M=new Image;null!==f&&(this.M.crossOrigin=f);this.c={};this.i=null;this.state=0;this.g=g}v(Js,Is);k=Js.prototype;k.Y=function(a){if(void 0!==a){var b;a=w(a);if(a in this.c)return this.c[a];wb(this.c)?b=this.M:b=this.M.cloneNode(!1);return this.c[a]=b}return this.M};k.Fm=function(){this.state=3;this.i.forEach(Ec);this.i=null;this.s()};
-k.Gm=function(){void 0===this.resolution&&(this.resolution=mb(this.extent)/this.M.height);this.state=2;this.i.forEach(Ec);this.i=null;this.s()};k.load=function(){if(0==this.state||3==this.state)this.state=1,this.s(),this.i=[Jc(this.M,"error",this.Fm,this),Jc(this.M,"load",this.Gm,this)],this.g(this,this.j)};k.Og=function(a){this.M=a};function Ks(a,b,c,d,e,f){this.c=f?f:null;Is.call(this,a,b,c,f?0:2,d);this.i=e}v(Ks,Is);Ks.prototype.g=function(a){this.state=a?3:2;this.s()};Ks.prototype.load=function(){0==this.state&&(this.state=1,this.s(),this.c(this.g.bind(this)))};Ks.prototype.Y=function(){return this.i};function Ls(a,b){Qc.call(this);this.ta=a;this.state=b;this.i=null;this.key=""}v(Ls,Qc);Ls.prototype.s=function(){this.b("change")};Ls.prototype.bb=function(){return this.key+"/"+this.ta};function Ms(a){if(!a.i)return a;var b=a.i;do{if(2==b.getState())return b;b=b.i}while(b);return a}Ls.prototype.f=function(){return this.ta};Ls.prototype.getState=function(){return this.state};function Ns(a,b){a.state=b;a.s()};function Os(a,b,c,d,e){Ls.call(this,a,b);this.g=c;this.M=new Image;null!==d&&(this.M.crossOrigin=d);this.c=null;this.j=e}v(Os,Ls);k=Os.prototype;k.ka=function(){1==this.state&&Ps(this);this.i&&Nc(this.i);this.state=5;this.s();Ls.prototype.ka.call(this)};k.Y=function(){return this.M};k.bb=function(){return this.g};k.Dm=function(){this.state=3;this.M=Qs;Ps(this);this.s()};k.Em=function(){this.state=this.M.naturalWidth&&this.M.naturalHeight?2:4;Ps(this);this.s()};
-k.load=function(){if(0==this.state||3==this.state)this.state=1,this.s(),this.c=[Jc(this.M,"error",this.Dm,this),Jc(this.M,"load",this.Em,this)],this.j(this,this.g)};function Ps(a){a.c.forEach(Ec);a.c=null}var Qs=new Image;Qs.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function Rs(a){a=a?a:{};ng.call(this,{handleEvent:mf});this.g=a.formatConstructors?a.formatConstructors:[];this.o=a.projection?Tb(a.projection):null;this.a=null;this.target=a.target?a.target:null}v(Rs,ng);function Ss(a){a=a.dataTransfer.files;var b;var c=0;for(b=a.length;c<b;++c){var d=a.item(c);var e=new FileReader;e.addEventListener("load",this.j.bind(this,d));e.readAsText(d)}}function Ts(a){a.stopPropagation();a.preventDefault();a.dataTransfer.dropEffect="copy"}
-Rs.prototype.j=function(a,b){b=b.target.result;var c=this.v,d=this.o;d||(d=c.Z().v);var c=this.g,e=[],f;var g=0;for(f=c.length;g<f;++g){var h=new c[g];var l={featureProjection:d};try{e=h.Oa(b,l)}catch(m){e=null}if(e&&0<e.length)break}this.b(new Us(Vs,a,e,d))};function Ws(a){var b=a.v;b&&(b=a.target?a.target:b.a,a.a=[y(b,"drop",Ss,a),y(b,"dragenter",Ts,a),y(b,"dragover",Ts,a),y(b,"drop",Ts,a)])}Rs.prototype.Ha=function(a){ng.prototype.Ha.call(this,a);a?Ws(this):Xs(this)};
-Rs.prototype.setMap=function(a){Xs(this);ng.prototype.setMap.call(this,a);this.c()&&Ws(this)};function Xs(a){a.a&&(a.a.forEach(Ec),a.a=null)}var Vs="addfeatures";function Us(a,b,c,d){Oc.call(this,a);this.features=c;this.file=b;this.projection=d}v(Us,Oc);function Ys(a){a=a?a:{};Dg.call(this,{handleDownEvent:Zs,handleDragEvent:$s,handleUpEvent:at});this.l=a.condition?a.condition:yg;this.a=this.g=void 0;this.j=0;this.u=void 0!==a.duration?a.duration:400}v(Ys,Dg);
-function $s(a){if(Bg(a)){var b=a.map,c=b.Ob(),d=a.pixel;a=d[0]-c[0]/2;d=c[1]/2-d[1];c=Math.atan2(d,a);a=Math.sqrt(a*a+d*d);b=b.Z();b.g.rotation!==Te&&void 0!==this.g&&(d=c-this.g,og(b,b.Qa()-d));this.g=c;void 0!==this.a&&(c=this.a*(b.Pa()/a),qg(b,c));void 0!==this.a&&(this.j=this.a/a);this.a=a}}
-function at(a){if(!Bg(a))return!0;a=a.map.Z();cg(a,1,-1);var b=this.j-1,c=a.Qa(),c=a.constrainRotation(c,0);og(a,c,void 0,void 0);var c=a.Pa(),d=this.u,c=a.constrainResolution(c,0,b);qg(a,c,void 0,d);this.j=0;return!1}function Zs(a){return Bg(a)&&this.l(a)?(cg(a.map.Z(),1,1),this.a=this.g=void 0,!0):!1};function bt(a,b,c,d){this.fb=a;this.Ua=b;this.overlaps=d;this.c=0;this.resolution=c;this.ra=this.oa=null;this.a=[];this.coordinates=[];this.T=Bh();this.b=[];this.B=null;this.fa=Bh();this.na=Bh()}v(bt,Wh);
-function ct(a,b,c,d,e,f,g){var h=a.coordinates.length,l=a.Sf();g&&(c+=e);g=[b[c],b[c+1]];var m=[NaN,NaN],n=!0,p;for(p=c+e;p<d;p+=e){m[0]=b[p];m[1]=b[p+1];var q=Wa(l,m);q!==r?(n&&(a.coordinates[h++]=g[0],a.coordinates[h++]=g[1]),a.coordinates[h++]=m[0],a.coordinates[h++]=m[1],n=!1):1===q?(a.coordinates[h++]=m[0],a.coordinates[h++]=m[1],n=!1):n=!0;g[0]=m[0];g[1]=m[1];var r=q}if(f&&n||p===c+e)a.coordinates[h++]=g[0],a.coordinates[h++]=g[1];return h}
-function dt(a,b){a.oa=[0,b,0];a.a.push(a.oa);a.ra=[0,b,0];a.b.push(a.ra)}bt.prototype.Va=function(a,b){if(this.R){var c=Gh(this.T,this.R.slice());a.translate(c[0],c[1]);a.rotate(b)}a.fill();this.R&&a.setTransform.apply(a,this.na)};
-function et(a,b,c,d,e,f,g,h,l){if(a.B&&pa(d,a.T))var m=a.B;else a.B||(a.B=[]),m=pf(a.coordinates,0,a.coordinates.length,2,d,a.B),Fh(a.T,d);d=!wb(f);for(var n=0,p=g.length,q=0,r,u=a.fa,x=a.na,B,E,A,L,oa=0,ha=0,ga=a.a!=g||a.overlaps?0:200;n<p;){var z=g[n];switch(z[0]){case 0:q=z[1];d&&f[w(q).toString()]||!q.V()?n=z[2]:void 0===l||qb(l,q.V().G())?++n:n=z[2]+1;break;case 1:oa>ga&&(a.Va(b,e),oa=0);ha>ga&&(b.stroke(),ha=0);oa||ha||(b.beginPath(),B=E=NaN);++n;break;case 2:q=z[1];r=m[q];z=m[q+1];A=m[q+2]-
-r;q=m[q+3]-z;q=Math.sqrt(A*A+q*q);b.moveTo(r+q,z);b.arc(r,z,q,0,2*Math.PI,!0);++n;break;case 3:b.closePath();++n;break;case 4:q=z[1];r=z[2];var M=z[3];var ba=z[4]*c;var da=z[5]*c;var fb=z[6],ca=z[7],Ub=z[8],uc=z[9];var bc=z[10];A=z[11];L=z[12];var Je=z[13],zg=z[14];for(bc&&(A+=e);q<r;q+=2){z=m[q]-ba;bc=m[q+1]-da;Je&&(z=Math.round(z),bc=Math.round(bc));if(1!=L||A){var ff=z+ba,rh=bc+da;Kh(u,ff,rh,L,L,A,-ff,-rh);b.setTransform.apply(b,u)}ff=b.globalAlpha;1!=ca&&(b.globalAlpha=ff*ca);var rh=zg+Ub>M.width?
-M.width-Ub:zg,Bq=fb+uc>M.height?M.height-uc:fb;b.drawImage(M,Ub,uc,rh,Bq,z,bc,rh*c,Bq*c);1!=ca&&(b.globalAlpha=ff);(1!=L||A)&&b.setTransform.apply(b,x)}++n;break;case 5:q=z[1];r=z[2];da=z[3];fb=z[4]*c;ca=z[5]*c;A=z[6];L=z[7]*c;M=z[8];ba=z[9];for((bc=z[10])&&(A+=e);q<r;q+=2){z=m[q]+fb;bc=m[q+1]+ca;if(1!=L||A)Kh(u,z,bc,L,L,A,-z,-bc),b.setTransform.apply(b,u);Ub=da.split("\n");uc=Ub.length;1<uc?(Je=Math.round(1.5*b.measureText("M").width),bc-=(uc-1)/2*Je):Je=0;for(zg=0;zg<uc;zg++)ff=Ub[zg],ba&&b.strokeText(ff,
-z,bc),M&&b.fillText(ff,z,bc),bc+=Je;(1!=L||A)&&b.setTransform.apply(b,x)}++n;break;case 6:if(h&&(q=z[1],q=h(q)))return q;++n;break;case 7:ga?oa++:a.Va(b,e);++n;break;case 8:q=z[1];r=z[2];z=m[q];bc=m[q+1];A=z+.5|0;L=bc+.5|0;if(A!==B||L!==E)b.moveTo(z,bc),B=A,E=L;for(q+=2;q<r;q+=2)if(z=m[q],bc=m[q+1],A=z+.5|0,L=bc+.5|0,q==r-2||A!==B||L!==E)b.lineTo(z,bc),B=A,E=L;++n;break;case 9:a.R=z[2];oa&&(a.Va(b,e),oa=0,ha&&(b.stroke(),ha=0));b.fillStyle=z[1];++n;break;case 10:var q=void 0!==z[8]?z[8]:!0,ul=z[9];
-r=z[2];ha&&(b.stroke(),ha=0);b.strokeStyle=z[1];b.lineWidth=q?r*c:r;b.lineCap=z[3];b.lineJoin=z[4];b.miterLimit=z[5];Td&&(r=z[6],A=z[7],q&&c!==ul&&(r=r.map(function(a){return a*c/ul}),A*=c/ul,z[6]=r,z[7]=A,z[9]=c),b.lineDashOffset=A,b.setLineDash(r));++n;break;case 11:b.font=z[1];b.textAlign=z[2];b.textBaseline=z[3];++n;break;case 12:ga?ha++:b.stroke();++n;break;default:++n}}oa&&a.Va(b,e);ha&&b.stroke()}bt.prototype.La=function(a,b,c,d,e){et(this,a,b,c,d,e,this.a,void 0,void 0)};
-function ft(a){var b=a.b;b.reverse();var c,d=b.length,e=-1;for(c=0;c<d;++c){var f=b[c];var g=f[0];if(6==g)e=c;else if(0==g){f[2]=c;f=a.b;for(g=c;e<g;){var h=f[e];f[e]=f[g];f[g]=h;++e;--g}e=-1}}}function gt(a,b){a.oa[2]=a.a.length;a.oa=null;a.ra[2]=a.b.length;a.ra=null;b=[6,b];a.a.push(b);a.b.push(b)}bt.prototype.Te=ua;bt.prototype.Sf=function(){return this.Ua};function ht(a,b,c,d){bt.call(this,a,b,c,d);this.M=this.I=null;this.C=this.D=this.S=this.u=this.v=this.l=this.o=this.j=this.g=this.f=this.i=void 0}v(ht,bt);
-ht.prototype.qc=function(a,b){if(this.M){dt(this,b);var c=a.ga(),d=this.coordinates.length;a=ct(this,c,0,c.length,a.qa(),!1,!1);this.a.push([4,d,a,this.M,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]);this.b.push([4,d,a,this.I,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]);gt(this,b)}};
-ht.prototype.oc=function(a,b){if(this.M){dt(this,b);var c=a.ga(),d=this.coordinates.length;a=ct(this,c,0,c.length,a.qa(),!1,!1);this.a.push([4,d,a,this.M,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]);this.b.push([4,d,a,this.I,this.i,this.f,this.g,this.j,this.o,this.l,this.v,this.u,this.S,this.D,this.C]);gt(this,b)}};ht.prototype.Te=function(){ft(this);this.f=this.i=void 0;this.M=this.I=null;this.C=this.D=this.u=this.v=this.l=this.o=this.j=this.S=this.g=void 0};
-ht.prototype.Ub=function(a){var b=a.Hc(),c=a.ic(),d=a.qg(1),e=a.Y(1),f=a.Oc();this.i=b[0];this.f=b[1];this.I=d;this.M=e;this.g=c[1];this.j=a.f;this.o=f[0];this.l=f[1];this.v=a.l;this.u=a.g;this.S=a.a;this.D=a.v;this.C=c[0]};function it(a,b,c,d){bt.call(this,a,b,c,d);this.f=null;this.i={Md:void 0,Gd:void 0,Hd:null,Id:void 0,Jd:void 0,Kd:void 0,Ld:void 0,eg:0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(it,bt);function jt(a,b,c,d,e){var f=a.coordinates.length;b=ct(a,b,c,d,e,!1,!1);f=[8,f,b];a.a.push(f);a.b.push(f);return d}k=it.prototype;k.Sf=function(){this.f||(this.f=Ra(this.Ua),0<this.c&&Qa(this.f,this.resolution*(this.c+1)/2,this.f));return this.f};
-function kt(a){var b=a.i,c=b.strokeStyle,d=b.lineCap,e=b.lineDash,f=b.lineDashOffset,g=b.lineJoin,h=b.lineWidth,l=b.miterLimit;b.Md==c&&b.Gd==d&&pa(b.Hd,e)&&b.Id==f&&b.Jd==g&&b.Kd==h&&b.Ld==l||(b.eg!=a.coordinates.length&&(a.a.push([12]),b.eg=a.coordinates.length),a.a.push([10,c,h,d,g,l,e,f,!0,1],[1]),b.Md=c,b.Gd=d,b.Hd=e,b.Id=f,b.Jd=g,b.Kd=h,b.Ld=l)}
-k.mc=function(a,b){var c=this.i,d=c.lineWidth;void 0!==c.strokeStyle&&void 0!==d&&(kt(this),dt(this,b),this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1],[1]),c=a.ga(),jt(this,c,0,c.length,a.qa()),this.b.push([12]),gt(this,b))};
-k.nc=function(a,b){var c=this.i,d=c.lineWidth;if(void 0!==c.strokeStyle&&void 0!==d){kt(this);dt(this,b);this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1],[1]);c=a.Bb();d=a.ga();a=a.qa();var e=0,f;var g=0;for(f=c.length;g<f;++g)e=jt(this,d,e,c[g],a);this.b.push([12]);gt(this,b)}};k.Te=function(){this.i.eg!=this.coordinates.length&&this.a.push([12]);ft(this);this.i=null};
-k.Ma=function(a,b){a=b.a;this.i.strokeStyle=id(a?a:Uh);a=b.f;this.i.lineCap=void 0!==a?a:"round";a=b.i;this.i.lineDash=a?a:Th;a=b.g;this.i.lineDashOffset=a?a:0;a=b.j;this.i.lineJoin=void 0!==a?a:"round";a=b.c;this.i.lineWidth=void 0!==a?a:1;b=b.o;this.i.miterLimit=void 0!==b?b:10;this.i.lineWidth>this.c&&(this.c=this.i.lineWidth,this.f=null)};function lt(a,b,c,d){bt.call(this,a,b,c,d);this.f=null;this.i={oh:void 0,Md:void 0,Gd:void 0,Hd:null,Id:void 0,Jd:void 0,Kd:void 0,Ld:void 0,fillStyle:void 0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(lt,bt);
-function mt(a,b,c,d,e){var f=a.i,g=void 0!==f.fillStyle,f=void 0!=f.strokeStyle,h=d.length,l=[1];a.a.push(l);a.b.push(l);for(l=0;l<h;++l){var m=d[l],n=a.coordinates.length;c=ct(a,b,c,m,e,!0,!f);c=[8,n,c];a.a.push(c);a.b.push(c);f&&(c=[3],a.a.push(c),a.b.push(c));c=m}b=[7];a.b.push(b);g&&a.a.push(b);f&&(g=[12],a.a.push(g),a.b.push(g));return c}k=lt.prototype;
-k.Zb=function(a,b){var c=this.i,d=c.strokeStyle;if(void 0!==c.fillStyle||void 0!==d){nt(this,a);dt(this,b);this.b.push([9,gd(Sh)]);void 0!==c.strokeStyle&&this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1]);var e=a.ga(),d=this.coordinates.length;ct(this,e,0,e.length,a.qa(),!1,!1);a=[1];d=[2,d];this.a.push(a,d);this.b.push(a,d);a=[7];this.b.push(a);void 0!==c.fillStyle&&this.a.push(a);void 0!==c.strokeStyle&&(c=[12],this.a.push(c),this.b.push(c));
-gt(this,b)}};k.rc=function(a,b){var c=this.i;nt(this,a);dt(this,b);this.b.push([9,gd(Sh)]);void 0!==c.strokeStyle&&this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1]);var c=a.Bb(),d=a.ec();mt(this,d,0,c,a.qa());gt(this,b)};
-k.pc=function(a,b){var c=this.i,d=c.strokeStyle;if(void 0!==c.fillStyle||void 0!==d){nt(this,a);dt(this,b);this.b.push([9,gd(Sh)]);void 0!==c.strokeStyle&&this.b.push([10,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset,!0,1]);c=a.c;d=fi(a);a=a.qa();var e=0,f;var g=0;for(f=c.length;g<f;++g)e=mt(this,d,e,c[g],a);gt(this,b)}};
-k.Te=function(){ft(this);this.i=null;var a=this.fb;if(a){var b=this.coordinates,c;var d=0;for(c=b.length;d<c;++d)b[d]=a*Math.round(b[d]/a)}};k.Sf=function(){this.f||(this.f=Ra(this.Ua),0<this.c&&Qa(this.f,this.resolution*(this.c+1)/2,this.f));return this.f};
-k.Ma=function(a,b){var c=this.i;a?(a=a.b,c.fillStyle=id(a?a:Sh)):c.fillStyle=void 0;b?(a=b.a,c.strokeStyle=id(a?a:Uh),a=b.f,c.lineCap=void 0!==a?a:"round",a=b.i,c.lineDash=a?a.slice():Th,a=b.g,c.lineDashOffset=a?a:0,a=b.j,c.lineJoin=void 0!==a?a:"round",a=b.c,c.lineWidth=void 0!==a?a:1,b=b.o,c.miterLimit=void 0!==b?b:10,c.lineWidth>this.c&&(this.c=c.lineWidth,this.f=null)):(c.strokeStyle=void 0,c.lineCap=void 0,c.lineDash=null,c.lineDashOffset=void 0,c.lineJoin=void 0,c.lineWidth=void 0,c.miterLimit=
-void 0)};function nt(a,b){var c=a.i,d=c.fillStyle,e=c.strokeStyle,f=c.lineCap,g=c.lineDash,h=c.lineDashOffset,l=c.lineJoin,m=c.lineWidth,n=c.miterLimit;if(void 0!==d&&("string"!==typeof d||c.oh!=d)){var p=[9,d];"string"!==typeof d&&(b=b.G(),p.push([b[0],b[3]]));a.a.push(p);c.oh=c.fillStyle}void 0===e||c.Md==e&&c.Gd==f&&pa(c.Hd,g)&&c.Id==h&&c.Jd==l&&c.Kd==m&&c.Ld==n||(a.a.push([10,e,m,f,l,n,g,h,!0,1]),c.Md=e,c.Gd=f,c.Hd=g,c.Id=h,c.Jd=l,c.Kd=m,c.Ld=n)};function ot(a,b,c,d){bt.call(this,a,b,c,d);this.C=this.D=this.S=null;this.Ia="";this.o=this.j=0;this.l=void 0;this.u=this.v=0;this.g=this.f=this.i=null}v(ot,bt);
-ot.prototype.yc=function(a,b,c,d,e,f){if(""!==this.Ia&&this.g&&(this.i||this.f)){if(this.i){e=this.i;var g=this.S;if(!g||g.fillStyle!=e.fillStyle){var h=[9,e.fillStyle];this.a.push(h);this.b.push(h);g?g.fillStyle=e.fillStyle:this.S={fillStyle:e.fillStyle}}}this.f&&(e=this.f,g=this.D,g&&g.lineCap==e.lineCap&&g.lineDash==e.lineDash&&g.lineDashOffset==e.lineDashOffset&&g.lineJoin==e.lineJoin&&g.lineWidth==e.lineWidth&&g.miterLimit==e.miterLimit&&g.strokeStyle==e.strokeStyle||(h=[10,e.strokeStyle,e.lineWidth,
-e.lineCap,e.lineJoin,e.miterLimit,e.lineDash,e.lineDashOffset,!1,1],this.a.push(h),this.b.push(h),g?(g.lineCap=e.lineCap,g.lineDash=e.lineDash,g.lineDashOffset=e.lineDashOffset,g.lineJoin=e.lineJoin,g.lineWidth=e.lineWidth,g.miterLimit=e.miterLimit,g.strokeStyle=e.strokeStyle):this.D={lineCap:e.lineCap,lineDash:e.lineDash,lineDashOffset:e.lineDashOffset,lineJoin:e.lineJoin,lineWidth:e.lineWidth,miterLimit:e.miterLimit,strokeStyle:e.strokeStyle}));e=this.g;g=this.C;g&&g.font==e.font&&g.textAlign==
-e.textAlign&&g.textBaseline==e.textBaseline||(h=[11,e.font,e.textAlign,e.textBaseline],this.a.push(h),this.b.push(h),g?(g.font=e.font,g.textAlign=e.textAlign,g.textBaseline=e.textBaseline):this.C={font:e.font,textAlign:e.textAlign,textBaseline:e.textBaseline});dt(this,f);e=this.coordinates.length;a=ct(this,a,b,c,d,!1,!1);a=[5,e,a,this.Ia,this.j,this.o,this.v,this.u,!!this.i,!!this.f,this.l];this.a.push(a);this.b.push(a);gt(this,f)}};
-ot.prototype.Cb=function(a){if(a){var b=a.Fa();b?(b=b.b,b=id(b?b:Sh),this.i?this.i.fillStyle=b:this.i={fillStyle:b}):this.i=null;var c=a.Ga();if(c){var b=c.a,d=c.f,e=c.i,f=c.g,g=c.j,h=c.c,c=c.o,d=void 0!==d?d:"round",e=e?e.slice():Th,f=void 0!==f?f:0,g=void 0!==g?g:"round",h=void 0!==h?h:1,c=void 0!==c?c:10,b=id(b?b:Uh);if(this.f){var l=this.f;l.lineCap=d;l.lineDash=e;l.lineDashOffset=f;l.lineJoin=g;l.lineWidth=h;l.miterLimit=c;l.strokeStyle=b}else this.f={lineCap:d,lineDash:e,lineDashOffset:f,lineJoin:g,
-lineWidth:h,miterLimit:c,strokeStyle:b}}else this.f=null;var m=a.a,b=a.i,d=a.c,e=a.o,h=a.f,c=a.b,f=a.Na(),g=a.g,l=a.j;a=void 0!==m?m:"10px sans-serif";g=void 0!==g?g:"center";l=void 0!==l?l:"middle";this.g?(m=this.g,m.font=a,m.textAlign=g,m.textBaseline=l):this.g={font:a,textAlign:g,textBaseline:l};this.Ia=void 0!==f?f:"";this.j=void 0!==b?b:0;this.o=void 0!==d?d:0;this.l=void 0!==e?e:!1;this.v=void 0!==h?h:0;this.u=void 0!==c?c:1}else this.Ia=""};function pt(a,b,c,d,e){this.v=a;this.c=b;this.o=d;this.l=c;this.f=e;this.a={};this.g=jd(1,1);this.j=Bh()}v(pt,ki);var qt={0:[[!0]]};function rt(a,b,c){var d,e=Math.floor(a.length/2);if(b>=e)for(d=e;d<b;d++)a[d][c]=!0;else if(b<e)for(d=b+1;d<e;d++)a[d][c]=!0}
-function st(a){if(void 0!==qt[a])return qt[a];for(var b=2*a+1,c=Array(b),d=0;d<b;d++)c[d]=Array(b);for(var b=a,e=d=0;b>=d;)rt(c,a+b,a+d),rt(c,a+d,a+b),rt(c,a-d,a+b),rt(c,a-b,a+d),rt(c,a-b,a-d),rt(c,a-d,a-b),rt(c,a+d,a-b),rt(c,a+b,a-d),d++,e+=1+2*d,0<2*(e-b)+1&&(--b,e+=1-2*b);return qt[a]=c}function tt(a){for(var b in a.a){var c=a.a[b],d;for(d in c)c[d].Te()}}
-pt.prototype.Ea=function(a,b,c,d,e,f){d=Math.round(d);var g=2*d+1,h=Kh(this.j,d+.5,d+.5,1/b,-1/b,-c,-a[0],-a[1]),l=this.g;l.canvas.width!==g||l.canvas.height!==g?(l.canvas.width=g,l.canvas.height=g):l.clearRect(0,0,g,g);if(void 0!==this.f){var m=Oa();Pa(m,a);Qa(m,b*(this.f+d),m)}var n=st(d);return ut(this,l,h,c,e,function(a){for(var b=l.getImageData(0,0,g,g).data,c=0;c<g;c++)for(var d=0;d<g;d++)if(n[c][d]&&0<b[4*(d*g+c)+3]){if(a=f(a))return a;l.clearRect(0,0,g,g);return}},m)};
-function vt(a,b){var c=a.c;a=c[0];var d=c[1],e=c[2],c=c[3];a=[a,d,a,c,e,c,e,d];pf(a,0,8,2,b,a);return a}pt.prototype.b=function(a,b){var c=void 0!==a?a.toString():"0";a=this.a[c];void 0===a&&(a={},this.a[c]=a);c=a[b];void 0===c&&(c=new wt[b](this.v,this.c,this.l,this.o),a[b]=c);return c};pt.prototype.i=function(){return wb(this.a)};
-pt.prototype.La=function(a,b,c,d,e,f){var g=Object.keys(this.a).map(Number);g.sort(ia);var h=vt(this,c);a.save();a.beginPath();a.moveTo(h[0],h[1]);a.lineTo(h[2],h[3]);a.lineTo(h[4],h[5]);a.lineTo(h[6],h[7]);a.clip();f=f?f:ji;var l,m,h=0;for(l=g.length;h<l;++h){var n=this.a[g[h].toString()];var p=0;for(m=f.length;p<m;++p){var q=n[f[p]];void 0!==q&&q.La(a,b,c,d,e)}}a.restore()};
-function ut(a,b,c,d,e,f,g){var h=Object.keys(a.a).map(Number);h.sort(function(a,b){return b-a});var l,m;var n=0;for(l=h.length;n<l;++n){var p=a.a[h[n].toString()];for(m=ji.length-1;0<=m;--m){var q=p[ji[m]];if(void 0!==q&&(q=et(q,b,1,c,d,e,q.b,f,g)))return q}}}var wt={Circle:lt,Image:ht,LineString:it,Polygon:lt,Text:ot};function xt(a){Sc.call(this);this.a=a}v(xt,Sc);xt.prototype.Ea=ua;xt.prototype.Ue=nf;xt.prototype.Nf=function(a,b,c){return function(d,e){return yt(a,b,d,e,function(a){c[d]||(c[d]={});c[d][a.ta.toString()]=a})}};xt.prototype.na=function(a){2===a.target.getState()&&zt(this)};function At(a,b){var c=b.getState();2!=c&&3!=c&&y(b,"change",a.na,a);0==c&&(b.load(),c=b.getState());return 2==c}function zt(a){var b=a.a;b.Mb()&&"ready"==b.$f()&&a.s()}
-function Bt(a,b){b.Ki()&&a.postRenderFunctions.push(function(a,b,e){b=w(a).toString();a.fd(e.viewState.projection,e.usedTiles[b])}.bind(null,b))}function Ct(a,b){if(b){var c;var d=0;for(c=b.length;d<c;++d){var e=b[d];a[w(e).toString()]=e}}}function Dt(a,b){b=b.D;void 0!==b&&("string"===typeof b?a.logos[b]="":b&&(xa("string"==typeof b.href,44),xa("string"==typeof b.src,45),a.logos[b.src]=b.href))}
-function Et(a,b,c,d){b=w(b).toString();c=c.toString();b in a?c in a[b]?(a=a[b][c],d.ca<a.ca&&(a.ca=d.ca),d.$>a.$&&(a.$=d.$),d.da<a.da&&(a.da=d.da),d.ia>a.ia&&(a.ia=d.ia)):a[b][c]=d:(a[b]={},a[b][c]=d)}
-function Ft(a,b,c,d,e,f,g,h,l,m){var n=w(b).toString();n in a.wantedTiles||(a.wantedTiles[n]={});var p=a.wantedTiles[n];a=a.tileQueue;var q=c.minZoom,r,u,x;for(x=g;x>=q;--x){var B=oc(c,f,x,B);var E=c.Da(x);for(r=B.ca;r<=B.$;++r)for(u=B.da;u<=B.ia;++u)if(g-x<=h){var A=b.Nc(x,r,u,d,e);0==A.getState()&&(p[A.bb()]=!0,A.bb()in a.a||a.f([A,n,tc(c,A.ta),E]));l&&l.call(m,A)}else b.Ug(x,r,u,e)}};function Gt(a){xt.call(this,a);this.fa=Bh()}v(Gt,xt);function Ht(a,b,c){var d=b.pixelRatio,e=b.size[0]*d,f=b.size[1]*d,g=b.viewState.rotation,h=ib(c),l=hb(c),m=gb(c);c=eb(c);Gh(b.coordinateToPixelTransform,h);Gh(b.coordinateToPixelTransform,l);Gh(b.coordinateToPixelTransform,m);Gh(b.coordinateToPixelTransform,c);a.save();Vh(a,-g,e/2,f/2);a.beginPath();a.moveTo(h[0]*d,h[1]*d);a.lineTo(l[0]*d,l[1]*d);a.lineTo(m[0]*d,m[1]*d);a.lineTo(c[0]*d,c[1]*d);a.clip();Vh(a,g,e/2,f/2)}
-function It(a,b,c,d,e){var f=a.a;if(Rc(f,b)){var g=d.size[0]*d.pixelRatio,h=d.size[1]*d.pixelRatio,l=d.viewState.rotation;Vh(c,-l,g/2,h/2);a=e?e:Jt(a,d,0);f.b(new Rh(b,new Xh(c,d.pixelRatio,d.extent,a,d.viewState.rotation),d,c,null));Vh(c,l,g/2,h/2)}}Gt.prototype.u=function(a,b,c,d){if(this.Ea(a,b,0,mf,this))return c.call(d,this.a,null)};Gt.prototype.ef=function(a,b,c,d){It(this,"postcompose",a,b,d)};
-function Jt(a,b,c){var d=b.viewState,e=b.pixelRatio,f=e/d.resolution;return Kh(a.fa,e*b.size[0]/2,e*b.size[1]/2,f,-f,-d.rotation,-d.center[0]+c,-d.center[1])};function Kt(a,b){return w(a)-w(b)}function Lt(a,b){a=.5*a/b;return a*a}function Mt(a,b,c,d,e,f){var g=!1,h;if(h=c.Y()){var l=h.Ye();2==l||3==l?h.Bj(e,f):(0==l&&h.load(),h.Nh(e,f),g=!0)}if(e=(0,c.Za)(b))d=e.Vd(d),(0,Nt[d.U()])(a,d,c,b);return g}
-var Nt={Point:function(a,b,c,d){var e=c.Y();if(e){if(2!=e.Ye())return;var f=a.b(c.Ba(),"Image");f.Ub(e);f.qc(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),a.yc(b.ga(),0,2,2,b,d)},LineString:function(a,b,c,d){var e=c.Ga();if(e){var f=a.b(c.Ba(),"LineString");f.Ma(null,e);f.mc(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),a.yc(di(b),0,2,2,b,d)},Polygon:function(a,b,c,d){var e=c.Fa(),f=c.Ga();if(e||f){var g=a.b(c.Ba(),"Polygon");g.Ma(e,f);g.rc(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),a.yc(Wf(b),
-0,2,2,b,d)},MultiPoint:function(a,b,c,d){var e=c.Y();if(e){if(2!=e.Ye())return;var f=a.b(c.Ba(),"Image");f.Ub(e);f.oc(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),c=b.ga(),a.yc(c,0,c.length,b.qa(),b,d)},MultiLineString:function(a,b,c,d){var e=c.Ga();if(e){var f=a.b(c.Ba(),"LineString");f.Ma(null,e);f.nc(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),c=ei(b),a.yc(c,0,c.length,2,b,d)},MultiPolygon:function(a,b,c,d){var e=c.Fa(),f=c.Ga();if(f||e){var g=a.b(c.Ba(),"Polygon");g.Ma(e,f);g.pc(b,d)}if(e=
-c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),c=gi(b),a.yc(c,0,c.length,2,b,d)},GeometryCollection:function(a,b,c,d){b=b.a;var e;var f=0;for(e=b.length;f<e;++f)(0,Nt[b[f].U()])(a,b[f],c,d)},Circle:function(a,b,c,d){var e=c.Fa(),f=c.Ga();if(e||f){var g=a.b(c.Ba(),"Circle");g.Ma(e,f);g.Zb(b,d)}if(e=c.Na())a=a.b(c.Ba(),"Text"),a.Cb(e),a.yc(b.wa(),0,2,2,b,d)}};function Ot(a){Gt.call(this,a);this.c=!1;this.v=-1;this.l=NaN;this.j=Oa();this.f=this.o=null;this.g=jd()}v(Ot,Gt);
-Ot.prototype.S=function(a,b,c){var d=a.extent,e=a.pixelRatio,f=b.Je?a.skippedFeatureUids:{},g=a.viewState,h=g.projection,g=g.rotation,l=h.G(),m=this.a.ha(),n=Jt(this,a,0);It(this,"precompose",c,a,n);var p=b.extent,q=void 0!==p;q&&Ht(c,a,p);if((p=this.f)&&!p.i()){var r=0,u=0;if(Rc(this.a,"render")){var x=c.canvas.width;var B=c.canvas.height;if(g){var E=Math.round(Math.sqrt(x*x+B*B)),r=(E-x)/2,u=(E-B)/2;x=B=E}this.g.canvas.width=x;this.g.canvas.height=B;x=this.g}else x=c;B=x.globalAlpha;x.globalAlpha=
-b.opacity;x!=c&&x.translate(r,u);var E=a.size[0]*e,A=a.size[1]*e;Vh(x,-g,E/2,A/2);p.La(x,e,n,g,f);if(m.u&&h.i&&!Va(l,d)){for(var h=d[0],m=lb(l),L=0;h<l[0];)--L,n=m*L,n=Jt(this,a,n),p.La(x,e,n,g,f),h+=m;L=0;for(h=d[2];h>l[2];)++L,n=m*L,n=Jt(this,a,n),p.La(x,e,n,g,f),h-=m;n=Jt(this,a,0)}Vh(x,g,E/2,A/2);x!=c&&(It(this,"render",x,a,n),c.drawImage(x.canvas,-r,-u),x.translate(-r,-u));x.globalAlpha=B}q&&c.restore();this.ef(c,a,b,n)};
-Ot.prototype.Ea=function(a,b,c,d,e){if(this.f){var f=this.a,g={};return this.f.Ea(a,b.viewState.resolution,b.viewState.rotation,c,{},function(a){var b=w(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};Ot.prototype.D=function(){zt(this)};
-Ot.prototype.sd=function(a){function b(a){var b=a.Lc();if(b)var d=b.call(a,m);else(b=c.f)&&(d=b(a,m));if(d){if(d){b=!1;if(Array.isArray(d))for(var e=0,f=d.length;e<f;++e)b=Mt(q,a,d[e],Lt(m,n),this.D,this)||b;else b=Mt(q,a,d,Lt(m,n),this.D,this)||b;a=b}else a=!1;this.c=this.c||a}}var c=this.a,d=c.ha();Ct(a.attributions,d.j);Dt(a,d);var e=a.viewHints[0],f=a.viewHints[1],g=c.T,h=c.na;if(!this.c&&!g&&e||!h&&f)return!0;var l=a.extent,h=a.viewState,e=h.projection,m=h.resolution,n=a.pixelRatio,f=c.i,p=c.c,
-g=c.get(Pt);void 0===g&&(g=Kt);l=Qa(l,p*m);p=h.projection.G();d.u&&h.projection.i&&!Va(p,a.extent)&&(a=Math.max(lb(l)/2,lb(p)),l[0]=p[0]-a,l[2]=p[2]+a);if(!this.c&&this.l==m&&this.v==f&&this.o==g&&Va(this.j,l))return!0;this.f=null;this.c=!1;var q=new pt(.5*m/n,l,m,d.T,c.c);d.Yd(l,m,e);if(g){var r=[];d.$b(l,function(a){r.push(a)},this);r.sort(g);r.forEach(b,this)}else d.$b(l,b,this);tt(q);this.l=m;this.v=f;this.o=g;this.j=l;this.f=q;return!0};function Qt(){this.b="precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}"}v(Qt,mi);var Rt=new Qt;function St(){this.b="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}"}v(St,ni);var Tt=new St;
-function Ut(a,b){this.i=a.getUniformLocation(b,"f");this.c=a.getUniformLocation(b,"e");this.g=a.getUniformLocation(b,"d");this.f=a.getUniformLocation(b,"g");this.b=a.getAttribLocation(b,"b");this.a=a.getAttribLocation(b,"c")};function Vt(a,b){xt.call(this,b);this.c=a;this.T=new Di([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);this.g=this.Ib=null;this.j=void 0;this.v=Bh();this.S=Bh();this.C=ti();this.u=null}v(Vt,xt);
-function Wt(a,b,c){var d=a.c.i;if(void 0===a.j||a.j!=c){b.postRenderFunctions.push(function(a,b,c){a.isContextLost()||(a.deleteFramebuffer(b),a.deleteTexture(c))}.bind(null,d,a.g,a.Ib));b=Qi(d,c,c);var e=d.createFramebuffer();d.bindFramebuffer(36160,e);d.framebufferTexture2D(36160,36064,3553,b,0);a.Ib=b;a.g=e;a.j=c}else d.bindFramebuffer(36160,a.g)}
-Vt.prototype.Gi=function(a,b,c){Xt(this,"precompose",c,a);wi(c,34962,this.T);var d=c.b,e=Hi(c,Rt,Tt);if(this.u)var f=this.u;else this.u=f=new Ut(d,e);c.Qc(e)&&(d.enableVertexAttribArray(f.b),d.vertexAttribPointer(f.b,2,5126,!1,16,0),d.enableVertexAttribArray(f.a),d.vertexAttribPointer(f.a,2,5126,!1,16,8),d.uniform1i(f.f,0));d.uniformMatrix4fv(f.g,!1,ui(this.C,this.v));d.uniformMatrix4fv(f.c,!1,ui(this.C,this.S));d.uniform1f(f.i,b.opacity);d.bindTexture(3553,this.Ib);d.drawArrays(5,0,4);Xt(this,"postcompose",
-c,a)};function Xt(a,b,c,d){a=a.a;if(Rc(a,b)){var e=d.viewState;a.b(new Rh(b,new kk(c,e.center,e.resolution,e.rotation,d.size,d.extent,d.pixelRatio),d,null,c))}}Vt.prototype.mg=function(){this.g=this.Ib=null;this.j=void 0};function Yt(a,b){Vt.call(this,a,b);this.l=!1;this.R=-1;this.I=NaN;this.D=Oa();this.o=this.f=this.B=null}v(Yt,Vt);k=Yt.prototype;k.Gi=function(a,b,c){this.o=b;var d=a.viewState,e=this.f,f=a.size,g=a.pixelRatio,h=this.c.i;e&&!e.i()&&(h.enable(h.SCISSOR_TEST),h.scissor(0,0,f[0]*g,f[1]*g),e.La(c,d.center,d.resolution,d.rotation,f,g,b.opacity,b.Je?a.skippedFeatureUids:{}),h.disable(h.SCISSOR_TEST))};k.ka=function(){var a=this.f;a&&(ek(a,this.c.f)(),this.f=null);Vt.prototype.ka.call(this)};
-k.Ea=function(a,b,c,d,e){if(this.f&&this.o){c=b.viewState;var f=this.a,g={};return this.f.Ea(a,this.c.f,c.center,c.resolution,c.rotation,b.size,b.pixelRatio,this.o.opacity,{},function(a){var b=w(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};k.Ue=function(a,b){if(this.f&&this.o){var c=b.viewState;return jk(this.f,a,this.c.f,c.resolution,c.rotation,b.pixelRatio,this.o.opacity,b.skippedFeatureUids)}return!1};
-k.lg=function(a,b,c,d){a=Gh(b.pixelToCoordinateTransform,a.slice());if(this.Ue(a,b))return c.call(d,this.a,null)};k.Hi=function(){zt(this)};
-k.ng=function(a,b,c){function d(a){var b=a.Lc();if(b)var c=b.call(a,m);else(b=e.f)&&(c=b(a,m));if(c){if(c){b=!1;if(Array.isArray(c))for(var d=c.length-1;0<=d;--d)b=Mt(q,a,c[d],Lt(m,n),this.Hi,this)||b;else b=Mt(q,a,c,Lt(m,n),this.Hi,this)||b;a=b}else a=!1;this.l=this.l||a}}var e=this.a;b=e.ha();Ct(a.attributions,b.j);Dt(a,b);var f=a.viewHints[0],g=a.viewHints[1],h=e.T,l=e.na;if(!this.l&&!h&&f||!l&&g)return!0;var g=a.extent,h=a.viewState,f=h.projection,m=h.resolution,n=a.pixelRatio,h=e.i,p=e.c,l=e.get(Pt);
-void 0===l&&(l=Kt);g=Qa(g,p*m);if(!this.l&&this.I==m&&this.R==h&&this.B==l&&Va(this.D,g))return!0;this.f&&a.postRenderFunctions.push(ek(this.f,c));this.l=!1;var q=new dk(.5*m/n,g,e.c);b.Yd(g,m,f);if(l){var r=[];b.$b(g,function(a){r.push(a)},this);r.sort(l);r.forEach(d,this)}else b.$b(g,d,this);fk(q,c);this.I=m;this.R=h;this.B=l;this.D=g;this.f=q;return!0};function T(a){a=a?a:{};var b=tb({},a);delete b.style;delete b.renderBuffer;delete b.updateWhileAnimating;delete b.updateWhileInteracting;wh.call(this,b);this.c=void 0!==a.renderBuffer?a.renderBuffer:100;this.u=null;this.f=void 0;this.g(a.style);this.T=void 0!==a.updateWhileAnimating?a.updateWhileAnimating:!1;this.na=void 0!==a.updateWhileInteracting?a.updateWhileInteracting:!1}v(T,wh);T.prototype.Fd=function(a){var b=null,c=a.U();"canvas"===c?b=new Ot(this):"webgl"===c&&(b=new Yt(a,this));return b};
-T.prototype.D=function(){return this.u};T.prototype.C=function(){return this.f};T.prototype.g=function(a){this.u=void 0!==a?a:fl;this.f=null===a?void 0:dl(this.u);this.s()};var Pt="renderOrder";function Zt(){return[[-Infinity,-Infinity,Infinity,Infinity]]};function $t(a){Tc.call(this);this.c=Tb(a.projection);this.j=au(a.attributions);this.D=a.logo;this.na=void 0!==a.state?a.state:"ready";this.u=void 0!==a.wrapX?a.wrapX:!1}v($t,Tc);function au(a){if("string"===typeof a)return[new Ac({html:a})];if(a instanceof Ac)return[a];if(Array.isArray(a)){for(var b=a.length,c=Array(b),d=0;d<b;d++){var e=a[d];c[d]="string"===typeof e?new Ac({html:e}):e}return c}return null}k=$t.prototype;k.Ea=ua;k.ya=function(){return this.j};k.xa=function(){return this.D};k.za=function(){return this.c};
-k.getState=function(){return this.na};k.sa=function(){this.s()};k.ua=function(a){this.j=au(a);this.s()};function bu(a,b){a.na=b;a.s()};function U(a){a=a||{};$t.call(this,{attributions:a.attributions,logo:a.logo,projection:void 0,state:"ready",wrapX:void 0!==a.wrapX?a.wrapX:!0});this.B=ua;this.C=a.format;this.T=void 0==a.overlaps?!0:a.overlaps;this.I=a.url;a.loader?this.B=a.loader:void 0!==this.I&&(xa(this.C,7),this.B=Dl(this.I,this.C));this.fa=a.strategy?a.strategy:Zt;var b=void 0!==a.useSpatialIndex?a.useSpatialIndex:!0;this.a=b?new Gj:null;this.R=new Gj;this.g={};this.o={};this.l={};this.v={};this.f=null;if(a.features instanceof
-Yc){var c=a.features;var d=c.a}else Array.isArray(a.features)&&(d=a.features);b||c||(c=new Yc(d));d&&cu(this,d);c&&du(this,c)}v(U,$t);k=U.prototype;k.yb=function(a){var b=w(a).toString();if(eu(this,b,a)){fu(this,b,a);var c=a.V();c?(b=c.G(),this.a&&this.a.Ca(b,a)):this.g[b]=a;this.b(new gu("addfeature",a))}this.s()};function fu(a,b,c){a.v[b]=[y(c,"change",a.Oi,a),y(c,"propertychange",a.Oi,a)]}
-function eu(a,b,c){var d=!0,e=c.a;void 0!==e?e.toString()in a.o?d=!1:a.o[e.toString()]=c:(xa(!(b in a.l),30),a.l[b]=c);return d}k.cd=function(a){cu(this,a);this.s()};function cu(a,b){var c,d=[],e=[],f=[];var g=0;for(c=b.length;g<c;g++){var h=b[g];var l=w(h).toString();eu(a,l,h)&&e.push(h)}g=0;for(c=e.length;g<c;g++)h=e[g],l=w(h).toString(),fu(a,l,h),(b=h.V())?(l=b.G(),d.push(l),f.push(h)):a.g[l]=h;a.a&&a.a.load(d,f);g=0;for(c=e.length;g<c;g++)a.b(new gu("addfeature",e[g]))}
-function du(a,b){var c=!1;y(a,"addfeature",function(a){c||(c=!0,b.push(a.feature),c=!1)});y(a,"removefeature",function(a){c||(c=!0,b.remove(a.feature),c=!1)});y(b,"add",function(a){c||(c=!0,this.yb(a.element),c=!1)},a);y(b,"remove",function(a){c||(c=!0,this.Gb(a.element),c=!1)},a);a.f=b}
-k.clear=function(a){if(a){for(var b in this.v)this.v[b].forEach(Ec);this.f||(this.v={},this.o={},this.l={})}else if(this.a){this.a.forEach(this.Ig,this);for(var c in this.g)this.Ig(this.g[c])}this.f&&this.f.clear();this.a&&this.a.clear();this.R.clear();this.g={};this.b(new gu("clear"));this.s()};k.sh=function(a,b){if(this.a)return this.a.forEach(a,b);if(this.f)return this.f.forEach(a,b)};function hu(a,b,c){a.$b([b[0],b[1],b[0],b[1]],function(a){if(a.V().sb(b))return c.call(void 0,a)})}
-k.$b=function(a,b,c){if(this.a)return Lj(this.a,a,b,c);if(this.f)return this.f.forEach(b,c)};k.th=function(a,b,c){return this.$b(a,function(d){if(d.V().Xa(a)&&(d=b.call(c,d)))return d})};k.Ah=function(){return this.f};k.Xe=function(){if(this.f)var a=this.f.a;else this.a&&(a=Ij(this.a),wb(this.g)||la(a,vb(this.g)));return a};k.zh=function(a){var b=[];hu(this,a,function(a){b.push(a)});return b};k.Uf=function(a){return Jj(this.a,a)};
-k.vh=function(a,b){var c=a[0],d=a[1],e=null,f=[NaN,NaN],g=Infinity,h=[-Infinity,-Infinity,Infinity,Infinity],l=b?b:mf;Lj(this.a,h,function(a){if(l(a)){var b=a.V(),m=g;g=b.Kb(c,d,f,g);g<m&&(e=a,a=Math.sqrt(g),h[0]=c-a,h[1]=d-a,h[2]=c+a,h[3]=d+a)}});return e};k.G=function(a){return this.a.G(a)};k.yh=function(a){a=this.o[a.toString()];return void 0!==a?a:null};k.Mi=function(){return this.C};k.Ni=function(){return this.I};
-k.Oi=function(a){a=a.target;var b=w(a).toString(),c=a.V();c?(c=c.G(),b in this.g?(delete this.g[b],this.a&&this.a.Ca(c,a)):this.a&&Hj(this.a,c,a)):b in this.g||(this.a&&this.a.remove(a),this.g[b]=a);c=a.a;void 0!==c?(c=c.toString(),b in this.l?(delete this.l[b],this.o[c]=a):this.o[c]!==a&&(iu(this,a),this.o[c]=a)):b in this.l||(iu(this,a),this.l[b]=a);this.s();this.b(new gu("changefeature",a))};
-k.Yd=function(a,b,c){var d=this.R;a=this.fa(a,b);var e;var f=0;for(e=a.length;f<e;++f){var g=a[f];Lj(d,g,function(a){return Va(a.extent,g)})||(this.B.call(this,g,b,c),d.Ca(g,{extent:g.slice()}))}};k.Gb=function(a){var b=w(a).toString();b in this.g?delete this.g[b]:this.a&&this.a.remove(a);this.Ig(a);this.s()};k.Ig=function(a){var b=w(a).toString();this.v[b].forEach(Ec);delete this.v[b];var c=a.a;void 0!==c?delete this.o[c.toString()]:delete this.l[b];this.b(new gu("removefeature",a))};
-function iu(a,b){for(var c in a.o)if(a.o[c]===b){delete a.o[c];break}}function gu(a,b){Oc.call(this,a);this.feature=b}v(gu,Oc);function ju(a){Dg.call(this,{handleDownEvent:ku,handleEvent:lu,handleUpEvent:mu});this.T=!1;this.fa=null;this.u=!1;this.Yb=a.source?a.source:null;this.$a=a.features?a.features:null;this.wk=a.snapTolerance?a.snapTolerance:12;this.R=a.type;this.g=nu(this.R);this.Sa=a.minPoints?a.minPoints:this.g===ou?3:2;this.va=a.maxPoints?a.maxPoints:Infinity;this.Cf=a.finishCondition?a.finishCondition:mf;var b=a.geometryFunction;if(!b)if("Circle"===this.R)b=function(a,b){b=b?b:new ys([NaN,NaN]);b.Ng(a[0],Math.sqrt(hf(a[0],
-a[1])));return b};else{var c,d=this.g;d===pu?c=C:d===qu?c=O:d===ou&&(c=D);b=function(a,b){b?d===ou?b.ma([a[0].concat([a[0][0]])]):b.ma(a):b=new c(a);return b}}this.Za=b;this.I=this.C=this.a=this.B=this.j=this.l=null;this.ad=a.clickTolerance?a.clickTolerance*a.clickTolerance:36;this.pa=new T({source:new U({useSpatialIndex:!1,wrapX:a.wrapX?a.wrapX:!1}),style:a.style?a.style:ru()});this.xb=a.geometryName;this.vk=a.condition?a.condition:xg;this.Df=a.freehand?mf:a.freehandCondition?a.freehandCondition:
-yg;y(this,Vc("active"),this.ri,this)}v(ju,Dg);function ru(){var a=gl();return function(b){return a[b.V().U()]}}k=ju.prototype;k.setMap=function(a){Dg.prototype.setMap.call(this,a);this.ri()};function lu(a){this.u=this.g!==pu&&this.Df(a);var b=!this.u;this.u&&"pointerdrag"===a.type&&null!==this.j?(su(this,a),b=!1):"pointermove"===a.type?b=tu(this,a):"dblclick"===a.type&&(b=!1);return Eg.call(this,a)&&b}
-function ku(a){this.T=!this.u;return this.u?(this.fa=a.pixel,this.l||uu(this,a),!0):this.vk(a)?(this.fa=a.pixel,!0):!1}function mu(a){var b=!0;tu(this,a);var c=this.g===vu;this.T?(this.l?this.u||c?this.Pd():wu(this,a)?this.Cf(a)&&this.Pd():su(this,a):(uu(this,a),this.g===pu&&this.Pd()),b=!1):this.u&&(this.l=null,xu(this));return b}
-function tu(a,b){if(a.fa&&(!a.u&&a.T||a.u&&!a.T)){var c=a.fa,d=b.pixel,e=c[0]-d[0],c=c[1]-d[1],e=e*e+c*c;a.T=a.u?e>a.ad:e<=a.ad}a.l?(e=b.coordinate,c=a.j.V(),a.g===pu?d=a.a:a.g===ou?(d=a.a[0],d=d[d.length-1],wu(a,b)&&(e=a.l.slice())):(d=a.a,d=d[d.length-1]),d[0]=e[0],d[1]=e[1],a.Za(a.a,c),a.B&&a.B.V().ma(e),c instanceof D&&a.g!==ou?(a.C||(a.C=new H(new O(null))),e=c.Ch(0),b=a.C.V(),b.ba(e.ja,e.ga())):a.I&&(b=a.C.V(),b.ma(a.I)),yu(a)):(b=b.coordinate.slice(),a.B?a.B.V().ma(b):(a.B=new H(new C(b)),
-yu(a)));return!0}function wu(a,b){var c=!1;if(a.j){var d=!1,e=[a.l];a.g===qu?d=a.a.length>a.Sa:a.g===ou&&(d=a.a[0].length>a.Sa,e=[a.a[0][0],a.a[0][a.a[0].length-2]]);if(d)for(var d=b.map,f=0,g=e.length;f<g;f++){var h=e[f],l=d.Ja(h),m=b.pixel,c=m[0]-l[0],l=m[1]-l[1];if(c=Math.sqrt(c*c+l*l)<=(a.u?1:a.wk)){a.l=h;break}}}return c}
-function uu(a,b){b=b.coordinate;a.l=b;a.g===pu?a.a=b.slice():a.g===ou?(a.a=[[b.slice(),b.slice()]],a.I=a.a[0]):(a.a=[b.slice(),b.slice()],a.g===vu&&(a.I=a.a));a.I&&(a.C=new H(new O(a.I)));b=a.Za(a.a);a.j=new H;a.xb&&a.j.Tc(a.xb);a.j.Ra(b);yu(a);a.b(new zu("drawstart",a.j))}
-function su(a,b){b=b.coordinate;var c=a.j.V(),d;if(a.g===qu){a.l=b.slice();var e=a.a;e.length>=a.va&&(a.u?e.pop():d=!0);e.push(b.slice());a.Za(e,c)}else a.g===ou&&(e=a.a[0],e.length>=a.va&&(a.u?e.pop():d=!0),e.push(b.slice()),d&&(a.l=e[0]),a.Za(a.a,c));yu(a);d&&a.Pd()}
-k.Op=function(){if(this.j){var a=this.j.V();if(this.g===qu){var b=this.a;b.splice(-2,1);this.Za(b,a);2<=b.length&&(this.l=b[b.length-2].slice())}else if(this.g===ou){b=this.a[0];b.splice(-2,1);var c=this.C.V();c.ma(b);this.Za(this.a,a)}0===b.length&&(this.l=null);yu(this)}};
-k.Pd=function(){var a=xu(this),b=this.a,c=a.V();this.g===qu?(b.pop(),this.Za(b,c)):this.g===ou&&(b[0].pop(),this.Za(b,c),b=c.X());"MultiPoint"===this.R?a.Ra(new Q([b])):"MultiLineString"===this.R?a.Ra(new P([b])):"MultiPolygon"===this.R&&a.Ra(new R([b]));this.b(new zu("drawend",a));this.$a&&this.$a.push(a);this.Yb&&this.Yb.yb(a)};function xu(a){a.l=null;var b=a.j;b&&(a.j=null,a.B=null,a.C=null,a.pa.ha().clear(!0));return b}
-k.vn=function(a){var b=a.V();this.j=a;this.a=b.X();a=this.a[this.a.length-1];this.l=a.slice();this.a.push(a.slice());yu(this);this.b(new zu("drawstart",this.j))};k.Xc=nf;function yu(a){var b=[];a.j&&b.push(a.j);a.C&&b.push(a.C);a.B&&b.push(a.B);a=a.pa.ha();a.clear(!0);a.cd(b)}k.ri=function(){var a=this.v,b=this.c();a&&b||xu(this);this.pa.setMap(b?a:null)};
-function nu(a){var b;"Point"===a||"MultiPoint"===a?b=pu:"LineString"===a||"MultiLineString"===a?b=qu:"Polygon"===a||"MultiPolygon"===a?b=ou:"Circle"===a&&(b=vu);return b}var pu="Point",qu="LineString",ou="Polygon",vu="Circle";function zu(a,b){Oc.call(this,a);this.feature=b}v(zu,Oc);function Au(a){this.a=this.j=null;this.C=!1;this.B=this.l=null;a||(a={});a.extent&&this.g(a.extent);Dg.call(this,{handleDownEvent:Bu,handleDragEvent:Cu,handleEvent:Du,handleUpEvent:Eu});this.u=new T({source:new U({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.boxStyle?a.boxStyle:Fu(),updateWhileAnimating:!0,updateWhileInteracting:!0});this.I=new T({source:new U({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.pointerStyle?a.pointerStyle:Gu(),updateWhileAnimating:!0,updateWhileInteracting:!0})}v(Au,Dg);
-function Du(a){if(!(a instanceof ee))return!0;if("pointermove"==a.type&&!this.D){var b=a.pixel,c=a.map,d=Hu(this,b,c);d||(d=c.Wa(b));Iu(this,d)}Eg.call(this,a);return!1}
-function Bu(a){function b(a){var b=null,c=null;a[0]==e[0]?b=e[2]:a[0]==e[2]&&(b=e[0]);a[1]==e[1]?c=e[3]:a[1]==e[3]&&(c=e[1]);return null!==b&&null!==c?[b,c]:null}var c=a.pixel,d=a.map,e=this.G();(a=Hu(this,c,d))&&e?(c=a[0]==e[0]||a[0]==e[2]?a[0]:null,d=a[1]==e[1]||a[1]==e[3]?a[1]:null,null!==c&&null!==d?this.a=Ju(b(a)):null!==c?this.a=Ku(b([c,e[1]]),b([c,e[3]])):null!==d&&(this.a=Ku(b([e[0],d]),b([e[2],d])))):(a=d.Wa(c),this.g([a[0],a[1],a[0],a[1]]),this.a=Ju(a));return!0}
-function Cu(a){this.a&&(a=a.coordinate,this.g(this.a(a)),Iu(this,a));return!0}function Eu(){this.a=null;var a=this.G();a&&jb(a)||this.g(null);return!1}function Fu(){var a=gl();return function(){return a.Polygon}}function Gu(){var a=gl();return function(){return a.Point}}function Ju(a){return function(b){return Na([a,b])}}function Ku(a,b){return a[0]==b[0]?function(c){return Na([a,[c[0],b[1]]])}:a[1]==b[1]?function(c){return Na([a,[b[0],c[1]]])}:null}
-function Hu(a,b,c){function d(a,b){return kf(e,a)-kf(e,b)}var e=c.Wa(b),f=a.G();if(f){f=[[[f[0],f[1]],[f[0],f[3]]],[[f[0],f[3]],[f[2],f[3]]],[[f[2],f[3]],[f[2],f[1]]],[[f[2],f[1]],[f[0],f[1]]]];f.sort(d);var f=f[0],g=af(e,f),h=c.Ja(g);if(10>=jf(b,h))return b=c.Ja(f[0]),c=c.Ja(f[1]),b=hf(h,b),c=hf(h,c),a.C=10>=Math.sqrt(Math.min(b,c)),a.C&&(g=b>c?f[1]:f[0]),g}return null}function Iu(a,b){var c=a.B;c?c.V().ma(b):(c=new H(new C(b)),a.B=c,a.I.ha().yb(c))}
-Au.prototype.setMap=function(a){this.u.setMap(a);this.I.setMap(a);Dg.prototype.setMap.call(this,a)};Au.prototype.G=function(){return this.j};Au.prototype.g=function(a){this.j=a?a:null;var b=this.l;b?a?b.Ra(Yf(a)):b.Ra(void 0):(this.l=b=a?new H(Yf(a)):new H({}),this.u.ha().yb(b));this.b(new Lu(this.j))};function Lu(a){Oc.call(this,Mu);this.b=a}v(Lu,Oc);var Mu="extentchanged";function Nu(a){Dg.call(this,{handleDownEvent:Ou,handleDragEvent:Pu,handleEvent:Qu,handleUpEvent:Ru});this.ad=a.condition?a.condition:Cg;this.$a=function(a){return xg(a)&&wg(a)};this.xb=a.deleteCondition?a.deleteCondition:this.$a;this.Yb=a.insertVertexCondition?a.insertVertexCondition:mf;this.Sa=this.g=null;this.va=[0,0];this.C=this.I=!1;this.a=new Gj;this.fa=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.l=this.pa=!1;this.j=[];this.B=new T({source:new U({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.style?
-a.style:Su(),updateWhileAnimating:!0,updateWhileInteracting:!0});this.T={Point:this.Dn,LineString:this.ti,LinearRing:this.ti,Polygon:this.En,MultiPoint:this.Bn,MultiLineString:this.An,MultiPolygon:this.Cn,Circle:this.yn,GeometryCollection:this.zn};this.u=a.features;this.u.forEach(this.kg,this);y(this.u,"add",this.wn,this);y(this.u,"remove",this.xn,this);this.R=null}v(Nu,Dg);k=Nu.prototype;
-k.kg=function(a){var b=a.V();b&&b.U()in this.T&&this.T[b.U()].call(this,a,b);(b=this.v)&&b.c&&this.c()&&Tu(this,this.va,b);y(a,"change",this.si,this)};function Uu(a,b){a.C||(a.C=!0,a.b(new Vu("modifystart",a.u,b)))}function Wu(a,b){Xu(a,b);a.g&&!a.u.dc()&&(a.B.ha().Gb(a.g),a.g=null);Kc(b,"change",a.si,a)}function Xu(a,b){a=a.a;var c=[];a.forEach(function(a){b===a.feature&&c.push(a)});for(var d=c.length-1;0<=d;--d)a.remove(c[d])}
-k.Ha=function(a){this.g&&!a&&(this.B.ha().Gb(this.g),this.g=null);Dg.prototype.Ha.call(this,a)};k.setMap=function(a){this.B.setMap(a);Dg.prototype.setMap.call(this,a)};k.wn=function(a){this.kg(a.element)};k.si=function(a){this.l||(a=a.target,Wu(this,a),this.kg(a))};k.xn=function(a){Wu(this,a.element)};k.Dn=function(a,b){var c=b.X();a={feature:a,geometry:b,la:[c,c]};this.a.Ca(b.G(),a)};
-k.Bn=function(a,b){var c=b.X(),d;var e=0;for(d=c.length;e<d;++e){var f=c[e];f={feature:a,geometry:b,depth:[e],index:e,la:[f,f]};this.a.Ca(b.G(),f)}};k.ti=function(a,b){var c=b.X(),d;var e=0;for(d=c.length-1;e<d;++e){var f=c.slice(e,e+2);var g={feature:a,geometry:b,index:e,la:f};this.a.Ca(Na(f),g)}};
-k.An=function(a,b){var c=b.X(),d,e;var f=0;for(e=c.length;f<e;++f){var g=c[f];var h=0;for(d=g.length-1;h<d;++h){var l=g.slice(h,h+2);var m={feature:a,geometry:b,depth:[f],index:h,la:l};this.a.Ca(Na(l),m)}}};k.En=function(a,b){var c=b.X(),d,e;var f=0;for(e=c.length;f<e;++f){var g=c[f];var h=0;for(d=g.length-1;h<d;++h){var l=g.slice(h,h+2);var m={feature:a,geometry:b,depth:[f],index:h,la:l};this.a.Ca(Na(l),m)}}};
-k.Cn=function(a,b){var c=b.X(),d,e,f;var g=0;for(f=c.length;g<f;++g){var h=c[g];var l=0;for(e=h.length;l<e;++l){var m=h[l];var n=0;for(d=m.length-1;n<d;++n){var p=m.slice(n,n+2);var q={feature:a,geometry:b,depth:[l,g],index:n,la:p};this.a.Ca(Na(p),q)}}}};k.yn=function(a,b){var c=b.wa(),d={feature:a,geometry:b,index:0,la:[c,c]};a={feature:a,geometry:b,index:1,la:[c,c]};d.Pf=a.Pf=[d,a];this.a.Ca(Za(c),d);this.a.Ca(b.G(),a)};
-k.zn=function(a,b){var c=b.a;for(b=0;b<c.length;++b)this.T[c[b].U()].call(this,a,c[b])};function Yu(a,b){var c=a.g;c?c.V().ma(b):(c=new H(new C(b)),a.g=c,a.B.ha().yb(c))}function Zu(a,b){return a.index-b.index}
-function Ou(a){if(!this.ad(a))return!1;Tu(this,a.pixel,a.map);var b=a.map.Wa(a.pixel);this.j.length=0;this.C=!1;var c=this.g;if(c){var d=[],c=c.V().X(),e=Na([c]),e=Jj(this.a,e),f={};e.sort(Zu);for(var g=0,h=e.length;g<h;++g){var l=e[g],m=l.la,n=w(l.feature),p=l.depth;p&&(n+="-"+p.join("-"));f[n]||(f[n]=Array(2));if("Circle"===l.geometry.U()&&1===l.index)m=$u(b,l),df(m,c)&&!f[n][0]&&(this.j.push([l,0]),f[n][0]=l);else if(df(m[0],c)&&!f[n][0])this.j.push([l,0]),f[n][0]=l;else if(df(m[1],c)&&!f[n][1]){if("LineString"!==
-l.geometry.U()&&"MultiLineString"!==l.geometry.U()||!f[n][0]||0!==f[n][0].index)this.j.push([l,1]),f[n][1]=l}else this.Yb(a)&&w(m)in this.Sa&&!f[n][0]&&!f[n][1]&&d.push([l,c])}d.length&&Uu(this,a);for(a=d.length-1;0<=a;--a)this.bm.apply(this,d[a])}return!!this.g}
-function Pu(a){this.I=!1;Uu(this,a);a=a.coordinate;for(var b=0,c=this.j.length;b<c;++b){for(var d=this.j[b],e=d[0],f=e.depth,g=e.geometry,h,l=e.la,d=d[1];a.length<g.qa();)a.push(l[d][a.length]);switch(g.U()){case "Point":h=a;l[0]=l[1]=a;break;case "MultiPoint":h=g.X();h[e.index]=a;l[0]=l[1]=a;break;case "LineString":h=g.X();h[e.index+d]=a;l[d]=a;break;case "MultiLineString":h=g.X();h[f[0]][e.index+d]=a;l[d]=a;break;case "Polygon":h=g.X();h[f[0]][e.index+d]=a;l[d]=a;break;case "MultiPolygon":h=g.X();
-h[f[1]][f[0]][e.index+d]=a;l[d]=a;break;case "Circle":l[0]=l[1]=a,0===e.index?(this.l=!0,g.ob(a)):(this.l=!0,g.Uc(jf(g.wa(),a))),this.l=!1}h&&(e=g,f=h,this.l=!0,e.ma(f),this.l=!1)}Yu(this,a)}function Ru(a){for(var b,c,d=this.j.length-1;0<=d;--d)if(b=this.j[d][0],c=b.geometry,"Circle"===c.U()){var e=c.wa(),f=b.Pf[0];b=b.Pf[1];f.la[0]=f.la[1]=e;b.la[0]=b.la[1]=e;Hj(this.a,Za(e),f);Hj(this.a,c.G(),b)}else Hj(this.a,Na(b.la),b);this.C&&(this.b(new Vu("modifyend",this.u,a)),this.C=!1);return!1}
-function Qu(a){if(!(a instanceof ee))return!0;this.R=a;var b;dg(a.map.Z())[1]||"pointermove"!=a.type||this.D||(this.va=a.pixel,Tu(this,a.pixel,a.map));this.g&&this.xb(a)&&(b="singleclick"==a.type&&this.I?!0:this.hj());"singleclick"==a.type&&(this.I=!1);return Eg.call(this,a)&&!b}
-function Tu(a,b,c){function d(a,b){return av(e,a)-av(e,b)}var e=c.Wa(b),f=Qa(Za(e),c.Z().Pa()*a.fa),f=Jj(a.a,f);if(0<f.length){f.sort(d);var g=f[0],h=g.la,l=$u(e,g),m=c.Ja(l),n=jf(b,m);if(n<=a.fa){b={};if("Circle"===g.geometry.U()&&1===g.index)a.pa=!0,Yu(a,l);else for(n=c.Ja(h[0]),g=c.Ja(h[1]),c=hf(m,n),m=hf(m,g),n=Math.sqrt(Math.min(c,m)),a.pa=n<=a.fa,a.pa&&(l=c>m?h[1]:h[0]),Yu(a,l),m=1,c=f.length;m<c;++m)if(l=f[m].la,df(h[0],l[0])&&df(h[1],l[1])||df(h[0],l[1])&&df(h[1],l[0]))b[w(l)]=!0;else break;
-b[w(h)]=!0;a.Sa=b;return}}a.g&&(a.B.ha().Gb(a.g),a.g=null)}function av(a,b){var c=b.geometry;return"Circle"===c.U()&&1===b.index?(a=hf(c.wa(),a),c=Math.sqrt(a)-c.pd(),c*c):kf(a,b.la)}function $u(a,b){var c=b.geometry;return"Circle"===c.U()&&1===b.index?c.Ab(a):af(a,b.la)}
-k.bm=function(a,b){for(var c=a.la,d=a.feature,e=a.geometry,f=a.depth,g=a.index,h;b.length<e.qa();)b.push(0);switch(e.U()){case "MultiLineString":h=e.X();h[f[0]].splice(g+1,0,b);break;case "Polygon":h=e.X();h[f[0]].splice(g+1,0,b);break;case "MultiPolygon":h=e.X();h[f[1]][f[0]].splice(g+1,0,b);break;case "LineString":h=e.X();h.splice(g+1,0,b);break;default:return}this.l=!0;e.ma(h);this.l=!1;h=this.a;h.remove(a);bv(this,e,g,f,1);a={la:[c[0],b],feature:d,geometry:e,depth:f,index:g};h.Ca(Na(a.la),a);
-this.j.push([a,1]);b={la:[b,c[1]],feature:d,geometry:e,depth:f,index:g+1};h.Ca(Na(b.la),b);this.j.push([b,0]);this.I=!0};
-k.hj=function(){if(this.R&&"pointerdrag"!=this.R.type){var a=this.R;Uu(this,a);var b=this.j,c={},d,e;for(e=b.length-1;0<=e;--e){var f=b[e];var g=f[0];var h=w(g.feature);g.depth&&(h+="-"+g.depth.join("-"));h in c||(c[h]={});0===f[1]?(c[h].right=g,c[h].index=g.index):1==f[1]&&(c[h].left=g,c[h].index=g.index+1)}for(h in c){var l=c[h].right;var m=c[h].left;e=c[h].index;var n=e-1;g=void 0!==m?m:l;0>n&&(n=0);f=g.geometry;var p=d=f.X();var q=!1;switch(f.U()){case "MultiLineString":2<d[g.depth[0]].length&&
-(d[g.depth[0]].splice(e,1),q=!0);break;case "LineString":2<d.length&&(d.splice(e,1),q=!0);break;case "MultiPolygon":p=p[g.depth[1]];case "Polygon":p=p[g.depth[0]],4<p.length&&(e==p.length-1&&(e=0),p.splice(e,1),q=!0,0===e&&(p.pop(),p.push(p[0]),n=p.length-1))}q&&(q=f,this.l=!0,q.ma(d),this.l=!1,d=[],void 0!==m&&(this.a.remove(m),d.push(m.la[0])),void 0!==l&&(this.a.remove(l),d.push(l.la[1])),void 0!==m&&void 0!==l&&(m={depth:g.depth,feature:g.feature,geometry:g.geometry,index:n,la:d},this.a.Ca(Na(m.la),
-m)),bv(this,f,e,g.depth,-1),this.g&&(this.B.ha().Gb(this.g),this.g=null),b.length=0)}this.b(new Vu("modifyend",this.u,a));this.C=!1;return!0}return!1};function bv(a,b,c,d,e){Lj(a.a,b.G(),function(a){a.geometry===b&&(void 0===d||void 0===a.depth||pa(a.depth,d))&&a.index>c&&(a.index+=e)})}function Su(){var a=gl();return function(){return a.Point}}function Vu(a,b,c){Oc.call(this,a);this.features=b;this.mapBrowserEvent=c}v(Vu,Oc);function cv(a){ng.call(this,{handleEvent:dv});a=a?a:{};this.C=a.condition?a.condition:wg;this.D=a.addCondition?a.addCondition:nf;this.B=a.removeCondition?a.removeCondition:nf;this.I=a.toggleCondition?a.toggleCondition:yg;this.l=a.multi?a.multi:!1;this.o=a.filter?a.filter:mf;this.j=a.hitTolerance?a.hitTolerance:0;this.g=new T({source:new U({useSpatialIndex:!1,features:a.features,wrapX:a.wrapX}),style:a.style?a.style:ev(),updateWhileAnimating:!0,updateWhileInteracting:!0});if(a.layers)if("function"===
-typeof a.layers)a=a.layers;else{var b=a.layers;a=function(a){return ja(b,a)}}else a=mf;this.u=a;this.a={};a=this.g.ha().f;y(a,"add",this.Fn,this);y(a,"remove",this.Jn,this)}v(cv,ng);k=cv.prototype;k.Gn=function(){return this.g.ha().f};k.Hn=function(){return this.j};k.In=function(a){a=w(a);return this.a[a]};
-function dv(a){if(!this.C(a))return!0;var b=this.D(a),c=this.B(a),d=this.I(a),e=!b&&!c&&!d,f=a.map,g=this.g.ha().f,h=[],l=[];if(e){ub(this.a);f.we(a.pixel,function(a,b){if(this.o(a,b))return l.push(a),a=w(a),this.a[a]=b,!this.l}.bind(this),{layerFilter:this.u,hitTolerance:this.j});for(e=g.dc()-1;0<=e;--e){var f=g.item(e),m=l.indexOf(f);-1<m?l.splice(m,1):(g.remove(f),h.push(f))}l.length&&g.fg(l)}else{f.we(a.pixel,function(a,e){if(this.o(a,e))return!b&&!d||ja(g.a,a)?(c||d)&&ja(g.a,a)&&(h.push(a),e=
-w(a),delete this.a[e]):(l.push(a),a=w(a),this.a[a]=e),!this.l}.bind(this),{layerFilter:this.u,hitTolerance:this.j});for(e=h.length-1;0<=e;--e)g.remove(h[e]);g.fg(l)}(0<l.length||0<h.length)&&this.b(new fv(gv,l,h,a));return vg(a)}k.Kn=function(a){this.j=a};k.setMap=function(a){var b=this.v,c=this.g.ha().f;b&&c.forEach(b.Cj,b);ng.prototype.setMap.call(this,a);this.g.setMap(a);a&&c.forEach(a.xj,a)};
-function ev(){var a=gl();la(a.Polygon,a.LineString);la(a.GeometryCollection,a.LineString);return function(b){return b.V()?a[b.V().U()]:null}}k.Fn=function(a){var b=this.v;b&&b.xj(a.element)};k.Jn=function(a){var b=this.v;b&&b.Cj(a.element)};function fv(a,b,c,d){Oc.call(this,a);this.selected=b;this.deselected=c;this.mapBrowserEvent=d}v(fv,Oc);var gv="select";function hv(a){Dg.call(this,{handleEvent:iv,handleDownEvent:mf,handleUpEvent:jv});a=a?a:{};this.l=a.source?a.source:null;this.R=void 0!==a.vertex?a.vertex:!0;this.C=void 0!==a.edge?a.edge:!0;this.j=a.features?a.features:null;this.pa=[];this.B={};this.T={};this.u={};this.I=null;this.g=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.va=kv.bind(this);this.a=new Gj;this.fa={Point:this.Rn,LineString:this.wi,LinearRing:this.wi,Polygon:this.Sn,MultiPoint:this.Pn,MultiLineString:this.On,MultiPolygon:this.Qn,
-GeometryCollection:this.Nn,Circle:this.Mn}}v(hv,Dg);k=hv.prototype;k.yb=function(a,b){b=void 0!==b?b:!0;var c=w(a),d=a.V();if(d){var e=this.fa[d.U()];e&&(this.T[c]=d.G(Oa()),e.call(this,a,d))}b&&(this.B[c]=y(a,"change",this.Ln,this))};k.Ak=function(a){this.yb(a)};k.Bk=function(a){this.Gb(a)};k.ui=function(a){if(a instanceof gu)var b=a.feature;else a instanceof bd&&(b=a.element);this.yb(b)};k.vi=function(a){if(a instanceof gu)var b=a.feature;else a instanceof bd&&(b=a.element);this.Gb(b)};
-k.Ln=function(a){a=a.target;if(this.D){var b=w(a);b in this.u||(this.u[b]=a)}else this.Dj(a)};k.Gb=function(a,b){b=void 0!==b?b:!0;var c=w(a),d=this.T[c];if(d){var e=this.a,f=[];Lj(e,d,function(b){a===b.feature&&f.push(b)});for(d=f.length-1;0<=d;--d)e.remove(f[d])}b&&(Ec(this.B[c]),delete this.B[c])};
-k.setMap=function(a){var b=this.v,c=this.pa,d;this.j?d=this.j:this.l&&(d=this.l.Xe());b&&(c.forEach(Ec),c.length=0,d.forEach(this.Bk,this));Dg.prototype.setMap.call(this,a);a&&(this.j?c.push(y(this.j,"add",this.ui,this),y(this.j,"remove",this.vi,this)):this.l&&c.push(y(this.l,"addfeature",this.ui,this),y(this.l,"removefeature",this.vi,this)),d.forEach(this.Ak,this))};k.Xc=nf;
-function lv(a,b,c,d){var e=d.Wa([b[0]-a.g,b[1]+a.g]),f=d.Wa([b[0]+a.g,b[1]-a.g]),e=Na([e,f]),g=Jj(a.a,e);a.R&&!a.C&&(g=g.filter(function(a){return"Circle"!==a.feature.V().U()}));var h=!1,e=!1,l=f=null;if(0<g.length){a.I=c;g.sort(a.va);var m=g[0].la,h="Circle"===g[0].feature.V().U();if(a.R&&!a.C){if(c=d.Ja(m[0]),h=d.Ja(m[1]),c=hf(b,c),b=hf(b,h),h=Math.sqrt(Math.min(c,b)),h=h<=a.g)e=!0,f=c>b?m[1]:m[0],l=d.Ja(f)}else a.C&&(f=h?$e(c,g[0].feature.V()):af(c,m),l=d.Ja(f),jf(b,l)<=a.g&&(e=!0,a.R&&!h&&(c=
-d.Ja(m[0]),h=d.Ja(m[1]),c=hf(l,c),b=hf(l,h),h=Math.sqrt(Math.min(c,b)),h=h<=a.g)))&&(f=c>b?m[1]:m[0],l=d.Ja(f));e&&(l=[Math.round(l[0]),Math.round(l[1])])}return{nq:e,vertex:f,wq:l}}k.Dj=function(a){this.Gb(a,!1);this.yb(a,!1)};k.Mn=function(a,b){b=Zf(b).X()[0];var c;var d=0;for(c=b.length-1;d<c;++d){var e=b.slice(d,d+2);var f={feature:a,la:e};this.a.Ca(Na(e),f)}};k.Nn=function(a,b){var c=b.a;for(b=0;b<c.length;++b){var d=this.fa[c[b].U()];d&&d.call(this,a,c[b])}};
-k.wi=function(a,b){b=b.X();var c;var d=0;for(c=b.length-1;d<c;++d){var e=b.slice(d,d+2);var f={feature:a,la:e};this.a.Ca(Na(e),f)}};k.On=function(a,b){b=b.X();var c,d;var e=0;for(d=b.length;e<d;++e){var f=b[e];var g=0;for(c=f.length-1;g<c;++g){var h=f.slice(g,g+2);var l={feature:a,la:h};this.a.Ca(Na(h),l)}}};k.Pn=function(a,b){var c=b.X(),d;var e=0;for(d=c.length;e<d;++e){var f=c[e];f={feature:a,la:[f,f]};this.a.Ca(b.G(),f)}};
-k.Qn=function(a,b){b=b.X();var c,d,e;var f=0;for(e=b.length;f<e;++f){var g=b[f];var h=0;for(d=g.length;h<d;++h){var l=g[h];var m=0;for(c=l.length-1;m<c;++m){var n=l.slice(m,m+2);var p={feature:a,la:n};this.a.Ca(Na(n),p)}}}};k.Rn=function(a,b){var c=b.X();a={feature:a,la:[c,c]};this.a.Ca(b.G(),a)};k.Sn=function(a,b){b=b.X();var c,d;var e=0;for(d=b.length;e<d;++e){var f=b[e];var g=0;for(c=f.length-1;g<c;++g){var h=f.slice(g,g+2);var l={feature:a,la:h};this.a.Ca(Na(h),l)}}};
-function iv(a){var b=lv(this,a.pixel,a.coordinate,a.map);b.nq&&(a.coordinate=b.vertex.slice(0,2),a.pixel=b.wq);return Eg.call(this,a)}function jv(){var a=vb(this.u);a.length&&(a.forEach(this.Dj,this),this.u={});return!1}function kv(a,b){return kf(this.I,a.la)-kf(this.I,b.la)};function mv(a){Dg.call(this,{handleDownEvent:nv,handleDragEvent:ov,handleMoveEvent:pv,handleUpEvent:qv});a=a?a:{};this.a=null;this.j=void 0!==a.features?a.features:null;if(a.layers)if("function"===typeof a.layers)var b=a.layers;else{var c=a.layers;b=function(a){return ja(c,a)}}else b=mf;this.C=b;this.l=a.hitTolerance?a.hitTolerance:0;this.g=null;y(this,Vc("active"),this.u,this)}v(mv,Dg);
-function nv(a){this.g=rv(this,a.pixel,a.map);if(!this.a&&this.g){this.a=a.coordinate;pv.call(this,a);var b=this.j||new Yc([this.g]);this.b(new sv("translatestart",b,a.coordinate));return!0}return!1}function qv(a){if(this.a){this.a=null;pv.call(this,a);var b=this.j||new Yc([this.g]);this.b(new sv("translateend",b,a.coordinate));return!0}return!1}
-function ov(a){if(this.a){a=a.coordinate;var b=a[0]-this.a[0],c=a[1]-this.a[1],d=this.j||new Yc([this.g]);d.forEach(function(a){var d=a.V();d.translate(b,c);a.Ra(d)});this.a=a;this.b(new sv("translating",d,a))}}function pv(a){var b=a.map.a;rv(this,a.pixel,a.map)?(b.classList.remove(this.a?"ol-grab":"ol-grabbing"),b.classList.add(this.a?"ol-grabbing":"ol-grab")):b.classList.remove("ol-grab","ol-grabbing")}
-function rv(a,b,c){return c.we(b,function(a){if(!this.j||ja(this.j.a,a))return a}.bind(a),{layerFilter:a.C,hitTolerance:a.l})}mv.prototype.B=function(){return this.l};mv.prototype.I=function(a){this.l=a};mv.prototype.setMap=function(a){var b=this.v;Dg.prototype.setMap.call(this,a);tv(this,b)};mv.prototype.u=function(){tv(this,null)};function tv(a,b){var c=a.v;a=a.c();c&&a||(c||(c=b),c.a.classList.remove("ol-grab","ol-grabbing"))}
-function sv(a,b,c){Oc.call(this,a);this.features=b;this.coordinate=c}v(sv,Oc);function V(a){a=a?a:{};var b=tb({},a);delete b.gradient;delete b.radius;delete b.blur;delete b.shadow;delete b.weight;T.call(this,b);this.j=null;this.R=void 0!==a.shadow?a.shadow:250;this.I=void 0;this.B=null;y(this,Vc(uv),this.Bl,this);this.pj(a.gradient?a.gradient:vv);this.jj(void 0!==a.blur?a.blur:15);this.Uc(void 0!==a.radius?a.radius:8);y(this,Vc(wv),this.cg,this);y(this,Vc(xv),this.cg,this);this.cg();var c=a.weight?a.weight:"weight",d;"string"===typeof c?d=function(a){return a.get(c)}:d=c;this.g(function(a){a=
-d(a);a=void 0!==a?Ca(a,0,1):1;var b=255*a|0,c=this.B[b];c||(c=[new bl({image:new eo({opacity:a,src:this.I})})],this.B[b]=c);return c}.bind(this));this.set(Pt,null);y(this,"render",this.Sl,this)}v(V,T);var vv=["#00f","#0ff","#0f0","#ff0","#f00"];k=V.prototype;k.uh=function(){return this.get(wv)};k.Bh=function(){return this.get(uv)};k.yi=function(){return this.get(xv)};
-k.Bl=function(){for(var a=this.Bh(),b=jd(1,256),c=b.createLinearGradient(0,0,1,256),d=1/(a.length-1),e=0,f=a.length;e<f;++e)c.addColorStop(e*d,a[e]);b.fillStyle=c;b.fillRect(0,0,1,256);this.j=b.getImageData(0,0,1,256).data};k.cg=function(){var a=this.yi(),b=this.uh(),c=a+b+1,d=2*c,d=jd(d,d);d.shadowOffsetX=d.shadowOffsetY=this.R;d.shadowBlur=b;d.shadowColor="#000";d.beginPath();b=c-this.R;d.arc(b,b,a,0,2*Math.PI,!0);d.fill();this.I=d.canvas.toDataURL();this.B=Array(256);this.s()};
-k.Sl=function(a){a=a.context;var b=a.canvas,b=a.getImageData(0,0,b.width,b.height),c=b.data,d,e;var f=0;for(d=c.length;f<d;f+=4)if(e=4*c[f+3])c[f]=this.j[e],c[f+1]=this.j[e+1],c[f+2]=this.j[e+2];a.putImageData(b,0,0)};k.jj=function(a){this.set(wv,a)};k.pj=function(a){this.set(uv,a)};k.Uc=function(a){this.set(xv,a)};var wv="blur",uv="gradient",xv="radius";function yv(a){Gt.call(this,a);this.v=Bh();this.j=null}v(yv,Gt);yv.prototype.S=function(a,b,c){It(this,"precompose",c,a,void 0);var d=this.Y();if(d){var e=b.extent,f=void 0!==e&&!Va(e,a.extent)&&qb(e,a.extent);f&&Ht(c,a,e);var e=this.C(),g=c.globalAlpha;c.globalAlpha=b.opacity;c.drawImage(d,0,0,+d.width,+d.height,Math.round(e[4]),Math.round(e[5]),Math.round(d.width*e[0]),Math.round(d.height*e[3]));c.globalAlpha=g;f&&c.restore()}this.ef(c,a,b)};
-yv.prototype.Ea=function(a,b,c,d,e){var f=this.a;return f.ha().Ea(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};
-yv.prototype.u=function(a,b,c,d){if(this.Y()){if(this.a.ha().Ea!==ua)return Gt.prototype.u.apply(this,arguments);var e=Gh(this.v,a.slice());gf(e,b.viewState.resolution/this.f);this.j||(this.j=jd(1,1));this.j.clearRect(0,0,1,1);this.j.drawImage(this.Y(),e[0],e[1],1,1,0,0,1,1);e=this.j.getImageData(0,0,1,1).data;if(0<e[3])return c.call(d,this.a,e)}};function zv(a){yv.call(this,a);this.M=null;this.c=Bh()}v(zv,yv);zv.prototype.Y=function(){return this.M?this.M.Y():null};zv.prototype.C=function(){return this.c};
-zv.prototype.sd=function(a,b){var c=a.pixelRatio,d=a.size,e=a.viewState,f=e.center,g=e.resolution,h=this.a.ha(),l=a.viewHints,m=a.extent;void 0!==b.extent&&(m=pb(m,b.extent));l[0]||l[1]||kb(m)||(b=h.Y(m,g,c,e.projection))&&At(this,b)&&(this.M=b);if(this.M){b=this.M;var l=b.G(),m=b.resolution,e=b.a,n=c*m/(g*e),l=Kh(this.c,c*d[0]/2,c*d[1]/2,n,n,0,e*(l[0]-f[0])/m,e*(f[1]-l[3])/m);Kh(this.v,c*d[0]/2-l[4],c*d[1]/2-l[5],c/g,-c/g,0,-f[0],-f[1]);Ct(a.attributions,b.f);Dt(a,h);this.f=g*c/e}return!!this.M};function Av(a,b,c,d){var e=gc(c,b,a);c=Sb(b,d,c);b=b.sc();void 0!==b&&(c*=b);b=a.sc();void 0!==b&&(c/=b);a=Sb(a,c,e)/c;isFinite(a)&&0<a&&(c/=a);return c}function Bv(a,b,c,d){a=c-a;b=d-b;var e=Math.sqrt(a*a+b*b);return[Math.round(c+a/e),Math.round(d+b/e)]}
-function Cv(a,b,c,d,e,f,g,h,l,m,n){var p=jd(Math.round(c*a),Math.round(c*b));if(!l.length)return p.canvas;p.scale(c,c);var q=Oa();l.forEach(function(a){cb(q,a.extent)});var r=jd(Math.round(c*lb(q)/d),Math.round(c*mb(q)/d)),u=c/d;l.forEach(function(a){r.drawImage(a.image,m,m,a.image.width-2*m,a.image.height-2*m,(a.extent[0]-q[0])*u,-(a.extent[3]-q[3])*u,lb(a.extent)*u,mb(a.extent)*u)});var x=ib(g);h.c.forEach(function(a){var b=a.source,e=a.target,g=b[1][0],h=b[1][1],l=b[2][0],m=b[2][1];a=(e[0][0]-
-x[0])/f;var n=-(e[0][1]-x[1])/f,u=(e[1][0]-x[0])/f,B=-(e[1][1]-x[1])/f,da=(e[2][0]-x[0])/f,fb=-(e[2][1]-x[1])/f,e=b[0][0],b=b[0][1],g=g-e,h=h-b,l=l-e,m=m-b;a:{g=[[g,h,0,0,u-a],[l,m,0,0,da-a],[0,0,g,h,B-n],[0,0,l,m,fb-n]];h=g.length;for(l=0;l<h;l++){for(var m=l,ca=Math.abs(g[l][l]),Ub=l+1;Ub<h;Ub++){var uc=Math.abs(g[Ub][l]);uc>ca&&(ca=uc,m=Ub)}if(!ca){g=null;break a}ca=g[m];g[m]=g[l];g[l]=ca;for(m=l+1;m<h;m++)for(ca=-g[m][l]/g[l][l],Ub=l;Ub<h+1;Ub++)g[m][Ub]=l==Ub?0:g[m][Ub]+ca*g[l][Ub]}l=Array(h);
-for(m=h-1;0<=m;m--)for(l[m]=g[m][h]/g[m][m],ca=m-1;0<=ca;ca--)g[ca][h]-=g[ca][m]*l[m];g=l}g&&(p.save(),p.beginPath(),l=(a+u+da)/3,m=(n+B+fb)/3,h=Bv(l,m,a,n),u=Bv(l,m,u,B),da=Bv(l,m,da,fb),p.moveTo(u[0],u[1]),p.lineTo(h[0],h[1]),p.lineTo(da[0],da[1]),p.clip(),p.transform(g[0],g[2],g[1],g[3],a,n),p.translate(q[0]-e,q[3]-b),p.scale(d/c,-d/c),p.drawImage(r.canvas,0,0),p.restore())});n&&(p.save(),p.strokeStyle="black",p.lineWidth=1,h.c.forEach(function(a){var b=a.target;a=(b[0][0]-x[0])/f;var c=-(b[0][1]-
-x[1])/f,d=(b[1][0]-x[0])/f,e=-(b[1][1]-x[1])/f,g=(b[2][0]-x[0])/f,b=-(b[2][1]-x[1])/f;p.beginPath();p.moveTo(d,e);p.lineTo(a,c);p.lineTo(g,b);p.closePath();p.stroke()}),p.restore());return p.canvas};function Dv(a,b,c,d,e){this.i=a;this.f=b;var f={},g=ec(this.f,this.i);this.a=function(a){var b=a[0]+"/"+a[1];f[b]||(f[b]=g(a));return f[b]};this.g=d;this.v=e*e;this.c=[];this.o=!1;this.l=this.i.i&&!!d&&!!this.i.G()&&lb(d)==lb(this.i.G());this.b=this.i.G()?lb(this.i.G()):null;this.j=this.f.G()?lb(this.f.G()):null;a=ib(c);b=hb(c);d=gb(c);c=eb(c);e=this.a(a);var h=this.a(b),l=this.a(d),m=this.a(c);Ev(this,a,b,d,c,e,h,l,m,10);if(this.o){var n=Infinity;this.c.forEach(function(a){n=Math.min(n,a.source[0][0],
-a.source[1][0],a.source[2][0])});this.c.forEach(function(a){if(Math.max(a.source[0][0],a.source[1][0],a.source[2][0])-n>this.b/2){var b=[[a.source[0][0],a.source[0][1]],[a.source[1][0],a.source[1][1]],[a.source[2][0],a.source[2][1]]];b[0][0]-n>this.b/2&&(b[0][0]-=this.b);b[1][0]-n>this.b/2&&(b[1][0]-=this.b);b[2][0]-n>this.b/2&&(b[2][0]-=this.b);Math.max(b[0][0],b[1][0],b[2][0])-Math.min(b[0][0],b[1][0],b[2][0])<this.b/2&&(a.source=b)}},this)}f={}}
-function Ev(a,b,c,d,e,f,g,h,l,m){var n=Na([f,g,h,l]),p=a.b?lb(n)/a.b:null,q=a.b,r=a.i.i&&.5<p&&1>p,u=!1;if(0<m){if(a.f.c&&a.j)var x=Na([b,c,d,e]),u=u|.25<lb(x)/a.j;!r&&a.i.c&&p&&(u|=.25<p)}if(u||!a.g||qb(n,a.g)){if(!(u||isFinite(f[0])&&isFinite(f[1])&&isFinite(g[0])&&isFinite(g[1])&&isFinite(h[0])&&isFinite(h[1])&&isFinite(l[0])&&isFinite(l[1])))if(0<m)u=!0;else return;if(0<m&&(u||(n=a.a([(b[0]+d[0])/2,(b[1]+d[1])/2]),q=r?(Ia(f[0],q)+Ia(h[0],q))/2-Ia(n[0],q):(f[0]+h[0])/2-n[0],n=(f[1]+h[1])/2-n[1],
-u=q*q+n*n>a.v),u)){Math.abs(b[0]-d[0])<=Math.abs(b[1]-d[1])?(r=[(c[0]+d[0])/2,(c[1]+d[1])/2],q=a.a(r),n=[(e[0]+b[0])/2,(e[1]+b[1])/2],p=a.a(n),Ev(a,b,c,r,n,f,g,q,p,m-1),Ev(a,n,r,d,e,p,q,h,l,m-1)):(r=[(b[0]+c[0])/2,(b[1]+c[1])/2],q=a.a(r),n=[(d[0]+e[0])/2,(d[1]+e[1])/2],p=a.a(n),Ev(a,b,r,n,e,f,q,p,l,m-1),Ev(a,r,c,d,n,q,g,h,p,m-1));return}if(r){if(!a.l)return;a.o=!0}a.c.push({source:[f,h,l],target:[b,d,e]});a.c.push({source:[f,g,h],target:[b,c,d]})}}
-function Fv(a){var b=Oa();a.c.forEach(function(a){a=a.source;Pa(b,a[0]);Pa(b,a[1]);Pa(b,a[2])});return b};function Gv(a,b,c,d,e,f){this.v=b;this.l=a.G();var g=b.G(),h=g?pb(c,g):c,g=Av(a,b,nb(h),d);this.j=new Dv(a,b,h,this.l,.5*g);this.c=d;this.i=c;a=Fv(this.j);this.o=(this.Hb=f(a,g,e))?this.Hb.a:1;this.ee=this.g=null;e=2;f=[];this.Hb&&(e=0,f=this.Hb.f);Is.call(this,c,d,this.o,e,f)}v(Gv,Is);Gv.prototype.ka=function(){1==this.state&&(Ec(this.ee),this.ee=null);Is.prototype.ka.call(this)};Gv.prototype.Y=function(){return this.g};
-Gv.prototype.de=function(){var a=this.Hb.getState();2==a&&(this.g=Cv(lb(this.i)/this.c,mb(this.i)/this.c,this.o,this.Hb.resolution,0,this.c,this.i,this.j,[{extent:this.Hb.G(),image:this.Hb.Y()}],0));this.state=a;this.s()};Gv.prototype.load=function(){if(0==this.state){this.state=1;this.s();var a=this.Hb.getState();2==a||3==a?this.de():(this.ee=y(this.Hb,"change",function(){var a=this.Hb.getState();if(2==a||3==a)Ec(this.ee),this.ee=null,this.de()},this),this.Hb.load())}};function Hv(a){$t.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.C=void 0!==a.resolutions?a.resolutions:null;this.a=null;this.fa=0}v(Hv,$t);function Iv(a,b){a.C&&(b=a.C[ka(a.C,b,0)]);return b}
-Hv.prototype.Y=function(a,b,c,d){var e=this.c;if(e&&d&&!dc(e,d)){if(this.a){if(this.fa==this.i&&dc(this.a.v,d)&&this.a.resolution==b&&this.a.a==c&&bb(this.a.G(),a))return this.a;Nc(this.a);this.a=null}this.a=new Gv(e,d,a,b,c,function(a,b,c){return this.Jc(a,b,c,e)}.bind(this));this.fa=this.i;return this.a}e&&(d=e);return this.Jc(a,b,c,d)};Hv.prototype.o=function(a){a=a.target;switch(a.getState()){case 1:this.b(new Jv(Kv,a));break;case 2:this.b(new Jv(Lv,a));break;case 3:this.b(new Jv(Mv,a))}};
-function Nv(a,b){a.Y().src=b}function Jv(a,b){Oc.call(this,a);this.image=b}v(Jv,Oc);var Kv="imageloadstart",Lv="imageloadend",Mv="imageloaderror";function Ov(a){Hv.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions,state:a.state});this.pa=a.canvasFunction;this.R=null;this.T=0;this.va=void 0!==a.ratio?a.ratio:1.5}v(Ov,Hv);Ov.prototype.Jc=function(a,b,c,d){b=Iv(this,b);var e=this.R;if(e&&this.T==this.i&&e.resolution==b&&e.a==c&&Va(e.G(),a))return e;a=a.slice();rb(a,this.va);(d=this.pa(a,b,c,[lb(a)/b*c,mb(a)/b*c],d))&&(e=new Ks(a,b,c,this.j,d));this.R=e;this.T=this.i;return e};function Pv(a){this.f=a.source;this.$a=Bh();this.g=jd();this.l=[0,0];this.Sa=void 0==a.renderBuffer?100:a.renderBuffer;this.B=null;Ov.call(this,{attributions:a.attributions,canvasFunction:this.tk.bind(this),logo:a.logo,projection:a.projection,ratio:a.ratio,resolutions:a.resolutions,state:this.f.getState()});this.I=null;this.v=void 0;this.Ii(a.style);y(this.f,"change",this.ro,this)}v(Pv,Ov);k=Pv.prototype;
-k.tk=function(a,b,c,d,e){var f=new pt(.5*b/c,a,b,this.f.T,this.Sa);this.f.Yd(a,b,e);var g=!1;this.f.$b(a,function(a){var d;if(!(d=g)){var e;(d=a.Lc())?e=d.call(a,b):this.v&&(e=this.v(a,b));if(e){var h,p=!1;Array.isArray(e)||(e=[e]);d=0;for(h=e.length;d<h;++d)p=Mt(f,a,e[d],Lt(b,c),this.qo,this)||p;d=p}else d=!1}g=d},this);tt(f);if(g)return null;this.l[0]!=d[0]||this.l[1]!=d[1]?(this.g.canvas.width=d[0],this.g.canvas.height=d[1],this.l[0]=d[0],this.l[1]=d[1]):this.g.clearRect(0,0,d[0],d[1]);a=Qv(this,
-nb(a),b,c,d);f.La(this.g,c,a,0,{});this.B=f;return this.g.canvas};k.Ea=function(a,b,c,d,e,f){if(this.B){var g={};return this.B.Ea(a,b,0,d,e,function(a){var b=w(a).toString();if(!(b in g))return g[b]=!0,f(a)})}};k.no=function(){return this.f};k.oo=function(){return this.I};k.po=function(){return this.v};function Qv(a,b,c,d,e){c=d/c;return Kh(a.$a,e[0]/2,e[1]/2,c,-c,0,-b[0],-b[1])}k.qo=function(){this.s()};k.ro=function(){bu(this,this.f.getState())};
-k.Ii=function(a){this.I=void 0!==a?a:fl;this.v=a?dl(this.I):void 0;this.s()};function Rv(a,b){Vt.call(this,a,b);this.o=this.f=this.M=null}v(Rv,Vt);function Sv(a,b){b=b.Y();return Ti(a.c.i,b)}Rv.prototype.Ea=function(a,b,c,d,e){var f=this.a;return f.ha().Ea(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};
-Rv.prototype.ng=function(a,b){var c=this.c.i,d=a.pixelRatio,e=a.viewState,f=e.center,g=e.resolution,h=e.rotation,l=this.M,m=this.Ib,n=this.a.ha(),p=a.viewHints,q=a.extent;void 0!==b.extent&&(q=pb(q,b.extent));p[0]||p[1]||kb(q)||(b=n.Y(q,g,d,e.projection))&&At(this,b)&&(l=b,m=Sv(this,b),this.Ib&&a.postRenderFunctions.push(function(a,b){a.isContextLost()||a.deleteTexture(b)}.bind(null,c,this.Ib)));l&&(c=this.c.f.j,Tv(this,c.width,c.height,d,f,g,h,l.G()),this.o=null,d=this.v,Ch(d),Ih(d,1,-1),Jh(d,0,
--1),this.M=l,this.Ib=m,Ct(a.attributions,l.f),Dt(a,n));return!!l};function Tv(a,b,c,d,e,f,g,h){b*=f;c*=f;a=a.S;Ch(a);Ih(a,2*d/b,2*d/c);Hh(a,-g);Jh(a,h[0]-e[0],h[1]-e[1]);Ih(a,(h[2]-h[0])/2,(h[3]-h[1])/2);Jh(a,1,1)}Rv.prototype.Ue=function(a,b){return void 0!==this.Ea(a,b,0,mf,this)};
-Rv.prototype.lg=function(a,b,c,d){if(this.M&&this.M.Y())if(this.a.ha()instanceof Pv){var e=Gh(b.pixelToCoordinateTransform,a.slice());if(this.Ea(e,b,0,mf,this))return c.call(d,this.a,null)}else{e=[this.M.Y().width,this.M.Y().height];if(!this.o){var f=b.size;b=Bh();Jh(b,-1,-1);Ih(b,2/f[0],2/f[1]);Jh(b,0,f[1]);Ih(b,1,-1);var f=Lh(this.S.slice()),g=Bh();Jh(g,0,e[1]);Ih(g,1,-1);Ih(g,e[0]/2,e[1]/2);Jh(g,1,1);Eh(g,f);Eh(g,b);this.o=g}a=Gh(this.o,a.slice());if(!(0>a[0]||a[0]>e[0]||0>a[1]||a[1]>e[1])&&(this.f||
-(this.f=jd(1,1)),this.f.clearRect(0,0,1,1),this.f.drawImage(this.M.Y(),a[0],a[1],1,1,0,0,1,1),e=this.f.getImageData(0,0,1,1).data,0<e[3]))return c.call(d,this.a,e)}};function Uv(a){wh.call(this,a?a:{})}v(Uv,wh);Uv.prototype.Fd=function(a){var b=null,c=a.U();"canvas"===c?b=new zv(this):"webgl"===c&&(b=new Rv(a,this));return b};function Vv(a){yv.call(this,a);this.c=null===this.c?null:jd();this.o=null;this.g=[];this.l=Oa();this.va=new ya(0,0,0,0);this.B=Bh();this.T=0}v(Vv,yv);function Wv(a,b){b=b.getState();a=a.a.kd();return 2==b||4==b||3==b&&!a}
-Vv.prototype.sd=function(a,b){var c=a.pixelRatio,d=a.size,e=a.viewState,f=e.projection,g=e.resolution,e=e.center,h=this.a,l=h.ha(),m=l.i,n=l.Ta(f),p=n.tc(g,this.T),q=n.Da(p),r=Math.round(g/q)||1,u=a.extent;void 0!==b.extent&&(u=pb(u,b.extent));if(kb(u))return!1;var x=rc(n,u,q);var B=n.Pc(p);var E=n.Da(p),A=Ma(n.gb(p),n.j);B=Xa(B[0]+x.ca*A[0]*E,B[1]+x.da*A[1]*E,B[0]+(x.$+1)*A[0]*E,B[1]+(x.ia+1)*A[1]*E,void 0);E=l.nb(c);A={};A[p]={};var L=this.Nf(l,f,A),oa=this.l,ha=this.va,ga=!1,z,M;for(z=x.ca;z<=
-x.$;++z)for(M=x.da;M<=x.ia;++M){var ba=l.Nc(p,z,M,c,f);3!=ba.getState()||this.a.kd()||Ns(ba,2);Wv(this,ba)||(ba=Ms(ba));Wv(this,ba)?2==ba.getState()&&(A[p][ba.ta.toString()]=ba,ga||-1!=this.g.indexOf(ba)||(ga=!0)):pc(n,ba.ta,L,ha,oa)||(ba=qc(n,ba.ta,ha,oa))&&L(p+1,ba)}z=a.viewHints;z=z[0]||z[1];if(!(this.f&&16<Date.now()-a.time&&z||!ga&&this.o&&Va(this.o,u)&&this.mf==m&&r==this.R&&(z||q*c/E*r==this.f))){if(z=this.c)M=l.Xd(p,c,f),ba=Math.round((x.$-x.ca+1)*M[0]/r),M=Math.round((x.ia-x.da+1)*M[1]/r),
-ga=z.canvas,ga.width!=ba||ga.height!=M?(this.R=r,ga.width=ba,ga.height=M):(z.clearRect(0,0,ba,M),r=this.R);this.g.length=0;ga=Object.keys(A).map(Number);ga.sort(ia);var da,ha=0;for(da=ga.length;ha<da;++ha){z=ga[ha];L=l.Xd(z,c,f);ba=n.Da(z);var fb=ba/q;var ca=E*l.Wf(f);var Ub=A[z];for(var uc in Ub){ba=Ub[uc];M=n.Aa(ba.ta,oa);z=(M[0]-B[0])/q*E/r;M=(B[3]-M[3])/q*E/r;var bc=L[0]*fb/r;var Je=L[1]*fb/r;this.Of(ba,a,b,z,M,bc,Je,ca);this.g.push(ba)}}this.mf=m;this.f=q*c/E*r;this.o=B}b=this.f/g;b=Kh(this.B,
-c*d[0]/2,c*d[1]/2,b,b,0,(this.o[0]-e[0])/this.f*c,(e[1]-this.o[3])/this.f*c);Kh(this.v,c*d[0]/2-b[4],c*d[1]/2-b[5],c/g,-c/g,0,-e[0],-e[1]);Et(a.usedTiles,l,p,x);Ft(a,l,n,c,f,u,p,h.Ud());Bt(a,l);Dt(a,l);return 0<this.g.length};Vv.prototype.Of=function(a,b,c,d,e,f,g,h){this.a.ha().Zf(b.viewState.projection)||this.c.clearRect(d,e,f,g);(a=a.Y())&&this.c.drawImage(a,h,h,a.width-2*h,a.height-2*h,d,e,f,g)};Vv.prototype.Y=function(){var a=this.c;return a?a.canvas:null};Vv.prototype.C=function(){return this.B};function Xv(){this.b="precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}"}v(Xv,mi);var Yv=new Xv;function Zv(){this.b="varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}"}v(Zv,ni);var $v=new Zv;function aw(a,b){this.i=a.getUniformLocation(b,"e");this.c=a.getUniformLocation(b,"d");this.b=a.getAttribLocation(b,"b");this.a=a.getAttribLocation(b,"c")};function bw(a,b){Vt.call(this,a,b);this.I=Yv;this.fa=$v;this.f=null;this.B=new Di([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]);this.D=this.o=null;this.l=-1;this.R=[0,0]}v(bw,Vt);k=bw.prototype;k.ka=function(){Gi(this.c.f,this.B);Vt.prototype.ka.call(this)};k.Nf=function(a,b,c){var d=this.c;return function(e,f){return yt(a,b,e,f,function(a){var b=d.a.b.hasOwnProperty(a.bb());b&&(c[e]||(c[e]={}),c[e][a.ta.toString()]=a);return b})}};k.mg=function(){Vt.prototype.mg.call(this);this.f=null};
-k.ng=function(a,b,c){var d=this.c,e=c.b,f=a.viewState,g=f.projection,h=this.a,l=h.ha(),m=l.Ta(g),n=m.tc(f.resolution),p=m.Da(n),q=l.Xd(n,a.pixelRatio,g),r=q[0]/Ma(m.gb(n),this.R)[0],u=p/r,x=l.nb(r)*l.Wf(g),B=f.center,E=a.extent,A=rc(m,E,p);if(this.o&&Aa(this.o,A)&&this.l==l.i)u=this.D;else{var L=[A.$-A.ca+1,A.ia-A.da+1],oa=Ea(Math.max(L[0]*q[0],L[1]*q[1])),L=u*oa,ha=m.Pc(n),ga=ha[0]+A.ca*q[0]*u,u=ha[1]+A.da*q[1]*u,u=[ga,u,ga+L,u+L];Wt(this,a,oa);e.viewport(0,0,oa,oa);e.clearColor(0,0,0,0);e.clear(16384);
-e.disable(3042);oa=Hi(c,this.I,this.fa);c.Qc(oa);this.f||(this.f=new aw(e,oa));wi(c,34962,this.B);e.enableVertexAttribArray(this.f.b);e.vertexAttribPointer(this.f.b,2,5126,!1,16,0);e.enableVertexAttribArray(this.f.a);e.vertexAttribPointer(this.f.a,2,5126,!1,16,8);e.uniform1i(this.f.i,0);c={};c[n]={};var z=this.Nf(l,g,c),M=h.kd(),oa=!0,ga=Oa(),ba=new ya(0,0,0,0),da,fb;for(da=A.ca;da<=A.$;++da)for(fb=A.da;fb<=A.ia;++fb){ha=l.Nc(n,da,fb,r,g);if(void 0!==b.extent){var ca=m.Aa(ha.ta,ga);if(!qb(ca,b.extent))continue}ca=
-ha.getState();(ca=2==ca||4==ca||3==ca&&!M)||(ha=Ms(ha));ca=ha.getState();if(2==ca){if(d.a.b.hasOwnProperty(ha.bb())){c[n][ha.ta.toString()]=ha;continue}}else if(4==ca||3==ca&&!M)continue;oa=!1;ca=pc(m,ha.ta,z,ba,ga);ca||(ha=qc(m,ha.ta,ba,ga))&&z(n+1,ha)}b=Object.keys(c).map(Number);b.sort(ia);for(var z=new Float32Array(4),Ub,M=0,ba=b.length;M<ba;++M)for(Ub in da=c[b[M]],da)ha=da[Ub],ca=m.Aa(ha.ta,ga),z[0]=2*(ca[2]-ca[0])/L,z[1]=2*(ca[3]-ca[1])/L,z[2]=2*(ca[0]-u[0])/L-1,z[3]=2*(ca[1]-u[1])/L-1,e.uniform4fv(this.f.c,
-z),nk(d,ha,q,x*r),e.drawArrays(5,0,4);oa?(this.o=A,this.D=u,this.l=l.i):(this.D=this.o=null,this.l=-1,a.animate=!0)}Et(a.usedTiles,l,n,A);var uc=d.j;Ft(a,l,m,r,g,E,n,h.Ud(),function(a){2!=a.getState()||d.a.b.hasOwnProperty(a.bb())||a.bb()in uc.a||uc.f([a,tc(m,a.ta),m.Da(a.ta[0]),q,x*r])},this);Bt(a,l);Dt(a,l);e=this.v;Ch(e);Jh(e,(Math.round(B[0]/p)*p-u[0])/(u[2]-u[0]),(Math.round(B[1]/p)*p-u[1])/(u[3]-u[1]));f.rotation&&Hh(e,f.rotation);Ih(e,a.size[0]*f.resolution/(u[2]-u[0]),a.size[1]*f.resolution/
-(u[3]-u[1]));Jh(e,-.5,-.5);return!0};k.lg=function(a,b,c,d){if(this.g){a=Gh(this.v,[a[0]/b.size[0],(b.size[1]-a[1])/b.size[1]].slice());a=[a[0]*this.j,a[1]*this.j];b=this.c.f.b;b.bindFramebuffer(b.FRAMEBUFFER,this.g);var e=new Uint8Array(4);b.readPixels(a[0],a[1],1,1,b.RGBA,b.UNSIGNED_BYTE,e);if(0<e[3])return c.call(d,this.a,e)}};function cw(a){a=a?a:{};var b=tb({},a);delete b.preload;delete b.useInterimTilesOnError;wh.call(this,b);this.zi(void 0!==a.preload?a.preload:0);this.Ai(void 0!==a.useInterimTilesOnError?a.useInterimTilesOnError:!0)}v(cw,wh);k=cw.prototype;k.Fd=function(a){var b=null,c=a.U();"canvas"===c?b=new Vv(this):"webgl"===c&&(b=new bw(a,this));return b};k.Ud=function(){return this.get("preload")};k.zi=function(a){this.set("preload",a)};k.kd=function(){return this.get("useInterimTilesOnError")};
-k.Ai=function(a){this.set("useInterimTilesOnError",a)};function dw(a){this.c=null;Vv.call(this,a);this.I=!1;this.D=Bh();this.T="vector"==a.j?1:0}v(dw,Vv);var ew={image:ji,hybrid:["Polygon","LineString"]},fw={hybrid:["Image","Text"],vector:ji};k=dw.prototype;k.sd=function(a,b){var c=this.a,d=c.i;this.pa!=d&&(this.g.length=0,c=c.j,this.c||"vector"==c||(this.c=jd()),this.c&&"vector"==c&&(this.c=null));this.pa=d;return Vv.prototype.sd.apply(this,arguments)};
-k.Of=function(a,b,c,d,e,f,g,h){var l=a,m=this.a,n=b.pixelRatio,p=b.viewState.projection,q=m.i,r=m.get(Pt)||null,u=l.o;if(u.Nd||u.mf!=q||u.Kg!=r){for(var x=0,B=l.a.length;x<B;++x){var E=l.c[l.a[x]];E.S=null;u.Nd=!1;var A=m.ha(),L=A.tileGrid,oa=E.ta,ha=E.a,ga=A.Ta(p),z=ga.Da(l.ta[0]),M=L.Da(E.ta[0]),ga=ga.Aa(l.v),oa=L.Aa(oa),ga=pb(ga,oa);if("tile-pixels"==ha.a)var ba=L=A.nb(),M=Kh(this.D,0,0,1/M*ba,-1/M*ba,0,-oa[0],-oa[3]),M=Gh(M,[ga[0],ga[3]]).concat(Gh(M,[ga[2],ga[1]]));else if(L=z,M=ga,!dc(p,ha)){var da=
-!0;E.ig(p)}u.Nd=!1;A=new pt(0,M,L,A.l,m.c);M=Lt(L,n);L=E.g;r&&r!==u.Kg&&L.sort(r);oa=0;for(ga=L.length;oa<ga;++oa){ba=L[oa];da&&ba.V().tb(ha,p);var fb=void 0,ca=ba.Lc();ca?fb=ca.call(ba,z):(ca=m.f)&&(fb=ca(ba,z));if(fb){Array.isArray(fb)||(fb=[fb]);var ca=M,Ub=A;if(fb){var uc=!1;if(Array.isArray(fb))for(var bc=0,Je=fb.length;bc<Je;++bc)uc=Mt(Ub,ba,fb[bc],ca,this.Fi,this)||uc;else uc=Mt(Ub,ba,fb,ca,this.Fi,this)||uc;ba=uc}else ba=!1;this.I=this.I||ba;u.Nd=u.Nd||ba}}tt(A);E.c[l.ta.toString()]=A}u.mf=
-q;u.Kg=r}if(this.c){x=b;p=this.a;n=l.o;q=p.i;if((m=ew[p.j])&&n.Lg!==q)for(n.Lg=q,B=l.v,E=B[0],n=x.pixelRatio,z=p.ha(),p=z.tileGrid,ha=z.Ta(x.viewState.projection),q=ha.Da(E),r=z.nb(),l.j||(l.j=jd()),u=l.j,x=z.Xd(E,n,x.viewState.projection),u.canvas.width=x[0],u.canvas.height=x[1],x=ha.Aa(B),B=0,E=l.a.length;B<E;++B)ha=l.c[l.a[B]],A=ha.ta,da=n/q,z=Ch(this.D),"tile-pixels"==ha.a.a?(da=p.Aa(A,this.l),A=p.Da(A[0]),M=n/r*A/q,Ih(z,M,M),Jh(z,Math.round((da[0]-x[0])/A*r),Math.round((x[3]-da[3])/A*r))):(Ih(z,
-da,-da),Jh(z,-x[0],-x[3])),ha.c[l.ta.toString()].La(u,n,z,0,{},m);Vv.prototype.Of.apply(this,arguments)}};
-k.Ea=function(a,b,c,d,e){var f=b.viewState.resolution,g=b.viewState.rotation;c=void 0==c?0:c;var h=this.a,l={},m=this.g,n=h.ha();b=n.Ta(b.viewState.projection);var p=n.tileGrid,q;var r=0;for(q=m.length;r<q;++r){var u=m[r];var x=u.ta;x=b.Aa(x,this.l);var B=Qa(x,c*f,B);if(Ta(B,a)){x=0;for(var E=u.a.length;x<E;++x){var A=u.c[u.a[x]];if("tile-pixels"===A.a.a){var L=A.ta;f=p.Aa(L,this.l);var oa=ib(f);f=n.nb();L=p.Da(L[0])/f;oa=[(a[0]-oa[0])/L,(oa[1]-a[1])/L]}else oa=a;A=A.c[u.ta];var ha=ha||A.Ea(oa,f,
-g,c,{},function(a){var b=w(a).toString();if(!(b in l))return l[b]=!0,d.call(e,a,h)})}}}return ha};k.Fi=function(){zt(this)};
-k.ef=function(a,b,c){var d=this.a,e=d.ha(),f=fw[d.j];if(f)for(var g=b.pixelRatio,h=b.viewState.rotation,l=b.size,m=Math.round(g*l[0]/2),l=Math.round(g*l[1]/2),n=this.g,d=d.ha().nb(),p=e.tileGrid,e=e.Ta(b.viewState.projection),q=[],r=[],u=n.length-1;0<=u;--u){var x=n[u];if(5!=x.getState())for(var B=x.ta,E=e.Aa(B)[0]-e.Aa(x.v)[0],A=0,L=x.a.length;A<L;++A){var oa=x.c[x.a[A]],ha=oa.ta[0],ga=p.Da(ha);var z=oa;var M=b;if("tile-pixels"==z.a.a){var ba=this.a.ha(),da=ba.tileGrid,fb=z.ta,ba=da.Da(fb[0])/ba.nb(),
-z=M.viewState,ca=M.pixelRatio,Ub=z.resolution/ca,fb=da.Aa(fb,this.l),da=z.center,fb=ib(fb);M=M.size;M=Kh(this.D,Math.round(ca*M[0]/2),Math.round(ca*M[1]/2),ba/Ub,ba/Ub,z.rotation,(fb[0]-da[0])/ba,(da[1]-fb[1])/ba)}else M=Jt(this,M,0);Jh(M,E*d/ga,0);oa=oa.c[B.toString()];ga=vt(oa,M);a.save();a.globalAlpha=c.opacity;Vh(a,-h,m,l);ba=0;for(z=q.length;ba<z;++ba)ca=q[ba],ha<r[ba]&&(a.beginPath(),a.moveTo(ga[0],ga[1]),a.lineTo(ga[2],ga[3]),a.lineTo(ga[4],ga[5]),a.lineTo(ga[6],ga[7]),a.moveTo(ca[6],ca[7]),
-a.lineTo(ca[4],ca[5]),a.lineTo(ca[2],ca[3]),a.lineTo(ca[0],ca[1]),a.clip());oa.La(a,g,M,h,{},f);a.restore();q.push(ga);r.push(ha)}}Vv.prototype.ef.apply(this,arguments)};function W(a){a=a?a:{};var b=tb({},a);delete b.preload;delete b.useInterimTilesOnError;T.call(this,b);this.Bi(a.preload?a.preload:0);this.Ci(a.useInterimTilesOnError?a.useInterimTilesOnError:!0);xa(void 0==a.renderMode||"image"==a.renderMode||"hybrid"==a.renderMode||"vector"==a.renderMode,28);this.j=a.renderMode||"hybrid"}v(W,T);k=W.prototype;k.Fd=function(a){var b=null;"canvas"===a.U()&&(b=new dw(this));return b};k.Ud=function(){return this.get("preload")};k.kd=function(){return this.get("useInterimTilesOnError")};
-k.Bi=function(a){this.set("preload",a)};k.Ci=function(a){this.set("useInterimTilesOnError",a)};function gw(a,b,c,d){function e(){delete window[g];f.parentNode.removeChild(f)}var f=document.createElement("script"),g="olc_"+w(b);f.async=!0;f.src=a+(-1==a.indexOf("?")?"?":"&")+(d||"callback")+"="+g;var h=setTimeout(function(){e();c&&c()},1E4);window[g]=function(a){clearTimeout(h);e();b(a)};document.getElementsByTagName("head")[0].appendChild(f)};function hw(a,b,c,d,e,f,g,h,l,m,n){Ls.call(this,e,0);this.D=void 0!==n?n:!1;this.S=g;this.u=h;this.v=null;this.c=b;this.j=d;this.o=f?f:e;this.a=[];this.yd=null;this.g=0;f=d.Aa(this.o);h=this.j.G();e=this.c.G();f=h?pb(f,h):f;if(jb(f))if((h=a.G())&&(e?e=pb(e,h):e=h),d=Av(a,c,nb(f),d.Da(this.o[0])),!isFinite(d)||0>=d)this.state=4;else if(this.l=new Dv(a,c,f,e,d*(void 0!==m?m:.5)),this.l.c.length)if(this.g=b.tc(d),c=Fv(this.l),e&&(a.i?(c[1]=Ca(c[1],e[1],e[3]),c[3]=Ca(c[3],e[1],e[3])):c=pb(c,e)),jb(c)){a=
-oc(b,c,this.g);for(b=a.ca;b<=a.$;b++)for(c=a.da;c<=a.ia;c++)(m=l(this.g,b,c,g))&&this.a.push(m);this.a.length||(this.state=4)}else this.state=4;else this.state=4;else this.state=4}v(hw,Ls);hw.prototype.ka=function(){1==this.state&&(this.yd.forEach(Ec),this.yd=null);Ls.prototype.ka.call(this)};hw.prototype.Y=function(){return this.v};
-hw.prototype.de=function(){var a=[];this.a.forEach(function(b){b&&2==b.getState()&&a.push({extent:this.c.Aa(b.ta),image:b.Y()})},this);this.a.length=0;if(a.length){var b=this.o[0],c=this.j.gb(b),d="number"===typeof c?c:c[0],c="number"===typeof c?c:c[1],b=this.j.Da(b),e=this.c.Da(this.g),f=this.j.Aa(this.o);this.v=Cv(d,c,this.S,e,this.c.G(),b,f,this.l,a,this.u,this.D);this.state=2}else this.state=3;this.s()};
-hw.prototype.load=function(){if(0==this.state){this.state=1;this.s();var a=0;this.yd=[];this.a.forEach(function(b){var c=b.getState();if(0==c||1==c){a++;var d=y(b,"change",function(){var c=b.getState();if(2==c||3==c||4==c)Ec(d),a--,a||(this.yd.forEach(Ec),this.yd=null,this.de())},this);this.yd.push(d)}},this);this.a.forEach(function(a){0==a.getState()&&a.load()});a||setTimeout(this.de.bind(this),0)}};function iw(a,b){var c=/\{z\}/g,d=/\{x\}/g,e=/\{y\}/g,f=/\{-y\}/g;return function(g){if(g)return a.replace(c,g[0].toString()).replace(d,g[1].toString()).replace(e,function(){return(-g[2]-1).toString()}).replace(f,function(){var a=b.a?b.a[g[0]]:null;xa(a,55);return(a.ia-a.da+1+g[2]).toString()})}}function jw(a,b){for(var c=a.length,d=Array(c),e=0;e<c;++e)d[e]=iw(a[e],b);return kw(d)}function kw(a){return 1===a.length?a[0]:function(b,c,d){if(b)return a[Ia((b[1]<<b[0])+b[2],a.length)](b,c,d)}}
-function lw(){}function mw(a){var b=[],c=/\{([a-z])-([a-z])\}/.exec(a);if(c){var d=c[2].charCodeAt(0),e;for(e=c[1].charCodeAt(0);e<=d;++e)b.push(a.replace(c[0],String.fromCharCode(e)));return b}if(c=c=/\{(\d+)-(\d+)\}/.exec(a)){d=parseInt(c[2],10);for(e=parseInt(c[1],10);e<=d;e++)b.push(a.replace(c[0],e.toString()));return b}b.push(a);return b};function nw(a){lk.call(this);this.highWaterMark=void 0!==a?a:2048}v(nw,lk);function ow(a){return a.c>a.highWaterMark}nw.prototype.fd=function(a){for(var b,c;ow(this);){b=this.a.Yc;c=b.ta[0].toString();var d;if(d=c in a)b=b.ta,d=za(a[c],b[1],b[2]);if(d)break;else Nc(this.pop())}};function pw(a){$t.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state,wrapX:a.wrapX});this.va=void 0!==a.opaque?a.opaque:!1;this.$a=void 0!==a.tilePixelRatio?a.tilePixelRatio:1;this.tileGrid=void 0!==a.tileGrid?a.tileGrid:null;this.a=new nw(a.cacheSize);this.o=[0,0];this.uc=""}v(pw,$t);k=pw.prototype;k.Ki=function(){return ow(this.a)};k.fd=function(a,b){(a=this.Wd(a))&&a.fd(b)};
-function yt(a,b,c,d,e){b=a.Wd(b);if(!b)return!1;for(var f=!0,g,h,l=d.ca;l<=d.$;++l)for(var m=d.da;m<=d.ia;++m)g=a.Sb(c,l,m),h=!1,b.b.hasOwnProperty(g)&&(g=b.get(g),(h=2===g.getState())&&(h=!1!==e(g))),h||(f=!1);return f}k.Wf=function(){return 0};function qw(a,b){a.uc!==b&&(a.uc=b,a.s())}k.Sb=function(a,b,c){return a+"/"+b+"/"+c};k.Zf=function(){return this.va};k.ab=function(){return this.tileGrid};k.Ta=function(a){return this.tileGrid?this.tileGrid:vc(a)};
-k.Wd=function(a){var b=this.c;return b&&!dc(b,a)?null:this.a};k.nb=function(){return this.$a};k.Xd=function(a,b,c){c=this.Ta(c);b=this.nb(b);a=Ma(c.gb(a),this.o);return 1==b?a:La(a,b,this.o)};function rw(a,b,c){var d=void 0!==c?c:a.c;c=a.Ta(d);if(a.u&&d.c){var e=b;b=e[0];a=tc(c,e);d=zc(d);Ta(d,a)?b=e:(e=lb(d),a[0]+=e*Math.ceil((d[0]-a[0])/e),b=c.bg(a,b))}e=b[0];d=b[1];a=b[2];if(c.minZoom>e||e>c.maxZoom)c=!1;else{var f=c.G();c=(c=f?oc(c,f,e):c.a?c.a[e]:null)?za(c,d,a):!0}return c?b:null}
-k.sa=function(){this.a.clear();this.s()};k.Ug=ua;function sw(a,b){Oc.call(this,a);this.tile=b}v(sw,Oc);function tw(a){pw.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tilePixelRatio:a.tilePixelRatio,wrapX:a.wrapX});this.tileLoadFunction=a.tileLoadFunction;this.tileUrlFunction=this.Fc?this.Fc.bind(this):lw;this.urls=null;a.urls?this.eb(a.urls):a.url&&this.jb(a.url);a.tileUrlFunction&&this.cb(a.tileUrlFunction)}v(tw,pw);k=tw.prototype;k.pb=function(){return this.tileLoadFunction};
-k.qb=function(){return this.tileUrlFunction};k.rb=function(){return this.urls};k.Li=function(a){a=a.target;switch(a.getState()){case 1:this.b(new sw("tileloadstart",a));break;case 2:this.b(new sw("tileloadend",a));break;case 3:this.b(new sw("tileloaderror",a))}};k.vb=function(a){this.a.clear();this.tileLoadFunction=a;this.s()};k.cb=function(a,b){this.tileUrlFunction=a;"undefined"!==typeof b?qw(this,b):this.s()};
-k.jb=function(a){var b=this.urls=mw(a);this.cb(this.Fc?this.Fc.bind(this):jw(b,this.tileGrid),a)};k.eb=function(a){this.urls=a;var b=a.join("\n");this.cb(this.Fc?this.Fc.bind(this):jw(a,this.tileGrid),b)};k.Ug=function(a,b,c){a=this.Sb(a,b,c);this.a.b.hasOwnProperty(a)&&this.a.get(a)};function X(a){tw.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:uw,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,wrapX:a.wrapX});this.crossOrigin=void 0!==a.crossOrigin?a.crossOrigin:null;this.tileClass=a.tileClass?a.tileClass:Os;this.g={};this.v={};this.Sa=a.reprojectionErrorThreshold;this.I=
-!1}v(X,tw);k=X.prototype;k.Ki=function(){if(ow(this.a))return!0;for(var a in this.g)if(ow(this.g[a]))return!0;return!1};k.fd=function(a,b){a=this.Wd(a);this.a.fd(this.a==a?b:{});for(var c in this.g){var d=this.g[c];d.fd(d==a?b:{})}};k.Wf=function(a){return this.c&&a&&!dc(this.c,a)?0:this.Xf()};k.Xf=function(){return 0};k.Zf=function(a){return this.c&&a&&!dc(this.c,a)?!1:tw.prototype.Zf.call(this,a)};
-k.Ta=function(a){var b=this.c;return!this.tileGrid||b&&!dc(b,a)?(b=w(a).toString(),b in this.v||(this.v[b]=vc(a)),this.v[b]):this.tileGrid};k.Wd=function(a){var b=this.c;if(!b||dc(b,a))return this.a;a=w(a).toString();a in this.g||(this.g[a]=new nw(this.a.highWaterMark));return this.g[a]};function vw(a,b,c,d,e,f,g){b=[b,c,d];e=(c=rw(a,b,f))?a.tileUrlFunction(c,e,f):void 0;e=new a.tileClass(b,void 0!==e?0:4,void 0!==e?e:"",a.crossOrigin,a.tileLoadFunction);e.key=g;y(e,"change",a.Li,a);return e}
-k.Nc=function(a,b,c,d,e){if(this.c&&e&&!dc(this.c,e)){var f=this.Wd(e);c=[a,b,c];var g;a=this.Sb.apply(this,c);f.b.hasOwnProperty(a)&&(g=f.get(a));b=this.uc;if(g&&g.key==b)return g;var h=this.c,l=this.Ta(h),m=this.Ta(e),n=rw(this,c,e);d=new hw(h,l,e,m,c,n,this.nb(d),this.Xf(),function(a,b,c,d){return ww(this,a,b,c,d,h)}.bind(this),this.Sa,this.I);d.key=b;g?(d.i=g,f.replace(a,d)):f.set(a,d);return d}return ww(this,a,b,c,d,e)};
-function ww(a,b,c,d,e,f){var g=a.Sb(b,c,d),h=a.uc;if(a.a.b.hasOwnProperty(g)){var l=a.a.get(g);if(l.key!=h){var m=l;l=vw(a,b,c,d,e,f,h);0==m.getState()?l.i=m.i:l.i=m;if(l.i){b=l.i;c=l;do{if(2==b.getState()){b.i=null;break}else 1==b.getState()?c=b:0==b.getState()?c.i=b.i:c=b;b=c.i}while(b)}a.a.replace(g,l)}}else l=vw(a,b,c,d,e,f,h),a.a.set(g,l);return l}k.Pb=function(a){if(this.I!=a){this.I=a;for(var b in this.g)this.g[b].clear();this.s()}};
-k.Qb=function(a,b){if(a=Tb(a))a=w(a).toString(),a in this.v||(this.v[a]=b)};function uw(a,b){a.Y().src=b};function xw(a){this.B=void 0!==a.hidpi?a.hidpi:!1;X.call(this,{cacheSize:a.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:Tb("EPSG:3857"),reprojectionErrorThreshold:a.reprojectionErrorThreshold,state:"loading",tileLoadFunction:a.tileLoadFunction,tilePixelRatio:this.B?2:1,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.R=void 0!==a.culture?a.culture:"en-us";this.C=void 0!==a.maxZoom?a.maxZoom:-1;this.f=a.key;this.l=a.imagerySet;gw("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.l+"?uriScheme=https&include=ImageryProviders&key="+
-this.f,this.pa.bind(this),void 0,"jsonp")}v(xw,X);var yw=new Ac({html:'<a class="ol-attribution-bing-tos" href="http://www.microsoft.com/maps/product/terms.html">Terms of Use</a>'});xw.prototype.T=function(){return this.f};xw.prototype.fa=function(){return this.l};
-xw.prototype.pa=function(a){if(200!=a.statusCode||"OK"!=a.statusDescription||"ValidCredentials"!=a.authenticationResultCode||1!=a.resourceSets.length||1!=a.resourceSets[0].resources.length)bu(this,"error");else{var b=a.brandLogoUri;-1==b.indexOf("https")&&(b=b.replace("http","https"));var c=a.resourceSets[0].resources[0],d=-1==this.C?c.zoomMax:this.C;a=zc(this.c);var e=xc({extent:a,minZoom:c.zoomMin,maxZoom:d,tileSize:(c.imageWidth==c.imageHeight?c.imageWidth:[c.imageWidth,c.imageHeight])/this.nb()});
-this.tileGrid=e;var f=this.R,g=this.B;this.tileUrlFunction=kw(c.imageUrlSubdomains.map(function(a){var b=[0,0,0],d=c.imageUrl.replace("{subdomain}",a).replace("{culture}",f);return function(a){if(a)return jc(a[0],a[1],-a[2]-1,b),a=d,g&&(a+="&dpi=d1&device=mobile"),a.replace("{quadkey}",kc(b))}}));if(c.imageryProviders){var h=Vb(Tb("EPSG:4326"),this.c);a=c.imageryProviders.map(function(a){var b=a.attribution,c={};a.coverageAreas.forEach(function(a){var b=a.zoomMin,f=Math.min(a.zoomMax,d);a=a.bbox;
-a=sb([a[1],a[0],a[3],a[2]],h);var g;for(g=b;g<=f;++g){var l=g.toString();b=oc(e,a,g);l in c?c[l].push(b):c[l]=[b]}});return new Ac({html:b,tileRanges:c})});a.push(yw);this.ua(a)}this.D=b;bu(this,"ready")}};function zw(a){a=a||{};var b=void 0!==a.projection?a.projection:"EPSG:3857",c=void 0!==a.tileGrid?a.tileGrid:xc({extent:zc(b),maxZoom:a.maxZoom,minZoom:a.minZoom,tileSize:a.tileSize});X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:a.opaque,projection:b,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:c,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,
-wrapX:void 0!==a.wrapX?a.wrapX:!0})}v(zw,X);function Aw(a){this.C=a.account;this.B=a.map||"";this.f=a.config||{};this.l={};zw.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,maxZoom:void 0!==a.maxZoom?a.maxZoom:18,minZoom:a.minZoom,projection:a.projection,state:"loading",wrapX:a.wrapX});Bw(this)}v(Aw,zw);k=Aw.prototype;k.Kk=function(){return this.f};k.tq=function(a){tb(this.f,a);Bw(this)};k.Xp=function(a){this.f=a||{};Bw(this)};
-function Bw(a){var b=JSON.stringify(a.f);if(a.l[b])Cw(a,a.l[b]);else{var c="https://"+a.C+".cartodb.com/api/v1/map";a.B&&(c+="/named/"+a.B);var d=new XMLHttpRequest;d.addEventListener("load",a.Dl.bind(a,b));d.addEventListener("error",a.Cl.bind(a));d.open("POST",c);d.setRequestHeader("Content-type","application/json");d.send(JSON.stringify(a.f))}}
-k.Dl=function(a,b){b=b.target;if(!b.status||200<=b.status&&300>b.status){try{var c=JSON.parse(b.responseText)}catch(d){bu(this,"error");return}Cw(this,c);this.l[a]=c;bu(this,"ready")}else bu(this,"error")};k.Cl=function(){bu(this,"error")};function Cw(a,b){a.jb("https://"+b.cdn_url.https+"/"+a.C+"/api/v1/map/"+b.layergroupid+"/{z}/{x}/{y}.png")};function Y(a){U.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,wrapX:a.wrapX});this.resolution=void 0;this.distance=void 0!==a.distance?a.distance:20;this.features=[];this.geometryFunction=a.geometryFunction||function(a){a=a.V();xa(a instanceof C,10);return a};this.source=a.source;this.source.J("change",Y.prototype.sa,this)}v(Y,U);k=Y.prototype;k.$n=function(){return this.distance};k.ao=function(){return this.source};
-k.Yd=function(a,b,c){this.source.Yd(a,b,c);b!==this.resolution&&(this.clear(),this.resolution=b,Dw(this),this.cd(this.features))};k.Yp=function(a){this.distance=a;this.sa()};k.sa=function(){this.clear();Dw(this);this.cd(this.features);U.prototype.sa.call(this)};
-function Dw(a){if(void 0!==a.resolution){a.features.length=0;for(var b=Oa(),c=a.distance*a.resolution,d=a.source.Xe(),e={},f=0,g=d.length;f<g;f++){var h=d[f];w(h).toString()in e||!(h=a.geometryFunction(h))||(h=h.X(),Za(h,b),Qa(b,c,b),h=a.source.Uf(b),h=h.filter(function(a){a=w(a).toString();return a in e?!1:e[a]=!0}),a.features.push(Ew(a,h)))}}}
-function Ew(a,b){for(var c=[0,0],d=b.length-1;0<=d;--d){var e=a.geometryFunction(b[d]);e?Ze(c,e.X()):b.splice(d,1)}gf(c,1/b.length);a=new H(new C(c));a.set("features",b);return a};function Fw(a,b){var c=[];Object.keys(b).forEach(function(a){null!==b[a]&&void 0!==b[a]&&c.push(a+"="+encodeURIComponent(b[a]))});var d=c.join("&");a=a.replace(/[?&]$/,"");a=-1===a.indexOf("?")?a+"?":a+"&";return a+d};function Gw(a){a=a||{};Hv.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.R=void 0!==a.crossOrigin?a.crossOrigin:null;this.T=void 0!==a.hidpi?a.hidpi:!0;this.f=a.url;this.g=a.imageLoadFunction?a.imageLoadFunction:Nv;this.v=a.params||{};this.M=null;this.l=[0,0];this.I=0;this.B=void 0!==a.ratio?a.ratio:1.5}v(Gw,Hv);k=Gw.prototype;k.co=function(){return this.v};
-k.Jc=function(a,b,c,d){if(void 0===this.f)return null;b=Iv(this,b);c=this.T?c:1;var e=this.M;if(e&&this.I==this.i&&e.resolution==b&&e.a==c&&Va(e.G(),a))return e;e={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};tb(e,this.v);a=a.slice();var f=(a[0]+a[2])/2,g=(a[1]+a[3])/2;if(1!=this.B){var h=this.B*lb(a)/2,l=this.B*mb(a)/2;a[0]=f-h;a[1]=g-l;a[2]=f+h;a[3]=g+l}var h=b/c,l=Math.ceil(lb(a)/h),m=Math.ceil(mb(a)/h);a[0]=f-h*l/2;a[2]=f+h*l/2;a[1]=g-h*m/2;a[3]=g+h*m/2;this.l[0]=l;this.l[1]=m;f=a;g=this.l;h=c;d=
-d.mb.split(":").pop();e.SIZE=g[0]+","+g[1];e.BBOX=f.join(",");e.BBOXSR=d;e.IMAGESR=d;e.DPI=Math.round(90*h);d=this.f;f=d.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");f==d&&xa(!1,50);e=Fw(f,e);this.M=new Js(a,b,c,this.j,e,this.R,this.g);this.I=this.i;y(this.M,"change",this.o,this);return this.M};k.bo=function(){return this.g};k.eo=function(){return this.f};k.fo=function(a){this.M=null;this.g=a;this.s()};
-k.ho=function(a){a!=this.f&&(this.f=a,this.M=null,this.s())};k.io=function(a){tb(this.v,a);this.M=null;this.s()};function Hw(a){Hv.call(this,{projection:a.projection,resolutions:a.resolutions});this.R=void 0!==a.crossOrigin?a.crossOrigin:null;this.l=void 0!==a.displayDpi?a.displayDpi:96;this.g=a.params||{};this.I=a.url;this.f=a.imageLoadFunction?a.imageLoadFunction:Nv;this.T=void 0!==a.hidpi?a.hidpi:!0;this.pa=void 0!==a.metersPerUnit?a.metersPerUnit:1;this.v=void 0!==a.ratio?a.ratio:1;this.va=void 0!==a.useOverlay?a.useOverlay:!1;this.M=null;this.B=0}v(Hw,Hv);k=Hw.prototype;k.ko=function(){return this.g};
-k.Jc=function(a,b,c){b=Iv(this,b);c=this.T?c:1;var d=this.M;if(d&&this.B==this.i&&d.resolution==b&&d.a==c&&Va(d.G(),a))return d;1!=this.v&&(a=a.slice(),rb(a,this.v));var e=[lb(a)/b*c,mb(a)/b*c];if(void 0!==this.I){var d=this.I,f=nb(a),g=this.pa,h=lb(a),l=mb(a),m=e[0],n=e[1],p=.0254/this.l,e={OPERATION:this.va?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.l,SETDISPLAYWIDTH:Math.round(e[0]),SETDISPLAYHEIGHT:Math.round(e[1]),
-SETVIEWSCALE:n*h>m*l?h*g/(m*p):l*g/(n*p),SETVIEWCENTERX:f[0],SETVIEWCENTERY:f[1]};tb(e,this.g);d=Fw(d,e);d=new Js(a,b,c,this.j,d,this.R,this.f);y(d,"change",this.o,this)}else d=null;this.M=d;this.B=this.i;return d};k.jo=function(){return this.f};k.mo=function(a){tb(this.g,a);this.s()};k.lo=function(a){this.M=null;this.f=a;this.s()};function Iw(a){var b=a.imageExtent,c=void 0!==a.crossOrigin?a.crossOrigin:null,d=a.imageLoadFunction?a.imageLoadFunction:Nv;Hv.call(this,{attributions:a.attributions,logo:a.logo,projection:Tb(a.projection)});this.M=new Js(b,void 0,1,this.j,a.url,c,d);this.f=a.imageSize?a.imageSize:null;y(this.M,"change",this.o,this)}v(Iw,Hv);Iw.prototype.Jc=function(a){return qb(a,this.M.G())?this.M:null};
-Iw.prototype.o=function(a){if(2==this.M.getState()){var b=this.M.G(),c=this.M.Y();if(this.f){var d=this.f[0];var e=this.f[1]}else d=c.width,e=c.height;b=Math.ceil(lb(b)/(mb(b)/e));if(b!=d){var b=jd(b,e),f=b.canvas;b.drawImage(c,0,0,d,e,0,0,f.width,f.height);this.M.Og(f)}}Hv.prototype.o.call(this,a)};function Jw(a){a=a||{};Hv.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.pa=void 0!==a.crossOrigin?a.crossOrigin:null;this.g=a.url;this.v=a.imageLoadFunction?a.imageLoadFunction:Nv;this.f=a.params||{};this.l=!0;Kw(this);this.T=a.serverType;this.va=void 0!==a.hidpi?a.hidpi:!0;this.M=null;this.B=[0,0];this.R=0;this.I=void 0!==a.ratio?a.ratio:1.5}v(Jw,Hv);var Lw=[101,101];k=Jw.prototype;
-k.so=function(a,b,c,d){if(void 0!==this.g){var e=ob(a,b,0,Lw),f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.f.LAYERS};tb(f,this.f,d);d=Math.floor((e[3]-a[1])/b);f[this.l?"I":"X"]=Math.floor((a[0]-e[0])/b);f[this.l?"J":"Y"]=d;return Mw(this,e,Lw,1,Tb(c),f)}};k.uo=function(){return this.f};
-k.Jc=function(a,b,c,d){if(void 0===this.g)return null;b=Iv(this,b);1==c||this.va&&void 0!==this.T||(c=1);var e=b/c,f=nb(a),g=ob(f,e,0,[Math.ceil(lb(a)/e),Math.ceil(mb(a)/e)]);a=ob(f,e,0,[Math.ceil(this.I*lb(a)/e),Math.ceil(this.I*mb(a)/e)]);if((f=this.M)&&this.R==this.i&&f.resolution==b&&f.a==c&&Va(f.G(),g))return f;g={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};tb(g,this.f);this.B[0]=Math.round(lb(a)/e);this.B[1]=Math.round(mb(a)/e);d=Mw(this,a,this.B,c,d,g);
-this.M=new Js(a,b,c,this.j,d,this.pa,this.v);this.R=this.i;y(this.M,"change",this.o,this);return this.M};k.to=function(){return this.v};
-function Mw(a,b,c,d,e,f){xa(void 0!==a.g,9);f[a.l?"CRS":"SRS"]=e.mb;"STYLES"in a.f||(f.STYLES="");if(1!=d)switch(a.T){case "geoserver":d=90*d+.5|0;f.FORMAT_OPTIONS="FORMAT_OPTIONS"in f?f.FORMAT_OPTIONS+(";dpi:"+d):"dpi:"+d;break;case "mapserver":f.MAP_RESOLUTION=90*d;break;case "carmentaserver":case "qgis":f.DPI=90*d;break;default:xa(!1,8)}f.WIDTH=c[0];f.HEIGHT=c[1];c=e.b;var g;a.l&&"ne"==c.substr(0,2)?g=[b[1],b[0],b[3],b[2]]:g=b;f.BBOX=g.join(",");return Fw(a.g,f)}k.vo=function(){return this.g};
-k.wo=function(a){this.M=null;this.v=a;this.s()};k.xo=function(a){a!=this.g&&(this.g=a,this.M=null,this.s())};k.yo=function(a){tb(this.f,a);Kw(this);this.M=null;this.s()};function Kw(a){a.l=0<=Ye(a.f.VERSION||"1.3.0")};function Nw(a){a=a||{};var b;void 0!==a.attributions?b=a.attributions:b=[Ow];zw.call(this,{attributions:b,cacheSize:a.cacheSize,crossOrigin:void 0!==a.crossOrigin?a.crossOrigin:"anonymous",opaque:void 0!==a.opaque?a.opaque:!0,maxZoom:void 0!==a.maxZoom?a.maxZoom:19,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:a.wrapX})}v(Nw,zw);var Ow=new Ac({html:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.'});Fj.df={};Fj.df.Af=function(){};
-(function(a){function b(a,b,c){if(g)return new ImageData(a,b,c);b=h.createImageData(b,c);b.data.set(a);return b}function c(a){var b=!0;try{new ImageData(10,10)}catch(n){b=!1}return function(c){var d=c.buffers,e=c.meta,f=c.width,g=c.height,h=d.length,l=d[0].byteLength;if(c.imageOps){l=Array(h);for(c=0;c<h;++c){var m=c;var n=new Uint8ClampedArray(d[c]);var L=f,oa=g;n=b?new ImageData(n,L,oa):{data:n,width:L,height:oa};l[m]=n}f=a(l,e).data}else{f=new Uint8ClampedArray(l);g=Array(h);m=Array(h);for(c=0;c<
-h;++c)g[c]=new Uint8ClampedArray(d[c]),m[c]=[0,0,0,0];for(d=0;d<l;d+=4){for(c=0;c<h;++c)n=g[c],m[c][0]=n[d],m[c][1]=n[d+1],m[c][2]=n[d+2],m[c][3]=n[d+3];c=a(m,e);f[d]=c[0];f[d+1]=c[1];f[d+2]=c[2];f[d+3]=c[3]}}return f.buffer}}function d(a,b){var d=Object.keys(a.lib||{}).map(function(b){return"var "+b+" = "+a.lib[b].toString()+";"}).concat(["var __minion__ = ("+c.toString()+")(",a.operation.toString(),");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);",
-"  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),d=URL.createObjectURL(new Blob(d,{type:"text/javascript"})),d=new Worker(d);d.addEventListener("message",b);return d}function e(a,b){var d=c(a.operation);return{postMessage:function(a){setTimeout(function(){b({data:{buffer:d(a),meta:a.meta}})},0)}}}function f(a){this.Ff=!!a.$l;var b;0===a.threads?b=0:this.Ff?b=1:b=a.threads||1;var c=[];if(b)for(var f=0;f<b;++f)c[f]=d(a,this.gh.bind(this,f));else c[0]=e(a,this.gh.bind(this,
-0));this.qe=c;this.Ed=[];this.fk=a.rp||Infinity;this.oe=0;this.bd={};this.Gf=null}var g=!0;try{new ImageData(10,10)}catch(l){g=!1}var h=document.createElement("canvas").getContext("2d");f.prototype.pp=function(a,b,c){this.dk({inputs:a,Qh:b,callback:c});this.dh()};f.prototype.dk=function(a){for(this.Ed.push(a);this.Ed.length>this.fk;)this.Ed.shift().callback(null,null)};f.prototype.dh=function(){if(0===this.oe&&0<this.Ed.length){var a=this.Gf=this.Ed.shift(),b=a.inputs[0].width,c=a.inputs[0].height,
-d=a.inputs.map(function(a){return a.data.buffer}),e=this.qe.length;this.oe=e;if(1===e)this.qe[0].postMessage({buffers:d,meta:a.Qh,imageOps:this.Ff,width:b,height:c},d);else for(var f=4*Math.ceil(a.inputs[0].data.length/4/e),g=0;g<e;++g){for(var h=g*f,B=[],E=0,A=d.length;E<A;++E)B.push(d[g].slice(h,h+f));this.qe[g].postMessage({buffers:B,meta:a.Qh,imageOps:this.Ff,width:b,height:c},B)}}};f.prototype.gh=function(a,b){this.Jq||(this.bd[a]=b.data,--this.oe,0===this.oe&&this.gk())};f.prototype.gk=function(){var a=
-this.Gf,c=this.qe.length;if(1===c){var d=new Uint8ClampedArray(this.bd[0].buffer);var e=this.bd[0].meta}else{var f=a.inputs[0].data.length;d=new Uint8ClampedArray(f);e=Array(f);for(var f=4*Math.ceil(f/4/c),g=0;g<c;++g){var h=g*f;d.set(new Uint8ClampedArray(this.bd[g].buffer),h);e[g]=this.bd[g].meta}}this.Gf=null;this.bd={};a.callback(null,b(d,a.inputs[0].width,a.inputs[0].height),e);this.dh()};a["default"]={Af:f};a.Af=f})(Fj.df=Fj.df||{});function Pw(a){this.B=null;this.va=void 0!==a.operationType?a.operationType:"pixel";this.Sa=void 0!==a.threads?a.threads:1;this.g=Qw(a.sources);for(var b=0,c=this.g.length;b<c;++b)y(this.g[b],"change",this.s,this);this.T=new Pe(function(){return 1},this.s.bind(this));for(var b=Rw(this.g),c={},d=0,e=b.length;d<e;++d)c[w(b[d].layer)]=b[d];this.f=null;this.I={animate:!1,attributions:{},coordinateToPixelTransform:Bh(),extent:null,focus:null,index:0,layerStates:c,layerStatesArray:b,logos:{},pixelRatio:1,
-pixelToCoordinateTransform:Bh(),postRenderFunctions:[],size:[0,0],skippedFeatureUids:{},tileQueue:this.T,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{}};Hv.call(this,{});a.operation&&this.v(a.operation,a.lib)}v(Pw,Hv);Pw.prototype.v=function(a,b){this.B=new Fj.df.Af({operation:a,$l:"image"===this.va,rp:1,lib:b,threads:this.Sa});this.s()};
-Pw.prototype.Y=function(a,b,c,d){c=!0;for(var e,f=0,g=this.g.length;f<g;++f)if(e=this.g[f].a.ha(),"ready"!==e.getState()){c=!1;break}if(!c)return null;c=tb({},this.I);c.viewState=tb({},c.viewState);e=nb(a);c.extent=a.slice();c.focus=e;c.size[0]=Math.round(lb(a)/b);c.size[1]=Math.round(mb(a)/b);f=c.viewState;f.center=e;f.projection=d;f.resolution=b;this.l=c;Qe(c.tileQueue,16,16);this.f&&(d=this.f.resolution,c=this.f.G(),b===d&&bb(a,c)||(this.f=null));if(!this.f||this.i!==this.R)a:{a=this.l;d=this.g.length;
-b=Array(d);for(c=0;c<d;++c){e=this.g[c];f=a;g=a.layerStatesArray[c];if(e.sd(f,g)){var h=f.size[0],l=f.size[1];if(Sw){var m=Sw.canvas;m.width!==h||m.height!==l?Sw=jd(h,l):Sw.clearRect(0,0,h,l)}else Sw=jd(h,l);e.S(f,g,Sw);e=Sw.getImageData(0,0,h,l)}else e=null;if(e)b[c]=e;else break a}d={};this.b(new Tw(Uw,a,d));this.B.pp(b,d,this.pa.bind(this,a))}return this.f};
-Pw.prototype.pa=function(a,b,c,d){if(!b&&c){b=a.extent;var e=a.viewState.resolution;if(e===this.l.viewState.resolution&&bb(b,this.l.extent)){if(this.f)var f=this.f.Y().getContext("2d");else f=jd(Math.round(lb(b)/e),Math.round(mb(b)/e)),this.f=new Ks(b,e,1,this.j,f.canvas);f.putImageData(c,0,0);this.s();this.R=this.i;this.b(new Tw(Vw,a,d))}}};var Sw=null;function Rw(a){return a.map(function(a){return th(a.a)})}
-function Qw(a){for(var b=a.length,c=Array(b),d=0;d<b;++d){var e=d,f=a[d],g=null;f instanceof pw?(f=new cw({source:f}),g=new Vv(f)):f instanceof Hv&&(f=new Uv({source:f}),g=new zv(f));c[e]=g}return c}function Tw(a,b,c){Oc.call(this,a);this.extent=b.extent;this.resolution=b.viewState.resolution/b.pixelRatio;this.data=c}v(Tw,Oc);Pw.prototype.Jc=function(){return null};var Uw="beforeoperations",Vw="afteroperations";function Ww(a){var b=a.layer.indexOf("-"),b=Xw[-1==b?a.layer:a.layer.slice(0,b)],c=Yw[a.layer];zw.call(this,{attributions:Zw,cacheSize:a.cacheSize,crossOrigin:"anonymous",maxZoom:void 0!=a.maxZoom?a.maxZoom:b.maxZoom,minZoom:void 0!=a.minZoom?a.minZoom:b.minZoom,opaque:c.opaque,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+a.layer+"/{z}/{x}/{y}."+c.Lb,wrapX:a.wrapX})}v(Ww,zw);
-var Zw=[new Ac({html:'Map tiles by <a href="http://stamen.com/">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.'}),Ow],Yw={terrain:{Lb:"jpg",opaque:!0},"terrain-background":{Lb:"jpg",opaque:!0},"terrain-labels":{Lb:"png",opaque:!1},"terrain-lines":{Lb:"png",opaque:!1},"toner-background":{Lb:"png",opaque:!0},toner:{Lb:"png",opaque:!0},"toner-hybrid":{Lb:"png",opaque:!1},"toner-labels":{Lb:"png",opaque:!1},"toner-lines":{Lb:"png",opaque:!1},"toner-lite":{Lb:"png",
-opaque:!0},watercolor:{Lb:"jpg",opaque:!0}},Xw={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}};function $w(a){a=a||{};X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.f=a.params||{};this.l=Oa();qw(this,ax(this))}v($w,X);function ax(a){var b=0,c=[],d;for(d in a.f)c[b++]=d+"-"+a.f[d];return c.join("/")}$w.prototype.C=function(){return this.f};
-$w.prototype.nb=function(a){return a};
-$w.prototype.Fc=function(a,b,c){var d=this.tileGrid;d||(d=this.Ta(c));if(!(d.b.length<=a[0])){var e=d.Aa(a,this.l),f=Ma(d.gb(a[0]),this.o);1!=b&&(f=La(f,b,this.o));d={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};tb(d,this.f);var g=this.urls;g?(c=c.mb.split(":").pop(),d.SIZE=f[0]+","+f[1],d.BBOX=e.join(","),d.BBOXSR=c,d.IMAGESR=c,d.DPI=Math.round(d.DPI?d.DPI*b:90*b),a=(1==g.length?g[0]:g[Ia((a[1]<<a[0])+a[2],g.length)]).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),
-a=Fw(a,d)):a=void 0;return a}};$w.prototype.B=function(a){tb(this.f,a);qw(this,ax(this))};function bx(a){pw.call(this,{opaque:!1,projection:a.projection,tileGrid:a.tileGrid,wrapX:void 0!==a.wrapX?a.wrapX:!0})}v(bx,pw);bx.prototype.Nc=function(a,b,c){var d=this.Sb(a,b,c);if(this.a.b.hasOwnProperty(d))return this.a.get(d);var e=Ma(this.tileGrid.gb(a));a=[a,b,c];b=(b=rw(this,a))?rw(this,b).toString():"";e=new cx(a,e,b);this.a.set(d,e);return e};function cx(a,b,c){Ls.call(this,a,2);this.c=b;this.Ia=c;this.a=null}v(cx,Ls);
-cx.prototype.Y=function(){if(this.a)return this.a;var a=this.c,b=jd(a[0],a[1]);b.strokeStyle="black";b.strokeRect(.5,.5,a[0]+.5,a[1]+.5);b.fillStyle="black";b.textAlign="center";b.textBaseline="middle";b.font="24px sans-serif";b.fillText(this.Ia,a[0]/2,a[1]/2);return this.a=b.canvas};cx.prototype.load=function(){};function dx(a){this.f=null;X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,projection:Tb("EPSG:3857"),reprojectionErrorThreshold:a.reprojectionErrorThreshold,state:"loading",tileLoadFunction:a.tileLoadFunction,wrapX:void 0!==a.wrapX?a.wrapX:!0});if(a.url)if(a.jsonp)gw(a.url,this.og.bind(this),this.Ve.bind(this));else{var b=new XMLHttpRequest;b.addEventListener("load",this.Ao.bind(this));b.addEventListener("error",this.zo.bind(this));b.open("GET",a.url);b.send()}else a.tileJSON?
-this.og(a.tileJSON):xa(!1,51)}v(dx,X);k=dx.prototype;k.Ao=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.Ve();return}this.og(b)}else this.Ve()};k.zo=function(){this.Ve()};k.pl=function(){return this.f};
-k.og=function(a){var b=Tb("EPSG:4326"),c=this.c;if(a.bounds){var d=Vb(b,c);var e=sb(a.bounds,d)}var f=a.minzoom||0,d=a.maxzoom||22;this.tileGrid=c=xc({extent:zc(c),maxZoom:d,minZoom:f});this.tileUrlFunction=jw(a.tiles,c);if(void 0!==a.attribution&&!this.j){b=void 0!==e?e:b.G();e={};for(var g;f<=d;++f)g=f.toString(),e[g]=[oc(c,b,f)];this.ua([new Ac({html:a.attribution,tileRanges:e})])}this.f=a;bu(this,"ready")};k.Ve=function(){bu(this,"error")};function ex(a){pw.call(this,{projection:Tb("EPSG:3857"),state:"loading"});this.v=void 0!==a.preemptive?a.preemptive:!0;this.l=lw;this.g=void 0;this.f=a.jsonp||!1;if(a.url)if(this.f)gw(a.url,this.pg.bind(this),this.We.bind(this));else{var b=new XMLHttpRequest;b.addEventListener("load",this.Eo.bind(this));b.addEventListener("error",this.Do.bind(this));b.open("GET",a.url);b.send()}else a.tileJSON?this.pg(a.tileJSON):xa(!1,51)}v(ex,pw);k=ex.prototype;
-k.Eo=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.We();return}this.pg(b)}else this.We()};k.Do=function(){this.We()};k.ml=function(){return this.g};k.zk=function(a,b,c,d,e){this.tileGrid?(b=this.tileGrid.Be(a,b),fx(this.Nc(b[0],b[1],b[2],1,this.c),a,c,d,e)):!0===e?setTimeout(function(){c.call(d,null)},0):c.call(d,null)};k.We=function(){bu(this,"error")};
-k.pg=function(a){var b=Tb("EPSG:4326"),c=this.c;if(a.bounds){var d=Vb(b,c);var e=sb(a.bounds,d)}var f=a.minzoom||0,d=a.maxzoom||22;this.tileGrid=c=xc({extent:zc(c),maxZoom:d,minZoom:f});this.g=a.template;var g=a.grids;if(g){this.l=jw(g,c);if(void 0!==a.attribution){b=void 0!==e?e:b.G();for(e={};f<=d;++f)g=f.toString(),e[g]=[oc(c,b,f)];this.ua([new Ac({html:a.attribution,tileRanges:e})])}bu(this,"ready")}else bu(this,"error")};
-k.Nc=function(a,b,c,d,e){var f=this.Sb(a,b,c);if(this.a.b.hasOwnProperty(f))return this.a.get(f);a=[a,b,c];b=rw(this,a,e);d=this.l(b,d,e);d=new gx(a,void 0!==d?0:4,void 0!==d?d:"",this.tileGrid.Aa(a),this.v,this.f);this.a.set(f,d);return d};k.Ug=function(a,b,c){a=this.Sb(a,b,c);this.a.b.hasOwnProperty(a)&&this.a.get(a)};function gx(a,b,c,d,e,f){Ls.call(this,a,b);this.o=c;this.a=d;this.v=e;this.c=this.j=this.g=null;this.l=f}v(gx,Ls);k=gx.prototype;k.Y=function(){return null};
-k.getData=function(a){if(!this.g||!this.j)return null;var b=this.g[Math.floor((1-(a[1]-this.a[1])/(this.a[3]-this.a[1]))*this.g.length)];if("string"!==typeof b)return null;b=b.charCodeAt(Math.floor((a[0]-this.a[0])/(this.a[2]-this.a[0])*b.length));93<=b&&b--;35<=b&&b--;b-=32;a=null;b in this.j&&(b=this.j[b],this.c&&b in this.c?a=this.c[b]:a=b);return a};
-function fx(a,b,c,d,e){0==a.state&&!0===e?(Jc(a,"change",function(){c.call(d,this.getData(b))},a),hx(a)):!0===e?setTimeout(function(){c.call(d,this.getData(b))}.bind(a),0):c.call(d,a.getData(b))}k.bb=function(){return this.o};k.De=function(){this.state=3;this.s()};k.Ji=function(a){this.g=a.grid;this.j=a.keys;this.c=a.data;this.state=4;this.s()};
-function hx(a){if(0==a.state)if(a.state=1,a.l)gw(a.o,a.Ji.bind(a),a.De.bind(a));else{var b=new XMLHttpRequest;b.addEventListener("load",a.Co.bind(a));b.addEventListener("error",a.Bo.bind(a));b.open("GET",a.o);b.send()}}k.Co=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.De();return}this.Ji(b)}else this.De()};k.Bo=function(){this.De()};k.load=function(){this.v&&hx(this)};function ix(a){a=a||{};var b=a.params||{};X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:!("TRANSPARENT"in b?b.TRANSPARENT:1),projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.C=void 0!==a.gutter?a.gutter:0;this.f=b;this.l=!0;this.B=a.serverType;this.T=void 0!==a.hidpi?a.hidpi:!0;this.R="";
-jx(this);this.fa=Oa();kx(this);qw(this,lx(this))}v(ix,X);k=ix.prototype;
-k.Fo=function(a,b,c,d){c=Tb(c);var e=this.tileGrid;e||(e=this.Ta(c));b=e.Be(a,b);if(!(e.b.length<=b[0])){var f=e.Da(b[0]),g=e.Aa(b,this.fa),e=Ma(e.gb(b[0]),this.o),h=this.C;h&&(e=Ka(e,h,this.o),g=Qa(g,f*h,g));h={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.f.LAYERS};tb(h,this.f,d);d=Math.floor((g[3]-a[1])/f);h[this.l?"I":"X"]=Math.floor((a[0]-g[0])/f);h[this.l?"J":"Y"]=d;return mx(this,b,e,g,1,c,h)}};k.Xf=function(){return this.C};
-k.Sb=function(a,b,c){return this.R+X.prototype.Sb.call(this,a,b,c)};k.Go=function(){return this.f};
-function mx(a,b,c,d,e,f,g){var h=a.urls;if(h){g.WIDTH=c[0];g.HEIGHT=c[1];g[a.l?"CRS":"SRS"]=f.mb;"STYLES"in a.f||(g.STYLES="");if(1!=e)switch(a.B){case "geoserver":c=90*e+.5|0;g.FORMAT_OPTIONS="FORMAT_OPTIONS"in g?g.FORMAT_OPTIONS+(";dpi:"+c):"dpi:"+c;break;case "mapserver":g.MAP_RESOLUTION=90*e;break;case "carmentaserver":case "qgis":g.DPI=90*e;break;default:xa(!1,52)}f=f.b;a.l&&"ne"==f.substr(0,2)&&(a=d[0],d[0]=d[1],d[1]=a,a=d[2],d[2]=d[3],d[3]=a);g.BBOX=d.join(",");return Fw(1==h.length?h[0]:h[Ia((b[1]<<
-b[0])+b[2],h.length)],g)}}k.nb=function(a){return this.T&&void 0!==this.B?a:1};function jx(a){var b=0,c=[];if(a.urls){var d;var e=0;for(d=a.urls.length;e<d;++e)c[b++]=a.urls[e]}a.R=c.join("#")}function lx(a){var b=0,c=[],d;for(d in a.f)c[b++]=d+"-"+a.f[d];return c.join("/")}
-k.Fc=function(a,b,c){var d=this.tileGrid;d||(d=this.Ta(c));if(!(d.b.length<=a[0])){1==b||this.T&&void 0!==this.B||(b=1);var e=d.Da(a[0]),f=d.Aa(a,this.fa),d=Ma(d.gb(a[0]),this.o),g=this.C;g&&(d=Ka(d,g,this.o),f=Qa(f,e*g,f));1!=b&&(d=La(d,b,this.o));e={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};tb(e,this.f);return mx(this,a,d,f,b,c,e)}};k.eb=function(a){X.prototype.eb.call(this,a);jx(this)};k.Ho=function(a){tb(this.f,a);jx(this);kx(this);qw(this,lx(this))};
-function kx(a){a.l=0<=Ye(a.f.VERSION||"1.3.0")};function nx(a,b,c,d,e,f,g,h,l,m,n,p,q,r){Ls.call(this,a,b);this.j=null;this.o={Nd:!1,Kg:null,mf:-1,Lg:-1};this.c=m;this.a=[];this.u=c;this.v=f;this.g=[];this.l=[];if(f){var u=l.Aa(f),x=l.Da(a[0]);h.Rf(u,h.tc(x),function(a){var b=pb(u,h.Aa(a));if(.5<=lb(b)/x&&.5<=mb(b)/x){var b=a.toString(),c=m[b];c||(c=g(a,n,p),c=m[b]=new q(a,void 0==c?4:0,void 0==c?"":c,d,e),this.l.push(y(c,"change",r)));c.j++;this.a.push(b)}}.bind(this))}}v(nx,Ls);
-nx.prototype.ka=function(){for(var a=0,b=this.a.length;a<b;++a){var c=this.a[a],d=this.c[c];d.j--;d.j||(delete this.c[c],Nc(d))}this.a.length=0;this.c=null;1==this.state&&(this.g.forEach(Ec),this.g.length=0);this.i&&Nc(this.i);this.state=5;this.s();this.l.forEach(Ec);this.l.length=0;Ls.prototype.ka.call(this)};nx.prototype.Y=function(){return-1==this.o.Lg?null:this.j.canvas};nx.prototype.bb=function(){return this.a.join("/")+"/"+this.u};
-nx.prototype.load=function(){var a=0,b=!1;0==this.state&&Ns(this,1);1==this.state&&this.a.forEach(function(c){var d=this.c[c];0==d.state?(d.Pg(this.S),d.load()):3==d.state?b=!0:4==d.state&&ma(this.a,c);if(1==d.state){var e=y(d,"change",function(){var f=d.getState();if(2==f||3==f)--a,Ec(e),ma(this.g,e),3==f&&(ma(this.a,c),b=!0),a||Ns(this,0<this.a.length?2:3)}.bind(this));this.g.push(e);++a}}.bind(this));a||setTimeout(function(){Ns(this,0<this.a.length?2:b?3:4)}.bind(this),0)};
-function ox(a,b){a.Pg(Cl(b,a.o,a.$o.bind(a),a.Zo.bind(a)))};function px(a,b,c,d,e){Ls.call(this,a,b);this.j=0;this.o=d;this.g=null;this.c={};this.u=e;this.l=c}v(px,Ls);k=px.prototype;k.ka=function(){this.g=null;this.c={};this.state=5;this.s();Ls.prototype.ka.call(this)};k.Lm=function(){return this.o};k.Km=function(){return this.g};k.bb=function(){return this.l};k.Mm=function(){return this.a};k.load=function(){0==this.state&&(Ns(this,1),this.u(this,this.l),this.v(null,NaN,null))};k.$o=function(a,b){this.ig(b);this.mj(a)};k.Zo=function(){Ns(this,3)};
-k.mj=function(a){this.g=a;Ns(this,2)};k.ig=function(a){this.a=a};k.Pg=function(a){this.v=a};function qx(a){tw.call(this,{attributions:a.attributions,cacheSize:void 0!==a.cacheSize?a.cacheSize:128,extent:a.extent,logo:a.logo,opaque:!1,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:ox,tileUrlFunction:a.tileUrlFunction,tilePixelRatio:a.tilePixelRatio,url:a.url,urls:a.urls,wrapX:void 0===a.wrapX?!0:a.wrapX});this.g=a.format?a.format:null;this.v={};this.l=void 0==a.overlaps?!0:a.overlaps;this.tileClass=a.tileClass?a.tileClass:
-px;this.f={};this.tileGrid||(this.tileGrid=this.Ta(Tb(a.projection||"EPSG:3857")))}v(qx,tw);qx.prototype.Nc=function(a,b,c,d,e){var f=this.Sb(a,b,c);if(this.a.b.hasOwnProperty(f))return this.a.get(f);a=[a,b,c];c=(b=rw(this,a,e))?this.tileUrlFunction(b,d,e):void 0;d=new nx(a,void 0!==c?0:4,void 0!==c?c:"",this.g,this.tileLoadFunction,b,this.tileUrlFunction,this.tileGrid,this.Ta(e),this.v,d,e,this.tileClass,this.Li.bind(this));this.a.set(f,d);return d};
-qx.prototype.Ta=function(a){var b=a.mb,c=this.f[b];c||(c=this.tileGrid,c=this.f[b]=wc(a,void 0,c?c.gb(c.minZoom):void 0));return c};qx.prototype.nb=function(a){return void 0==a?tw.prototype.nb.call(this,a):a};qx.prototype.Xd=function(a,b,c){a=Ma(this.Ta(c).gb(a));return[Math.round(a[0]*b),Math.round(a[1]*b)]};function rx(a){this.o=a.matrixIds;lc.call(this,{extent:a.extent,origin:a.origin,origins:a.origins,resolutions:a.resolutions,tileSize:a.tileSize,tileSizes:a.tileSizes,sizes:a.sizes})}v(rx,lc);rx.prototype.l=function(){return this.o};
-function sx(a,b,c){var d=[],e=[],f=[],g=[],h=[],l=void 0!==c?c:[];c=Tb(a.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var m=c.sc(),n="ne"==c.b.substr(0,2);a.TileMatrix.sort(function(a,b){return b.ScaleDenominator-a.ScaleDenominator});a.TileMatrix.forEach(function(a){var b;0<l.length?b=na(l,function(b){return a.Identifier==b.TileMatrix}):b=!0;if(b){e.push(a.Identifier);b=2.8E-4*a.ScaleDenominator/m;var c=a.TileWidth,p=a.TileHeight;n?f.push([a.TopLeftCorner[1],a.TopLeftCorner[0]]):
-f.push(a.TopLeftCorner);d.push(b);g.push(c==p?c:[c,p]);h.push([a.MatrixWidth,-a.MatrixHeight])}});return new rx({extent:b,origins:f,resolutions:d,matrixIds:e,tileSizes:g,sizes:h})};function Z(a){function b(a){a="KVP"==d?Fw(a,f):a.replace(/\{(\w+?)\}/g,function(a,b){return b.toLowerCase()in f?f[b.toLowerCase()]:a});return function(b){if(b){var c={TileMatrix:e.o[b[0]],TileCol:b[1],TileRow:-b[2]-1};tb(c,g);b=a;return b="KVP"==d?Fw(b,c):b.replace(/\{(\w+?)\}/g,function(a,b){return c[b]})}}}this.fa=void 0!==a.version?a.version:"1.0.0";this.C=void 0!==a.format?a.format:"image/jpeg";this.f=a.dimensions?a.dimensions:{};this.B=a.layer;this.l=a.matrixSet;this.R=a.style;var c=a.urls;void 0===
-c&&void 0!==a.url&&(c=mw(a.url));var d=this.T=void 0!==a.requestEncoding?a.requestEncoding:"KVP",e=a.tileGrid,f={layer:this.B,style:this.R,tilematrixset:this.l};"KVP"==d&&tb(f,{Service:"WMTS",Request:"GetTile",Version:this.fa,Format:this.C});var g=this.f,h=c&&0<c.length?kw(c.map(b)):lw;X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileClass:a.tileClass,tileGrid:e,
-tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:h,urls:c,wrapX:void 0!==a.wrapX?a.wrapX:!1});qw(this,tx(this))}v(Z,X);k=Z.prototype;k.Mk=function(){return this.f};k.Io=function(){return this.C};k.Jo=function(){return this.B};k.$k=function(){return this.l};k.kl=function(){return this.T};k.Ko=function(){return this.R};k.rl=function(){return this.fa};function tx(a){var b=0,c=[],d;for(d in a.f)c[b++]=d+"-"+a.f[d];return c.join("/")}
-k.uq=function(a){tb(this.f,a);qw(this,tx(this))};function ux(a){a=a||{};var b=a.size,c=b[0],d=b[1],e=[],f=256;switch(void 0!==a.tierSizeCalculation?a.tierSizeCalculation:vx){case vx:for(;c>f||d>f;)e.push([Math.ceil(c/f),Math.ceil(d/f)]),f+=f;break;case wx:for(;c>f||d>f;)e.push([Math.ceil(c/f),Math.ceil(d/f)]),c>>=1,d>>=1;break;default:xa(!1,53)}e.push([1,1]);e.reverse();for(var f=[1],g=[0],d=1,c=e.length;d<c;d++)f.push(1<<d),g.push(e[d-1][0]*e[d-1][1]+g[d-1]);f.reverse();b=[0,-b[1],b[0],0];b=new lc({extent:b,origin:ib(b),resolutions:f});(f=a.url)&&
--1==f.indexOf("{TileGroup}")&&(f+="{TileGroup}/{z}-{x}-{y}.jpg");f=mw(f);f=kw(f.map(function(a){return function(b){if(b){var c=b[0],d=b[1];b=-b[2]-1;var f={z:c,x:d,y:b,TileGroup:"TileGroup"+((d+b*e[c][0]+g[c])/256|0)};return a.replace(/\{(\w+?)\}/g,function(a,b){return f[b]})}}}));X.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileClass:xx,tileGrid:b,tileUrlFunction:f})}
-v(ux,X);function xx(a,b,c,d,e){Os.call(this,a,b,c,d,e);this.a=null}v(xx,Os);xx.prototype.Y=function(){if(this.a)return this.a;var a=Os.prototype.Y.call(this);if(2==this.state){if(256==a.width&&256==a.height)return this.a=a;var b=jd(256,256);b.drawImage(a,0,0);return this.a=b.canvas}return a};var vx="default",wx="truncated";function yx(a,b){this.b=b;this.a=[{x:0,y:0,width:a,height:a}];this.c={};this.i=jd(a,a);this.f=this.i.canvas}yx.prototype.get=function(a){return this.c[a]||null};
-yx.prototype.add=function(a,b,c,d,e){var f;var g=0;for(f=this.a.length;g<f;++g){var h=this.a[g];if(h.width>=b+this.b&&h.height>=c+this.b)return f={offsetX:h.x+this.b,offsetY:h.y+this.b,image:this.f},this.c[a]=f,d.call(e,this.i,h.x+this.b,h.y+this.b),a=g,b+=this.b,d=c+this.b,h.width-b>h.height-d?(c={x:h.x+b,y:h.y,width:h.width-b,height:h.height},b={x:h.x,y:h.y+d,width:b,height:h.height-d},zx(this,a,c,b)):(c={x:h.x+b,y:h.y,width:h.width-b,height:d},b={x:h.x,y:h.y+d,width:h.width,height:h.height-d},
-zx(this,a,c,b)),f}return null};function zx(a,b,c,d){b=[b,1];0<c.width&&0<c.height&&b.push(c);0<d.width&&0<d.height&&b.push(d);a.a.splice.apply(a.a,b)};function Ax(a){a=a||{};this.a=void 0!==a.initialSize?a.initialSize:256;this.i=void 0!==a.maxSize?a.maxSize:void 0!==ea?ea:2048;this.b=void 0!==a.space?a.space:1;this.f=[new yx(this.a,this.b)];this.c=this.a;this.g=[new yx(this.c,this.b)]}Ax.prototype.add=function(a,b,c,d,e,f){if(b+this.b>this.i||c+this.b>this.i)return null;d=Bx(this,!1,a,b,c,d,f);if(!d)return null;a=Bx(this,!0,a,b,c,e?e:ua,f);return{offsetX:d.offsetX,offsetY:d.offsetY,image:d.image,Zl:a.image}};
-function Bx(a,b,c,d,e,f,g){var h=b?a.g:a.f,l;var m=0;for(l=h.length;m<l;++m){var n=h[m];if(n=n.add(c,d,e,f,g))return n;n||m!==l-1||(b?(n=Math.min(2*a.c,a.i),a.c=n):(n=Math.min(2*a.a,a.i),a.a=n),n=new yx(n,a.b),h.push(n),++l)}return null};wa.prototype.code=wa.prototype.code;t("ol.Attribution",Ac);Ac.prototype.getHTML=Ac.prototype.i;t("ol.Collection",Yc);Yc.prototype.clear=Yc.prototype.clear;Yc.prototype.extend=Yc.prototype.fg;Yc.prototype.forEach=Yc.prototype.forEach;Yc.prototype.getArray=Yc.prototype.tm;Yc.prototype.item=Yc.prototype.item;Yc.prototype.getLength=Yc.prototype.dc;Yc.prototype.insertAt=Yc.prototype.He;Yc.prototype.pop=Yc.prototype.pop;Yc.prototype.push=Yc.prototype.push;Yc.prototype.remove=Yc.prototype.remove;
-Yc.prototype.removeAt=Yc.prototype.Hg;Yc.prototype.setAt=Yc.prototype.Wp;bd.prototype.element=bd.prototype.element;t("ol.color.asArray",ed);t("ol.color.asString",gd);t("ol.colorlike.asColorLike",id);t("ol.control.defaults",xd);t("ol.coordinate.add",Ze);t("ol.coordinate.createStringXY",function(a){return function(b){return lf(b,a)}});t("ol.coordinate.format",cf);t("ol.coordinate.rotate",ef);t("ol.coordinate.toStringHDMS",function(a,b){return a?bf("NS",a[1],b)+" "+bf("EW",a[0],b):""});
-t("ol.coordinate.toStringXY",lf);t("ol.DeviceOrientation",Rk);Rk.prototype.getAlpha=Rk.prototype.Fk;Rk.prototype.getBeta=Rk.prototype.Ik;Rk.prototype.getGamma=Rk.prototype.Ok;Rk.prototype.getHeading=Rk.prototype.um;Rk.prototype.getTracking=Rk.prototype.Th;Rk.prototype.setTracking=Rk.prototype.gg;t("ol.easing.easeIn",qd);t("ol.easing.easeOut",rd);t("ol.easing.inAndOut",sd);t("ol.easing.linear",td);t("ol.easing.upAndDown",function(a){return.5>a?sd(2*a):1-sd(2*(a-.5))});
-t("ol.extent.boundingExtent",Na);t("ol.extent.buffer",Qa);t("ol.extent.containsCoordinate",Ta);t("ol.extent.containsExtent",Va);t("ol.extent.containsXY",Ua);t("ol.extent.createEmpty",Oa);t("ol.extent.equals",bb);t("ol.extent.extend",cb);t("ol.extent.getArea",jb);t("ol.extent.getBottomLeft",eb);t("ol.extent.getBottomRight",gb);t("ol.extent.getCenter",nb);t("ol.extent.getHeight",mb);t("ol.extent.getIntersection",pb);t("ol.extent.getSize",function(a){return[a[2]-a[0],a[3]-a[1]]});
-t("ol.extent.getTopLeft",ib);t("ol.extent.getTopRight",hb);t("ol.extent.getWidth",lb);t("ol.extent.intersects",qb);t("ol.extent.isEmpty",kb);t("ol.extent.applyTransform",sb);t("ol.Feature",H);H.prototype.clone=H.prototype.clone;H.prototype.getGeometry=H.prototype.V;H.prototype.getId=H.prototype.wm;H.prototype.getGeometryName=H.prototype.Qk;H.prototype.getStyle=H.prototype.xm;H.prototype.getStyleFunction=H.prototype.Lc;H.prototype.setGeometry=H.prototype.Ra;H.prototype.setStyle=H.prototype.hg;
-H.prototype.setId=H.prototype.jc;H.prototype.setGeometryName=H.prototype.Tc;t("ol.featureloader.xhr",Dl);t("ol.Geolocation",xs);xs.prototype.getAccuracy=xs.prototype.Dk;xs.prototype.getAccuracyGeometry=xs.prototype.Ek;xs.prototype.getAltitude=xs.prototype.Gk;xs.prototype.getAltitudeAccuracy=xs.prototype.Hk;xs.prototype.getHeading=xs.prototype.ym;xs.prototype.getPosition=xs.prototype.zm;xs.prototype.getProjection=xs.prototype.Uh;xs.prototype.getSpeed=xs.prototype.ll;xs.prototype.getTracking=xs.prototype.Vh;
-xs.prototype.getTrackingOptions=xs.prototype.Gh;xs.prototype.setProjection=xs.prototype.Wh;xs.prototype.setTracking=xs.prototype.Ke;xs.prototype.setTrackingOptions=xs.prototype.wj;t("ol.Graticule",Ds);Ds.prototype.getMap=Ds.prototype.Cm;Ds.prototype.getMeridians=Ds.prototype.al;Ds.prototype.getParallels=Ds.prototype.hl;Ds.prototype.setMap=Ds.prototype.setMap;t("ol.has.DEVICE_PIXEL_RATIO",Sd);t("ol.has.CANVAS",Ud);t("ol.has.DEVICE_ORIENTATION",Vd);t("ol.has.GEOLOCATION",Wd);t("ol.has.TOUCH",Xd);
-t("ol.has.WEBGL",Md);Js.prototype.getImage=Js.prototype.Y;Js.prototype.load=Js.prototype.load;Os.prototype.getImage=Os.prototype.Y;t("ol.inherits",v);t("ol.interaction.defaults",qh);t("ol.Kinetic",kg);t("ol.loadingstrategy.all",Zt);t("ol.loadingstrategy.bbox",function(a){return[a]});t("ol.loadingstrategy.tile",function(a){return function(b,c){c=a.tc(c);b=oc(a,b,c);var d=[];c=[c,0,0];for(c[1]=b.ca;c[1]<=b.$;++c[1])for(c[2]=b.da;c[2]<=b.ia;++c[2])d.push(a.Aa(c));return d}});t("ol.Map",G);
-G.prototype.addControl=G.prototype.kk;G.prototype.addInteraction=G.prototype.lk;G.prototype.addLayer=G.prototype.ih;G.prototype.addOverlay=G.prototype.jh;G.prototype.forEachFeatureAtPixel=G.prototype.we;G.prototype.forEachLayerAtPixel=G.prototype.Im;G.prototype.hasFeatureAtPixel=G.prototype.Yl;G.prototype.getEventCoordinate=G.prototype.Tf;G.prototype.getEventPixel=G.prototype.xe;G.prototype.getTarget=G.prototype.ag;G.prototype.getTargetElement=G.prototype.jd;G.prototype.getCoordinateFromPixel=G.prototype.Wa;
-G.prototype.getControls=G.prototype.Lk;G.prototype.getOverlays=G.prototype.fl;G.prototype.getOverlayById=G.prototype.el;G.prototype.getInteractions=G.prototype.Sk;G.prototype.getLayerGroup=G.prototype.Kc;G.prototype.getLayers=G.prototype.Xh;G.prototype.getPixelFromCoordinate=G.prototype.Ja;G.prototype.getSize=G.prototype.Ob;G.prototype.getView=G.prototype.Z;G.prototype.getViewport=G.prototype.sl;G.prototype.renderSync=G.prototype.Tp;G.prototype.render=G.prototype.render;
-G.prototype.removeControl=G.prototype.Mp;G.prototype.removeInteraction=G.prototype.Np;G.prototype.removeLayer=G.prototype.Pp;G.prototype.removeOverlay=G.prototype.Qp;G.prototype.setLayerGroup=G.prototype.qj;G.prototype.setSize=G.prototype.Qg;G.prototype.setTarget=G.prototype.Le;G.prototype.setView=G.prototype.iq;G.prototype.updateSize=G.prototype.Ad;Jd.prototype.originalEvent=Jd.prototype.originalEvent;Jd.prototype.pixel=Jd.prototype.pixel;Jd.prototype.coordinate=Jd.prototype.coordinate;
-Jd.prototype.dragging=Jd.prototype.dragging;Id.prototype.map=Id.prototype.map;Id.prototype.frameState=Id.prototype.frameState;t("ol.Object",Tc);Tc.prototype.get=Tc.prototype.get;Tc.prototype.getKeys=Tc.prototype.O;Tc.prototype.getProperties=Tc.prototype.N;Tc.prototype.set=Tc.prototype.set;Tc.prototype.setProperties=Tc.prototype.H;Tc.prototype.unset=Tc.prototype.P;Xc.prototype.key=Xc.prototype.key;Xc.prototype.oldValue=Xc.prototype.oldValue;t("ol.Observable",Sc);
-t("ol.Observable.unByKey",function(a){if(Array.isArray(a))for(var b=0,c=a.length;b<c;++b)Ec(a[b]);else Ec(a)});Sc.prototype.changed=Sc.prototype.s;Sc.prototype.dispatchEvent=Sc.prototype.b;Sc.prototype.getRevision=Sc.prototype.L;Sc.prototype.on=Sc.prototype.J;Sc.prototype.once=Sc.prototype.once;Sc.prototype.un=Sc.prototype.K;t("ol.Overlay",sk);sk.prototype.getElement=sk.prototype.Rd;sk.prototype.getId=sk.prototype.Jm;sk.prototype.getMap=sk.prototype.Me;sk.prototype.getOffset=sk.prototype.Dh;
-sk.prototype.getPosition=sk.prototype.Yh;sk.prototype.getPositioning=sk.prototype.Eh;sk.prototype.setElement=sk.prototype.lj;sk.prototype.setMap=sk.prototype.setMap;sk.prototype.setOffset=sk.prototype.rj;sk.prototype.setPosition=sk.prototype.Ne;sk.prototype.setPositioning=sk.prototype.uj;t("ol.proj.METERS_PER_UNIT",zb);t("ol.proj.setProj4",function(a){Ab=a});t("ol.proj.getPointResolution",Sb);t("ol.proj.addEquivalentProjections",Wb);t("ol.proj.addProjection",Xb);
-t("ol.proj.addCoordinateTransforms",ac);t("ol.proj.fromLonLat",function(a,b){return gc(a,"EPSG:4326",void 0!==b?b:"EPSG:3857")});t("ol.proj.toLonLat",function(a,b){return gc(a,void 0!==b?b:"EPSG:3857","EPSG:4326")});t("ol.proj.get",Tb);t("ol.proj.equivalent",dc);t("ol.proj.getTransform",ec);t("ol.proj.transform",gc);t("ol.proj.transformExtent",hc);
-t("ol.render.toContext",function(a,b){var c=a.canvas,d=b?b:{};b=d.pixelRatio||Sd;if(d=d.size)c.width=d[0]*b,c.height=d[1]*b,c.style.width=d[0]+"px",c.style.height=d[1]+"px";c=[0,0,c.width,c.height];d=Ih(Bh(),b,b);return new Xh(a,b,c,d,0)});t("ol.size.toSize",Ma);t("ol.Sphere",xb);xb.prototype.geodesicArea=xb.prototype.a;xb.prototype.haversineDistance=xb.prototype.b;Ls.prototype.getTileCoord=Ls.prototype.f;Ls.prototype.load=Ls.prototype.load;t("ol.tilegrid.createXYZ",xc);px.prototype.getFormat=px.prototype.Lm;
-px.prototype.getFeatures=px.prototype.Km;px.prototype.getProjection=px.prototype.Mm;px.prototype.setFeatures=px.prototype.mj;px.prototype.setProjection=px.prototype.ig;px.prototype.setLoader=px.prototype.Pg;t("ol.View",F);F.prototype.animate=F.prototype.animate;F.prototype.getAnimating=F.prototype.Ic;F.prototype.getInteracting=F.prototype.Rk;F.prototype.cancelAnimations=F.prototype.ed;F.prototype.constrainCenter=F.prototype.Ec;F.prototype.constrainResolution=F.prototype.constrainResolution;
-F.prototype.constrainRotation=F.prototype.constrainRotation;F.prototype.getCenter=F.prototype.wa;F.prototype.calculateExtent=F.prototype.dd;F.prototype.getMaxResolution=F.prototype.Nm;F.prototype.getMinResolution=F.prototype.Pm;F.prototype.getMaxZoom=F.prototype.Om;F.prototype.setMaxZoom=F.prototype.eq;F.prototype.getMinZoom=F.prototype.Qm;F.prototype.setMinZoom=F.prototype.fq;F.prototype.getProjection=F.prototype.Rm;F.prototype.getResolution=F.prototype.Pa;F.prototype.getResolutions=F.prototype.Sm;
-F.prototype.getResolutionForExtent=F.prototype.ze;F.prototype.getRotation=F.prototype.Qa;F.prototype.getZoom=F.prototype.Hh;F.prototype.getZoomForResolution=F.prototype.Ce;F.prototype.fit=F.prototype.Qf;F.prototype.centerOn=F.prototype.uk;F.prototype.rotate=F.prototype.rotate;F.prototype.setCenter=F.prototype.ob;F.prototype.setResolution=F.prototype.Vc;F.prototype.setRotation=F.prototype.Oe;F.prototype.setZoom=F.prototype.lq;t("ol.xml.getAllTextContent",kl);t("ol.xml.parse",pl);
-Oi.prototype.getGL=Oi.prototype.Wo;Oi.prototype.useProgram=Oi.prototype.Qc;t("ol.tilegrid.TileGrid",lc);lc.prototype.forEachTileCoord=lc.prototype.Rf;lc.prototype.getMaxZoom=lc.prototype.Ti;lc.prototype.getMinZoom=lc.prototype.Ui;lc.prototype.getOrigin=lc.prototype.Pc;lc.prototype.getResolution=lc.prototype.Da;lc.prototype.getResolutions=lc.prototype.Vi;lc.prototype.getTileCoordExtent=lc.prototype.Aa;lc.prototype.getTileCoordForCoordAndResolution=lc.prototype.Be;
-lc.prototype.getTileCoordForCoordAndZ=lc.prototype.bg;lc.prototype.getTileSize=lc.prototype.gb;lc.prototype.getZForResolution=lc.prototype.tc;t("ol.tilegrid.WMTS",rx);rx.prototype.getMatrixIds=rx.prototype.l;t("ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet",sx);t("ol.style.AtlasManager",Ax);t("ol.style.Circle",$k);$k.prototype.setRadius=$k.prototype.Uc;t("ol.style.Fill",al);al.prototype.clone=al.prototype.clone;al.prototype.getColor=al.prototype.i;al.prototype.setColor=al.prototype.c;
-t("ol.style.Icon",eo);eo.prototype.clone=eo.prototype.clone;eo.prototype.getAnchor=eo.prototype.Hc;eo.prototype.getColor=eo.prototype.Lo;eo.prototype.getImage=eo.prototype.Y;eo.prototype.getOrigin=eo.prototype.Oc;eo.prototype.getSrc=eo.prototype.Mo;eo.prototype.getSize=eo.prototype.ic;eo.prototype.load=eo.prototype.load;t("ol.style.Image",Xk);Xk.prototype.getOpacity=Xk.prototype.Ze;Xk.prototype.getRotateWithView=Xk.prototype.$e;Xk.prototype.getRotation=Xk.prototype.af;Xk.prototype.getScale=Xk.prototype.bf;
-Xk.prototype.getSnapToPixel=Xk.prototype.Ae;Xk.prototype.setOpacity=Xk.prototype.td;Xk.prototype.setRotation=Xk.prototype.cf;Xk.prototype.setScale=Xk.prototype.ud;t("ol.style.RegularShape",Yk);Yk.prototype.clone=Yk.prototype.clone;Yk.prototype.getAnchor=Yk.prototype.Hc;Yk.prototype.getAngle=Yk.prototype.Pi;Yk.prototype.getFill=Yk.prototype.Fa;Yk.prototype.getImage=Yk.prototype.Y;Yk.prototype.getOrigin=Yk.prototype.Oc;Yk.prototype.getPoints=Yk.prototype.Qi;Yk.prototype.getRadius=Yk.prototype.Ri;
-Yk.prototype.getRadius2=Yk.prototype.Fh;Yk.prototype.getSize=Yk.prototype.ic;Yk.prototype.getStroke=Yk.prototype.Ga;t("ol.style.Stroke",wj);wj.prototype.clone=wj.prototype.clone;wj.prototype.getColor=wj.prototype.No;wj.prototype.getLineCap=wj.prototype.Vk;wj.prototype.getLineDash=wj.prototype.Oo;wj.prototype.getLineDashOffset=wj.prototype.Wk;wj.prototype.getLineJoin=wj.prototype.Xk;wj.prototype.getMiterLimit=wj.prototype.bl;wj.prototype.getWidth=wj.prototype.Po;wj.prototype.setColor=wj.prototype.Qo;
-wj.prototype.setLineCap=wj.prototype.aq;wj.prototype.setLineDash=wj.prototype.setLineDash;wj.prototype.setLineDashOffset=wj.prototype.bq;wj.prototype.setLineJoin=wj.prototype.cq;wj.prototype.setMiterLimit=wj.prototype.gq;wj.prototype.setWidth=wj.prototype.jq;t("ol.style.Style",bl);bl.prototype.clone=bl.prototype.clone;bl.prototype.getGeometry=bl.prototype.V;bl.prototype.getGeometryFunction=bl.prototype.Pk;bl.prototype.getFill=bl.prototype.Fa;bl.prototype.setFill=bl.prototype.pf;
-bl.prototype.getImage=bl.prototype.Y;bl.prototype.setImage=bl.prototype.Og;bl.prototype.getStroke=bl.prototype.Ga;bl.prototype.setStroke=bl.prototype.qf;bl.prototype.getText=bl.prototype.Na;bl.prototype.setText=bl.prototype.xd;bl.prototype.getZIndex=bl.prototype.Ba;bl.prototype.setGeometry=bl.prototype.Ra;bl.prototype.setZIndex=bl.prototype.Vb;t("ol.style.Text",fo);fo.prototype.clone=fo.prototype.clone;fo.prototype.getFont=fo.prototype.Nk;fo.prototype.getOffsetX=fo.prototype.cl;
-fo.prototype.getOffsetY=fo.prototype.dl;fo.prototype.getFill=fo.prototype.Fa;fo.prototype.getRotateWithView=fo.prototype.Ro;fo.prototype.getRotation=fo.prototype.So;fo.prototype.getScale=fo.prototype.To;fo.prototype.getStroke=fo.prototype.Ga;fo.prototype.getText=fo.prototype.Na;fo.prototype.getTextAlign=fo.prototype.nl;fo.prototype.getTextBaseline=fo.prototype.ol;fo.prototype.setFont=fo.prototype.nj;fo.prototype.setOffsetX=fo.prototype.sj;fo.prototype.setOffsetY=fo.prototype.tj;
-fo.prototype.setFill=fo.prototype.pf;fo.prototype.setRotation=fo.prototype.Uo;fo.prototype.setScale=fo.prototype.Si;fo.prototype.setStroke=fo.prototype.qf;fo.prototype.setText=fo.prototype.xd;fo.prototype.setTextAlign=fo.prototype.vj;fo.prototype.setTextBaseline=fo.prototype.hq;t("ol.source.BingMaps",xw);t("ol.source.BingMaps.TOS_ATTRIBUTION",yw);xw.prototype.getApiKey=xw.prototype.T;xw.prototype.getImagerySet=xw.prototype.fa;t("ol.source.CartoDB",Aw);Aw.prototype.getConfig=Aw.prototype.Kk;
-Aw.prototype.updateConfig=Aw.prototype.tq;Aw.prototype.setConfig=Aw.prototype.Xp;t("ol.source.Cluster",Y);Y.prototype.getDistance=Y.prototype.$n;Y.prototype.getSource=Y.prototype.ao;Y.prototype.setDistance=Y.prototype.Yp;t("ol.source.Image",Hv);Jv.prototype.image=Jv.prototype.image;t("ol.source.ImageArcGISRest",Gw);Gw.prototype.getParams=Gw.prototype.co;Gw.prototype.getImageLoadFunction=Gw.prototype.bo;Gw.prototype.getUrl=Gw.prototype.eo;Gw.prototype.setImageLoadFunction=Gw.prototype.fo;
-Gw.prototype.setUrl=Gw.prototype.ho;Gw.prototype.updateParams=Gw.prototype.io;t("ol.source.ImageCanvas",Ov);t("ol.source.ImageMapGuide",Hw);Hw.prototype.getParams=Hw.prototype.ko;Hw.prototype.getImageLoadFunction=Hw.prototype.jo;Hw.prototype.updateParams=Hw.prototype.mo;Hw.prototype.setImageLoadFunction=Hw.prototype.lo;t("ol.source.ImageStatic",Iw);t("ol.source.ImageVector",Pv);Pv.prototype.getSource=Pv.prototype.no;Pv.prototype.getStyle=Pv.prototype.oo;Pv.prototype.getStyleFunction=Pv.prototype.po;
-Pv.prototype.setStyle=Pv.prototype.Ii;t("ol.source.ImageWMS",Jw);Jw.prototype.getGetFeatureInfoUrl=Jw.prototype.so;Jw.prototype.getParams=Jw.prototype.uo;Jw.prototype.getImageLoadFunction=Jw.prototype.to;Jw.prototype.getUrl=Jw.prototype.vo;Jw.prototype.setImageLoadFunction=Jw.prototype.wo;Jw.prototype.setUrl=Jw.prototype.xo;Jw.prototype.updateParams=Jw.prototype.yo;t("ol.source.OSM",Nw);t("ol.source.OSM.ATTRIBUTION",Ow);t("ol.source.Raster",Pw);Pw.prototype.setOperation=Pw.prototype.v;
-Tw.prototype.extent=Tw.prototype.extent;Tw.prototype.resolution=Tw.prototype.resolution;Tw.prototype.data=Tw.prototype.data;t("ol.source.Source",$t);$t.prototype.getAttributions=$t.prototype.ya;$t.prototype.getLogo=$t.prototype.xa;$t.prototype.getProjection=$t.prototype.za;$t.prototype.getState=$t.prototype.getState;$t.prototype.refresh=$t.prototype.sa;$t.prototype.setAttributions=$t.prototype.ua;t("ol.source.Stamen",Ww);t("ol.source.Tile",pw);pw.prototype.getTileGrid=pw.prototype.ab;
-sw.prototype.tile=sw.prototype.tile;t("ol.source.TileArcGISRest",$w);$w.prototype.getParams=$w.prototype.C;$w.prototype.updateParams=$w.prototype.B;t("ol.source.TileDebug",bx);t("ol.source.TileImage",X);X.prototype.setRenderReprojectionEdges=X.prototype.Pb;X.prototype.setTileGridForProjection=X.prototype.Qb;t("ol.source.TileJSON",dx);dx.prototype.getTileJSON=dx.prototype.pl;t("ol.source.TileUTFGrid",ex);ex.prototype.getTemplate=ex.prototype.ml;ex.prototype.forDataAtCoordinateAndResolution=ex.prototype.zk;
-t("ol.source.TileWMS",ix);ix.prototype.getGetFeatureInfoUrl=ix.prototype.Fo;ix.prototype.getParams=ix.prototype.Go;ix.prototype.updateParams=ix.prototype.Ho;tw.prototype.getTileLoadFunction=tw.prototype.pb;tw.prototype.getTileUrlFunction=tw.prototype.qb;tw.prototype.getUrls=tw.prototype.rb;tw.prototype.setTileLoadFunction=tw.prototype.vb;tw.prototype.setTileUrlFunction=tw.prototype.cb;tw.prototype.setUrl=tw.prototype.jb;tw.prototype.setUrls=tw.prototype.eb;t("ol.source.Vector",U);
-U.prototype.addFeature=U.prototype.yb;U.prototype.addFeatures=U.prototype.cd;U.prototype.clear=U.prototype.clear;U.prototype.forEachFeature=U.prototype.sh;U.prototype.forEachFeatureInExtent=U.prototype.$b;U.prototype.forEachFeatureIntersectingExtent=U.prototype.th;U.prototype.getFeaturesCollection=U.prototype.Ah;U.prototype.getFeatures=U.prototype.Xe;U.prototype.getFeaturesAtCoordinate=U.prototype.zh;U.prototype.getFeaturesInExtent=U.prototype.Uf;U.prototype.getClosestFeatureToCoordinate=U.prototype.vh;
-U.prototype.getExtent=U.prototype.G;U.prototype.getFeatureById=U.prototype.yh;U.prototype.getFormat=U.prototype.Mi;U.prototype.getUrl=U.prototype.Ni;U.prototype.removeFeature=U.prototype.Gb;gu.prototype.feature=gu.prototype.feature;t("ol.source.VectorTile",qx);t("ol.source.WMTS",Z);Z.prototype.getDimensions=Z.prototype.Mk;Z.prototype.getFormat=Z.prototype.Io;Z.prototype.getLayer=Z.prototype.Jo;Z.prototype.getMatrixSet=Z.prototype.$k;Z.prototype.getRequestEncoding=Z.prototype.kl;
-Z.prototype.getStyle=Z.prototype.Ko;Z.prototype.getVersion=Z.prototype.rl;Z.prototype.updateDimensions=Z.prototype.uq;
-t("ol.source.WMTS.optionsFromCapabilities",function(a,b){var c=na(a.Contents.Layer,function(a){return a.Identifier==b.layer});if(null===c)return null;var d=a.Contents.TileMatrixSet;var e=1<c.TileMatrixSetLink.length?"projection"in b?sa(c.TileMatrixSetLink,function(a){var c=na(d,function(b){return b.Identifier==a.TileMatrixSet}).SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"),e=Tb(c),f=Tb(b.projection);return e&&f?dc(e,f):c==b.projection}):sa(c.TileMatrixSetLink,function(a){return a.TileMatrixSet==
-b.matrixSet}):0;0>e&&(e=0);var f=c.TileMatrixSetLink[e].TileMatrixSet;var g=c.TileMatrixSetLink[e].TileMatrixSetLimits;var h=c.Format[0];"format"in b&&(h=b.format);e=sa(c.Style,function(a){return"style"in b?a.Title==b.style:a.isDefault});0>e&&(e=0);e=c.Style[e].Identifier;var l={};"Dimension"in c&&c.Dimension.forEach(function(a){var b=a.Identifier,c=a.Default;void 0===c&&(c=a.Value[0]);l[b]=c});var m=na(a.Contents.TileMatrixSet,function(a){return a.Identifier==f});var n="projection"in b?Tb(b.projection):
-Tb(m.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var p=c.WGS84BoundingBox;if(void 0!==p){var q=Tb("EPSG:4326").G();q=p[0]==q[0]&&p[2]==q[2];var r=hc(p,"EPSG:4326",n);(p=n.G())&&(Va(p,r)||(r=void 0))}g=sx(m,r,g);var u=[],m=b.requestEncoding,m=void 0!==m?m:"";if("OperationsMetadata"in a&&"GetTile"in a.OperationsMetadata)for(a=a.OperationsMetadata.GetTile.DCP.HTTP.Get,r=0,p=a.length;r<p;++r){var x=na(a[r].Constraint,function(a){return"GetEncoding"==a.name}).AllowedValues.Value;
-""===m&&(m=x[0]);if("KVP"===m)ja(x,"KVP")&&u.push(a[r].href);else break}u.length||(m="REST",c.ResourceURL.forEach(function(a){"tile"===a.resourceType&&(h=a.format,u.push(a.template))}));return{urls:u,layer:b.layer,matrixSet:f,format:h,projection:n,requestEncoding:m,tileGrid:g,style:e,dimensions:l,wrapX:q,crossOrigin:b.crossOrigin}});t("ol.source.XYZ",zw);t("ol.source.Zoomify",ux);Rh.prototype.vectorContext=Rh.prototype.vectorContext;Rh.prototype.frameState=Rh.prototype.frameState;
-Rh.prototype.context=Rh.prototype.context;Rh.prototype.glContext=Rh.prototype.glContext;kq.prototype.get=kq.prototype.get;kq.prototype.getExtent=kq.prototype.G;kq.prototype.getId=kq.prototype.Wn;kq.prototype.getGeometry=kq.prototype.V;kq.prototype.getProperties=kq.prototype.Xn;kq.prototype.getType=kq.prototype.U;t("ol.render.VectorContext",Wh);kk.prototype.setStyle=kk.prototype.rd;kk.prototype.drawGeometry=kk.prototype.zb;kk.prototype.drawFeature=kk.prototype.te;Xh.prototype.drawCircle=Xh.prototype.Zb;
-Xh.prototype.setStyle=Xh.prototype.rd;Xh.prototype.drawGeometry=Xh.prototype.zb;Xh.prototype.drawFeature=Xh.prototype.te;t("ol.proj.common.add",ic);t("ol.proj.Projection",Bb);Bb.prototype.getCode=Bb.prototype.Jk;Bb.prototype.getExtent=Bb.prototype.G;Bb.prototype.getUnits=Bb.prototype.Un;Bb.prototype.getMetersPerUnit=Bb.prototype.sc;Bb.prototype.getWorldExtent=Bb.prototype.tl;Bb.prototype.isGlobal=Bb.prototype.dm;Bb.prototype.setGlobal=Bb.prototype.$p;Bb.prototype.setExtent=Bb.prototype.Vn;
-Bb.prototype.setWorldExtent=Bb.prototype.kq;Bb.prototype.setGetPointResolution=Bb.prototype.Zp;t("ol.proj.Units.METERS_PER_UNIT",zb);t("ol.layer.Base",sh);sh.prototype.getExtent=sh.prototype.G;sh.prototype.getMaxResolution=sh.prototype.fc;sh.prototype.getMinResolution=sh.prototype.gc;sh.prototype.getOpacity=sh.prototype.hc;sh.prototype.getVisible=sh.prototype.Mb;sh.prototype.getZIndex=sh.prototype.Ba;sh.prototype.setExtent=sh.prototype.vc;sh.prototype.setMaxResolution=sh.prototype.Ac;
-sh.prototype.setMinResolution=sh.prototype.Bc;sh.prototype.setOpacity=sh.prototype.wc;sh.prototype.setVisible=sh.prototype.xc;sh.prototype.setZIndex=sh.prototype.Vb;t("ol.layer.Group",uh);uh.prototype.getLayers=uh.prototype.qd;uh.prototype.setLayers=uh.prototype.xi;t("ol.layer.Heatmap",V);V.prototype.getBlur=V.prototype.uh;V.prototype.getGradient=V.prototype.Bh;V.prototype.getRadius=V.prototype.yi;V.prototype.setBlur=V.prototype.jj;V.prototype.setGradient=V.prototype.pj;V.prototype.setRadius=V.prototype.Uc;
-t("ol.layer.Image",Uv);Uv.prototype.getSource=Uv.prototype.ha;t("ol.layer.Layer",wh);wh.prototype.getSource=wh.prototype.ha;wh.prototype.setMap=wh.prototype.setMap;wh.prototype.setSource=wh.prototype.Wc;t("ol.layer.Tile",cw);cw.prototype.getPreload=cw.prototype.Ud;cw.prototype.getSource=cw.prototype.ha;cw.prototype.setPreload=cw.prototype.zi;cw.prototype.getUseInterimTilesOnError=cw.prototype.kd;cw.prototype.setUseInterimTilesOnError=cw.prototype.Ai;t("ol.layer.Vector",T);T.prototype.getSource=T.prototype.ha;
-T.prototype.getStyle=T.prototype.D;T.prototype.getStyleFunction=T.prototype.C;T.prototype.setStyle=T.prototype.g;t("ol.layer.VectorTile",W);W.prototype.getPreload=W.prototype.Ud;W.prototype.getUseInterimTilesOnError=W.prototype.kd;W.prototype.setPreload=W.prototype.Bi;W.prototype.setUseInterimTilesOnError=W.prototype.Ci;t("ol.interaction.DoubleClickZoom",rg);t("ol.interaction.DoubleClickZoom.handleEvent",sg);t("ol.interaction.DragAndDrop",Rs);t("ol.interaction.DragAndDrop.handleEvent",mf);
-Us.prototype.features=Us.prototype.features;Us.prototype.file=Us.prototype.file;Us.prototype.projection=Us.prototype.projection;t("ol.interaction.DragBox",Rg);Rg.prototype.getGeometry=Rg.prototype.V;Wg.prototype.coordinate=Wg.prototype.coordinate;Wg.prototype.mapBrowserEvent=Wg.prototype.mapBrowserEvent;t("ol.interaction.DragPan",Gg);t("ol.interaction.DragRotate",Kg);t("ol.interaction.DragRotateAndZoom",Ys);t("ol.interaction.DragZoom",$g);t("ol.interaction.Draw",ju);
-t("ol.interaction.Draw.handleEvent",lu);ju.prototype.removeLastPoint=ju.prototype.Op;ju.prototype.finishDrawing=ju.prototype.Pd;ju.prototype.extend=ju.prototype.vn;t("ol.interaction.Draw.createRegularPolygon",function(a,b){return function(c,d){var e=c[0];c=c[1];var f=Math.sqrt(hf(e,c));d=d?d:Zf(new ys(e),a);$f(d,e,f,b?b:Math.atan((c[1]-e[1])/(c[0]-e[0])));return d}});
-t("ol.interaction.Draw.createBox",function(){return function(a,b){a=Na(a);b=b||new D(null);b.ma([[eb(a),gb(a),hb(a),ib(a),eb(a)]]);return b}});zu.prototype.feature=zu.prototype.feature;t("ol.interaction.Extent",Au);Au.prototype.getExtent=Au.prototype.G;Au.prototype.setExtent=Au.prototype.g;Lu.prototype.extent_=Lu.prototype.b;t("ol.interaction.Interaction",ng);ng.prototype.getActive=ng.prototype.c;ng.prototype.getMap=ng.prototype.f;ng.prototype.setActive=ng.prototype.Ha;
-t("ol.interaction.KeyboardPan",ah);t("ol.interaction.KeyboardPan.handleEvent",bh);t("ol.interaction.KeyboardZoom",ch);t("ol.interaction.KeyboardZoom.handleEvent",dh);t("ol.interaction.Modify",Nu);t("ol.interaction.Modify.handleEvent",Qu);Nu.prototype.removePoint=Nu.prototype.hj;Vu.prototype.features=Vu.prototype.features;Vu.prototype.mapBrowserEvent=Vu.prototype.mapBrowserEvent;t("ol.interaction.MouseWheelZoom",eh);t("ol.interaction.MouseWheelZoom.handleEvent",fh);eh.prototype.setMouseAnchor=eh.prototype.T;
-t("ol.interaction.PinchRotate",ih);t("ol.interaction.PinchZoom",mh);t("ol.interaction.Pointer",Dg);t("ol.interaction.Pointer.handleEvent",Eg);t("ol.interaction.Select",cv);cv.prototype.getFeatures=cv.prototype.Gn;cv.prototype.getHitTolerance=cv.prototype.Hn;cv.prototype.getLayer=cv.prototype.In;t("ol.interaction.Select.handleEvent",dv);cv.prototype.setHitTolerance=cv.prototype.Kn;cv.prototype.setMap=cv.prototype.setMap;fv.prototype.selected=fv.prototype.selected;fv.prototype.deselected=fv.prototype.deselected;
-fv.prototype.mapBrowserEvent=fv.prototype.mapBrowserEvent;t("ol.interaction.Snap",hv);hv.prototype.addFeature=hv.prototype.yb;hv.prototype.removeFeature=hv.prototype.Gb;t("ol.interaction.Translate",mv);mv.prototype.getHitTolerance=mv.prototype.B;mv.prototype.setHitTolerance=mv.prototype.I;sv.prototype.features=sv.prototype.features;sv.prototype.coordinate=sv.prototype.coordinate;t("ol.geom.Circle",ys);ys.prototype.clone=ys.prototype.clone;ys.prototype.getCenter=ys.prototype.wa;
-ys.prototype.getRadius=ys.prototype.pd;ys.prototype.getType=ys.prototype.U;ys.prototype.intersectsExtent=ys.prototype.Xa;ys.prototype.setCenter=ys.prototype.ob;ys.prototype.setCenterAndRadius=ys.prototype.Ng;ys.prototype.setRadius=ys.prototype.Uc;ys.prototype.transform=ys.prototype.tb;t("ol.geom.Geometry",of);of.prototype.getClosestPoint=of.prototype.Ab;of.prototype.intersectsCoordinate=of.prototype.sb;of.prototype.getExtent=of.prototype.G;of.prototype.rotate=of.prototype.rotate;
-of.prototype.scale=of.prototype.scale;of.prototype.simplify=of.prototype.Rb;of.prototype.transform=of.prototype.tb;t("ol.geom.GeometryCollection",tm);tm.prototype.clone=tm.prototype.clone;tm.prototype.getGeometries=tm.prototype.Vf;tm.prototype.getType=tm.prototype.U;tm.prototype.intersectsExtent=tm.prototype.Xa;tm.prototype.setGeometries=tm.prototype.oj;tm.prototype.applyTransform=tm.prototype.Dc;tm.prototype.translate=tm.prototype.translate;t("ol.geom.LinearRing",Jf);Jf.prototype.clone=Jf.prototype.clone;
-Jf.prototype.getArea=Jf.prototype.qn;Jf.prototype.getCoordinates=Jf.prototype.X;Jf.prototype.getType=Jf.prototype.U;Jf.prototype.setCoordinates=Jf.prototype.ma;t("ol.geom.LineString",O);O.prototype.appendCoordinate=O.prototype.mk;O.prototype.clone=O.prototype.clone;O.prototype.forEachSegment=O.prototype.Ck;O.prototype.getCoordinateAtM=O.prototype.nn;O.prototype.getCoordinates=O.prototype.X;O.prototype.getCoordinateAt=O.prototype.wh;O.prototype.getLength=O.prototype.pn;O.prototype.getType=O.prototype.U;
-O.prototype.intersectsExtent=O.prototype.Xa;O.prototype.setCoordinates=O.prototype.ma;t("ol.geom.MultiLineString",P);P.prototype.appendLineString=P.prototype.nk;P.prototype.clone=P.prototype.clone;P.prototype.getCoordinateAtM=P.prototype.rn;P.prototype.getCoordinates=P.prototype.X;P.prototype.getLineString=P.prototype.Yk;P.prototype.getLineStrings=P.prototype.gd;P.prototype.getType=P.prototype.U;P.prototype.intersectsExtent=P.prototype.Xa;P.prototype.setCoordinates=P.prototype.ma;
-t("ol.geom.MultiPoint",Q);Q.prototype.appendPoint=Q.prototype.qk;Q.prototype.clone=Q.prototype.clone;Q.prototype.getCoordinates=Q.prototype.X;Q.prototype.getPoint=Q.prototype.il;Q.prototype.getPoints=Q.prototype.Zd;Q.prototype.getType=Q.prototype.U;Q.prototype.intersectsExtent=Q.prototype.Xa;Q.prototype.setCoordinates=Q.prototype.ma;t("ol.geom.MultiPolygon",R);R.prototype.appendPolygon=R.prototype.rk;R.prototype.clone=R.prototype.clone;R.prototype.getArea=R.prototype.sn;
-R.prototype.getCoordinates=R.prototype.X;R.prototype.getInteriorPoints=R.prototype.Uk;R.prototype.getPolygon=R.prototype.jl;R.prototype.getPolygons=R.prototype.Td;R.prototype.getType=R.prototype.U;R.prototype.intersectsExtent=R.prototype.Xa;R.prototype.setCoordinates=R.prototype.ma;t("ol.geom.Point",C);C.prototype.clone=C.prototype.clone;C.prototype.getCoordinates=C.prototype.X;C.prototype.getType=C.prototype.U;C.prototype.intersectsExtent=C.prototype.Xa;C.prototype.setCoordinates=C.prototype.ma;
-t("ol.geom.Polygon",D);D.prototype.appendLinearRing=D.prototype.pk;D.prototype.clone=D.prototype.clone;D.prototype.getArea=D.prototype.tn;D.prototype.getCoordinates=D.prototype.X;D.prototype.getInteriorPoint=D.prototype.Tk;D.prototype.getLinearRingCount=D.prototype.Zk;D.prototype.getLinearRing=D.prototype.Ch;D.prototype.getLinearRings=D.prototype.Sd;D.prototype.getType=D.prototype.U;D.prototype.intersectsExtent=D.prototype.Xa;D.prototype.setCoordinates=D.prototype.ma;
-t("ol.geom.Polygon.circular",Xf);t("ol.geom.Polygon.fromExtent",Yf);t("ol.geom.Polygon.fromCircle",Zf);t("ol.geom.SimpleGeometry",rf);rf.prototype.getFirstCoordinate=rf.prototype.ac;rf.prototype.getLastCoordinate=rf.prototype.bc;rf.prototype.getLayout=rf.prototype.cc;rf.prototype.applyTransform=rf.prototype.Dc;rf.prototype.translate=rf.prototype.translate;t("ol.format.EsriJSON",Ql);Ql.prototype.readFeature=Ql.prototype.Tb;Ql.prototype.readFeatures=Ql.prototype.Oa;Ql.prototype.readGeometry=Ql.prototype.Sc;
-Ql.prototype.readProjection=Ql.prototype.kb;Ql.prototype.writeGeometry=Ql.prototype.$c;Ql.prototype.writeGeometryObject=Ql.prototype.je;Ql.prototype.writeFeature=Ql.prototype.Bd;Ql.prototype.writeFeatureObject=Ql.prototype.Zc;Ql.prototype.writeFeatures=Ql.prototype.Wb;Ql.prototype.writeFeaturesObject=Ql.prototype.he;t("ol.format.Feature",El);t("ol.format.filter.and",rm);
-t("ol.format.filter.or",function(a){var b=[null].concat(Array.prototype.slice.call(arguments));return new (Function.prototype.bind.apply(pm,b))});t("ol.format.filter.not",function(a){return new nm(a)});t("ol.format.filter.bbox",sm);t("ol.format.filter.intersects",function(a,b,c){return new hm(a,b,c)});t("ol.format.filter.within",function(a,b,c){return new qm(a,b,c)});t("ol.format.filter.equalTo",function(a,b,c){return new dm(a,b,c)});
-t("ol.format.filter.notEqualTo",function(a,b,c){return new om(a,b,c)});t("ol.format.filter.lessThan",function(a,b){return new lm(a,b)});t("ol.format.filter.lessThanOrEqualTo",function(a,b){return new mm(a,b)});t("ol.format.filter.greaterThan",function(a,b){return new em(a,b)});t("ol.format.filter.greaterThanOrEqualTo",function(a,b){return new fm(a,b)});t("ol.format.filter.isNull",function(a){return new km(a)});t("ol.format.filter.between",function(a,b,c){return new im(a,b,c)});
-t("ol.format.filter.like",function(a,b,c,d,e,f){return new jm(a,b,c,d,e,f)});t("ol.format.filter.during",function(a,b,c){return new bm(a,b,c)});t("ol.format.GeoJSON",xm);xm.prototype.readFeature=xm.prototype.Tb;xm.prototype.readFeatures=xm.prototype.Oa;xm.prototype.readGeometry=xm.prototype.Sc;xm.prototype.readProjection=xm.prototype.kb;xm.prototype.writeFeature=xm.prototype.Bd;xm.prototype.writeFeatureObject=xm.prototype.Zc;xm.prototype.writeFeatures=xm.prototype.Wb;
-xm.prototype.writeFeaturesObject=xm.prototype.he;xm.prototype.writeGeometry=xm.prototype.$c;xm.prototype.writeGeometryObject=xm.prototype.je;t("ol.format.GML",Sm);Sm.prototype.writeFeatures=Sm.prototype.Wb;Sm.prototype.writeFeaturesNode=Sm.prototype.Xb;t("ol.format.GML2",an);t("ol.format.GML3",Sm);Sm.prototype.writeGeometryNode=Sm.prototype.ie;Sm.prototype.writeFeatures=Sm.prototype.Wb;Sm.prototype.writeFeaturesNode=Sm.prototype.Xb;Fm.prototype.readFeatures=Fm.prototype.Oa;t("ol.format.GPX",mn);
-mn.prototype.readFeature=mn.prototype.Tb;mn.prototype.readFeatures=mn.prototype.Oa;mn.prototype.readProjection=mn.prototype.kb;mn.prototype.writeFeatures=mn.prototype.Wb;mn.prototype.writeFeaturesNode=mn.prototype.Xb;t("ol.format.IGC",Xn);Xn.prototype.readFeature=Xn.prototype.Tb;Xn.prototype.readFeatures=Xn.prototype.Oa;Xn.prototype.readProjection=Xn.prototype.kb;t("ol.format.KML",go);go.prototype.readFeature=go.prototype.Tb;go.prototype.readFeatures=go.prototype.Oa;go.prototype.readName=go.prototype.Cp;
-go.prototype.readNetworkLinks=go.prototype.Dp;go.prototype.readRegion=go.prototype.Gp;go.prototype.readRegionFromNode=go.prototype.lf;go.prototype.readProjection=go.prototype.kb;go.prototype.writeFeatures=go.prototype.Wb;go.prototype.writeFeaturesNode=go.prototype.Xb;t("ol.format.MVT",lq);lq.prototype.readFeatures=lq.prototype.Oa;lq.prototype.readProjection=lq.prototype.kb;lq.prototype.setLayers=lq.prototype.mn;t("ol.format.OSMXML",nq);nq.prototype.readFeatures=nq.prototype.Oa;
-nq.prototype.readProjection=nq.prototype.kb;t("ol.format.Polyline",Nq);t("ol.format.Polyline.encodeDeltas",Oq);t("ol.format.Polyline.decodeDeltas",Qq);t("ol.format.Polyline.encodeFloats",Pq);t("ol.format.Polyline.decodeFloats",Rq);Nq.prototype.readFeature=Nq.prototype.Tb;Nq.prototype.readFeatures=Nq.prototype.Oa;Nq.prototype.readGeometry=Nq.prototype.Sc;Nq.prototype.readProjection=Nq.prototype.kb;Nq.prototype.writeGeometry=Nq.prototype.$c;t("ol.format.TopoJSON",Sq);Sq.prototype.readFeatures=Sq.prototype.Oa;
-Sq.prototype.readProjection=Sq.prototype.kb;t("ol.format.WFS",Yq);Yq.prototype.readFeatures=Yq.prototype.Oa;Yq.prototype.readTransactionResponse=Yq.prototype.j;Yq.prototype.readFeatureCollectionMetadata=Yq.prototype.g;t("ol.format.WFS.writeFilter",function(a){var b=jl("http://www.opengis.net/ogc","Filter");Bl({node:b},mr,wl(a.kc),[a],[]);return b});Yq.prototype.writeGetFeature=Yq.prototype.l;Yq.prototype.writeTransaction=Yq.prototype.v;Yq.prototype.readProjection=Yq.prototype.kb;
-t("ol.format.WKT",sr);sr.prototype.readFeature=sr.prototype.Tb;sr.prototype.readFeatures=sr.prototype.Oa;sr.prototype.readGeometry=sr.prototype.Sc;sr.prototype.writeFeature=sr.prototype.Bd;sr.prototype.writeFeatures=sr.prototype.Wb;sr.prototype.writeGeometry=sr.prototype.$c;t("ol.format.WMSCapabilities",Lr);Lr.prototype.read=Lr.prototype.read;t("ol.format.WMSGetFeatureInfo",hs);hs.prototype.readFeatures=hs.prototype.Oa;t("ol.format.WMTSCapabilities",is);is.prototype.read=is.prototype.read;
-t("ol.format.filter.And",Zl);t("ol.format.filter.Bbox",$l);t("ol.format.filter.Comparison",am);t("ol.format.filter.ComparisonBinary",cm);t("ol.format.filter.During",bm);t("ol.format.filter.EqualTo",dm);t("ol.format.filter.Filter",Xl);t("ol.format.filter.GreaterThan",em);t("ol.format.filter.GreaterThanOrEqualTo",fm);t("ol.format.filter.Intersects",hm);t("ol.format.filter.IsBetween",im);t("ol.format.filter.IsLike",jm);t("ol.format.filter.IsNull",km);t("ol.format.filter.LessThan",lm);
-t("ol.format.filter.LessThanOrEqualTo",mm);t("ol.format.filter.Not",nm);t("ol.format.filter.NotEqualTo",om);t("ol.format.filter.Or",pm);t("ol.format.filter.Spatial",gm);t("ol.format.filter.Within",qm);t("ol.events.condition.altKeyOnly",function(a){a=a.originalEvent;return a.altKey&&!(a.metaKey||a.ctrlKey)&&!a.shiftKey});t("ol.events.condition.altShiftKeysOnly",tg);t("ol.events.condition.always",mf);t("ol.events.condition.click",function(a){return"click"==a.type});t("ol.events.condition.never",nf);
-t("ol.events.condition.pointerMove",vg);t("ol.events.condition.singleClick",wg);t("ol.events.condition.doubleClick",function(a){return"dblclick"==a.type});t("ol.events.condition.noModifierKeys",xg);t("ol.events.condition.platformModifierKeyOnly",function(a){a=a.originalEvent;return!a.altKey&&(Rd?a.metaKey:a.ctrlKey)&&!a.shiftKey});t("ol.events.condition.shiftKeyOnly",yg);t("ol.events.condition.targetNotEditable",Ag);t("ol.events.condition.mouseOnly",Bg);t("ol.events.condition.primaryAction",Cg);
-Oc.prototype.type=Oc.prototype.type;Oc.prototype.target=Oc.prototype.target;Oc.prototype.preventDefault=Oc.prototype.preventDefault;Oc.prototype.stopPropagation=Oc.prototype.stopPropagation;t("ol.control.Attribution",nd);t("ol.control.Attribution.render",od);nd.prototype.getCollapsible=nd.prototype.Um;nd.prototype.setCollapsible=nd.prototype.Xm;nd.prototype.setCollapsed=nd.prototype.Wm;nd.prototype.getCollapsed=nd.prototype.Tm;t("ol.control.Control",md);md.prototype.getMap=md.prototype.g;
-md.prototype.setMap=md.prototype.setMap;md.prototype.setTarget=md.prototype.f;t("ol.control.FullScreen",yd);t("ol.control.MousePosition",Dd);t("ol.control.MousePosition.render",Ed);Dd.prototype.getCoordinateFormat=Dd.prototype.xh;Dd.prototype.getProjection=Dd.prototype.Zh;Dd.prototype.setCoordinateFormat=Dd.prototype.kj;Dd.prototype.setProjection=Dd.prototype.$h;t("ol.control.OverviewMap",Bk);t("ol.control.OverviewMap.render",Ck);Bk.prototype.getCollapsible=Bk.prototype.$m;
-Bk.prototype.setCollapsible=Bk.prototype.cn;Bk.prototype.setCollapsed=Bk.prototype.bn;Bk.prototype.getCollapsed=Bk.prototype.Zm;Bk.prototype.getOverviewMap=Bk.prototype.gl;t("ol.control.Rotate",ud);t("ol.control.Rotate.render",vd);t("ol.control.ScaleLine",Gk);Gk.prototype.getUnits=Gk.prototype.C;t("ol.control.ScaleLine.render",Hk);Gk.prototype.setUnits=Gk.prototype.I;t("ol.control.Zoom",wd);t("ol.control.ZoomSlider",Lk);t("ol.control.ZoomSlider.render",Nk);t("ol.control.ZoomToExtent",Qk);
-Tc.prototype.changed=Tc.prototype.s;Tc.prototype.dispatchEvent=Tc.prototype.b;Tc.prototype.getRevision=Tc.prototype.L;Tc.prototype.on=Tc.prototype.J;Tc.prototype.once=Tc.prototype.once;Tc.prototype.un=Tc.prototype.K;Yc.prototype.get=Yc.prototype.get;Yc.prototype.getKeys=Yc.prototype.O;Yc.prototype.getProperties=Yc.prototype.N;Yc.prototype.set=Yc.prototype.set;Yc.prototype.setProperties=Yc.prototype.H;Yc.prototype.unset=Yc.prototype.P;Yc.prototype.changed=Yc.prototype.s;
-Yc.prototype.dispatchEvent=Yc.prototype.b;Yc.prototype.getRevision=Yc.prototype.L;Yc.prototype.on=Yc.prototype.J;Yc.prototype.once=Yc.prototype.once;Yc.prototype.un=Yc.prototype.K;bd.prototype.type=bd.prototype.type;bd.prototype.target=bd.prototype.target;bd.prototype.preventDefault=bd.prototype.preventDefault;bd.prototype.stopPropagation=bd.prototype.stopPropagation;Rk.prototype.get=Rk.prototype.get;Rk.prototype.getKeys=Rk.prototype.O;Rk.prototype.getProperties=Rk.prototype.N;Rk.prototype.set=Rk.prototype.set;
-Rk.prototype.setProperties=Rk.prototype.H;Rk.prototype.unset=Rk.prototype.P;Rk.prototype.changed=Rk.prototype.s;Rk.prototype.dispatchEvent=Rk.prototype.b;Rk.prototype.getRevision=Rk.prototype.L;Rk.prototype.on=Rk.prototype.J;Rk.prototype.once=Rk.prototype.once;Rk.prototype.un=Rk.prototype.K;H.prototype.get=H.prototype.get;H.prototype.getKeys=H.prototype.O;H.prototype.getProperties=H.prototype.N;H.prototype.set=H.prototype.set;H.prototype.setProperties=H.prototype.H;H.prototype.unset=H.prototype.P;
-H.prototype.changed=H.prototype.s;H.prototype.dispatchEvent=H.prototype.b;H.prototype.getRevision=H.prototype.L;H.prototype.on=H.prototype.J;H.prototype.once=H.prototype.once;H.prototype.un=H.prototype.K;xs.prototype.get=xs.prototype.get;xs.prototype.getKeys=xs.prototype.O;xs.prototype.getProperties=xs.prototype.N;xs.prototype.set=xs.prototype.set;xs.prototype.setProperties=xs.prototype.H;xs.prototype.unset=xs.prototype.P;xs.prototype.changed=xs.prototype.s;xs.prototype.dispatchEvent=xs.prototype.b;
-xs.prototype.getRevision=xs.prototype.L;xs.prototype.on=xs.prototype.J;xs.prototype.once=xs.prototype.once;xs.prototype.un=xs.prototype.K;Os.prototype.getTileCoord=Os.prototype.f;Os.prototype.load=Os.prototype.load;G.prototype.get=G.prototype.get;G.prototype.getKeys=G.prototype.O;G.prototype.getProperties=G.prototype.N;G.prototype.set=G.prototype.set;G.prototype.setProperties=G.prototype.H;G.prototype.unset=G.prototype.P;G.prototype.changed=G.prototype.s;G.prototype.dispatchEvent=G.prototype.b;
-G.prototype.getRevision=G.prototype.L;G.prototype.on=G.prototype.J;G.prototype.once=G.prototype.once;G.prototype.un=G.prototype.K;Id.prototype.type=Id.prototype.type;Id.prototype.target=Id.prototype.target;Id.prototype.preventDefault=Id.prototype.preventDefault;Id.prototype.stopPropagation=Id.prototype.stopPropagation;Jd.prototype.map=Jd.prototype.map;Jd.prototype.frameState=Jd.prototype.frameState;Jd.prototype.type=Jd.prototype.type;Jd.prototype.target=Jd.prototype.target;
-Jd.prototype.preventDefault=Jd.prototype.preventDefault;Jd.prototype.stopPropagation=Jd.prototype.stopPropagation;ee.prototype.originalEvent=ee.prototype.originalEvent;ee.prototype.pixel=ee.prototype.pixel;ee.prototype.coordinate=ee.prototype.coordinate;ee.prototype.dragging=ee.prototype.dragging;ee.prototype.preventDefault=ee.prototype.preventDefault;ee.prototype.stopPropagation=ee.prototype.stopPropagation;ee.prototype.map=ee.prototype.map;ee.prototype.frameState=ee.prototype.frameState;
-ee.prototype.type=ee.prototype.type;ee.prototype.target=ee.prototype.target;Xc.prototype.type=Xc.prototype.type;Xc.prototype.target=Xc.prototype.target;Xc.prototype.preventDefault=Xc.prototype.preventDefault;Xc.prototype.stopPropagation=Xc.prototype.stopPropagation;sk.prototype.get=sk.prototype.get;sk.prototype.getKeys=sk.prototype.O;sk.prototype.getProperties=sk.prototype.N;sk.prototype.set=sk.prototype.set;sk.prototype.setProperties=sk.prototype.H;sk.prototype.unset=sk.prototype.P;
-sk.prototype.changed=sk.prototype.s;sk.prototype.dispatchEvent=sk.prototype.b;sk.prototype.getRevision=sk.prototype.L;sk.prototype.on=sk.prototype.J;sk.prototype.once=sk.prototype.once;sk.prototype.un=sk.prototype.K;nx.prototype.getTileCoord=nx.prototype.f;nx.prototype.load=nx.prototype.load;px.prototype.getTileCoord=px.prototype.f;px.prototype.load=px.prototype.load;F.prototype.get=F.prototype.get;F.prototype.getKeys=F.prototype.O;F.prototype.getProperties=F.prototype.N;F.prototype.set=F.prototype.set;
-F.prototype.setProperties=F.prototype.H;F.prototype.unset=F.prototype.P;F.prototype.changed=F.prototype.s;F.prototype.dispatchEvent=F.prototype.b;F.prototype.getRevision=F.prototype.L;F.prototype.on=F.prototype.J;F.prototype.once=F.prototype.once;F.prototype.un=F.prototype.K;rx.prototype.forEachTileCoord=rx.prototype.Rf;rx.prototype.getMaxZoom=rx.prototype.Ti;rx.prototype.getMinZoom=rx.prototype.Ui;rx.prototype.getOrigin=rx.prototype.Pc;rx.prototype.getResolution=rx.prototype.Da;
-rx.prototype.getResolutions=rx.prototype.Vi;rx.prototype.getTileCoordExtent=rx.prototype.Aa;rx.prototype.getTileCoordForCoordAndResolution=rx.prototype.Be;rx.prototype.getTileCoordForCoordAndZ=rx.prototype.bg;rx.prototype.getTileSize=rx.prototype.gb;rx.prototype.getZForResolution=rx.prototype.tc;Yk.prototype.getOpacity=Yk.prototype.Ze;Yk.prototype.getRotateWithView=Yk.prototype.$e;Yk.prototype.getRotation=Yk.prototype.af;Yk.prototype.getScale=Yk.prototype.bf;Yk.prototype.getSnapToPixel=Yk.prototype.Ae;
-Yk.prototype.setOpacity=Yk.prototype.td;Yk.prototype.setRotation=Yk.prototype.cf;Yk.prototype.setScale=Yk.prototype.ud;$k.prototype.clone=$k.prototype.clone;$k.prototype.getAngle=$k.prototype.Pi;$k.prototype.getFill=$k.prototype.Fa;$k.prototype.getPoints=$k.prototype.Qi;$k.prototype.getRadius=$k.prototype.Ri;$k.prototype.getRadius2=$k.prototype.Fh;$k.prototype.getStroke=$k.prototype.Ga;$k.prototype.getOpacity=$k.prototype.Ze;$k.prototype.getRotateWithView=$k.prototype.$e;
-$k.prototype.getRotation=$k.prototype.af;$k.prototype.getScale=$k.prototype.bf;$k.prototype.getSnapToPixel=$k.prototype.Ae;$k.prototype.setOpacity=$k.prototype.td;$k.prototype.setRotation=$k.prototype.cf;$k.prototype.setScale=$k.prototype.ud;eo.prototype.getOpacity=eo.prototype.Ze;eo.prototype.getRotateWithView=eo.prototype.$e;eo.prototype.getRotation=eo.prototype.af;eo.prototype.getScale=eo.prototype.bf;eo.prototype.getSnapToPixel=eo.prototype.Ae;eo.prototype.setOpacity=eo.prototype.td;
-eo.prototype.setRotation=eo.prototype.cf;eo.prototype.setScale=eo.prototype.ud;$t.prototype.get=$t.prototype.get;$t.prototype.getKeys=$t.prototype.O;$t.prototype.getProperties=$t.prototype.N;$t.prototype.set=$t.prototype.set;$t.prototype.setProperties=$t.prototype.H;$t.prototype.unset=$t.prototype.P;$t.prototype.changed=$t.prototype.s;$t.prototype.dispatchEvent=$t.prototype.b;$t.prototype.getRevision=$t.prototype.L;$t.prototype.on=$t.prototype.J;$t.prototype.once=$t.prototype.once;
-$t.prototype.un=$t.prototype.K;pw.prototype.getAttributions=pw.prototype.ya;pw.prototype.getLogo=pw.prototype.xa;pw.prototype.getProjection=pw.prototype.za;pw.prototype.getState=pw.prototype.getState;pw.prototype.refresh=pw.prototype.sa;pw.prototype.setAttributions=pw.prototype.ua;pw.prototype.get=pw.prototype.get;pw.prototype.getKeys=pw.prototype.O;pw.prototype.getProperties=pw.prototype.N;pw.prototype.set=pw.prototype.set;pw.prototype.setProperties=pw.prototype.H;pw.prototype.unset=pw.prototype.P;
-pw.prototype.changed=pw.prototype.s;pw.prototype.dispatchEvent=pw.prototype.b;pw.prototype.getRevision=pw.prototype.L;pw.prototype.on=pw.prototype.J;pw.prototype.once=pw.prototype.once;pw.prototype.un=pw.prototype.K;tw.prototype.getTileGrid=tw.prototype.ab;tw.prototype.refresh=tw.prototype.sa;tw.prototype.getAttributions=tw.prototype.ya;tw.prototype.getLogo=tw.prototype.xa;tw.prototype.getProjection=tw.prototype.za;tw.prototype.getState=tw.prototype.getState;tw.prototype.setAttributions=tw.prototype.ua;
-tw.prototype.get=tw.prototype.get;tw.prototype.getKeys=tw.prototype.O;tw.prototype.getProperties=tw.prototype.N;tw.prototype.set=tw.prototype.set;tw.prototype.setProperties=tw.prototype.H;tw.prototype.unset=tw.prototype.P;tw.prototype.changed=tw.prototype.s;tw.prototype.dispatchEvent=tw.prototype.b;tw.prototype.getRevision=tw.prototype.L;tw.prototype.on=tw.prototype.J;tw.prototype.once=tw.prototype.once;tw.prototype.un=tw.prototype.K;X.prototype.getTileLoadFunction=X.prototype.pb;
-X.prototype.getTileUrlFunction=X.prototype.qb;X.prototype.getUrls=X.prototype.rb;X.prototype.setTileLoadFunction=X.prototype.vb;X.prototype.setTileUrlFunction=X.prototype.cb;X.prototype.setUrl=X.prototype.jb;X.prototype.setUrls=X.prototype.eb;X.prototype.getTileGrid=X.prototype.ab;X.prototype.refresh=X.prototype.sa;X.prototype.getAttributions=X.prototype.ya;X.prototype.getLogo=X.prototype.xa;X.prototype.getProjection=X.prototype.za;X.prototype.getState=X.prototype.getState;
-X.prototype.setAttributions=X.prototype.ua;X.prototype.get=X.prototype.get;X.prototype.getKeys=X.prototype.O;X.prototype.getProperties=X.prototype.N;X.prototype.set=X.prototype.set;X.prototype.setProperties=X.prototype.H;X.prototype.unset=X.prototype.P;X.prototype.changed=X.prototype.s;X.prototype.dispatchEvent=X.prototype.b;X.prototype.getRevision=X.prototype.L;X.prototype.on=X.prototype.J;X.prototype.once=X.prototype.once;X.prototype.un=X.prototype.K;xw.prototype.setRenderReprojectionEdges=xw.prototype.Pb;
-xw.prototype.setTileGridForProjection=xw.prototype.Qb;xw.prototype.getTileLoadFunction=xw.prototype.pb;xw.prototype.getTileUrlFunction=xw.prototype.qb;xw.prototype.getUrls=xw.prototype.rb;xw.prototype.setTileLoadFunction=xw.prototype.vb;xw.prototype.setTileUrlFunction=xw.prototype.cb;xw.prototype.setUrl=xw.prototype.jb;xw.prototype.setUrls=xw.prototype.eb;xw.prototype.getTileGrid=xw.prototype.ab;xw.prototype.refresh=xw.prototype.sa;xw.prototype.getAttributions=xw.prototype.ya;
-xw.prototype.getLogo=xw.prototype.xa;xw.prototype.getProjection=xw.prototype.za;xw.prototype.getState=xw.prototype.getState;xw.prototype.setAttributions=xw.prototype.ua;xw.prototype.get=xw.prototype.get;xw.prototype.getKeys=xw.prototype.O;xw.prototype.getProperties=xw.prototype.N;xw.prototype.set=xw.prototype.set;xw.prototype.setProperties=xw.prototype.H;xw.prototype.unset=xw.prototype.P;xw.prototype.changed=xw.prototype.s;xw.prototype.dispatchEvent=xw.prototype.b;xw.prototype.getRevision=xw.prototype.L;
-xw.prototype.on=xw.prototype.J;xw.prototype.once=xw.prototype.once;xw.prototype.un=xw.prototype.K;zw.prototype.setRenderReprojectionEdges=zw.prototype.Pb;zw.prototype.setTileGridForProjection=zw.prototype.Qb;zw.prototype.getTileLoadFunction=zw.prototype.pb;zw.prototype.getTileUrlFunction=zw.prototype.qb;zw.prototype.getUrls=zw.prototype.rb;zw.prototype.setTileLoadFunction=zw.prototype.vb;zw.prototype.setTileUrlFunction=zw.prototype.cb;zw.prototype.setUrl=zw.prototype.jb;zw.prototype.setUrls=zw.prototype.eb;
-zw.prototype.getTileGrid=zw.prototype.ab;zw.prototype.refresh=zw.prototype.sa;zw.prototype.getAttributions=zw.prototype.ya;zw.prototype.getLogo=zw.prototype.xa;zw.prototype.getProjection=zw.prototype.za;zw.prototype.getState=zw.prototype.getState;zw.prototype.setAttributions=zw.prototype.ua;zw.prototype.get=zw.prototype.get;zw.prototype.getKeys=zw.prototype.O;zw.prototype.getProperties=zw.prototype.N;zw.prototype.set=zw.prototype.set;zw.prototype.setProperties=zw.prototype.H;zw.prototype.unset=zw.prototype.P;
-zw.prototype.changed=zw.prototype.s;zw.prototype.dispatchEvent=zw.prototype.b;zw.prototype.getRevision=zw.prototype.L;zw.prototype.on=zw.prototype.J;zw.prototype.once=zw.prototype.once;zw.prototype.un=zw.prototype.K;Aw.prototype.setRenderReprojectionEdges=Aw.prototype.Pb;Aw.prototype.setTileGridForProjection=Aw.prototype.Qb;Aw.prototype.getTileLoadFunction=Aw.prototype.pb;Aw.prototype.getTileUrlFunction=Aw.prototype.qb;Aw.prototype.getUrls=Aw.prototype.rb;Aw.prototype.setTileLoadFunction=Aw.prototype.vb;
-Aw.prototype.setTileUrlFunction=Aw.prototype.cb;Aw.prototype.setUrl=Aw.prototype.jb;Aw.prototype.setUrls=Aw.prototype.eb;Aw.prototype.getTileGrid=Aw.prototype.ab;Aw.prototype.refresh=Aw.prototype.sa;Aw.prototype.getAttributions=Aw.prototype.ya;Aw.prototype.getLogo=Aw.prototype.xa;Aw.prototype.getProjection=Aw.prototype.za;Aw.prototype.getState=Aw.prototype.getState;Aw.prototype.setAttributions=Aw.prototype.ua;Aw.prototype.get=Aw.prototype.get;Aw.prototype.getKeys=Aw.prototype.O;
-Aw.prototype.getProperties=Aw.prototype.N;Aw.prototype.set=Aw.prototype.set;Aw.prototype.setProperties=Aw.prototype.H;Aw.prototype.unset=Aw.prototype.P;Aw.prototype.changed=Aw.prototype.s;Aw.prototype.dispatchEvent=Aw.prototype.b;Aw.prototype.getRevision=Aw.prototype.L;Aw.prototype.on=Aw.prototype.J;Aw.prototype.once=Aw.prototype.once;Aw.prototype.un=Aw.prototype.K;U.prototype.getAttributions=U.prototype.ya;U.prototype.getLogo=U.prototype.xa;U.prototype.getProjection=U.prototype.za;
-U.prototype.getState=U.prototype.getState;U.prototype.refresh=U.prototype.sa;U.prototype.setAttributions=U.prototype.ua;U.prototype.get=U.prototype.get;U.prototype.getKeys=U.prototype.O;U.prototype.getProperties=U.prototype.N;U.prototype.set=U.prototype.set;U.prototype.setProperties=U.prototype.H;U.prototype.unset=U.prototype.P;U.prototype.changed=U.prototype.s;U.prototype.dispatchEvent=U.prototype.b;U.prototype.getRevision=U.prototype.L;U.prototype.on=U.prototype.J;U.prototype.once=U.prototype.once;
-U.prototype.un=U.prototype.K;Y.prototype.addFeature=Y.prototype.yb;Y.prototype.addFeatures=Y.prototype.cd;Y.prototype.clear=Y.prototype.clear;Y.prototype.forEachFeature=Y.prototype.sh;Y.prototype.forEachFeatureInExtent=Y.prototype.$b;Y.prototype.forEachFeatureIntersectingExtent=Y.prototype.th;Y.prototype.getFeaturesCollection=Y.prototype.Ah;Y.prototype.getFeatures=Y.prototype.Xe;Y.prototype.getFeaturesAtCoordinate=Y.prototype.zh;Y.prototype.getFeaturesInExtent=Y.prototype.Uf;
-Y.prototype.getClosestFeatureToCoordinate=Y.prototype.vh;Y.prototype.getExtent=Y.prototype.G;Y.prototype.getFeatureById=Y.prototype.yh;Y.prototype.getFormat=Y.prototype.Mi;Y.prototype.getUrl=Y.prototype.Ni;Y.prototype.removeFeature=Y.prototype.Gb;Y.prototype.getAttributions=Y.prototype.ya;Y.prototype.getLogo=Y.prototype.xa;Y.prototype.getProjection=Y.prototype.za;Y.prototype.getState=Y.prototype.getState;Y.prototype.refresh=Y.prototype.sa;Y.prototype.setAttributions=Y.prototype.ua;
-Y.prototype.get=Y.prototype.get;Y.prototype.getKeys=Y.prototype.O;Y.prototype.getProperties=Y.prototype.N;Y.prototype.set=Y.prototype.set;Y.prototype.setProperties=Y.prototype.H;Y.prototype.unset=Y.prototype.P;Y.prototype.changed=Y.prototype.s;Y.prototype.dispatchEvent=Y.prototype.b;Y.prototype.getRevision=Y.prototype.L;Y.prototype.on=Y.prototype.J;Y.prototype.once=Y.prototype.once;Y.prototype.un=Y.prototype.K;Hv.prototype.getAttributions=Hv.prototype.ya;Hv.prototype.getLogo=Hv.prototype.xa;
-Hv.prototype.getProjection=Hv.prototype.za;Hv.prototype.getState=Hv.prototype.getState;Hv.prototype.refresh=Hv.prototype.sa;Hv.prototype.setAttributions=Hv.prototype.ua;Hv.prototype.get=Hv.prototype.get;Hv.prototype.getKeys=Hv.prototype.O;Hv.prototype.getProperties=Hv.prototype.N;Hv.prototype.set=Hv.prototype.set;Hv.prototype.setProperties=Hv.prototype.H;Hv.prototype.unset=Hv.prototype.P;Hv.prototype.changed=Hv.prototype.s;Hv.prototype.dispatchEvent=Hv.prototype.b;Hv.prototype.getRevision=Hv.prototype.L;
-Hv.prototype.on=Hv.prototype.J;Hv.prototype.once=Hv.prototype.once;Hv.prototype.un=Hv.prototype.K;Jv.prototype.type=Jv.prototype.type;Jv.prototype.target=Jv.prototype.target;Jv.prototype.preventDefault=Jv.prototype.preventDefault;Jv.prototype.stopPropagation=Jv.prototype.stopPropagation;Gw.prototype.getAttributions=Gw.prototype.ya;Gw.prototype.getLogo=Gw.prototype.xa;Gw.prototype.getProjection=Gw.prototype.za;Gw.prototype.getState=Gw.prototype.getState;Gw.prototype.refresh=Gw.prototype.sa;
-Gw.prototype.setAttributions=Gw.prototype.ua;Gw.prototype.get=Gw.prototype.get;Gw.prototype.getKeys=Gw.prototype.O;Gw.prototype.getProperties=Gw.prototype.N;Gw.prototype.set=Gw.prototype.set;Gw.prototype.setProperties=Gw.prototype.H;Gw.prototype.unset=Gw.prototype.P;Gw.prototype.changed=Gw.prototype.s;Gw.prototype.dispatchEvent=Gw.prototype.b;Gw.prototype.getRevision=Gw.prototype.L;Gw.prototype.on=Gw.prototype.J;Gw.prototype.once=Gw.prototype.once;Gw.prototype.un=Gw.prototype.K;
-Ov.prototype.getAttributions=Ov.prototype.ya;Ov.prototype.getLogo=Ov.prototype.xa;Ov.prototype.getProjection=Ov.prototype.za;Ov.prototype.getState=Ov.prototype.getState;Ov.prototype.refresh=Ov.prototype.sa;Ov.prototype.setAttributions=Ov.prototype.ua;Ov.prototype.get=Ov.prototype.get;Ov.prototype.getKeys=Ov.prototype.O;Ov.prototype.getProperties=Ov.prototype.N;Ov.prototype.set=Ov.prototype.set;Ov.prototype.setProperties=Ov.prototype.H;Ov.prototype.unset=Ov.prototype.P;Ov.prototype.changed=Ov.prototype.s;
-Ov.prototype.dispatchEvent=Ov.prototype.b;Ov.prototype.getRevision=Ov.prototype.L;Ov.prototype.on=Ov.prototype.J;Ov.prototype.once=Ov.prototype.once;Ov.prototype.un=Ov.prototype.K;Hw.prototype.getAttributions=Hw.prototype.ya;Hw.prototype.getLogo=Hw.prototype.xa;Hw.prototype.getProjection=Hw.prototype.za;Hw.prototype.getState=Hw.prototype.getState;Hw.prototype.refresh=Hw.prototype.sa;Hw.prototype.setAttributions=Hw.prototype.ua;Hw.prototype.get=Hw.prototype.get;Hw.prototype.getKeys=Hw.prototype.O;
-Hw.prototype.getProperties=Hw.prototype.N;Hw.prototype.set=Hw.prototype.set;Hw.prototype.setProperties=Hw.prototype.H;Hw.prototype.unset=Hw.prototype.P;Hw.prototype.changed=Hw.prototype.s;Hw.prototype.dispatchEvent=Hw.prototype.b;Hw.prototype.getRevision=Hw.prototype.L;Hw.prototype.on=Hw.prototype.J;Hw.prototype.once=Hw.prototype.once;Hw.prototype.un=Hw.prototype.K;Iw.prototype.getAttributions=Iw.prototype.ya;Iw.prototype.getLogo=Iw.prototype.xa;Iw.prototype.getProjection=Iw.prototype.za;
-Iw.prototype.getState=Iw.prototype.getState;Iw.prototype.refresh=Iw.prototype.sa;Iw.prototype.setAttributions=Iw.prototype.ua;Iw.prototype.get=Iw.prototype.get;Iw.prototype.getKeys=Iw.prototype.O;Iw.prototype.getProperties=Iw.prototype.N;Iw.prototype.set=Iw.prototype.set;Iw.prototype.setProperties=Iw.prototype.H;Iw.prototype.unset=Iw.prototype.P;Iw.prototype.changed=Iw.prototype.s;Iw.prototype.dispatchEvent=Iw.prototype.b;Iw.prototype.getRevision=Iw.prototype.L;Iw.prototype.on=Iw.prototype.J;
-Iw.prototype.once=Iw.prototype.once;Iw.prototype.un=Iw.prototype.K;Pv.prototype.getAttributions=Pv.prototype.ya;Pv.prototype.getLogo=Pv.prototype.xa;Pv.prototype.getProjection=Pv.prototype.za;Pv.prototype.getState=Pv.prototype.getState;Pv.prototype.refresh=Pv.prototype.sa;Pv.prototype.setAttributions=Pv.prototype.ua;Pv.prototype.get=Pv.prototype.get;Pv.prototype.getKeys=Pv.prototype.O;Pv.prototype.getProperties=Pv.prototype.N;Pv.prototype.set=Pv.prototype.set;Pv.prototype.setProperties=Pv.prototype.H;
-Pv.prototype.unset=Pv.prototype.P;Pv.prototype.changed=Pv.prototype.s;Pv.prototype.dispatchEvent=Pv.prototype.b;Pv.prototype.getRevision=Pv.prototype.L;Pv.prototype.on=Pv.prototype.J;Pv.prototype.once=Pv.prototype.once;Pv.prototype.un=Pv.prototype.K;Jw.prototype.getAttributions=Jw.prototype.ya;Jw.prototype.getLogo=Jw.prototype.xa;Jw.prototype.getProjection=Jw.prototype.za;Jw.prototype.getState=Jw.prototype.getState;Jw.prototype.refresh=Jw.prototype.sa;Jw.prototype.setAttributions=Jw.prototype.ua;
-Jw.prototype.get=Jw.prototype.get;Jw.prototype.getKeys=Jw.prototype.O;Jw.prototype.getProperties=Jw.prototype.N;Jw.prototype.set=Jw.prototype.set;Jw.prototype.setProperties=Jw.prototype.H;Jw.prototype.unset=Jw.prototype.P;Jw.prototype.changed=Jw.prototype.s;Jw.prototype.dispatchEvent=Jw.prototype.b;Jw.prototype.getRevision=Jw.prototype.L;Jw.prototype.on=Jw.prototype.J;Jw.prototype.once=Jw.prototype.once;Jw.prototype.un=Jw.prototype.K;Nw.prototype.setRenderReprojectionEdges=Nw.prototype.Pb;
-Nw.prototype.setTileGridForProjection=Nw.prototype.Qb;Nw.prototype.getTileLoadFunction=Nw.prototype.pb;Nw.prototype.getTileUrlFunction=Nw.prototype.qb;Nw.prototype.getUrls=Nw.prototype.rb;Nw.prototype.setTileLoadFunction=Nw.prototype.vb;Nw.prototype.setTileUrlFunction=Nw.prototype.cb;Nw.prototype.setUrl=Nw.prototype.jb;Nw.prototype.setUrls=Nw.prototype.eb;Nw.prototype.getTileGrid=Nw.prototype.ab;Nw.prototype.refresh=Nw.prototype.sa;Nw.prototype.getAttributions=Nw.prototype.ya;
-Nw.prototype.getLogo=Nw.prototype.xa;Nw.prototype.getProjection=Nw.prototype.za;Nw.prototype.getState=Nw.prototype.getState;Nw.prototype.setAttributions=Nw.prototype.ua;Nw.prototype.get=Nw.prototype.get;Nw.prototype.getKeys=Nw.prototype.O;Nw.prototype.getProperties=Nw.prototype.N;Nw.prototype.set=Nw.prototype.set;Nw.prototype.setProperties=Nw.prototype.H;Nw.prototype.unset=Nw.prototype.P;Nw.prototype.changed=Nw.prototype.s;Nw.prototype.dispatchEvent=Nw.prototype.b;Nw.prototype.getRevision=Nw.prototype.L;
-Nw.prototype.on=Nw.prototype.J;Nw.prototype.once=Nw.prototype.once;Nw.prototype.un=Nw.prototype.K;Pw.prototype.getAttributions=Pw.prototype.ya;Pw.prototype.getLogo=Pw.prototype.xa;Pw.prototype.getProjection=Pw.prototype.za;Pw.prototype.getState=Pw.prototype.getState;Pw.prototype.refresh=Pw.prototype.sa;Pw.prototype.setAttributions=Pw.prototype.ua;Pw.prototype.get=Pw.prototype.get;Pw.prototype.getKeys=Pw.prototype.O;Pw.prototype.getProperties=Pw.prototype.N;Pw.prototype.set=Pw.prototype.set;
-Pw.prototype.setProperties=Pw.prototype.H;Pw.prototype.unset=Pw.prototype.P;Pw.prototype.changed=Pw.prototype.s;Pw.prototype.dispatchEvent=Pw.prototype.b;Pw.prototype.getRevision=Pw.prototype.L;Pw.prototype.on=Pw.prototype.J;Pw.prototype.once=Pw.prototype.once;Pw.prototype.un=Pw.prototype.K;Tw.prototype.type=Tw.prototype.type;Tw.prototype.target=Tw.prototype.target;Tw.prototype.preventDefault=Tw.prototype.preventDefault;Tw.prototype.stopPropagation=Tw.prototype.stopPropagation;
-Ww.prototype.setRenderReprojectionEdges=Ww.prototype.Pb;Ww.prototype.setTileGridForProjection=Ww.prototype.Qb;Ww.prototype.getTileLoadFunction=Ww.prototype.pb;Ww.prototype.getTileUrlFunction=Ww.prototype.qb;Ww.prototype.getUrls=Ww.prototype.rb;Ww.prototype.setTileLoadFunction=Ww.prototype.vb;Ww.prototype.setTileUrlFunction=Ww.prototype.cb;Ww.prototype.setUrl=Ww.prototype.jb;Ww.prototype.setUrls=Ww.prototype.eb;Ww.prototype.getTileGrid=Ww.prototype.ab;Ww.prototype.refresh=Ww.prototype.sa;
-Ww.prototype.getAttributions=Ww.prototype.ya;Ww.prototype.getLogo=Ww.prototype.xa;Ww.prototype.getProjection=Ww.prototype.za;Ww.prototype.getState=Ww.prototype.getState;Ww.prototype.setAttributions=Ww.prototype.ua;Ww.prototype.get=Ww.prototype.get;Ww.prototype.getKeys=Ww.prototype.O;Ww.prototype.getProperties=Ww.prototype.N;Ww.prototype.set=Ww.prototype.set;Ww.prototype.setProperties=Ww.prototype.H;Ww.prototype.unset=Ww.prototype.P;Ww.prototype.changed=Ww.prototype.s;Ww.prototype.dispatchEvent=Ww.prototype.b;
-Ww.prototype.getRevision=Ww.prototype.L;Ww.prototype.on=Ww.prototype.J;Ww.prototype.once=Ww.prototype.once;Ww.prototype.un=Ww.prototype.K;sw.prototype.type=sw.prototype.type;sw.prototype.target=sw.prototype.target;sw.prototype.preventDefault=sw.prototype.preventDefault;sw.prototype.stopPropagation=sw.prototype.stopPropagation;$w.prototype.setRenderReprojectionEdges=$w.prototype.Pb;$w.prototype.setTileGridForProjection=$w.prototype.Qb;$w.prototype.getTileLoadFunction=$w.prototype.pb;
-$w.prototype.getTileUrlFunction=$w.prototype.qb;$w.prototype.getUrls=$w.prototype.rb;$w.prototype.setTileLoadFunction=$w.prototype.vb;$w.prototype.setTileUrlFunction=$w.prototype.cb;$w.prototype.setUrl=$w.prototype.jb;$w.prototype.setUrls=$w.prototype.eb;$w.prototype.getTileGrid=$w.prototype.ab;$w.prototype.refresh=$w.prototype.sa;$w.prototype.getAttributions=$w.prototype.ya;$w.prototype.getLogo=$w.prototype.xa;$w.prototype.getProjection=$w.prototype.za;$w.prototype.getState=$w.prototype.getState;
-$w.prototype.setAttributions=$w.prototype.ua;$w.prototype.get=$w.prototype.get;$w.prototype.getKeys=$w.prototype.O;$w.prototype.getProperties=$w.prototype.N;$w.prototype.set=$w.prototype.set;$w.prototype.setProperties=$w.prototype.H;$w.prototype.unset=$w.prototype.P;$w.prototype.changed=$w.prototype.s;$w.prototype.dispatchEvent=$w.prototype.b;$w.prototype.getRevision=$w.prototype.L;$w.prototype.on=$w.prototype.J;$w.prototype.once=$w.prototype.once;$w.prototype.un=$w.prototype.K;
-bx.prototype.getTileGrid=bx.prototype.ab;bx.prototype.refresh=bx.prototype.sa;bx.prototype.getAttributions=bx.prototype.ya;bx.prototype.getLogo=bx.prototype.xa;bx.prototype.getProjection=bx.prototype.za;bx.prototype.getState=bx.prototype.getState;bx.prototype.setAttributions=bx.prototype.ua;bx.prototype.get=bx.prototype.get;bx.prototype.getKeys=bx.prototype.O;bx.prototype.getProperties=bx.prototype.N;bx.prototype.set=bx.prototype.set;bx.prototype.setProperties=bx.prototype.H;bx.prototype.unset=bx.prototype.P;
-bx.prototype.changed=bx.prototype.s;bx.prototype.dispatchEvent=bx.prototype.b;bx.prototype.getRevision=bx.prototype.L;bx.prototype.on=bx.prototype.J;bx.prototype.once=bx.prototype.once;bx.prototype.un=bx.prototype.K;dx.prototype.setRenderReprojectionEdges=dx.prototype.Pb;dx.prototype.setTileGridForProjection=dx.prototype.Qb;dx.prototype.getTileLoadFunction=dx.prototype.pb;dx.prototype.getTileUrlFunction=dx.prototype.qb;dx.prototype.getUrls=dx.prototype.rb;dx.prototype.setTileLoadFunction=dx.prototype.vb;
-dx.prototype.setTileUrlFunction=dx.prototype.cb;dx.prototype.setUrl=dx.prototype.jb;dx.prototype.setUrls=dx.prototype.eb;dx.prototype.getTileGrid=dx.prototype.ab;dx.prototype.refresh=dx.prototype.sa;dx.prototype.getAttributions=dx.prototype.ya;dx.prototype.getLogo=dx.prototype.xa;dx.prototype.getProjection=dx.prototype.za;dx.prototype.getState=dx.prototype.getState;dx.prototype.setAttributions=dx.prototype.ua;dx.prototype.get=dx.prototype.get;dx.prototype.getKeys=dx.prototype.O;
-dx.prototype.getProperties=dx.prototype.N;dx.prototype.set=dx.prototype.set;dx.prototype.setProperties=dx.prototype.H;dx.prototype.unset=dx.prototype.P;dx.prototype.changed=dx.prototype.s;dx.prototype.dispatchEvent=dx.prototype.b;dx.prototype.getRevision=dx.prototype.L;dx.prototype.on=dx.prototype.J;dx.prototype.once=dx.prototype.once;dx.prototype.un=dx.prototype.K;ex.prototype.getTileGrid=ex.prototype.ab;ex.prototype.refresh=ex.prototype.sa;ex.prototype.getAttributions=ex.prototype.ya;
-ex.prototype.getLogo=ex.prototype.xa;ex.prototype.getProjection=ex.prototype.za;ex.prototype.getState=ex.prototype.getState;ex.prototype.setAttributions=ex.prototype.ua;ex.prototype.get=ex.prototype.get;ex.prototype.getKeys=ex.prototype.O;ex.prototype.getProperties=ex.prototype.N;ex.prototype.set=ex.prototype.set;ex.prototype.setProperties=ex.prototype.H;ex.prototype.unset=ex.prototype.P;ex.prototype.changed=ex.prototype.s;ex.prototype.dispatchEvent=ex.prototype.b;ex.prototype.getRevision=ex.prototype.L;
-ex.prototype.on=ex.prototype.J;ex.prototype.once=ex.prototype.once;ex.prototype.un=ex.prototype.K;ix.prototype.setRenderReprojectionEdges=ix.prototype.Pb;ix.prototype.setTileGridForProjection=ix.prototype.Qb;ix.prototype.getTileLoadFunction=ix.prototype.pb;ix.prototype.getTileUrlFunction=ix.prototype.qb;ix.prototype.getUrls=ix.prototype.rb;ix.prototype.setTileLoadFunction=ix.prototype.vb;ix.prototype.setTileUrlFunction=ix.prototype.cb;ix.prototype.setUrl=ix.prototype.jb;ix.prototype.setUrls=ix.prototype.eb;
-ix.prototype.getTileGrid=ix.prototype.ab;ix.prototype.refresh=ix.prototype.sa;ix.prototype.getAttributions=ix.prototype.ya;ix.prototype.getLogo=ix.prototype.xa;ix.prototype.getProjection=ix.prototype.za;ix.prototype.getState=ix.prototype.getState;ix.prototype.setAttributions=ix.prototype.ua;ix.prototype.get=ix.prototype.get;ix.prototype.getKeys=ix.prototype.O;ix.prototype.getProperties=ix.prototype.N;ix.prototype.set=ix.prototype.set;ix.prototype.setProperties=ix.prototype.H;ix.prototype.unset=ix.prototype.P;
-ix.prototype.changed=ix.prototype.s;ix.prototype.dispatchEvent=ix.prototype.b;ix.prototype.getRevision=ix.prototype.L;ix.prototype.on=ix.prototype.J;ix.prototype.once=ix.prototype.once;ix.prototype.un=ix.prototype.K;gu.prototype.type=gu.prototype.type;gu.prototype.target=gu.prototype.target;gu.prototype.preventDefault=gu.prototype.preventDefault;gu.prototype.stopPropagation=gu.prototype.stopPropagation;qx.prototype.getTileLoadFunction=qx.prototype.pb;qx.prototype.getTileUrlFunction=qx.prototype.qb;
-qx.prototype.getUrls=qx.prototype.rb;qx.prototype.setTileLoadFunction=qx.prototype.vb;qx.prototype.setTileUrlFunction=qx.prototype.cb;qx.prototype.setUrl=qx.prototype.jb;qx.prototype.setUrls=qx.prototype.eb;qx.prototype.getTileGrid=qx.prototype.ab;qx.prototype.refresh=qx.prototype.sa;qx.prototype.getAttributions=qx.prototype.ya;qx.prototype.getLogo=qx.prototype.xa;qx.prototype.getProjection=qx.prototype.za;qx.prototype.getState=qx.prototype.getState;qx.prototype.setAttributions=qx.prototype.ua;
-qx.prototype.get=qx.prototype.get;qx.prototype.getKeys=qx.prototype.O;qx.prototype.getProperties=qx.prototype.N;qx.prototype.set=qx.prototype.set;qx.prototype.setProperties=qx.prototype.H;qx.prototype.unset=qx.prototype.P;qx.prototype.changed=qx.prototype.s;qx.prototype.dispatchEvent=qx.prototype.b;qx.prototype.getRevision=qx.prototype.L;qx.prototype.on=qx.prototype.J;qx.prototype.once=qx.prototype.once;qx.prototype.un=qx.prototype.K;Z.prototype.setRenderReprojectionEdges=Z.prototype.Pb;
-Z.prototype.setTileGridForProjection=Z.prototype.Qb;Z.prototype.getTileLoadFunction=Z.prototype.pb;Z.prototype.getTileUrlFunction=Z.prototype.qb;Z.prototype.getUrls=Z.prototype.rb;Z.prototype.setTileLoadFunction=Z.prototype.vb;Z.prototype.setTileUrlFunction=Z.prototype.cb;Z.prototype.setUrl=Z.prototype.jb;Z.prototype.setUrls=Z.prototype.eb;Z.prototype.getTileGrid=Z.prototype.ab;Z.prototype.refresh=Z.prototype.sa;Z.prototype.getAttributions=Z.prototype.ya;Z.prototype.getLogo=Z.prototype.xa;
-Z.prototype.getProjection=Z.prototype.za;Z.prototype.getState=Z.prototype.getState;Z.prototype.setAttributions=Z.prototype.ua;Z.prototype.get=Z.prototype.get;Z.prototype.getKeys=Z.prototype.O;Z.prototype.getProperties=Z.prototype.N;Z.prototype.set=Z.prototype.set;Z.prototype.setProperties=Z.prototype.H;Z.prototype.unset=Z.prototype.P;Z.prototype.changed=Z.prototype.s;Z.prototype.dispatchEvent=Z.prototype.b;Z.prototype.getRevision=Z.prototype.L;Z.prototype.on=Z.prototype.J;Z.prototype.once=Z.prototype.once;
-Z.prototype.un=Z.prototype.K;ux.prototype.setRenderReprojectionEdges=ux.prototype.Pb;ux.prototype.setTileGridForProjection=ux.prototype.Qb;ux.prototype.getTileLoadFunction=ux.prototype.pb;ux.prototype.getTileUrlFunction=ux.prototype.qb;ux.prototype.getUrls=ux.prototype.rb;ux.prototype.setTileLoadFunction=ux.prototype.vb;ux.prototype.setTileUrlFunction=ux.prototype.cb;ux.prototype.setUrl=ux.prototype.jb;ux.prototype.setUrls=ux.prototype.eb;ux.prototype.getTileGrid=ux.prototype.ab;
-ux.prototype.refresh=ux.prototype.sa;ux.prototype.getAttributions=ux.prototype.ya;ux.prototype.getLogo=ux.prototype.xa;ux.prototype.getProjection=ux.prototype.za;ux.prototype.getState=ux.prototype.getState;ux.prototype.setAttributions=ux.prototype.ua;ux.prototype.get=ux.prototype.get;ux.prototype.getKeys=ux.prototype.O;ux.prototype.getProperties=ux.prototype.N;ux.prototype.set=ux.prototype.set;ux.prototype.setProperties=ux.prototype.H;ux.prototype.unset=ux.prototype.P;ux.prototype.changed=ux.prototype.s;
-ux.prototype.dispatchEvent=ux.prototype.b;ux.prototype.getRevision=ux.prototype.L;ux.prototype.on=ux.prototype.J;ux.prototype.once=ux.prototype.once;ux.prototype.un=ux.prototype.K;hw.prototype.getTileCoord=hw.prototype.f;hw.prototype.load=hw.prototype.load;xt.prototype.changed=xt.prototype.s;xt.prototype.dispatchEvent=xt.prototype.b;xt.prototype.getRevision=xt.prototype.L;xt.prototype.on=xt.prototype.J;xt.prototype.once=xt.prototype.once;xt.prototype.un=xt.prototype.K;Vt.prototype.changed=Vt.prototype.s;
-Vt.prototype.dispatchEvent=Vt.prototype.b;Vt.prototype.getRevision=Vt.prototype.L;Vt.prototype.on=Vt.prototype.J;Vt.prototype.once=Vt.prototype.once;Vt.prototype.un=Vt.prototype.K;Rv.prototype.changed=Rv.prototype.s;Rv.prototype.dispatchEvent=Rv.prototype.b;Rv.prototype.getRevision=Rv.prototype.L;Rv.prototype.on=Rv.prototype.J;Rv.prototype.once=Rv.prototype.once;Rv.prototype.un=Rv.prototype.K;bw.prototype.changed=bw.prototype.s;bw.prototype.dispatchEvent=bw.prototype.b;bw.prototype.getRevision=bw.prototype.L;
-bw.prototype.on=bw.prototype.J;bw.prototype.once=bw.prototype.once;bw.prototype.un=bw.prototype.K;Yt.prototype.changed=Yt.prototype.s;Yt.prototype.dispatchEvent=Yt.prototype.b;Yt.prototype.getRevision=Yt.prototype.L;Yt.prototype.on=Yt.prototype.J;Yt.prototype.once=Yt.prototype.once;Yt.prototype.un=Yt.prototype.K;Gt.prototype.changed=Gt.prototype.s;Gt.prototype.dispatchEvent=Gt.prototype.b;Gt.prototype.getRevision=Gt.prototype.L;Gt.prototype.on=Gt.prototype.J;Gt.prototype.once=Gt.prototype.once;
-Gt.prototype.un=Gt.prototype.K;yv.prototype.changed=yv.prototype.s;yv.prototype.dispatchEvent=yv.prototype.b;yv.prototype.getRevision=yv.prototype.L;yv.prototype.on=yv.prototype.J;yv.prototype.once=yv.prototype.once;yv.prototype.un=yv.prototype.K;zv.prototype.changed=zv.prototype.s;zv.prototype.dispatchEvent=zv.prototype.b;zv.prototype.getRevision=zv.prototype.L;zv.prototype.on=zv.prototype.J;zv.prototype.once=zv.prototype.once;zv.prototype.un=zv.prototype.K;Vv.prototype.changed=Vv.prototype.s;
-Vv.prototype.dispatchEvent=Vv.prototype.b;Vv.prototype.getRevision=Vv.prototype.L;Vv.prototype.on=Vv.prototype.J;Vv.prototype.once=Vv.prototype.once;Vv.prototype.un=Vv.prototype.K;Ot.prototype.changed=Ot.prototype.s;Ot.prototype.dispatchEvent=Ot.prototype.b;Ot.prototype.getRevision=Ot.prototype.L;Ot.prototype.on=Ot.prototype.J;Ot.prototype.once=Ot.prototype.once;Ot.prototype.un=Ot.prototype.K;dw.prototype.changed=dw.prototype.s;dw.prototype.dispatchEvent=dw.prototype.b;dw.prototype.getRevision=dw.prototype.L;
-dw.prototype.on=dw.prototype.J;dw.prototype.once=dw.prototype.once;dw.prototype.un=dw.prototype.K;Rh.prototype.type=Rh.prototype.type;Rh.prototype.target=Rh.prototype.target;Rh.prototype.preventDefault=Rh.prototype.preventDefault;Rh.prototype.stopPropagation=Rh.prototype.stopPropagation;pe.prototype.type=pe.prototype.type;pe.prototype.target=pe.prototype.target;pe.prototype.preventDefault=pe.prototype.preventDefault;pe.prototype.stopPropagation=pe.prototype.stopPropagation;sh.prototype.get=sh.prototype.get;
-sh.prototype.getKeys=sh.prototype.O;sh.prototype.getProperties=sh.prototype.N;sh.prototype.set=sh.prototype.set;sh.prototype.setProperties=sh.prototype.H;sh.prototype.unset=sh.prototype.P;sh.prototype.changed=sh.prototype.s;sh.prototype.dispatchEvent=sh.prototype.b;sh.prototype.getRevision=sh.prototype.L;sh.prototype.on=sh.prototype.J;sh.prototype.once=sh.prototype.once;sh.prototype.un=sh.prototype.K;uh.prototype.getExtent=uh.prototype.G;uh.prototype.getMaxResolution=uh.prototype.fc;
-uh.prototype.getMinResolution=uh.prototype.gc;uh.prototype.getOpacity=uh.prototype.hc;uh.prototype.getVisible=uh.prototype.Mb;uh.prototype.getZIndex=uh.prototype.Ba;uh.prototype.setExtent=uh.prototype.vc;uh.prototype.setMaxResolution=uh.prototype.Ac;uh.prototype.setMinResolution=uh.prototype.Bc;uh.prototype.setOpacity=uh.prototype.wc;uh.prototype.setVisible=uh.prototype.xc;uh.prototype.setZIndex=uh.prototype.Vb;uh.prototype.get=uh.prototype.get;uh.prototype.getKeys=uh.prototype.O;
-uh.prototype.getProperties=uh.prototype.N;uh.prototype.set=uh.prototype.set;uh.prototype.setProperties=uh.prototype.H;uh.prototype.unset=uh.prototype.P;uh.prototype.changed=uh.prototype.s;uh.prototype.dispatchEvent=uh.prototype.b;uh.prototype.getRevision=uh.prototype.L;uh.prototype.on=uh.prototype.J;uh.prototype.once=uh.prototype.once;uh.prototype.un=uh.prototype.K;wh.prototype.getExtent=wh.prototype.G;wh.prototype.getMaxResolution=wh.prototype.fc;wh.prototype.getMinResolution=wh.prototype.gc;
-wh.prototype.getOpacity=wh.prototype.hc;wh.prototype.getVisible=wh.prototype.Mb;wh.prototype.getZIndex=wh.prototype.Ba;wh.prototype.setExtent=wh.prototype.vc;wh.prototype.setMaxResolution=wh.prototype.Ac;wh.prototype.setMinResolution=wh.prototype.Bc;wh.prototype.setOpacity=wh.prototype.wc;wh.prototype.setVisible=wh.prototype.xc;wh.prototype.setZIndex=wh.prototype.Vb;wh.prototype.get=wh.prototype.get;wh.prototype.getKeys=wh.prototype.O;wh.prototype.getProperties=wh.prototype.N;wh.prototype.set=wh.prototype.set;
-wh.prototype.setProperties=wh.prototype.H;wh.prototype.unset=wh.prototype.P;wh.prototype.changed=wh.prototype.s;wh.prototype.dispatchEvent=wh.prototype.b;wh.prototype.getRevision=wh.prototype.L;wh.prototype.on=wh.prototype.J;wh.prototype.once=wh.prototype.once;wh.prototype.un=wh.prototype.K;T.prototype.setMap=T.prototype.setMap;T.prototype.setSource=T.prototype.Wc;T.prototype.getExtent=T.prototype.G;T.prototype.getMaxResolution=T.prototype.fc;T.prototype.getMinResolution=T.prototype.gc;
-T.prototype.getOpacity=T.prototype.hc;T.prototype.getVisible=T.prototype.Mb;T.prototype.getZIndex=T.prototype.Ba;T.prototype.setExtent=T.prototype.vc;T.prototype.setMaxResolution=T.prototype.Ac;T.prototype.setMinResolution=T.prototype.Bc;T.prototype.setOpacity=T.prototype.wc;T.prototype.setVisible=T.prototype.xc;T.prototype.setZIndex=T.prototype.Vb;T.prototype.get=T.prototype.get;T.prototype.getKeys=T.prototype.O;T.prototype.getProperties=T.prototype.N;T.prototype.set=T.prototype.set;
-T.prototype.setProperties=T.prototype.H;T.prototype.unset=T.prototype.P;T.prototype.changed=T.prototype.s;T.prototype.dispatchEvent=T.prototype.b;T.prototype.getRevision=T.prototype.L;T.prototype.on=T.prototype.J;T.prototype.once=T.prototype.once;T.prototype.un=T.prototype.K;V.prototype.getSource=V.prototype.ha;V.prototype.getStyle=V.prototype.D;V.prototype.getStyleFunction=V.prototype.C;V.prototype.setStyle=V.prototype.g;V.prototype.setMap=V.prototype.setMap;V.prototype.setSource=V.prototype.Wc;
-V.prototype.getExtent=V.prototype.G;V.prototype.getMaxResolution=V.prototype.fc;V.prototype.getMinResolution=V.prototype.gc;V.prototype.getOpacity=V.prototype.hc;V.prototype.getVisible=V.prototype.Mb;V.prototype.getZIndex=V.prototype.Ba;V.prototype.setExtent=V.prototype.vc;V.prototype.setMaxResolution=V.prototype.Ac;V.prototype.setMinResolution=V.prototype.Bc;V.prototype.setOpacity=V.prototype.wc;V.prototype.setVisible=V.prototype.xc;V.prototype.setZIndex=V.prototype.Vb;V.prototype.get=V.prototype.get;
-V.prototype.getKeys=V.prototype.O;V.prototype.getProperties=V.prototype.N;V.prototype.set=V.prototype.set;V.prototype.setProperties=V.prototype.H;V.prototype.unset=V.prototype.P;V.prototype.changed=V.prototype.s;V.prototype.dispatchEvent=V.prototype.b;V.prototype.getRevision=V.prototype.L;V.prototype.on=V.prototype.J;V.prototype.once=V.prototype.once;V.prototype.un=V.prototype.K;Uv.prototype.setMap=Uv.prototype.setMap;Uv.prototype.setSource=Uv.prototype.Wc;Uv.prototype.getExtent=Uv.prototype.G;
-Uv.prototype.getMaxResolution=Uv.prototype.fc;Uv.prototype.getMinResolution=Uv.prototype.gc;Uv.prototype.getOpacity=Uv.prototype.hc;Uv.prototype.getVisible=Uv.prototype.Mb;Uv.prototype.getZIndex=Uv.prototype.Ba;Uv.prototype.setExtent=Uv.prototype.vc;Uv.prototype.setMaxResolution=Uv.prototype.Ac;Uv.prototype.setMinResolution=Uv.prototype.Bc;Uv.prototype.setOpacity=Uv.prototype.wc;Uv.prototype.setVisible=Uv.prototype.xc;Uv.prototype.setZIndex=Uv.prototype.Vb;Uv.prototype.get=Uv.prototype.get;
-Uv.prototype.getKeys=Uv.prototype.O;Uv.prototype.getProperties=Uv.prototype.N;Uv.prototype.set=Uv.prototype.set;Uv.prototype.setProperties=Uv.prototype.H;Uv.prototype.unset=Uv.prototype.P;Uv.prototype.changed=Uv.prototype.s;Uv.prototype.dispatchEvent=Uv.prototype.b;Uv.prototype.getRevision=Uv.prototype.L;Uv.prototype.on=Uv.prototype.J;Uv.prototype.once=Uv.prototype.once;Uv.prototype.un=Uv.prototype.K;cw.prototype.setMap=cw.prototype.setMap;cw.prototype.setSource=cw.prototype.Wc;
-cw.prototype.getExtent=cw.prototype.G;cw.prototype.getMaxResolution=cw.prototype.fc;cw.prototype.getMinResolution=cw.prototype.gc;cw.prototype.getOpacity=cw.prototype.hc;cw.prototype.getVisible=cw.prototype.Mb;cw.prototype.getZIndex=cw.prototype.Ba;cw.prototype.setExtent=cw.prototype.vc;cw.prototype.setMaxResolution=cw.prototype.Ac;cw.prototype.setMinResolution=cw.prototype.Bc;cw.prototype.setOpacity=cw.prototype.wc;cw.prototype.setVisible=cw.prototype.xc;cw.prototype.setZIndex=cw.prototype.Vb;
-cw.prototype.get=cw.prototype.get;cw.prototype.getKeys=cw.prototype.O;cw.prototype.getProperties=cw.prototype.N;cw.prototype.set=cw.prototype.set;cw.prototype.setProperties=cw.prototype.H;cw.prototype.unset=cw.prototype.P;cw.prototype.changed=cw.prototype.s;cw.prototype.dispatchEvent=cw.prototype.b;cw.prototype.getRevision=cw.prototype.L;cw.prototype.on=cw.prototype.J;cw.prototype.once=cw.prototype.once;cw.prototype.un=cw.prototype.K;W.prototype.getSource=W.prototype.ha;W.prototype.getStyle=W.prototype.D;
-W.prototype.getStyleFunction=W.prototype.C;W.prototype.setStyle=W.prototype.g;W.prototype.setMap=W.prototype.setMap;W.prototype.setSource=W.prototype.Wc;W.prototype.getExtent=W.prototype.G;W.prototype.getMaxResolution=W.prototype.fc;W.prototype.getMinResolution=W.prototype.gc;W.prototype.getOpacity=W.prototype.hc;W.prototype.getVisible=W.prototype.Mb;W.prototype.getZIndex=W.prototype.Ba;W.prototype.setExtent=W.prototype.vc;W.prototype.setMaxResolution=W.prototype.Ac;W.prototype.setMinResolution=W.prototype.Bc;
-W.prototype.setOpacity=W.prototype.wc;W.prototype.setVisible=W.prototype.xc;W.prototype.setZIndex=W.prototype.Vb;W.prototype.get=W.prototype.get;W.prototype.getKeys=W.prototype.O;W.prototype.getProperties=W.prototype.N;W.prototype.set=W.prototype.set;W.prototype.setProperties=W.prototype.H;W.prototype.unset=W.prototype.P;W.prototype.changed=W.prototype.s;W.prototype.dispatchEvent=W.prototype.b;W.prototype.getRevision=W.prototype.L;W.prototype.on=W.prototype.J;W.prototype.once=W.prototype.once;
-W.prototype.un=W.prototype.K;ng.prototype.get=ng.prototype.get;ng.prototype.getKeys=ng.prototype.O;ng.prototype.getProperties=ng.prototype.N;ng.prototype.set=ng.prototype.set;ng.prototype.setProperties=ng.prototype.H;ng.prototype.unset=ng.prototype.P;ng.prototype.changed=ng.prototype.s;ng.prototype.dispatchEvent=ng.prototype.b;ng.prototype.getRevision=ng.prototype.L;ng.prototype.on=ng.prototype.J;ng.prototype.once=ng.prototype.once;ng.prototype.un=ng.prototype.K;rg.prototype.getActive=rg.prototype.c;
-rg.prototype.getMap=rg.prototype.f;rg.prototype.setActive=rg.prototype.Ha;rg.prototype.get=rg.prototype.get;rg.prototype.getKeys=rg.prototype.O;rg.prototype.getProperties=rg.prototype.N;rg.prototype.set=rg.prototype.set;rg.prototype.setProperties=rg.prototype.H;rg.prototype.unset=rg.prototype.P;rg.prototype.changed=rg.prototype.s;rg.prototype.dispatchEvent=rg.prototype.b;rg.prototype.getRevision=rg.prototype.L;rg.prototype.on=rg.prototype.J;rg.prototype.once=rg.prototype.once;rg.prototype.un=rg.prototype.K;
-Rs.prototype.getActive=Rs.prototype.c;Rs.prototype.getMap=Rs.prototype.f;Rs.prototype.setActive=Rs.prototype.Ha;Rs.prototype.get=Rs.prototype.get;Rs.prototype.getKeys=Rs.prototype.O;Rs.prototype.getProperties=Rs.prototype.N;Rs.prototype.set=Rs.prototype.set;Rs.prototype.setProperties=Rs.prototype.H;Rs.prototype.unset=Rs.prototype.P;Rs.prototype.changed=Rs.prototype.s;Rs.prototype.dispatchEvent=Rs.prototype.b;Rs.prototype.getRevision=Rs.prototype.L;Rs.prototype.on=Rs.prototype.J;
-Rs.prototype.once=Rs.prototype.once;Rs.prototype.un=Rs.prototype.K;Us.prototype.type=Us.prototype.type;Us.prototype.target=Us.prototype.target;Us.prototype.preventDefault=Us.prototype.preventDefault;Us.prototype.stopPropagation=Us.prototype.stopPropagation;Dg.prototype.getActive=Dg.prototype.c;Dg.prototype.getMap=Dg.prototype.f;Dg.prototype.setActive=Dg.prototype.Ha;Dg.prototype.get=Dg.prototype.get;Dg.prototype.getKeys=Dg.prototype.O;Dg.prototype.getProperties=Dg.prototype.N;Dg.prototype.set=Dg.prototype.set;
-Dg.prototype.setProperties=Dg.prototype.H;Dg.prototype.unset=Dg.prototype.P;Dg.prototype.changed=Dg.prototype.s;Dg.prototype.dispatchEvent=Dg.prototype.b;Dg.prototype.getRevision=Dg.prototype.L;Dg.prototype.on=Dg.prototype.J;Dg.prototype.once=Dg.prototype.once;Dg.prototype.un=Dg.prototype.K;Rg.prototype.getActive=Rg.prototype.c;Rg.prototype.getMap=Rg.prototype.f;Rg.prototype.setActive=Rg.prototype.Ha;Rg.prototype.get=Rg.prototype.get;Rg.prototype.getKeys=Rg.prototype.O;
-Rg.prototype.getProperties=Rg.prototype.N;Rg.prototype.set=Rg.prototype.set;Rg.prototype.setProperties=Rg.prototype.H;Rg.prototype.unset=Rg.prototype.P;Rg.prototype.changed=Rg.prototype.s;Rg.prototype.dispatchEvent=Rg.prototype.b;Rg.prototype.getRevision=Rg.prototype.L;Rg.prototype.on=Rg.prototype.J;Rg.prototype.once=Rg.prototype.once;Rg.prototype.un=Rg.prototype.K;Wg.prototype.type=Wg.prototype.type;Wg.prototype.target=Wg.prototype.target;Wg.prototype.preventDefault=Wg.prototype.preventDefault;
-Wg.prototype.stopPropagation=Wg.prototype.stopPropagation;Gg.prototype.getActive=Gg.prototype.c;Gg.prototype.getMap=Gg.prototype.f;Gg.prototype.setActive=Gg.prototype.Ha;Gg.prototype.get=Gg.prototype.get;Gg.prototype.getKeys=Gg.prototype.O;Gg.prototype.getProperties=Gg.prototype.N;Gg.prototype.set=Gg.prototype.set;Gg.prototype.setProperties=Gg.prototype.H;Gg.prototype.unset=Gg.prototype.P;Gg.prototype.changed=Gg.prototype.s;Gg.prototype.dispatchEvent=Gg.prototype.b;Gg.prototype.getRevision=Gg.prototype.L;
-Gg.prototype.on=Gg.prototype.J;Gg.prototype.once=Gg.prototype.once;Gg.prototype.un=Gg.prototype.K;Kg.prototype.getActive=Kg.prototype.c;Kg.prototype.getMap=Kg.prototype.f;Kg.prototype.setActive=Kg.prototype.Ha;Kg.prototype.get=Kg.prototype.get;Kg.prototype.getKeys=Kg.prototype.O;Kg.prototype.getProperties=Kg.prototype.N;Kg.prototype.set=Kg.prototype.set;Kg.prototype.setProperties=Kg.prototype.H;Kg.prototype.unset=Kg.prototype.P;Kg.prototype.changed=Kg.prototype.s;Kg.prototype.dispatchEvent=Kg.prototype.b;
-Kg.prototype.getRevision=Kg.prototype.L;Kg.prototype.on=Kg.prototype.J;Kg.prototype.once=Kg.prototype.once;Kg.prototype.un=Kg.prototype.K;Ys.prototype.getActive=Ys.prototype.c;Ys.prototype.getMap=Ys.prototype.f;Ys.prototype.setActive=Ys.prototype.Ha;Ys.prototype.get=Ys.prototype.get;Ys.prototype.getKeys=Ys.prototype.O;Ys.prototype.getProperties=Ys.prototype.N;Ys.prototype.set=Ys.prototype.set;Ys.prototype.setProperties=Ys.prototype.H;Ys.prototype.unset=Ys.prototype.P;Ys.prototype.changed=Ys.prototype.s;
-Ys.prototype.dispatchEvent=Ys.prototype.b;Ys.prototype.getRevision=Ys.prototype.L;Ys.prototype.on=Ys.prototype.J;Ys.prototype.once=Ys.prototype.once;Ys.prototype.un=Ys.prototype.K;$g.prototype.getGeometry=$g.prototype.V;$g.prototype.getActive=$g.prototype.c;$g.prototype.getMap=$g.prototype.f;$g.prototype.setActive=$g.prototype.Ha;$g.prototype.get=$g.prototype.get;$g.prototype.getKeys=$g.prototype.O;$g.prototype.getProperties=$g.prototype.N;$g.prototype.set=$g.prototype.set;
-$g.prototype.setProperties=$g.prototype.H;$g.prototype.unset=$g.prototype.P;$g.prototype.changed=$g.prototype.s;$g.prototype.dispatchEvent=$g.prototype.b;$g.prototype.getRevision=$g.prototype.L;$g.prototype.on=$g.prototype.J;$g.prototype.once=$g.prototype.once;$g.prototype.un=$g.prototype.K;ju.prototype.getActive=ju.prototype.c;ju.prototype.getMap=ju.prototype.f;ju.prototype.setActive=ju.prototype.Ha;ju.prototype.get=ju.prototype.get;ju.prototype.getKeys=ju.prototype.O;
-ju.prototype.getProperties=ju.prototype.N;ju.prototype.set=ju.prototype.set;ju.prototype.setProperties=ju.prototype.H;ju.prototype.unset=ju.prototype.P;ju.prototype.changed=ju.prototype.s;ju.prototype.dispatchEvent=ju.prototype.b;ju.prototype.getRevision=ju.prototype.L;ju.prototype.on=ju.prototype.J;ju.prototype.once=ju.prototype.once;ju.prototype.un=ju.prototype.K;zu.prototype.type=zu.prototype.type;zu.prototype.target=zu.prototype.target;zu.prototype.preventDefault=zu.prototype.preventDefault;
-zu.prototype.stopPropagation=zu.prototype.stopPropagation;Au.prototype.getActive=Au.prototype.c;Au.prototype.getMap=Au.prototype.f;Au.prototype.setActive=Au.prototype.Ha;Au.prototype.get=Au.prototype.get;Au.prototype.getKeys=Au.prototype.O;Au.prototype.getProperties=Au.prototype.N;Au.prototype.set=Au.prototype.set;Au.prototype.setProperties=Au.prototype.H;Au.prototype.unset=Au.prototype.P;Au.prototype.changed=Au.prototype.s;Au.prototype.dispatchEvent=Au.prototype.b;Au.prototype.getRevision=Au.prototype.L;
-Au.prototype.on=Au.prototype.J;Au.prototype.once=Au.prototype.once;Au.prototype.un=Au.prototype.K;Lu.prototype.type=Lu.prototype.type;Lu.prototype.target=Lu.prototype.target;Lu.prototype.preventDefault=Lu.prototype.preventDefault;Lu.prototype.stopPropagation=Lu.prototype.stopPropagation;ah.prototype.getActive=ah.prototype.c;ah.prototype.getMap=ah.prototype.f;ah.prototype.setActive=ah.prototype.Ha;ah.prototype.get=ah.prototype.get;ah.prototype.getKeys=ah.prototype.O;ah.prototype.getProperties=ah.prototype.N;
-ah.prototype.set=ah.prototype.set;ah.prototype.setProperties=ah.prototype.H;ah.prototype.unset=ah.prototype.P;ah.prototype.changed=ah.prototype.s;ah.prototype.dispatchEvent=ah.prototype.b;ah.prototype.getRevision=ah.prototype.L;ah.prototype.on=ah.prototype.J;ah.prototype.once=ah.prototype.once;ah.prototype.un=ah.prototype.K;ch.prototype.getActive=ch.prototype.c;ch.prototype.getMap=ch.prototype.f;ch.prototype.setActive=ch.prototype.Ha;ch.prototype.get=ch.prototype.get;ch.prototype.getKeys=ch.prototype.O;
-ch.prototype.getProperties=ch.prototype.N;ch.prototype.set=ch.prototype.set;ch.prototype.setProperties=ch.prototype.H;ch.prototype.unset=ch.prototype.P;ch.prototype.changed=ch.prototype.s;ch.prototype.dispatchEvent=ch.prototype.b;ch.prototype.getRevision=ch.prototype.L;ch.prototype.on=ch.prototype.J;ch.prototype.once=ch.prototype.once;ch.prototype.un=ch.prototype.K;Nu.prototype.getActive=Nu.prototype.c;Nu.prototype.getMap=Nu.prototype.f;Nu.prototype.setActive=Nu.prototype.Ha;Nu.prototype.get=Nu.prototype.get;
-Nu.prototype.getKeys=Nu.prototype.O;Nu.prototype.getProperties=Nu.prototype.N;Nu.prototype.set=Nu.prototype.set;Nu.prototype.setProperties=Nu.prototype.H;Nu.prototype.unset=Nu.prototype.P;Nu.prototype.changed=Nu.prototype.s;Nu.prototype.dispatchEvent=Nu.prototype.b;Nu.prototype.getRevision=Nu.prototype.L;Nu.prototype.on=Nu.prototype.J;Nu.prototype.once=Nu.prototype.once;Nu.prototype.un=Nu.prototype.K;Vu.prototype.type=Vu.prototype.type;Vu.prototype.target=Vu.prototype.target;
-Vu.prototype.preventDefault=Vu.prototype.preventDefault;Vu.prototype.stopPropagation=Vu.prototype.stopPropagation;eh.prototype.getActive=eh.prototype.c;eh.prototype.getMap=eh.prototype.f;eh.prototype.setActive=eh.prototype.Ha;eh.prototype.get=eh.prototype.get;eh.prototype.getKeys=eh.prototype.O;eh.prototype.getProperties=eh.prototype.N;eh.prototype.set=eh.prototype.set;eh.prototype.setProperties=eh.prototype.H;eh.prototype.unset=eh.prototype.P;eh.prototype.changed=eh.prototype.s;
-eh.prototype.dispatchEvent=eh.prototype.b;eh.prototype.getRevision=eh.prototype.L;eh.prototype.on=eh.prototype.J;eh.prototype.once=eh.prototype.once;eh.prototype.un=eh.prototype.K;ih.prototype.getActive=ih.prototype.c;ih.prototype.getMap=ih.prototype.f;ih.prototype.setActive=ih.prototype.Ha;ih.prototype.get=ih.prototype.get;ih.prototype.getKeys=ih.prototype.O;ih.prototype.getProperties=ih.prototype.N;ih.prototype.set=ih.prototype.set;ih.prototype.setProperties=ih.prototype.H;ih.prototype.unset=ih.prototype.P;
-ih.prototype.changed=ih.prototype.s;ih.prototype.dispatchEvent=ih.prototype.b;ih.prototype.getRevision=ih.prototype.L;ih.prototype.on=ih.prototype.J;ih.prototype.once=ih.prototype.once;ih.prototype.un=ih.prototype.K;mh.prototype.getActive=mh.prototype.c;mh.prototype.getMap=mh.prototype.f;mh.prototype.setActive=mh.prototype.Ha;mh.prototype.get=mh.prototype.get;mh.prototype.getKeys=mh.prototype.O;mh.prototype.getProperties=mh.prototype.N;mh.prototype.set=mh.prototype.set;
-mh.prototype.setProperties=mh.prototype.H;mh.prototype.unset=mh.prototype.P;mh.prototype.changed=mh.prototype.s;mh.prototype.dispatchEvent=mh.prototype.b;mh.prototype.getRevision=mh.prototype.L;mh.prototype.on=mh.prototype.J;mh.prototype.once=mh.prototype.once;mh.prototype.un=mh.prototype.K;cv.prototype.getActive=cv.prototype.c;cv.prototype.getMap=cv.prototype.f;cv.prototype.setActive=cv.prototype.Ha;cv.prototype.get=cv.prototype.get;cv.prototype.getKeys=cv.prototype.O;
-cv.prototype.getProperties=cv.prototype.N;cv.prototype.set=cv.prototype.set;cv.prototype.setProperties=cv.prototype.H;cv.prototype.unset=cv.prototype.P;cv.prototype.changed=cv.prototype.s;cv.prototype.dispatchEvent=cv.prototype.b;cv.prototype.getRevision=cv.prototype.L;cv.prototype.on=cv.prototype.J;cv.prototype.once=cv.prototype.once;cv.prototype.un=cv.prototype.K;fv.prototype.type=fv.prototype.type;fv.prototype.target=fv.prototype.target;fv.prototype.preventDefault=fv.prototype.preventDefault;
-fv.prototype.stopPropagation=fv.prototype.stopPropagation;hv.prototype.getActive=hv.prototype.c;hv.prototype.getMap=hv.prototype.f;hv.prototype.setActive=hv.prototype.Ha;hv.prototype.get=hv.prototype.get;hv.prototype.getKeys=hv.prototype.O;hv.prototype.getProperties=hv.prototype.N;hv.prototype.set=hv.prototype.set;hv.prototype.setProperties=hv.prototype.H;hv.prototype.unset=hv.prototype.P;hv.prototype.changed=hv.prototype.s;hv.prototype.dispatchEvent=hv.prototype.b;hv.prototype.getRevision=hv.prototype.L;
-hv.prototype.on=hv.prototype.J;hv.prototype.once=hv.prototype.once;hv.prototype.un=hv.prototype.K;mv.prototype.getActive=mv.prototype.c;mv.prototype.getMap=mv.prototype.f;mv.prototype.setActive=mv.prototype.Ha;mv.prototype.get=mv.prototype.get;mv.prototype.getKeys=mv.prototype.O;mv.prototype.getProperties=mv.prototype.N;mv.prototype.set=mv.prototype.set;mv.prototype.setProperties=mv.prototype.H;mv.prototype.unset=mv.prototype.P;mv.prototype.changed=mv.prototype.s;mv.prototype.dispatchEvent=mv.prototype.b;
-mv.prototype.getRevision=mv.prototype.L;mv.prototype.on=mv.prototype.J;mv.prototype.once=mv.prototype.once;mv.prototype.un=mv.prototype.K;sv.prototype.type=sv.prototype.type;sv.prototype.target=sv.prototype.target;sv.prototype.preventDefault=sv.prototype.preventDefault;sv.prototype.stopPropagation=sv.prototype.stopPropagation;of.prototype.get=of.prototype.get;of.prototype.getKeys=of.prototype.O;of.prototype.getProperties=of.prototype.N;of.prototype.set=of.prototype.set;
-of.prototype.setProperties=of.prototype.H;of.prototype.unset=of.prototype.P;of.prototype.changed=of.prototype.s;of.prototype.dispatchEvent=of.prototype.b;of.prototype.getRevision=of.prototype.L;of.prototype.on=of.prototype.J;of.prototype.once=of.prototype.once;of.prototype.un=of.prototype.K;rf.prototype.getClosestPoint=rf.prototype.Ab;rf.prototype.intersectsCoordinate=rf.prototype.sb;rf.prototype.getExtent=rf.prototype.G;rf.prototype.rotate=rf.prototype.rotate;rf.prototype.scale=rf.prototype.scale;
-rf.prototype.simplify=rf.prototype.Rb;rf.prototype.transform=rf.prototype.tb;rf.prototype.get=rf.prototype.get;rf.prototype.getKeys=rf.prototype.O;rf.prototype.getProperties=rf.prototype.N;rf.prototype.set=rf.prototype.set;rf.prototype.setProperties=rf.prototype.H;rf.prototype.unset=rf.prototype.P;rf.prototype.changed=rf.prototype.s;rf.prototype.dispatchEvent=rf.prototype.b;rf.prototype.getRevision=rf.prototype.L;rf.prototype.on=rf.prototype.J;rf.prototype.once=rf.prototype.once;rf.prototype.un=rf.prototype.K;
-ys.prototype.getFirstCoordinate=ys.prototype.ac;ys.prototype.getLastCoordinate=ys.prototype.bc;ys.prototype.getLayout=ys.prototype.cc;ys.prototype.rotate=ys.prototype.rotate;ys.prototype.scale=ys.prototype.scale;ys.prototype.getClosestPoint=ys.prototype.Ab;ys.prototype.intersectsCoordinate=ys.prototype.sb;ys.prototype.getExtent=ys.prototype.G;ys.prototype.simplify=ys.prototype.Rb;ys.prototype.get=ys.prototype.get;ys.prototype.getKeys=ys.prototype.O;ys.prototype.getProperties=ys.prototype.N;
-ys.prototype.set=ys.prototype.set;ys.prototype.setProperties=ys.prototype.H;ys.prototype.unset=ys.prototype.P;ys.prototype.changed=ys.prototype.s;ys.prototype.dispatchEvent=ys.prototype.b;ys.prototype.getRevision=ys.prototype.L;ys.prototype.on=ys.prototype.J;ys.prototype.once=ys.prototype.once;ys.prototype.un=ys.prototype.K;tm.prototype.getClosestPoint=tm.prototype.Ab;tm.prototype.intersectsCoordinate=tm.prototype.sb;tm.prototype.getExtent=tm.prototype.G;tm.prototype.rotate=tm.prototype.rotate;
-tm.prototype.scale=tm.prototype.scale;tm.prototype.simplify=tm.prototype.Rb;tm.prototype.transform=tm.prototype.tb;tm.prototype.get=tm.prototype.get;tm.prototype.getKeys=tm.prototype.O;tm.prototype.getProperties=tm.prototype.N;tm.prototype.set=tm.prototype.set;tm.prototype.setProperties=tm.prototype.H;tm.prototype.unset=tm.prototype.P;tm.prototype.changed=tm.prototype.s;tm.prototype.dispatchEvent=tm.prototype.b;tm.prototype.getRevision=tm.prototype.L;tm.prototype.on=tm.prototype.J;
-tm.prototype.once=tm.prototype.once;tm.prototype.un=tm.prototype.K;Jf.prototype.getFirstCoordinate=Jf.prototype.ac;Jf.prototype.getLastCoordinate=Jf.prototype.bc;Jf.prototype.getLayout=Jf.prototype.cc;Jf.prototype.rotate=Jf.prototype.rotate;Jf.prototype.scale=Jf.prototype.scale;Jf.prototype.getClosestPoint=Jf.prototype.Ab;Jf.prototype.intersectsCoordinate=Jf.prototype.sb;Jf.prototype.getExtent=Jf.prototype.G;Jf.prototype.simplify=Jf.prototype.Rb;Jf.prototype.transform=Jf.prototype.tb;
-Jf.prototype.get=Jf.prototype.get;Jf.prototype.getKeys=Jf.prototype.O;Jf.prototype.getProperties=Jf.prototype.N;Jf.prototype.set=Jf.prototype.set;Jf.prototype.setProperties=Jf.prototype.H;Jf.prototype.unset=Jf.prototype.P;Jf.prototype.changed=Jf.prototype.s;Jf.prototype.dispatchEvent=Jf.prototype.b;Jf.prototype.getRevision=Jf.prototype.L;Jf.prototype.on=Jf.prototype.J;Jf.prototype.once=Jf.prototype.once;Jf.prototype.un=Jf.prototype.K;O.prototype.getFirstCoordinate=O.prototype.ac;
-O.prototype.getLastCoordinate=O.prototype.bc;O.prototype.getLayout=O.prototype.cc;O.prototype.rotate=O.prototype.rotate;O.prototype.scale=O.prototype.scale;O.prototype.getClosestPoint=O.prototype.Ab;O.prototype.intersectsCoordinate=O.prototype.sb;O.prototype.getExtent=O.prototype.G;O.prototype.simplify=O.prototype.Rb;O.prototype.transform=O.prototype.tb;O.prototype.get=O.prototype.get;O.prototype.getKeys=O.prototype.O;O.prototype.getProperties=O.prototype.N;O.prototype.set=O.prototype.set;
-O.prototype.setProperties=O.prototype.H;O.prototype.unset=O.prototype.P;O.prototype.changed=O.prototype.s;O.prototype.dispatchEvent=O.prototype.b;O.prototype.getRevision=O.prototype.L;O.prototype.on=O.prototype.J;O.prototype.once=O.prototype.once;O.prototype.un=O.prototype.K;P.prototype.getFirstCoordinate=P.prototype.ac;P.prototype.getLastCoordinate=P.prototype.bc;P.prototype.getLayout=P.prototype.cc;P.prototype.rotate=P.prototype.rotate;P.prototype.scale=P.prototype.scale;
-P.prototype.getClosestPoint=P.prototype.Ab;P.prototype.intersectsCoordinate=P.prototype.sb;P.prototype.getExtent=P.prototype.G;P.prototype.simplify=P.prototype.Rb;P.prototype.transform=P.prototype.tb;P.prototype.get=P.prototype.get;P.prototype.getKeys=P.prototype.O;P.prototype.getProperties=P.prototype.N;P.prototype.set=P.prototype.set;P.prototype.setProperties=P.prototype.H;P.prototype.unset=P.prototype.P;P.prototype.changed=P.prototype.s;P.prototype.dispatchEvent=P.prototype.b;
-P.prototype.getRevision=P.prototype.L;P.prototype.on=P.prototype.J;P.prototype.once=P.prototype.once;P.prototype.un=P.prototype.K;Q.prototype.getFirstCoordinate=Q.prototype.ac;Q.prototype.getLastCoordinate=Q.prototype.bc;Q.prototype.getLayout=Q.prototype.cc;Q.prototype.rotate=Q.prototype.rotate;Q.prototype.scale=Q.prototype.scale;Q.prototype.getClosestPoint=Q.prototype.Ab;Q.prototype.intersectsCoordinate=Q.prototype.sb;Q.prototype.getExtent=Q.prototype.G;Q.prototype.simplify=Q.prototype.Rb;
-Q.prototype.transform=Q.prototype.tb;Q.prototype.get=Q.prototype.get;Q.prototype.getKeys=Q.prototype.O;Q.prototype.getProperties=Q.prototype.N;Q.prototype.set=Q.prototype.set;Q.prototype.setProperties=Q.prototype.H;Q.prototype.unset=Q.prototype.P;Q.prototype.changed=Q.prototype.s;Q.prototype.dispatchEvent=Q.prototype.b;Q.prototype.getRevision=Q.prototype.L;Q.prototype.on=Q.prototype.J;Q.prototype.once=Q.prototype.once;Q.prototype.un=Q.prototype.K;R.prototype.getFirstCoordinate=R.prototype.ac;
-R.prototype.getLastCoordinate=R.prototype.bc;R.prototype.getLayout=R.prototype.cc;R.prototype.rotate=R.prototype.rotate;R.prototype.scale=R.prototype.scale;R.prototype.getClosestPoint=R.prototype.Ab;R.prototype.intersectsCoordinate=R.prototype.sb;R.prototype.getExtent=R.prototype.G;R.prototype.simplify=R.prototype.Rb;R.prototype.transform=R.prototype.tb;R.prototype.get=R.prototype.get;R.prototype.getKeys=R.prototype.O;R.prototype.getProperties=R.prototype.N;R.prototype.set=R.prototype.set;
-R.prototype.setProperties=R.prototype.H;R.prototype.unset=R.prototype.P;R.prototype.changed=R.prototype.s;R.prototype.dispatchEvent=R.prototype.b;R.prototype.getRevision=R.prototype.L;R.prototype.on=R.prototype.J;R.prototype.once=R.prototype.once;R.prototype.un=R.prototype.K;C.prototype.getFirstCoordinate=C.prototype.ac;C.prototype.getLastCoordinate=C.prototype.bc;C.prototype.getLayout=C.prototype.cc;C.prototype.rotate=C.prototype.rotate;C.prototype.scale=C.prototype.scale;
-C.prototype.getClosestPoint=C.prototype.Ab;C.prototype.intersectsCoordinate=C.prototype.sb;C.prototype.getExtent=C.prototype.G;C.prototype.simplify=C.prototype.Rb;C.prototype.transform=C.prototype.tb;C.prototype.get=C.prototype.get;C.prototype.getKeys=C.prototype.O;C.prototype.getProperties=C.prototype.N;C.prototype.set=C.prototype.set;C.prototype.setProperties=C.prototype.H;C.prototype.unset=C.prototype.P;C.prototype.changed=C.prototype.s;C.prototype.dispatchEvent=C.prototype.b;
-C.prototype.getRevision=C.prototype.L;C.prototype.on=C.prototype.J;C.prototype.once=C.prototype.once;C.prototype.un=C.prototype.K;D.prototype.getFirstCoordinate=D.prototype.ac;D.prototype.getLastCoordinate=D.prototype.bc;D.prototype.getLayout=D.prototype.cc;D.prototype.rotate=D.prototype.rotate;D.prototype.scale=D.prototype.scale;D.prototype.getClosestPoint=D.prototype.Ab;D.prototype.intersectsCoordinate=D.prototype.sb;D.prototype.getExtent=D.prototype.G;D.prototype.simplify=D.prototype.Rb;
-D.prototype.transform=D.prototype.tb;D.prototype.get=D.prototype.get;D.prototype.getKeys=D.prototype.O;D.prototype.getProperties=D.prototype.N;D.prototype.set=D.prototype.set;D.prototype.setProperties=D.prototype.H;D.prototype.unset=D.prototype.P;D.prototype.changed=D.prototype.s;D.prototype.dispatchEvent=D.prototype.b;D.prototype.getRevision=D.prototype.L;D.prototype.on=D.prototype.J;D.prototype.once=D.prototype.once;D.prototype.un=D.prototype.K;Sm.prototype.readFeatures=Sm.prototype.Oa;
-an.prototype.readFeatures=an.prototype.Oa;Sm.prototype.readFeatures=Sm.prototype.Oa;md.prototype.get=md.prototype.get;md.prototype.getKeys=md.prototype.O;md.prototype.getProperties=md.prototype.N;md.prototype.set=md.prototype.set;md.prototype.setProperties=md.prototype.H;md.prototype.unset=md.prototype.P;md.prototype.changed=md.prototype.s;md.prototype.dispatchEvent=md.prototype.b;md.prototype.getRevision=md.prototype.L;md.prototype.on=md.prototype.J;md.prototype.once=md.prototype.once;
-md.prototype.un=md.prototype.K;nd.prototype.getMap=nd.prototype.g;nd.prototype.setMap=nd.prototype.setMap;nd.prototype.setTarget=nd.prototype.f;nd.prototype.get=nd.prototype.get;nd.prototype.getKeys=nd.prototype.O;nd.prototype.getProperties=nd.prototype.N;nd.prototype.set=nd.prototype.set;nd.prototype.setProperties=nd.prototype.H;nd.prototype.unset=nd.prototype.P;nd.prototype.changed=nd.prototype.s;nd.prototype.dispatchEvent=nd.prototype.b;nd.prototype.getRevision=nd.prototype.L;nd.prototype.on=nd.prototype.J;
-nd.prototype.once=nd.prototype.once;nd.prototype.un=nd.prototype.K;yd.prototype.getMap=yd.prototype.g;yd.prototype.setMap=yd.prototype.setMap;yd.prototype.setTarget=yd.prototype.f;yd.prototype.get=yd.prototype.get;yd.prototype.getKeys=yd.prototype.O;yd.prototype.getProperties=yd.prototype.N;yd.prototype.set=yd.prototype.set;yd.prototype.setProperties=yd.prototype.H;yd.prototype.unset=yd.prototype.P;yd.prototype.changed=yd.prototype.s;yd.prototype.dispatchEvent=yd.prototype.b;
-yd.prototype.getRevision=yd.prototype.L;yd.prototype.on=yd.prototype.J;yd.prototype.once=yd.prototype.once;yd.prototype.un=yd.prototype.K;Dd.prototype.getMap=Dd.prototype.g;Dd.prototype.setMap=Dd.prototype.setMap;Dd.prototype.setTarget=Dd.prototype.f;Dd.prototype.get=Dd.prototype.get;Dd.prototype.getKeys=Dd.prototype.O;Dd.prototype.getProperties=Dd.prototype.N;Dd.prototype.set=Dd.prototype.set;Dd.prototype.setProperties=Dd.prototype.H;Dd.prototype.unset=Dd.prototype.P;Dd.prototype.changed=Dd.prototype.s;
-Dd.prototype.dispatchEvent=Dd.prototype.b;Dd.prototype.getRevision=Dd.prototype.L;Dd.prototype.on=Dd.prototype.J;Dd.prototype.once=Dd.prototype.once;Dd.prototype.un=Dd.prototype.K;Bk.prototype.getMap=Bk.prototype.g;Bk.prototype.setMap=Bk.prototype.setMap;Bk.prototype.setTarget=Bk.prototype.f;Bk.prototype.get=Bk.prototype.get;Bk.prototype.getKeys=Bk.prototype.O;Bk.prototype.getProperties=Bk.prototype.N;Bk.prototype.set=Bk.prototype.set;Bk.prototype.setProperties=Bk.prototype.H;Bk.prototype.unset=Bk.prototype.P;
-Bk.prototype.changed=Bk.prototype.s;Bk.prototype.dispatchEvent=Bk.prototype.b;Bk.prototype.getRevision=Bk.prototype.L;Bk.prototype.on=Bk.prototype.J;Bk.prototype.once=Bk.prototype.once;Bk.prototype.un=Bk.prototype.K;ud.prototype.getMap=ud.prototype.g;ud.prototype.setMap=ud.prototype.setMap;ud.prototype.setTarget=ud.prototype.f;ud.prototype.get=ud.prototype.get;ud.prototype.getKeys=ud.prototype.O;ud.prototype.getProperties=ud.prototype.N;ud.prototype.set=ud.prototype.set;
-ud.prototype.setProperties=ud.prototype.H;ud.prototype.unset=ud.prototype.P;ud.prototype.changed=ud.prototype.s;ud.prototype.dispatchEvent=ud.prototype.b;ud.prototype.getRevision=ud.prototype.L;ud.prototype.on=ud.prototype.J;ud.prototype.once=ud.prototype.once;ud.prototype.un=ud.prototype.K;Gk.prototype.getMap=Gk.prototype.g;Gk.prototype.setMap=Gk.prototype.setMap;Gk.prototype.setTarget=Gk.prototype.f;Gk.prototype.get=Gk.prototype.get;Gk.prototype.getKeys=Gk.prototype.O;
-Gk.prototype.getProperties=Gk.prototype.N;Gk.prototype.set=Gk.prototype.set;Gk.prototype.setProperties=Gk.prototype.H;Gk.prototype.unset=Gk.prototype.P;Gk.prototype.changed=Gk.prototype.s;Gk.prototype.dispatchEvent=Gk.prototype.b;Gk.prototype.getRevision=Gk.prototype.L;Gk.prototype.on=Gk.prototype.J;Gk.prototype.once=Gk.prototype.once;Gk.prototype.un=Gk.prototype.K;wd.prototype.getMap=wd.prototype.g;wd.prototype.setMap=wd.prototype.setMap;wd.prototype.setTarget=wd.prototype.f;wd.prototype.get=wd.prototype.get;
-wd.prototype.getKeys=wd.prototype.O;wd.prototype.getProperties=wd.prototype.N;wd.prototype.set=wd.prototype.set;wd.prototype.setProperties=wd.prototype.H;wd.prototype.unset=wd.prototype.P;wd.prototype.changed=wd.prototype.s;wd.prototype.dispatchEvent=wd.prototype.b;wd.prototype.getRevision=wd.prototype.L;wd.prototype.on=wd.prototype.J;wd.prototype.once=wd.prototype.once;wd.prototype.un=wd.prototype.K;Lk.prototype.getMap=Lk.prototype.g;Lk.prototype.setMap=Lk.prototype.setMap;
-Lk.prototype.setTarget=Lk.prototype.f;Lk.prototype.get=Lk.prototype.get;Lk.prototype.getKeys=Lk.prototype.O;Lk.prototype.getProperties=Lk.prototype.N;Lk.prototype.set=Lk.prototype.set;Lk.prototype.setProperties=Lk.prototype.H;Lk.prototype.unset=Lk.prototype.P;Lk.prototype.changed=Lk.prototype.s;Lk.prototype.dispatchEvent=Lk.prototype.b;Lk.prototype.getRevision=Lk.prototype.L;Lk.prototype.on=Lk.prototype.J;Lk.prototype.once=Lk.prototype.once;Lk.prototype.un=Lk.prototype.K;Qk.prototype.getMap=Qk.prototype.g;
-Qk.prototype.setMap=Qk.prototype.setMap;Qk.prototype.setTarget=Qk.prototype.f;Qk.prototype.get=Qk.prototype.get;Qk.prototype.getKeys=Qk.prototype.O;Qk.prototype.getProperties=Qk.prototype.N;Qk.prototype.set=Qk.prototype.set;Qk.prototype.setProperties=Qk.prototype.H;Qk.prototype.unset=Qk.prototype.P;Qk.prototype.changed=Qk.prototype.s;Qk.prototype.dispatchEvent=Qk.prototype.b;Qk.prototype.getRevision=Qk.prototype.L;Qk.prototype.on=Qk.prototype.J;Qk.prototype.once=Qk.prototype.once;
-Qk.prototype.un=Qk.prototype.K;
-  return OPENLAYERS.ol;
-}));
-
+/*! For license information please see ol.js.LICENSE.txt */
+!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.ol=n():t.ol=n()}(self,(function(){return function(){var t,n={226:function(t,n){n.read=function(t,n,i,r,e){var o,s,u=8*e-r-1,a=(1<<u)-1,h=a>>1,f=-7,c=i?e-1:0,l=i?-1:1,v=t[n+c];for(c+=l,o=v&(1<<-f)-1,v>>=-f,f+=u;f>0;o=256*o+t[n+c],c+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[n+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===a)return s?NaN:1/0*(v?-1:1);s+=Math.pow(2,r),o-=h}return(v?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,n,i,r,e,o){var s,u,a,h=8*o-e-1,f=(1<<h)-1,c=f>>1,l=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,d=r?1:-1,p=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,s=f):(s=Math.floor(Math.log(n)/Math.LN2),n*(a=Math.pow(2,-s))<1&&(s--,a*=2),(n+=s+c>=1?l/a:l*Math.pow(2,1-c))*a>=2&&(s++,a/=2),s+c>=f?(u=0,s=f):s+c>=1?(u=(n*a-1)*Math.pow(2,e),s+=c):(u=n*Math.pow(2,c-1)*Math.pow(2,e),s=0));e>=8;t[i+v]=255&u,v+=d,u/=256,e-=8);for(s=s<<e|u,h+=e;h>0;t[i+v]=255&s,v+=d,s/=256,h-=8);t[i+v-d]|=128*p}},875:function(t,n,i){"use strict";const r=i(692),e=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),a=Symbol("maxAge"),h=Symbol("dispose"),f=Symbol("noDisposeOnSet"),c=Symbol("lruList"),l=Symbol("cache"),v=Symbol("updateAgeOnGet"),d=()=>1;const p=(t,n,i)=>{const r=t[l].get(n);if(r){const n=r.value;if(y(t,n)){if(w(t,r),!t[u])return}else i&&(t[v]&&(r.value.now=Date.now()),t[c].unshiftNode(r));return n.value}},y=(t,n)=>{if(!n||!n.maxAge&&!t[a])return!1;const i=Date.now()-n.now;return n.maxAge?i>n.maxAge:t[a]&&i>t[a]},m=t=>{if(t[o]>t[e])for(let n=t[c].tail;t[o]>t[e]&&null!==n;){const i=n.prev;w(t,n),n=i}},w=(t,n)=>{if(n){const i=n.value;t[h]&&t[h](i.key,i.value),t[o]-=i.length,t[l].delete(i.key),t[c].removeNode(n)}};class g{constructor(t,n,i,r,e){this.key=t,this.value=n,this.length=i,this.now=r,this.maxAge=e||0}}const b=(t,n,i,r)=>{let e=i.value;y(t,e)&&(w(t,i),t[u]||(e=void 0)),e&&n.call(r,e.value,e.key,t)};t.exports=class{constructor(t){if("number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[e]=t.max||1/0;const n=t.length||d;if(this[s]="function"!=typeof n?d:n,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[a]=t.maxAge||0,this[h]=t.dispose,this[f]=t.noDisposeOnSet||!1,this[v]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[e]=t||1/0,m(this)}get max(){return this[e]}set allowStale(t){this[u]=!!t}get allowStale(){return this[u]}set maxAge(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[a]=t,m(this)}get maxAge(){return this[a]}set lengthCalculator(t){"function"!=typeof t&&(t=d),t!==this[s]&&(this[s]=t,this[o]=0,this[c].forEach((t=>{t.length=this[s](t.value,t.key),this[o]+=t.length}))),m(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[c].length}rforEach(t,n){n=n||this;for(let i=this[c].tail;null!==i;){const r=i.prev;b(this,t,i,n),i=r}}forEach(t,n){n=n||this;for(let i=this[c].head;null!==i;){const r=i.next;b(this,t,i,n),i=r}}keys(){return this[c].toArray().map((t=>t.key))}values(){return this[c].toArray().map((t=>t.value))}reset(){this[h]&&this[c]&&this[c].length&&this[c].forEach((t=>this[h](t.key,t.value))),this[l]=new Map,this[c]=new r,this[o]=0}dump(){return this[c].map((t=>!y(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[c]}set(t,n,i){if((i=i||this[a])&&"number"!=typeof i)throw new TypeError("maxAge must be a number");const r=i?Date.now():0,u=this[s](n,t);if(this[l].has(t)){if(u>this[e])return w(this,this[l].get(t)),!1;const s=this[l].get(t).value;return this[h]&&(this[f]||this[h](t,s.value)),s.now=r,s.maxAge=i,s.value=n,this[o]+=u-s.length,s.length=u,this.get(t),m(this),!0}const v=new g(t,n,u,r,i);return v.length>this[e]?(this[h]&&this[h](t,n),!1):(this[o]+=v.length,this[c].unshift(v),this[l].set(t,this[c].head),m(this),!0)}has(t){if(!this[l].has(t))return!1;const n=this[l].get(t).value;return!y(this,n)}get(t){return p(this,t,!0)}peek(t){return p(this,t,!1)}pop(){const t=this[c].tail;return t?(w(this,t),t.value):null}del(t){w(this,this[l].get(t))}load(t){this.reset();const n=Date.now();for(let i=t.length-1;i>=0;i--){const r=t[i],e=r.e||0;if(0===e)this.set(r.k,r.v);else{const t=e-n;t>0&&this.set(r.k,r.v,t)}}}prune(){this[l].forEach(((t,n)=>p(this,n,!1)))}}},98:function(t,n,i){"use strict";t.exports=e;var r=i(226);function e(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}e.Varint=0,e.Fixed64=1,e.Bytes=2,e.Fixed32=5;var o=4294967296,s=1/o,u="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function a(t){return t.type===e.Bytes?t.readVarint()+t.pos:t.pos+1}function h(t,n,i){return i?4294967296*n+(t>>>0):4294967296*(n>>>0)+(t>>>0)}function f(t,n,i){var r=n<=16383?1:n<=2097151?2:n<=268435455?3:Math.floor(Math.log(n)/(7*Math.LN2));i.realloc(r);for(var e=i.pos-1;e>=t;e--)i.buf[e+r]=i.buf[e]}function c(t,n){for(var i=0;i<t.length;i++)n.writeVarint(t[i])}function l(t,n){for(var i=0;i<t.length;i++)n.writeSVarint(t[i])}function v(t,n){for(var i=0;i<t.length;i++)n.writeFloat(t[i])}function d(t,n){for(var i=0;i<t.length;i++)n.writeDouble(t[i])}function p(t,n){for(var i=0;i<t.length;i++)n.writeBoolean(t[i])}function y(t,n){for(var i=0;i<t.length;i++)n.writeFixed32(t[i])}function m(t,n){for(var i=0;i<t.length;i++)n.writeSFixed32(t[i])}function w(t,n){for(var i=0;i<t.length;i++)n.writeFixed64(t[i])}function g(t,n){for(var i=0;i<t.length;i++)n.writeSFixed64(t[i])}function b(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16)+16777216*t[n+3]}function x(t,n,i){t[i]=n,t[i+1]=n>>>8,t[i+2]=n>>>16,t[i+3]=n>>>24}function M(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16)+(t[n+3]<<24)}e.prototype={destroy:function(){this.buf=null},readFields:function(t,n,i){for(i=i||this.length;this.pos<i;){var r=this.readVarint(),e=r>>3,o=this.pos;this.type=7&r,t(e,n,this),this.pos===o&&this.skip(r)}return n},readMessage:function(t,n){return this.readFields(t,n,this.readVarint()+this.pos)},readFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=M(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=b(this.buf,this.pos)+b(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=b(this.buf,this.pos)+M(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var n,i,r=this.buf;return n=127&(i=r[this.pos++]),i<128?n:(n|=(127&(i=r[this.pos++]))<<7,i<128?n:(n|=(127&(i=r[this.pos++]))<<14,i<128?n:(n|=(127&(i=r[this.pos++]))<<21,i<128?n:function(t,n,i){var r,e,o=i.buf;if(e=o[i.pos++],r=(112&e)>>4,e<128)return h(t,r,n);if(e=o[i.pos++],r|=(127&e)<<3,e<128)return h(t,r,n);if(e=o[i.pos++],r|=(127&e)<<10,e<128)return h(t,r,n);if(e=o[i.pos++],r|=(127&e)<<17,e<128)return h(t,r,n);if(e=o[i.pos++],r|=(127&e)<<24,e<128)return h(t,r,n);if(e=o[i.pos++],r|=(1&e)<<31,e<128)return h(t,r,n);throw new Error("Expected varint not more than 10 bytes")}(n|=(15&(i=r[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,n=this.pos;return this.pos=t,t-n>=12&&u?function(t,n,i){return u.decode(t.subarray(n,i))}(this.buf,n,t):function(t,n,i){var r="",e=n;for(;e<i;){var o,s,u,a=t[e],h=null,f=a>239?4:a>223?3:a>191?2:1;if(e+f>i)break;1===f?a<128&&(h=a):2===f?128==(192&(o=t[e+1]))&&(h=(31&a)<<6|63&o)<=127&&(h=null):3===f?(o=t[e+1],s=t[e+2],128==(192&o)&&128==(192&s)&&((h=(15&a)<<12|(63&o)<<6|63&s)<=2047||h>=55296&&h<=57343)&&(h=null)):4===f&&(o=t[e+1],s=t[e+2],u=t[e+3],128==(192&o)&&128==(192&s)&&128==(192&u)&&((h=(15&a)<<18|(63&o)<<12|(63&s)<<6|63&u)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,f=1):h>65535&&(h-=65536,r+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),r+=String.fromCharCode(h),e+=f}return r}(this.buf,n,t)},readBytes:function(){var t=this.readVarint()+this.pos,n=this.buf.subarray(this.pos,t);return this.pos=t,n},readPackedVarint:function(t,n){if(this.type!==e.Bytes)return t.push(this.readVarint(n));var i=a(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(n));return t},readPackedSVarint:function(t){if(this.type!==e.Bytes)return t.push(this.readSVarint());var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==e.Bytes)return t.push(this.readBoolean());var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==e.Bytes)return t.push(this.readFloat());var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==e.Bytes)return t.push(this.readDouble());var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==e.Bytes)return t.push(this.readFixed32());var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==e.Bytes)return t.push(this.readSFixed32());var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==e.Bytes)return t.push(this.readFixed64());var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==e.Bytes)return t.push(this.readSFixed64());var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readSFixed64());return t},skip:function(t){var n=7&t;if(n===e.Varint)for(;this.buf[this.pos++]>127;);else if(n===e.Bytes)this.pos=this.readVarint()+this.pos;else if(n===e.Fixed32)this.pos+=4;else{if(n!==e.Fixed64)throw new Error("Unimplemented type: "+n);this.pos+=8}},writeTag:function(t,n){this.writeVarint(t<<3|n)},realloc:function(t){for(var n=this.length||16;n<this.pos+t;)n*=2;if(n!==this.length){var i=new Uint8Array(n);i.set(this.buf),this.buf=i,this.length=n}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),x(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),x(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),x(this.buf,-1&t,this.pos),x(this.buf,Math.floor(t*s),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),x(this.buf,-1&t,this.pos),x(this.buf,Math.floor(t*s),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,n){var i,r;t>=0?(i=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");n.realloc(10),function(t,n,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,n),function(t,n){var i=(7&t)<<4;if(n.buf[n.pos++]|=i|((t>>>=3)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(n.buf[n.pos++]=127&t|((t>>>=7)?128:0),!t)return;n.buf[n.pos++]=127&t}(r,n)}(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 n=this.pos;this.pos=function(t,n,i){for(var r,e,o=0;o<n.length;o++){if((r=n.charCodeAt(o))>55295&&r<57344){if(!e){r>56319||o+1===n.length?(t[i++]=239,t[i++]=191,t[i++]=189):e=r;continue}if(r<56320){t[i++]=239,t[i++]=191,t[i++]=189,e=r;continue}r=e-55296<<10|r-56320|65536,e=null}else e&&(t[i++]=239,t[i++]=191,t[i++]=189,e=null);r<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(r<65536?t[i++]=r>>12|224:(t[i++]=r>>18|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128),t[i++]=63&r|128)}return i}(this.buf,t,this.pos);var i=this.pos-n;i>=128&&f(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var n=t.length;this.writeVarint(n),this.realloc(n);for(var i=0;i<n;i++)this.buf[this.pos++]=t[i]},writeRawMessage:function(t,n){this.pos++;var i=this.pos;t(n,this);var r=this.pos-i;r>=128&&f(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,n,i){this.writeTag(t,e.Bytes),this.writeRawMessage(n,i)},writePackedVarint:function(t,n){n.length&&this.writeMessage(t,c,n)},writePackedSVarint:function(t,n){n.length&&this.writeMessage(t,l,n)},writePackedBoolean:function(t,n){n.length&&this.writeMessage(t,p,n)},writePackedFloat:function(t,n){n.length&&this.writeMessage(t,v,n)},writePackedDouble:function(t,n){n.length&&this.writeMessage(t,d,n)},writePackedFixed32:function(t,n){n.length&&this.writeMessage(t,y,n)},writePackedSFixed32:function(t,n){n.length&&this.writeMessage(t,m,n)},writePackedFixed64:function(t,n){n.length&&this.writeMessage(t,w,n)},writePackedSFixed64:function(t,n){n.length&&this.writeMessage(t,g,n)},writeBytesField:function(t,n){this.writeTag(t,e.Bytes),this.writeBytes(n)},writeFixed32Field:function(t,n){this.writeTag(t,e.Fixed32),this.writeFixed32(n)},writeSFixed32Field:function(t,n){this.writeTag(t,e.Fixed32),this.writeSFixed32(n)},writeFixed64Field:function(t,n){this.writeTag(t,e.Fixed64),this.writeFixed64(n)},writeSFixed64Field:function(t,n){this.writeTag(t,e.Fixed64),this.writeSFixed64(n)},writeVarintField:function(t,n){this.writeTag(t,e.Varint),this.writeVarint(n)},writeSVarintField:function(t,n){this.writeTag(t,e.Varint),this.writeSVarint(n)},writeStringField:function(t,n){this.writeTag(t,e.Bytes),this.writeString(n)},writeFloatField:function(t,n){this.writeTag(t,e.Fixed32),this.writeFloat(n)},writeDoubleField:function(t,n){this.writeTag(t,e.Fixed64),this.writeDouble(n)},writeBooleanField:function(t,n){this.writeVarintField(t,Boolean(n))}}},72:function(t){t.exports=function(){"use strict";function t(t,r,e,o,s){!function t(i,r,e,o,s){for(;o>e;){if(o-e>600){var u=o-e+1,a=r-e+1,h=Math.log(u),f=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*f*(u-f)/u)*(a-u/2<0?-1:1);t(i,r,Math.max(e,Math.floor(r-a*f/u+c)),Math.min(o,Math.floor(r+(u-a)*f/u+c)),s)}var l=i[r],v=e,d=o;for(n(i,e,r),s(i[o],l)>0&&n(i,e,o);v<d;){for(n(i,v,d),v++,d--;s(i[v],l)<0;)v++;for(;s(i[d],l)>0;)d--}0===s(i[e],l)?n(i,e,d):n(i,++d,o),d<=r&&(e=d+1),r<=d&&(o=d-1)}}(t,r,e||0,o||t.length-1,s||i)}function n(t,n,i){var r=t[n];t[n]=t[i],t[i]=r}function i(t,n){return t<n?-1:t>n?1:0}var r=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 e(t,n,i){if(!i)return n.indexOf(t);for(var r=0;r<n.length;r++)if(i(t,n[r]))return r;return-1}function o(t,n){s(t,0,t.children.length,n,t)}function s(t,n,i,r,e){e||(e=d(null)),e.minX=1/0,e.minY=1/0,e.maxX=-1/0,e.maxY=-1/0;for(var o=n;o<i;o++){var s=t.children[o];u(e,t.leaf?r(s):s)}return e}function u(t,n){return t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY),t}function a(t,n){return t.minX-n.minX}function h(t,n){return t.minY-n.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function v(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.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 p(n,i,r,e,o){for(var s=[i,r];s.length;)if(!((r=s.pop())-(i=s.pop())<=e)){var u=i+Math.ceil((r-i)/e/2)*e;t(n,u,i,r,o),s.push(i,u,u,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var n=this.data,i=[];if(!v(t,n))return i;for(var r=this.toBBox,e=[];n;){for(var o=0;o<n.children.length;o++){var s=n.children[o],u=n.leaf?r(s):s;v(t,u)&&(n.leaf?i.push(s):l(t,u)?this._all(s,i):e.push(s))}n=e.pop()}return i},r.prototype.collides=function(t){var n=this.data;if(!v(t,n))return!1;for(var i=[];n;){for(var r=0;r<n.children.length;r++){var e=n.children[r],o=n.leaf?this.toBBox(e):e;if(v(t,o)){if(n.leaf||l(t,o))return!0;i.push(e)}}n=i.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var n=0;n<t.length;n++)this.insert(t[n]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,n){if(!t)return this;for(var i,r,o,s=this.data,u=this.toBBox(t),a=[],h=[];s||a.length;){if(s||(s=a.pop(),r=a[a.length-1],i=h.pop(),o=!0),s.leaf){var f=e(t,s.children,n);if(-1!==f)return s.children.splice(f,1),a.push(s),this._condense(a),this}o||s.leaf||!l(s,u)?r?(i++,s=r.children[i],o=!1):s=null:(a.push(s),h.push(i),i=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,n){return t.minX-n.minX},r.prototype.compareMinY=function(t,n){return t.minY-n.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,n){for(var i=[];t;)t.leaf?n.push.apply(n,t.children):i.push.apply(i,t.children),t=i.pop();return n},r.prototype._build=function(t,n,i,r){var e,s=i-n+1,u=this._maxEntries;if(s<=u)return o(e=d(t.slice(n,i+1)),this.toBBox),e;r||(r=Math.ceil(Math.log(s)/Math.log(u)),u=Math.ceil(s/Math.pow(u,r-1))),(e=d([])).leaf=!1,e.height=r;var a=Math.ceil(s/u),h=a*Math.ceil(Math.sqrt(u));p(t,n,i,h,this.compareMinX);for(var f=n;f<=i;f+=h){var c=Math.min(f+h-1,i);p(t,f,c,a,this.compareMinY);for(var l=f;l<=c;l+=a){var v=Math.min(l+a-1,c);e.children.push(this._build(t,l,v,r-1))}}return o(e,this.toBBox),e},r.prototype._chooseSubtree=function(t,n,i,r){for(;r.push(n),!n.leaf&&r.length-1!==i;){for(var e=1/0,o=1/0,s=void 0,u=0;u<n.children.length;u++){var a=n.children[u],h=f(a),c=(l=t,v=a,(Math.max(v.maxX,l.maxX)-Math.min(v.minX,l.minX))*(Math.max(v.maxY,l.maxY)-Math.min(v.minY,l.minY))-h);c<o?(o=c,e=h<e?h:e,s=a):c===o&&h<e&&(e=h,s=a)}n=s||n.children[0]}var l,v;return n},r.prototype._insert=function(t,n,i){var r=i?t:this.toBBox(t),e=[],o=this._chooseSubtree(r,this.data,n,e);for(o.children.push(t),u(o,r);n>=0&&e[n].children.length>this._maxEntries;)this._split(e,n),n--;this._adjustParentBBoxes(r,e,n)},r.prototype._split=function(t,n){var i=t[n],r=i.children.length,e=this._minEntries;this._chooseSplitAxis(i,e,r);var s=this._chooseSplitIndex(i,e,r),u=d(i.children.splice(s,i.children.length-s));u.height=i.height,u.leaf=i.leaf,o(i,this.toBBox),o(u,this.toBBox),n?t[n-1].children.push(u):this._splitRoot(i,u)},r.prototype._splitRoot=function(t,n){this.data=d([t,n]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,n,i){for(var r,e,o,u,a,h,c,l=1/0,v=1/0,d=n;d<=i-n;d++){var p=s(t,0,d,this.toBBox),y=s(t,d,i,this.toBBox),m=(e=p,o=y,u=void 0,a=void 0,h=void 0,c=void 0,u=Math.max(e.minX,o.minX),a=Math.max(e.minY,o.minY),h=Math.min(e.maxX,o.maxX),c=Math.min(e.maxY,o.maxY),Math.max(0,h-u)*Math.max(0,c-a)),w=f(p)+f(y);m<l?(l=m,r=d,v=w<v?w:v):m===l&&w<v&&(v=w,r=d)}return r||i-n},r.prototype._chooseSplitAxis=function(t,n,i){var r=t.leaf?this.compareMinX:a,e=t.leaf?this.compareMinY:h;this._allDistMargin(t,n,i,r)<this._allDistMargin(t,n,i,e)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,n,i,r){t.children.sort(r);for(var e=this.toBBox,o=s(t,0,n,e),a=s(t,i-n,i,e),h=c(o)+c(a),f=n;f<i-n;f++){var l=t.children[f];u(o,t.leaf?e(l):l),h+=c(o)}for(var v=i-n-1;v>=n;v--){var d=t.children[v];u(a,t.leaf?e(d):d),h+=c(a)}return h},r.prototype._adjustParentBBoxes=function(t,n,i){for(var r=i;r>=0;r--)u(n[r],t)},r.prototype._condense=function(t){for(var n=t.length-1,i=void 0;n>=0;n--)0===t[n].children.length?n>0?(i=t[n-1].children).splice(i.indexOf(t[n]),1):this.clear():o(t[n],this.toBBox)},r}()},760:function(t){var n=function(t){"use strict";var n,i=Object.prototype,r=i.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",s=e.asyncIterator||"@@asyncIterator",u=e.toStringTag||"@@toStringTag";function a(t,n,i){return Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{a({},"")}catch(t){a=function(t,n,i){return t[n]=i}}function h(t,n,i,r){var e=n&&n.prototype instanceof y?n:y,o=Object.create(e.prototype),s=new T(r||[]);return o._invoke=function(t,n,i){var r=c;return function(e,o){if(r===v)throw new Error("Generator is already running");if(r===d){if("throw"===e)throw o;return P()}for(i.method=e,i.arg=o;;){var s=i.delegate;if(s){var u=O(s,i);if(u){if(u===p)continue;return u}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===c)throw r=d,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=v;var a=f(t,n,i);if("normal"===a.type){if(r=i.done?d:l,a.arg===p)continue;return{value:a.arg,done:i.done}}"throw"===a.type&&(r=d,i.method="throw",i.arg=a.arg)}}}(t,i,s),o}function f(t,n,i){try{return{type:"normal",arg:t.call(n,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var c="suspendedStart",l="suspendedYield",v="executing",d="completed",p={};function y(){}function m(){}function w(){}var g={};a(g,o,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(A([])));x&&x!==i&&r.call(x,o)&&(g=x);var M=w.prototype=y.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(n){a(t,n,(function(t){return this._invoke(n,t)}))}))}function S(t,n){function i(e,o,s,u){var a=f(t[e],t,o);if("throw"!==a.type){var h=a.arg,c=h.value;return c&&"object"==typeof c&&r.call(c,"__await")?n.resolve(c.__await).then((function(t){i("next",t,s,u)}),(function(t){i("throw",t,s,u)})):n.resolve(c).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,u)}))}u(a.arg)}var e;this._invoke=function(t,r){function o(){return new n((function(n,e){i(t,r,n,e)}))}return e=e?e.then(o,o):o()}}function O(t,i){var r=t.iterator[i.method];if(r===n){if(i.delegate=null,"throw"===i.method){if(t.iterator.return&&(i.method="return",i.arg=n,O(t,i),"throw"===i.method))return p;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var e=f(r,t.iterator,i.arg);if("throw"===e.type)return i.method="throw",i.arg=e.arg,i.delegate=null,p;var o=e.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=n),i.delegate=null,p):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,p)}function j(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function E(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function A(t){if(t){var i=t[o];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,s=function i(){for(;++e<t.length;)if(r.call(t,e))return i.value=t[e],i.done=!1,i;return i.value=n,i.done=!0,i};return s.next=s}}return{next:P}}function P(){return{value:n,done:!0}}return m.prototype=w,a(M,"constructor",w),a(w,"constructor",m),m.displayName=a(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===m||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,a(t,u,"GeneratorFunction")),t.prototype=Object.create(M),t},t.awrap=function(t){return{__await:t}},_(S.prototype),a(S.prototype,s,(function(){return this})),t.AsyncIterator=S,t.async=function(n,i,r,e,o){void 0===o&&(o=Promise);var s=new S(h(n,i,r,e),o);return t.isGeneratorFunction(i)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},_(M),a(M,u,"Generator"),a(M,o,(function(){return this})),a(M,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var n=[];for(var i in t)n.push(i);return n.reverse(),function i(){for(;n.length;){var r=n.pop();if(r in t)return i.value=r,i.done=!1,i}return i.done=!0,i}},t.values=A,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(E),!t)for(var i in this)"t"===i.charAt(0)&&r.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function e(r,e){return u.type="throw",u.arg=t,i.next=r,e&&(i.method="next",i.arg=n),!!e}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],u=s.completion;if("root"===s.tryLoc)return e("end");if(s.tryLoc<=this.prev){var a=r.call(s,"catchLoc"),h=r.call(s,"finallyLoc");if(a&&h){if(this.prev<s.catchLoc)return e(s.catchLoc,!0);if(this.prev<s.finallyLoc)return e(s.finallyLoc)}else if(a){if(this.prev<s.catchLoc)return e(s.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return e(s.finallyLoc)}}}},abrupt:function(t,n){for(var i=this.tryEntries.length-1;i>=0;--i){var e=this.tryEntries[i];if(e.tryLoc<=this.prev&&r.call(e,"finallyLoc")&&this.prev<e.finallyLoc){var o=e;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=n,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(s)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),p},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),E(i),p}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc===t){var r=i.completion;if("throw"===r.type){var e=r.arg;E(i)}return e}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,r){return this.delegate={iterator:A(t),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=n),p}},t}(t.exports);try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},617:function(t,n,i){const r=i(279);t.exports=function(t,n,i){const e=i&&i.debug||!1,o=i&&i.startIndex||0;e&&console.log("starting findTagByName with",n," and ",i);const s=r(t,`<${n}[ >]`,o);if(e&&console.log("start:",s),-1===s)return;const u=t.slice(s+n.length);let a=r(u,"[ /]"+n+">",0);const h=-1===a;h&&(a=r(u,"[ /]>",0));const f=s+n.length+a+1+(h?0:n.length)+1;if(e&&console.log("end:",f),-1===f)return;const c=t.slice(s,f);let l;return l=h?null:c.slice(c.indexOf(">")+1,c.lastIndexOf("<")),{inner:l,outer:c,start:s,end:f}}},51:function(t,n,i){const r=i(617);t.exports=function(t,n,i){const e=[],o=i&&i.debug||!1;let s,u=i&&i.startIndex||0;for(;s=r(t,n,{debug:o,startIndex:u});)u=s.end,e.push(s);return o&&console.log("findTagsByName found",e.length,"tags"),e}},802:function(t){t.exports=function(t,n,i){const r=i&&i.debug||!1;r&&console.log("getting "+n+" in "+t);const e="object"==typeof t?t.outer:t,o=`${n}\\="([^"]*)"`;r&&console.log("pattern:",o);const s=new RegExp(o).exec(e);if(r&&console.log("match:",s),s)return s[1]}},279:function(t){t.exports=function(t,n,i){const r=new RegExp(n).exec(t.slice(i));return r?i+r.index:-1}},518:function(t){"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}},692:function(t,n,i){"use strict";function r(t){var n=this;if(n instanceof r||(n=new r),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){n.push(t)}));else if(arguments.length>0)for(var i=0,e=arguments.length;i<e;i++)n.push(arguments[i]);return n}function e(t,n,i){var r=n===t.head?new u(i,null,n,t):new u(i,n,n.next,t);return null===r.next&&(t.tail=r),null===r.prev&&(t.head=r),t.length++,r}function o(t,n){t.tail=new u(n,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function s(t,n){t.head=new u(n,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function u(t,n,i,r){if(!(this instanceof u))return new u(t,n,i,r);this.list=r,this.value=t,n?(n.next=this,this.prev=n):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}t.exports=r,r.Node=u,r.create=r,r.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var n=t.next,i=t.prev;return n&&(n.prev=i),i&&(i.next=n),t===this.head&&(this.head=n),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,n},r.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var n=this.head;t.list=this,t.next=n,n&&(n.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},r.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var n=this.tail;t.list=this,t.prev=n,n&&(n.next=t),this.tail=t,this.head||(this.head=t),this.length++}},r.prototype.push=function(){for(var t=0,n=arguments.length;t<n;t++)o(this,arguments[t]);return this.length},r.prototype.unshift=function(){for(var t=0,n=arguments.length;t<n;t++)s(this,arguments[t]);return this.length},r.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},r.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},r.prototype.forEach=function(t,n){n=n||this;for(var i=this.head,r=0;null!==i;r++)t.call(n,i.value,r,this),i=i.next},r.prototype.forEachReverse=function(t,n){n=n||this;for(var i=this.tail,r=this.length-1;null!==i;r--)t.call(n,i.value,r,this),i=i.prev},r.prototype.get=function(t){for(var n=0,i=this.head;null!==i&&n<t;n++)i=i.next;if(n===t&&null!==i)return i.value},r.prototype.getReverse=function(t){for(var n=0,i=this.tail;null!==i&&n<t;n++)i=i.prev;if(n===t&&null!==i)return i.value},r.prototype.map=function(t,n){n=n||this;for(var i=new r,e=this.head;null!==e;)i.push(t.call(n,e.value,this)),e=e.next;return i},r.prototype.mapReverse=function(t,n){n=n||this;for(var i=new r,e=this.tail;null!==e;)i.push(t.call(n,e.value,this)),e=e.prev;return i},r.prototype.reduce=function(t,n){var i,r=this.head;if(arguments.length>1)i=n;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,i=this.head.value}for(var e=0;null!==r;e++)i=t(i,r.value,e),r=r.next;return i},r.prototype.reduceReverse=function(t,n){var i,r=this.tail;if(arguments.length>1)i=n;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,i=this.tail.value}for(var e=this.length-1;null!==r;e--)i=t(i,r.value,e),r=r.prev;return i},r.prototype.toArray=function(){for(var t=new Array(this.length),n=0,i=this.head;null!==i;n++)t[n]=i.value,i=i.next;return t},r.prototype.toArrayReverse=function(){for(var t=new Array(this.length),n=0,i=this.tail;null!==i;n++)t[n]=i.value,i=i.prev;return t},r.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var i=new r;if(n<t||n<0)return i;t<0&&(t=0),n>this.length&&(n=this.length);for(var e=0,o=this.head;null!==o&&e<t;e++)o=o.next;for(;null!==o&&e<n;e++,o=o.next)i.push(o.value);return i},r.prototype.sliceReverse=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var i=new r;if(n<t||n<0)return i;t<0&&(t=0),n>this.length&&(n=this.length);for(var e=this.length,o=this.tail;null!==o&&e>n;e--)o=o.prev;for(;null!==o&&e>t;e--,o=o.prev)i.push(o.value);return i},r.prototype.splice=function(t,n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,r=this.head;null!==r&&i<t;i++)r=r.next;var o=[];for(i=0;r&&i<n;i++)o.push(r.value),r=this.removeNode(r);null===r&&(r=this.tail),r!==this.head&&r!==this.tail&&(r=r.prev);for(i=0;i<(arguments.length<=2?0:arguments.length-2);i++)r=e(this,r,i+2<2||arguments.length<=i+2?void 0:arguments[i+2]);return o},r.prototype.reverse=function(){for(var t=this.head,n=this.tail,i=t;null!==i;i=i.prev){var r=i.prev;i.prev=i.next,i.next=r}return this.head=n,this.tail=t,this};try{i(518)(r)}catch(t){}},752:function(){},640:function(){},630:function(){},429:function(t,n,i){"use strict";function r(){return function(){throw new Error("Unimplemented abstract method.")}()}i.d(n,{default:function(){return TI}});var e=0;function o(t){return t.ol_uid||(t.ol_uid=String(++e))}var s,u="6.15.1",a=(s=function(t,n){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}s(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),h=function(t){function n(n){var i=this,r="Assertion failed. See https://openlayers.org/en/"+("v"+u.split("-")[0])+"/doc/errors/#"+n+" for details.";return(i=t.call(this,r)||this).code=n,i.name="AssertionError",i.message=r,i}return a(n,t),n}(Error);function f(t){t.stopPropagation()}var c=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}(),l="propertychange",v=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();function d(t,n,i){for(var r,e,o=i||p,s=0,u=t.length,a=!1;s<u;)(e=+o(t[r=s+(u-s>>1)],n))<0?s=r+1:(u=r,a=!e);return a?s:~s}function p(t,n){return t>n?1:t<n?-1:0}function y(t,n){return t.indexOf(n)>=0}function m(t,n,i){var r=t.length;if(t[0]<=n)return 0;if(n<=t[r-1])return r-1;var e=void 0;if(i>0){for(e=1;e<r;++e)if(t[e]<n)return e-1}else if(i<0){for(e=1;e<r;++e)if(t[e]<=n)return e}else for(e=1;e<r;++e){if(t[e]==n)return e;if(t[e]<n)return"function"==typeof i?i(n,t[e-1],t[e])>0?e-1:e:t[e-1]-n<n-t[e]?e-1:e}return r-1}function w(t,n,i){for(;n<i;){var r=t[n];t[n]=t[i],t[i]=r,++n,--i}}function g(t,n){for(var i=Array.isArray(n)?n:[n],r=i.length,e=0;e<r;e++)t[t.length]=i[e]}function b(t,n){for(var i,r=t.length>>>0,e=0;e<r;e++)if(n(i=t[e],e,t))return i;return null}function x(t,n){var i=t.length;if(i!==n.length)return!1;for(var r=0;r<i;r++)if(t[r]!==n[r])return!1;return!0}function M(t,n){var i;return!t.every((function(r,e){return i=e,!n(r,e,t)}))?i:-1}function _(t,n,i){var r=n||p;return t.every((function(n,e){if(0===e)return!0;var o=r(t[e-1],n);return!(o>0||i&&0===o)}))}function S(){return!0}function O(){return!1}function j(){}function E(t){var n,i,r,e=!1;return function(){var o=Array.prototype.slice.call(arguments);return e&&this===r&&x(o,i)||(e=!0,r=this,i=o,n=t.apply(this,arguments)),n}}function T(t){return function(){var n;try{n=t()}catch(t){return Promise.reject(t)}return n instanceof Promise?n:Promise.resolve(n)}()}var A="function"==typeof Object.assign?Object.assign:function(t,n){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),r=1,e=arguments.length;r<e;++r){var o=arguments[r];if(null!=o)for(var s in o)o.hasOwnProperty(s)&&(i[s]=o[s])}return i};function P(t){for(var n in t)delete t[n]}var C="function"==typeof Object.values?Object.values:function(t){var n=[];for(var i in t)n.push(t[i]);return n};function k(t){var n;for(n in t)return!1;return!n}var I=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),N=function(t){function n(n){var i=t.call(this)||this;return i.t=n,i._=null,i.S=null,i.O=null,i}return I(n,t),n.prototype.addEventListener=function(t,n){if(t&&n){var i=this.O||(this.O={}),r=i[t]||(i[t]=[]);-1===r.indexOf(n)&&r.push(n)}},n.prototype.dispatchEvent=function(t){var n="string"==typeof t,i=n?t:t.type,r=this.O&&this.O[i];if(r){var e=n?new c(t):t;e.target||(e.target=this.t||this);var o,s=this.S||(this.S={}),u=this._||(this._={});i in s||(s[i]=0,u[i]=0),++s[i];for(var a=0,h=r.length;a<h;++a)if(!1===(o="handleEvent"in r[a]?r[a].handleEvent(e):r[a].call(this,e))||e.propagationStopped){o=!1;break}if(0==--s[i]){var f=u[i];for(delete u[i];f--;)this.removeEventListener(i,j);delete s[i]}return o}},n.prototype.disposeInternal=function(){this.O&&P(this.O)},n.prototype.getListeners=function(t){return this.O&&this.O[t]||void 0},n.prototype.hasListener=function(t){return!!this.O&&(t?t in this.O:Object.keys(this.O).length>0)},n.prototype.removeEventListener=function(t,n){var i=this.O&&this.O[t];if(i){var r=i.indexOf(n);-1!==r&&(this._&&t in this._?(i[r]=j,++this._[t]):(i.splice(r,1),0===i.length&&delete this.O[t]))}},n}(v),L="change",z="error",R="contextmenu",F="click",G="dblclick",D="dragenter",q="dragover",U="drop",B="keydown",X="keypress",V="load",W="resize",Y="touchmove",Z="wheel";function $(t,n,i,r,e){if(r&&r!==t&&(i=i.bind(r)),e){var o=i;i=function(){t.removeEventListener(n,i),o.apply(this,arguments)}}var s={target:t,type:n,listener:i};return t.addEventListener(n,i),s}function K(t,n,i,r){return $(t,n,i,r,!0)}function H(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),P(t))}var J=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Q=function(t){function n(){var n=t.call(this)||this;return n.on=n.onInternal,n.once=n.onceInternal,n.un=n.unInternal,n.T=0,n}return J(n,t),n.prototype.changed=function(){++this.T,this.dispatchEvent(L)},n.prototype.getRevision=function(){return this.T},n.prototype.onInternal=function(t,n){if(Array.isArray(t)){for(var i=t.length,r=new Array(i),e=0;e<i;++e)r[e]=$(this,t[e],n);return r}return $(this,t,n)},n.prototype.onceInternal=function(t,n){var i;if(Array.isArray(t)){var r=t.length;i=new Array(r);for(var e=0;e<r;++e)i[e]=K(this,t[e],n)}else i=K(this,t,n);return n.ol_key=i,i},n.prototype.unInternal=function(t,n){var i=n.ol_key;if(i)tt(i);else if(Array.isArray(t))for(var r=0,e=t.length;r<e;++r)this.removeEventListener(t[r],n);else this.removeEventListener(t,n)},n}(N);function tt(t){if(Array.isArray(t))for(var n=0,i=t.length;n<i;++n)H(t[n]);else H(t)}Q.prototype.on,Q.prototype.once,Q.prototype.un;var nt=Q,it=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rt=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.key=i,e.oldValue=r,e}return it(n,t),n}(c),et=function(t){function n(n){var i=t.call(this)||this;return i.on,i.once,i.un,o(i),i.A=null,void 0!==n&&i.setProperties(n),i}return it(n,t),n.prototype.get=function(t){var n;return this.A&&this.A.hasOwnProperty(t)&&(n=this.A[t]),n},n.prototype.getKeys=function(){return this.A&&Object.keys(this.A)||[]},n.prototype.getProperties=function(){return this.A&&A({},this.A)||{}},n.prototype.hasProperties=function(){return!!this.A},n.prototype.notify=function(t,n){var i;i="change:".concat(t),this.hasListener(i)&&this.dispatchEvent(new rt(i,t,n)),i=l,this.hasListener(i)&&this.dispatchEvent(new rt(i,t,n))},n.prototype.addChangeListener=function(t,n){this.addEventListener("change:".concat(t),n)},n.prototype.removeChangeListener=function(t,n){this.removeEventListener("change:".concat(t),n)},n.prototype.set=function(t,n,i){var r=this.A||(this.A={});if(i)r[t]=n;else{var e=r[t];r[t]=n,e!==n&&this.notify(t,e)}},n.prototype.setProperties=function(t,n){for(var i in t)this.set(i,t[i],n)},n.prototype.applyProperties=function(t){t.A&&A(this.A||(this.A={}),t.A)},n.prototype.unset=function(t,n){if(this.A&&t in this.A){var i=this.A[t];delete this.A[t],k(this.A)&&(this.A=null),n||this.notify(t,i)}},n}(nt),ot="add",st="remove",ut=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),at="length",ht=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.element=i,e.index=r,e}return ut(n,t),n}(c),ft=function(t){function n(n,i){var r=t.call(this)||this;r.on,r.once,r.un;var e=i||{};if(r.P=!!e.unique,r.C=n||[],r.P)for(var o=0,s=r.C.length;o<s;++o)r.R(r.C[o],o);return r.G(),r}return ut(n,t),n.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},n.prototype.extend=function(t){for(var n=0,i=t.length;n<i;++n)this.push(t[n]);return this},n.prototype.forEach=function(t){for(var n=this.C,i=0,r=n.length;i<r;++i)t(n[i],i,n)},n.prototype.getArray=function(){return this.C},n.prototype.item=function(t){return this.C[t]},n.prototype.getLength=function(){return this.get(at)},n.prototype.insertAt=function(t,n){this.P&&this.R(n),this.C.splice(t,0,n),this.G(),this.dispatchEvent(new ht(ot,n,t))},n.prototype.pop=function(){return this.removeAt(this.getLength()-1)},n.prototype.push=function(t){this.P&&this.R(t);var n=this.getLength();return this.insertAt(n,t),this.getLength()},n.prototype.remove=function(t){for(var n=this.C,i=0,r=n.length;i<r;++i)if(n[i]===t)return this.removeAt(i)},n.prototype.removeAt=function(t){var n=this.C[t];return this.C.splice(t,1),this.G(),this.dispatchEvent(new ht(st,n,t)),n},n.prototype.setAt=function(t,n){var i=this.getLength();if(t<i){this.P&&this.R(n,t);var r=this.C[t];this.C[t]=n,this.dispatchEvent(new ht(st,r,t)),this.dispatchEvent(new ht(ot,n,t))}else{for(var e=i;e<t;++e)this.insertAt(e,void 0);this.insertAt(t,n)}},n.prototype.G=function(){this.set(at,this.C.length)},n.prototype.R=function(t,n){for(var i=0,r=this.C.length;i<r;++i)if(this.C[i]===t&&i!==n)throw new h(58)},n}(et),ct=0,lt=1,vt=2,dt=3,pt=4;function yt(t){return Math.pow(t,3)}function mt(t){return 1-yt(1-t)}function wt(t){return 3*t*t-2*t*t*t}function gt(t){return t}var bt=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xt=function(t){function n(n,i,r){var e=t.call(this)||this,o=r||{};return e.tileCoord=n,e.state=i,e.interimTile=null,e.key="",e.D=void 0===o.transition?250:o.transition,e.q={},e.interpolate=!!o.interpolate,e}return bt(n,t),n.prototype.changed=function(){this.dispatchEvent(L)},n.prototype.release=function(){},n.prototype.getKey=function(){return this.key+"/"+this.tileCoord},n.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==vt)return this.D=0,t;t=t.interimTile}while(t);return this},n.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,n=this;do{if(t.getState()==vt){t.interimTile=null;break}t.getState()==lt?n=t:t.getState()==ct?n.interimTile=t.interimTile:n=t,t=n.interimTile}while(t)}},n.prototype.getTileCoord=function(){return this.tileCoord},n.prototype.getState=function(){return this.state},n.prototype.setState=function(t){if(this.state!==dt&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},n.prototype.load=function(){r()},n.prototype.getAlpha=function(t,n){if(!this.D)return 1;var i=this.q[t];if(i){if(-1===i)return 1}else i=n,this.q[t]=i;var r=n-i+1e3/60;return r>=this.D?1:yt(r/this.D)},n.prototype.inTransition=function(t){return!!this.D&&-1!==this.q[t]},n.prototype.endTransition=function(t){this.D&&(this.q[t]=-1)},n}(N),Mt=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_t=function(t){function n(n){var i=this,r=ct;return(i=t.call(this,n.tileCoord,r,{transition:n.transition,interpolate:n.interpolate})||this).U=n.loader,i.B=null,i.V=null,i.W=n.size||[256,256],i}return Mt(n,t),n.prototype.getSize=function(){return this.W},n.prototype.getData=function(){return this.B},n.prototype.getError=function(){return this.V},n.prototype.load=function(){if(this.state===ct||this.state===dt){this.state=lt,this.changed();var t=this;this.U().then((function(n){t.B=n,t.state=vt,t.changed()})).catch((function(n){t.V=n,t.state=dt,t.changed()}))}},n}(xt);function St(t,n){if(!t)throw new h(n)}var Ot=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function jt(t){return"function"==typeof t?t:(Array.isArray(t)?n=t:(St("function"==typeof t.getZIndex,41),n=[t]),function(){return n});var n}var Et=function(t){function n(n){var i=t.call(this)||this;if(i.on,i.once,i.un,i.$=void 0,i.K="geometry",i.H=null,i.tt=void 0,i.nt=null,i.addChangeListener(i.K,i.it),n)if("function"==typeof n.getSimplifiedGeometry){var r=n;i.setGeometry(r)}else{var e=n;i.setProperties(e)}return i}return Ot(n,t),n.prototype.clone=function(){var t=new n(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var r=this.getStyle();return r&&t.setStyle(r),t},n.prototype.getGeometry=function(){return this.get(this.K)},n.prototype.getId=function(){return this.$},n.prototype.getGeometryName=function(){return this.K},n.prototype.getStyle=function(){return this.H},n.prototype.getStyleFunction=function(){return this.tt},n.prototype.rt=function(){this.changed()},n.prototype.it=function(){this.nt&&(H(this.nt),this.nt=null);var t=this.getGeometry();t&&(this.nt=$(t,L,this.rt,this)),this.changed()},n.prototype.setGeometry=function(t){this.set(this.K,t)},n.prototype.setStyle=function(t){this.H=t,this.tt=t?jt(t):void 0,this.changed()},n.prototype.setId=function(t){this.$=t,this.changed()},n.prototype.setGeometryName=function(t){this.removeChangeListener(this.K,this.it),this.K=t,this.addChangeListener(this.K,this.it),this.it()},n}(et),Tt="XY",At="XYZ",Pt="XYM",Ct="XYZM",kt={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},It={9001:kt.METERS,9002:kt.FEET,9003:kt.USFEET,9101:kt.RADIANS,9102:kt.DEGREES};function Nt(t){return It[t]}var Lt={};Lt[kt.RADIANS]=6370997/(2*Math.PI),Lt[kt.DEGREES]=2*Math.PI*6370997/360,Lt[kt.FEET]=.3048,Lt[kt.METERS]=1,Lt[kt.USFEET]=1200/3937;var zt,Rt=kt,Ft="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",Gt=-1!==Ft.indexOf("firefox"),Dt=-1!==Ft.indexOf("safari")&&-1==Ft.indexOf("chrom"),qt=Dt&&!!(Ft.indexOf("version/15.4")>=0||Ft.match(/cpu (os|iphone os) 15_4 like mac os x/)),Ut=-1!==Ft.indexOf("webkit")&&-1==Ft.indexOf("edge"),Bt=-1!==Ft.indexOf("macintosh"),Xt="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Vt="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Wt="undefined"!=typeof Image&&Image.prototype.decode,Yt=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,n),window.removeEventListener("_",null,n)}catch(t){}return t}(),Zt=new Array(6);function $t(){return[1,0,0,1,0,0]}function Kt(t){return Jt(t,1,0,0,1,0,0)}function Ht(t,n){var i=t[0],r=t[1],e=t[2],o=t[3],s=t[4],u=t[5],a=n[0],h=n[1],f=n[2],c=n[3],l=n[4],v=n[5];return t[0]=i*a+e*h,t[1]=r*a+o*h,t[2]=i*f+e*c,t[3]=r*f+o*c,t[4]=i*l+e*v+s,t[5]=r*l+o*v+u,t}function Jt(t,n,i,r,e,o,s){return t[0]=n,t[1]=i,t[2]=r,t[3]=e,t[4]=o,t[5]=s,t}function Qt(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function tn(t,n){var i=n[0],r=n[1];return n[0]=t[0]*i+t[2]*r+t[4],n[1]=t[1]*i+t[3]*r+t[5],n}function nn(t,n){var i=Math.cos(n),r=Math.sin(n);return Ht(t,Jt(Zt,i,r,-r,i,0,0))}function rn(t,n,i){return Ht(t,Jt(Zt,n,0,0,i,0,0))}function en(t,n,i){return Jt(t,n,0,0,i,0,0)}function on(t,n,i){return Ht(t,Jt(Zt,1,0,0,1,n,i))}function sn(t,n,i,r,e,o,s,u){var a=Math.sin(o),h=Math.cos(o);return t[0]=r*h,t[1]=e*a,t[2]=-r*a,t[3]=e*h,t[4]=s*r*h-u*r*a+n,t[5]=s*e*a+u*e*h+i,t}function un(t,n){var i=an(n);St(0!==i,32);var r=n[0],e=n[1],o=n[2],s=n[3],u=n[4],a=n[5];return t[0]=s/i,t[1]=-e/i,t[2]=-o/i,t[3]=r/i,t[4]=(o*a-s*u)/i,t[5]=-(r*a-e*u)/i,t}function an(t){return t[0]*t[3]-t[1]*t[2]}function hn(t){var n="matrix("+t.join(", ")+")";if(Vt)return n;var i=zt||(zt=document.createElement("div"));return i.style.transform=n,i.style.transform}var fn=0,cn=1,ln=2,vn=4,dn=8,pn=16;function yn(t){for(var n=Sn(),i=0,r=t.length;i<r;++i)kn(n,t[i]);return n}function mn(t,n,i){return i?(i[0]=t[0]-n,i[1]=t[1]-n,i[2]=t[2]+n,i[3]=t[3]+n,i):[t[0]-n,t[1]-n,t[2]+n,t[3]+n]}function wn(t,n){return n?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):t.slice()}function gn(t,n,i){var r,e;return(r=n<t[0]?t[0]-n:t[2]<n?n-t[2]:0)*r+(e=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*e}function bn(t,n){return Mn(t,n[0],n[1])}function xn(t,n){return t[0]<=n[0]&&n[2]<=t[2]&&t[1]<=n[1]&&n[3]<=t[3]}function Mn(t,n,i){return t[0]<=n&&n<=t[2]&&t[1]<=i&&i<=t[3]}function _n(t,n){var i=t[0],r=t[1],e=t[2],o=t[3],s=n[0],u=n[1],a=fn;return s<i?a|=pn:s>e&&(a|=vn),u<r?a|=dn:u>o&&(a|=ln),a===fn&&(a=cn),a}function Sn(){return[1/0,1/0,-1/0,-1/0]}function On(t,n,i,r,e){return e?(e[0]=t,e[1]=n,e[2]=i,e[3]=r,e):[t,n,i,r]}function jn(t){return On(1/0,1/0,-1/0,-1/0,t)}function En(t,n){var i=t[0],r=t[1];return On(i,r,i,r,n)}function Tn(t,n,i,r,e){return Nn(jn(e),t,n,i,r)}function An(t,n){return t[0]==n[0]&&t[2]==n[2]&&t[1]==n[1]&&t[3]==n[3]}function Pn(t,n,i){return Math.abs(t[0]-n[0])<i&&Math.abs(t[2]-n[2])<i&&Math.abs(t[1]-n[1])<i&&Math.abs(t[3]-n[3])<i}function Cn(t,n){return n[0]<t[0]&&(t[0]=n[0]),n[2]>t[2]&&(t[2]=n[2]),n[1]<t[1]&&(t[1]=n[1]),n[3]>t[3]&&(t[3]=n[3]),t}function kn(t,n){n[0]<t[0]&&(t[0]=n[0]),n[0]>t[2]&&(t[2]=n[0]),n[1]<t[1]&&(t[1]=n[1]),n[1]>t[3]&&(t[3]=n[1])}function In(t,n){for(var i=0,r=n.length;i<r;++i)kn(t,n[i]);return t}function Nn(t,n,i,r,e){for(;i<r;i+=e)zn(t,n[i],n[i+1]);return t}function Ln(t,n){for(var i=0,r=n.length;i<r;++i)In(t,n[i]);return t}function zn(t,n,i){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],n),t[3]=Math.max(t[3],i)}function Rn(t,n){var i;return(i=n(Gn(t)))||(i=n(Dn(t)))||(i=n(Zn(t)))?i:(i=n(Yn(t)))||!1}function Fn(t){var n=0;return Hn(t)||(n=$n(t)*Vn(t)),n}function Gn(t){return[t[0],t[1]]}function Dn(t){return[t[2],t[1]]}function qn(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Un(t,n){var i;return"bottom-left"===n?i=Gn(t):"bottom-right"===n?i=Dn(t):"top-left"===n?i=Yn(t):"top-right"===n?i=Zn(t):St(!1,13),i}function Bn(t,n,i,r,e){var o=Xn(t,n,i,r),s=o[0],u=o[1],a=o[2],h=o[3],f=o[4],c=o[5],l=o[6],v=o[7];return On(Math.min(s,a,f,l),Math.min(u,h,c,v),Math.max(s,a,f,l),Math.max(u,h,c,v),e)}function Xn(t,n,i,r){var e=n*r[0]/2,o=n*r[1]/2,s=Math.cos(i),u=Math.sin(i),a=e*s,h=e*u,f=o*s,c=o*u,l=t[0],v=t[1];return[l-a+c,v-h-f,l-a-c,v-h+f,l+a-c,v+h+f,l+a+c,v+h-f,l-a+c,v-h-f]}function Vn(t){return t[3]-t[1]}function Wn(t,n,i){var r=i||[1/0,1/0,-1/0,-1/0];return Kn(t,n)?(t[0]>n[0]?r[0]=t[0]:r[0]=n[0],t[1]>n[1]?r[1]=t[1]:r[1]=n[1],t[2]<n[2]?r[2]=t[2]:r[2]=n[2],t[3]<n[3]?r[3]=t[3]:r[3]=n[3]):jn(r),r}function Yn(t){return[t[0],t[3]]}function Zn(t){return[t[2],t[3]]}function $n(t){return t[2]-t[0]}function Kn(t,n){return t[0]<=n[2]&&t[2]>=n[0]&&t[1]<=n[3]&&t[3]>=n[1]}function Hn(t){return t[2]<t[0]||t[3]<t[1]}function Jn(t,n){return n?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n):t}function Qn(t,n){var i=(t[2]-t[0])/2*(n-1),r=(t[3]-t[1])/2*(n-1);t[0]-=i,t[2]+=i,t[1]-=r,t[3]+=r}function ti(t,n,i){var r=!1,e=_n(t,n),o=_n(t,i);if(e===cn||o===cn)r=!0;else{var s=t[0],u=t[1],a=t[2],h=t[3],f=n[0],c=n[1],l=i[0],v=i[1],d=(v-c)/(l-f),p=void 0,y=void 0;o&ln&&!(e&ln)&&(r=(p=l-(v-h)/d)>=s&&p<=a),r||!(o&vn)||e&vn||(r=(y=v-(l-a)*d)>=u&&y<=h),r||!(o&dn)||e&dn||(r=(p=l-(v-u)/d)>=s&&p<=a),r||!(o&pn)||e&pn||(r=(y=v-(l-s)*d)>=u&&y<=h)}return r}function ni(t,n,i,r){var e=[];if(r>1)for(var o=t[2]-t[0],s=t[3]-t[1],u=0;u<r;++u)e.push(t[0]+o*u/r,t[1],t[2],t[1]+s*u/r,t[2]-o*u/r,t[3],t[0],t[3]-s*u/r);else e=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];n(e,e,2);for(var a=[],h=[],f=(u=0,e.length);u<f;u+=2)a.push(e[u]),h.push(e[u+1]);return function(t,n,i){return On(Math.min.apply(null,t),Math.min.apply(null,n),Math.max.apply(null,t),Math.max.apply(null,n),i)}(a,h,i)}function ii(t,n){var i=n.getExtent(),r=qn(t);if(n.canWrapX()&&(r[0]<i[0]||r[0]>=i[2])){var e=$n(i),o=Math.floor((r[0]-i[0])/e)*e;t[0]-=o,t[2]-=o}return t}function ri(t,n){if(n.canWrapX()){var i=n.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[i[0],t[1],i[2],t[3]]];ii(t,n);var r=$n(i);if($n(t)>r)return[[i[0],t[1],i[2],t[3]]];if(t[0]<i[0])return[[t[0]+r,t[1],i[2],t[3]],[i[0],t[1],t[2],t[3]]];if(t[2]>i[2])return[[t[0],t[1],i[2],t[3]],[i[0],t[1],t[2]-r,t[3]]]}return[t]}var ei=function(){function t(t){this.et=t.code,this.ot=t.units,this.st=void 0!==t.extent?t.extent:null,this.ut=void 0!==t.worldExtent?t.worldExtent:null,this.ht=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.ft=void 0!==t.global&&t.global,this.ct=!(!this.ft||!this.st),this.lt=t.getPointResolution,this.vt=null,this.dt=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.ct},t.prototype.getCode=function(){return this.et},t.prototype.getExtent=function(){return this.st},t.prototype.getUnits=function(){return this.ot},t.prototype.getMetersPerUnit=function(){return this.dt||Lt[this.ot]},t.prototype.getWorldExtent=function(){return this.ut},t.prototype.getAxisOrientation=function(){return this.ht},t.prototype.isGlobal=function(){return this.ft},t.prototype.setGlobal=function(t){this.ft=t,this.ct=!(!t||!this.st)},t.prototype.getDefaultTileGrid=function(){return this.vt},t.prototype.setDefaultTileGrid=function(t){this.vt=t},t.prototype.setExtent=function(t){this.st=t,this.ct=!(!this.ft||!t)},t.prototype.setWorldExtent=function(t){this.ut=t},t.prototype.setGetPointResolution=function(t){this.lt=t},t.prototype.getPointResolutionFunc=function(){return this.lt},t}();function oi(t,n,i){return Math.min(Math.max(t,n),i)}var si="cosh"in Math?Math.cosh:function(t){var n=Math.exp(t);return(n+1/n)/2},ui="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E};function ai(t,n,i,r,e,o){var s=e-i,u=o-r;if(0!==s||0!==u){var a=((t-i)*s+(n-r)*u)/(s*s+u*u);a>1?(i=e,r=o):a>0&&(i+=s*a,r+=u*a)}return hi(t,n,i,r)}function hi(t,n,i,r){var e=i-t,o=r-n;return e*e+o*o}function fi(t){for(var n=t.length,i=0;i<n;i++){for(var r=i,e=Math.abs(t[i][i]),o=i+1;o<n;o++){var s=Math.abs(t[o][i]);s>e&&(e=s,r=o)}if(0===e)return null;var u=t[r];t[r]=t[i],t[i]=u;for(var a=i+1;a<n;a++)for(var h=-t[a][i]/t[i][i],f=i;f<n+1;f++)i==f?t[a][f]=0:t[a][f]+=h*t[i][f]}for(var c=new Array(n),l=n-1;l>=0;l--){c[l]=t[l][n]/t[l][l];for(var v=l-1;v>=0;v--)t[v][n]-=t[v][l]*c[l]}return c}function ci(t){return 180*t/Math.PI}function li(t){return t*Math.PI/180}function vi(t,n){var i=t%n;return i*n<0?i+n:i}function di(t,n,i){return t+i*(n-t)}function pi(t,n){var i=Math.pow(10,n);return Math.round(t*i)/i}function yi(t,n){return Math.round(pi(t,n))}function mi(t,n){return Math.floor(pi(t,n))}function wi(t,n){return Math.ceil(pi(t,n))}var gi=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),bi=6378137,xi=Math.PI*bi,Mi=[-xi,-xi,xi,xi],_i=[-180,-85,180,85],Si=bi*Math.log(Math.tan(Math.PI/2)),Oi=function(t){function n(n){return t.call(this,{code:n,units:Rt.METERS,extent:Mi,global:!0,worldExtent:_i,getPointResolution:function(t,n){return t/si(n[1]/bi)}})||this}return gi(n,t),n}(ei),ji=[new Oi("EPSG:3857"),new Oi("EPSG:102100"),new Oi("EPSG:102113"),new Oi("EPSG:900913"),new Oi("http://www.opengis.net/def/crs/EPSG/0/3857"),new Oi("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Ei(t,n,i){var r=t.length,e=i>1?i:2,o=n;void 0===o&&(o=e>2?t.slice():new Array(r));for(var s=0;s<r;s+=e){o[s]=xi*t[s]/180;var u=bi*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));u>Si?u=Si:u<-Si&&(u=-Si),o[s+1]=u}return o}function Ti(t,n,i){var r=t.length,e=i>1?i:2,o=n;void 0===o&&(o=e>2?t.slice():new Array(r));for(var s=0;s<r;s+=e)o[s]=180*t[s]/xi,o[s+1]=360*Math.atan(Math.exp(t[s+1]/bi))/Math.PI-90;return o}var Ai=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Pi=6378137,Ci=[-180,-90,180,90],ki=Math.PI*Pi/180,Ii=function(t){function n(n,i){return t.call(this,{code:n,units:Rt.DEGREES,extent:Ci,axisOrientation:i,global:!0,metersPerUnit:ki,worldExtent:Ci})||this}return Ai(n,t),n}(ei),Ni=[new Ii("CRS:84"),new Ii("EPSG:4326","neu"),new Ii("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ii("urn:ogc:def:crs:OGC:2:84"),new Ii("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Ii("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ii("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],Li={};function zi(){Li={}}function Ri(t){return Li[t]||Li[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Fi(t,n){Li[t]=n}var Gi={};function Di(){Gi={}}function qi(t,n,i){var r=t.getCode(),e=n.getCode();r in Gi||(Gi[r]={}),Gi[r][e]=i}function Ui(t,n){var i;return t in Gi&&n in Gi[t]&&(i=Gi[t][n]),i}function Bi(t,n,i){var r=void 0!==i?t.toFixed(i):""+t,e=r.indexOf(".");return(e=-1===e?r.length:e)>n?r:new Array(1+n-e).join("0")+r}function Xi(t,n){for(var i=(""+t).split("."),r=(""+n).split("."),e=0;e<Math.max(i.length,r.length);e++){var o=parseInt(i[e]||"0",10),s=parseInt(r[e]||"0",10);if(o>s)return 1;if(s>o)return-1}return 0}function Vi(t,n){return t[0]+=+n[0],t[1]+=+n[1],t}function Wi(t,n){var i=n.getRadius(),r=n.getCenter(),e=r[0],o=r[1],s=t[0]-e,u=t[1]-o;0===s&&0===u&&(s=1);var a=Math.sqrt(s*s+u*u);return[e+i*s/a,o+i*u/a]}function Yi(t,n){var i,r,e=t[0],o=t[1],s=n[0],u=n[1],a=s[0],h=s[1],f=u[0],c=u[1],l=f-a,v=c-h,d=0===l&&0===v?0:(l*(e-a)+v*(o-h))/(l*l+v*v||0);return d<=0?(i=a,r=h):d>=1?(i=f,r=c):(i=a+d*l,r=h+d*v),[i,r]}function Zi(t,n,i){var r=vi(n+180,360)-180,e=Math.abs(3600*r),o=i||0,s=Math.pow(10,o),u=Math.floor(e/3600),a=Math.floor((e-3600*u)/60),h=e-3600*u-60*a;return(h=Math.ceil(h*s)/s)>=60&&(h=0,a+=1),a>=60&&(a=0,u+=1),u+"° "+Bi(a,2)+"′ "+Bi(h,2,o)+"″"+(0==r?"":" "+t.charAt(r<0?1:0))}function $i(t,n,i){return t?n.replace("{x}",t[0].toFixed(i)).replace("{y}",t[1].toFixed(i)):""}function Ki(t,n){for(var i=!0,r=t.length-1;r>=0;--r)if(t[r]!=n[r]){i=!1;break}return i}function Hi(t,n){var i=Math.cos(n),r=Math.sin(n),e=t[0]*i-t[1]*r,o=t[1]*i+t[0]*r;return t[0]=e,t[1]=o,t}function Ji(t,n){return t[0]*=n,t[1]*=n,t}function Qi(t,n){var i=t[0]-n[0],r=t[1]-n[1];return i*i+r*r}function tr(t,n){return Math.sqrt(Qi(t,n))}function nr(t,n){return Qi(t,Yi(t,n))}function ir(t,n){return $i(t,"{x}, {y}",n)}function rr(t,n){if(n.canWrapX()){var i=$n(n.getExtent()),r=er(t,n,i);r&&(t[0]-=r*i)}return t}function er(t,n,i){var r=n.getExtent(),e=0;if(n.canWrapX()&&(t[0]<r[0]||t[0]>r[2])){var o=i||$n(r);e=Math.floor((t[0]-r[0])/o)}return e}var or=6371008.8;function sr(t,n,i){var r=i||or,e=li(t[1]),o=li(n[1]),s=(o-e)/2,u=li(n[0]-t[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(u)*Math.sin(u)*Math.cos(e)*Math.cos(o);return 2*r*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function ur(t,n){for(var i=0,r=0,e=t.length;r<e-1;++r)i+=sr(t[r],t[r+1],n);return i}function ar(t,n){for(var i=0,r=t.length,e=t[r-1][0],o=t[r-1][1],s=0;s<r;s++){var u=t[s][0],a=t[s][1];i+=li(u-e)*(2+Math.sin(li(o))+Math.sin(li(a))),e=u,o=a}return i*n*n/2}function hr(t,n,i,r){var e=r||or,o=li(t[1]),s=li(t[0]),u=n/e,a=Math.asin(Math.sin(o)*Math.cos(u)+Math.cos(o)*Math.sin(u)*Math.cos(i));return[ci(s+Math.atan2(Math.sin(i)*Math.sin(u)*Math.cos(o),Math.cos(u)-Math.sin(o)*Math.sin(a))),ci(a)]}var fr=!0;function cr(t){fr=!(void 0===t||t)}function lr(t,n,i){var r;if(void 0!==n){for(var e=0,o=t.length;e<o;++e)n[e]=t[e];r=n}else r=t.slice();return r}function vr(t,n,i){if(void 0!==n&&t!==n){for(var r=0,e=t.length;r<e;++r)n[r]=t[r];t=n}return t}function dr(t){Fi(t.getCode(),t),qi(t,t,lr)}function pr(t){t.forEach(dr)}function yr(t){return"string"==typeof t?Ri(t):t||null}function mr(t,n,i,r){var e,o=(t=yr(t)).getPointResolutionFunc();if(o){if(e=o(n,i),r&&r!==t.getUnits())(u=t.getMetersPerUnit())&&(e=e*u/Lt[r])}else{var s=t.getUnits();if(s==Rt.DEGREES&&!r||r==Rt.DEGREES)e=n;else{var u,a=Or(t,yr("EPSG:4326"));if(a===vr&&s!==Rt.DEGREES)e=n*t.getMetersPerUnit();else{var h=[i[0]-n/2,i[1],i[0]+n/2,i[1],i[0],i[1]-n/2,i[0],i[1]+n/2];e=(sr((h=a(h,h,2)).slice(0,2),h.slice(2,4))+sr(h.slice(4,6),h.slice(6,8)))/2}void 0!==(u=r?Lt[r]:t.getMetersPerUnit())&&(e/=u)}}return e}function wr(t){pr(t),t.forEach((function(n){t.forEach((function(t){n!==t&&qi(n,t,lr)}))}))}function gr(t,n,i,r){t.forEach((function(t){n.forEach((function(n){qi(t,n,i),qi(n,t,r)}))}))}function br(t,n){return t?"string"==typeof t?yr(t):t:yr(n)}function xr(t){return function(n,i,r){for(var e=n.length,o=void 0!==r?r:2,s=void 0!==i?i:new Array(e),u=0;u<e;u+=o)for(var a=t(n.slice(u,u+o)),h=a.length,f=0,c=o;f<c;++f)s[u+f]=f>=h?n[u+f]:a[f];return s}}function Mr(t,n,i,r){var e=yr(t),o=yr(n);qi(e,o,xr(i)),qi(o,e,xr(r))}function _r(t,n){return cr(),Er(t,"EPSG:4326",void 0!==n?n:"EPSG:3857")}function Sr(t,n){if(t===n)return!0;var i=t.getUnits()===n.getUnits();return(t.getCode()===n.getCode()||Or(t,n)===lr)&&i}function Or(t,n){var i=Ui(t.getCode(),n.getCode());return i||(i=vr),i}function jr(t,n){return Or(yr(t),yr(n))}function Er(t,n,i){return jr(n,i)(t,void 0,t.length)}function Tr(t,n,i,r){return ni(t,jr(n,i),void 0,r)}var Ar=null;function Pr(t){Ar=yr(t)}function Cr(){return Ar}function kr(t,n){return Ar?Er(t,n,Ar):t}function Ir(t,n){return Ar?Er(t,Ar,n):(fr&&!Ki(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(fr=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function Nr(t,n){return Ar?Tr(t,n,Ar):t}function Lr(t,n){return Ar?Tr(t,Ar,n):t}function zr(t,n){if(!Ar)return t;var i=yr(n).getUnits(),r=Ar.getUnits();return i&&r?t*Lt[i]/Lt[r]:t}function Rr(t,n){if(!Ar)return t;var i=yr(n).getUnits(),r=Ar.getUnits();return i&&r?t*Lt[r]/Lt[i]:t}function Fr(t,n,i){return function(r){var e,o;if(t.canWrapX()){var s=t.getExtent(),u=$n(s);(o=er(r=r.slice(0),t,u))&&(r[0]=r[0]-o*u),r[0]=oi(r[0],s[0],s[2]),r[1]=oi(r[1],s[1],s[3]),e=i(r)}else e=i(r);return o&&n.canWrapX()&&(e[0]+=o*$n(n.getExtent())),e}}function Gr(){wr(ji),wr(Ni),gr(Ni,ji,Ei,Ti)}function Dr(t,n,i,r,e,o){for(var s=o||[],u=0,a=n;a<i;a+=r){var h=t[a],f=t[a+1];s[u++]=e[0]*h+e[2]*f+e[4],s[u++]=e[1]*h+e[3]*f+e[5]}return o&&s.length!=u&&(s.length=u),s}function qr(t,n,i,r,e,o,s){for(var u=s||[],a=Math.cos(e),h=Math.sin(e),f=o[0],c=o[1],l=0,v=n;v<i;v+=r){var d=t[v]-f,p=t[v+1]-c;u[l++]=f+d*a-p*h,u[l++]=c+d*h+p*a;for(var y=v+2;y<v+r;++y)u[l++]=t[y]}return s&&u.length!=l&&(u.length=l),u}function Ur(t,n,i,r,e,o,s,u){for(var a=u||[],h=s[0],f=s[1],c=0,l=n;l<i;l+=r){var v=t[l]-h,d=t[l+1]-f;a[c++]=h+e*v,a[c++]=f+o*d;for(var p=l+2;p<l+r;++p)a[c++]=t[p]}return u&&a.length!=c&&(a.length=c),a}function Br(t,n,i,r,e,o,s){for(var u=s||[],a=0,h=n;h<i;h+=r){u[a++]=t[h]+e,u[a++]=t[h+1]+o;for(var f=h+2;f<h+r;++f)u[a++]=t[f]}return s&&u.length!=a&&(u.length=a),u}Gr();var Xr=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Vr=[1,0,0,1,0,0],Wr=function(t){function n(){var n=t.call(this)||this;return n.st=[1/0,1/0,-1/0,-1/0],n.yt=-1,n.simplifiedGeometryMaxMinSquaredTolerance=0,n.simplifiedGeometryRevision=0,n.simplifyTransformedInternal=E((function(t,n,i){if(!i)return this.getSimplifiedGeometry(n);var r=this.clone();return r.applyTransform(i),r.getSimplifiedGeometry(n)})),n}return Xr(n,t),n.prototype.simplifyTransformed=function(t,n){return this.simplifyTransformedInternal(this.getRevision(),t,n)},n.prototype.clone=function(){return r()},n.prototype.closestPointXY=function(t,n,i,e){return r()},n.prototype.containsXY=function(t,n){var i=this.getClosestPoint([t,n]);return i[0]===t&&i[1]===n},n.prototype.getClosestPoint=function(t,n){var i=n||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},n.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},n.prototype.computeExtent=function(t){return r()},n.prototype.getExtent=function(t){if(this.yt!=this.getRevision()){var n=this.computeExtent(this.st);(isNaN(n[0])||isNaN(n[1]))&&jn(n),this.yt=this.getRevision()}return Jn(this.st,t)},n.prototype.rotate=function(t,n){r()},n.prototype.scale=function(t,n,i){r()},n.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},n.prototype.getSimplifiedGeometry=function(t){return r()},n.prototype.getType=function(){return r()},n.prototype.applyTransform=function(t){r()},n.prototype.intersectsExtent=function(t){return r()},n.prototype.translate=function(t,n){r()},n.prototype.transform=function(t,n){var i=yr(t),r=i.getUnits()==Rt.TILE_PIXELS?function(t,r,e){var o=i.getExtent(),s=i.getWorldExtent(),u=Vn(s)/Vn(o);return sn(Vr,s[0],s[3],u,-u,0,0,0),Dr(t,0,t.length,e,Vr,r),jr(i,n)(t,r,e)}:jr(i,n);return this.applyTransform(r),this},n}(et),Yr=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Zr(t){var n;return t==Tt?n=2:t==At||t==Pt?n=3:t==Ct&&(n=4),n}function $r(t,n,i){var r=t.getFlatCoordinates();if(r){var e=t.getStride();return Dr(r,0,r.length,e,n,i)}return null}var Kr=function(t){function n(){var n=t.call(this)||this;return n.layout=Tt,n.stride=2,n.flatCoordinates=null,n}return Yr(n,t),n.prototype.computeExtent=function(t){return Tn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.getCoordinates=function(){return r()},n.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},n.prototype.getFlatCoordinates=function(){return this.flatCoordinates},n.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},n.prototype.getLayout=function(){return this.layout},n.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 n=this.getSimplifiedGeometryInternal(t);return n.getFlatCoordinates().length<this.flatCoordinates.length?n:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},n.prototype.getSimplifiedGeometryInternal=function(t){return this},n.prototype.getStride=function(){return this.stride},n.prototype.setFlatCoordinates=function(t,n){this.stride=Zr(t),this.layout=t,this.flatCoordinates=n},n.prototype.setCoordinates=function(t,n){r()},n.prototype.setLayout=function(t,n,i){var r;if(t)r=Zr(t);else{for(var e=0;e<i;++e){if(0===n.length)return this.layout=Tt,void(this.stride=2);n=n[0]}t=function(t){var n;2==t?n=Tt:3==t?n=At:4==t&&(n=Ct);return n}(r=n.length)}this.layout=t,this.stride=r},n.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},n.prototype.rotate=function(t,n){var i=this.getFlatCoordinates();if(i){var r=this.getStride();qr(i,0,i.length,r,t,n,i),this.changed()}},n.prototype.scale=function(t,n,i){var r=n;void 0===r&&(r=t);var e=i;e||(e=qn(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();Ur(o,0,o.length,s,t,r,e,o),this.changed()}},n.prototype.translate=function(t,n){var i=this.getFlatCoordinates();if(i){var r=this.getStride();Br(i,0,i.length,r,t,n,i),this.changed()}},n}(Wr);function Hr(t,n,i,r,e,o,s){var u,a=t[n],h=t[n+1],f=t[i]-a,c=t[i+1]-h;if(0===f&&0===c)u=n;else{var l=((e-a)*f+(o-h)*c)/(f*f+c*c);if(l>1)u=i;else{if(l>0){for(var v=0;v<r;++v)s[v]=di(t[n+v],t[i+v],l);return void(s.length=r)}u=n}}for(v=0;v<r;++v)s[v]=t[u+v];s.length=r}function Jr(t,n,i,r,e){var o=t[n],s=t[n+1];for(n+=r;n<i;n+=r){var u=t[n],a=t[n+1],h=hi(o,s,u,a);h>e&&(e=h),o=u,s=a}return e}function Qr(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){var u=i[o];e=Jr(t,n,u,r,e),n=u}return e}function te(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){var u=i[o];e=Qr(t,n,u,r,e),n=u[u.length-1]}return e}function ne(t,n,i,r,e,o,s,u,a,h,f){if(n==i)return h;var c,l;if(0===e){if((l=hi(s,u,t[n],t[n+1]))<h){for(c=0;c<r;++c)a[c]=t[n+c];return a.length=r,l}return h}for(var v=f||[NaN,NaN],d=n+r;d<i;)if(Hr(t,d-r,d,r,s,u,v),(l=hi(s,u,v[0],v[1]))<h){for(h=l,c=0;c<r;++c)a[c]=v[c];a.length=r,d+=r}else d+=r*Math.max((Math.sqrt(l)-Math.sqrt(h))/e|0,1);if(o&&(Hr(t,i-r,n,r,s,u,v),(l=hi(s,u,v[0],v[1]))<h)){for(h=l,c=0;c<r;++c)a[c]=v[c];a.length=r}return h}function ie(t,n,i,r,e,o,s,u,a,h,f){for(var c=f||[NaN,NaN],l=0,v=i.length;l<v;++l){var d=i[l];h=ne(t,n,d,r,e,o,s,u,a,h,c),n=d}return h}function re(t,n,i,r,e,o,s,u,a,h,f){for(var c=f||[NaN,NaN],l=0,v=i.length;l<v;++l){var d=i[l];h=ie(t,n,d,r,e,o,s,u,a,h,c),n=d[d.length-1]}return h}function ee(t,n,i,r){for(var e=0,o=i.length;e<o;++e)t[n++]=i[e];return n}function oe(t,n,i,r){for(var e=0,o=i.length;e<o;++e)for(var s=i[e],u=0;u<r;++u)t[n++]=s[u];return n}function se(t,n,i,r,e){for(var o=e||[],s=0,u=0,a=i.length;u<a;++u){var h=oe(t,n,i[u],r);o[s++]=h,n=h}return o.length=s,o}function ue(t,n,i,r,e){for(var o=e||[],s=0,u=0,a=i.length;u<a;++u){var h=se(t,n,i[u],r,o[s]);o[s++]=h,n=h[h.length-1]}return o.length=s,o}function ae(t,n,i,r,e,o,s){var u=(i-n)/r;if(u<3){for(;n<i;n+=r)o[s++]=t[n],o[s++]=t[n+1];return s}var a=new Array(u);a[0]=1,a[u-1]=1;for(var h=[n,i-r],f=0;h.length>0;){for(var c=h.pop(),l=h.pop(),v=0,d=t[l],p=t[l+1],y=t[c],m=t[c+1],w=l+r;w<c;w+=r){var g=ai(t[w],t[w+1],d,p,y,m);g>v&&(f=w,v=g)}v>e&&(a[(f-n)/r]=1,l+r<f&&h.push(l,f),f+r<c&&h.push(f,c))}for(w=0;w<u;++w)a[w]&&(o[s++]=t[n+w*r],o[s++]=t[n+w*r+1]);return s}function he(t,n,i,r,e,o,s,u){for(var a=0,h=i.length;a<h;++a){var f=i[a];s=ae(t,n,f,r,e,o,s),u.push(s),n=f}return s}function fe(t,n,i,r,e,o,s){if(i<=n+r){for(;n<i;n+=r)o[s++]=t[n],o[s++]=t[n+1];return s}var u=t[n],a=t[n+1];o[s++]=u,o[s++]=a;var h=u,f=a;for(n+=r;n<i;n+=r)hi(u,a,h=t[n],f=t[n+1])>e&&(o[s++]=h,o[s++]=f,u=h,a=f);return h==u&&f==a||(o[s++]=h,o[s++]=f),s}function ce(t,n){return n*Math.round(t/n)}function le(t,n,i,r,e,o,s){if(n==i)return s;var u,a,h=ce(t[n],e),f=ce(t[n+1],e);n+=r,o[s++]=h,o[s++]=f;do{if(u=ce(t[n],e),a=ce(t[n+1],e),(n+=r)==i)return o[s++]=u,o[s++]=a,s}while(u==h&&a==f);for(;n<i;){var c=ce(t[n],e),l=ce(t[n+1],e);if(n+=r,c!=u||l!=a){var v=u-h,d=a-f,p=c-h,y=l-f;v*y==d*p&&(v<0&&p<v||v==p||v>0&&p>v)&&(d<0&&y<d||d==y||d>0&&y>d)?(u=c,a=l):(o[s++]=u,o[s++]=a,h=u,f=a,u=c,a=l)}}return o[s++]=u,o[s++]=a,s}function ve(t,n,i,r,e,o,s,u){for(var a=0,h=i.length;a<h;++a){var f=i[a];s=le(t,n,f,r,e,o,s),u.push(s),n=f}return s}function de(t,n,i,r,e,o,s,u){for(var a=0,h=i.length;a<h;++a){var f=i[a],c=[];s=ve(t,n,f,r,e,o,s,c),u.push(c),n=f[f.length-1]}return s}function pe(t,n,i,r,e){for(var o=void 0!==e?e:[],s=0,u=n;u<i;u+=r)o[s++]=t.slice(u,u+r);return o.length=s,o}function ye(t,n,i,r,e){for(var o=void 0!==e?e:[],s=0,u=0,a=i.length;u<a;++u){var h=i[u];o[s++]=pe(t,n,h,r,o[s]),n=h}return o.length=s,o}function me(t,n,i,r,e){for(var o=void 0!==e?e:[],s=0,u=0,a=i.length;u<a;++u){var h=i[u];o[s++]=ye(t,n,h,r,o[s]),n=h[h.length-1]}return o.length=s,o}function we(t,n,i,r){for(var e=0,o=t[i-r],s=t[i-r+1];n<i;n+=r){var u=t[n],a=t[n+1];e+=s*u-o*a,o=u,s=a}return e/2}function ge(t,n,i,r){for(var e=0,o=0,s=i.length;o<s;++o){var u=i[o];e+=we(t,n,u,r),n=u}return e}function be(t,n,i,r){for(var e=0,o=0,s=i.length;o<s;++o){var u=i[o];e+=ge(t,n,u,r),n=u[u.length-1]}return e}var xe=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Me=function(t){function n(n,i){var r=t.call(this)||this;return r.wt=-1,r.gt=-1,void 0===i||Array.isArray(n[0])?r.setCoordinates(n,i):r.setFlatCoordinates(i,n),r}return xe(n,t),n.prototype.clone=function(){return new n(this.flatCoordinates.slice(),this.layout)},n.prototype.closestPointXY=function(t,n,i,r){return r<gn(this.getExtent(),t,n)?r:(this.gt!=this.getRevision()&&(this.wt=Math.sqrt(Jr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.gt=this.getRevision()),ne(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.wt,!0,t,n,i,r))},n.prototype.getArea=function(){return we(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getCoordinates=function(){return pe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=ae(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new n(i,Tt)},n.prototype.getType=function(){return"LinearRing"},n.prototype.intersectsExtent=function(t){return!1},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=oe(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Kr),_e=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Se=function(t){function n(n,i){var r=t.call(this)||this;return r.setCoordinates(n,i),r}return _e(n,t),n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){var e=this.flatCoordinates,o=hi(t,n,e[0],e[1]);if(o<r){for(var s=this.stride,u=0;u<s;++u)i[u]=e[u];return i.length=s,o}return r},n.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},n.prototype.computeExtent=function(t){return En(this.flatCoordinates,t)},n.prototype.getType=function(){return"Point"},n.prototype.intersectsExtent=function(t){return Mn(t,this.flatCoordinates[0],this.flatCoordinates[1])},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ee(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Kr);function Oe(t,n,i,r,e){return!Rn(e,(function(e){return!je(t,n,i,r,e[0],e[1])}))}function je(t,n,i,r,e,o){for(var s=0,u=t[i-r],a=t[i-r+1];n<i;n+=r){var h=t[n],f=t[n+1];a<=o?f>o&&(h-u)*(o-a)-(e-u)*(f-a)>0&&s++:f<=o&&(h-u)*(o-a)-(e-u)*(f-a)<0&&s--,u=h,a=f}return 0!==s}function Ee(t,n,i,r,e,o){if(0===i.length)return!1;if(!je(t,n,i[0],r,e,o))return!1;for(var s=1,u=i.length;s<u;++s)if(je(t,i[s-1],i[s],r,e,o))return!1;return!0}function Te(t,n,i,r,e,o){if(0===i.length)return!1;for(var s=0,u=i.length;s<u;++s){var a=i[s];if(Ee(t,n,a,r,e,o))return!0;n=a[a.length-1]}return!1}function Ae(t,n,i,r,e,o,s){for(var u,a,h,f,c,l,v,d=e[o+1],y=[],m=0,w=i.length;m<w;++m){var g=i[m];for(f=t[g-r],l=t[g-r+1],u=n;u<g;u+=r)c=t[u],v=t[u+1],(d<=l&&v<=d||l<=d&&d<=v)&&(h=(d-l)/(v-l)*(c-f)+f,y.push(h)),f=c,l=v}var b=NaN,x=-1/0;for(y.sort(p),f=y[0],u=1,a=y.length;u<a;++u){c=y[u];var M=Math.abs(c-f);M>x&&Ee(t,n,i,r,h=(f+c)/2,d)&&(b=h,x=M),f=c}return isNaN(b)&&(b=e[o]),s?(s.push(b,d,x),s):[b,d,x]}function Pe(t,n,i,r,e){for(var o=[],s=0,u=i.length;s<u;++s){var a=i[s];o=Ae(t,n,a,r,e,2*s,o),n=a[a.length-1]}return o}function Ce(t,n,i,r,e){var o;for(n+=r;n<i;n+=r)if(o=e(t.slice(n-r,n),t.slice(n,n+r)))return o;return!1}function ke(t,n,i,r,e){var o=Nn([1/0,1/0,-1/0,-1/0],t,n,i,r);return!!Kn(e,o)&&(!!xn(e,o)||(o[0]>=e[0]&&o[2]<=e[2]||(o[1]>=e[1]&&o[3]<=e[3]||Ce(t,n,i,r,(function(t,n){return ti(e,t,n)})))))}function Ie(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){if(ke(t,n,i[o],r,e))return!0;n=i[o]}return!1}function Ne(t,n,i,r,e){return!!ke(t,n,i,r,e)||(!!je(t,n,i,r,e[0],e[1])||(!!je(t,n,i,r,e[0],e[3])||(!!je(t,n,i,r,e[2],e[1])||!!je(t,n,i,r,e[2],e[3]))))}function Le(t,n,i,r,e){if(!Ne(t,n,i[0],r,e))return!1;if(1===i.length)return!0;for(var o=1,s=i.length;o<s;++o)if(Oe(t,i[o-1],i[o],r,e)&&!ke(t,i[o-1],i[o],r,e))return!1;return!0}function ze(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){var u=i[o];if(Le(t,n,u,r,e))return!0;n=u[u.length-1]}return!1}function Re(t,n,i,r){for(;n<i-r;){for(var e=0;e<r;++e){var o=t[n+e];t[n+e]=t[i-r+e],t[i-r+e]=o}n+=r,i-=r}}function Fe(t,n,i,r){for(var e=0,o=t[i-r],s=t[i-r+1];n<i;n+=r){var u=t[n],a=t[n+1];e+=(u-o)*(a+s),o=u,s=a}return 0===e?void 0:e>0}function Ge(t,n,i,r,e){for(var o=void 0!==e&&e,s=0,u=i.length;s<u;++s){var a=i[s],h=Fe(t,n,a,r);if(0===s){if(o&&h||!o&&!h)return!1}else if(o&&!h||!o&&h)return!1;n=a}return!0}function De(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){var u=i[o];if(!Ge(t,n,u,r,e))return!1;u.length&&(n=u[u.length-1])}return!0}function qe(t,n,i,r,e){for(var o=void 0!==e&&e,s=0,u=i.length;s<u;++s){var a=i[s],h=Fe(t,n,a,r);(0===s?o&&h||!o&&!h:o&&!h||!o&&h)&&Re(t,n,a,r),n=a}return n}function Ue(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o)n=qe(t,n,i[o],r,e);return n}function Be(t,n){for(var i=[],r=0,e=0,o=0,s=n.length;o<s;++o){var u=n[o];if(Fe(t,r,u,2)){if(0===i.length)continue;i[i.length-1].push(n[e])}else i.push(n.slice(e,o+1));e=o+1,r=u}return i}var Xe=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ve=function(t){function n(n,i,r){var e=t.call(this)||this;return e.bt=[],e.xt=-1,e.Mt=null,e.wt=-1,e.gt=-1,e._t=-1,e.St=null,void 0!==i&&r?(e.setFlatCoordinates(i,n),e.bt=r):e.setCoordinates(n,i),e}return Xe(n,t),n.prototype.appendLinearRing=function(t){this.flatCoordinates?g(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.bt.push(this.flatCoordinates.length),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout,this.bt.slice());return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){return r<gn(this.getExtent(),t,n)?r:(this.gt!=this.getRevision()&&(this.wt=Math.sqrt(Qr(this.flatCoordinates,0,this.bt,this.stride,0)),this.gt=this.getRevision()),ie(this.flatCoordinates,0,this.bt,this.stride,this.wt,!0,t,n,i,r))},n.prototype.containsXY=function(t,n){return Ee(this.getOrientedFlatCoordinates(),0,this.bt,this.stride,t,n)},n.prototype.getArea=function(){return ge(this.getOrientedFlatCoordinates(),0,this.bt,this.stride)},n.prototype.getCoordinates=function(t){var n;return void 0!==t?qe(n=this.getOrientedFlatCoordinates().slice(),0,this.bt,this.stride,t):n=this.flatCoordinates,ye(n,0,this.bt,this.stride)},n.prototype.getEnds=function(){return this.bt},n.prototype.getFlatInteriorPoint=function(){if(this.xt!=this.getRevision()){var t=qn(this.getExtent());this.Mt=Ae(this.getOrientedFlatCoordinates(),0,this.bt,this.stride,t,0),this.xt=this.getRevision()}return this.Mt},n.prototype.getInteriorPoint=function(){return new Se(this.getFlatInteriorPoint(),Pt)},n.prototype.getLinearRingCount=function(){return this.bt.length},n.prototype.getLinearRing=function(t){return t<0||this.bt.length<=t?null:new Me(this.flatCoordinates.slice(0===t?0:this.bt[t-1],this.bt[t]),this.layout)},n.prototype.getLinearRings=function(){for(var t=this.layout,n=this.flatCoordinates,i=this.bt,r=[],e=0,o=0,s=i.length;o<s;++o){var u=i[o],a=new Me(n.slice(e,u),t);r.push(a),e=u}return r},n.prototype.getOrientedFlatCoordinates=function(){if(this._t!=this.getRevision()){var t=this.flatCoordinates;Ge(t,0,this.bt,this.stride)?this.St=t:(this.St=t.slice(),this.St.length=qe(this.St,0,this.bt,this.stride)),this._t=this.getRevision()}return this.St},n.prototype.getSimplifiedGeometryInternal=function(t){var i=[],r=[];return i.length=ve(this.flatCoordinates,0,this.bt,this.stride,Math.sqrt(t),i,0,r),new n(i,Tt,r)},n.prototype.getType=function(){return"Polygon"},n.prototype.intersectsExtent=function(t){return Le(this.getOrientedFlatCoordinates(),0,this.bt,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=se(this.flatCoordinates,0,t,this.stride,this.bt);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},n}(Kr),We=Ve;function Ye(t,n,i,r){for(var e=i||32,o=[],s=0;s<e;++s)g(o,hr(t,n,2*Math.PI*s/e,r));return o.push(o[0],o[1]),new Ve(o,Tt,[o.length])}function Ze(t){var n=t[0],i=t[1],r=t[2],e=t[3],o=[n,i,n,e,r,e,r,i,n,i];return new Ve(o,Tt,[o.length])}function $e(t,n,i){for(var r=n||32,e=t.getStride(),o=t.getLayout(),s=t.getCenter(),u=e*(r+1),a=new Array(u),h=0;h<u;h+=e){a[h]=0,a[h+1]=0;for(var f=2;f<e;f++)a[h+f]=s[f]}var c=[a.length],l=new Ve(a,o,c);return Ke(l,s,t.getRadius(),i),l}function Ke(t,n,i,r){for(var e=t.getFlatCoordinates(),o=t.getStride(),s=e.length/o-1,u=r||0,a=0;a<=s;++a){var h=a*o,f=u+2*vi(a,s)*Math.PI/s;e[h]=n[0]+i*Math.cos(f),e[h+1]=n[1]+i*Math.sin(f)}t.changed()}var He=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Je="accuracy",Qe="accuracyGeometry",to="altitude",no="altitudeAccuracy",io="heading",ro="position",eo="projection",oo="speed",so="tracking",uo="trackingOptions",ao=function(t){function n(n){var i=t.call(this,z)||this;return i.code=n.code,i.message=n.message,i}return He(n,t),n}(c),ho=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r=n||{};return i.Ot=null,i.jt=vr,i.Et=void 0,i.addChangeListener(eo,i.Tt),i.addChangeListener(so,i.At),void 0!==r.projection&&i.setProjection(r.projection),void 0!==r.trackingOptions&&i.setTrackingOptions(r.trackingOptions),i.setTracking(void 0!==r.tracking&&r.tracking),i}return He(n,t),n.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},n.prototype.Tt=function(){var t=this.getProjection();t&&(this.jt=Or(yr("EPSG:4326"),t),this.Ot&&this.set(ro,this.jt(this.Ot)))},n.prototype.At=function(){if("geolocation"in navigator){var t=this.getTracking();t&&void 0===this.Et?this.Et=navigator.geolocation.watchPosition(this.Pt.bind(this),this.Ct.bind(this),this.getTrackingOptions()):t||void 0===this.Et||(navigator.geolocation.clearWatch(this.Et),this.Et=void 0)}},n.prototype.Pt=function(t){var n=t.coords;this.set(Je,n.accuracy),this.set(to,null===n.altitude?void 0:n.altitude),this.set(no,null===n.altitudeAccuracy?void 0:n.altitudeAccuracy),this.set(io,null===n.heading?void 0:li(n.heading)),this.Ot?(this.Ot[0]=n.longitude,this.Ot[1]=n.latitude):this.Ot=[n.longitude,n.latitude];var i=this.jt(this.Ot);this.set(ro,i),this.set(oo,null===n.speed?void 0:n.speed);var r=Ye(this.Ot,n.accuracy);r.applyTransform(this.jt),this.set(Qe,r),this.changed()},n.prototype.Ct=function(t){this.dispatchEvent(new ao(t))},n.prototype.getAccuracy=function(){return this.get(Je)},n.prototype.getAccuracyGeometry=function(){return this.get(Qe)||null},n.prototype.getAltitude=function(){return this.get(to)},n.prototype.getAltitudeAccuracy=function(){return this.get(no)},n.prototype.getHeading=function(){return this.get(io)},n.prototype.getPosition=function(){return this.get(ro)},n.prototype.getProjection=function(){return this.get(eo)},n.prototype.getSpeed=function(){return this.get(oo)},n.prototype.getTracking=function(){return this.get(so)},n.prototype.getTrackingOptions=function(){return this.get(uo)},n.prototype.setProjection=function(t){this.set(eo,yr(t))},n.prototype.setTracking=function(t){this.set(so,t)},n.prototype.setTrackingOptions=function(t){this.set(uo,t)},n}(et),fo=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),co=function(t){function n(n,i,r,e){var o=t.call(this)||this;return o.extent=n,o.kt=r,o.resolution=i,o.state=e,o}return fo(n,t),n.prototype.changed=function(){this.dispatchEvent(L)},n.prototype.getExtent=function(){return this.extent},n.prototype.getImage=function(){return r()},n.prototype.getPixelRatio=function(){return this.kt},n.prototype.getResolution=function(){return this.resolution},n.prototype.getState=function(){return this.state},n.prototype.load=function(){r()},n}(N),lo=0,vo=1,po=2,yo=3,mo=4,wo=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function go(t,n,i){var r=t,e=!0,o=!1,s=!1,u=[K(r,V,(function(){s=!0,o||n()}))];return r.src&&Wt?(o=!0,r.decode().then((function(){e&&n()})).catch((function(t){e&&(s?n():i())}))):u.push(K(r,z,i)),function(){e=!1,u.forEach(H)}}var bo=function(t){function n(n,i,r,e,o,s){var u=t.call(this,n,i,r,lo)||this;return u.Nt=e,u.Lt=new Image,null!==o&&(u.Lt.crossOrigin=o),u.zt=null,u.state=lo,u.Rt=s,u}return wo(n,t),n.prototype.getImage=function(){return this.Lt},n.prototype.Ft=function(){this.state=yo,this.Gt(),this.changed()},n.prototype.Dt=function(){void 0===this.resolution&&(this.resolution=Vn(this.extent)/this.Lt.height),this.state=po,this.Gt(),this.changed()},n.prototype.load=function(){this.state!=lo&&this.state!=yo||(this.state=vo,this.changed(),this.Rt(this,this.Nt),this.zt=go(this.Lt,this.Dt.bind(this),this.Ft.bind(this)))},n.prototype.setImage=function(t){this.Lt=t,this.resolution=Vn(this.extent)/this.Lt.height},n.prototype.Gt=function(){this.zt&&(this.zt(),this.zt=null)},n}(co),xo=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Mo=function(t){function n(n,i,r,e,o){var s=this,u=void 0!==o?lo:po;return(s=t.call(this,n,i,r,u)||this).U=void 0!==o?o:null,s.qt=e,s.V=null,s}return xo(n,t),n.prototype.getError=function(){return this.V},n.prototype.Ut=function(t){t?(this.V=t,this.state=yo):this.state=po,this.changed()},n.prototype.load=function(){this.state==lo&&(this.state=vo,this.changed(),this.U(this.Ut.bind(this)))},n.prototype.getImage=function(){return this.qt},n}(co);function _o(t,n,i,r){var e;return e=i&&i.length?i.shift():Vt?new OffscreenCanvas(t||300,n||300):document.createElement("canvas"),t&&(e.width=t),n&&(e.height=n),e.getContext("2d",r)}function So(t){var n=t.canvas;n.width=1,n.height=1,t.clearRect(0,0,1,1)}function Oo(t){var n=t.offsetWidth,i=getComputedStyle(t);return n+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)}function jo(t){var n=t.offsetHeight,i=getComputedStyle(t);return n+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)}function Eo(t,n){var i=n.parentNode;i&&i.replaceChild(t,n)}function To(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function Ao(t){for(;t.lastChild;)t.removeChild(t.lastChild)}function Po(t,n){for(var i=t.childNodes,r=0;;++r){var e=i[r],o=n[r];if(!e&&!o)break;e!==o&&(e?o?t.insertBefore(o,e):(t.removeChild(e),--r):t.appendChild(o))}}var Co=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();var ko=function(t){function n(n,i,r,e,o,s){var u=t.call(this,n,i,s)||this;return u.Bt=e,u.Nt=r,u.key=r,u.Lt=new Image,null!==e&&(u.Lt.crossOrigin=e),u.zt=null,u.Xt=o,u}return Co(n,t),n.prototype.getImage=function(){return this.Lt},n.prototype.setImage=function(t){this.Lt=t,this.state=vt,this.Gt(),this.changed()},n.prototype.Ft=function(){var t;this.state=dt,this.Gt(),this.Lt=((t=_o(1,1)).fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas),this.changed()},n.prototype.Dt=function(){var t=this.Lt;t.naturalWidth&&t.naturalHeight?this.state=vt:this.state=pt,this.Gt(),this.changed()},n.prototype.load=function(){this.state==dt&&(this.state=ct,this.Lt=new Image,null!==this.Bt&&(this.Lt.crossOrigin=this.Bt)),this.state==ct&&(this.state=lt,this.changed(),this.Xt(this,this.Nt),this.zt=go(this.Lt,this.Dt.bind(this),this.Ft.bind(this)))},n.prototype.Gt=function(){this.zt&&(this.zt(),this.zt=null)},n}(xt),Io=function(){function t(t,n,i){this.Vt=t,this.Wt=n,this.Yt=i,this.Zt=[],this.$t=0,this.Kt=0}return t.prototype.begin=function(){this.Zt.length=0,this.$t=0,this.Kt=0},t.prototype.update=function(t,n){this.Zt.push(t,n,Date.now())},t.prototype.end=function(){if(this.Zt.length<6)return!1;var t=Date.now()-this.Yt,n=this.Zt.length-3;if(this.Zt[n+2]<t)return!1;for(var i=n-3;i>0&&this.Zt[i+2]>t;)i-=3;var r=this.Zt[n+2]-this.Zt[i+2];if(r<1e3/60)return!1;var e=this.Zt[n]-this.Zt[i],o=this.Zt[n+1]-this.Zt[i+1];return this.$t=Math.atan2(o,e),this.Kt=Math.sqrt(e*e+o*o)/r,this.Kt>this.Wt},t.prototype.getDistance=function(){return(this.Wt-this.Kt)/this.Vt},t.prototype.getAngle=function(){return this.$t},t}(),No=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Lo=/^([a-z]*)$|^hsla?\(.*\)$/i;function zo(t){return"string"==typeof t?t:qo(t)}function Ro(t){var n=document.createElement("div");if(n.style.color=t,""!==n.style.color){document.body.appendChild(n);var i=getComputedStyle(n).color;return document.body.removeChild(n),i}return""}var Fo=function(){var t={},n=0;return function(i){var r;if(t.hasOwnProperty(i))r=t[i];else{if(n>=1024){var e=0;for(var o in t)0==(3&e++)&&(delete t[o],--n)}r=function(t){var n,i,r,e,o;Lo.exec(t)&&(t=Ro(t));if(No.exec(t)){var s=t.length-1,u=void 0;u=s<=4?1:2;var a=4===s||8===s;n=parseInt(t.substr(1+0*u,u),16),i=parseInt(t.substr(1+1*u,u),16),r=parseInt(t.substr(1+2*u,u),16),e=a?parseInt(t.substr(1+3*u,u),16):255,1==u&&(n=(n<<4)+n,i=(i<<4)+i,r=(r<<4)+r,a&&(e=(e<<4)+e)),o=[n,i,r,e/255]}else 0==t.indexOf("rgba(")?Do(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),Do(o)):St(!1,14);return o}(i),t[i]=r,++n}return r}}();function Go(t){return Array.isArray(t)?t:Fo(t)}function Do(t){return t[0]=oi(t[0]+.5|0,0,255),t[1]=oi(t[1]+.5|0,0,255),t[2]=oi(t[2]+.5|0,0,255),t[3]=oi(t[3],0,1),t}function qo(t){var n=t[0];n!=(0|n)&&(n=n+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+n+","+i+","+r+","+(void 0===t[3]?1:Math.round(100*t[3])/100)+")"}function Uo(t){return Lo.test(t)&&(t=Ro(t)),No.test(t)||0===t.indexOf("rgba(")||0===t.indexOf("rgb(")}var Bo=function(){function t(){this.Ht={},this.Jt=0,this.Qt=32}return t.prototype.clear=function(){this.Ht={},this.Jt=0},t.prototype.canExpireCache=function(){return this.Jt>this.Qt},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var n in this.Ht){var i=this.Ht[n];0!=(3&t++)||i.hasListener()||(delete this.Ht[n],--this.Jt)}}},t.prototype.get=function(t,n,i){var r=Xo(t,n,i);return r in this.Ht?this.Ht[r]:null},t.prototype.set=function(t,n,i,r){var e=Xo(t,n,i);this.Ht[e]=r,++this.Jt},t.prototype.setSize=function(t){this.Qt=t,this.expire()},t}();function Xo(t,n,i){return n+":"+t+":"+(i?zo(i):"null")}var Vo=Bo,Wo=new Bo,Yo="opacity",Zo="visible",$o="extent",Ko="zIndex",Ho="maxResolution",Jo="minResolution",Qo="maxZoom",ts="minZoom",ns="source",is="map",rs=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),es=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un,i.tn=n.background;var r=A({},n);return"object"==typeof n.properties&&(delete r.properties,A(r,n.properties)),r[Yo]=void 0!==n.opacity?n.opacity:1,St("number"==typeof r[Yo],64),r[Zo]=void 0===n.visible||n.visible,r[Ko]=n.zIndex,r[Ho]=void 0!==n.maxResolution?n.maxResolution:1/0,r[Jo]=void 0!==n.minResolution?n.minResolution:0,r[ts]=void 0!==n.minZoom?n.minZoom:-1/0,r[Qo]=void 0!==n.maxZoom?n.maxZoom:1/0,i.nn=void 0!==r.className?r.className:"ol-layer",delete r.className,i.setProperties(r),i.rn=null,i}return rs(n,t),n.prototype.getBackground=function(){return this.tn},n.prototype.getClassName=function(){return this.nn},n.prototype.getLayerState=function(t){var n=this.rn||{layer:this,managed:void 0===t||t},i=this.getZIndex();return n.opacity=oi(Math.round(100*this.getOpacity())/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=void 0!==i||n.managed?i:1/0,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.rn=n,n},n.prototype.getLayersArray=function(t){return r()},n.prototype.getLayerStatesArray=function(t){return r()},n.prototype.getExtent=function(){return this.get($o)},n.prototype.getMaxResolution=function(){return this.get(Ho)},n.prototype.getMinResolution=function(){return this.get(Jo)},n.prototype.getMinZoom=function(){return this.get(ts)},n.prototype.getMaxZoom=function(){return this.get(Qo)},n.prototype.getOpacity=function(){return this.get(Yo)},n.prototype.getSourceState=function(){return r()},n.prototype.getVisible=function(){return this.get(Zo)},n.prototype.getZIndex=function(){return this.get(Ko)},n.prototype.setBackground=function(t){this.tn=t,this.changed()},n.prototype.setExtent=function(t){this.set($o,t)},n.prototype.setMaxResolution=function(t){this.set(Ho,t)},n.prototype.setMinResolution=function(t){this.set(Jo,t)},n.prototype.setMaxZoom=function(t){this.set(Qo,t)},n.prototype.setMinZoom=function(t){this.set(ts,t)},n.prototype.setOpacity=function(t){St("number"==typeof t,64),this.set(Yo,t)},n.prototype.setVisible=function(t){this.set(Zo,t)},n.prototype.setZIndex=function(t){this.set(Ko,t)},n.prototype.disposeInternal=function(){this.rn&&(this.rn.layer=null,this.rn=null),t.prototype.disposeInternal.call(this)},n}(et),os="prerender",ss="postrender",us="precompose",as="postcompose",hs="rendercomplete",fs=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function cs(t,n){if(!t.visible)return!1;var i=n.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;var r=n.zoom;return r>t.minZoom&&r<=t.maxZoom}var ls=function(t){function n(n){var i=this,r=A({},n);delete r.source,(i=t.call(this,r)||this).on,i.once,i.un,i.en=null,i.sn=null,i.an=null,i.hn=null,i.rendered=!1,n.render&&(i.render=n.render),n.map&&i.setMap(n.map),i.addChangeListener(ns,i.fn);var e=n.source?n.source:null;return i.setSource(e),i}return fs(n,t),n.prototype.getLayersArray=function(t){var n=t||[];return n.push(this),n},n.prototype.getLayerStatesArray=function(t){var n=t||[];return n.push(this.getLayerState()),n},n.prototype.getSource=function(){return this.get(ns)||null},n.prototype.getRenderSource=function(){return this.getSource()},n.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():"undefined"},n.prototype.cn=function(){this.changed()},n.prototype.fn=function(){this.an&&(H(this.an),this.an=null);var t=this.getSource();t&&(this.an=$(t,L,this.cn,this)),this.changed()},n.prototype.getFeatures=function(t){return this.hn?this.hn.getFeatures(t):new Promise((function(t){return t([])}))},n.prototype.getData=function(t){return this.hn&&this.rendered?this.hn.getData(t):null},n.prototype.render=function(t,n){var i=this.getRenderer();if(i.prepareFrame(t))return this.rendered=!0,i.renderFrame(t,n)},n.prototype.unrender=function(){this.rendered=!1},n.prototype.setMapInternal=function(t){t||this.unrender(),this.set(is,t)},n.prototype.getMapInternal=function(){return this.get(is)},n.prototype.setMap=function(t){this.en&&(H(this.en),this.en=null),t||this.changed(),this.sn&&(H(this.sn),this.sn=null),t&&(this.en=$(t,us,(function(t){var n=t.frameState.layerStatesArray,i=this.getLayerState(!1);St(!n.some((function(t){return t.layer===i.layer})),67),n.push(i)}),this),this.sn=$(this,L,t.render,t),this.changed())},n.prototype.setSource=function(t){this.set(ns,t)},n.prototype.getRenderer=function(){return this.hn||(this.hn=this.createRenderer()),this.hn},n.prototype.hasRenderer=function(){return!!this.hn},n.prototype.createRenderer=function(){return null},n.prototype.disposeInternal=function(){this.hn&&(this.hn.dispose(),delete this.hn),this.setSource(null),t.prototype.disposeInternal.call(this)},n}(es),vs=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function ds(t,n){Wo.expire()}var ps=function(t){function n(n){var i=t.call(this)||this;return i.vn=n,i}return vs(n,t),n.prototype.dispatchRenderEvent=function(t,n){r()},n.prototype.calculateMatrices2D=function(t){var n=t.viewState,i=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;sn(i,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),un(r,i)},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e,o,s,u){var a,h=n.viewState;function f(t,n,i,r){return e.call(o,n,t?i:null,r)}var c=h.projection,l=rr(t.slice(),c),v=[[0,0]];if(c.canWrapX()&&r){var d=$n(c.getExtent());v.push([-d,0],[d,0])}for(var p=n.layerStatesArray,y=p.length,m=[],w=[],g=0;g<v.length;g++)for(var b=y-1;b>=0;--b){var x=p[b],M=x.layer;if(M.hasRenderer()&&cs(x,h)&&s.call(u,M)){var _=M.getRenderer(),S=M.getSource();if(_&&S){var O=S.getWrapX()?l:t,j=f.bind(null,x.managed);w[0]=O[0]+v[g][0],w[1]=O[1]+v[g][1],a=_.forEachFeatureAtCoordinate(w,n,i,j,m)}if(a)return a}}if(0!==m.length){var E=1/m.length;return m.forEach((function(t,n){return t.distanceSq+=n*E})),m.sort((function(t,n){return t.distanceSq-n.distanceSq})),m.some((function(t){return a=t.callback(t.feature,t.layer,t.geometry)})),a}},n.prototype.forEachLayerAtPixel=function(t,n,i,e,o){return r()},n.prototype.hasFeatureAtCoordinate=function(t,n,i,r,e,o){return void 0!==this.forEachFeatureAtCoordinate(t,n,i,r,S,this,e,o)},n.prototype.getMap=function(){return this.vn},n.prototype.renderFrame=function(t){r()},n.prototype.scheduleExpireIconCache=function(t){Wo.canExpireCache()&&t.postRenderFunctions.push(ds)},n}(v),ys=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ms=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.inversePixelTransform=i,o.frameState=r,o.context=e,o}return ys(n,t),n}(c),ws="ol-hidden",gs="ol-selectable",bs="ol-unselectable",xs="ol-unsupported",Ms="ol-control",_s="ol-collapsed",Ss=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"),Os=["style","variant","weight","size","lineHeight","family"],js=function(t){var n=t.match(Ss);if(!n)return null;for(var i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,e=Os.length;r<e;++r){var o=n[r+1];void 0!==o&&(i[Os[r]]=o)}return i.families=i.family.split(/,\s?/),i},Es="10px sans-serif",Ts="#000",As="round",Ps=[],Cs="round",ks=10,Is="#000",Ns="center",Ls="middle",zs=[0,0,0,0],Rs=new et,Fs=new N;Fs.setSize=function(){console.warn("labelCache is deprecated.")};var Gs,Ds,qs=null,Us={},Bs=function(){var t,n,i="32px ",r=["monospace","serif"],e=r.length,o="wmytzilWMYTZIL@#/&?$%10";function s(t,s,u){for(var a=!0,h=0;h<e;++h){var f=r[h];if(n=Ws(t+" "+s+" "+i+f,o),u!=f){var c=Ws(t+" "+s+" "+i+u+","+f,o);a=a&&c!=n}}return!!a}function u(){for(var n=!0,i=Rs.getKeys(),r=0,e=i.length;r<e;++r){var o=i[r];Rs.get(o)<100&&(s.apply(this,o.split("\n"))?(P(Us),qs=null,Gs=void 0,Rs.set(o,100)):(Rs.set(o,Rs.get(o)+1,!0),n=!1))}n&&(clearInterval(t),t=void 0)}return function(n){var i=js(n);if(i)for(var r=i.families,e=0,o=r.length;e<o;++e){var a=r[e],h=i.style+"\n"+i.weight+"\n"+a;void 0===Rs.get(h)&&(Rs.set(h,100,!0),s(i.style,i.weight,a)||(Rs.set(h,0,!0),void 0===t&&(t=setInterval(u,32))))}}}(),Xs=function(t){var n=Us[t];if(null==n){if(Vt){var i=js(t),r=Vs(t,"Žg");n=(isNaN(Number(i.lineHeight))?1.2:Number(i.lineHeight))*(r.actualBoundingBoxAscent+r.actualBoundingBoxDescent)}else Ds||((Ds=document.createElement("div")).innerHTML="M",Ds.style.minHeight="0",Ds.style.maxHeight="none",Ds.style.height="auto",Ds.style.padding="0",Ds.style.border="none",Ds.style.position="absolute",Ds.style.display="block",Ds.style.left="-99999px"),Ds.style.font=t,document.body.appendChild(Ds),n=Ds.offsetHeight,document.body.removeChild(Ds);Us[t]=n}return n};function Vs(t,n){return qs||(qs=_o(1,1)),t!=Gs&&(qs.font=t,Gs=qs.font),qs.measureText(n)}function Ws(t,n){return Vs(t,n).width}function Ys(t,n,i){if(n in i)return i[n];var r=n.split("\n").reduce((function(n,i){return Math.max(n,Ws(t,i))}),0);return i[n]=r,r}function Zs(t,n){for(var i=[],r=[],e=[],o=0,s=0,u=0,a=0,h=0,f=n.length;h<=f;h+=2){var c=n[h];if("\n"!==c&&h!==f){var l=n[h+1]||t.font,v=Ws(l,c);i.push(v),s+=v;var d=Xs(l);r.push(d),a=Math.max(a,d)}else o=Math.max(o,s),e.push(s),s=0,u+=a}return{width:o,height:u,widths:i,heights:r,lineWidths:e}}function $s(t,n,i,r,e,o,s,u,a,h,f){t.save(),1!==i&&(t.globalAlpha*=i),n&&t.setTransform.apply(t,n),r.contextInstructions?(t.translate(a,h),t.scale(f[0],f[1]),function(t,n){for(var i=t.contextInstructions,r=0,e=i.length;r<e;r+=2)Array.isArray(i[r+1])?n[i[r]].apply(n,i[r+1]):n[i[r]]=i[r+1]}(r,t)):f[0]<0||f[1]<0?(t.translate(a,h),t.scale(f[0],f[1]),t.drawImage(r,e,o,s,u,0,0,s,u)):t.drawImage(r,e,o,s,u,a,h,s*f[0],u*f[1]),t.restore()}var Ks=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Hs=function(t){function n(n){var i=t.call(this,n)||this;i.dn=$(Rs,l,n.redrawText.bind(n)),i.pn=document.createElement("div");var r=i.pn.style;r.position="absolute",r.width="100%",r.height="100%",r.zIndex="0",i.pn.className="ol-unselectable ol-layers";var e=n.getViewport();return e.insertBefore(i.pn,e.firstChild||null),i.yn=[],i.mn=!0,i}return Ks(n,t),n.prototype.dispatchRenderEvent=function(t,n){var i=this.getMap();if(i.hasListener(t)){var r=new ms(t,void 0,n);i.dispatchEvent(r)}},n.prototype.disposeInternal=function(){H(this.dn),this.pn.parentNode.removeChild(this.pn),t.prototype.disposeInternal.call(this)},n.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(us,t);var n=t.layerStatesArray.sort((function(t,n){return t.zIndex-n.zIndex})),i=t.viewState;this.yn.length=0;for(var r=[],e=null,o=0,s=n.length;o<s;++o){var u=n[o];t.layerIndex=o;var a=u.layer,h=a.getSourceState();if(!cs(u,i)||"ready"!=h&&"undefined"!=h)a.unrender();else{var f=a.render(t,e);f&&(f!==e&&(this.yn.push(f),e=f),"getDeclutter"in a&&r.push(a))}}for(o=r.length-1;o>=0;--o)r[o].renderDeclutter(t);Po(this.pn,this.yn),this.dispatchRenderEvent(as,t),this.mn||(this.pn.style.display="",this.mn=!0),this.scheduleExpireIconCache(t)}else this.mn&&(this.pn.style.display="none",this.mn=!1)},n.prototype.forEachLayerAtPixel=function(t,n,i,r,e){for(var o=n.viewState,s=n.layerStatesArray,u=s.length-1;u>=0;--u){var a=s[u],h=a.layer;if(h.hasRenderer()&&cs(a,o)&&e(h)){var f=h.getRenderer().getDataAtPixel(t,n,i);if(f){var c=r(h,f);if(c)return c}}}},n}(ps),Js=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Qs=function(t){function n(n,i){var r=t.call(this,n)||this;return r.layer=i,r}return Js(n,t),n}(c),tu="layers",nu=function(t){function n(n){var i=this,r=n||{},e=A({},r);delete e.layers;var o=r.layers;return(i=t.call(this,e)||this).on,i.once,i.un,i.wn=[],i.gn={},i.addChangeListener(tu,i.bn),o?Array.isArray(o)?o=new ft(o.slice(),{unique:!0}):St("function"==typeof o.getArray,43):o=new ft(void 0,{unique:!0}),i.setLayers(o),i}return Js(n,t),n.prototype.xn=function(){this.changed()},n.prototype.bn=function(){this.wn.forEach(H),this.wn.length=0;var t=this.getLayers();for(var n in this.wn.push($(t,ot,this.Mn,this),$(t,st,this._n,this)),this.gn)this.gn[n].forEach(H);P(this.gn);for(var i=t.getArray(),r=0,e=i.length;r<e;r++){var o=i[r];this.Sn(o),this.dispatchEvent(new Qs("addlayer",o))}this.changed()},n.prototype.Sn=function(t){var i=[$(t,l,this.xn,this),$(t,L,this.xn,this)];t instanceof n&&i.push($(t,"addlayer",this.On,this),$(t,"removelayer",this.jn,this)),this.gn[o(t)]=i},n.prototype.On=function(t){this.dispatchEvent(new Qs("addlayer",t.layer))},n.prototype.jn=function(t){this.dispatchEvent(new Qs("removelayer",t.layer))},n.prototype.Mn=function(t){var n=t.element;this.Sn(n),this.dispatchEvent(new Qs("addlayer",n)),this.changed()},n.prototype._n=function(t){var n=t.element,i=o(n);this.gn[i].forEach(H),delete this.gn[i],this.dispatchEvent(new Qs("removelayer",n)),this.changed()},n.prototype.getLayers=function(){return this.get(tu)},n.prototype.setLayers=function(t){var n=this.getLayers();if(n)for(var i=n.getArray(),r=0,e=i.length;r<e;++r)this.dispatchEvent(new Qs("removelayer",i[r]));this.set(tu,t)},n.prototype.getLayersArray=function(t){var n=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(n)})),n},n.prototype.getLayerStatesArray=function(t){var n=void 0!==t?t:[],i=n.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(n)}));var r=this.getLayerState(),e=r.zIndex;t||void 0!==r.zIndex||(e=0);for(var o=i,s=n.length;o<s;o++){var u=n[o];u.opacity*=r.opacity,u.visible=u.visible&&r.visible,u.maxResolution=Math.min(u.maxResolution,r.maxResolution),u.minResolution=Math.max(u.minResolution,r.minResolution),u.minZoom=Math.max(u.minZoom,r.minZoom),u.maxZoom=Math.min(u.maxZoom,r.maxZoom),void 0!==r.extent&&(void 0!==u.extent?u.extent=Wn(u.extent,r.extent):u.extent=r.extent),void 0===u.zIndex&&(u.zIndex=e)}return n},n.prototype.getSourceState=function(){return"ready"},n}(es),iu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ru=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.map=i,e.frameState=void 0!==r?r:null,e}return iu(n,t),n}(c),eu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ou=function(t){function n(n,i,r,e,o,s){var u=t.call(this,n,i,o)||this;return u.originalEvent=r,u.En=null,u.Tn=null,u.dragging=void 0!==e&&e,u.activePointers=s,u}return eu(n,t),Object.defineProperty(n.prototype,"pixel",{get:function(){return this.En||(this.En=this.map.getEventPixel(this.originalEvent)),this.En},set:function(t){this.En=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"coordinate",{get:function(){return this.Tn||(this.Tn=this.map.getCoordinateFromPixel(this.pixel)),this.Tn},set:function(t){this.Tn=t},enumerable:!1,configurable:!0}),n.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},n.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},n}(ru),su={SINGLECLICK:"singleclick",CLICK:F,DBLCLICK:G,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},uu="pointermove",au="pointerdown",hu="pointerup",fu="pointerout",cu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lu=function(t){function n(n,i){var r=t.call(this,n)||this;r.vn=n,r.An,r.Pn=!1,r.Cn=!1,r.kn=[],r.In=void 0===i?1:i,r.Nn=null;var e=r.vn.getViewport();return r.Ln=[],r.zn={},r.pn=e,r.Rn=$(e,au,r.Fn,r),r.Gn,r.Dn=$(e,uu,r.qn,r),r.Un=r.Bn.bind(r),r.pn.addEventListener(Y,r.Un,!!Yt&&{passive:!1}),r}return cu(n,t),n.prototype.Xn=function(t){var n=new ou(su.CLICK,this.vn,t);this.dispatchEvent(n),void 0!==this.An?(clearTimeout(this.An),this.An=void 0,n=new ou(su.DBLCLICK,this.vn,t),this.dispatchEvent(n)):this.An=setTimeout(function(){this.An=void 0;var n=new ou(su.SINGLECLICK,this.vn,t);this.dispatchEvent(n)}.bind(this),250)},n.prototype.Vn=function(t){var n=t,i=n.pointerId;if(n.type==su.POINTERUP||n.type==su.POINTERCANCEL){for(var r in delete this.zn[i],this.zn)if(this.zn[r].target!==n.target){delete this.zn[r];break}}else n.type!=su.POINTERDOWN&&n.type!=su.POINTERMOVE||(this.zn[i]=n);this.Ln=C(this.zn)},n.prototype.Wn=function(t){this.Vn(t);var n=new ou(su.POINTERUP,this.vn,t,void 0,void 0,this.Ln);this.dispatchEvent(n),this.Pn&&!n.defaultPrevented&&!this.Cn&&this.Yn(t)&&this.Xn(this.Nn),0===this.Ln.length&&(this.kn.forEach(H),this.kn.length=0,this.Cn=!1,this.Nn=null)},n.prototype.Yn=function(t){return 0===t.button},n.prototype.Fn=function(t){this.Pn=0===this.Ln.length,this.Vn(t);var n=new ou(su.POINTERDOWN,this.vn,t,void 0,void 0,this.Ln);for(var i in this.dispatchEvent(n),this.Nn={},t){var r=t[i];this.Nn[i]="function"==typeof r?j:r}if(0===this.kn.length){var e=this.vn.getOwnerDocument();this.kn.push($(e,su.POINTERMOVE,this.Zn,this),$(e,su.POINTERUP,this.Wn,this),$(this.pn,su.POINTERCANCEL,this.Wn,this)),this.pn.getRootNode&&this.pn.getRootNode()!==e&&this.kn.push($(this.pn.getRootNode(),su.POINTERUP,this.Wn,this))}},n.prototype.Zn=function(t){if(this.$n(t)){this.Vn(t),this.Cn=!0;var n=new ou(su.POINTERDRAG,this.vn,t,this.Cn,void 0,this.Ln);this.dispatchEvent(n)}},n.prototype.qn=function(t){this.Gn=t;var n=!(!this.Nn||!this.$n(t));this.dispatchEvent(new ou(su.POINTERMOVE,this.vn,t,n))},n.prototype.Bn=function(t){var n=this.Gn;n&&!n.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},n.prototype.$n=function(t){return this.Cn||Math.abs(t.clientX-this.Nn.clientX)>this.In||Math.abs(t.clientY-this.Nn.clientY)>this.In},n.prototype.disposeInternal=function(){this.Dn&&(H(this.Dn),this.Dn=null),this.pn.removeEventListener(Y,this.Un),this.Rn&&(H(this.Rn),this.Rn=null),this.kn.forEach(H),this.kn.length=0,this.pn=null,t.prototype.disposeInternal.call(this)},n}(N),vu="postrender",du="movestart",pu="moveend",yu="loadstart",mu="loadend",wu="layergroup",gu="size",bu="target",xu="view",Mu=1/0,_u=function(){function t(t,n){this.Kn=t,this.Hn=n,this.Jn=[],this.Qn=[],this.ti={}}return t.prototype.clear=function(){this.Jn.length=0,this.Qn.length=0,P(this.ti)},t.prototype.dequeue=function(){var t=this.Jn,n=this.Qn,i=t[0];1==t.length?(t.length=0,n.length=0):(t[0]=t.pop(),n[0]=n.pop(),this.ni(0));var r=this.Hn(i);return delete this.ti[r],i},t.prototype.enqueue=function(t){St(!(this.Hn(t)in this.ti),31);var n=this.Kn(t);return n!=Mu&&(this.Jn.push(t),this.Qn.push(n),this.ti[this.Hn(t)]=!0,this.ii(0,this.Jn.length-1),!0)},t.prototype.getCount=function(){return this.Jn.length},t.prototype.ri=function(t){return 2*t+1},t.prototype.ei=function(t){return 2*t+2},t.prototype.oi=function(t){return t-1>>1},t.prototype.si=function(){var t;for(t=(this.Jn.length>>1)-1;t>=0;t--)this.ni(t)},t.prototype.isEmpty=function(){return 0===this.Jn.length},t.prototype.isKeyQueued=function(t){return t in this.ti},t.prototype.isQueued=function(t){return this.isKeyQueued(this.Hn(t))},t.prototype.ni=function(t){for(var n=this.Jn,i=this.Qn,r=n.length,e=n[t],o=i[t],s=t;t<r>>1;){var u=this.ri(t),a=this.ei(t),h=a<r&&i[a]<i[u]?a:u;n[t]=n[h],i[t]=i[h],t=h}n[t]=e,i[t]=o,this.ii(s,t)},t.prototype.ii=function(t,n){for(var i=this.Jn,r=this.Qn,e=i[n],o=r[n];n>t;){var s=this.oi(n);if(!(r[s]>o))break;i[n]=i[s],r[n]=r[s],n=s}i[n]=e,r[n]=o},t.prototype.reprioritize=function(){var t,n,i,r=this.Kn,e=this.Jn,o=this.Qn,s=0,u=e.length;for(n=0;n<u;++n)(i=r(t=e[n]))==Mu?delete this.ti[this.Hn(t)]:(o[s]=i,e[s++]=t);e.length=s,o.length=s,this.si()},t}(),Su=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ou=function(t){function n(n,i){var r=t.call(this,(function(t){return n.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return r.ui=r.handleTileChange.bind(r),r.ai=i,r.hi=0,r.fi={},r}return Su(n,t),n.prototype.enqueue=function(n){var i=t.prototype.enqueue.call(this,n);i&&n[0].addEventListener(L,this.ui);return i},n.prototype.getTilesLoading=function(){return this.hi},n.prototype.handleTileChange=function(t){var n=t.target,i=n.getState();if(i===vt||i===dt||i===pt){n.removeEventListener(L,this.ui);var r=n.getKey();r in this.fi&&(delete this.fi[r],--this.hi),this.ai()}},n.prototype.loadMoreTiles=function(t,n){for(var i,r,e=0;this.hi<t&&e<n&&this.getCount()>0;)r=(i=this.dequeue()[0]).getKey(),i.getState()!==ct||r in this.fi||(this.fi[r]=!0,++this.hi,++e,i.load())},n}(_u);function ju(t,n,i,r,e){if(!t||!(i in t.wantedTiles))return Mu;if(!t.wantedTiles[i][n.getKey()])return Mu;var o=t.viewState.center,s=r[0]-o[0],u=r[1]-o[1];return 65536*Math.log(e)+Math.sqrt(s*s+u*u)/e}var Eu=0,Tu=1,Au={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Pu=256;function Cu(t,n,i){return function(r,e,o,s,u){if(r){if(!e&&!n)return r;var a=n?0:o[0]*e,h=n?0:o[1]*e,f=u?u[0]:0,c=u?u[1]:0,l=t[0]+a/2+f,v=t[2]-a/2+f,d=t[1]+h/2+c,p=t[3]-h/2+c;l>v&&(v=l=(v+l)/2),d>p&&(p=d=(p+d)/2);var y=oi(r[0],l,v),m=oi(r[1],d,p);if(s&&i&&e){var w=30*e;y+=-w*Math.log(1+Math.max(0,l-r[0])/w)+w*Math.log(1+Math.max(0,r[0]-v)/w),m+=-w*Math.log(1+Math.max(0,d-r[1])/w)+w*Math.log(1+Math.max(0,r[1]-p)/w)}return[y,m]}}}function ku(t){return t}function Iu(t,n,i,r){var e=$n(n)/i[0],o=Vn(n)/i[1];return r?Math.min(t,Math.max(e,o)):Math.min(t,Math.min(e,o))}function Nu(t,n,i){var r=Math.min(t,n);return r*=Math.log(1+50*Math.max(0,t/n-1))/50+1,i&&(r=Math.max(r,i),r/=Math.log(1+50*Math.max(0,i/t-1))/50+1),oi(r,i/2,2*n)}function Lu(t,n,i,r){return function(e,o,s,u){if(void 0!==e){var a=t[0],h=t[t.length-1],f=i?Iu(a,i,s,r):a;if(u)return void 0===n||n?Nu(e,f,h):oi(e,h,f);var c=Math.min(f,e),l=Math.floor(m(t,c,o));return t[l]>f&&l<t.length-1?t[l+1]:t[l]}}}function zu(t,n,i,r,e,o){return function(s,u,a,h){if(void 0!==s){var f=e?Iu(n,e,a,o):n,c=void 0!==i?i:0;if(h)return void 0===r||r?Nu(s,f,c):oi(s,c,f);var l=Math.ceil(Math.log(n/f)/Math.log(t)-1e-9),v=-u*(.5-1e-9)+.5,d=Math.min(f,s),p=Math.floor(Math.log(n/d)/Math.log(t)+v),y=Math.max(l,p);return oi(n/Math.pow(t,y),c,f)}}}function Ru(t,n,i,r,e){return function(o,s,u,a){if(void 0!==o){var h=r?Iu(t,r,u,e):t;return(void 0===i||i)&&a?Nu(o,h,n):oi(o,n,h)}}}function Fu(t){return void 0!==t?0:void 0}function Gu(t){return void 0!==t?t:void 0}function Du(t){var n=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/n+.5)*n:void 0}}function qu(t){var n=t||li(5);return function(t,i){return i?t:void 0!==t?Math.abs(t)<=n?0:t:void 0}}var Uu=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Bu(t,n){setTimeout((function(){t(n)}),0)}function Xu(t){if(void 0!==t.extent){var n=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Cu(t.extent,t.constrainOnlyCenter,n)}var i=br(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&i.isGlobal()){var r=i.getExtent().slice();return r[0]=-1/0,r[2]=1/0,Cu(r,!1,!1)}return ku}function Vu(t){var n,i,r,e=void 0!==t.minZoom?t.minZoom:0,o=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2,u=void 0!==t.multiWorld&&t.multiWorld,a=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,h=void 0!==t.showFullExtent&&t.showFullExtent,f=br(t.projection,"EPSG:3857"),c=f.getExtent(),l=t.constrainOnlyCenter,v=t.extent;if(u||v||!f.isGlobal()||(l=!1,v=c),void 0!==t.resolutions){var d=t.resolutions;i=d[e],r=void 0!==d[o]?d[o]:d[d.length-1],n=t.constrainResolution?Lu(d,a,!l&&v,h):Ru(i,r,a,!l&&v,h)}else{var p=(c?Math.max($n(c),Vn(c)):360*Lt[Rt.DEGREES]/f.getMetersPerUnit())/Pu/Math.pow(2,0),y=p/Math.pow(2,28);void 0!==(i=t.maxResolution)?e=0:i=p/Math.pow(s,e),void 0===(r=t.minResolution)&&(r=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(s,o):p/Math.pow(s,o):y),o=e+Math.floor(Math.log(i/r)/Math.log(s)),r=i/Math.pow(s,o-e),n=t.constrainResolution?zu(s,i,r,a,!l&&v,h):Ru(i,r,a,!l&&v,h)}return{constraint:n,maxResolution:i,minResolution:r,minZoom:e,zoomFactor:s}}function Wu(t){if(void 0===t.enableRotation||t.enableRotation){var n=t.constrainRotation;return void 0===n||!0===n?qu():!1===n?Gu:"number"==typeof n?Du(n):Gu}return Fu}function Yu(t){return!(t.sourceCenter&&t.targetCenter&&!Ki(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function Zu(t,n,i,r,e){var o=Math.cos(-e),s=Math.sin(-e),u=t[0]*o-t[1]*s,a=t[1]*o+t[0]*s;return[(u+=(n[0]/2-i[0])*r)*o-(a+=(i[1]-n[1]/2)*r)*(s=-s),a*o+u*s]}var $u=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r=A({},n);return i.ci=[0,0],i.li=[],i.vi,i.di=br(r.projection,"EPSG:3857"),i.yi=[100,100],i.mi=null,i.wi,i.gi,i.bi=null,i.xi,i.Mi,i._i=void 0,r.projection&&cr(),r.center&&(r.center=Ir(r.center,i.di)),r.extent&&(r.extent=Lr(r.extent,i.di)),i.Si(r),i}return Uu(n,t),n.prototype.Si=function(t){var n=A({},t);for(var i in Au)delete n[i];this.setProperties(n,!0);var r=Vu(t);this.Oi=r.maxResolution,this.ji=r.minResolution,this.Ei=r.zoomFactor,this.Ti=t.resolutions,this.Ai=t.padding,this.Pi=r.minZoom;var e=Xu(t),o=r.constraint,s=Wu(t);this.Ci={center:e,resolution:o,rotation:s},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)},Object.defineProperty(n.prototype,"padding",{get:function(){return this.Ai},set:function(t){var n=this.Ai;this.Ai=t;var i=this.getCenter();if(i){var r=t||[0,0,0,0];n=n||[0,0,0,0];var e=this.getResolution(),o=e/2*(r[3]-n[3]+n[1]-r[1]),s=e/2*(r[0]-n[0]+n[2]-r[2]);this.setCenterInternal([i[0]+o,i[1]-s])}},enumerable:!1,configurable:!0}),n.prototype.ki=function(t){var n=this.getProperties();return void 0!==n.resolution?n.resolution=this.getResolution():n.zoom=this.getZoom(),n.center=this.getCenterInternal(),n.rotation=this.getRotation(),A({},n,t)},n.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var n=new Array(arguments.length),i=0;i<n.length;++i){var r=arguments[i];r.center&&((r=A({},r)).center=Ir(r.center,this.getProjection())),r.anchor&&((r=A({},r)).anchor=Ir(r.anchor,this.getProjection())),n[i]=r}this.animateInternal.apply(this,n)},n.prototype.animateInternal=function(t){var n,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(n=arguments[i-1],--i);for(var r=0;r<i&&!this.isDef();++r){var e=arguments[r];e.center&&this.setCenterInternal(e.center),void 0!==e.zoom?this.setZoom(e.zoom):e.resolution&&this.setResolution(e.resolution),void 0!==e.rotation&&this.setRotation(e.rotation)}if(r!==i){for(var o=Date.now(),s=this.mi.slice(),u=this.wi,a=this.gi,h=[];r<i;++r){var f=arguments[r],c={start:o,complete:!1,anchor:f.anchor,duration:void 0!==f.duration?f.duration:1e3,easing:f.easing||wt,callback:n};if(f.center&&(c.sourceCenter=s,c.targetCenter=f.center.slice(),s=c.targetCenter),void 0!==f.zoom?(c.sourceResolution=u,c.targetResolution=this.getResolutionForZoom(f.zoom),u=c.targetResolution):f.resolution&&(c.sourceResolution=u,c.targetResolution=f.resolution,u=c.targetResolution),void 0!==f.rotation){c.sourceRotation=a;var l=vi(f.rotation-a+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=a+l,a=c.targetRotation}Yu(c)?c.complete=!0:o+=c.duration,h.push(c)}this.li.push(h),this.setHint(Eu,1),this.Ii()}else n&&Bu(n,!0)},n.prototype.getAnimating=function(){return this.ci[Eu]>0},n.prototype.getInteracting=function(){return this.ci[Tu]>0},n.prototype.cancelAnimations=function(){var t;this.setHint(Eu,-this.ci[Eu]);for(var n=0,i=this.li.length;n<i;++n){var r=this.li[n];if(r[0].callback&&Bu(r[0].callback,!1),!t)for(var e=0,o=r.length;e<o;++e){var s=r[e];if(!s.complete){t=s.anchor;break}}}this.li.length=0,this._i=t,this.bi=null,this.xi=NaN,this.Mi=NaN},n.prototype.Ii=function(){if(void 0!==this.vi&&(cancelAnimationFrame(this.vi),this.vi=void 0),this.getAnimating()){for(var t=Date.now(),n=!1,i=this.li.length-1;i>=0;--i){for(var r=this.li[i],e=!0,o=0,s=r.length;o<s;++o){var u=r[o];if(!u.complete){var a=t-u.start,h=u.duration>0?a/u.duration:1;h>=1?(u.complete=!0,h=1):e=!1;var f=u.easing(h);if(u.sourceCenter){var c=u.sourceCenter[0],l=u.sourceCenter[1],v=u.targetCenter[0],d=u.targetCenter[1];this.bi=u.targetCenter;var p=c+f*(v-c),y=l+f*(d-l);this.mi=[p,y]}if(u.sourceResolution&&u.targetResolution){var m=1===f?u.targetResolution:u.sourceResolution+f*(u.targetResolution-u.sourceResolution);if(u.anchor){var w=this.Ni(this.getRotation()),g=this.Ci.resolution(m,0,w,!0);this.mi=this.calculateCenterZoom(g,u.anchor)}this.xi=u.targetResolution,this.wi=m,this.Li(!0)}if(void 0!==u.sourceRotation&&void 0!==u.targetRotation){var b=1===f?vi(u.targetRotation+Math.PI,2*Math.PI)-Math.PI:u.sourceRotation+f*(u.targetRotation-u.sourceRotation);if(u.anchor){var x=this.Ci.rotation(b,!0);this.mi=this.calculateCenterRotate(x,u.anchor)}this.Mi=u.targetRotation,this.gi=b}if(this.Li(!0),n=!0,!u.complete)break}}if(e){this.li[i]=null,this.setHint(Eu,-1),this.bi=null,this.xi=NaN,this.Mi=NaN;var M=r[0].callback;M&&Bu(M,!0)}}this.li=this.li.filter(Boolean),n&&void 0===this.vi&&(this.vi=requestAnimationFrame(this.Ii.bind(this)))}},n.prototype.calculateCenterRotate=function(t,n){var i,r=this.getCenterInternal();return void 0!==r&&(Hi(i=[r[0]-n[0],r[1]-n[1]],t-this.getRotation()),Vi(i,n)),i},n.prototype.calculateCenterZoom=function(t,n){var i,r=this.getCenterInternal(),e=this.getResolution();void 0!==r&&void 0!==e&&(i=[n[0]-t*(n[0]-r[0])/e,n[1]-t*(n[1]-r[1])/e]);return i},n.prototype.Ni=function(t){var n=this.yi;if(t){var i=n[0],r=n[1];return[Math.abs(i*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(r*Math.cos(t))]}return n},n.prototype.setViewportSize=function(t){this.yi=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},n.prototype.getCenter=function(){var t=this.getCenterInternal();return t?kr(t,this.getProjection()):t},n.prototype.getCenterInternal=function(){return this.get(Au.CENTER)},n.prototype.getConstraints=function(){return this.Ci},n.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},n.prototype.getHints=function(t){return void 0!==t?(t[0]=this.ci[0],t[1]=this.ci[1],t):this.ci.slice()},n.prototype.calculateExtent=function(t){return Nr(this.calculateExtentInternal(t),this.getProjection())},n.prototype.calculateExtentInternal=function(t){var n=t||this.zi(),i=this.getCenterInternal();St(i,1);var r=this.getResolution();St(void 0!==r,2);var e=this.getRotation();return St(void 0!==e,3),Bn(i,r,e,n)},n.prototype.getMaxResolution=function(){return this.Oi},n.prototype.getMinResolution=function(){return this.ji},n.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.ji)},n.prototype.setMaxZoom=function(t){this.Si(this.ki({maxZoom:t}))},n.prototype.getMinZoom=function(){return this.getZoomForResolution(this.Oi)},n.prototype.setMinZoom=function(t){this.Si(this.ki({minZoom:t}))},n.prototype.setConstrainResolution=function(t){this.Si(this.ki({constrainResolution:t}))},n.prototype.getProjection=function(){return this.di},n.prototype.getResolution=function(){return this.get(Au.RESOLUTION)},n.prototype.getResolutions=function(){return this.Ti},n.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(Lr(t,this.getProjection()),n)},n.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.zi(),r=$n(t)/i[0],e=Vn(t)/i[1];return Math.max(r,e)},n.prototype.getResolutionForValueFunction=function(t){var n=t||2,i=this.getConstrainedResolution(this.Oi),r=this.ji,e=Math.log(i/r)/Math.log(n);return function(t){return i/Math.pow(n,t*e)}},n.prototype.getRotation=function(){return this.get(Au.ROTATION)},n.prototype.getValueForResolutionFunction=function(t){var n=Math.log(t||2),i=this.getConstrainedResolution(this.Oi),r=this.ji,e=Math.log(i/r)/n;return function(t){return Math.log(i/t)/n/e}},n.prototype.zi=function(t){var n=this.Ni(t),i=this.Ai;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n},n.prototype.getState=function(){var t=this.getProjection(),n=this.getResolution(),i=this.getRotation(),r=this.getCenterInternal(),e=this.Ai;if(e){var o=this.zi();r=Zu(r,this.Ni(),[o[0]/2+e[3],o[1]/2+e[0]],n,i)}return{center:r.slice(0),projection:void 0!==t?t:null,resolution:n,nextCenter:this.bi,nextResolution:this.xi,nextRotation:this.Mi,rotation:i,zoom:this.getZoom()}},n.prototype.getZoom=function(){var t,n=this.getResolution();return void 0!==n&&(t=this.getZoomForResolution(n)),t},n.prototype.getZoomForResolution=function(t){var n,i,r=this.Pi||0;if(this.Ti){var e=m(this.Ti,t,1);r=e,n=this.Ti[e],i=e==this.Ti.length-1?2:n/this.Ti[e+1]}else n=this.Oi,i=this.Ei;return r+Math.log(n/t)/Math.log(i)},n.prototype.getResolutionForZoom=function(t){if(this.Ti){if(this.Ti.length<=1)return 0;var n=oi(Math.floor(t),0,this.Ti.length-2),i=this.Ti[n]/this.Ti[n+1];return this.Ti[n]/Math.pow(i,oi(t-n,0,1))}return this.Oi/Math.pow(this.Ei,t-this.Pi)},n.prototype.fit=function(t,n){var i;if(St(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t))St(!Hn(t),25),i=Ze(r=Lr(t,this.getProjection()));else if("Circle"===t.getType()){var r;(i=Ze(r=Lr(t.getExtent(),this.getProjection()))).rotate(this.getRotation(),qn(r))}else{var e=Cr();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,n)},n.prototype.rotatedExtentForGeometry=function(t){for(var n=this.getRotation(),i=Math.cos(n),r=Math.sin(-n),e=t.getFlatCoordinates(),o=t.getStride(),s=1/0,u=1/0,a=-1/0,h=-1/0,f=0,c=e.length;f<c;f+=o){var l=e[f]*i-e[f+1]*r,v=e[f]*r+e[f+1]*i;s=Math.min(s,l),u=Math.min(u,v),a=Math.max(a,l),h=Math.max(h,v)}return[s,u,a,h]},n.prototype.fitInternal=function(t,n){var i=n||{},r=i.size;r||(r=this.zi());var e,o=void 0!==i.padding?i.padding:[0,0,0,0],s=void 0!==i.nearest&&i.nearest;e=void 0!==i.minResolution?i.minResolution:void 0!==i.maxZoom?this.getResolutionForZoom(i.maxZoom):0;var u=this.rotatedExtentForGeometry(t),a=this.getResolutionForExtentInternal(u,[r[0]-o[1]-o[3],r[1]-o[0]-o[2]]);a=isNaN(a)?e:Math.max(a,e),a=this.getConstrainedResolution(a,s?0:1);var h=this.getRotation(),f=Math.sin(h),c=Math.cos(h),l=qn(u);l[0]+=(o[1]-o[3])/2*a,l[1]+=(o[0]-o[2])/2*a;var v=l[0]*c-l[1]*f,d=l[1]*c+l[0]*f,p=this.getConstrainedCenter([v,d],a),y=i.callback?i.callback:j;void 0!==i.duration?this.animateInternal({resolution:a,center:p,duration:i.duration,easing:i.easing},y):(this.wi=a,this.mi=p,this.Li(!1,!0),Bu(y,!0))},n.prototype.centerOn=function(t,n,i){this.centerOnInternal(Ir(t,this.getProjection()),n,i)},n.prototype.centerOnInternal=function(t,n,i){this.setCenterInternal(Zu(t,n,i,this.getResolution(),this.getRotation()))},n.prototype.calculateCenterShift=function(t,n,i,r){var e,o=this.Ai;if(o&&t){var s=this.zi(-i),u=Zu(t,r,[s[0]/2+o[3],s[1]/2+o[0]],n,i);e=[t[0]-u[0],t[1]-u[1]]}return e},n.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},n.prototype.adjustCenter=function(t){var n=kr(this.mi,this.getProjection());this.setCenter([n[0]+t[0],n[1]+t[1]])},n.prototype.adjustCenterInternal=function(t){var n=this.mi;this.setCenterInternal([n[0]+t[0],n[1]+t[1]])},n.prototype.adjustResolution=function(t,n){var i=n&&Ir(n,this.getProjection());this.adjustResolutionInternal(t,i)},n.prototype.adjustResolutionInternal=function(t,n){var i=this.getAnimating()||this.getInteracting(),r=this.Ni(this.getRotation()),e=this.Ci.resolution(this.wi*t,0,r,i);n&&(this.mi=this.calculateCenterZoom(e,n)),this.wi*=t,this.Li()},n.prototype.adjustZoom=function(t,n){this.adjustResolution(Math.pow(this.Ei,-t),n)},n.prototype.adjustRotation=function(t,n){n&&(n=Ir(n,this.getProjection())),this.adjustRotationInternal(t,n)},n.prototype.adjustRotationInternal=function(t,n){var i=this.getAnimating()||this.getInteracting(),r=this.Ci.rotation(this.gi+t,i);n&&(this.mi=this.calculateCenterRotate(r,n)),this.gi+=t,this.Li()},n.prototype.setCenter=function(t){this.setCenterInternal(t?Ir(t,this.getProjection()):t)},n.prototype.setCenterInternal=function(t){this.mi=t,this.Li()},n.prototype.setHint=function(t,n){return this.ci[t]+=n,this.changed(),this.ci[t]},n.prototype.setResolution=function(t){this.wi=t,this.Li()},n.prototype.setRotation=function(t){this.gi=t,this.Li()},n.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},n.prototype.Li=function(t,n){var i=this.getAnimating()||this.getInteracting()||n,r=this.Ci.rotation(this.gi,i),e=this.Ni(r),o=this.Ci.resolution(this.wi,0,e,i),s=this.Ci.center(this.mi,o,e,i,this.calculateCenterShift(this.mi,o,r,e));this.get(Au.ROTATION)!==r&&this.set(Au.ROTATION,r),this.get(Au.RESOLUTION)!==o&&(this.set(Au.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(Au.CENTER)&&Ki(this.get(Au.CENTER),s)||this.set(Au.CENTER,s),this.getAnimating()&&!t&&this.cancelAnimations(),this._i=void 0},n.prototype.resolveConstraints=function(t,n,i){var r=void 0!==t?t:200,e=n||0,o=this.Ci.rotation(this.gi),s=this.Ni(o),u=this.Ci.resolution(this.wi,e,s),a=this.Ci.center(this.mi,u,s,!1,this.calculateCenterShift(this.mi,u,o,s));if(0===r&&!this._i)return this.wi=u,this.gi=o,this.mi=a,void this.Li();var h=i||(0===r?this._i:void 0);this._i=void 0,this.getResolution()===u&&this.getRotation()===o&&this.getCenterInternal()&&Ki(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:o,center:a,resolution:u,duration:r,easing:mt,anchor:h}))},n.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Tu,1)},n.prototype.endInteraction=function(t,n,i){var r=i&&Ir(i,this.getProjection());this.endInteractionInternal(t,n,r)},n.prototype.endInteractionInternal=function(t,n,i){this.setHint(Tu,-1),this.resolveConstraints(t,n,i)},n.prototype.getConstrainedCenter=function(t,n){var i=this.Ni(this.getRotation());return this.Ci.center(t,n||this.getResolution(),i)},n.prototype.getConstrainedZoom=function(t,n){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,n))},n.prototype.getConstrainedResolution=function(t,n){var i=n||0,r=this.Ni(this.getRotation());return this.Ci.resolution(t,i,r)},n}(et);function Ku(t,n,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*n,i[1]=t[1]+2*n,i}function Hu(t){return t[0]>0&&t[1]>0}function Ju(t,n,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*n+.5|0,i[1]=t[1]*n+.5|0,i}function Qu(t,n){return Array.isArray(t)?t:(void 0===n?n=[t,t]:(n[0]=t,n[1]=t),n)}var ta=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function na(t){t instanceof ls?t.setMapInternal(null):t instanceof nu&&t.getLayers().forEach(na)}function ia(t,n){if(t instanceof ls)t.setMapInternal(n);else if(t instanceof nu)for(var i=t.getLayers().getArray(),r=0,e=i.length;r<e;++r)ia(i[r],n)}var ra=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r=function(t){var n=null;void 0!==t.keyboardEventTarget&&(n="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,r,e,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new nu({layers:t.layers});o[wu]=s,o[bu]=t.target,o[xu]=t.view instanceof $u?t.view:new $u,void 0!==t.controls&&(Array.isArray(t.controls)?i=new ft(t.controls.slice()):(St("function"==typeof t.controls.getArray,47),i=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new ft(t.interactions.slice()):(St("function"==typeof t.interactions.getArray,48),r=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?e=new ft(t.overlays.slice()):(St("function"==typeof t.overlays.getArray,49),e=t.overlays):e=new ft;return{controls:i,interactions:r,keyboardEventTarget:n,overlays:e,values:o}}(n);i.Ri,i.Fi=!0,i.Gi=i.handleBrowserEvent.bind(i),i.Di=void 0!==n.maxTilesLoading?n.maxTilesLoading:16,i.kt=void 0!==n.pixelRatio?n.pixelRatio:Xt,i.qi,i.Ui,i.Bi=function(){this.Ui=void 0,this.Xi(Date.now())}.bind(i),i.Vi=[1,0,0,1,0,0],i.Wi=[1,0,0,1,0,0],i.Yi=0,i.Zi=null,i.$i=null,i.Ki=null,i.Hi=null,i.Ji=null,i.Qi=document.createElement("div"),i.Qi.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),i.Qi.style.position="relative",i.Qi.style.overflow="hidden",i.Qi.style.width="100%",i.Qi.style.height="100%",i.tr=document.createElement("div"),i.tr.style.position="absolute",i.tr.style.zIndex="0",i.tr.style.width="100%",i.tr.style.height="100%",i.tr.style.pointerEvents="none",i.tr.className="ol-overlaycontainer",i.Qi.appendChild(i.tr),i.nr=document.createElement("div"),i.nr.style.position="absolute",i.nr.style.zIndex="0",i.nr.style.width="100%",i.nr.style.height="100%",i.nr.style.pointerEvents="none",i.nr.className="ol-overlaycontainer-stopevent",i.Qi.appendChild(i.nr),i.ir=null,i.In=n.moveTolerance,i.rr=r.keyboardEventTarget,i.er=null,i.controls=r.controls||new ft,i.interactions=r.interactions||new ft,i.sr=r.overlays,i.ur={},i.hn=null,i.ar=[],i.hr=new Ou(i.getTilePriority.bind(i),i.cr.bind(i)),i.addChangeListener(wu,i.lr),i.addChangeListener(xu,i.vr),i.addChangeListener(gu,i.dr),i.addChangeListener(bu,i.pr),i.setProperties(r.values);var e=i;return!n.view||n.view instanceof $u||n.view.then((function(t){e.setView(new $u(t))})),i.controls.addEventListener(ot,function(t){t.element.setMap(this)}.bind(i)),i.controls.addEventListener(st,function(t){t.element.setMap(null)}.bind(i)),i.interactions.addEventListener(ot,function(t){t.element.setMap(this)}.bind(i)),i.interactions.addEventListener(st,function(t){t.element.setMap(null)}.bind(i)),i.sr.addEventListener(ot,function(t){this.yr(t.element)}.bind(i)),i.sr.addEventListener(st,function(t){var n=t.element.getId();void 0!==n&&delete this.ur[n.toString()],t.element.setMap(null)}.bind(i)),i.controls.forEach(function(t){t.setMap(this)}.bind(i)),i.interactions.forEach(function(t){t.setMap(this)}.bind(i)),i.sr.forEach(i.yr.bind(i)),i}return ta(n,t),n.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},n.prototype.addControl=function(t){this.getControls().push(t)},n.prototype.addInteraction=function(t){this.getInteractions().push(t)},n.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},n.prototype.mr=function(t){ia(t.layer,this)},n.prototype.addOverlay=function(t){this.getOverlays().push(t)},n.prototype.yr=function(t){var n=t.getId();void 0!==n&&(this.ur[n.toString()]=t),t.setMap(this)},n.prototype.disposeInternal=function(){this.controls.clear(),this.interactions.clear(),this.sr.clear(),this.setTarget(null),t.prototype.disposeInternal.call(this)},n.prototype.forEachFeatureAtPixel=function(t,n,i){if(this.Zi&&this.hn){var r=this.getCoordinateFromPixelInternal(t),e=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,o=void 0!==i.layerFilter?i.layerFilter:S,s=!1!==i.checkWrapped;return this.hn.forEachFeatureAtCoordinate(r,this.Zi,e,s,n,null,o,null)}},n.prototype.getFeaturesAtPixel=function(t,n){var i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),n),i},n.prototype.getAllLayers=function(){var t=[];return function n(i){i.forEach((function(i){i instanceof nu?n(i.getLayers()):t.push(i)}))}(this.getLayers()),t},n.prototype.forEachLayerAtPixel=function(t,n,i){if(this.Zi&&this.hn){var r=i||{},e=void 0!==r.hitTolerance?r.hitTolerance:0,o=r.layerFilter||S;return this.hn.forEachLayerAtPixel(t,this.Zi,e,n,o)}},n.prototype.hasFeatureAtPixel=function(t,n){if(!this.Zi||!this.hn)return!1;var i=this.getCoordinateFromPixelInternal(t),r=void 0!==(n=void 0!==n?n:{}).layerFilter?n.layerFilter:S,e=void 0!==n.hitTolerance?n.hitTolerance:0,o=!1!==n.checkWrapped;return this.hn.hasFeatureAtCoordinate(i,this.Zi,e,o,r,null)},n.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},n.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},n.prototype.getEventPixel=function(t){var n=this.Qi.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-n.left,i.clientY-n.top]},n.prototype.getTarget=function(){return this.get(bu)},n.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},n.prototype.getCoordinateFromPixel=function(t){return kr(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},n.prototype.getCoordinateFromPixelInternal=function(t){var n=this.Zi;return n?tn(n.pixelToCoordinateTransform,t.slice()):null},n.prototype.getControls=function(){return this.controls},n.prototype.getOverlays=function(){return this.sr},n.prototype.getOverlayById=function(t){var n=this.ur[t.toString()];return void 0!==n?n:null},n.prototype.getInteractions=function(){return this.interactions},n.prototype.getLayerGroup=function(){return this.get(wu)},n.prototype.setLayers=function(t){var n=this.getLayerGroup();if(t instanceof ft)n.setLayers(t);else{var i=n.getLayers();i.clear(),i.extend(t)}},n.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},n.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,i=t.length;n<i;++n){var r=t[n];if(r.visible){var e=r.layer.getRenderer();if(e&&!e.ready)return!0;var o=r.layer.getSource();if(o&&o.loading)return!0}}return!1},n.prototype.getPixelFromCoordinate=function(t){var n=Ir(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(n)},n.prototype.getPixelFromCoordinateInternal=function(t){var n=this.Zi;return n?tn(n.coordinateToPixelTransform,t.slice(0,2)):null},n.prototype.getRenderer=function(){return this.hn},n.prototype.getSize=function(){return this.get(gu)},n.prototype.getView=function(){return this.get(xu)},n.prototype.getViewport=function(){return this.Qi},n.prototype.getOverlayContainer=function(){return this.tr},n.prototype.getOverlayContainerStopEvent=function(){return this.nr},n.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},n.prototype.getTilePriority=function(t,n,i,r){return ju(this.Zi,t,n,i,r)},n.prototype.handleBrowserEvent=function(t,n){var i=n||t.type,r=new ou(i,this,t);this.handleMapBrowserEvent(r)},n.prototype.handleMapBrowserEvent=function(t){if(this.Zi){var n=t.originalEvent,i=n.type;if(i===au||i===Z||i===B){var r=this.getOwnerDocument(),e=this.Qi.getRootNode?this.Qi.getRootNode():r,o=n.target;if(this.nr.contains(o)||!(e===r?r.documentElement:e).contains(o))return}if(t.frameState=this.Zi,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),u=s.length-1;u>=0;u--){var a=s[u];if(a.getMap()===this&&a.getActive()&&this.getTargetElement())if(!a.handleEvent(t)||t.propagationStopped)break}}},n.prototype.handlePostRender=function(){var t=this.Zi,n=this.hr;if(!n.isEmpty()){var i=this.Di,r=i;if(t){var e=t.viewHints;if(e[Eu]||e[Tu]){var o=Date.now()-t.time>8;i=o?0:8,r=o?0:2}}n.getTilesLoading()<i&&(n.reprioritize(),n.loadMoreTiles(i,r))}t&&this.hn&&!t.animate&&(!0===this.Ri?(this.hasListener(hs)&&this.hn.dispatchRenderEvent(hs,t),!1===this.Fi&&(this.Fi=!0,this.dispatchEvent(new ru(mu,this,t)))):!0===this.Fi&&(this.Fi=!1,this.dispatchEvent(new ru(yu,this,t))));for(var s=this.ar,u=0,a=s.length;u<a;++u)s[u](this,t);s.length=0},n.prototype.dr=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},n.prototype.pr=function(){if(this.ir){for(var t=0,n=this.er.length;t<n;++t)H(this.er[t]);this.er=null,this.Qi.removeEventListener(R,this.Gi),this.Qi.removeEventListener(Z,this.Gi),this.ir.dispose(),this.ir=null,To(this.Qi)}var i=this.getTargetElement();if(i){for(var r in i.appendChild(this.Qi),this.hn||(this.hn=this.createRenderer()),this.ir=new lu(this,this.In),su)this.ir.addEventListener(su[r],this.handleMapBrowserEvent.bind(this));this.Qi.addEventListener(R,this.Gi,!1),this.Qi.addEventListener(Z,this.Gi,!!Yt&&{passive:!1});var e=this.getOwnerDocument().defaultView,o=this.rr?this.rr:i;this.er=[$(o,B,this.handleBrowserEvent,this),$(o,X,this.handleBrowserEvent,this),$(e,W,this.updateSize,this)]}else this.hn&&(clearTimeout(this.qi),this.qi=void 0,this.ar.length=0,this.hn.dispose(),this.hn=null),this.Ui&&(cancelAnimationFrame(this.Ui),this.Ui=void 0);this.updateSize()},n.prototype.cr=function(){this.render()},n.prototype.wr=function(){this.render()},n.prototype.vr=function(){this.Ki&&(H(this.Ki),this.Ki=null),this.Hi&&(H(this.Hi),this.Hi=null);var t=this.getView();t&&(this.gr(),this.Ki=$(t,l,this.wr,this),this.Hi=$(t,L,this.wr,this),t.resolveConstraints(0)),this.render()},n.prototype.lr=function(){this.Ji&&(this.Ji.forEach(H),this.Ji=null);var t=this.getLayerGroup();t&&(this.mr(new Qs("addlayer",t)),this.Ji=[$(t,l,this.render,this),$(t,L,this.render,this),$(t,"addlayer",this.mr,this),$(t,"removelayer",this.br,this)]),this.render()},n.prototype.isRendered=function(){return!!this.Zi},n.prototype.renderSync=function(){this.Ui&&cancelAnimationFrame(this.Ui),this.Bi()},n.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,i=t.length;n<i;++n){var r=t[n].layer;r.hasRenderer()&&r.getRenderer().handleFontsChanged()}},n.prototype.render=function(){this.hn&&void 0===this.Ui&&(this.Ui=requestAnimationFrame(this.Bi))},n.prototype.removeControl=function(t){return this.getControls().remove(t)},n.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},n.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},n.prototype.br=function(t){na(t.layer)},n.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},n.prototype.Xi=function(t){var n=this,i=this.getSize(),r=this.getView(),e=this.Zi,s=null;if(void 0!==i&&Hu(i)&&r&&r.isDef()){var u=r.getHints(this.Zi?this.Zi.viewHints:void 0),a=r.getState();if(s={animate:!1,coordinateToPixelTransform:this.Vi,declutterTree:null,extent:Bn(a.center,a.resolution,a.rotation,i),index:this.Yi++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.kt,pixelToCoordinateTransform:this.Wi,postRenderFunctions:[],size:i,tileQueue:this.hr,time:t,usedTiles:{},viewState:a,viewHints:u,wantedTiles:{},mapId:o(this),renderTargets:{}},a.nextCenter&&a.nextResolution){var h=isNaN(a.nextRotation)?a.rotation:a.nextRotation;s.nextExtent=Bn(a.nextCenter,a.nextResolution,h,i)}}if(this.Zi=s,this.hn.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.ar,s.postRenderFunctions),e)(!this.$i||!Hn(this.$i)&&!An(s.extent,this.$i))&&(this.dispatchEvent(new ru(du,this,e)),this.$i=jn(this.$i));this.$i&&!s.viewHints[Eu]&&!s.viewHints[Tu]&&!An(s.extent,this.$i)&&(this.dispatchEvent(new ru(pu,this,s)),wn(s.extent,this.$i))}this.dispatchEvent(new ru(vu,this,s)),this.Ri=this.hasListener(yu)||this.hasListener(mu)||this.hasListener(hs)?!this.hr.getTilesLoading()&&!this.hr.getCount()&&!this.getLoadingOrNotReady():void 0,this.qi||(this.qi=setTimeout((function(){n.qi=void 0,n.handlePostRender()}),0))},n.prototype.setLayerGroup=function(t){var n=this.getLayerGroup();n&&this.br(new Qs("removelayer",n)),this.set(wu,t)},n.prototype.setSize=function(t){this.set(gu,t)},n.prototype.setTarget=function(t){this.set(bu,t)},n.prototype.setView=function(t){if(!t||t instanceof $u)this.set(xu,t);else{this.set(xu,new $u);var n=this;t.then((function(t){n.setView(new $u(t))}))}},n.prototype.updateSize=function(){var t=this.getTargetElement(),n=void 0;if(t){var i=getComputedStyle(t),r=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),e=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);isNaN(r)||isNaN(e)||!Hu(n=[r,e])&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0.")}this.setSize(n),this.gr()},n.prototype.gr=function(){var t=this.getView();if(t){var n=void 0,i=getComputedStyle(this.Qi);i.width&&i.height&&(n=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(n)}},n}(et),ea=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),oa=function(t){function n(n){var i=t.call(this)||this,r=n.element;return!r||n.target||r.style.pointerEvents||(r.style.pointerEvents="auto"),i.element=r||null,i.Mr=null,i.vn=null,i.listenerKeys=[],n.render&&(i.render=n.render),n.target&&i.setTarget(n.target),i}return ea(n,t),n.prototype.disposeInternal=function(){To(this.element),t.prototype.disposeInternal.call(this)},n.prototype.getMap=function(){return this.vn},n.prototype.setMap=function(t){this.vn&&To(this.element);for(var n=0,i=this.listenerKeys.length;n<i;++n)H(this.listenerKeys[n]);(this.listenerKeys.length=0,this.vn=t,t)&&((this.Mr?this.Mr:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==j&&this.listenerKeys.push($(t,vu,this.render,this)),t.render())},n.prototype.render=function(t){},n.prototype.setTarget=function(t){this.Mr="string"==typeof t?document.getElementById(t):t},n}(et),sa=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ua=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this)._r=document.createElement("ul"),i.Sr=void 0===r.collapsed||r.collapsed,i.jr=i.Sr,i.Er=void 0!==r.collapsible,i.Tr=void 0===r.collapsible||r.collapsible,i.Tr||(i.Sr=!1);var e=void 0!==r.className?r.className:"ol-attribution",o=void 0!==r.tipLabel?r.tipLabel:"Attributions",s=void 0!==r.expandClassName?r.expandClassName:e+"-expand",u=void 0!==r.collapseLabel?r.collapseLabel:"›",a=void 0!==r.collapseClassName?r.collapseClassName:e+"-collapse";"string"==typeof u?(i.Ar=document.createElement("span"),i.Ar.textContent=u,i.Ar.className=a):i.Ar=u;var h=void 0!==r.label?r.label:"i";"string"==typeof h?(i.Pr=document.createElement("span"),i.Pr.textContent=h,i.Pr.className=s):i.Pr=h;var f=i.Tr&&!i.Sr?i.Ar:i.Pr;i.Cr=document.createElement("button"),i.Cr.setAttribute("type","button"),i.Cr.setAttribute("aria-expanded",String(!i.Sr)),i.Cr.title=o,i.Cr.appendChild(f),i.Cr.addEventListener(F,i.kr.bind(i),!1);var c=e+" "+"ol-unselectable "+Ms+(i.Sr&&i.Tr?" ol-collapsed":"")+(i.Tr?"":" ol-uncollapsible"),l=i.element;return l.className=c,l.appendChild(i.Cr),l.appendChild(i._r),i.Ir=[],i.mn=!0,i}return sa(n,t),n.prototype.Nr=function(t){for(var n={},i=[],r=!0,e=t.layerStatesArray,o=0,s=e.length;o<s;++o){var u=e[o];if(cs(u,t.viewState)){var a=u.layer.getSource();if(a){var h=a.getAttributions();if(h){var f=h(t);if(f)if(r=r&&!1!==a.getAttributionsCollapsible(),Array.isArray(f))for(var c=0,l=f.length;c<l;++c)f[c]in n||(i.push(f[c]),n[f[c]]=!0);else f in n||(i.push(f),n[f]=!0)}}}}return this.Er||this.setCollapsible(r),i},n.prototype.Lr=function(t){if(t){var n=this.Nr(t),i=n.length>0;if(this.mn!=i&&(this.element.style.display=i?"":"none",this.mn=i),!x(n,this.Ir)){Ao(this._r);for(var r=0,e=n.length;r<e;++r){var o=document.createElement("li");o.innerHTML=n[r],this._r.appendChild(o)}this.Ir=n}}else this.mn&&(this.element.style.display="none",this.mn=!1)},n.prototype.kr=function(t){t.preventDefault(),this.zr(),this.jr=this.Sr},n.prototype.zr=function(){this.element.classList.toggle(_s),this.Sr?Eo(this.Ar,this.Pr):Eo(this.Pr,this.Ar),this.Sr=!this.Sr,this.Cr.setAttribute("aria-expanded",String(!this.Sr))},n.prototype.getCollapsible=function(){return this.Tr},n.prototype.setCollapsible=function(t){this.Tr!==t&&(this.Tr=t,this.element.classList.toggle("ol-uncollapsible"),this.jr&&this.zr())},n.prototype.setCollapsed=function(t){this.jr=t,this.Tr&&this.Sr!==t&&this.zr()},n.prototype.getCollapsed=function(){return this.Sr},n.prototype.render=function(t){this.Lr(t.frameState)},n}(oa),aa=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ha=function(t){function n(n){var i=this,r=n||{};i=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this;var e=void 0!==r.className?r.className:"ol-rotate",o=void 0!==r.label?r.label:"⇧",s=void 0!==r.compassClassName?r.compassClassName:"ol-compass";i.Pr=null,"string"==typeof o?(i.Pr=document.createElement("span"),i.Pr.className=s,i.Pr.textContent=o):(i.Pr=o,i.Pr.classList.add(s));var u=r.tipLabel?r.tipLabel:"Reset rotation",a=document.createElement("button");a.className=e+"-reset",a.setAttribute("type","button"),a.title=u,a.appendChild(i.Pr),a.addEventListener(F,i.kr.bind(i),!1);var h=e+" "+"ol-unselectable "+Ms,f=i.element;return f.className=h,f.appendChild(a),i.Rr=r.resetNorth?r.resetNorth:void 0,i.Fr=void 0!==r.duration?r.duration:250,i.Gr=void 0===r.autoHide||r.autoHide,i.Dr=void 0,i.Gr&&i.element.classList.add(ws),i}return aa(n,t),n.prototype.kr=function(t){t.preventDefault(),void 0!==this.Rr?this.Rr():this.qr()},n.prototype.qr=function(){var t=this.getMap().getView();if(t){var n=t.getRotation();void 0!==n&&(this.Fr>0&&n%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.Fr,easing:mt}):t.setRotation(0))}},n.prototype.render=function(t){var n=t.frameState;if(n){var i=n.viewState.rotation;if(i!=this.Dr){var r="rotate("+i+"rad)";if(this.Gr){var e=this.element.classList.contains(ws);e||0!==i?e&&0!==i&&this.element.classList.remove(ws):this.element.classList.add(ws)}this.Pr.style.transform=r}this.Dr=i}},n}(oa),fa=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ca=function(t){function n(n){var i=this,r=n||{};i=t.call(this,{element:document.createElement("div"),target:r.target})||this;var e=void 0!==r.className?r.className:"ol-zoom",o=void 0!==r.delta?r.delta:1,s=void 0!==r.zoomInClassName?r.zoomInClassName:e+"-in",u=void 0!==r.zoomOutClassName?r.zoomOutClassName:e+"-out",a=void 0!==r.zoomInLabel?r.zoomInLabel:"+",h=void 0!==r.zoomOutLabel?r.zoomOutLabel:"–",f=void 0!==r.zoomInTipLabel?r.zoomInTipLabel:"Zoom in",c=void 0!==r.zoomOutTipLabel?r.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=s,l.setAttribute("type","button"),l.title=f,l.appendChild("string"==typeof a?document.createTextNode(a):a),l.addEventListener(F,i.kr.bind(i,o),!1);var v=document.createElement("button");v.className=u,v.setAttribute("type","button"),v.title=c,v.appendChild("string"==typeof h?document.createTextNode(h):h),v.addEventListener(F,i.kr.bind(i,-o),!1);var d=e+" "+"ol-unselectable "+Ms,p=i.element;return p.className=d,p.appendChild(l),p.appendChild(v),i.Fr=void 0!==r.duration?r.duration:250,i}return fa(n,t),n.prototype.kr=function(t,n){n.preventDefault(),this.Ur(t)},n.prototype.Ur=function(t){var n=this.getMap().getView();if(n){var i=n.getZoom();if(void 0!==i){var r=n.getConstrainedZoom(i+t);this.Fr>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:r,duration:this.Fr,easing:mt})):n.setZoom(r)}}},n}(oa);function la(t){var n=t||{},i=new ft;return(void 0===n.zoom||n.zoom)&&i.push(new ca(n.zoomOptions)),(void 0===n.rotate||n.rotate)&&i.push(new ha(n.rotateOptions)),(void 0===n.attribution||n.attribution)&&i.push(new ua(n.attributionOptions)),i}var va="active",da=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function pa(t,n,i){var r=t.getCenterInternal();if(r){var e=[r[0]+n[0],r[1]+n[1]];t.animateInternal({duration:void 0!==i?i:250,easing:gt,center:t.getConstrainedCenter(e)})}}function ya(t,n,i,r){var e=t.getZoom();if(void 0!==e){var o=t.getConstrainedZoom(e+n),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:i,duration:void 0!==r?r:250,easing:mt})}}var ma=function(t){function n(n){var i=t.call(this)||this;return i.on,i.once,i.un,n&&n.handleEvent&&(i.handleEvent=n.handleEvent),i.vn=null,i.setActive(!0),i}return da(n,t),n.prototype.getActive=function(){return this.get(va)},n.prototype.getMap=function(){return this.vn},n.prototype.handleEvent=function(t){return!0},n.prototype.setActive=function(t){this.set(va,t)},n.prototype.setMap=function(t){this.vn=t},n}(et),wa=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ga=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Br=r.delta?r.delta:1,i.Fr=void 0!==r.duration?r.duration:250,i}return wa(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==su.DBLCLICK){var i=t.originalEvent,r=t.map,e=t.coordinate,o=i.shiftKey?-this.Br:this.Br;ya(r.getView(),o,e,this.Fr),i.preventDefault(),n=!0}return!n},n}(ma),ba=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function xa(t){for(var n=t.length,i=0,r=0,e=0;e<n;e++)i+=t[e].clientX,r+=t[e].clientY;return[i/n,r/n]}var Ma=function(t){function n(n){var i=this,r=n||{};return i=t.call(this,r)||this,r.handleDownEvent&&(i.handleDownEvent=r.handleDownEvent),r.handleDragEvent&&(i.handleDragEvent=r.handleDragEvent),r.handleMoveEvent&&(i.handleMoveEvent=r.handleMoveEvent),r.handleUpEvent&&(i.handleUpEvent=r.handleUpEvent),r.stopDown&&(i.stopDown=r.stopDown),i.handlingDownUpSequence=!1,i.targetPointers=[],i}return ba(n,t),n.prototype.getPointerCount=function(){return this.targetPointers.length},n.prototype.handleDownEvent=function(t){return!1},n.prototype.handleDragEvent=function(t){},n.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var n=!1;if(this.Xr(t),this.handlingDownUpSequence){if(t.type==su.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==su.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==su.POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,n=this.stopDown(r)}else t.type==su.POINTERMOVE&&this.handleMoveEvent(t);return!n},n.prototype.handleMoveEvent=function(t){},n.prototype.handleUpEvent=function(t){return!1},n.prototype.stopDown=function(t){return t},n.prototype.Xr=function(t){t.activePointers&&(this.targetPointers=t.activePointers)},n}(ma);function _a(t){var n=arguments;return function(t){for(var i=!0,r=0,e=n.length;r<e&&(i=i&&n[r](t));++r);return i}}var Sa=function(t){var n=t.originalEvent;return n.altKey&&!(n.metaKey||n.ctrlKey)&&!n.shiftKey},Oa=function(t){var n=t.originalEvent;return n.altKey&&!(n.metaKey||n.ctrlKey)&&n.shiftKey},ja=function(t){var n=t.map.getTargetElement(),i=t.map.getOwnerDocument().activeElement;return n.contains(i)},Ea=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||ja(t)},Ta=S,Aa=function(t){var n=t.originalEvent;return 0==n.button&&!(Ut&&Bt&&n.ctrlKey)},Pa=O,Ca=function(t){return t.type==su.SINGLECLICK},ka=function(t){var n=t.originalEvent;return!n.altKey&&!(n.metaKey||n.ctrlKey)&&!n.shiftKey},Ia=function(t){var n=t.originalEvent;return!n.altKey&&!(n.metaKey||n.ctrlKey)&&n.shiftKey},Na=function(t){var n=t.originalEvent,i=n.target.tagName;return"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i&&!n.target.isContentEditable},La=function(t){var n=t.originalEvent;return St(void 0!==n,56),"mouse"==n.pointerType},za=function(t){var n=t.originalEvent;return St(void 0!==n,56),n.isPrimary&&0===n.button},Ra=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Fa=function(t){function n(n){var i=t.call(this,{stopDown:O})||this,r=n||{};i.Vr=r.kinetic,i.lastCentroid=null,i.Wr,i.Yr=!1;var e=r.condition?r.condition:_a(ka,za);return i.Zr=r.onFocusOnly?_a(Ea,e):e,i.$r=!1,i}return Ra(n,t),n.prototype.handleDragEvent=function(t){this.Yr||(this.Yr=!0,this.getMap().getView().beginInteraction());var n=this.targetPointers,i=xa(n);if(n.length==this.Wr){if(this.Vr&&this.Vr.update(i[0],i[1]),this.lastCentroid){var r=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],e=t.map.getView();Ji(r,e.getResolution()),Hi(r,e.getRotation()),e.adjustCenterInternal(r)}}else this.Vr&&this.Vr.begin();this.lastCentroid=i,this.Wr=n.length,t.originalEvent.preventDefault()},n.prototype.handleUpEvent=function(t){var n=t.map,i=n.getView();if(0===this.targetPointers.length){if(!this.$r&&this.Vr&&this.Vr.end()){var r=this.Vr.getDistance(),e=this.Vr.getAngle(),o=i.getCenterInternal(),s=n.getPixelFromCoordinateInternal(o),u=n.getCoordinateFromPixelInternal([s[0]-r*Math.cos(e),s[1]-r*Math.sin(e)]);i.animateInternal({center:i.getConstrainedCenter(u),duration:500,easing:mt})}return this.Yr&&(this.Yr=!1,i.endInteraction()),!1}return this.Vr&&this.Vr.begin(),this.lastCentroid=null,!0},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.Zr(t)){var n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.Vr&&this.Vr.begin(),this.$r=this.targetPointers.length>1,!0}return!1},n}(Ma),Ga=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Da=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,{stopDown:O})||this).Zr=r.condition?r.condition:Oa,i.Kr=void 0,i.Fr=void 0!==r.duration?r.duration:250,i}return Ga(n,t),n.prototype.handleDragEvent=function(t){if(La(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==Fu){var r=n.getSize(),e=t.pixel,o=Math.atan2(r[1]/2-e[1],e[0]-r[0]/2);if(void 0!==this.Kr){var s=o-this.Kr;i.adjustRotationInternal(-s)}this.Kr=o}}},n.prototype.handleUpEvent=function(t){return!La(t)||(t.map.getView().endInteraction(this.Fr),!1)},n.prototype.handleDownEvent=function(t){return!!La(t)&&(!(!Aa(t)||!this.Zr(t))&&(t.map.getView().beginInteraction(),this.Kr=void 0,!0))},n}(Ma),qa=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ua=function(t){function n(n){var i=t.call(this)||this;return i.Hr=null,i.pn=document.createElement("div"),i.pn.style.position="absolute",i.pn.style.pointerEvents="auto",i.pn.className="ol-box "+n,i.vn=null,i.Jr=null,i.Qr=null,i}return qa(n,t),n.prototype.disposeInternal=function(){this.setMap(null)},n.prototype.te=function(){var t=this.Jr,n=this.Qr,i="px",r=this.pn.style;r.left=Math.min(t[0],n[0])+i,r.top=Math.min(t[1],n[1])+i,r.width=Math.abs(n[0]-t[0])+i,r.height=Math.abs(n[1]-t[1])+i},n.prototype.setMap=function(t){if(this.vn){this.vn.getOverlayContainer().removeChild(this.pn);var n=this.pn.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.vn=t,this.vn&&this.vn.getOverlayContainer().appendChild(this.pn)},n.prototype.setPixels=function(t,n){this.Jr=t,this.Qr=n,this.createOrUpdateGeometry(),this.te()},n.prototype.createOrUpdateGeometry=function(){var t=this.Jr,n=this.Qr,i=[t,[t[0],n[1]],n,[n[0],t[1]]].map(this.vn.getCoordinateFromPixelInternal,this.vn);i[4]=i[0].slice(),this.Hr?this.Hr.setCoordinates([i]):this.Hr=new We([i])},n.prototype.getGeometry=function(){return this.Hr},n}(v),Ba=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Xa="boxstart",Va="boxdrag",Wa="boxend",Ya="boxcancel",Za=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.coordinate=i,e.mapBrowserEvent=r,e}return Ba(n,t),n}(c),$a=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r=n||{};return i.ne=new Ua(r.className||"ol-dragbox"),i.ie=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(i.onBoxEnd=r.onBoxEnd),i.Jr=null,i.Zr=r.condition?r.condition:Aa,i.re=r.boxEndCondition?r.boxEndCondition:i.defaultBoxEndCondition,i}return Ba(n,t),n.prototype.defaultBoxEndCondition=function(t,n,i){var r=i[0]-n[0],e=i[1]-n[1];return r*r+e*e>=this.ie},n.prototype.getGeometry=function(){return this.ne.getGeometry()},n.prototype.handleDragEvent=function(t){this.ne.setPixels(this.Jr,t.pixel),this.dispatchEvent(new Za(Va,t.coordinate,t))},n.prototype.handleUpEvent=function(t){this.ne.setMap(null);var n=this.re(t,this.Jr,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new Za(n?Wa:Ya,t.coordinate,t)),!1},n.prototype.handleDownEvent=function(t){return!!this.Zr(t)&&(this.Jr=t.pixel,this.ne.setMap(t.map),this.ne.setPixels(this.Jr,this.Jr),this.dispatchEvent(new Za(Xa,t.coordinate,t)),!0)},n.prototype.onBoxEnd=function(t){},n}(Ma),Ka=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ha=function(t){function n(n){var i=this,r=n||{},e=r.condition?r.condition:Ia;return(i=t.call(this,{condition:e,className:r.className||"ol-dragzoom",minArea:r.minArea})||this).Fr=void 0!==r.duration?r.duration:200,i.ee=void 0!==r.out&&r.out,i}return Ka(n,t),n.prototype.onBoxEnd=function(t){var n=this.getMap().getView(),i=this.getGeometry();if(this.ee){var r=n.rotatedExtentForGeometry(i),e=n.getResolutionForExtentInternal(r),o=n.getResolution()/e;(i=i.clone()).scale(o*o)}n.fitInternal(i,{duration:this.Fr,easing:mt})},n}($a),Ja=37,Qa=38,th=39,nh=40,ih=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rh=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.oe=function(t){return ka(t)&&Na(t)},i.Zr=void 0!==r.condition?r.condition:i.oe,i.Fr=void 0!==r.duration?r.duration:100,i.se=void 0!==r.pixelDelta?r.pixelDelta:128,i}return ih(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==B){var i=t.originalEvent,r=i.keyCode;if(this.Zr(t)&&(r==nh||r==Ja||r==th||r==Qa)){var e=t.map.getView(),o=e.getResolution()*this.se,s=0,u=0;r==nh?u=-o:r==Ja?s=-o:r==th?s=o:u=o;var a=[s,u];Hi(a,e.getRotation()),pa(e,a,this.Fr),i.preventDefault(),n=!0}}return!n},n}(ma),eh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),oh=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Zr=r.condition?r.condition:Na,i.Br=r.delta?r.delta:1,i.Fr=void 0!==r.duration?r.duration:100,i}return eh(n,t),n.prototype.handleEvent=function(t){var n=!1;if(t.type==B||t.type==X){var i=t.originalEvent,r=i.charCode;if(this.Zr(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var e=t.map,o=r=="+".charCodeAt(0)?this.Br:-this.Br;ya(e.getView(),o,void 0,this.Fr),i.preventDefault(),n=!0}}return!n},n}(ma),sh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uh="trackpad",ah="wheel",hh=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,r)||this).ue=0,i.ae=0,i.wt=void 0!==r.maxDelta?r.maxDelta:1,i.Fr=void 0!==r.duration?r.duration:250,i.he=void 0!==r.timeout?r.timeout:80,i.fe=void 0===r.useAnchor||r.useAnchor,i.ce=void 0!==r.constrainResolution&&r.constrainResolution;var e=r.condition?r.condition:Ta;return i.Zr=r.onFocusOnly?_a(Ea,e):e,i.le=null,i.ve=void 0,i.de,i.pe=void 0,i.ye=400,i.me,i.we=300,i}return sh(n,t),n.prototype.ge=function(){this.me=void 0;var t=this.getMap();t&&t.getView().endInteraction(void 0,this.ae?this.ae>0?1:-1:0,this.le)},n.prototype.handleEvent=function(t){if(!this.Zr(t))return!0;if(t.type!==Z)return!0;var n,i=t.map,r=t.originalEvent;if(r.preventDefault(),this.fe&&(this.le=t.coordinate),t.type==Z&&(n=r.deltaY,Gt&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=Xt),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.ae=n;var e=Date.now();void 0===this.ve&&(this.ve=e),(!this.pe||e-this.ve>this.ye)&&(this.pe=Math.abs(n)<4?uh:ah);var o=i.getView();if(this.pe===uh&&!o.getConstrainResolution()&&!this.ce)return this.me?clearTimeout(this.me):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.me=setTimeout(this.ge.bind(this),this.he),o.adjustZoom(-n/this.we,this.le),this.ve=e,!1;this.ue+=n;var s=Math.max(this.he-(e-this.ve),0);return clearTimeout(this.de),this.de=setTimeout(this.be.bind(this,i),s),!1},n.prototype.be=function(t){var n=t.getView();n.getAnimating()&&n.cancelAnimations();var i=-oi(this.ue,-this.wt*this.we,this.wt*this.we)/this.we;(n.getConstrainResolution()||this.ce)&&(i=i?i>0?1:-1:0),ya(n,i,this.le,this.Fr),this.pe=void 0,this.ue=0,this.le=null,this.ve=void 0,this.de=void 0},n.prototype.setMouseAnchor=function(t){this.fe=t,t||(this.le=null)},n}(ma),fh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ch=function(t){function n(n){var i=this,r=n||{},e=r;return e.stopDown||(e.stopDown=O),(i=t.call(this,e)||this).xe=null,i.Kr=void 0,i.Me=!1,i._e=0,i.Se=void 0!==r.threshold?r.threshold:.3,i.Fr=void 0!==r.duration?r.duration:250,i}return fh(n,t),n.prototype.handleDragEvent=function(t){var n=0,i=this.targetPointers[0],r=this.targetPointers[1],e=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);if(void 0!==this.Kr){var o=e-this.Kr;this._e+=o,!this.Me&&Math.abs(this._e)>this.Se&&(this.Me=!0),n=o}this.Kr=e;var s=t.map,u=s.getView();if(u.getConstraints().rotation!==Fu){var a=s.getViewport().getBoundingClientRect(),h=xa(this.targetPointers);h[0]-=a.left,h[1]-=a.top,this.xe=s.getCoordinateFromPixelInternal(h),this.Me&&(s.render(),u.adjustRotationInternal(n,this.xe))}},n.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.Fr),!1)},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.xe=null,this.Kr=void 0,this.Me=!1,this._e=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(Ma),lh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vh=function(t){function n(n){var i=this,r=n||{},e=r;return e.stopDown||(e.stopDown=O),(i=t.call(this,e)||this).xe=null,i.Fr=void 0!==r.duration?r.duration:400,i.Oe=void 0,i.je=1,i}return lh(n,t),n.prototype.handleDragEvent=function(t){var n=1,i=this.targetPointers[0],r=this.targetPointers[1],e=i.clientX-r.clientX,o=i.clientY-r.clientY,s=Math.sqrt(e*e+o*o);void 0!==this.Oe&&(n=this.Oe/s),this.Oe=s;var u=t.map,a=u.getView();1!=n&&(this.je=n);var h=u.getViewport().getBoundingClientRect(),f=xa(this.targetPointers);f[0]-=h.left,f[1]-=h.top,this.xe=u.getCoordinateFromPixelInternal(f),u.render(),a.adjustResolutionInternal(n,this.xe)},n.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map.getView(),i=this.je>1?1:-1;return n.endInteraction(this.Fr,i),!1}return!0},n.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.xe=null,this.Oe=void 0,this.je=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}return!1},n}(Ma);function dh(t){var n=t||{},i=new ft,r=new Io(-.005,.05,100);return(void 0===n.altShiftDragRotate||n.altShiftDragRotate)&&i.push(new Da),(void 0===n.doubleClickZoom||n.doubleClickZoom)&&i.push(new ga({delta:n.zoomDelta,duration:n.zoomDuration})),(void 0===n.dragPan||n.dragPan)&&i.push(new Fa({onFocusOnly:n.onFocusOnly,kinetic:r})),(void 0===n.pinchRotate||n.pinchRotate)&&i.push(new ch),(void 0===n.pinchZoom||n.pinchZoom)&&i.push(new vh({duration:n.zoomDuration})),(void 0===n.keyboard||n.keyboard)&&(i.push(new rh),i.push(new oh({delta:n.zoomDelta,duration:n.zoomDuration}))),(void 0===n.mouseWheelZoom||n.mouseWheelZoom)&&i.push(new hh({onFocusOnly:n.onFocusOnly,duration:n.zoomDuration})),(void 0===n.shiftDragZoom||n.shiftDragZoom)&&i.push(new Ha({duration:n.zoomDuration})),i}var ph=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),yh=function(t){function n(n){return(n=A({},n)).controls||(n.controls=la()),n.interactions||(n.interactions=dh({onFocusOnly:!0})),t.call(this,n)||this}return ph(n,t),n.prototype.createRenderer=function(){return new Hs(this)},n}(ra),mh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),wh="element",gh="map",bh="offset",xh="position",Mh="positioning",_h=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un,i.options=n,i.id=n.id,i.insertFirst=void 0===n.insertFirst||n.insertFirst,i.stopEvent=void 0===n.stopEvent||n.stopEvent,i.element=document.createElement("div"),i.element.className=void 0!==n.className?n.className:"ol-overlay-container ol-selectable",i.element.style.position="absolute",i.element.style.pointerEvents="auto";var r=n.autoPan;return r&&"object"!=typeof r&&(r={animation:n.autoPanAnimation,margin:n.autoPanMargin}),i.autoPan=r||!1,i.rendered={jt:"",visible:!0},i.mapPostrenderListenerKey=null,i.addChangeListener(wh,i.handleElementChanged),i.addChangeListener(gh,i.handleMapChanged),i.addChangeListener(bh,i.handleOffsetChanged),i.addChangeListener(xh,i.handlePositionChanged),i.addChangeListener(Mh,i.handlePositioningChanged),void 0!==n.element&&i.setElement(n.element),i.setOffset(void 0!==n.offset?n.offset:[0,0]),i.setPositioning(n.positioning||"top-left"),void 0!==n.position&&i.setPosition(n.position),i}return mh(n,t),n.prototype.getElement=function(){return this.get(wh)},n.prototype.getId=function(){return this.id},n.prototype.getMap=function(){return this.get(gh)||null},n.prototype.getOffset=function(){return this.get(bh)},n.prototype.getPosition=function(){return this.get(xh)},n.prototype.getPositioning=function(){return this.get(Mh)},n.prototype.handleElementChanged=function(){Ao(this.element);var t=this.getElement();t&&this.element.appendChild(t)},n.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(To(this.element),H(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=$(t,vu,this.render,this),this.updatePixelPosition();var n=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?n.insertBefore(this.element,n.childNodes[0]||null):n.appendChild(this.element),this.performAutoPan()}},n.prototype.render=function(){this.updatePixelPosition()},n.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},n.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},n.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},n.prototype.setElement=function(t){this.set(wh,t)},n.prototype.setMap=function(t){this.set(gh,t)},n.prototype.setOffset=function(t){this.set(bh,t)},n.prototype.setPosition=function(t){this.set(xh,t)},n.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},n.prototype.panIntoView=function(t){var n=this.getMap();if(n&&n.getTargetElement()&&this.get(xh)){var i=this.getRect(n.getTargetElement(),n.getSize()),r=this.getElement(),e=this.getRect(r,[Oo(r),jo(r)]),o=t||{},s=void 0===o.margin?20:o.margin;if(!xn(i,e)){var u=e[0]-i[0],a=i[2]-e[2],h=e[1]-i[1],f=i[3]-e[3],c=[0,0];if(u<0?c[0]=u-s:a<0&&(c[0]=Math.abs(a)+s),h<0?c[1]=h-s:f<0&&(c[1]=Math.abs(f)+s),0!==c[0]||0!==c[1]){var l=n.getView().getCenterInternal(),v=n.getPixelFromCoordinateInternal(l);if(!v)return;var d=[v[0]+c[0],v[1]+c[1]],p=o.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(d),duration:p.duration,easing:p.easing})}}}},n.prototype.getRect=function(t,n){var i=t.getBoundingClientRect(),r=i.left+window.pageXOffset,e=i.top+window.pageYOffset;return[r,e,r+n[0],e+n[1]]},n.prototype.setPositioning=function(t){this.set(Mh,t)},n.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},n.prototype.updatePixelPosition=function(){var t=this.getMap(),n=this.getPosition();if(t&&t.isRendered()&&n){var i=t.getPixelFromCoordinate(n),r=t.getSize();this.updateRenderedPosition(i,r)}else this.setVisible(!1)},n.prototype.updateRenderedPosition=function(t,n){var i=this.element.style,r=this.getOffset(),e=this.getPositioning();this.setVisible(!0);var o=Math.round(t[0]+r[0])+"px",s=Math.round(t[1]+r[1])+"px",u="0%",a="0%";"bottom-right"==e||"center-right"==e||"top-right"==e?u="-100%":"bottom-center"!=e&&"center-center"!=e&&"top-center"!=e||(u="-50%"),"bottom-left"==e||"bottom-center"==e||"bottom-right"==e?a="-100%":"center-left"!=e&&"center-center"!=e&&"center-right"!=e||(a="-50%");var h="translate(".concat(u,", ").concat(a,") translate(").concat(o,", ").concat(s,")");this.rendered.jt!=h&&(this.rendered.jt=h,i.transform=h,i.msTransform=h)},n.prototype.getOptions=function(){return this.options},n}(et),Sh=function(){function t(t){this.highWaterMark=void 0!==t?t:2048,this.Ee=0,this.Te={},this.Ae=null,this.Pe=null}return t.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){for(;this.canExpireCache();)this.pop()},t.prototype.clear=function(){this.Ee=0,this.Te={},this.Ae=null,this.Pe=null},t.prototype.containsKey=function(t){return this.Te.hasOwnProperty(t)},t.prototype.forEach=function(t){for(var n=this.Ae;n;)t(n.Ce,n.ke,this),n=n.newer},t.prototype.get=function(t,n){var i=this.Te[t];return St(void 0!==i,15),i===this.Pe||(i===this.Ae?(this.Ae=this.Ae.newer,this.Ae.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.Pe,this.Pe.newer=i,this.Pe=i),i.Ce},t.prototype.remove=function(t){var n=this.Te[t];return St(void 0!==n,15),n===this.Pe?(this.Pe=n.older,this.Pe&&(this.Pe.newer=null)):n===this.Ae?(this.Ae=n.newer,this.Ae&&(this.Ae.older=null)):(n.newer.older=n.older,n.older.newer=n.newer),delete this.Te[t],--this.Ee,n.Ce},t.prototype.getCount=function(){return this.Ee},t.prototype.getKeys=function(){var t,n=new Array(this.Ee),i=0;for(t=this.Pe;t;t=t.older)n[i++]=t.ke;return n},t.prototype.getValues=function(){var t,n=new Array(this.Ee),i=0;for(t=this.Pe;t;t=t.older)n[i++]=t.Ce;return n},t.prototype.peekLast=function(){return this.Ae.Ce},t.prototype.peekLastKey=function(){return this.Ae.ke},t.prototype.peekFirstKey=function(){return this.Pe.ke},t.prototype.peek=function(t){if(this.containsKey(t))return this.Te[t].Ce},t.prototype.pop=function(){var t=this.Ae;return delete this.Te[t.ke],t.newer&&(t.newer.older=null),this.Ae=t.newer,this.Ae||(this.Pe=null),--this.Ee,t.Ce},t.prototype.replace=function(t,n){this.get(t),this.Te[t].Ce=n},t.prototype.set=function(t,n){St(!(t in this.Te),16);var i={ke:t,newer:null,older:this.Pe,Ce:n};this.Pe?this.Pe.newer=i:this.Ae=i,this.Pe=i,this.Te[t]=i,++this.Ee},t.prototype.setSize=function(t){this.highWaterMark=t},t}();function Oh(t,n,i,r){return void 0!==r?(r[0]=t,r[1]=n,r[2]=i,r):[t,n,i]}function jh(t,n,i){return t+"/"+n+"/"+i}function Eh(t){return jh(t[0],t[1],t[2])}function Th(t){var n=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return jh(n[0],n[1],n[2])}function Ah(t){return t.split("/").map(Number)}function Ph(t){return(t[1]<<t[0])+t[2]}function Ch(t,n){var i=t[0],r=t[1],e=t[2];if(n.getMinZoom()>i||i>n.getMaxZoom())return!1;var o=n.getFullTileRange(i);return!o||o.containsXY(r,e)}var kh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ih=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return kh(n,t),n.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},n.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=Ah(this.peekFirstKey())[0];this.forEach(function(n){n.tileCoord[0]!==t&&(this.remove(Eh(n.tileCoord)),n.release())}.bind(this))}},n}(Sh),Nh=function(){function t(t,n,i,r){this.minX=t,this.maxX=n,this.minY=i,this.maxY=r}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,n){return this.minX<=t&&t<=this.maxX&&this.minY<=n&&n<=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 Lh(t,n,i,r,e){return void 0!==e?(e.minX=t,e.maxX=n,e.minY=i,e.maxY=r,e):new Nh(t,n,i,r)}var zh=Nh,Rh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Fh=[],Gh=function(t){function n(n,i,r,e){var o=t.call(this,n,i,{transition:0})||this;return o.Ne={},o.executorGroups={},o.declutterExecutorGroups={},o.loadingSourceTiles=0,o.hitDetectionImageData={},o.Le={},o.sourceTiles=[],o.errorTileKeys={},o.wantedResolution,o.getSourceTiles=e.bind(void 0,o),o.wrappedTileCoord=r,o}return Rh(n,t),n.prototype.getContext=function(t){var n=o(t);return n in this.Ne||(this.Ne[n]=_o(1,1,Fh)),this.Ne[n]},n.prototype.hasContext=function(t){return o(t)in this.Ne},n.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},n.prototype.getReplayState=function(t){var n=o(t);return n in this.Le||(this.Le[n]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.Le[n]},n.prototype.load=function(){this.getSourceTiles()},n.prototype.release=function(){for(var n in this.Ne){var i=this.Ne[n];So(i),Fh.push(i.canvas),delete this.Ne[n]}t.prototype.release.call(this)},n}(xt),Dh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qh=function(t){function n(n,i,r,e,o,s){var u=t.call(this,n,i,s)||this;return u.extent=null,u.ze=e,u.Re=null,u.U,u.projection=null,u.resolution,u.Xt=o,u.Fe=r,u.key=r,u}return Dh(n,t),n.prototype.getFormat=function(){return this.ze},n.prototype.getFeatures=function(){return this.Re},n.prototype.load=function(){this.state==ct&&(this.setState(lt),this.Xt(this,this.Fe),this.U&&this.U(this.extent,this.resolution,this.projection))},n.prototype.onLoad=function(t,n){this.setFeatures(t)},n.prototype.onError=function(){this.setState(dt)},n.prototype.setFeatures=function(t){this.Re=t,this.setState(vt)},n.prototype.setLoader=function(t){this.U=t},n}(xt);function Uh(t){return Array.isArray(t)?qo(t):t}var Bh=!1;function Xh(t,n,i,r,e,o,s){var u=new XMLHttpRequest;u.open("GET","function"==typeof t?t(i,r,e):t,!0),"arraybuffer"==n.getType()&&(u.responseType="arraybuffer"),u.withCredentials=Bh,u.onload=function(t){if(!u.status||u.status>=200&&u.status<300){var r=n.getType(),a=void 0;"json"==r||"text"==r?a=u.responseText:"xml"==r?(a=u.responseXML)||(a=(new DOMParser).parseFromString(u.responseText,"application/xml")):"arraybuffer"==r&&(a=u.response),a?o(n.readFeatures(a,{extent:i,featureProjection:e}),n.readProjection(a)):s()}else s()},u.onerror=s,u.send()}function Vh(t,n){return function(i,r,e,o,s){var u=this;Xh(t,n,i,r,e,(function(t,n){u.addFeatures(t),void 0!==o&&o(t)}),s||j)}}function Wh(t,n){return[[-1/0,-1/0,1/0,1/0]]}var Yh=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Zh(t,n,i,r){var e=document.createElement("script"),s="olc_"+o(n);function u(){delete window[s],e.parentNode.removeChild(e)}e.async=!0,e.src=t+(-1==t.indexOf("?")?"?":"&")+(r||"callback")+"="+s;var a=setTimeout((function(){u(),i&&i()}),1e4);window[s]=function(t){clearTimeout(a),u(),n(t)},document.head.appendChild(e)}var $h,Kh=function(t){function n(n){var i=this,r="Unexpected response status: "+n.status;return(i=t.call(this,r)||this).name="ResponseError",i.response=n,i}return Yh(n,t),n}(Error),Hh=function(t){function n(n){var i=t.call(this,"Failed to issue request")||this;return i.name="ClientError",i.client=n,i}return Yh(n,t),n}(Error);function Jh(t){return new Promise((function(n,i){var r=new XMLHttpRequest;r.addEventListener("load",(function(t){var r=t.target;if(!r.status||r.status>=200&&r.status<300){var e=void 0;try{e=JSON.parse(r.responseText)}catch(t){var o="Error parsing response text as JSON: "+t.message;return void i(new Error(o))}n(e)}else i(new Kh(r))})),r.addEventListener("error",(function(t){i(new Hh(t.target))})),r.open("GET",t),r.setRequestHeader("Accept","application/json"),r.send()}))}function Qh(t,n){return n.indexOf("://")>=0?n:new URL(n,t).href}var tf=function(){function t(){}return t.prototype.drawCustom=function(t,n,i,r){},t.prototype.drawGeometry=function(t){},t.prototype.setStyle=function(t){},t.prototype.drawCircle=function(t,n){},t.prototype.drawFeature=function(t,n){},t.prototype.drawGeometryCollection=function(t,n){},t.prototype.drawLineString=function(t,n){},t.prototype.drawMultiLineString=function(t,n){},t.prototype.drawMultiPoint=function(t,n){},t.prototype.drawMultiPolygon=function(t,n){},t.prototype.drawPoint=function(t,n){},t.prototype.drawPolygon=function(t,n){},t.prototype.drawText=function(t,n){},t.prototype.setFillStrokeStyle=function(t,n){},t.prototype.setImageStyle=function(t,n){},t.prototype.setTextStyle=function(t,n){},t}(),nf=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rf=function(t){function n(n,i,r,e,o,s,u){var a=t.call(this)||this;return a.Ne=n,a.kt=i,a.st=r,a.jt=e,a.Ge=o,a.De=s,a.qe=u,a.Ue=null,a.Be=null,a.Xe=null,a.Ve=null,a.We=null,a.Lt=null,a.Ye=0,a.Ze=0,a.$e=0,a.Ke=0,a.He=0,a.Je=0,a.Qe=!1,a.no=0,a.io=[0,0],a.ro=0,a.eo="",a.oo=0,a.so=0,a.uo=!1,a.ao=0,a.ho=[0,0],a.fo=null,a.co=null,a.lo=null,a.vo=[],a.do=[1,0,0,1,0,0],a}return nf(n,t),n.prototype.po=function(t,n,i,r){if(this.Lt){var e=Dr(t,n,i,r,this.jt,this.vo),o=this.Ne,s=this.do,u=o.globalAlpha;1!=this.Ke&&(o.globalAlpha=u*this.Ke);var a=this.no;this.Qe&&(a+=this.Ge);for(var h=0,f=e.length;h<f;h+=2){var c=e[h]-this.Ye,l=e[h+1]-this.Ze;if(0!==a||1!=this.io[0]||1!=this.io[1]){var v=c+this.Ye,d=l+this.Ze;sn(s,v,d,1,1,a,-v,-d),o.setTransform.apply(o,s),o.translate(v,d),o.scale(this.io[0],this.io[1]),o.drawImage(this.Lt,this.He,this.Je,this.ro,this.$e,-this.Ye,-this.Ze,this.ro,this.$e),o.setTransform(1,0,0,1,0,0)}else o.drawImage(this.Lt,this.He,this.Je,this.ro,this.$e,c,l,this.ro,this.$e)}1!=this.Ke&&(o.globalAlpha=u)}},n.prototype.yo=function(t,n,i,r){if(this.lo&&""!==this.eo){this.fo&&this.mo(this.fo),this.co&&this.wo(this.co),this.bo(this.lo);var e=Dr(t,n,i,r,this.jt,this.vo),o=this.Ne,s=this.ao;for(this.uo&&(s+=this.Ge);n<i;n+=r){var u=e[n]+this.oo,a=e[n+1]+this.so;if(0!==s||1!=this.ho[0]||1!=this.ho[1]){var h=sn(this.do,u,a,1,1,s,-u,-a);o.setTransform.apply(o,h),o.translate(u,a),o.scale(this.ho[0],this.ho[1]),this.co&&o.strokeText(this.eo,0,0),this.fo&&o.fillText(this.eo,0,0),o.setTransform(1,0,0,1,0,0)}else this.co&&o.strokeText(this.eo,u,a),this.fo&&o.fillText(this.eo,u,a)}}},n.prototype.xo=function(t,n,i,r,e){var o=this.Ne,s=Dr(t,n,i,r,this.jt,this.vo);o.moveTo(s[0],s[1]);var u=s.length;e&&(u-=2);for(var a=2;a<u;a+=2)o.lineTo(s[a],s[a+1]);return e&&o.closePath(),i},n.prototype.Mo=function(t,n,i,r){for(var e=0,o=i.length;e<o;++e)n=this.xo(t,n,i[e],r,!0);return n},n.prototype.drawCircle=function(t){if(Kn(this.st,t.getExtent())){if(this.Ve||this.We){this.Ve&&this.mo(this.Ve),this.We&&this.wo(this.We);var n=$r(t,this.jt,this.vo),i=n[2]-n[0],r=n[3]-n[1],e=Math.sqrt(i*i+r*r),o=this.Ne;o.beginPath(),o.arc(n[0],n[1],e,0,2*Math.PI),this.Ve&&o.fill(),this.We&&o.stroke()}""!==this.eo&&this.yo(t.getCenter(),0,2,2)}},n.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},n.prototype.setTransform=function(t){this.jt=t},n.prototype.drawGeometry=function(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}},n.prototype.drawFeature=function(t,n){var i=n.getGeometryFunction()(t);i&&Kn(this.st,i.getExtent())&&(this.setStyle(n),this.drawGeometry(i))},n.prototype.drawGeometryCollection=function(t){for(var n=t.getGeometriesArray(),i=0,r=n.length;i<r;++i)this.drawGeometry(n[i])},n.prototype.drawPoint=function(t){this.De&&(t=t.simplifyTransformed(this.De,this.qe));var n=t.getFlatCoordinates(),i=t.getStride();this.Lt&&this.po(n,0,n.length,i),""!==this.eo&&this.yo(n,0,n.length,i)},n.prototype.drawMultiPoint=function(t){this.De&&(t=t.simplifyTransformed(this.De,this.qe));var n=t.getFlatCoordinates(),i=t.getStride();this.Lt&&this.po(n,0,n.length,i),""!==this.eo&&this.yo(n,0,n.length,i)},n.prototype.drawLineString=function(t){if(this.De&&(t=t.simplifyTransformed(this.De,this.qe)),Kn(this.st,t.getExtent())){if(this.We){this.wo(this.We);var n=this.Ne,i=t.getFlatCoordinates();n.beginPath(),this.xo(i,0,i.length,t.getStride(),!1),n.stroke()}if(""!==this.eo){var r=t.getFlatMidpoint();this.yo(r,0,2,2)}}},n.prototype.drawMultiLineString=function(t){this.De&&(t=t.simplifyTransformed(this.De,this.qe));var n=t.getExtent();if(Kn(this.st,n)){if(this.We){this.wo(this.We);var i=this.Ne,r=t.getFlatCoordinates(),e=0,o=t.getEnds(),s=t.getStride();i.beginPath();for(var u=0,a=o.length;u<a;++u)e=this.xo(r,e,o[u],s,!1);i.stroke()}if(""!==this.eo){var h=t.getFlatMidpoints();this.yo(h,0,h.length,2)}}},n.prototype.drawPolygon=function(t){if(this.De&&(t=t.simplifyTransformed(this.De,this.qe)),Kn(this.st,t.getExtent())){if(this.We||this.Ve){this.Ve&&this.mo(this.Ve),this.We&&this.wo(this.We);var n=this.Ne;n.beginPath(),this.Mo(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.Ve&&n.fill(),this.We&&n.stroke()}if(""!==this.eo){var i=t.getFlatInteriorPoint();this.yo(i,0,2,2)}}},n.prototype.drawMultiPolygon=function(t){if(this.De&&(t=t.simplifyTransformed(this.De,this.qe)),Kn(this.st,t.getExtent())){if(this.We||this.Ve){this.Ve&&this.mo(this.Ve),this.We&&this.wo(this.We);var n=this.Ne,i=t.getOrientedFlatCoordinates(),r=0,e=t.getEndss(),o=t.getStride();n.beginPath();for(var s=0,u=e.length;s<u;++s){var a=e[s];r=this.Mo(i,r,a,o)}this.Ve&&n.fill(),this.We&&n.stroke()}if(""!==this.eo){var h=t.getFlatInteriorPoints();this.yo(h,0,h.length,2)}}},n.prototype.mo=function(t){var n=this.Ne,i=this.Ue;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,n.fillStyle=t.fillStyle):(n.fillStyle=t.fillStyle,this.Ue={fillStyle:t.fillStyle})},n.prototype.wo=function(t){var n=this.Ne,i=this.Be;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,n.lineCap=t.lineCap),n.setLineDash&&(x(i.lineDash,t.lineDash)||n.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,n.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,n.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,n.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,n.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,n.strokeStyle=t.strokeStyle)):(n.lineCap=t.lineCap,n.setLineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.lineWidth=t.lineWidth,n.miterLimit=t.miterLimit,n.strokeStyle=t.strokeStyle,this.Be={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},n.prototype.bo=function(t){var n=this.Ne,i=this.Xe,r=t.textAlign?t.textAlign:Ns;i?(i.font!=t.font&&(i.font=t.font,n.font=t.font),i.textAlign!=r&&(i.textAlign=r,n.textAlign=r),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,n.textBaseline=t.textBaseline)):(n.font=t.font,n.textAlign=r,n.textBaseline=t.textBaseline,this.Xe={font:t.font,textAlign:r,textBaseline:t.textBaseline})},n.prototype.setFillStrokeStyle=function(t,n){var i=this;if(t){var r=t.getColor();this.Ve={fillStyle:Uh(r||Ts)}}else this.Ve=null;if(n){var e=n.getColor(),o=n.getLineCap(),s=n.getLineDash(),u=n.getLineDashOffset(),a=n.getLineJoin(),h=n.getWidth(),f=n.getMiterLimit(),c=s||Ps;this.We={lineCap:void 0!==o?o:As,lineDash:1===this.kt?c:c.map((function(t){return t*i.kt})),lineDashOffset:(u||0)*this.kt,lineJoin:void 0!==a?a:Cs,lineWidth:(void 0!==h?h:1)*this.kt,miterLimit:void 0!==f?f:ks,strokeStyle:Uh(e||Is)}}else this.We=null},n.prototype.setImageStyle=function(t){var n;if(t&&(n=t.getSize())){var i=t.getAnchor(),r=t.getOrigin();this.Lt=t.getImage(this.kt),this.Ye=i[0]*this.kt,this.Ze=i[1]*this.kt,this.$e=n[1]*this.kt,this.Ke=t.getOpacity(),this.He=r[0],this.Je=r[1],this.Qe=t.getRotateWithView(),this.no=t.getRotation(),this.io=t.getScaleArray(),this.ro=n[0]*this.kt}else this.Lt=null},n.prototype.setTextStyle=function(t){if(t){var n=t.getFill();if(n){var i=n.getColor();this.fo={fillStyle:Uh(i||Ts)}}else this.fo=null;var r=t.getStroke();if(r){var e=r.getColor(),o=r.getLineCap(),s=r.getLineDash(),u=r.getLineDashOffset(),a=r.getLineJoin(),h=r.getWidth(),f=r.getMiterLimit();this.co={lineCap:void 0!==o?o:As,lineDash:s||Ps,lineDashOffset:u||0,lineJoin:void 0!==a?a:Cs,lineWidth:void 0!==h?h:1,miterLimit:void 0!==f?f:ks,strokeStyle:Uh(e||Is)}}else this.co=null;var c=t.getFont(),l=t.getOffsetX(),v=t.getOffsetY(),d=t.getRotateWithView(),p=t.getRotation(),y=t.getScaleArray(),m=t.getText(),w=t.getTextAlign(),g=t.getTextBaseline();this.lo={font:void 0!==c?c:Es,textAlign:void 0!==w?w:Ns,textBaseline:void 0!==g?g:Ls},this.eo=void 0!==m?Array.isArray(m)?m.reduce((function(t,n,i){return t+(i%2?" ":n)}),""):m:"",this.oo=void 0!==l?this.kt*l:0,this.so=void 0!==v?this.kt*v:0,this.uo=void 0!==d&&d,this.ao=void 0!==p?p:0,this.ho=[this.kt*y[0],this.kt*y[1]]}else this.eo=""},n}(tf),ef={Point:function(t,n,i,r,e){var o,s=i.getImage(),u=i.getText();if(s){if(s.getImageState()!=po)return;var a=t;if(e){var h=s.getDeclutterMode();if("none"!==h)if(a=e,"obstacle"===h){var f=t.getBuilder(i.getZIndex(),"Image");f.setImageStyle(s,o),f.drawPoint(n,r)}else u&&u.getText()&&(o={})}var c=a.getBuilder(i.getZIndex(),"Image");c.setImageStyle(s,o),c.drawPoint(n,r)}if(u&&u.getText()){var l=t;e&&(l=e);var v=l.getBuilder(i.getZIndex(),"Text");v.setTextStyle(u,o),v.drawText(n,r)}},LineString:function(t,n,i,r,e){var o=i.getStroke();if(o){var s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawLineString(n,r)}var u=i.getText();if(u&&u.getText()){var a=(e||t).getBuilder(i.getZIndex(),"Text");a.setTextStyle(u),a.drawText(n,r)}},Polygon:function(t,n,i,r,e){var o=i.getFill(),s=i.getStroke();if(o||s){var u=t.getBuilder(i.getZIndex(),"Polygon");u.setFillStrokeStyle(o,s),u.drawPolygon(n,r)}var a=i.getText();if(a&&a.getText()){var h=(e||t).getBuilder(i.getZIndex(),"Text");h.setTextStyle(a),h.drawText(n,r)}},MultiPoint:function(t,n,i,r,e){var o,s=i.getImage(),u=i.getText();if(s){if(s.getImageState()!=po)return;var a=t;if(e){var h=s.getDeclutterMode();if("none"!==h)if(a=e,"obstacle"===h){var f=t.getBuilder(i.getZIndex(),"Image");f.setImageStyle(s,o),f.drawMultiPoint(n,r)}else u&&u.getText()&&(o={})}var c=a.getBuilder(i.getZIndex(),"Image");c.setImageStyle(s,o),c.drawMultiPoint(n,r)}if(u&&u.getText()){var l=t;e&&(l=e);var v=l.getBuilder(i.getZIndex(),"Text");v.setTextStyle(u,o),v.drawText(n,r)}},MultiLineString:function(t,n,i,r,e){var o=i.getStroke();if(o){var s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawMultiLineString(n,r)}var u=i.getText();if(u&&u.getText()){var a=(e||t).getBuilder(i.getZIndex(),"Text");a.setTextStyle(u),a.drawText(n,r)}},MultiPolygon:function(t,n,i,r,e){var o=i.getFill(),s=i.getStroke();if(s||o){var u=t.getBuilder(i.getZIndex(),"Polygon");u.setFillStrokeStyle(o,s),u.drawMultiPolygon(n,r)}var a=i.getText();if(a&&a.getText()){var h=(e||t).getBuilder(i.getZIndex(),"Text");h.setTextStyle(a),h.drawText(n,r)}},GeometryCollection:function(t,n,i,r,e){var o,s,u=n.getGeometriesArray();for(o=0,s=u.length;o<s;++o){(0,ef[u[o].getType()])(t,u[o],i,r,e)}},Circle:function(t,n,i,r,e){var o=i.getFill(),s=i.getStroke();if(o||s){var u=t.getBuilder(i.getZIndex(),"Circle");u.setFillStrokeStyle(o,s),u.drawCircle(n,r)}var a=i.getText();if(a&&a.getText()){var h=(e||t).getBuilder(i.getZIndex(),"Text");h.setTextStyle(a),h.drawText(n,r)}}};function of(t,n){return parseInt(o(t),10)-parseInt(o(n),10)}function sf(t,n){var i=uf(t,n);return i*i}function uf(t,n){return.5*t/n}function af(t,n,i,r,e,o,s){var u=!1,a=i.getImage();if(a){var h=a.getImageState();h==po||h==yo?a.unlistenImageChange(e):(h==lo&&a.load(),a.listenImageChange(e),u=!0)}return function(t,n,i,r,e,o){var s=i.getGeometryFunction()(n);if(!s)return;var u=s.simplifyTransformed(r,e);if(i.getRenderer())hf(t,u,i,n);else{(0,ef[u.getType()])(t,u,i,n,o)}}(t,n,i,r,o,s),u}function hf(t,n,i,r){if("GeometryCollection"!=n.getType())t.getBuilder(i.getZIndex(),"Default").drawCustom(n,r,i.getRenderer(),i.getHitDetectionRenderer());else for(var e=n.getGeometries(),o=0,s=e.length;o<s;++o)hf(t,e[o],i,r)}function ff(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");var n,i=t.inversePixelTransform[0],r=t.frameState,e=Ht(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),o=sf(r.viewState.resolution,i),s=Cr();return s&&(n=Or(s,r.viewState.projection)),new rf(t.context,i,r.extent,e,r.viewState.rotation,o,n)}var cf,lf={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},vf={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},df=[];function pf(t,n,i,r,e){t.beginPath(),t.moveTo(0,0),t.lineTo(n,i),t.lineTo(r,e),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(n,r)+1,Math.max(i,e)),t.restore()}function yf(t,n){return Math.abs(t[4*n]-210)>2||Math.abs(t[4*n+3]-191.25)>2}function mf(t,n,i,r){var e=Er(i,n,t),o=mr(n,r,i),s=n.getMetersPerUnit();void 0!==s&&(o*=s);var u=t.getMetersPerUnit();void 0!==u&&(o/=u);var a=t.getExtent();if(!a||bn(a,e)){var h=mr(t,o,e)/o;isFinite(h)&&h>0&&(o/=h)}return o}function wf(t,n,i,r){var e=qn(i),o=mf(t,n,e,r);return(!isFinite(o)||o<=0)&&Rn(i,(function(i){return o=mf(t,n,i,r),isFinite(o)&&o>0})),o}function gf(t,n,i,r,e,o,s,u,a,h,f,c){var l=_o(Math.round(i*t),Math.round(i*n),df);if(c||A(l,lf),0===a.length)return l.canvas;function v(t){return Math.round(t*i)/i}l.scale(i,i),l.globalCompositeOperation="lighter";var d=[1/0,1/0,-1/0,-1/0];a.forEach((function(t,n,i){Cn(d,t.extent)}));var p=$n(d),y=Vn(d),m=_o(Math.round(i*p/r),Math.round(i*y/r));c||A(m,lf);var w=i/r;a.forEach((function(t,n,i){var r=t.extent[0]-d[0],e=-(t.extent[3]-d[3]),o=$n(t.extent),s=Vn(t.extent);t.image.width>0&&t.image.height>0&&m.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,r*w,e*w,o*w,s*w)}));var g=Yn(s);return u.getTriangles().forEach((function(t,n,e){var s=t.source,u=t.target,a=s[0][0],h=s[0][1],f=s[1][0],p=s[1][1],y=s[2][0],w=s[2][1],b=v((u[0][0]-g[0])/o),x=v(-(u[0][1]-g[1])/o),M=v((u[1][0]-g[0])/o),_=v(-(u[1][1]-g[1])/o),S=v((u[2][0]-g[0])/o),O=v(-(u[2][1]-g[1])/o),j=a,E=h;a=0,h=0;var T=fi([[f-=j,p-=E,0,0,M-b],[y-=j,w-=E,0,0,S-b],[0,0,f,p,_-x],[0,0,y,w,O-x]]);if(T){if(l.save(),l.beginPath(),function(){if(void 0===cf){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",pf(t,4,5,4,0),pf(t,4,5,0,5);var n=t.getImageData(0,0,3,3).data;cf=yf(n,0)||yf(n,4)||yf(n,8)}return cf}()||!c){l.moveTo(M,_);for(var A=b-M,P=x-_,C=0;C<4;C++)l.lineTo(M+v((C+1)*A/4),_+v(C*P/3)),3!=C&&l.lineTo(M+v((C+1)*A/4),_+v((C+1)*P/3));l.lineTo(S,O)}else l.moveTo(M,_),l.lineTo(b,x),l.lineTo(S,O);l.clip(),l.transform(T[0],T[2],T[1],T[3],b,x),l.translate(d[0]-j,d[3]-E),l.scale(r/i,-r/i),l.drawImage(m.canvas,0,0),l.restore()}})),f&&(l.save(),l.globalCompositeOperation="source-over",l.strokeStyle="black",l.lineWidth=1,u.getTriangles().forEach((function(t,n,i){var r=t.target,e=(r[0][0]-g[0])/o,s=-(r[0][1]-g[1])/o,u=(r[1][0]-g[0])/o,a=-(r[1][1]-g[1])/o,h=(r[2][0]-g[0])/o,f=-(r[2][1]-g[1])/o;l.beginPath(),l.moveTo(u,a),l.lineTo(e,s),l.lineTo(h,f),l.closePath(),l.stroke()})),l.restore()),l.canvas}var bf=[0,0,0],xf=function(){function t(t){var n;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.Ti=t.resolutions,St(_(this.Ti,(function(t,n){return n-t}),!0),17),!t.origins)for(var i=0,r=this.Ti.length-1;i<r;++i)if(n){if(this.Ti[i]/this.Ti[i+1]!==n){n=void 0;break}}else n=this.Ti[i]/this.Ti[i+1];this.Ei=n,this.maxZoom=this.Ti.length-1,this._o=void 0!==t.origin?t.origin:null,this.So=null,void 0!==t.origins&&(this.So=t.origins,St(this.So.length==this.Ti.length,20));var e=t.extent;void 0===e||this._o||this.So||(this._o=Yn(e)),St(!this._o&&this.So||this._o&&!this.So,18),this.Oo=null,void 0!==t.tileSizes&&(this.Oo=t.tileSizes,St(this.Oo.length==this.Ti.length,19)),this.jo=void 0!==t.tileSize?t.tileSize:this.Oo?null:Pu,St(!this.jo&&this.Oo||this.jo&&!this.Oo,22),this.st=void 0!==e?e:null,this.Eo=null,this.To=[0,0],this.Ao=[0,0,0,0],void 0!==t.sizes?this.Eo=t.sizes.map((function(t,n){var i=new zh(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(e){var r=this.getTileRangeForExtentAndZ(e,n);i.minX=Math.max(r.minX,i.minX),i.maxX=Math.min(r.maxX,i.maxX),i.minY=Math.max(r.minY,i.minY),i.maxY=Math.min(r.maxY,i.maxY)}return i}),this):e&&this.Po(e)}return t.prototype.forEachTileCoord=function(t,n,i){for(var r=this.getTileRangeForExtentAndZ(t,n),e=r.minX,o=r.maxX;e<=o;++e)for(var s=r.minY,u=r.maxY;s<=u;++s)i([n,e,s])},t.prototype.forEachTileCoordParentTileRange=function(t,n,i,r){var e,o,s=null,u=t[0]-1;for(2===this.Ei?(e=t[1],o=t[2]):s=this.getTileCoordExtent(t,r);u>=this.minZoom;){if(n(u,2===this.Ei?Lh(e=Math.floor(e/2),e,o=Math.floor(o/2),o,i):this.getTileRangeForExtentAndZ(s,u,i)))return!0;--u}return!1},t.prototype.getExtent=function(){return this.st},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this._o?this._o:this.So[t]},t.prototype.getResolution=function(t){return this.Ti[t]},t.prototype.getResolutions=function(){return this.Ti},t.prototype.getTileCoordChildTileRange=function(t,n,i){if(t[0]<this.maxZoom){if(2===this.Ei){var r=2*t[1],e=2*t[2];return Lh(r,r+1,e,e+1,n)}var o=this.getTileCoordExtent(t,i||this.Ao);return this.getTileRangeForExtentAndZ(o,t[0]+1,n)}return null},t.prototype.getTileRangeForTileCoordAndZ=function(t,n,i){if(n>this.maxZoom||n<this.minZoom)return null;var r=t[0],e=t[1],o=t[2];if(n===r)return Lh(e,o,e,o,i);if(this.Ei){var s=Math.pow(this.Ei,n-r),u=Math.floor(e*s),a=Math.floor(o*s);return n<r?Lh(u,u,a,a,i):Lh(u,Math.floor(s*(e+1))-1,a,Math.floor(s*(o+1))-1,i)}var h=this.getTileCoordExtent(t,this.Ao);return this.getTileRangeForExtentAndZ(h,n,i)},t.prototype.getTileRangeExtent=function(t,n,i){var r=this.getOrigin(t),e=this.getResolution(t),o=Qu(this.getTileSize(t),this.To),s=r[0]+n.minX*o[0]*e,u=r[0]+(n.maxX+1)*o[0]*e;return On(s,r[1]+n.minY*o[1]*e,u,r[1]+(n.maxY+1)*o[1]*e,i)},t.prototype.getTileRangeForExtentAndZ=function(t,n,i){var r=bf;this.Co(t[0],t[3],n,!1,r);var e=r[1],o=r[2];return this.Co(t[2],t[1],n,!0,r),Lh(e,r[1],o,r[2],i)},t.prototype.getTileCoordCenter=function(t){var n=this.getOrigin(t[0]),i=this.getResolution(t[0]),r=Qu(this.getTileSize(t[0]),this.To);return[n[0]+(t[1]+.5)*r[0]*i,n[1]-(t[2]+.5)*r[1]*i]},t.prototype.getTileCoordExtent=function(t,n){var i=this.getOrigin(t[0]),r=this.getResolution(t[0]),e=Qu(this.getTileSize(t[0]),this.To),o=i[0]+t[1]*e[0]*r,s=i[1]-(t[2]+1)*e[1]*r;return On(o,s,o+e[0]*r,s+e[1]*r,n)},t.prototype.getTileCoordForCoordAndResolution=function(t,n,i){return this.ko(t[0],t[1],n,!1,i)},t.prototype.ko=function(t,n,i,r,e){var o=this.getZForResolution(i),s=i/this.getResolution(o),u=this.getOrigin(o),a=Qu(this.getTileSize(o),this.To),h=s*(t-u[0])/i/a[0],f=s*(u[1]-n)/i/a[1];return r?(h=wi(h,5)-1,f=wi(f,5)-1):(h=mi(h,5),f=mi(f,5)),Oh(o,h,f,e)},t.prototype.Co=function(t,n,i,r,e){var o=this.getOrigin(i),s=this.getResolution(i),u=Qu(this.getTileSize(i),this.To),a=(t-o[0])/s/u[0],h=(o[1]-n)/s/u[1];return r?(a=wi(a,5)-1,h=wi(h,5)-1):(a=mi(a,5),h=mi(h,5)),Oh(i,a,h,e)},t.prototype.getTileCoordForCoordAndZ=function(t,n,i){return this.Co(t[0],t[1],n,!1,i)},t.prototype.getTileCoordResolution=function(t){return this.Ti[t[0]]},t.prototype.getTileSize=function(t){return this.jo?this.jo:this.Oo[t]},t.prototype.getFullTileRange=function(t){return this.Eo?this.Eo[t]:this.st?this.getTileRangeForExtentAndZ(this.st,t):null},t.prototype.getZForResolution=function(t,n){return oi(m(this.Ti,t,n||0),this.minZoom,this.maxZoom)},t.prototype.tileCoordIntersectsViewport=function(t,n){return Ne(n,0,n.length,2,this.getTileCoordExtent(t))},t.prototype.Po=function(t){for(var n=this.Ti.length,i=new Array(n),r=this.minZoom;r<n;++r)i[r]=this.getTileRangeForExtentAndZ(t,r);this.Eo=i},t}();function Mf(t){var n=t.getDefaultTileGrid();return n||(n=Ef(t),t.setDefaultTileGrid(n)),n}function _f(t,n,i){var r=n[0],e=t.getTileCoordCenter(n),o=Tf(i);if(bn(o,e))return n;var s=$n(o),u=Math.ceil((o[0]-e[0])/s);return e[0]+=s*u,t.getTileCoordForCoordAndZ(e,r)}function Sf(t,n,i,r){var e=void 0!==r?r:"top-left",o=jf(t,n,i);return new xf({extent:t,origin:Un(t,e),resolutions:o,tileSize:i})}function Of(t){var n=t||{},i=n.extent||yr("EPSG:3857").getExtent(),r={extent:i,minZoom:n.minZoom,tileSize:n.tileSize,resolutions:jf(i,n.maxZoom,n.tileSize,n.maxResolution)};return new xf(r)}function jf(t,n,i,r){for(var e=void 0!==n?n:42,o=Vn(t),s=$n(t),u=Qu(void 0!==i?i:Pu),a=r>0?r:Math.max(s/u[0],o/u[1]),h=e+1,f=new Array(h),c=0;c<h;++c)f[c]=a/Math.pow(2,c);return f}function Ef(t,n,i,r){return Sf(Tf(t),n,i,r)}function Tf(t){var n=(t=yr(t)).getExtent();if(!n){var i=180*Lt[Rt.DEGREES]/t.getMetersPerUnit();n=On(-i,-i,i,i)}return n}function Af(t,n){var i=/\{z\}/g,r=/\{x\}/g,e=/\{y\}/g,o=/\{-y\}/g;return function(s,u,a){return s?t.replace(i,s[0].toString()).replace(r,s[1].toString()).replace(e,s[2].toString()).replace(o,(function(){var t=s[0],i=n.getFullTileRange(t);return St(i,55),(i.getHeight()-s[2]-1).toString()})):void 0}}function Pf(t,n){for(var i=t.length,r=new Array(i),e=0;e<i;++e)r[e]=Af(t[e],n);return Cf(r)}function Cf(t){return 1===t.length?t[0]:function(n,i,r){if(n){var e=vi(Ph(n),t.length);return t[e](n,i,r)}}}function kf(t,n,i){}function If(t){var n=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var r=i[1].charCodeAt(0),e=i[2].charCodeAt(0),o=void 0;for(o=r;o<=e;++o)n.push(t.replace(i[0],String.fromCharCode(o)));return n}if(i=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(i[2],10),u=parseInt(i[1],10);u<=s;u++)n.push(t.replace(i[0],u.toString()));return n}return n.push(t),n}function Nf(t,n){var i=[];Object.keys(n).forEach((function(t){null!==n[t]&&void 0!==n[t]&&i.push(t+"="+encodeURIComponent(n[t]))}));var r=i.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+r}var Lf,zf=34962,Rf=34963,Ff=35044,Gf=35048,Df=5126,qf=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function Uf(t,n){for(var i=A({preserveDrawingBuffer:!0,antialias:!qt},n),r=qf.length,e=0;e<r;++e)try{var o=t.getContext(qf[e],i);if(o)return o}catch(t){}return null}var Bf="http://www.w3.org/2001/XMLSchema-instance";function Xf(t,n){return dc().createElementNS(t,n)}function Vf(t,n){return Wf(t,n,[]).join("")}function Wf(t,n,i){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)n?i.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):i.push(t.nodeValue);else{var r=void 0;for(r=t.firstChild;r;r=r.nextSibling)Wf(r,n,i)}return i}function Yf(t){return"documentElement"in t}function Zf(t,n,i){return t.getAttributeNS(n,i)||""}function $f(t){return(new DOMParser).parseFromString(t,"application/xml")}function Kf(t,n){return function(i,r){var e=t.call(void 0!==n?n:this,i,r);void 0!==e&&g(r[r.length-1],e)}}function Hf(t,n){return function(i,r){var e=t.call(void 0!==n?n:this,i,r);void 0!==e&&r[r.length-1].push(e)}}function Jf(t,n){return function(i,r){var e=t.call(void 0!==n?n:this,i,r);void 0!==e&&(r[r.length-1]=e)}}function Qf(t,n,i){return function(r,e){var o=t.call(void 0!==i?i:this,r,e);if(void 0!==o){var s=e[e.length-1],u=void 0!==n?n:r.localName,a=void 0;u in s?a=s[u]:(a=[],s[u]=a),a.push(o)}}}function tc(t,n,i){return function(r,e){var o=t.call(void 0!==i?i:this,r,e);void 0!==o&&(e[e.length-1][void 0!==n?n:r.localName]=o)}}function nc(t,n){return function(i,r,e){t.call(void 0!==n?n:this,i,r,e),e[e.length-1].node.appendChild(i)}}function ic(t,n){var i,r;return function(n,e,o){if(void 0===i){i={};var s={};s[n.localName]=t,i[n.namespaceURI]=s,r=rc(n.localName)}hc(i,r,e,o)}}function rc(t,n){var i=t;return function(t,r,e){var o=r[r.length-1].node,s=i;return void 0===s&&(s=e),Xf(void 0!==n?n:o.namespaceURI,s)}}var ec=rc();function oc(t,n){for(var i=n.length,r=new Array(i),e=0;e<i;++e)r[e]=t[n[e]];return r}function sc(t,n,i){var r,e,o=void 0!==i?i:{};for(r=0,e=t.length;r<e;++r)o[t[r]]=n;return o}function uc(t,n,i,r){var e;for(e=n.firstElementChild;e;e=e.nextElementSibling){var o=t[e.namespaceURI];if(void 0!==o){var s=o[e.localName];void 0!==s&&s.call(r,e,i)}}}function ac(t,n,i,r,e){return r.push(t),uc(n,i,r,e),r.pop()}function hc(t,n,i,r,e,o){for(var s,u,a=(void 0!==e?e:i).length,h=0;h<a;++h)void 0!==(s=i[h])&&void 0!==(u=n.call(void 0!==o?o:this,s,r,void 0!==e?e[h]:void 0))&&t[u.namespaceURI][u.localName].call(o,u,s,r)}function fc(t,n,i,r,e,o,s){return e.push(t),hc(n,i,r,e,o,s),e.pop()}var cc=void 0;function lc(){return void 0===cc&&"undefined"!=typeof XMLSerializer&&(cc=new XMLSerializer),cc}var vc=void 0;function dc(){return void 0===vc&&"undefined"!=typeof document&&(vc=document.implementation.createDocument("","",null)),vc}var pc=Ff;function yc(t){switch(t){case zf:return Float32Array;case Rf:return Uint32Array;default:return Float32Array}}var mc=function(){function t(t,n){this.array=null,this.type=t,St(t===zf||t===Rf,62),this.usage=void 0!==n?n:pc}return t.prototype.ofSize=function(t){this.array=new(yc(this.type))(t)},t.prototype.fromArray=function(t){var n=yc(this.type);this.array=n.from?n.from(t):new n(t)},t.prototype.fromArrayBuffer=function(t){this.array=new(yc(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}(),wc="webglcontextlost",gc="webglcontextrestored",bc=function(){function t(t){this.Io=t.webGlContext;var n=this.Io;this.No=t.scaleRatio||1,this.Lo=n.createTexture(),this.zo=null,this.Ro=n.createFramebuffer();var i=n.createShader(n.VERTEX_SHADER);n.shaderSource(i,t.vertexShader||"\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_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.compileShader(i);var r=n.createShader(n.FRAGMENT_SHADER);n.shaderSource(r,t.fragmentShader||"\n  precision mediump float;\n   \n  uniform sampler2D u_image;\n  uniform float u_opacity;\n   \n  varying vec2 v_texCoord;\n   \n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n  }\n"),n.compileShader(r),this.Fo=n.createProgram(),n.attachShader(this.Fo,i),n.attachShader(this.Fo,r),n.linkProgram(this.Fo),this.Go=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,this.Go),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),n.STATIC_DRAW),this.Do=n.getAttribLocation(this.Fo,"a_position"),this.qo=n.getUniformLocation(this.Fo,"u_screenSize"),this.Uo=n.getUniformLocation(this.Fo,"u_opacity"),this.Bo=n.getUniformLocation(this.Fo,"u_image"),this.Xo=[],t.uniforms&&Object.keys(t.uniforms).forEach(function(i){this.Xo.push({value:t.uniforms[i],location:n.getUniformLocation(this.Fo,i)})}.bind(this))}return t.prototype.getGL=function(){return this.Io},t.prototype.init=function(t){var n=this.getGL(),i=[n.drawingBufferWidth*this.No,n.drawingBufferHeight*this.No];if(n.bindFramebuffer(n.FRAMEBUFFER,this.getFrameBuffer()),n.viewport(0,0,i[0],i[1]),!this.zo||this.zo[0]!==i[0]||this.zo[1]!==i[1]){this.zo=i;var r=n.RGBA,e=n.RGBA,o=n.UNSIGNED_BYTE;n.bindTexture(n.TEXTURE_2D,this.Lo),n.texImage2D(n.TEXTURE_2D,0,r,i[0],i[1],0,e,o,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),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.Lo,0)}},t.prototype.apply=function(t,n,i,r){var e=this.getGL(),s=t.size;if(e.bindFramebuffer(e.FRAMEBUFFER,n?n.getFrameBuffer():null),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Lo),!n){var u=o(e.canvas);if(!t.renderTargets[u]){var a=e.getContextAttributes();a&&a.preserveDrawingBuffer&&(e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)),t.renderTargets[u]=!0}}e.enable(e.BLEND),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),e.bindBuffer(e.ARRAY_BUFFER,this.Go),e.useProgram(this.Fo),e.enableVertexAttribArray(this.Do),e.vertexAttribPointer(this.Do,2,e.FLOAT,!1,0,0),e.uniform2f(this.qo,s[0],s[1]),e.uniform1i(this.Bo,0);var h=t.layerStatesArray[t.layerIndex].opacity;e.uniform1f(this.Uo,h),this.applyUniforms(t),i&&i(e,t),e.drawArrays(e.TRIANGLES,0,6),r&&r(e,t)},t.prototype.getFrameBuffer=function(){return this.Ro},t.prototype.applyUniforms=function(t){var n,i=this.getGL(),r=1;this.Xo.forEach((function(e){if((n="function"==typeof e.value?e.value(t):e.value)instanceof HTMLCanvasElement||n instanceof ImageData)e.texture||(e.texture=i.createTexture()),i.activeTexture(i["TEXTURE".concat(r)]),i.bindTexture(i.TEXTURE_2D,e.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),n instanceof ImageData?i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,n.width,n.height,0,i.UNSIGNED_BYTE,new Uint8Array(n.data)):i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n),i.uniform1i(e.location,r++);else if(Array.isArray(n))switch(n.length){case 2:return void i.uniform2f(e.location,n[0],n[1]);case 3:return void i.uniform3f(e.location,n[0],n[1],n[2]);case 4:return void i.uniform4f(e.location,n[0],n[1],n[2],n[3]);default:return}else"number"==typeof n&&i.uniform1f(e.location,n)}))},t}();function xc(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Mc(t,n){return t[0]=n[0],t[1]=n[1],t[4]=n[2],t[5]=n[3],t[12]=n[4],t[13]=n[5],t}var _c=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Sc="u_projectionMatrix",Oc="u_offsetScaleMatrix",jc="u_offsetRotateMatrix",Ec="u_time",Tc="u_zoom",Ac="u_resolution",Pc={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:Df},Cc={};function kc(t){return"shared/"+t}var Ic=0;function Nc(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];n+=r.size*Lc(r.type)}return n}function Lc(t){switch(t){case Pc.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Pc.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Pc.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Pc.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var zc=function(t){function n(n){var i,r=t.call(this)||this,e=n||{};r.Vo=r.handleWebGLContextLost.bind(r),r.Wo=r.handleWebGLContextRestored.bind(r),r.Yo=e.canvasCacheKey?kc(e.canvasCacheKey):(i="unique/"+Ic,Ic+=1,i),r.qt=function(t){var n=Cc[t];if(!n){var i=document.createElement("canvas");i.style.position="absolute",i.style.left="0",n={users:0,canvas:i},Cc[t]=n}return n.users+=1,n.canvas}(r.Yo),r.Io=Uf(r.qt),r.Zo={},r.$o={},r.Ko=null,r.qt.addEventListener(wc,r.Vo),r.qt.addEventListener(gc,r.Wo),r.Ho=[1,0,0,1,0,0],r.Jo=[1,0,0,1,0,0],r.Qo=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.ts={},r.ns={},r.Xo=[],e.uniforms&&r.setUniforms(e.uniforms);var o=r.getGL();return r.rs=e.postProcesses?e.postProcesses.map((function(t){return new bc({webGlContext:o,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})})):[new bc({webGlContext:o})],r.es=null,r.ve=Date.now(),r}return _c(n,t),n.prototype.setUniforms=function(t){for(var n in this.Xo=[],t)this.Xo.push({name:n,value:t[n]});this.ts={}},n.prototype.canvasCacheKeyMatches=function(t){return this.Yo===kc(t)},n.prototype.getExtension=function(t){if(t in this.$o)return this.$o[t];var n=this.Io.getExtension(t);return this.$o[t]=n,n},n.prototype.bindBuffer=function(t){var n=this.getGL(),i=o(t),r=this.Zo[i];r||(r={buffer:t,webGlBuffer:n.createBuffer()},this.Zo[i]=r);n.bindBuffer(t.getType(),r.webGlBuffer)},n.prototype.flushBufferData=function(t){var n=this.getGL();this.bindBuffer(t),n.bufferData(t.getType(),t.getArray(),t.getUsage())},n.prototype.deleteBuffer=function(t){var n=this.getGL(),i=o(t),r=this.Zo[i];r&&!n.isContextLost()&&n.deleteBuffer(r.webGlBuffer),delete this.Zo[i]},n.prototype.disposeInternal=function(){this.qt.removeEventListener(wc,this.Vo),this.qt.removeEventListener(gc,this.Wo),function(t){var n=Cc[t];if(n&&(n.users-=1,!(n.users>0))){var i=Uf(n.canvas).getExtension("WEBGL_lose_context");i&&i.loseContext(),delete Cc[t]}}(this.Yo),delete this.Io,delete this.qt},n.prototype.prepareDraw=function(t,n){var i=this.getGL(),r=this.getCanvas(),e=t.size,o=t.pixelRatio;r.width=e[0]*o,r.height=e[1]*o,r.style.width=e[0]+"px",r.style.height=e[1]+"px",i.useProgram(this.Ko);for(var s=this.rs.length-1;s>=0;s--)this.rs[s].init(t);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,n?i.ZERO:i.ONE_MINUS_SRC_ALPHA),i.useProgram(this.Ko),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.prepareDrawToRenderTarget=function(t,n,i){var r=this.getGL(),e=n.getSize();r.bindFramebuffer(r.FRAMEBUFFER,n.getFramebuffer()),r.viewport(0,0,e[0],e[1]),r.bindTexture(r.TEXTURE_2D,n.getTexture()),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,i?r.ZERO:r.ONE_MINUS_SRC_ALPHA),r.useProgram(this.Ko),this.applyFrameState(t),this.applyUniforms(t)},n.prototype.drawElements=function(t,n){var i=this.getGL();this.getExtension("OES_element_index_uint");var r=i.UNSIGNED_INT,e=n-t,o=4*t;i.drawElements(i.TRIANGLES,e,r,o)},n.prototype.finalizeDraw=function(t,n,i){for(var r=0,e=this.rs.length;r<e;r++)r===e-1?this.rs[r].apply(t,null,n,i):this.rs[r].apply(t,this.rs[r+1])},n.prototype.getCanvas=function(){return this.qt},n.prototype.getGL=function(){return this.Io},n.prototype.applyFrameState=function(t){var n=t.size,i=t.viewState.rotation,r=Kt(this.Jo);rn(r,2/n[0],2/n[1]);var e=Kt(this.Ho);0!==i&&nn(e,-i),this.setUniformMatrixValue(Oc,Mc(this.Qo,r)),this.setUniformMatrixValue(jc,Mc(this.Qo,e)),this.setUniformFloatValue(Ec,.001*(Date.now()-this.ve)),this.setUniformFloatValue(Tc,t.viewState.zoom),this.setUniformFloatValue(Ac,t.viewState.resolution)},n.prototype.applyUniforms=function(t){var n,i=this.getGL(),r=0;this.Xo.forEach(function(e){if((n="function"==typeof e.value?e.value(t):e.value)instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof ImageData)e.texture||(e.prevValue=void 0,e.texture=i.createTexture()),i.activeTexture(i["TEXTURE".concat(r)]),i.bindTexture(i.TEXTURE_2D,e.texture),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),(!(n instanceof HTMLImageElement)||n.complete)&&e.prevValue!==n&&(e.prevValue=n,i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,n)),i.uniform1i(this.getUniformLocation(e.name),r++);else if(Array.isArray(n)&&6===n.length)this.setUniformMatrixValue(e.name,Mc(this.Qo,n));else if(Array.isArray(n)&&n.length<=4)switch(n.length){case 2:return void i.uniform2f(this.getUniformLocation(e.name),n[0],n[1]);case 3:return void i.uniform3f(this.getUniformLocation(e.name),n[0],n[1],n[2]);case 4:return void i.uniform4f(this.getUniformLocation(e.name),n[0],n[1],n[2],n[3]);default:return}else"number"==typeof n&&i.uniform1f(this.getUniformLocation(e.name),n)}.bind(this))},n.prototype.useProgram=function(t){return t!=this.Ko&&(this.getGL().useProgram(t),this.Ko=t,this.ts={},this.ns={},!0)},n.prototype.compileShader=function(t,n){var i=this.getGL(),r=i.createShader(n);return i.shaderSource(r,t),i.compileShader(r),r},n.prototype.getProgram=function(t,n){var i=this.getGL(),r=this.compileShader(t,i.FRAGMENT_SHADER),e=this.compileShader(n,i.VERTEX_SHADER),o=i.createProgram();if(i.attachShader(o,r),i.attachShader(o,e),i.linkProgram(o),!i.getShaderParameter(r,i.COMPILE_STATUS)){var s="Fragment shader compliation failed: ".concat(i.getShaderInfoLog(r));throw new Error(s)}if(i.deleteShader(r),!i.getShaderParameter(e,i.COMPILE_STATUS)){s="Vertex shader compilation failed: ".concat(i.getShaderInfoLog(e));throw new Error(s)}if(i.deleteShader(e),!i.getProgramParameter(o,i.LINK_STATUS)){s="GL program linking failed: ".concat(i.getShaderInfoLog(e));throw new Error(s)}return o},n.prototype.getUniformLocation=function(t){return void 0===this.ts[t]&&(this.ts[t]=this.getGL().getUniformLocation(this.Ko,t)),this.ts[t]},n.prototype.getAttributeLocation=function(t){return void 0===this.ns[t]&&(this.ns[t]=this.getGL().getAttribLocation(this.Ko,t)),this.ns[t]},n.prototype.makeProjectionTransform=function(t,n){var i=t.size,r=t.viewState.rotation,e=t.viewState.resolution,o=t.viewState.center;return Kt(n),sn(n,0,0,2/(e*i[0]),2/(e*i[1]),-r,-o[0],-o[1]),n},n.prototype.setUniformFloatValue=function(t,n){this.getGL().uniform1f(this.getUniformLocation(t),n)},n.prototype.setUniformFloatVec4=function(t,n){this.getGL().uniform4fv(this.getUniformLocation(t),n)},n.prototype.setUniformMatrixValue=function(t,n){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,n)},n.prototype.os=function(t,n,i,r,e){var o=this.getAttributeLocation(t);o<0||(this.getGL().enableVertexAttribArray(o),this.getGL().vertexAttribPointer(o,n,i,!1,r,e))},n.prototype.enableAttributes=function(t){for(var n=Nc(t),i=0,r=0;r<t.length;r++){var e=t[r];this.os(e.name,e.size,e.type||Df,n,i),i+=e.size*Lc(e.type)}},n.prototype.handleWebGLContextLost=function(){P(this.Zo),this.Ko=null},n.prototype.handleWebGLContextRestored=function(){},n.prototype.createTexture=function(t,n,i){var r=this.getGL(),e=i||r.createTexture(),o=r.RGBA,s=r.RGBA,u=r.UNSIGNED_BYTE;return r.bindTexture(r.TEXTURE_2D,e),n?r.texImage2D(r.TEXTURE_2D,0,o,s,u,n):r.texImage2D(r.TEXTURE_2D,0,o,t[0],t[1],0,s,u,null),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},n}(v),Rc=function(){function t(t,n){this.name=t,this.data=n,this.ss=null}return t.prototype.getTexture=function(t){if(!this.ss){var n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.data.length/4,1,0,t.RGBA,t.UNSIGNED_BYTE,this.data),this.ss=n}return this.ss},t}(),Fc=new Uint8Array(4),Gc=function(){function t(t,n){this.us=t;var i=t.getGL();this.ss=i.createTexture(),this.hs=i.createFramebuffer(),this.W=n||[1,1],this.B=new Uint8Array(0),this.fs=!0,this.cs()}return t.prototype.setSize=function(t){x(t,this.W)||(this.W[0]=t[0],this.W[1]=t[1],this.cs())},t.prototype.getSize=function(){return this.W},t.prototype.clearCachedData=function(){this.fs=!0},t.prototype.readAll=function(){if(this.fs){var t=this.W,n=this.us.getGL();n.bindFramebuffer(n.FRAMEBUFFER,this.hs),n.readPixels(0,0,t[0],t[1],n.RGBA,n.UNSIGNED_BYTE,this.B),this.fs=!1}return this.B},t.prototype.readPixel=function(t,n){if(t<0||n<0||t>this.W[0]||n>=this.W[1])return Fc[0]=0,Fc[1]=0,Fc[2]=0,Fc[3]=0,Fc;this.readAll();var i=Math.floor(t)+(this.W[1]-Math.floor(n)-1)*this.W[0];return Fc[0]=this.B[4*i],Fc[1]=this.B[4*i+1],Fc[2]=this.B[4*i+2],Fc[3]=this.B[4*i+3],Fc},t.prototype.getTexture=function(){return this.ss},t.prototype.getFramebuffer=function(){return this.hs},t.prototype.cs=function(){var t=this.W,n=this.us.getGL();this.ss=this.us.createTexture(t,null,this.ss),n.bindFramebuffer(n.FRAMEBUFFER,this.hs),n.viewport(0,0,t[0],t[1]),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,this.ss,0),this.B=new Uint8Array(t[0]*t[1]*4)},t}(),Dc=!0,qc=function(){function t(t,n,i,r,e,o){this.ls=t,this.vs=n;var s={},u=jr(this.vs,this.ls);this.ds=function(t){var n=t[0]+"/"+t[1];return s[n]||(s[n]=u(t)),s[n]},this.ps=r,this.ys=e*e,this.ws=[],this.gs=!1,this.bs=this.ls.canWrapX()&&!!r&&!!this.ls.getExtent()&&$n(r)==$n(this.ls.getExtent()),this.xs=this.ls.getExtent()?$n(this.ls.getExtent()):null,this.Ms=this.vs.getExtent()?$n(this.vs.getExtent()):null;var a=Yn(i),h=Zn(i),f=Dn(i),c=Gn(i),l=this.ds(a),v=this.ds(h),d=this.ds(f),p=this.ds(c),y=10+(o?Math.max(0,Math.ceil(ui(Fn(i)/(o*o*256*256)))):0);if(this._s(a,h,f,c,l,v,d,p,y),this.gs){var m=1/0;this.ws.forEach((function(t,n,i){m=Math.min(m,t.source[0][0],t.source[1][0],t.source[2][0])})),this.ws.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-m>this.xs/2){var n=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];n[0][0]-m>this.xs/2&&(n[0][0]-=this.xs),n[1][0]-m>this.xs/2&&(n[1][0]-=this.xs),n[2][0]-m>this.xs/2&&(n[2][0]-=this.xs);var i=Math.min(n[0][0],n[1][0],n[2][0]);Math.max(n[0][0],n[1][0],n[2][0])-i<this.xs/2&&(t.source=n)}}.bind(this))}s={}}return t.prototype.Ss=function(t,n,i,r,e,o){this.ws.push({source:[r,e,o],target:[t,n,i]})},t.prototype._s=function(t,n,i,r,e,o,s,u,a){var h=yn([e,o,s,u]),f=this.xs?$n(h)/this.xs:null,c=this.xs,l=this.ls.canWrapX()&&f>.5&&f<1,v=!1;if(a>0){if(this.vs.isGlobal()&&this.Ms)v=$n(yn([t,n,i,r]))/this.Ms>.25||v;!l&&this.ls.isGlobal()&&f&&(v=f>.25||v)}if(!(!v&&this.ps&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3]))||Kn(h,this.ps)){var d=0;if(!(v||isFinite(e[0])&&isFinite(e[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(u[0])&&isFinite(u[1])))if(a>0)v=!0;else if(1!=(d=(isFinite(e[0])&&isFinite(e[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(u[0])&&isFinite(u[1])?0:1))&&2!=d&&4!=d&&8!=d)return;if(a>0){if(!v){var p=[(t[0]+i[0])/2,(t[1]+i[1])/2],y=this.ds(p),m=void 0;if(l)m=(vi(e[0],c)+vi(s[0],c))/2-vi(y[0],c);else m=(e[0]+s[0])/2-y[0];var w=(e[1]+s[1])/2-y[1];v=m*m+w*w>this.ys}if(v){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var g=[(n[0]+i[0])/2,(n[1]+i[1])/2],b=this.ds(g),x=[(r[0]+t[0])/2,(r[1]+t[1])/2],M=this.ds(x);this._s(t,n,g,x,e,o,b,M,a-1),this._s(x,g,i,r,M,b,s,u,a-1)}else{var _=[(t[0]+n[0])/2,(t[1]+n[1])/2],S=this.ds(_),O=[(i[0]+r[0])/2,(i[1]+r[1])/2],j=this.ds(O);this._s(t,_,O,r,e,S,j,u,a-1),this._s(_,n,i,O,S,o,s,j,a-1)}return}}if(l){if(!this.bs)return;this.gs=!0}0==(11&d)&&this.Ss(t,i,r,e,s,u),0==(14&d)&&this.Ss(t,i,n,e,s,o),d&&(0==(13&d)&&this.Ss(n,r,t,o,u,e),0==(7&d)&&this.Ss(n,r,i,o,u,s))}},t.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.ws.forEach((function(n,i,r){var e=n.source;kn(t,e[0]),kn(t,e[1]),kn(t,e[2])})),t},t.prototype.getTriangles=function(){return this.ws},t}(),Uc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Bc=function(t){function n(n,i,r,e,o,s,u,a,h,f,c,l){var v=t.call(this,o,ct,{interpolate:!!l})||this;v.Os=void 0!==c&&c,v.kt=u,v.js=a,v.qt=null,v.Es=i,v.Ts=e,v.As=s||o,v.Ps=[],v.Cs=null,v.ks=0;var d=e.getTileCoordExtent(v.As),p=v.Ts.getExtent(),y=v.Es.getExtent(),m=p?Wn(d,p):d;if(0===Fn(m))return v.state=pt,v;var w=n.getExtent();w&&(y=y?Wn(y,w):w);var g=e.getResolution(v.As[0]),b=wf(n,r,m,g);if(!isFinite(b)||b<=0)return v.state=pt,v;var x=void 0!==f?f:.5;if(v.Is=new qc(n,r,m,y,b*x,g),0===v.Is.getTriangles().length)return v.state=pt,v;v.ks=i.getZForResolution(b);var M=v.Is.calculateSourceExtent();if(y&&(n.canWrapX()?(M[1]=oi(M[1],y[1],y[3]),M[3]=oi(M[3],y[1],y[3])):M=Wn(M,y)),Fn(M)){for(var _=i.getTileRangeForExtentAndZ(M,v.ks),S=_.minX;S<=_.maxX;S++)for(var O=_.minY;O<=_.maxY;O++){var j=h(v.ks,S,O,u);j&&v.Ps.push(j)}0===v.Ps.length&&(v.state=pt)}else v.state=pt;return v}return Uc(n,t),n.prototype.getImage=function(){return this.qt},n.prototype.Ns=function(){var t=[];if(this.Ps.forEach(function(n,i,r){n&&n.getState()==vt&&t.push({extent:this.Es.getTileCoordExtent(n.tileCoord),image:n.getImage()})}.bind(this)),this.Ps.length=0,0===t.length)this.state=dt;else{var n=this.As[0],i=this.Ts.getTileSize(n),r="number"==typeof i?i:i[0],e="number"==typeof i?i:i[1],o=this.Ts.getResolution(n),s=this.Es.getResolution(this.ks),u=this.Ts.getTileCoordExtent(this.As);this.qt=gf(r,e,this.kt,s,this.Es.getExtent(),o,u,this.Is,t,this.js,this.Os,this.interpolate),this.state=vt}this.changed()},n.prototype.load=function(){if(this.state==ct){this.state=lt,this.changed();var t=0;this.Cs=[],this.Ps.forEach(function(n,i,r){var e=n.getState();if(e==ct||e==lt){t++;var o=$(n,L,(function(i){var r=n.getState();r!=vt&&r!=dt&&r!=pt||(H(o),0===--t&&(this.Ls(),this.Ns()))}),this);this.Cs.push(o)}}.bind(this)),0===t?setTimeout(this.Ns.bind(this),0):this.Ps.forEach((function(t,n,i){t.getState()==ct&&t.load()}))}},n.prototype.Ls=function(){this.Cs.forEach(H),this.Cs=null},n.prototype.release=function(){this.qt&&(So(this.qt.getContext("2d")),df.push(this.qt),this.qt=null),t.prototype.release.call(this)},n}(xt),Xc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Vc(t,n,i){var r=i?t.LINEAR:t.NEAREST;t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,r)}function Wc(t,n,i,r,e,o){var s,u,a=t.getGL();i instanceof Float32Array?(s=a.FLOAT,t.getExtension("OES_texture_float"),u=null!==t.getExtension("OES_texture_float_linear")):(s=a.UNSIGNED_BYTE,u=!0);Vc(a,n,o&&u);var h,f=i.byteLength/r[1],c=1;switch(f%8==0?c=8:f%4==0?c=4:f%2==0&&(c=2),e){case 1:h=a.LUMINANCE;break;case 2:h=a.LUMINANCE_ALPHA;break;case 3:h=a.RGB;break;case 4:h=a.RGBA;break;default:throw new Error("Unsupported number of bands: ".concat(e))}var l=a.getParameter(a.UNPACK_ALIGNMENT);a.pixelStorei(a.UNPACK_ALIGNMENT,c),a.texImage2D(a.TEXTURE_2D,0,h,r[0],r[1],0,h,s,i),a.pixelStorei(a.UNPACK_ALIGNMENT,l)}var Yc=null;var Zc=function(t){function n(n){var i=t.call(this)||this;i.tile,i.textures=[],i.cr=i.cr.bind(i),i.zs=Qu(n.grid.getTileSize(n.tile.tileCoord[0])),i.js=n.gutter||0,i.bandCount=NaN,i.us=n.helper;var r=new mc(zf,Ff);return r.fromArray([0,1,1,1,1,0,0,0]),i.us.flushBufferData(r),i.coords=r,i.setTile(n.tile),i}return Xc(n,t),n.prototype.setTile=function(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(L,this.cr),this.tile=t,this.textures.length=0,this.loaded=t.getState()===vt,this.loaded)this.Rs();else{if(t instanceof ko){var n=t.getImage();n instanceof Image&&!n.crossOrigin&&(n.crossOrigin="anonymous")}t.addEventListener(L,this.cr)}},n.prototype.Rs=function(){var t=this.us,n=t.getGL(),i=this.tile;if(i instanceof ko||i instanceof Bc){var r=n.createTexture();return this.textures.push(r),this.bandCount=4,void function(t,n,i,r){Vc(t,n,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i)}(n,r,i.getImage(),i.interpolate)}var e=i.getSize(),o=[e[0]+2*this.js,e[1]+2*this.js],s=i.getData(),u=s instanceof Float32Array,a=o[0]*o[1],h=u?Float32Array:Uint8Array,f=h.BYTES_PER_ELEMENT,c=s.byteLength/o[1];this.bandCount=Math.floor(c/f/o[0]);var l=Math.ceil(this.bandCount/4);if(1===l){r=n.createTexture();return this.textures.push(r),void Wc(t,r,s,o,this.bandCount,i.interpolate)}for(var v=new Array(l),d=0;d<l;++d){r=n.createTexture();this.textures.push(r);var p=d<l-1?4:this.bandCount%4;v[d]=new h(a*p)}for(var y=0,m=0,w=o[0]*this.bandCount,g=0;g<o[1];++g){for(var b=0;b<w;++b){var x=s[m+b],M=Math.floor(y/this.bandCount),_=b%this.bandCount;(S=v[d=Math.floor(_/4)])[M*(p=S.length/a)+_%4]=x,++y}m+=c/f}for(d=0;d<l;++d){var S;Wc(t,r=this.textures[d],S=v[d],o,p=S.length/a,i.interpolate)}},n.prototype.cr=function(){this.tile.getState()===vt&&(this.loaded=!0,this.Rs(),this.dispatchEvent(L))},n.prototype.disposeInternal=function(){var t=this.us.getGL();this.us.deleteBuffer(this.coords);for(var n=0;n<this.textures.length;++n)t.deleteTexture(this.textures[n]);this.tile.removeEventListener(L,this.cr)},n.prototype.getPixelData=function(t,n){if(!this.loaded)return null;var i,r=this.zs[0],e=this.zs[1],o=this.js;if(this.tile instanceof _t){var s=this.tile.getSize(),u=s[0],a=s[1],h=u+2*o,f=a+2*o,c=o+Math.floor(u*(t/r)),l=o+Math.floor(a*(n/e)),v=this.tile.getData();if(v instanceof DataView){var d=v.byteLength/(h*f),p=d*(l*h+c),y=v.buffer.slice(p,p+d);return new DataView(y)}var m=this.bandCount*(l*h+c);return v.slice(m,m+this.bandCount)}Yc||((i=document.createElement("canvas")).width=1,i.height=1,Yc=i.getContext("2d")),Yc.clearRect(0,0,1,1);var w,g=this.tile.getImage(),b=g.width-2*o,x=g.height-2*o,M=o+Math.floor(b*(t/r)),_=o+Math.floor(x*(n/e));try{Yc.drawImage(g,M,_,1,1,0,0,1,1),w=Yc.getImageData(0,0,1,1).data}catch(t){return Yc=null,null}return w},n}(N),$c=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kc=function(t){function n(n){var i=t.call(this)||this;return i.ready=!0,i.Fs=i.Gs.bind(i),i.Ds=n,i.declutterExecutorGroup=null,i}return $c(n,t),n.prototype.getFeatures=function(t){return r()},n.prototype.getData=function(t){return null},n.prototype.prepareFrame=function(t){return r()},n.prototype.renderFrame=function(t,n){return r()},n.prototype.loadedTileCallback=function(t,n,i){t[n]||(t[n]={}),t[n][i.tileCoord.toString()]=i},n.prototype.createLoadedTileFinder=function(t,n,i){return function(r,e){var o=this.loadedTileCallback.bind(this,i,r);return t.forEachLoadedTile(n,r,e,o)}.bind(this)},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e){},n.prototype.getDataAtPixel=function(t,n,i){return null},n.prototype.getLayer=function(){return this.Ds},n.prototype.handleFontsChanged=function(){},n.prototype.Gs=function(t){t.target.getState()===po&&this.renderIfReadyAndVisible()},n.prototype.loadImage=function(t){var n=t.getState();return n!=po&&n!=yo&&t.addEventListener(L,this.Fs),n==lo&&(t.load(),n=t.getState()),n==po},n.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()},n.prototype.disposeInternal=function(){delete this.Ds,t.prototype.disposeInternal.call(this)},n}(nt),Hc=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jc="GENERATE_BUFFERS",Qc=function(t){function n(n,i){var r=t.call(this,n)||this,e=i||{};return r.qs=[1,0,0,1,0,0],r.Us=null,r.Bs=e.postProcesses,r.Xo=e.uniforms,r.helper,n.addChangeListener(is,r.removeHelper.bind(r)),r.dispatchPreComposeEvent=r.dispatchPreComposeEvent.bind(r),r.dispatchPostComposeEvent=r.dispatchPostComposeEvent.bind(r),r}return Hc(n,t),n.prototype.dispatchPreComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(us)){var r=new ms(us,void 0,n,t);i.dispatchEvent(r)}},n.prototype.dispatchPostComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(as)){var r=new ms(as,void 0,n,t);i.dispatchEvent(r)}},n.prototype.reset=function(t){this.Xo=t.uniforms,this.helper&&this.helper.setUniforms(this.Xo)},n.prototype.removeHelper=function(){this.helper&&(this.helper.dispose(),delete this.helper)},n.prototype.prepareFrame=function(t){if(this.getLayer().getRenderSource()){for(var i=!0,r=-1,e=void 0,o=0,s=t.layerStatesArray.length;o<s;o++){var u=t.layerStatesArray[o].layer,a=u.getRenderer();if(a instanceof n){var h=u.getClassName();if((i||h!==e)&&(r+=1,i=!1),e=h,a===this)break}else i=!0}var f="map/"+t.mapId+"/group/"+r;this.helper&&this.helper.canvasCacheKeyMatches(f)||(this.removeHelper(),this.helper=new zc({postProcesses:this.Bs,uniforms:this.Xo,canvasCacheKey:f}),e&&(this.helper.getCanvas().className=e),this.afterHelperCreated())}return this.prepareFrameInternal(t)},n.prototype.afterHelperCreated=function(){},n.prototype.prepareFrameInternal=function(t){return!0},n.prototype.disposeInternal=function(){this.removeHelper(),t.prototype.disposeInternal.call(this)},n.prototype.Xs=function(t,n,i){var r=this.getLayer();if(r.hasListener(t)){sn(this.qs,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);var e=new ms(t,this.qs,i,n);r.dispatchEvent(e)}},n.prototype.preRender=function(t,n){this.Xs(os,t,n)},n.prototype.postRender=function(t,n){this.Xs(ss,t,n)},n.prototype.getDataAtPixel=function(t,n,i){var r=tn([n.pixelRatio,0,0,n.pixelRatio,0,0],t.slice()),e=this.helper.getGL();if(!e)return null;var o=this.getLayer().getExtent();if(o&&!bn(o,tn(n.pixelToCoordinateTransform,t.slice())))return null;var s=e.getContextAttributes();if(!s||!s.preserveDrawingBuffer)return new Uint8Array;var u,a=Math.round(r[0]),h=Math.round(r[1]),f=this.Us;if(!f){var c=document.createElement("canvas");c.width=1,c.height=1,f=c.getContext("2d"),this.Us=f}f.clearRect(0,0,1,1);try{f.drawImage(e.canvas,a,h,1,1,0,0,1,1),u=f.getImageData(0,0,1,1).data}catch(t){return u}return 0===u[3]?null:u},n}(Kc),tl=[],nl={vertexPosition:0,indexPosition:0};function il(t,n,i,r,e){t[n+0]=i,t[n+1]=r,t[n+2]=e}function rl(t,n){var i=n||[],r=256,e=255;return i[0]=Math.floor(t/r/r/r)/e,i[1]=Math.floor(t/r/r)%r/e,i[2]=Math.floor(t/r)%r/e,i[3]=t%r/e,i}function el(t){var n=0,i=256,r=255;return n+=Math.round(t[0]*i*i*i*r),n+=Math.round(t[1]*i*i*r),n+=Math.round(t[2]*i*r),n+=Math.round(t[3]*r)}var ol=Qc,sl=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ul={TILE_TEXTURE_ARRAY:"u_tileTextures",TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY",RENDER_EXTENT:"u_renderExtent",RESOLUTION:"u_resolution",ZOOM:"u_zoom"},al={TEXTURE_COORD:"a_textureCoord"},hl=[{name:al.TEXTURE_COORD,size:2,type:Pc.FLOAT}],fl={};function cl(t){return 2*(1-1/(t+1))-1}function ll(t,n,i){i in t||(t[i]=[]),t[i].push(n)}function vl(t,n){var i=t.layerStatesArray[t.layerIndex];i.extent&&(n=Wn(n,Lr(i.extent,t.viewState.projection)));var r=i.layer.getRenderSource();if(!r.getWrapX()){var e=r.getTileGridForProjection(t.viewState.projection).getExtent();e&&(n=Wn(n,e))}return n}function dl(t,n){return"".concat(t.getKey(),",").concat(Eh(n))}var pl=function(t){function n(n,i){var r=t.call(this,n,{uniforms:i.uniforms})||this;r.renderComplete=!1,r.Vs=[1,0,0,1,0,0],r.Ws=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.Ys=new zh(0,0,0,0),r.Zs=Oh(0,0,0),r.$s=[0,0],r.Ks,r.Hs=i.vertexShader,r.Js=i.fragmentShader,r.Qs=new mc(Rf,Ff),r.Qs.fromArray([0,1,3,1,2,3]);var e=void 0!==i.cacheSize?i.cacheSize:512;return r.tu=new Sh(e),r.nu=i.paletteTextures||[],r.Zi=null,r}return sl(n,t),n.prototype.reset=function(n){t.prototype.reset.call(this,{uniforms:n.uniforms}),this.Hs=n.vertexShader,this.Js=n.fragmentShader,this.nu=n.paletteTextures||[],this.helper&&(this.Ks=this.helper.getProgram(this.Js,this.Hs))},n.prototype.afterHelperCreated=function(){this.Ks=this.helper.getProgram(this.Js,this.Hs),this.helper.flushBufferData(this.Qs)},n.prototype.iu=function(t){var n=this.getLayer(),i=t.getState(),r=n.getUseInterimTilesOnError();return i==vt||i==pt||i==dt&&!r},n.prototype.prepareFrameInternal=function(t){var n=this.getLayer().getRenderSource();return!!n&&(!Hn(vl(t,t.extent))&&"ready"===n.getState())},n.prototype.enqueueTiles=function(t,n,i,r){var e=t.viewState,s=this.getLayer(),u=s.getRenderSource(),a=u.getTileGridForProjection(e.projection),h=u.getGutterForProjection(e.projection),f=o(u);f in t.wantedTiles||(t.wantedTiles[f]={});for(var c=t.wantedTiles[f],l=this.tu,v=Math.max(i-s.getPreload(),a.getMinZoom(),s.getMinZoom()),d=i;d>=v;--d)for(var p=a.getTileRangeForExtentAndZ(n,d,this.Ys),y=a.getResolution(d),m=p.minX;m<=p.maxX;++m)for(var w=p.minY;w<=p.maxY;++w){var g=Oh(d,m,w,this.Zs),b=dl(u,g),x=void 0,M=void 0;if(l.containsKey(b)&&(M=(x=l.get(b)).tile),!x||x.tile.key!==u.getKey())if(M=u.getTile(d,m,w,t.pixelRatio,e.projection),x)if(this.iu(M))x.setTile(M);else{var _=M.getInterimTile();x.setTile(_)}else x=new Zc({tile:M,grid:a,helper:this.helper,gutter:h}),l.set(b,x);ll(r,x,d);var S=M.getKey();c[S]=!0,M.getState()===ct&&(t.tileQueue.isKeyQueued(S)||t.tileQueue.enqueue([M,f,a.getTileCoordCenter(g),y]))}},n.prototype.renderFrame=function(t){this.Zi=t,this.renderComplete=!0;var n=this.helper.getGL();this.preRender(n,t);var i=t.viewState,r=this.getLayer().getRenderSource(),e=r.getTileGridForProjection(i.projection),s=r.getGutterForProjection(i.projection),u=vl(t,t.extent),a=e.getZForResolution(i.resolution,r.zDirection),h={};if(t.nextExtent){var f=e.getZForResolution(i.nextResolution,r.zDirection),c=vl(t,t.nextExtent);this.enqueueTiles(t,c,f,h)}this.enqueueTiles(t,u,a,h);for(var l={},v=o(this),d=t.time,y=!1,m=h[a],w=0,g=m.length;w<g;++w){var b=(D=(tt=m[w]).tile).tileCoord;if(tt.loaded){if(1===(q=D.getAlpha(v,d))){D.endTransition(v);continue}y=!0,l[U=Eh(b)]=q}if(this.renderComplete=!1,!this.ru(e,b,a+1,h))for(var x=e.getMinZoom(),M=a-1;M>=x;--M){if(this.ru(e,b,M,h))break}}this.helper.useProgram(this.Ks),this.helper.prepareDraw(t,!y);for(var _=Object.keys(h).map(Number).sort(p),S=i.center[0],O=i.center[1],j=0,E=_.length;j<E;++j){var T=_[j],A=e.getResolution(T),P=Qu(e.getTileSize(T),this.$s),C=e.getOrigin(T),k=P[0]+2*s,I=P[1]+2*s,N=k/I,L=(S-C[0])/(P[0]*A),z=(C[1]-O)/(P[1]*A),R=i.resolution/A,F=cl(T),G=h[T];for(w=0,g=G.length;w<g;++w){if((tt=G[w]).loaded){var D,q,U=Eh(b=(D=tt.tile).tileCoord),B=b[1],X=b[2];Kt(this.Vs),rn(this.Vs,2/(t.size[0]*R/k),-2/(t.size[1]*R/k)),nn(this.Vs,i.rotation),rn(this.Vs,1,1/N),on(this.Vs,(P[0]*(B-L)-s)/k,(P[1]*(X-z)-s)/I),this.helper.setUniformMatrixValue(ul.TILE_TRANSFORM,Mc(this.Ws,this.Vs)),this.helper.bindBuffer(tt.coords),this.helper.bindBuffer(this.Qs),this.helper.enableAttributes(hl);for(var V=0;V<tt.textures.length;){var W="TEXTURE"+V,Y="".concat(ul.TILE_TEXTURE_ARRAY,"[").concat(V,"]");n.activeTexture(n[W]),n.bindTexture(n.TEXTURE_2D,tt.textures[V]),n.uniform1i(this.helper.getUniformLocation(Y),V),++V}for(var Z=0;Z<this.nu.length;++Z){var $=this.nu[Z];n.activeTexture(n["TEXTURE"+V]);var K=$.getTexture(n);n.bindTexture(n.TEXTURE_2D,K),n.uniform1i(this.helper.getUniformLocation($.name),V),++V}(q=U in l?l[U]:1)<1&&(t.animate=!0),this.helper.setUniformFloatValue(ul.TRANSITION_ALPHA,q),this.helper.setUniformFloatValue(ul.DEPTH,F),this.helper.setUniformFloatValue(ul.TEXTURE_PIXEL_WIDTH,k),this.helper.setUniformFloatValue(ul.TEXTURE_PIXEL_HEIGHT,I),this.helper.setUniformFloatValue(ul.TEXTURE_RESOLUTION,A),this.helper.setUniformFloatValue(ul.TEXTURE_ORIGIN_X,C[0]+B*P[0]*A-s*A),this.helper.setUniformFloatValue(ul.TEXTURE_ORIGIN_Y,C[1]-X*P[1]*A+s*A);var H=u;s>0&&Wn(H=e.getTileCoordExtent(b),u,H),this.helper.setUniformFloatVec4(ul.RENDER_EXTENT,H),this.helper.setUniformFloatValue(ul.RESOLUTION,i.resolution),this.helper.setUniformFloatValue(ul.ZOOM,i.zoom),this.helper.drawElements(0,this.Qs.getSize())}}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);for(var J=this.helper.getCanvas(),Q=this.tu;Q.canExpireCache();){var tt;(tt=Q.pop()).dispose()}return t.postRenderFunctions.push((function(t,n){r.expireCache(n.viewState.projection,fl)})),this.postRender(n,t),J},n.prototype.getData=function(t){if(!this.helper.getGL())return null;var n=this.Zi;if(!n)return null;var i=this.getLayer(),r=tn(n.pixelToCoordinateTransform,t.slice()),e=n.viewState,o=i.getExtent();if(o&&!bn(Lr(o,e.projection),r))return null;var s,u,a,h=i.getSources(yn([r]),e.resolution);for(s=h.length-1;s>=0;--s)if("ready"===(u=h[s]).getState()){if(a=u.getTileGridForProjection(e.projection),u.getWrapX())break;var f=a.getExtent();if(!f||bn(f,r))break}if(s<0)return null;for(var c=this.tu,l=a.getZForResolution(e.resolution);l>=a.getMinZoom();--l){var v=a.getTileCoordForCoordAndZ(r,l),d=dl(u,v);if(c.containsKey(d)){var p=c.get(d);if(p.loaded){var y=a.getOrigin(l),m=Qu(a.getTileSize(l)),w=a.getResolution(l),g=(r[0]-y[0])/w-v[1]*m[0],b=(y[1]-r[1])/w-v[2]*m[1];return p.getPixelData(g,b)}}}return null},n.prototype.ru=function(t,n,i,r){var e=t.getTileRangeForTileCoordAndZ(n,i,this.Ys);if(!e)return!1;for(var o=!0,s=this.tu,u=this.getLayer().getRenderSource(),a=e.minX;a<=e.maxX;++a)for(var h=e.minY;h<=e.maxY;++h){var f=dl(u,[i,a,h]),c=!1;if(s.containsKey(f)){var l=s.get(f);l.loaded&&(ll(r,l,i),c=!0)}c||(o=!1)}return o},n.prototype.removeHelper=function(){if(this.helper){var n=this.tu;n.forEach((function(t){return t.dispose()})),n.clear()}t.prototype.removeHelper.call(this)},n.prototype.disposeInternal=function(){var n=this.helper;n&&(n.getGL().deleteProgram(this.Ks),delete this.Ks,n.deleteBuffer(this.Qs));t.prototype.disposeInternal.call(this),delete this.Qs,delete this.tu,delete this.Zi},n}(ol),yl=1,ml=2,wl=4,gl=8,bl=16,xl=31,Ml=0,_l={};function Sl(t){if("number"==typeof t)return yl;if("boolean"==typeof t)return gl;if("string"==typeof t)return Uo(t)?wl|ml:ml;if(!Array.isArray(t))throw new Error("Unhandled value type: ".concat(JSON.stringify(t)));var n=t;if(n.every((function(t){return"number"==typeof t})))return 3===n.length||4===n.length?wl|bl:bl;if("string"!=typeof n[0])throw new Error("Expected an expression operator but received: ".concat(JSON.stringify(n)));var i=_l[n[0]];if(void 0===i)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(n)));return i.getReturnType(n.slice(1))}function Ol(t){return ui(t)%1==0}function jl(t){var n=t.toString();return-1===n.indexOf(".")?n+".0":n}function El(t){if(t.length<2||t.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec".concat(t.length,"(").concat(t.map(jl).join(", "),")")}function Tl(t){var n=Go(t).slice();return n.length<4&&n.push(1),El(n.map((function(t,n){return n<3?t/255:t})))}function Al(t,n){return void 0===t.stringLiteralsMap[n]&&(t.stringLiteralsMap[n]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[n]}function Pl(t,n){return jl(Al(t,n))}function Cl(t,n,i){if(Array.isArray(n)&&"string"==typeof n[0]){var r=_l[n[0]];if(void 0===r)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(n)));return r.toGlsl(t,n.slice(1),i)}var e=Sl(n);if((e&yl)>0)return jl(n);if((e&gl)>0)return n.toString();if((e&ml)>0&&(void 0===i||i==ml))return Pl(t,n.toString());if((e&wl)>0&&(void 0===i||i==wl))return Tl(n);if((e&bl)>0)return El(n);throw new Error("Unexpected expression ".concat(n," (expected type ").concat(i,")"))}function kl(t){if(!(Sl(t)&yl))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(t)," instead"))}function Il(t){for(var n=0;n<t.length;n++)kl(t[n])}function Nl(t){if(!(Sl(t)&ml))throw new Error("A string value was expected, got ".concat(JSON.stringify(t)," instead"))}function Ll(t){if(!(Sl(t)&gl))throw new Error("A boolean value was expected, got ".concat(JSON.stringify(t)," instead"))}function zl(t,n){if(t.length!==n)throw new Error("Exactly ".concat(n," arguments were expected, got ").concat(t.length," instead"))}function Rl(t,n){if(t.length<n)throw new Error("At least ".concat(n," arguments were expected, got ").concat(t.length," instead"))}function Fl(t,n){if(t.length>n)throw new Error("At most ".concat(n," arguments were expected, got ").concat(t.length," instead"))}function Gl(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got ".concat(t," instead"))}function Dl(t,n){if(!Ol(n))throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(t)))}function ql(t){return"u_var_"+t}_l.get={getReturnType:function(t){return xl},toGlsl:function(t,n){zl(n,1),Nl(n[0]);var i=n[0].toString();return-1===t.attributes.indexOf(i)&&t.attributes.push(i),(t.inFragmentShader?"v_":"a_")+i}},_l.var={getReturnType:function(t){return xl},toGlsl:function(t,n){zl(n,1),Nl(n[0]);var i=n[0].toString();return-1===t.variables.indexOf(i)&&t.variables.push(i),ql(i)}};var Ul="u_paletteTextures";_l.palette={getReturnType:function(t){return wl},toGlsl:function(t,n){zl(n,2),kl(n[0]);var i=Cl(t,n[0]),r=n[1];if(!Array.isArray(r))throw new Error("The second argument of palette must be an array");for(var e=r.length,o=new Uint8Array(4*e),s=0;s<e;s++){var u=r[s],a=void 0;if("string"==typeof u)a=Fo(u);else{if(!Array.isArray(u))throw new Error("The second argument of palette must be an array of strings or colors");var h=u.length;if(4===h)a=u;else{if(3!==h)throw new Error("Expected palette color to have 3 or 4 values, got ".concat(h));a=[u[0],u[1],u[2],1]}}var f=4*s;o[f]=a[0],o[f+1]=a[1],o[f+2]=a[2],o[f+3]=255*a[3]}t.paletteTextures||(t.paletteTextures=[]);var c="".concat(Ul,"[").concat(t.paletteTextures.length,"]"),l=new Rc(c,o);return t.paletteTextures.push(l),"texture2D(".concat(c,", vec2((").concat(i," + 0.5) / ").concat(e,".0, 0.5))")}};var Bl="getBandValue";function Xl(t){return{getReturnType:function(t){return gl},toGlsl:function(n,i){zl(i,2);for(var r=xl,e=0;e<i.length;e++)r&=Sl(i[e]);if(r===Ml)throw new Error("All arguments should be of compatible type, got ".concat(JSON.stringify(i)," instead"));return r&=~wl,"(".concat(Cl(n,i[0],r)," ").concat(t," ").concat(Cl(n,i[1],r),")")}}}function Vl(t){return{getReturnType:function(t){return gl},toGlsl:function(n,i){Rl(i,2);for(var r=0;r<i.length;r++)Ll(i[r]);var e="";return e=i.map((function(t){return Cl(n,t)})).join(" ".concat(t," ")),e="(".concat(e,")")}}}_l.band={getReturnType:function(t){return yl},toGlsl:function(t,n){Rl(n,1),Fl(n,3);var i=n[0];if(!(Bl in t.functions)){for(var r="",e=t.bandCount||1,o=0;o<e;o++){var s=Math.floor(o/4),u=o%4;u===e-1&&1===u&&(u=3);var a="".concat(ul.TILE_TEXTURE_ARRAY,"[").concat(s,"]");r+="\n          if (band == ".concat(o+1,".0) {\n            return texture2D(").concat(a,", v_textureCoord + vec2(dx, dy))[").concat(u,"];\n          }\n        ")}t.functions.getBandValue="\n        float getBandValue(float band, float xOffset, float yOffset) {\n          float dx = xOffset / ".concat(ul.TEXTURE_PIXEL_WIDTH,";\n          float dy = yOffset / ").concat(ul.TEXTURE_PIXEL_HEIGHT,";\n          ").concat(r,"\n        }\n      ")}var h=Cl(t,i),f=Cl(t,n[1]||0),c=Cl(t,n[2]||0);return"".concat(Bl,"(").concat(h,", ").concat(f,", ").concat(c,")")}},_l.time={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,0),"u_time"}},_l.zoom={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,0),"u_zoom"}},_l.resolution={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,0),"u_resolution"}},_l["*"]={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,2),Il(n),"(".concat(Cl(t,n[0])," * ").concat(Cl(t,n[1]),")")}},_l["/"]={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,2),Il(n),"(".concat(Cl(t,n[0])," / ").concat(Cl(t,n[1]),")")}},_l["+"]={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,2),Il(n),"(".concat(Cl(t,n[0])," + ").concat(Cl(t,n[1]),")")}},_l["-"]={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,2),Il(n),"(".concat(Cl(t,n[0])," - ").concat(Cl(t,n[1]),")")}},_l.clamp={getReturnType:function(t){return yl},toGlsl:function(t,n){zl(n,3),Il(n);var i=Cl(t,n[1]),r=Cl(t,n[2]);return"clamp(".concat(Cl(t,n[0]),", ").concat(i,", ").concat(r,")")}},_l["%"]={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,2),Il(n),"mod(".concat(Cl(t,n[0]),", ").concat(Cl(t,n[1]),")")}},_l["^"]={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,2),Il(n),"pow(".concat(Cl(t,n[0]),", ").concat(Cl(t,n[1]),")")}},_l.abs={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,1),Il(n),"abs(".concat(Cl(t,n[0]),")")}},_l.floor={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,1),Il(n),"floor(".concat(Cl(t,n[0]),")")}},_l.round={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,1),Il(n),"floor(".concat(Cl(t,n[0])," + 0.5)")}},_l.ceil={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,1),Il(n),"ceil(".concat(Cl(t,n[0]),")")}},_l.sin={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,1),Il(n),"sin(".concat(Cl(t,n[0]),")")}},_l.cos={getReturnType:function(t){return yl},toGlsl:function(t,n){return zl(n,1),Il(n),"cos(".concat(Cl(t,n[0]),")")}},_l.atan={getReturnType:function(t){return yl},toGlsl:function(t,n){return Rl(n,1),Fl(n,2),Il(n),2===n.length?"atan(".concat(Cl(t,n[0]),", ").concat(Cl(t,n[1]),")"):"atan(".concat(Cl(t,n[0]),")")}},_l[">"]={getReturnType:function(t){return gl},toGlsl:function(t,n){return zl(n,2),Il(n),"(".concat(Cl(t,n[0])," > ").concat(Cl(t,n[1]),")")}},_l[">="]={getReturnType:function(t){return gl},toGlsl:function(t,n){return zl(n,2),Il(n),"(".concat(Cl(t,n[0])," >= ").concat(Cl(t,n[1]),")")}},_l["<"]={getReturnType:function(t){return gl},toGlsl:function(t,n){return zl(n,2),Il(n),"(".concat(Cl(t,n[0])," < ").concat(Cl(t,n[1]),")")}},_l["<="]={getReturnType:function(t){return gl},toGlsl:function(t,n){return zl(n,2),Il(n),"(".concat(Cl(t,n[0])," <= ").concat(Cl(t,n[1]),")")}},_l["=="]=Xl("=="),_l["!="]=Xl("!="),_l["!"]={getReturnType:function(t){return gl},toGlsl:function(t,n){return zl(n,1),Ll(n[0]),"(!".concat(Cl(t,n[0]),")")}},_l.all=Vl("&&"),_l.any=Vl("||"),_l.between={getReturnType:function(t){return gl},toGlsl:function(t,n){zl(n,3),Il(n);var i=Cl(t,n[1]),r=Cl(t,n[2]),e=Cl(t,n[0]);return"(".concat(e," >= ").concat(i," && ").concat(e," <= ").concat(r,")")}},_l.array={getReturnType:function(t){return bl},toGlsl:function(t,n){Rl(n,2),Fl(n,4),Il(n);var i=n.map((function(n){return Cl(t,n,yl)}));return"vec".concat(n.length,"(").concat(i.join(", "),")")}},_l.color={getReturnType:function(t){return wl},toGlsl:function(t,n){Rl(n,3),Fl(n,4),Il(n);var i=n;3===n.length&&i.push(1);var r=n.map((function(n,i){return Cl(t,n,yl)+(i<3?" / 255.0":"")}));return"vec".concat(n.length,"(").concat(r.join(", "),")")}},_l.interpolate={getReturnType:function(t){for(var n=wl|yl,i=3;i<t.length;i+=2)n&=Sl(t[i]);return n},toGlsl:function(t,n,i){Gl(n),Rl(n,6);var r,e=n[0];switch(e[0]){case"linear":r=1;break;case"exponential":r=e[1];break;default:r=null}if(!r)throw new Error('Invalid interpolation type for "interpolate" operator, received: '.concat(JSON.stringify(e)));var o=void 0!==i?i:xl,s=_l.interpolate.getReturnType(n)&o;Dl(n,s);for(var u=Cl(t,n[1]),a=jl(r),h="",f=2;f<n.length-2;f+=2){var c=Cl(t,n[f]),l=h||Cl(t,n[f+1],s),v=Cl(t,n[f+2]),d=Cl(t,n[f+3],s);h="mix(".concat(l,", ").concat(d,", pow(clamp((").concat(u," - ").concat(c,") / (").concat(v," - ").concat(c,"), 0.0, 1.0), ").concat(a,"))")}return h}},_l.match={getReturnType:function(t){for(var n=xl,i=2;i<t.length;i+=2)n&=Sl(t[i]);return n&=Sl(t[t.length-1])},toGlsl:function(t,n,i){Gl(n),Rl(n,4);var r=void 0!==i?i:xl,e=_l.match.getReturnType(n)&r;Dl(n,e);for(var o=Cl(t,n[0]),s=Cl(t,n[n.length-1],e),u=null,a=n.length-3;a>=1;a-=2){var h=Cl(t,n[a]),f=Cl(t,n[a+1],e);u="(".concat(o," == ").concat(h," ? ").concat(f," : ").concat(u||s,")")}return u}},_l.case={getReturnType:function(t){for(var n=xl,i=1;i<t.length;i+=2)n&=Sl(t[i]);return n&=Sl(t[t.length-1])},toGlsl:function(t,n,i){!function(t){if(t.length%2==0)throw new Error("An odd amount of arguments was expected, got ".concat(t," instead"))}(n),Rl(n,3);var r=void 0!==i?i:xl,e=_l.case.getReturnType(n)&r;Dl(n,e);for(var o=0;o<n.length-1;o+=2)Ll(n[o]);var s=Cl(t,n[n.length-1],e),u=null;for(o=n.length-3;o>=0;o-=2){var a=Cl(t,n[o]),h=Cl(t,n[o+1],e);u="(".concat(a," ? ").concat(h," : ").concat(u||s,")")}return u}};var Wl=function(){function t(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return t.prototype.addUniform=function(t){return this.uniforms.push(t),this},t.prototype.addAttribute=function(t){return this.attributes.push(t),this},t.prototype.addVarying=function(t,n,i){return this.varyings.push({name:t,type:n,expression:i}),this},t.prototype.setSizeExpression=function(t){return this.sizeExpression=t,this},t.prototype.setRotationExpression=function(t){return this.rotationExpression=t,this},t.prototype.setSymbolOffsetExpression=function(t){return this.offsetExpression=t,this},t.prototype.setColorExpression=function(t){return this.colorExpression=t,this},t.prototype.setTextureCoordinateExpression=function(t){return this.texCoordExpression=t,this},t.prototype.setFragmentDiscardExpression=function(t){return this.discardExpression=t,this},t.prototype.setSymbolRotateWithView=function(t){return this.rotateWithView=t,this},t.prototype.getSizeExpression=function(){return this.sizeExpression},t.prototype.getOffsetExpression=function(){return this.offsetExpression},t.prototype.getColorExpression=function(){return this.colorExpression},t.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},t.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},t.prototype.getSymbolVertexShader=function(t){var n=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",i=this.attributes,r=this.varyings;return t&&(i=i.concat("vec4 a_hitColor"),r=r.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n".concat(this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n"),"\nattribute vec2 a_position;\nattribute float a_index;\n").concat(i.map((function(t){return"attribute "+t+";"})).join("\n"),"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n").concat(r.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n"),"\nvoid main(void) {\n  mat4 offsetMatrix = ").concat(n,";\n  vec2 halfSize = ").concat(this.sizeExpression," * 0.5;\n  vec2 offset = ").concat(this.offsetExpression,";\n  float angle = ").concat(this.rotationExpression,";\n  float offsetX;\n  float offsetY;\n  if (a_index == 0.0) {\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n  } else if (a_index == 1.0) {\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n  } else if (a_index == 2.0) {\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\n  } else {\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\n  }\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  vec4 texCoord = ").concat(this.texCoordExpression,";\n  float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n  float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n  v_texCoord = vec2(u, v);\n  u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n  v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\n  v_quadCoord = vec2(u, v);\n").concat(r.map((function(t){return"  "+t.name+" = "+t.expression+";"})).join("\n"),"\n}")},t.prototype.getSymbolFragmentShader=function(t){var n=t?"  if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",i=this.varyings;return t&&(i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),"precision mediump float;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\n".concat(this.uniforms.map((function(t){return"uniform "+t+";"})).join("\n"),"\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\n").concat(i.map((function(t){return"varying "+t.type+" "+t.name+";"})).join("\n"),"\nvoid main(void) {\n  if (").concat(this.discardExpression,") { discard; }\n  gl_FragColor = ").concat(this.colorExpression,";\n  gl_FragColor.rgb *= gl_FragColor.a;\n").concat(n,"\n}")},t}();function Yl(t){var n=t.symbol,i=void 0!==n.size?n.size:1,r=n.color||"white",e=n.textureCoord||[0,0,1,1],o=n.offset||[0,0],s=void 0!==n.opacity?n.opacity:1,u=void 0!==n.rotation?n.rotation:0,a={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{}},h=Cl(a,i,bl|yl),f=Cl(a,o,bl),c=Cl(a,e,bl),l=Cl(a,u,yl),v={inFragmentShader:!0,variables:a.variables,attributes:[],stringLiteralsMap:a.stringLiteralsMap,functions:{}},d=Cl(v,r,wl),p=Cl(v,s,yl),y="1.0",m="vec2(".concat(Cl(v,i,bl|yl),").x");switch(n.symbolType){case"square":case"image":break;case"circle":y="(1.0-smoothstep(1.-4./".concat(m,",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))");break;case"triangle":var w="(v_quadCoord*2.-1.)",g="(atan(".concat(w,".x,").concat(w,".y))");y="(1.0-smoothstep(.5-3./".concat(m,",.5,cos(floor(.5+").concat(g,"/2.094395102)*2.094395102-").concat(g,")*length(").concat(w,")))");break;default:throw new Error("Unexpected symbol type: "+n.symbolType)}var b=(new Wl).setSizeExpression("vec2(".concat(h,")")).setRotationExpression(l).setSymbolOffsetExpression(f).setTextureCoordinateExpression(c).setSymbolRotateWithView(!!n.rotateWithView).setColorExpression("vec4(".concat(d,".rgb, ").concat(d,".a * ").concat(p," * ").concat(y,")"));if(t.filter){var x=Cl(v,t.filter,gl);b.setFragmentDiscardExpression("!".concat(x))}var M={};if(v.variables.forEach((function(n){var i=ql(n);b.addUniform("float ".concat(i)),M[i]=function(){if(!t.variables||void 0===t.variables[n])throw new Error("The following variable is missing from the style: ".concat(n));var i=t.variables[n];return"string"==typeof i&&(i=Al(a,i)),void 0!==i?i:-9999999}})),"image"===n.symbolType&&n.src){var _=new Image;_.crossOrigin=void 0===n.crossOrigin?"anonymous":n.crossOrigin,_.src=n.src,b.addUniform("sampler2D u_texture").setColorExpression(b.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),M.u_texture=_}return v.attributes.forEach((function(t){-1===a.attributes.indexOf(t)&&a.attributes.push(t),b.addVarying("v_".concat(t),"float","a_".concat(t))})),a.attributes.forEach((function(t){b.addAttribute("float a_".concat(t))})),{builder:b,attributes:a.attributes.map((function(t){return{name:t,callback:function(n,i){var r=i[t];return"string"==typeof r&&(r=Al(a,r)),void 0!==r?r:-9999999}}})),uniforms:M}}var Zl=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$l=function(t){function n(n){var i=t.call(this,{extent:n.extent,origin:n.origin,origins:n.origins,resolutions:n.resolutions,tileSize:n.tileSize,tileSizes:n.tileSizes,sizes:n.sizes})||this;return i.eu=n.matrixIds,i}return Zl(n,t),n.prototype.getMatrixId=function(t){return this.eu[t]},n.prototype.getMatrixIds=function(){return this.eu},n}(xf),Kl=$l;function Hl(t,n,i){var r=[],e=[],o=[],s=[],u=[],a=void 0!==i?i:[],h=yr(t.SupportedCRS),f=h.getMetersPerUnit(),c="ne"==h.getAxisOrientation().substr(0,2);return t.TileMatrix.sort((function(t,n){return n.ScaleDenominator-t.ScaleDenominator})),t.TileMatrix.forEach((function(n){if(!(a.length>0)||b(a,(function(i){return n.Identifier==i.TileMatrix||-1===n.Identifier.indexOf(":")&&t.Identifier+":"+n.Identifier===i.TileMatrix}))){e.push(n.Identifier);var i=28e-5*n.ScaleDenominator/f,h=n.TileWidth,l=n.TileHeight;c?o.push([n.TopLeftCorner[1],n.TopLeftCorner[0]]):o.push(n.TopLeftCorner),r.push(i),s.push(h==l?h:[h,l]),u.push([n.MatrixWidth,n.MatrixHeight])}})),new $l({extent:n,origins:o,resolutions:r,matrixIds:e,tileSizes:s,sizes:u})}var Jl=function(){function t(t){this.ou=t.opacity,this.su=t.rotateWithView,this.Dr=t.rotation,this.uu=t.scale,this.au=Qu(t.scale),this.hu=t.displacement,this.fu=t.declutterMode}return t.prototype.clone=function(){var n=this.getScale();return new t({opacity:this.getOpacity(),scale:Array.isArray(n)?n.slice():n,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},t.prototype.getOpacity=function(){return this.ou},t.prototype.getRotateWithView=function(){return this.su},t.prototype.getRotation=function(){return this.Dr},t.prototype.getScale=function(){return this.uu},t.prototype.getScaleArray=function(){return this.au},t.prototype.getDisplacement=function(){return this.hu},t.prototype.getDeclutterMode=function(){return this.fu},t.prototype.getAnchor=function(){return r()},t.prototype.getImage=function(t){return r()},t.prototype.getHitDetectionImage=function(){return r()},t.prototype.getPixelRatio=function(t){return 1},t.prototype.getImageState=function(){return r()},t.prototype.getImageSize=function(){return r()},t.prototype.getOrigin=function(){return r()},t.prototype.getSize=function(){return r()},t.prototype.setDisplacement=function(t){this.hu=t},t.prototype.setOpacity=function(t){this.ou=t},t.prototype.setRotateWithView=function(t){this.su=t},t.prototype.setRotation=function(t){this.Dr=t},t.prototype.setScale=function(t){this.uu=t,this.au=Qu(t)},t.prototype.listenImageChange=function(t){r()},t.prototype.load=function(){r()},t.prototype.unlistenImageChange=function(t){r()},t}(),Ql=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),tv=function(t){function n(n){var i=this,r=void 0!==n.rotateWithView&&n.rotateWithView;return(i=t.call(this,{opacity:1,rotateWithView:r,rotation:void 0!==n.rotation?n.rotation:0,scale:void 0!==n.scale?n.scale:1,displacement:void 0!==n.displacement?n.displacement:[0,0],declutterMode:n.declutterMode})||this).qt=void 0,i.cu=null,i.lu=void 0!==n.fill?n.fill:null,i._o=[0,0],i.Zt=n.points,i.vu=void 0!==n.radius?n.radius:n.radius1,i.du=n.radius2,i.$t=void 0!==n.angle?n.angle:0,i.pu=void 0!==n.stroke?n.stroke:null,i.W=null,i.yu=null,i.render(),i}return Ql(n,t),n.prototype.clone=function(){var t=this.getScale(),i=new n({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(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return i.setOpacity(this.getOpacity()),i},n.prototype.getAnchor=function(){var t=this.W;if(!t)return null;var n=this.getDisplacement();return[t[0]/2-n[0],t[1]/2+n[1]]},n.prototype.getAngle=function(){return this.$t},n.prototype.getFill=function(){return this.lu},n.prototype.setFill=function(t){this.lu=t,this.render()},n.prototype.getHitDetectionImage=function(){return this.cu||this.mu(this.yu),this.cu},n.prototype.getImage=function(t){var n=this.qt[t];if(!n){var i=this.yu,r=_o(i.size*t,i.size*t);this.wu(i,r,t),n=r.canvas,this.qt[t]=n}return n},n.prototype.getPixelRatio=function(t){return t},n.prototype.getImageSize=function(){return this.W},n.prototype.getImageState=function(){return po},n.prototype.getOrigin=function(){return this._o},n.prototype.getPoints=function(){return this.Zt},n.prototype.getRadius=function(){return this.vu},n.prototype.getRadius2=function(){return this.du},n.prototype.getSize=function(){return this.W},n.prototype.getStroke=function(){return this.pu},n.prototype.setStroke=function(t){this.pu=t,this.render()},n.prototype.listenImageChange=function(t){},n.prototype.load=function(){},n.prototype.unlistenImageChange=function(t){},n.prototype.gu=function(t,n,i){if(0===n||this.Zt===1/0||"bevel"!==t&&"miter"!==t)return n;var r=this.vu,e=void 0===this.du?r:this.du;if(r<e){var o=r;r=e,e=o}var s=void 0===this.du?this.Zt:2*this.Zt,u=2*Math.PI/s,a=e*Math.sin(u),h=r-Math.sqrt(e*e-a*a),f=Math.sqrt(a*a+h*h),c=f/a;if("miter"===t&&c<=i)return c*n;var l=n/2/c,v=n/2*(h/f),d=Math.sqrt((r+l)*(r+l)+v*v)-r;if(void 0===this.du||"bevel"===t)return 2*d;var p=r*Math.sin(u),y=e-Math.sqrt(r*r-p*p),m=Math.sqrt(p*p+y*y)/p;if(m<=i){var w=m*n/2-e-r;return 2*Math.max(d,w)}return 2*d},n.prototype.createRenderOptions=function(){var t,n=Cs,i=0,r=null,e=0,o=0;this.pu&&(null===(t=this.pu.getColor())&&(t=Is),t=Uh(t),void 0===(o=this.pu.getWidth())&&(o=1),r=this.pu.getLineDash(),e=this.pu.getLineDashOffset(),void 0===(n=this.pu.getLineJoin())&&(n=Cs),void 0===(i=this.pu.getMiterLimit())&&(i=ks));var s=this.gu(n,o,i),u=Math.max(this.vu,this.du||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*u+s),lineDash:r,lineDashOffset:e,lineJoin:n,miterLimit:i}},n.prototype.render=function(){this.yu=this.createRenderOptions();var t=this.yu.size;this.qt={},this.W=[t,t]},n.prototype.wu=function(t,n,i){if(n.scale(i,i),n.translate(t.size/2,t.size/2),this.bu(n),this.lu){var r=this.lu.getColor();null===r&&(r=Ts),n.fillStyle=Uh(r),n.fill()}this.pu&&(n.strokeStyle=t.strokeStyle,n.lineWidth=t.strokeWidth,n.setLineDash&&t.lineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit,n.stroke())},n.prototype.mu=function(t){if(this.lu){var n=this.lu.getColor(),i=0;if("string"==typeof n&&(n=Go(n)),null===n?i=1:Array.isArray(n)&&(i=4===n.length?n[3]:1),0===i){var r=_o(t.size,t.size);this.cu=r.canvas,this.xu(t,r)}}this.cu||(this.cu=this.getImage(1))},n.prototype.bu=function(t){var n=this.Zt,i=this.vu;if(n===1/0)t.arc(0,0,i,0,2*Math.PI);else{var r=void 0===this.du?i:this.du;void 0!==this.du&&(n*=2);for(var e=this.$t-Math.PI/2,o=2*Math.PI/n,s=0;s<n;s++){var u=e+s*o,a=s%2==0?i:r;t.lineTo(a*Math.cos(u),a*Math.sin(u))}t.closePath()}},n.prototype.xu=function(t,n){n.translate(t.size/2,t.size/2),this.bu(n),n.fillStyle=Ts,n.fill(),this.pu&&(n.strokeStyle=t.strokeStyle,n.lineWidth=t.strokeWidth,t.lineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit,n.stroke())},n}(Jl),nv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),iv=function(t){function n(n){var i=n||{};return t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,scale:void 0!==i.scale?i.scale:1,rotation:void 0!==i.rotation?i.rotation:0,rotateWithView:void 0!==i.rotateWithView&&i.rotateWithView,displacement:void 0!==i.displacement?i.displacement:[0,0],declutterMode:i.declutterMode})||this}return nv(n,t),n.prototype.clone=function(){var t=this.getScale(),i=new n({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return i.setOpacity(this.getOpacity()),i},n.prototype.setRadius=function(t){this.vu=t,this.render()},n}(tv),rv=function(){function t(t){var n=t||{};this.Mu=void 0!==n.color?n.color:null}return t.prototype.clone=function(){var n=this.getColor();return new t({color:Array.isArray(n)?n.slice():n||void 0})},t.prototype.getColor=function(){return this.Mu},t.prototype.setColor=function(t){this.Mu=t},t}(),ev="fraction",ov="pixels",sv="bottom-left",uv="bottom-right",av="top-left",hv="top-right",fv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),cv=null,lv=function(t){function n(n,i,r,e,o,s){var u=t.call(this)||this;return u._u=null,u.Lt=n||new Image,null!==e&&(u.Lt.crossOrigin=e),u.qt={},u.Mu=s,u.zt=null,u.Su=o,u.W=r,u.Nt=i,u.Ou,u}return fv(n,t),n.prototype.ju=function(){if(void 0===this.Ou&&this.Su===po){cv||(cv=_o(1,1)),cv.drawImage(this.Lt,0,0);try{cv.getImageData(0,0,1,1),this.Ou=!1}catch(t){cv=null,this.Ou=!0}}return!0===this.Ou},n.prototype.Eu=function(){this.dispatchEvent(L)},n.prototype.Ft=function(){this.Su=yo,this.Gt(),this.Eu()},n.prototype.Dt=function(){this.Su=po,this.W?(this.Lt.width=this.W[0],this.Lt.height=this.W[1]):this.W=[this.Lt.width,this.Lt.height],this.Gt(),this.Eu()},n.prototype.getImage=function(t){return this.Tu(t),this.qt[t]?this.qt[t]:this.Lt},n.prototype.getPixelRatio=function(t){return this.Tu(t),this.qt[t]?t:1},n.prototype.getImageState=function(){return this.Su},n.prototype.getHitDetectionImage=function(){if(!this._u)if(this.ju()){var t=this.W[0],n=this.W[1],i=_o(t,n);i.fillRect(0,0,t,n),this._u=i.canvas}else this._u=this.Lt;return this._u},n.prototype.getSize=function(){return this.W},n.prototype.getSrc=function(){return this.Nt},n.prototype.load=function(){if(this.Su==lo){this.Su=vo;try{this.Lt.src=this.Nt}catch(t){this.Ft()}this.zt=go(this.Lt,this.Dt.bind(this),this.Ft.bind(this))}},n.prototype.Tu=function(t){if(this.Mu&&!this.qt[t]&&this.Su===po){var n=document.createElement("canvas");this.qt[t]=n,n.width=Math.ceil(this.Lt.width*t),n.height=Math.ceil(this.Lt.height*t);var i=n.getContext("2d");if(i.scale(t,t),i.drawImage(this.Lt,0,0),i.globalCompositeOperation="multiply","multiply"===i.globalCompositeOperation||this.ju())i.fillStyle=zo(this.Mu),i.fillRect(0,0,n.width/t,n.height/t),i.globalCompositeOperation="destination-in",i.drawImage(this.Lt,0,0);else{for(var r=i.getImageData(0,0,n.width,n.height),e=r.data,o=this.Mu[0]/255,s=this.Mu[1]/255,u=this.Mu[2]/255,a=this.Mu[3],h=0,f=e.length;h<f;h+=4)e[h]*=o,e[h+1]*=s,e[h+2]*=u,e[h+3]*=a;i.putImageData(r,0,0)}}},n.prototype.Gt=function(){this.zt&&(this.zt(),this.zt=null)},n}(N);function vv(t,n,i,r,e,o){var s=Wo.get(n,r,o);return s||(s=new lv(t,n,i,r,e,o),Wo.set(n,r,o,s)),s}var dv=lv,pv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),yv=function(t){function n(n){var i=this,r=n||{},e=void 0!==r.opacity?r.opacity:1,s=void 0!==r.rotation?r.rotation:0,u=void 0!==r.scale?r.scale:1,a=void 0!==r.rotateWithView&&r.rotateWithView;(i=t.call(this,{opacity:e,rotation:s,scale:u,displacement:void 0!==r.displacement?r.displacement:[0,0],rotateWithView:a,declutterMode:r.declutterMode})||this).xe=void 0!==r.anchor?r.anchor:[.5,.5],i.Au=null,i.Pu=void 0!==r.anchorOrigin?r.anchorOrigin:av,i.Cu=void 0!==r.anchorXUnits?r.anchorXUnits:ev,i.ku=void 0!==r.anchorYUnits?r.anchorYUnits:ev,i.Bt=void 0!==r.crossOrigin?r.crossOrigin:null;var h=void 0!==r.img?r.img:null;i.Iu=r.imgSize;var f=r.src;St(!(void 0!==f&&h),4),St(!h||h&&i.Iu,5),void 0!==f&&0!==f.length||!h||(f=h.src||o(h)),St(void 0!==f&&f.length>0,6);var c=void 0!==r.src?lo:po;return i.Mu=void 0!==r.color?Go(r.color):null,i.Nu=vv(h,f,void 0!==i.Iu?i.Iu:null,i.Bt,c,i.Mu),i.Lu=void 0!==r.offset?r.offset:[0,0],i.zu=void 0!==r.offsetOrigin?r.offsetOrigin:av,i._o=null,i.W=void 0!==r.size?r.size:null,i}return pv(n,t),n.prototype.clone=function(){var t=this.getScale();return new n({anchor:this.xe.slice(),anchorOrigin:this.Pu,anchorXUnits:this.Cu,anchorYUnits:this.ku,color:this.Mu&&this.Mu.slice?this.Mu.slice():this.Mu||void 0,crossOrigin:this.Bt,imgSize:this.Iu,offset:this.Lu.slice(),offsetOrigin:this.zu,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.W?this.W.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},n.prototype.getAnchor=function(){var t=this.Au;if(!t){t=this.xe;var n=this.getSize();if(this.Cu==ev||this.ku==ev){if(!n)return null;t=this.xe.slice(),this.Cu==ev&&(t[0]*=n[0]),this.ku==ev&&(t[1]*=n[1])}if(this.Pu!=av){if(!n)return null;t===this.xe&&(t=this.xe.slice()),this.Pu!=hv&&this.Pu!=uv||(t[0]=-t[0]+n[0]),this.Pu!=sv&&this.Pu!=uv||(t[1]=-t[1]+n[1])}this.Au=t}var i=this.getDisplacement();return[t[0]-i[0],t[1]+i[1]]},n.prototype.setAnchor=function(t){this.xe=t,this.Au=null},n.prototype.getColor=function(){return this.Mu},n.prototype.getImage=function(t){return this.Nu.getImage(t)},n.prototype.getPixelRatio=function(t){return this.Nu.getPixelRatio(t)},n.prototype.getImageSize=function(){return this.Nu.getSize()},n.prototype.getImageState=function(){return this.Nu.getImageState()},n.prototype.getHitDetectionImage=function(){return this.Nu.getHitDetectionImage()},n.prototype.getOrigin=function(){if(this._o)return this._o;var t=this.Lu;if(this.zu!=av){var n=this.getSize(),i=this.Nu.getSize();if(!n||!i)return null;t=t.slice(),this.zu!=hv&&this.zu!=uv||(t[0]=i[0]-n[0]-t[0]),this.zu!=sv&&this.zu!=uv||(t[1]=i[1]-n[1]-t[1])}return this._o=t,this._o},n.prototype.getSrc=function(){return this.Nu.getSrc()},n.prototype.getSize=function(){return this.W?this.W:this.Nu.getSize()},n.prototype.listenImageChange=function(t){this.Nu.addEventListener(L,t)},n.prototype.load=function(){this.Nu.load()},n.prototype.unlistenImageChange=function(t){this.Nu.removeEventListener(L,t)},n}(Jl),mv=function(){function t(t){var n=t||{};this.Mu=void 0!==n.color?n.color:null,this.Ru=n.lineCap,this.Fu=void 0!==n.lineDash?n.lineDash:null,this.Gu=n.lineDashOffset,this.Du=n.lineJoin,this.qu=n.miterLimit,this.Uu=n.width}return t.prototype.clone=function(){var n=this.getColor();return new t({color:Array.isArray(n)?n.slice():n||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.Mu},t.prototype.getLineCap=function(){return this.Ru},t.prototype.getLineDash=function(){return this.Fu},t.prototype.getLineDashOffset=function(){return this.Gu},t.prototype.getLineJoin=function(){return this.Du},t.prototype.getMiterLimit=function(){return this.qu},t.prototype.getWidth=function(){return this.Uu},t.prototype.setColor=function(t){this.Mu=t},t.prototype.setLineCap=function(t){this.Ru=t},t.prototype.setLineDash=function(t){this.Fu=t},t.prototype.setLineDashOffset=function(t){this.Gu=t},t.prototype.setLineJoin=function(t){this.Du=t},t.prototype.setMiterLimit=function(t){this.qu=t},t.prototype.setWidth=function(t){this.Uu=t},t}(),wv=function(){function t(t){var n=t||{};this.Hr=null,this.Bu=_v,void 0!==n.geometry&&this.setGeometry(n.geometry),this.lu=void 0!==n.fill?n.fill:null,this.Lt=void 0!==n.image?n.image:null,this.hn=void 0!==n.renderer?n.renderer:null,this.Xu=void 0!==n.hitDetectionRenderer?n.hitDetectionRenderer:null,this.pu=void 0!==n.stroke?n.stroke:null,this.eo=void 0!==n.text?n.text:null,this.Vu=n.zIndex}return t.prototype.clone=function(){var n=this.getGeometry();return n&&"object"==typeof n&&(n=n.clone()),new t({geometry:n,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),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.hn},t.prototype.setRenderer=function(t){this.hn=t},t.prototype.setHitDetectionRenderer=function(t){this.Xu=t},t.prototype.getHitDetectionRenderer=function(){return this.Xu},t.prototype.getGeometry=function(){return this.Hr},t.prototype.getGeometryFunction=function(){return this.Bu},t.prototype.getFill=function(){return this.lu},t.prototype.setFill=function(t){this.lu=t},t.prototype.getImage=function(){return this.Lt},t.prototype.setImage=function(t){this.Lt=t},t.prototype.getStroke=function(){return this.pu},t.prototype.setStroke=function(t){this.pu=t},t.prototype.getText=function(){return this.eo},t.prototype.setText=function(t){this.eo=t},t.prototype.getZIndex=function(){return this.Vu},t.prototype.setGeometry=function(t){"function"==typeof t?this.Bu=t:"string"==typeof t?this.Bu=function(n){return n.get(t)}:t?void 0!==t&&(this.Bu=function(){return t}):this.Bu=_v,this.Hr=t},t.prototype.setZIndex=function(t){this.Vu=t},t}();function gv(t){var n;if("function"==typeof t)n=t;else{var i;if(Array.isArray(t))i=t;else St("function"==typeof t.getZIndex,41),i=[t];n=function(){return i}}return n}var bv=null;function xv(t,n){if(!bv){var i=new rv({color:"rgba(255,255,255,0.4)"}),r=new mv({color:"#3399CC",width:1.25});bv=[new wv({image:new iv({fill:i,stroke:r,radius:5}),fill:i,stroke:r})]}return bv}function Mv(){var t={},n=[255,255,255,1],i=[0,153,255,1];return t.Polygon=[new wv({fill:new rv({color:[255,255,255,.5]})})],t.MultiPolygon=t.Polygon,t.LineString=[new wv({stroke:new mv({color:n,width:5})}),new wv({stroke:new mv({color:i,width:3})})],t.MultiLineString=t.LineString,t.Circle=t.Polygon.concat(t.LineString),t.Point=[new wv({image:new iv({radius:6,fill:new rv({color:i}),stroke:new mv({color:n,width:1.5})}),zIndex:1/0})],t.MultiPoint=t.Point,t.GeometryCollection=t.Polygon.concat(t.LineString,t.Point),t}function _v(t){return t.getGeometry()}var Sv=wv,Ov="point",jv="line",Ev=function(){function t(t){var n=t||{};this.Wu=n.font,this.Dr=n.rotation,this.su=n.rotateWithView,this.uu=n.scale,this.au=Qu(void 0!==n.scale?n.scale:1),this.eo=n.text,this.Yu=n.textAlign,this.Zu=n.justify,this.$u=n.textBaseline,this.lu=void 0!==n.fill?n.fill:new rv({color:"#333"}),this.Ku=void 0!==n.maxAngle?n.maxAngle:Math.PI/4,this.Hu=void 0!==n.placement?n.placement:Ov,this.Ju=!!n.overflow,this.pu=void 0!==n.stroke?n.stroke:null,this.Qu=void 0!==n.offsetX?n.offsetX:0,this.ta=void 0!==n.offsetY?n.offsetY:0,this.na=n.backgroundFill?n.backgroundFill:null,this.ia=n.backgroundStroke?n.backgroundStroke:null,this.Ai=void 0===n.padding?null:n.padding}return t.prototype.clone=function(){var n=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(n)?n.slice():n,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),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()||void 0})},t.prototype.getOverflow=function(){return this.Ju},t.prototype.getFont=function(){return this.Wu},t.prototype.getMaxAngle=function(){return this.Ku},t.prototype.getPlacement=function(){return this.Hu},t.prototype.getOffsetX=function(){return this.Qu},t.prototype.getOffsetY=function(){return this.ta},t.prototype.getFill=function(){return this.lu},t.prototype.getRotateWithView=function(){return this.su},t.prototype.getRotation=function(){return this.Dr},t.prototype.getScale=function(){return this.uu},t.prototype.getScaleArray=function(){return this.au},t.prototype.getStroke=function(){return this.pu},t.prototype.getText=function(){return this.eo},t.prototype.getTextAlign=function(){return this.Yu},t.prototype.getJustify=function(){return this.Zu},t.prototype.getTextBaseline=function(){return this.$u},t.prototype.getBackgroundFill=function(){return this.na},t.prototype.getBackgroundStroke=function(){return this.ia},t.prototype.getPadding=function(){return this.Ai},t.prototype.setOverflow=function(t){this.Ju=t},t.prototype.setFont=function(t){this.Wu=t},t.prototype.setMaxAngle=function(t){this.Ku=t},t.prototype.setOffsetX=function(t){this.Qu=t},t.prototype.setOffsetY=function(t){this.ta=t},t.prototype.setPlacement=function(t){this.Hu=t},t.prototype.setRotateWithView=function(t){this.su=t},t.prototype.setFill=function(t){this.lu=t},t.prototype.setRotation=function(t){this.Dr=t},t.prototype.setScale=function(t){this.uu=t,this.au=Qu(void 0!==t?t:1)},t.prototype.setStroke=function(t){this.pu=t},t.prototype.setText=function(t){this.eo=t},t.prototype.setTextAlign=function(t){this.Yu=t},t.prototype.setJustify=function(t){this.Zu=t},t.prototype.setTextBaseline=function(t){this.$u=t},t.prototype.setBackgroundFill=function(t){this.na=t},t.prototype.setBackgroundStroke=function(t){this.ia=t},t.prototype.setPadding=function(t){this.Ai=t},t}(),Tv=function(){function t(t){this.ra,this.ea,this.oa,this.sa=void 0===t||t,this.ua=0}return t.prototype.insertItem=function(t){var n={prev:void 0,next:void 0,data:t},i=this.oa;if(i){var r=i.next;n.prev=i,n.next=r,i.next=n,r&&(r.prev=n),i===this.ea&&(this.ea=n)}else this.ra=n,this.ea=n,this.sa&&(n.next=n,n.prev=n);this.oa=n,this.ua++},t.prototype.removeItem=function(){var t=this.oa;if(t){var n=t.next,i=t.prev;n&&(n.prev=i),i&&(i.next=n),this.oa=n||i,this.ra===this.ea?(this.oa=void 0,this.ra=void 0,this.ea=void 0):this.ra===t?this.ra=this.oa:this.ea===t&&(this.ea=i?this.oa.prev:this.oa),this.ua--}},t.prototype.firstItem=function(){if(this.oa=this.ra,this.oa)return this.oa.data},t.prototype.lastItem=function(){if(this.oa=this.ea,this.oa)return this.oa.data},t.prototype.nextItem=function(){if(this.oa&&this.oa.next)return this.oa=this.oa.next,this.oa.data},t.prototype.getNextItem=function(){if(this.oa&&this.oa.next)return this.oa.next.data},t.prototype.prevItem=function(){if(this.oa&&this.oa.prev)return this.oa=this.oa.prev,this.oa.data},t.prototype.getPrevItem=function(){if(this.oa&&this.oa.prev)return this.oa.prev.data},t.prototype.getCurrItem=function(){if(this.oa)return this.oa.data},t.prototype.setFirstItem=function(){this.sa&&this.oa&&(this.ra=this.oa,this.ea=this.oa.prev)},t.prototype.concat=function(t){if(t.oa){if(this.oa){var n=this.oa.next;this.oa.next=t.ra,t.ra.prev=this.oa,n.prev=t.ea,t.ea.next=n,this.ua+=t.ua}else this.oa=t.oa,this.ra=t.ra,this.ea=t.ea,this.ua=t.ua;t.oa=void 0,t.ra=void 0,t.ea=void 0,t.ua=0}},t.prototype.getLength=function(){return this.ua},t}(),Av=i(72),Pv=function(){function t(t){this.aa=new Av(t),this.ha={}}return t.prototype.insert=function(t,n){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:n};this.aa.insert(i),this.ha[o(n)]=i},t.prototype.load=function(t,n){for(var i=new Array(n.length),r=0,e=n.length;r<e;r++){var s=t[r],u=n[r],a={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:u};i[r]=a,this.ha[o(u)]=a}this.aa.load(i)},t.prototype.remove=function(t){var n=o(t),i=this.ha[n];return delete this.ha[n],null!==this.aa.remove(i)},t.prototype.update=function(t,n){var i=this.ha[o(n)];An([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(n),this.insert(t,n))},t.prototype.getAll=function(){return this.aa.all().map((function(t){return t.value}))},t.prototype.getInExtent=function(t){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.aa.search(n).map((function(t){return t.value}))},t.prototype.forEach=function(t){return this.fa(this.getAll(),t)},t.prototype.forEachInExtent=function(t,n){return this.fa(this.getInExtent(t),n)},t.prototype.fa=function(t,n){for(var i,r=0,e=t.length;r<e;r++)if(i=n(t[r]))return i;return i},t.prototype.isEmpty=function(){return k(this.ha)},t.prototype.clear=function(){this.aa.clear(),this.ha={}},t.prototype.getExtent=function(t){var n=this.aa.toJSON();return On(n.minX,n.minY,n.maxX,n.maxY,t)},t.prototype.concat=function(t){for(var n in this.aa.load(t.aa.all()),t.ha)this.ha[n]=t.ha[n]},t}(),Cv="tileloadstart",kv="tileloadend",Iv="tileloaderror",Nv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Lv(t){return t?Array.isArray(t)?function(n){return t}:"function"==typeof t?t:function(n){return[t]}:null}var zv=function(t){function n(n){var i=t.call(this)||this;i.projection=yr(n.projection),i.ca=Lv(n.attributions),i.la=void 0===n.attributionsCollapsible||n.attributionsCollapsible,i.loading=!1,i.rn=void 0!==n.state?n.state:"ready",i.va=void 0!==n.wrapX&&n.wrapX,i.da=!!n.interpolate,i.viewResolver=null,i.viewRejector=null;var r=i;return i.pa=new Promise((function(t,n){r.viewResolver=t,r.viewRejector=n})),i}return Nv(n,t),n.prototype.getAttributions=function(){return this.ca},n.prototype.getAttributionsCollapsible=function(){return this.la},n.prototype.getProjection=function(){return this.projection},n.prototype.getResolutions=function(){return r()},n.prototype.getView=function(){return this.pa},n.prototype.getState=function(){return this.rn},n.prototype.getWrapX=function(){return this.va},n.prototype.getInterpolate=function(){return this.da},n.prototype.refresh=function(){this.changed()},n.prototype.setAttributions=function(t){this.ca=Lv(t),this.changed()},n.prototype.setState=function(t){this.rn=t,this.changed()},n}(et),Rv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Fv=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,projection:n.projection,state:n.state,wrapX:n.wrapX,interpolate:n.interpolate})||this;i.on,i.once,i.un,i.ya=void 0!==n.opaque&&n.opaque,i.ma=void 0!==n.tilePixelRatio?n.tilePixelRatio:1,i.tileGrid=void 0!==n.tileGrid?n.tileGrid:null;return i.tileGrid&&Qu(i.tileGrid.getTileSize(i.tileGrid.getMinZoom()),[256,256]),i.tileCache=new Ih(n.cacheSize||0),i.tmpSize=[0,0],i.ke=n.key||"",i.tileOptions={transition:n.transition,interpolate:n.interpolate},i.zDirection=n.zDirection?n.zDirection:0,i}return Rv(n,t),n.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},n.prototype.expireCache=function(t,n){var i=this.getTileCacheForProjection(t);i&&i.expireCache(n)},n.prototype.forEachLoadedTile=function(t,n,i,r){var e=this.getTileCacheForProjection(t);if(!e)return!1;for(var o,s,u,a=!0,h=i.minX;h<=i.maxX;++h)for(var f=i.minY;f<=i.maxY;++f)s=jh(n,h,f),u=!1,e.containsKey(s)&&(u=(o=e.get(s)).getState()===vt)&&(u=!1!==r(o)),u||(a=!1);return a},n.prototype.getGutterForProjection=function(t){return 0},n.prototype.getKey=function(){return this.ke},n.prototype.setKey=function(t){this.ke!==t&&(this.ke=t,this.changed())},n.prototype.getOpaque=function(t){return this.ya},n.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},n.prototype.getTile=function(t,n,i,e,o){return r()},n.prototype.getTileGrid=function(){return this.tileGrid},n.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Mf(t)},n.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();return St(null===n||Sr(n,t),68),this.tileCache},n.prototype.getTilePixelRatio=function(t){return this.ma},n.prototype.getTilePixelSize=function(t,n,i){var r=this.getTileGridForProjection(i),e=this.getTilePixelRatio(n),o=Qu(r.getTileSize(t),this.tmpSize);return 1==e?o:Ju(o,e,this.tmpSize)},n.prototype.getTileCoordForTileUrlFunction=function(t,n){var i=void 0!==n?n:this.getProjection(),r=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=_f(r,t,i)),Ch(t,r)?t:null},n.prototype.clear=function(){this.tileCache.clear()},n.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},n.prototype.updateCacheSize=function(t,n){var i=this.getTileCacheForProjection(n);t>i.highWaterMark&&(i.highWaterMark=t)},n.prototype.useTile=function(t,n,i,r){},n}(zv),Gv=function(t){function n(n,i){var r=t.call(this,n)||this;return r.tile=i,r}return Rv(n,t),n}(c),Dv=Fv,qv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Uv=function(t){function n(i){var r=t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,opaque:i.opaque,projection:i.projection,state:i.state,tileGrid:i.tileGrid,tilePixelRatio:i.tilePixelRatio,wrapX:i.wrapX,transition:i.transition,interpolate:i.interpolate,key:i.key,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection})||this;return r.wa=r.tileUrlFunction===n.prototype.tileUrlFunction,r.tileLoadFunction=i.tileLoadFunction,i.tileUrlFunction&&(r.tileUrlFunction=i.tileUrlFunction),r.urls=null,i.urls?r.setUrls(i.urls):i.url&&r.setUrl(i.url),r.ga={},r}return qv(n,t),n.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},n.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},n.prototype.getUrls=function(){return this.urls},n.prototype.handleTileChange=function(t){var n,i=t.target,r=o(i),e=i.getState();e==lt?(this.ga[r]=!0,n=Cv):r in this.ga&&(delete this.ga[r],n=e==dt?Iv:e==vt?kv:void 0),null!=n&&this.dispatchEvent(new Gv(n,i))},n.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},n.prototype.setTileUrlFunction=function(t,n){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==n?this.setKey(n):this.changed()},n.prototype.setUrl=function(t){var n=If(t);this.urls=n,this.setUrls(n)},n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.wa?this.setTileUrlFunction(Pf(t,this.tileGrid),n):this.setKey(n)},n.prototype.tileUrlFunction=function(t,n,i){},n.prototype.useTile=function(t,n,i){var r=jh(t,n,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(Dv),Bv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Xv(t,n){t.getImage().src=n}var Vv=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:Xv,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:n.wrapX,transition:n.transition,interpolate:r,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this).crossOrigin=void 0!==n.crossOrigin?n.crossOrigin:null,i.tileClass=void 0!==n.tileClass?n.tileClass:ko,i.tileCacheForProjection={},i.tileGridForProjection={},i.ba=n.reprojectionErrorThreshold,i.xa=!1,i}return Bv(n,t),n.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},n.prototype.expireCache=function(t,n){var i=this.getTileCacheForProjection(t);for(var r in this.tileCache.expireCache(this.tileCache==i?n:{}),this.tileCacheForProjection){var e=this.tileCacheForProjection[r];e.expireCache(e==i?n:{})}},n.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Sr(this.getProjection(),t)?0:this.getGutter()},n.prototype.getGutter=function(){return 0},n.prototype.getKey=function(){var n=t.prototype.getKey.call(this);return this.getInterpolate()||(n+=":disable-interpolation"),n},n.prototype.getOpaque=function(n){return!(this.getProjection()&&n&&!Sr(this.getProjection(),n))&&t.prototype.getOpaque.call(this,n)},n.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(!this.tileGrid||n&&!Sr(n,t)){var i=o(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Mf(t)),this.tileGridForProjection[i]}return this.tileGrid},n.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||Sr(n,t))return this.tileCache;var i=o(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Ih(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},n.prototype.Ma=function(t,n,i,r,e,o){var s=[t,n,i],u=this.getTileCoordForTileUrlFunction(s,e),a=u?this.tileUrlFunction(u,r,e):void 0,h=new this.tileClass(s,void 0!==a?ct:pt,void 0!==a?a:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=o,h.addEventListener(L,this.handleTileChange.bind(this)),h},n.prototype.getTile=function(t,n,i,r,e){var o=this.getProjection();if(o&&e&&!Sr(o,e)){var s=this.getTileCacheForProjection(e),u=[t,n,i],a=void 0,h=Eh(u);s.containsKey(h)&&(a=s.get(h));var f=this.getKey();if(a&&a.key==f)return a;var c=this.getTileGridForProjection(o),l=this.getTileGridForProjection(e),v=this.getTileCoordForTileUrlFunction(u,e),d=new Bc(o,c,e,l,u,v,this.getTilePixelRatio(r),this.getGutter(),function(t,n,i,r){return this.getTileInternal(t,n,i,r,o)}.bind(this),this.ba,this.xa,this.getInterpolate());return d.key=f,a?(d.interimTile=a,d.refreshInterimChain(),s.replace(h,d)):s.set(h,d),d}return this.getTileInternal(t,n,i,r,o||e)},n.prototype.getTileInternal=function(t,n,i,r,e){var o=null,s=jh(t,n,i),u=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=u){var a=o;o=this.Ma(t,n,i,r,e,u),a.getState()==ct?o.interimTile=a.interimTile:o.interimTile=a,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.Ma(t,n,i,r,e,u),this.tileCache.set(s,o);return o},n.prototype.setRenderReprojectionEdges=function(t){if(this.xa!=t){for(var n in this.xa=t,this.tileCacheForProjection)this.tileCacheForProjection[n].clear();this.changed()}},n.prototype.setTileGridForProjection=function(t,n){var i=yr(t);if(i){var r=o(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=n)}},n}(Uv),Wv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Yv(t){var n,i,r=t[0],e=new Array(r),o=1<<r-1;for(n=0;n<r;++n)i=48,t[1]&o&&(i+=1),t[2]&o&&(i+=2),e[n]=String.fromCharCode(i),o>>=1;return e.join("")}var Zv=function(t){function n(n){var i=this,r=void 0!==n.hidpi&&n.hidpi,e=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(e=n.interpolate),(i=t.call(this,{cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:e,opaque:!0,projection:yr("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:"loading",tileLoadFunction:n.tileLoadFunction,tilePixelRatio:r?2:1,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this)._a=r,i.Sa=void 0!==n.culture?n.culture:"en-us",i.Oa=void 0!==n.maxZoom?n.maxZoom:-1,i.ja=n.key,i.Ea=n.imagerySet,Zh("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+i.Ea+"?uriScheme=https&include=ImageryProviders&key="+i.ja+"&c="+i.Sa,i.handleImageryMetadataResponse.bind(i),void 0,"jsonp"),i}return Wv(n,t),n.prototype.getApiKey=function(){return this.ja},n.prototype.getImagerySet=function(){return this.Ea},n.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var n=t.resourceSets[0].resources[0],i=-1==this.Oa?n.zoomMax:this.Oa,r=Tf(this.getProjection()),e=this._a?2:1,o=n.imageWidth==n.imageHeight?n.imageWidth/e:[n.imageWidth/e,n.imageHeight/e],s=Of({extent:r,minZoom:n.zoomMin,maxZoom:i,tileSize:o});this.tileGrid=s;var u=this.Sa,a=this._a;if(this.tileUrlFunction=Cf(n.imageUrlSubdomains.map((function(t){var i=[0,0,0],r=n.imageUrl.replace("{subdomain}",t).replace("{culture}",u);return function(t,n,e){if(t){Oh(t[0],t[1],t[2],i);var o=r;return a&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",Yv(i))}}}))),n.imageryProviders){var h=Or(yr("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var i=[],r=t.viewState,e=this.getTileGrid(),o=e.getZForResolution(r.resolution,this.zDirection),s=e.getTileCoordForCoordAndZ(r.center,o)[0];return n.imageryProviders.map((function(n){for(var r=!1,e=n.coverageAreas,o=0,u=e.length;o<u;++o){var a=e[o];if(s>=a.zoomMin&&s<=a.zoomMax){var f=a.bbox;if(Kn(ni([f[1],f[0],f[3],f[2]],h),t.extent)){r=!0;break}}}r&&i.push(n.attribution)})),i.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),i}.bind(this))}this.setState("ready")}else this.setState("error")},n}(Vv),$v=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kv=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate);var o=void 0!==r.projection?r.projection:"EPSG:3857",s=void 0!==r.tileGrid?r.tileGrid:Of({extent:Tf(o),maxResolution:r.maxResolution,maxZoom:r.maxZoom,minZoom:r.minZoom,tileSize:r.tileSize});return(i=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,opaque:r.opaque,projection:o,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:s,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).js=void 0!==r.gutter?r.gutter:0,i}return $v(n,t),n.prototype.getGutter=function(){return this.js},n}(Vv),Hv=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jv=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,maxZoom:void 0!==n.maxZoom?n.maxZoom:18,minZoom:n.minZoom,projection:n.projection,transition:n.transition,wrapX:n.wrapX,zDirection:n.zDirection})||this;return i.Ta=n.account,i.Aa=n.map||"",i.Pa=n.config||{},i.Ca={},i.ka(),i}return Hv(n,t),n.prototype.getConfig=function(){return this.Pa},n.prototype.updateConfig=function(t){A(this.Pa,t),this.ka()},n.prototype.setConfig=function(t){this.Pa=t||{},this.ka()},n.prototype.ka=function(){var t=JSON.stringify(this.Pa);if(this.Ca[t])this.Ia(this.Ca[t]);else{var n="https://"+this.Ta+".carto.com/api/v1/map";this.Aa&&(n+="/named/"+this.Aa);var i=new XMLHttpRequest;i.addEventListener("load",this.Na.bind(this,t)),i.addEventListener("error",this.La.bind(this)),i.open("POST",n),i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(this.Pa))}},n.prototype.Na=function(t,n){var i=n.target;if(!i.status||i.status>=200&&i.status<300){var r=void 0;try{r=JSON.parse(i.responseText)}catch(t){return void this.setState("error")}this.Ia(r),this.Ca[t]=r,this.setState("ready")}else this.setState("error")},n.prototype.La=function(t){this.setState("error")},n.prototype.Ia=function(t){var n="https://"+t.cdn_url.https+"/"+this.Ta+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(n)},n}(Kv),Qv="addfeature",td="changefeature",nd="clear",id="removefeature",rd="featuresloadstart",ed="featuresloadend",od="featuresloaderror",sd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ud=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.feature=i,e.features=r,e}return sd(n,t),n}(c),ad=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{attributions:r.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===r.wrapX||r.wrapX})||this).on,i.once,i.un,i.U=j,i.ze=r.format,i.za=void 0===r.overlaps||r.overlaps,i.Fe=r.url,void 0!==r.loader?i.U=r.loader:void 0!==i.Fe&&(St(i.ze,7),i.U=Vh(i.Fe,i.ze)),i.Ra=void 0!==r.strategy?r.strategy:Wh;var e,o,s=void 0===r.useSpatialIndex||r.useSpatialIndex;return i.Fa=s?new Pv:null,i.Ga=new Pv,i.Da=0,i.qa={},i.Ua={},i.Ba={},i.Xa={},i.Va=null,Array.isArray(r.features)?o=r.features:r.features&&(o=(e=r.features).getArray()),s||void 0!==e||(e=new ft(o)),void 0!==o&&i.addFeaturesInternal(o),void 0!==e&&i.Wa(e),i}return sd(n,t),n.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},n.prototype.addFeatureInternal=function(t){var n=o(t);if(this.Ya(n,t)){this.Za(n,t);var i=t.getGeometry();if(i){var r=i.getExtent();this.Fa&&this.Fa.insert(r,t)}else this.qa[n]=t;this.dispatchEvent(new ud(Qv,t))}else this.Va&&this.Va.remove(t)},n.prototype.Za=function(t,n){this.Xa[t]=[$(n,L,this.$a,this),$(n,l,this.$a,this)]},n.prototype.Ya=function(t,n){var i=!0,r=n.getId();return void 0!==r&&(r.toString()in this.Ua?i=!1:this.Ua[r.toString()]=n),i&&(St(!(t in this.Ba),30),this.Ba[t]=n),i},n.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},n.prototype.addFeaturesInternal=function(t){for(var n=[],i=[],r=[],e=0,s=t.length;e<s;e++){var u=o(h=t[e]);this.Ya(u,h)&&i.push(h)}e=0;for(var a=i.length;e<a;e++){var h;u=o(h=i[e]);this.Za(u,h);var f=h.getGeometry();if(f){var c=f.getExtent();n.push(c),r.push(h)}else this.qa[u]=h}if(this.Fa&&this.Fa.load(n,r),this.hasListener(Qv)){e=0;for(var l=i.length;e<l;e++)this.dispatchEvent(new ud(Qv,i[e]))}},n.prototype.Wa=function(t){var n=!1;this.addEventListener(Qv,(function(i){n||(n=!0,t.push(i.feature),n=!1)})),this.addEventListener(id,(function(i){n||(n=!0,t.remove(i.feature),n=!1)})),t.addEventListener(ot,function(t){n||(n=!0,this.addFeature(t.element),n=!1)}.bind(this)),t.addEventListener(st,function(t){n||(n=!0,this.removeFeature(t.element),n=!1)}.bind(this)),this.Va=t},n.prototype.clear=function(t){if(t){for(var n in this.Xa){this.Xa[n].forEach(H)}this.Va||(this.Xa={},this.Ua={},this.Ba={})}else if(this.Fa){var i=function(t){this.removeFeatureInternal(t)}.bind(this);for(var r in this.Fa.forEach(i),this.qa)this.removeFeatureInternal(this.qa[r])}this.Va&&this.Va.clear(),this.Fa&&this.Fa.clear(),this.qa={};var e=new ud(nd);this.dispatchEvent(e),this.changed()},n.prototype.forEachFeature=function(t){if(this.Fa)return this.Fa.forEach(t);this.Va&&this.Va.forEach(t)},n.prototype.forEachFeatureAtCoordinateDirect=function(t,n){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){return i.getGeometry().intersectsCoordinate(t)?n(i):void 0}))},n.prototype.forEachFeatureInExtent=function(t,n){if(this.Fa)return this.Fa.forEachInExtent(t,n);this.Va&&this.Va.forEach(n)},n.prototype.forEachFeatureIntersectingExtent=function(t,n){return this.forEachFeatureInExtent(t,(function(i){if(i.getGeometry().intersectsExtent(t)){var r=n(i);if(r)return r}}))},n.prototype.getFeaturesCollection=function(){return this.Va},n.prototype.getFeatures=function(){var t;return this.Va?t=this.Va.getArray().slice(0):this.Fa&&(t=this.Fa.getAll(),k(this.qa)||g(t,C(this.qa))),t},n.prototype.getFeaturesAtCoordinate=function(t){var n=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){n.push(t)})),n},n.prototype.getFeaturesInExtent=function(t,n){var i=this;if(this.Fa){if(!(n&&n.canWrapX()&&this.getWrapX()))return this.Fa.getInExtent(t);var r=ri(t,n);return[].concat.apply([],r.map((function(t){return i.Fa.getInExtent(t)})))}return this.Va?this.Va.getArray().slice(0):[]},n.prototype.getClosestFeatureToCoordinate=function(t,n){var i=t[0],r=t[1],e=null,o=[NaN,NaN],s=1/0,u=[-1/0,-1/0,1/0,1/0],a=n||S;return this.Fa.forEachInExtent(u,(function(t){if(a(t)){var n=t.getGeometry(),h=s;if((s=n.closestPointXY(i,r,o,s))<h){e=t;var f=Math.sqrt(s);u[0]=i-f,u[1]=r-f,u[2]=i+f,u[3]=r+f}}})),e},n.prototype.getExtent=function(t){return this.Fa.getExtent(t)},n.prototype.getFeatureById=function(t){var n=this.Ua[t.toString()];return void 0!==n?n:null},n.prototype.getFeatureByUid=function(t){var n=this.Ba[t];return void 0!==n?n:null},n.prototype.getFormat=function(){return this.ze},n.prototype.getOverlaps=function(){return this.za},n.prototype.getUrl=function(){return this.Fe},n.prototype.$a=function(t){var n=t.target,i=o(n),r=n.getGeometry();if(r){var e=r.getExtent();i in this.qa?(delete this.qa[i],this.Fa&&this.Fa.insert(e,n)):this.Fa&&this.Fa.update(e,n)}else i in this.qa||(this.Fa&&this.Fa.remove(n),this.qa[i]=n);var s=n.getId();if(void 0!==s){var u=s.toString();this.Ua[u]!==n&&(this.Ka(n),this.Ua[u]=n)}else this.Ka(n),this.Ba[i]=n;this.changed(),this.dispatchEvent(new ud(td,n))},n.prototype.hasFeature=function(t){var n=t.getId();return void 0!==n?n in this.Ua:o(t)in this.Ba},n.prototype.isEmpty=function(){return this.Fa?this.Fa.isEmpty()&&k(this.qa):!this.Va||0===this.Va.getLength()},n.prototype.loadFeatures=function(t,n,i){for(var r=this.Ga,e=this.Ra(t,n,i),o=function(t,o){var u=e[t];r.forEachInExtent(u,(function(t){return xn(t.extent,u)}))||(++s.Da,s.dispatchEvent(new ud(rd)),s.U.call(s,u,n,i,function(t){--this.Da,this.dispatchEvent(new ud(ed,void 0,t))}.bind(s),function(){--this.Da,this.dispatchEvent(new ud(od))}.bind(s)),r.insert(u,{extent:u.slice()}))},s=this,u=0,a=e.length;u<a;++u)o(u);this.loading=!(this.U.length<4)&&this.Da>0},n.prototype.refresh=function(){this.clear(!0),this.Ga.clear(),t.prototype.refresh.call(this)},n.prototype.removeLoadedExtent=function(t){var n,i=this.Ga;i.forEachInExtent(t,(function(i){if(An(i.extent,t))return n=i,!0})),n&&i.remove(n)},n.prototype.removeFeature=function(t){if(t){var n=o(t);n in this.qa?delete this.qa[n]:this.Fa&&this.Fa.remove(t),this.removeFeatureInternal(t)&&this.changed()}},n.prototype.removeFeatureInternal=function(t){var n=o(t),i=this.Xa[n];if(i){i.forEach(H),delete this.Xa[n];var r=t.getId();return void 0!==r&&delete this.Ua[r.toString()],delete this.Ba[n],this.dispatchEvent(new ud(id,t)),t}},n.prototype.Ka=function(t){var n=!1;for(var i in this.Ua)if(this.Ua[i]===t){delete this.Ua[i],n=!0;break}return n},n.prototype.setLoader=function(t){this.U=t},n.prototype.setUrl=function(t){St(this.ze,7),this.Fe=t,this.setLoader(Vh(t,this.ze))},n}(zv),hd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fd=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,wrapX:n.wrapX})||this;return i.resolution=void 0,i.distance=void 0!==n.distance?n.distance:20,i.minDistance=n.minDistance||0,i.interpolationRatio=0,i.features=[],i.geometryFunction=n.geometryFunction||function(t){var n=t.getGeometry();return St("Point"==n.getType(),10),n},i.Ha=n.createCluster,i.source=null,i.Ja=i.refresh.bind(i),i.updateDistance(i.distance,i.minDistance),i.setSource(n.source||null),i}return hd(n,t),n.prototype.clear=function(n){this.features.length=0,t.prototype.clear.call(this,n)},n.prototype.getDistance=function(){return this.distance},n.prototype.getSource=function(){return this.source},n.prototype.loadFeatures=function(t,n,i){this.source.loadFeatures(t,n,i),n!==this.resolution&&(this.resolution=n,this.refresh())},n.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},n.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},n.prototype.getMinDistance=function(){return this.minDistance},n.prototype.setSource=function(t){this.source&&this.source.removeEventListener(L,this.Ja),this.source=t,t&&t.addEventListener(L,this.Ja),this.refresh()},n.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},n.prototype.updateDistance=function(t,n){var i=0===t?0:Math.min(n,t)/t,r=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=n,this.interpolationRatio=i,r&&this.refresh()},n.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=[1/0,1/0,-1/0,-1/0],n=this.distance*this.resolution,i=this.source.getFeatures(),r={},e=0,s=i.length;e<s;e++){var u=i[e];if(!(o(u)in r)){var a=this.geometryFunction(u);if(a){En(a.getCoordinates(),t),mn(t,n,t);var h=this.source.getFeaturesInExtent(t).filter((function(t){var n=o(t);return!(n in r)&&(r[n]=!0,!0)}));this.features.push(this.createCluster(h,t))}}}},n.prototype.createCluster=function(t,n){for(var i=[0,0],r=t.length-1;r>=0;--r){var e=this.geometryFunction(t[r]);e?Vi(i,e.getCoordinates()):t.splice(r,1)}Ji(i,1/t.length);var o=qn(n),s=this.interpolationRatio,u=new Se([i[0]*(1-s)+o[0]*s,i[1]*(1-s)+o[1]*s]);return this.Ha?this.Ha(u,t):new Et({geometry:u,features:t})},n}(ad),cd=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ld=function(t){function n(n){var i=this,r=void 0===n.projection?"EPSG:3857":n.projection,e=n.tileGrid;if(void 0===e&&r&&(e=Of({extent:Tf(r),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize})),(i=t.call(this,{cacheSize:.1,attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,projection:r,tileGrid:e,opaque:n.opaque,state:n.state,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate})||this).js=void 0!==n.gutter?n.gutter:0,i.jo=n.tileSize?Qu(n.tileSize):null,!i.jo&&n.tilePixelRatio&&e){var o=Qu(e.getTileSize(0));i.jo=[o[0]*n.tilePixelRatio,o[1]*n.tilePixelRatio]}return i.Oo=null,i.ga={},i.U=n.loader,i.cr=i.cr.bind(i),i.bandCount=void 0===n.bandCount?4:n.bandCount,i}return cd(n,t),n.prototype.setTileSizes=function(t){this.Oo=t},n.prototype.getTileSize=function(t){if(this.Oo)return this.Oo[t];if(this.jo)return this.jo;var n=this.getTileGrid();return n?Qu(n.getTileSize(t)):[256,256]},n.prototype.getGutterForProjection=function(t){return this.js},n.prototype.setLoader=function(t){this.U=t},n.prototype.getTile=function(t,n,i,r,e){var o=this.getTileSize(t),s=jh(t,n,i);if(this.tileCache.containsKey(s))return this.tileCache.get(s);var u=this.U;var a=A({tileCoord:[t,n,i],loader:function(){return T((function(){return u(t,n,i)}))},size:o},this.tileOptions),h=new _t(a);return h.key=this.getKey(),h.addEventListener(L,this.cr),this.tileCache.set(s,h),h},n.prototype.cr=function(t){var n,i=t.target,r=o(i),e=i.getState();e==lt?(this.ga[r]=!0,n=Cv):r in this.ga&&(delete this.ga[r],n=e==dt?Iv:e==vt?kv:void 0),n&&this.dispatchEvent(new Gv(n,i))},n}(Dv);const vd=new ArrayBuffer(4),dd=new Float32Array(vd),pd=new Uint32Array(vd),yd=new Uint32Array(512),md=new Uint32Array(512);for(let t=0;t<256;++t){const n=t-127;n<-27?(yd[t]=0,yd[256|t]=32768,md[t]=24,md[256|t]=24):n<-14?(yd[t]=1024>>-n-14,yd[256|t]=1024>>-n-14|32768,md[t]=-n-1,md[256|t]=-n-1):n<=15?(yd[t]=n+15<<10,yd[256|t]=n+15<<10|32768,md[t]=13,md[256|t]=13):n<128?(yd[t]=31744,yd[256|t]=64512,md[t]=24,md[256|t]=24):(yd[t]=31744,yd[256|t]=64512,md[t]=13,md[256|t]=13)}const wd=new Uint32Array(2048),gd=new Uint32Array(64),bd=new Uint32Array(64);wd[0]=0;for(let t=1;t<1024;++t){let n=t<<13,i=0;for(;0==(8388608&n);)i-=8388608,n<<=1;n&=-8388609,i+=947912704,wd[t]=n|i}for(let t=1024;t<2048;++t)wd[t]=939524096+(t-1024<<13);gd[0]=0;for(let t=1;t<31;++t)gd[t]=t<<23;gd[31]=1199570944,gd[32]=2147483648;for(let t=33;t<63;++t)gd[t]=2147483648+(t-32<<23);gd[63]=3347054592,bd[0]=0;for(let t=1;t<64;++t)bd[t]=32===t?0:1024;function xd(t){const n=t>>10;return pd[0]=wd[bd[n]+(1023&t)]+gd[n],dd[0]}const Md=Reflect.getPrototypeOf(Uint8Array).prototype,_d=Reflect.getOwnPropertyDescriptor(Md,Symbol.toStringTag).get;function Sd(t){return void 0!==_d.call(t)}const Od=Object.prototype.toString;function jd(t){return!!ArrayBuffer.isView(t)&&(!Sd(t)&&"[object DataView]"===Od.call(t))}function Ed(t,n){if(!jd(t))throw new TypeError("First argument to getFloat16 function must be a DataView");for(var i=arguments.length,r=new Array(i>2?i-2:0),e=2;e<i;e++)r[e-2]=arguments[e];return xd(t.getUint16(n,...r))}var Td=i(802),Ad=i(51),Pd=i(150);const Cd=new Map;function kd(t,n){Array.isArray(t)||(t=[t]),t.forEach((t=>Cd.set(t,n)))}async function Id(t){const n=Cd.get(t.Compression);if(!n)throw new Error(`Unknown compression method identifier: ${t.Compression}`);return new(await n())(t)}function Nd(t,n,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return new(Object.getPrototypeOf(t).constructor)(n*i*r)}function Ld(t,n,i,r,e){const o=n/r,s=i/e;return t.map((t=>{const u=Nd(t,r,e);for(let a=0;a<e;++a){const e=Math.min(Math.round(s*a),i-1);for(let i=0;i<r;++i){const s=Math.min(Math.round(o*i),n-1),h=t[e*n+s];u[a*r+i]=h}}return u}))}function zd(t,n,i){return(1-i)*t+i*n}function Rd(t,n,i,r,e){const o=n/r,s=i/e;return t.map((t=>{const u=Nd(t,r,e);for(let a=0;a<e;++a){const e=s*a,h=Math.floor(e),f=Math.min(Math.ceil(e),i-1);for(let i=0;i<r;++i){const s=o*i,c=s%1,l=Math.floor(s),v=Math.min(Math.ceil(s),n-1),d=t[h*n+l],p=t[h*n+v],y=t[f*n+l],m=t[f*n+v],w=zd(zd(d,p,c),zd(y,m,c),e%1);u[a*r+i]=w}}return u}))}function Fd(t,n,i,r,e,o){const s=n/r,u=i/e,a=Nd(t,r,e,o);for(let h=0;h<e;++h){const e=Math.min(Math.round(u*h),i-1);for(let i=0;i<r;++i){const u=Math.min(Math.round(s*i),n-1);for(let s=0;s<o;++s){const f=t[e*n*o+u*o+s];a[h*r*o+i*o+s]=f}}}return a}function Gd(t,n,i,r,e,o){const s=n/r,u=i/e,a=Nd(t,r,e,o);for(let h=0;h<e;++h){const e=u*h,f=Math.floor(e),c=Math.min(Math.ceil(e),i-1);for(let i=0;i<r;++i){const u=s*i,l=u%1,v=Math.floor(u),d=Math.min(Math.ceil(u),n-1);for(let s=0;s<o;++s){const u=t[f*n*o+v*o+s],p=t[f*n*o+d*o+s],y=t[c*n*o+v*o+s],m=t[c*n*o+d*o+s],w=zd(zd(u,p,l),zd(y,m,l),e%1);a[h*r*o+i*o+s]=w}}}return a}function Dd(t,n,i){let r=0;for(let e=n;e<i;++e)r+=t[e];return r}function qd(t,n,i){switch(t){case 1:if(n<=8)return new Uint8Array(i);if(n<=16)return new Uint16Array(i);if(n<=32)return new Uint32Array(i);break;case 2:if(8===n)return new Int8Array(i);if(16===n)return new Int16Array(i);if(32===n)return new Int32Array(i);break;case 3:switch(n){case 16:case 32:return new Float32Array(i);case 64:return new Float64Array(i)}}throw Error("Unsupported data format/bitsPerSample")}kd([void 0,1],(()=>i.e(226).then(i.bind(i,966)).then((t=>t.default)))),kd(5,(()=>i.e(611).then(i.bind(i,611)).then((t=>t.default)))),kd(6,(()=>{throw new Error("old style JPEG compression is not supported.")})),kd(7,(()=>i.e(382).then(i.bind(i,382)).then((t=>t.default)))),kd([8,32946],(()=>Promise.all([i.e(247),i.e(356)]).then(i.bind(i,356)).then((t=>t.default)))),kd(32773,(()=>i.e(395).then(i.bind(i,395)).then((t=>t.default)))),kd(34887,(()=>Promise.all([i.e(247),i.e(54)]).then(i.bind(i,54)).then((t=>t.default)))),kd(50001,(()=>i.e(629).then(i.bind(i,629)).then((t=>t.default))));var Ud=class{constructor(t,n,i,r,e,o){this.fileDirectory=t,this.geoKeys=n,this.dataView=i,this.littleEndian=r,this.tiles=e?{}:null,this.isTiled=!t.StripOffsets;const s=t.PlanarConfiguration;if(this.planarConfiguration=void 0===s?1:s,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");this.source=o}getFileDirectory(){return this.fileDirectory}getGeoKeys(){return this.geoKeys}getWidth(){return this.fileDirectory.ImageWidth}getHeight(){return this.fileDirectory.ImageLength}getSamplesPerPixel(){return void 0!==this.fileDirectory.SamplesPerPixel?this.fileDirectory.SamplesPerPixel:1}getTileWidth(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}getTileHeight(){return this.isTiled?this.fileDirectory.TileLength:void 0!==this.fileDirectory.RowsPerStrip?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}getBlockWidth(){return this.getTileWidth()}getBlockHeight(t){return this.isTiled||(t+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-t*this.getTileHeight()}getBytesPerPixel(){let t=0;for(let n=0;n<this.fileDirectory.BitsPerSample.length;++n)t+=this.getSampleByteSize(n);return t}getSampleByteSize(t){if(t>=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${t} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[t]/8)}getReaderForSample(t){const n=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,i=this.fileDirectory.BitsPerSample[t];switch(n){case 1:if(i<=8)return DataView.prototype.getUint8;if(i<=16)return DataView.prototype.getUint16;if(i<=32)return DataView.prototype.getUint32;break;case 2:if(i<=8)return DataView.prototype.getInt8;if(i<=16)return DataView.prototype.getInt16;if(i<=32)return DataView.prototype.getInt32;break;case 3:switch(i){case 16:return function(t,n){return Ed(this,t,n)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1}getBitsPerSample(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.fileDirectory.BitsPerSample[t]}getArrayForSample(t,n){return qd(this.getSampleFormat(t),this.getBitsPerSample(t),n)}async getTileOrStrip(t,n,i,r,e){const o=Math.ceil(this.getWidth()/this.getTileWidth()),s=Math.ceil(this.getHeight()/this.getTileHeight());let u;const{tiles:a}=this;let h,f;1===this.planarConfiguration?u=n*o+t:2===this.planarConfiguration&&(u=i*o*s+n*o+t),this.isTiled?(h=this.fileDirectory.TileOffsets[u],f=this.fileDirectory.TileByteCounts[u]):(h=this.fileDirectory.StripOffsets[u],f=this.fileDirectory.StripByteCounts[u]);const c=(await this.source.fetch([{offset:h,length:f}],e))[0];let l;return null!==a&&a[u]?l=a[u]:(l=(async()=>{let t=await r.decode(this.fileDirectory,c);const i=this.getSampleFormat(),e=this.getBitsPerSample();return function(t,n){return(1!==t&&2!==t||!(n<=32)||n%8!=0)&&(3!==t||16!==n&&32!==n&&64!==n)}(i,e)&&(t=function(t,n,i,r,e,o,s){const u=new DataView(t),a=2===i?1:r,h=qd(n,e,2===i?s*o:s*o*r),f=parseInt("1".repeat(e),2);if(1===n){let t;t=1===i?r*e:e;let n=o*t;0!=(7&n)&&(n=n+7&-8);for(let t=0;t<s;++t){const i=t*n;for(let n=0;n<o;++n){const r=i+n*a*e;for(let i=0;i<a;++i){const s=r+i*e,c=(t*o+n)*a+i,l=Math.floor(s/8),v=s%8;if(v+e<=8)h[c]=u.getUint8(l)>>8-e-v&f;else if(v+e<=16)h[c]=u.getUint16(l)>>16-e-v&f;else if(v+e<=24){const t=u.getUint16(l)<<8|u.getUint8(l+2);h[c]=t>>24-e-v&f}else h[c]=u.getUint32(l)>>32-e-v&f}}}}return h.buffer}(t,i,this.planarConfiguration,this.getSamplesPerPixel(),e,this.getTileWidth(),this.getBlockHeight(n))),t})(),null!==a&&(a[u]=l)),{x:t,y:n,sample:i,data:await l}}async _readRaster(t,n,i,r,e,o,s,u,a){const h=this.getTileWidth(),f=this.getTileHeight(),c=this.getWidth(),l=this.getHeight(),v=Math.max(Math.floor(t[0]/h),0),d=Math.min(Math.ceil(t[2]/h),Math.ceil(c/h)),p=Math.max(Math.floor(t[1]/f),0),y=Math.min(Math.ceil(t[3]/f),Math.ceil(l/f)),m=t[2]-t[0];let w=this.getBytesPerPixel();const g=[],b=[];for(let t=0;t<n.length;++t)1===this.planarConfiguration?g.push(Dd(this.fileDirectory.BitsPerSample,0,n[t])/8):g.push(0),b.push(this.getReaderForSample(n[t]));const x=[],{littleEndian:M}=this;for(let o=p;o<y;++o)for(let s=v;s<d;++s)for(let u=0;u<n.length;++u){const v=u,d=n[u];2===this.planarConfiguration&&(w=this.getSampleByteSize(u));const p=this.getTileOrStrip(s,o,d,e,a);x.push(p),p.then((e=>{const o=e.data,s=new DataView(o),u=this.getBlockHeight(e.y),a=e.y*f,d=e.x*h,p=a+u,y=(e.x+1)*h,x=b[v],_=Math.min(u,u-(p-t[3]),l-a),S=Math.min(h,h-(y-t[2]),c-d);for(let e=Math.max(0,t[1]-a);e<_;++e)for(let o=Math.max(0,t[0]-d);o<S;++o){const u=(e*h+o)*w,f=x.call(s,u+g[v],M);let c;r?(c=(e+a-t[1])*m*n.length+(o+d-t[0])*n.length+v,i[c]=f):(c=(e+a-t[1])*m+o+d-t[0],i[v][c]=f)}}))}if(await Promise.all(x),o&&t[2]-t[0]!==o||s&&t[3]-t[1]!==s){let e;return e=r?function(t,n,i,r,e,o){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"nearest";switch(s.toLowerCase()){case"nearest":return Fd(t,n,i,r,e,o);case"bilinear":case"linear":return Gd(t,n,i,r,e,o);default:throw new Error(`Unsupported resampling method: '${s}'`)}}(i,t[2]-t[0],t[3]-t[1],o,s,n.length,u):function(t,n,i,r,e){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"nearest";switch(o.toLowerCase()){case"nearest":return Ld(t,n,i,r,e);case"bilinear":case"linear":return Rd(t,n,i,r,e);default:throw new Error(`Unsupported resampling method: '${o}'`)}}(i,t[2]-t[0],t[3]-t[1],o,s,u),e.width=o,e.height=s,e}return i.width=o||t[2]-t[0],i.height=s||t[3]-t[1],i}async readRasters(){let{window:t,samples:n=[],interleave:i,pool:r=null,width:e,height:o,resampleMethod:s,fillValue:u,signal:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const h=t||[0,0,this.getWidth(),this.getHeight()];if(h[0]>h[2]||h[1]>h[3])throw new Error("Invalid subsets");const f=(h[2]-h[0])*(h[3]-h[1]),c=this.getSamplesPerPixel();if(n&&n.length){for(let t=0;t<n.length;++t)if(n[t]>=c)return Promise.reject(new RangeError(`Invalid sample index '${n[t]}'.`))}else for(let t=0;t<c;++t)n.push(t);let l;if(i){l=qd(this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,Math.max.apply(null,this.fileDirectory.BitsPerSample),f*n.length),u&&l.fill(u)}else{l=[];for(let t=0;t<n.length;++t){const i=this.getArrayForSample(n[t],f);Array.isArray(u)&&t<u.length?i.fill(u[t]):u&&!Array.isArray(u)&&i.fill(u),l.push(i)}}const v=r||await Id(this.fileDirectory);return await this._readRaster(h,n,l,i,v,e,o,s,a)}async readRGB(){let{window:t,interleave:n=!0,pool:i=null,width:r,height:e,resampleMethod:o,enableAlpha:s=!1,signal:u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const a=t||[0,0,this.getWidth(),this.getHeight()];if(a[0]>a[2]||a[1]>a[3])throw new Error("Invalid subsets");const h=this.fileDirectory.PhotometricInterpretation;if(h===Pd.Ie.RGB){let a=[0,1,2];if(this.fileDirectory.ExtraSamples!==Pd.pd.Unspecified&&s){a=[];for(let t=0;t<this.fileDirectory.BitsPerSample.length;t+=1)a.push(t)}return this.readRasters({window:t,interleave:n,samples:a,pool:i,width:r,height:e,resampleMethod:o,signal:u})}let f;switch(h){case Pd.Ie.WhiteIsZero:case Pd.Ie.BlackIsZero:case Pd.Ie.Palette:f=[0];break;case Pd.Ie.CMYK:f=[0,1,2,3];break;case Pd.Ie.YCbCr:case Pd.Ie.CIELab:f=[0,1,2];break;default:throw new Error("Invalid or unsupported photometric interpretation.")}const c={window:a,interleave:!0,samples:f,pool:i,width:r,height:e,resampleMethod:o,signal:u},{fileDirectory:l}=this,v=await this.readRasters(c),d=2**this.fileDirectory.BitsPerSample[0];let p;switch(h){case Pd.Ie.WhiteIsZero:p=function(t,n){const{width:i,height:r}=t,e=new Uint8Array(i*r*3);let o;for(let i=0,r=0;i<t.length;++i,r+=3)o=256-t[i]/n*256,e[r]=o,e[r+1]=o,e[r+2]=o;return e}(v,d);break;case Pd.Ie.BlackIsZero:p=function(t,n){const{width:i,height:r}=t,e=new Uint8Array(i*r*3);let o;for(let i=0,r=0;i<t.length;++i,r+=3)o=t[i]/n*256,e[r]=o,e[r+1]=o,e[r+2]=o;return e}(v,d);break;case Pd.Ie.Palette:p=function(t,n){const{width:i,height:r}=t,e=new Uint8Array(i*r*3),o=n.length/3,s=n.length/3*2;for(let i=0,r=0;i<t.length;++i,r+=3){const u=t[i];e[r]=n[u]/65536*256,e[r+1]=n[u+o]/65536*256,e[r+2]=n[u+s]/65536*256}return e}(v,l.ColorMap);break;case Pd.Ie.CMYK:p=function(t){const{width:n,height:i}=t,r=new Uint8Array(n*i*3);for(let n=0,i=0;n<t.length;n+=4,i+=3){const e=t[n],o=t[n+1],s=t[n+2],u=t[n+3];r[i]=(255-e)/256*255*((255-u)/256),r[i+1]=(255-o)/256*255*((255-u)/256),r[i+2]=(255-s)/256*255*((255-u)/256)}return r}(v);break;case Pd.Ie.YCbCr:p=function(t){const{width:n,height:i}=t,r=new Uint8ClampedArray(n*i*3);for(let n=0,i=0;n<t.length;n+=3,i+=3){const e=t[n],o=t[n+1],s=t[n+2];r[i]=e+1.402*(s-128),r[i+1]=e-.34414*(o-128)-.71414*(s-128),r[i+2]=e+1.772*(o-128)}return r}(v);break;case Pd.Ie.CIELab:p=function(t){const{width:n,height:i}=t,r=new Uint8Array(n*i*3);for(let n=0,i=0;n<t.length;n+=3,i+=3){let e,o,s,u=(t[n+0]+16)/116,a=(t[n+1]<<24>>24)/500+u,h=u-(t[n+2]<<24>>24)/200;a=.95047*(a*a*a>.008856?a*a*a:(a-16/116)/7.787),u=1*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),h=1.08883*(h*h*h>.008856?h*h*h:(h-16/116)/7.787),e=3.2406*a+-1.5372*u+-.4986*h,o=-.9689*a+1.8758*u+.0415*h,s=.0557*a+-.204*u+1.057*h,e=e>.0031308?1.055*e**(1/2.4)-.055:12.92*e,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r[i]=255*Math.max(0,Math.min(1,e)),r[i+1]=255*Math.max(0,Math.min(1,o)),r[i+2]=255*Math.max(0,Math.min(1,s))}return r}(v);break;default:throw new Error("Unsupported photometric interpretation.")}if(!n){const t=new Uint8Array(p.length/3),n=new Uint8Array(p.length/3),i=new Uint8Array(p.length/3);for(let r=0,e=0;r<p.length;r+=3,++e)t[e]=p[r],n[e]=p[r+1],i[e]=p[r+2];p=[t,n,i]}return p.width=v.width,p.height=v.height,p}getTiePoints(){if(!this.fileDirectory.ModelTiepoint)return[];const t=[];for(let n=0;n<this.fileDirectory.ModelTiepoint.length;n+=6)t.push({i:this.fileDirectory.ModelTiepoint[n],j:this.fileDirectory.ModelTiepoint[n+1],k:this.fileDirectory.ModelTiepoint[n+2],x:this.fileDirectory.ModelTiepoint[n+3],y:this.fileDirectory.ModelTiepoint[n+4],z:this.fileDirectory.ModelTiepoint[n+5]});return t}getGDALMetadata(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const n={};if(!this.fileDirectory.GDAL_METADATA)return null;const i=this.fileDirectory.GDAL_METADATA;let r=Ad(i,"Item");r=null===t?r.filter((t=>void 0===Td(t,"sample"))):r.filter((n=>Number(Td(n,"sample"))===t));for(let t=0;t<r.length;++t){const i=r[t];n[Td(i,"name")]=i.inner}return n}getGDALNoData(){if(!this.fileDirectory.GDAL_NODATA)return null;const t=this.fileDirectory.GDAL_NODATA;return Number(t.substring(0,t.length-1))}getOrigin(){const t=this.fileDirectory.ModelTiepoint,n=this.fileDirectory.ModelTransformation;if(t&&6===t.length)return[t[3],t[4],t[5]];if(n)return[n[3],n[7],n[11]];throw new Error("The image does not have an affine transformation.")}getResolution(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const n=this.fileDirectory.ModelPixelScale,i=this.fileDirectory.ModelTransformation;if(n)return[n[0],-n[1],n[2]];if(i)return[i[0],i[5],i[10]];if(t){const[n,i,r]=t.getResolution();return[n*t.getWidth()/this.getWidth(),i*t.getHeight()/this.getHeight(),r*t.getWidth()/this.getWidth()]}throw new Error("The image does not have an affine transformation.")}pixelIsArea(){return 1===this.geoKeys.GTRasterTypeGeoKey}getBoundingBox(){const t=this.getOrigin(),n=this.getResolution(),i=t[0],r=t[1],e=i+n[0]*this.getWidth(),o=r+n[1]*this.getHeight();return[Math.min(i,e),Math.min(r,o),Math.max(i,e),Math.max(r,o)]}};class Bd{constructor(t){this._dataView=new DataView(t)}get buffer(){return this._dataView.buffer}getUint64(t,n){const i=this.getUint32(t,n),r=this.getUint32(t+4,n);let e;if(n){if(e=i+2**32*r,!Number.isSafeInteger(e))throw new Error(`${e} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return e}if(e=2**32*i+r,!Number.isSafeInteger(e))throw new Error(`${e} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return e}getInt64(t,n){let i=0;const r=(128&this._dataView.getUint8(t+(n?7:0)))>0;let e=!0;for(let o=0;o<8;o++){let s=this._dataView.getUint8(t+(n?o:7-o));r&&(e?0!==s&&(s=255&~(s-1),e=!1):s=255&~s),i+=s*256**o}return r&&(i=-i),i}getUint8(t,n){return this._dataView.getUint8(t,n)}getInt8(t,n){return this._dataView.getInt8(t,n)}getUint16(t,n){return this._dataView.getUint16(t,n)}getInt16(t,n){return this._dataView.getInt16(t,n)}getUint32(t,n){return this._dataView.getUint32(t,n)}getInt32(t,n){return this._dataView.getInt32(t,n)}getFloat16(t,n){return Ed(this._dataView,t,n)}getFloat32(t,n){return this._dataView.getFloat32(t,n)}getFloat64(t,n){return this._dataView.getFloat64(t,n)}}class Xd{constructor(t,n,i,r){this._dataView=new DataView(t),this._sliceOffset=n,this._littleEndian=i,this._bigTiff=r}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(t,n){return this.sliceOffset<=t&&this.sliceTop>=t+n}readUint8(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}readInt8(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}readUint16(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}readInt16(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}readUint32(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}readInt32(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}readFloat32(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}readFloat64(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}readUint64(t){const n=this.readUint32(t),i=this.readUint32(t+4);let r;if(this._littleEndian){if(r=n+2**32*i,!Number.isSafeInteger(r))throw new Error(`${r} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return r}if(r=2**32*n+i,!Number.isSafeInteger(r))throw new Error(`${r} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return r}readInt64(t){let n=0;const i=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0;let r=!0;for(let e=0;e<8;e++){let o=this._dataView.getUint8(t+(this._littleEndian?e:7-e));i&&(r?0!==o&&(o=255&~(o-1),r=!1):o=255&~o),n+=o*256**e}return i&&(n=-n),n}readOffset(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}const Vd="\r\n\r\n";function Wd(t){if(void 0!==Object.fromEntries)return Object.fromEntries(t);const n={};for(const[i,r]of t)n[i.toLowerCase()]=r;return n}function Yd(t){return Wd(t.split("\r\n").map((t=>{const n=t.split(":").map((t=>t.trim()));return n[0]=n[0].toLowerCase(),n})))}function Zd(t){let n,i,r;return t&&([,n,i,r]=t.match(/bytes (\d+)-(\d+)\/(\d+)/),n=parseInt(n,10),i=parseInt(i,10),r=parseInt(r,10)),{start:n,end:i,total:r}}class $d{async fetch(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return Promise.all(t.map((t=>this.fetchSlice(t,n))))}async fetchSlice(t){throw new Error(`fetching of slice ${t} not possible, not implemented`)}get fileSize(){return null}async close(){}}var Kd=i(875);function Hd(t,n){const i=Array.isArray(t)?t:Array.from(t),r=Array.isArray(n)?n:Array.from(n);return i.map(((t,n)=>[t,r[n]]))}class Jd extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,Jd),this.name="AbortError"}}class Qd extends Error{constructor(t,n){super(n),this.errors=t,this.message=n,this.name="AggregateError"}}const tp=Qd;class np{constructor(t,n){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.offset=t,this.length=n,this.data=i}get top(){return this.offset+this.length}}class ip{constructor(t,n,i){this.offset=t,this.length=n,this.blockIds=i}}class rp extends $d{constructor(t){let{blockSize:n=65536,cacheSize:i=100}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this.source=t,this.blockSize=n,this.blockCache=new Kd({max:i}),this.blockRequests=new Map,this.blockIdsToFetch=new Set}get fileSize(){return this.source.fileSize}async fetch(t,n){const i=new Map,r=new Map,e=new Set;for(const{offset:n,length:o}of t){let t=n+o;const{fileSize:s}=this;null!==s&&(t=Math.min(t,s));for(let o=Math.floor(n/this.blockSize)*this.blockSize;o<t;o+=this.blockSize){const t=Math.floor(o/this.blockSize);this.blockCache.has(t)?i.set(t,this.blockCache.get(t)):this.blockRequests.has(t)?r.set(t,this.blockRequests.get(t)):(this.blockIdsToFetch.has(t)||this.blockIdsToFetch.add(t),e.add(t))}}await async function(t){return new Promise((n=>setTimeout(n,t)))}(),this.fetchBlocks(n);for(const t of e){const n=this.blockRequests.get(t),e=this.blockCache.get(t);if(n)r.set(t,n);else{if(!e)throw new Error(`Block ${t} is not in the block requests`);i.set(t,e)}}let o=await Promise.allSettled(Array.from(r.values()));if(o.some((t=>"rejected"===t.status))){const t=new Set;for(const[i,e]of Hd(r.keys(),o)){const{rejected:r,reason:o}=e;r&&"AbortError"===o.name&&o.signal!==n&&(this.blockIdsToFetch.add(i),t.add(i))}if(this.blockIdsToFetch.length>0){this.fetchBlocks(n);for(const n of t){const t=this.blockRequests.get(n);if(!t)throw new Error(`Block ${n} is not in the block requests`);r.set(n,t)}o=await Promise.allSettled(Array.from(r.values()))}}if(o.some((t=>"rejected"===t.status))){if(n&&n.aborted)throw new Jd("Request was aborted");throw new tp(o.filter((t=>"rejected"===t.status)).map((t=>t.reason)),"Request failed")}const s=o.map((t=>t.value)),u=new Map(Hd(Array.from(r.keys()),s));for(const[t,n]of i)u.set(t,n);return this.readSliceData(t,u)}fetchBlocks(t){if(this.blockIdsToFetch.size>0){const n=this.groupBlocks(this.blockIdsToFetch),i=this.source.fetch(n,t);for(let r=0;r<n.length;++r){const e=n[r];for(const n of e.blockIds){const e=(async()=>{try{const t=(await i)[r],e=n*this.blockSize,o=e-t.offset,s=Math.min(o+this.blockSize,t.data.byteLength),u=t.data.slice(o,s),a=new np(e,u.byteLength,u);return this.blockCache.set(n,a),a}catch(n){throw"AbortError"===n.name&&(n.signal=t),n}finally{this.blockRequests.delete(n)}})();this.blockRequests.set(n,e)}}this.blockIdsToFetch.clear()}}groupBlocks(t){const n=Array.from(t).sort(((t,n)=>t-n));if(0===n.length)return[];let i=[],r=null;const e=[];for(const t of n)null===r||r+1===t?(i.push(t),r=t):(e.push(new ip(i[0]*this.blockSize,i.length*this.blockSize,i)),i=[t],r=t);return e.push(new ip(i[0]*this.blockSize,i.length*this.blockSize,i)),e}readSliceData(t,n){return t.map((t=>{const i=t.offset+t.length,r=Math.floor(t.offset/this.blockSize),e=Math.floor((t.offset+t.length)/this.blockSize),o=new ArrayBuffer(t.length),s=new Uint8Array(o);for(let o=r;o<=e;++o){const r=n.get(o),e=r.offset-t.offset,u=r.top-i;let a,h=0,f=0;e<0?h=-e:e>0&&(f=e),a=u<0?r.length-h:i-r.offset-h;const c=new Uint8Array(r.data,h,a);s.set(c,f)}return o}))}}class ep{get ok(){return this.status>=200&&this.status<=299}get status(){throw new Error("not implemented")}getHeader(t){throw new Error("not implemented")}async getData(){throw new Error("not implemented")}}class op{constructor(t){this.url=t}async request(){let{headers:t,credentials:n,signal:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};throw new Error("request is not implemented")}}class sp extends ep{constructor(t){super(),this.response=t}get status(){return this.response.status}getHeader(t){return this.response.headers.get(t)}async getData(){return this.response.arrayBuffer?await this.response.arrayBuffer():(await this.response.buffer()).buffer}}class up extends op{constructor(t,n){super(t),this.credentials=n}async request(){let{headers:t,credentials:n,signal:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=await fetch(this.url,{headers:t,credentials:n,signal:i});return new sp(r)}}class ap extends ep{constructor(t,n){super(),this.xhr=t,this.data=n}get status(){return this.xhr.status}getHeader(t){return this.xhr.getResponseHeader(t)}async getData(){return this.data}}class hp extends op{constructRequest(t,n){return new Promise(((i,r)=>{const e=new XMLHttpRequest;e.open("GET",this.url),e.responseType="arraybuffer";for(const[n,i]of Object.entries(t))e.setRequestHeader(n,i);e.onload=()=>{const t=e.response;i(new ap(e,t))},e.onerror=r,e.onabort=()=>r(new Jd("Request aborted")),e.send(),n&&(n.aborted&&e.abort(),n.addEventListener("abort",(()=>e.abort())))}))}async request(){let{headers:t,signal:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return await this.constructRequest(t,n)}}var fp=i(752),cp=i(640),lp=i(630);class vp extends ep{constructor(t,n){super(),this.response=t,this.dataPromise=n}get status(){return this.response.statusCode}getHeader(t){return this.response.headers[t]}async getData(){return await this.dataPromise}}class dp extends op{constructor(t){super(t),this.parsedUrl=lp.parse(this.url),this.httpApi="http:"===this.parsedUrl.protocol?fp:cp}constructRequest(t,n){return new Promise(((i,r)=>{const e=this.httpApi.get({...this.parsedUrl,headers:t},(t=>{const n=new Promise((n=>{const i=[];t.on("data",(t=>{i.push(t)})),t.on("end",(()=>{const t=Buffer.concat(i).buffer;n(t)})),t.on("error",r)}));i(new vp(t,n))}));e.on("error",r),n&&(n.aborted&&e.destroy(new Jd("Request aborted")),n.addEventListener("abort",(()=>e.destroy(new Jd("Request aborted")))))}))}async request(){let{headers:t,signal:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return await this.constructRequest(t,n)}}class pp extends $d{constructor(t,n,i,r){super(),this.client=t,this.headers=n,this.maxRanges=i,this.allowFullFile=r,this._fileSize=null}async fetch(t,n){return this.maxRanges>=t.length?this.fetchSlices(t,n):(this.maxRanges>0&&t.length,Promise.all(t.map((t=>this.fetchSlice(t,n)))))}async fetchSlices(t,n){const i=await this.client.request({headers:{...this.headers,Range:`bytes=${t.map((t=>{let{offset:n,length:i}=t;return`${n}-${n+i}`})).join(",")}`},signal:n});if(i.ok){if(206===i.status){const{type:r,params:e}=function(t){const[n,...i]=t.split(";").map((t=>t.trim()));return{type:n,params:Wd(i.map((t=>t.split("="))))}}(i.getHeader("content-type"));if("multipart/byteranges"===r){const t=function(t,n){let i=null;const r=new TextDecoder("ascii"),e=[],o=`--${n}`,s=`${o}--`;for(let n=0;n<10;++n)r.decode(new Uint8Array(t,n,o.length))===o&&(i=n);if(null===i)throw new Error("Could not find initial boundary");for(;i<t.byteLength;){const n=r.decode(new Uint8Array(t,i,Math.min(o.length+1024,t.byteLength-i)));if(0===n.length||n.startsWith(s))break;if(!n.startsWith(o))throw new Error("Part does not start with boundary");const u=n.substr(o.length+2);if(0===u.length)break;const a=u.indexOf(Vd),h=Yd(u.substr(0,a)),{start:f,end:c,total:l}=Zd(h["content-range"]),v=i+o.length+a+Vd.length,d=parseInt(c,10)+1-parseInt(f,10);e.push({headers:h,data:t.slice(v,v+d),offset:f,length:d,fileSize:l}),i=v+d+4}return e}(await i.getData(),e.boundary);return this._fileSize=t[0].fileSize||null,t}const o=await i.getData(),{start:s,end:u,total:a}=Zd(i.getHeader("content-range"));this._fileSize=a||null;const h=[{data:o,offset:s,length:u-s}];if(t.length>1){const i=await Promise.all(t.slice(1).map((t=>this.fetchSlice(t,n))));return h.concat(i)}return h}{if(!this.allowFullFile)throw new Error("Server responded with full file");const t=await i.getData();return this._fileSize=t.byteLength,[{data:t,offset:0,length:t.byteLength}]}}throw new Error("Error fetching data.")}async fetchSlice(t,n){const{offset:i,length:r}=t,e=await this.client.request({headers:{...this.headers,Range:`bytes=${i}-${i+r}`},signal:n});if(e.ok){if(206===e.status){const t=await e.getData(),{total:n}=Zd(e.getHeader("content-range"));return this._fileSize=n||null,{data:t,offset:i,length:r}}{if(!this.allowFullFile)throw new Error("Server responded with full file");const t=await e.getData();return this._fileSize=t.byteLength,{data:t,offset:0,length:t.byteLength}}}throw new Error("Error fetching data.")}get fileSize(){return this._fileSize}}function yp(t,n){let{blockSize:i,cacheSize:r}=n;return null===i?t:new rp(t,i,r)}function mp(t){let{headers:n={},credentials:i,maxRanges:r=0,allowFullFile:e=!1,...o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new up(t,i),u=new pp(s,n,r,e);return yp(u,o)}function wp(t){let{headers:n={},maxRanges:i=0,allowFullFile:r=!1,...e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=new hp(t),s=new pp(o,n,i,r);return yp(s,e)}function gp(t){let{headers:n={},maxRanges:i=0,allowFullFile:r=!1,...e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=new dp(t),s=new pp(o,n,i,r);return yp(s,e)}function bp(t){let{forceXHR:n=!1,...i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"function"!=typeof fetch||n?"undefined"!=typeof XMLHttpRequest?wp(t,i):gp(t,i):mp(t,i)}class xp extends $d{constructor(t){super(),this.file=t}async fetchSlice(t,n){return new Promise(((i,r)=>{const e=this.file.slice(t.offset,t.offset+t.length),o=new FileReader;o.onload=t=>i(t.target.result),o.onerror=r,o.onabort=r,o.readAsArrayBuffer(e),n&&n.addEventListener("abort",(()=>o.abort()))}))}}function Mp(t){switch(t){case Pd.sf.BYTE:case Pd.sf.ASCII:case Pd.sf.SBYTE:case Pd.sf.UNDEFINED:return 1;case Pd.sf.SHORT:case Pd.sf.SSHORT:return 2;case Pd.sf.LONG:case Pd.sf.SLONG:case Pd.sf.FLOAT:case Pd.sf.IFD:return 4;case Pd.sf.RATIONAL:case Pd.sf.SRATIONAL:case Pd.sf.DOUBLE:case Pd.sf.LONG8:case Pd.sf.SLONG8:case Pd.sf.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${t}`)}}function _p(t,n,i,r){let e=null,o=null;const s=Mp(n);switch(n){case Pd.sf.BYTE:case Pd.sf.ASCII:case Pd.sf.UNDEFINED:e=new Uint8Array(i),o=t.readUint8;break;case Pd.sf.SBYTE:e=new Int8Array(i),o=t.readInt8;break;case Pd.sf.SHORT:e=new Uint16Array(i),o=t.readUint16;break;case Pd.sf.SSHORT:e=new Int16Array(i),o=t.readInt16;break;case Pd.sf.LONG:case Pd.sf.IFD:e=new Uint32Array(i),o=t.readUint32;break;case Pd.sf.SLONG:e=new Int32Array(i),o=t.readInt32;break;case Pd.sf.LONG8:case Pd.sf.IFD8:e=new Array(i),o=t.readUint64;break;case Pd.sf.SLONG8:e=new Array(i),o=t.readInt64;break;case Pd.sf.RATIONAL:e=new Uint32Array(2*i),o=t.readUint32;break;case Pd.sf.SRATIONAL:e=new Int32Array(2*i),o=t.readInt32;break;case Pd.sf.FLOAT:e=new Float32Array(i),o=t.readFloat32;break;case Pd.sf.DOUBLE:e=new Float64Array(i),o=t.readFloat64;break;default:throw new RangeError(`Invalid field type: ${n}`)}if(n!==Pd.sf.RATIONAL&&n!==Pd.sf.SRATIONAL)for(let n=0;n<i;++n)e[n]=o.call(t,r+n*s);else for(let n=0;n<i;n+=2)e[n]=o.call(t,r+n*s),e[n+1]=o.call(t,r+(n*s+4));return n===Pd.sf.ASCII?new TextDecoder("utf-8").decode(e):e}class Sp{constructor(t,n,i){this.fileDirectory=t,this.geoKeyDirectory=n,this.nextIFDByteOffset=i}}class Op extends Error{constructor(t){super(`No image at index ${t}`),this.index=t}}class jp{async readRasters(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{window:n,width:i,height:r}=t;let{resX:e,resY:o,bbox:s}=t;const u=await this.getImage();let a=u;const h=await this.getImageCount(),f=u.getBoundingBox();if(n&&s)throw new Error('Both "bbox" and "window" passed.');if(i||r){if(n){const[t,i]=u.getOrigin(),[r,e]=u.getResolution();s=[t+n[0]*r,i+n[1]*e,t+n[2]*r,i+n[3]*e]}const t=s||f;if(i){if(e)throw new Error("Both width and resX passed");e=(t[2]-t[0])/i}if(r){if(o)throw new Error("Both width and resY passed");o=(t[3]-t[1])/r}}if(e||o){const t=[];for(let n=0;n<h;++n){const i=await this.getImage(n),{SubfileType:r,NewSubfileType:e}=i.fileDirectory;(0===n||2===r||1&e)&&t.push(i)}t.sort(((t,n)=>t.getWidth()-n.getWidth()));for(let n=0;n<t.length;++n){const i=t[n],r=(f[2]-f[0])/i.getWidth(),s=(f[3]-f[1])/i.getHeight();if(a=i,e&&e>r||o&&o>s)break}}let c=n;if(s){const[t,n]=u.getOrigin(),[i,r]=a.getResolution(u);c=[Math.round((s[0]-t)/i),Math.round((s[1]-n)/r),Math.round((s[2]-t)/i),Math.round((s[3]-n)/r)],c=[Math.min(c[0],c[2]),Math.min(c[1],c[3]),Math.max(c[0],c[2]),Math.max(c[1],c[3])]}return a.readRasters({...t,window:c})}}class Ep extends jp{constructor(t,n,i,r){let e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};super(),this.source=t,this.littleEndian=n,this.bigTiff=i,this.firstIFDOffset=r,this.cache=e.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(t,n){const i=this.bigTiff?4048:1024;return new Xd((await this.source.fetch([{offset:t,length:void 0!==n?n:i}]))[0],t,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(t){const n=this.bigTiff?20:12,i=this.bigTiff?8:2;let r=await this.getSlice(t);const e=this.bigTiff?r.readUint64(t):r.readUint16(t),o=e*n+(this.bigTiff?16:6);r.covers(t,o)||(r=await this.getSlice(t,o));const s={};let u=t+(this.bigTiff?8:2);for(let t=0;t<e;u+=n,++t){const t=r.readUint16(u),n=r.readUint16(u+2),i=this.bigTiff?r.readUint64(u+4):r.readUint32(u+4);let e,o;const a=Mp(n),h=u+(this.bigTiff?12:8);if(a*i<=(this.bigTiff?8:4))e=_p(r,n,i,h);else{const t=r.readOffset(h),o=Mp(n)*i;if(r.covers(t,o))e=_p(r,n,i,t);else{e=_p(await this.getSlice(t,o),n,i,t)}}o=1===i&&-1===Pd.It.indexOf(t)&&n!==Pd.sf.RATIONAL&&n!==Pd.sf.SRATIONAL?e[0]:e,s[Pd.L[t]]=o}const a=function(t){const n=t.GeoKeyDirectory;if(!n)return null;const i={};for(let r=4;r<=4*n[3];r+=4){const e=Pd.P1[n[r]],o=n[r+1]?Pd.L[n[r+1]]:null,s=n[r+2],u=n[r+3];let a=null;if(o){if(a=t[o],null==a)throw new Error(`Could not get value of geoKey '${e}'.`);"string"==typeof a?a=a.substring(u,u+s-1):a.subarray&&(a=a.subarray(u,u+s),1===s&&(a=a[0]))}else a=u;i[e]=a}return i}(s),h=r.readOffset(t+i+n*e);return new Sp(s,a,h)}async requestIFD(t){if(this.ifdRequests[t])return this.ifdRequests[t];if(0===t)return this.ifdRequests[t]=this.parseFileDirectoryAt(this.firstIFDOffset),this.ifdRequests[t];if(!this.ifdRequests[t-1])try{this.ifdRequests[t-1]=this.requestIFD(t-1)}catch(n){if(n instanceof Op)throw new Op(t);throw n}return this.ifdRequests[t]=(async()=>{const n=await this.ifdRequests[t-1];if(0===n.nextIFDByteOffset)throw new Op(t);return this.parseFileDirectoryAt(n.nextIFDByteOffset)})(),this.ifdRequests[t]}async getImage(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const n=await this.requestIFD(t);return new Ud(n.fileDirectory,n.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let t=0,n=!0;for(;n;)try{await this.requestIFD(t),++t}catch(t){if(!(t instanceof Op))throw t;n=!1}return t}async getGhostValues(){const t=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const n="GDAL_STRUCTURAL_METADATA_SIZE=",i=n.length+100;let r=await this.getSlice(t,i);if(n===_p(r,Pd.sf.ASCII,n.length,t)){const n=_p(r,Pd.sf.ASCII,i,t).split("\n")[0],e=Number(n.split("=")[1].split(" ")[0])+n.length;e>i&&(r=await this.getSlice(t,e));const o=_p(r,Pd.sf.ASCII,e,t);this.ghostValues={},o.split("\n").filter((t=>t.length>0)).map((t=>t.split("="))).forEach((t=>{let[n,i]=t;this.ghostValues[n]=i}))}return this.ghostValues}static async fromSource(t,n,i){const r=(await t.fetch([{offset:0,length:1024}],i))[0],e=new Bd(r),o=e.getUint16(0,0);let s;if(18761===o)s=!0;else{if(19789!==o)throw new TypeError("Invalid byte order value.");s=!1}const u=e.getUint16(2,s);let a;if(42===u)a=!1;else{if(43!==u)throw new TypeError("Invalid magic number.");a=!0;if(8!==e.getUint16(4,s))throw new Error("Unsupported offset byte-size.")}const h=a?e.getUint64(8,s):e.getUint32(4,s);return new Ep(t,s,a,h,n)}close(){return"function"==typeof this.source.close&&this.source.close()}}class Tp extends jp{constructor(t,n){super(),this.mainFile=t,this.overviewFiles=n,this.imageFiles=[t].concat(n),this.fileDirectoriesPerFile=null,this.fileDirectoriesPerFileParsing=null,this.imageCount=null}async parseFileDirectoriesPerFile(){const t=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((t=>t.parseFileDirectoryAt(t.firstIFDOffset))));return this.fileDirectoriesPerFile=await Promise.all(t),this.fileDirectoriesPerFile}async getImage(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;await this.getImageCount(),await this.parseFileDirectoriesPerFile();let n=0,i=0;for(let r=0;r<this.imageFiles.length;r++){const e=this.imageFiles[r];for(let o=0;o<this.imageCounts[r];o++){if(t===n){const t=await e.requestIFD(i);return new Ud(t.fileDirectory,t.geoKeyDirectory,e.dataView,e.littleEndian,e.cache,e.source)}n++,i++}i=0}throw new RangeError("Invalid image index")}async getImageCount(){if(null!==this.imageCount)return this.imageCount;const t=[this.mainFile.getImageCount()].concat(this.overviewFiles.map((t=>t.getImageCount())));return this.imageCounts=await Promise.all(t),this.imageCount=this.imageCounts.reduce(((t,n)=>t+n),0),this.imageCount}}async function Ap(t,n){return Ep.fromSource(new xp(t),n)}const Pp="undefined"!=typeof navigator&&navigator.hardwareConcurrency||2;var Cp,kp=class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pp,n=arguments.length>1?arguments[1]:void 0;this.workers=null,this._awaitingDecoder=null,this.size=t,this.messageId=0,t&&(this._awaitingDecoder=n?Promise.resolve(n):new Promise((t=>{i.e(231).then(i.bind(i,231)).then((n=>{t(n.create)}))})),this._awaitingDecoder.then((n=>{this._awaitingDecoder=null,this.workers=[];for(let i=0;i<t;i++)this.workers.push({worker:n(),idle:!0})})))}async decode(t,n){return this._awaitingDecoder&&await this._awaitingDecoder,0===this.size?Id(t).then((i=>i.decode(t,n))):new Promise((i=>{const r=this.workers.find((t=>t.idle))||this.workers[Math.floor(Math.random()*this.size)];r.idle=!1;const e=this.messageId++,o=t=>{t.data.id===e&&(r.idle=!0,i(t.data.decoded),r.worker.removeEventListener("message",o))};r.worker.addEventListener("message",o),r.worker.postMessage({fileDirectory:t,buffer:n,id:e},[n])}))}destroy(){this.workers&&(this.workers.forEach((t=>{t.worker.terminate()})),this.workers=null)}},Ip=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Np="STATISTICS_MAXIMUM",Lp="STATISTICS_MINIMUM";function zp(t){try{return t.getBoundingBox()}catch(i){var n=t.fileDirectory;return[0,0,n.ImageWidth,n.ImageLength]}}function Rp(t){try{return t.getOrigin().slice(0,2)}catch(n){return[0,t.fileDirectory.ImageLength]}}function Fp(t,n){try{return t.getResolution(n)}catch(i){return[n.fileDirectory.ImageWidth/t.fileDirectory.ImageWidth,n.fileDirectory.ImageHeight/t.fileDirectory.ImageHeight]}}function Gp(t){var n=t.geoKeys;if(!n)return null;if(n.ProjectedCSTypeGeoKey){if(!(r=yr(i="EPSG:"+n.ProjectedCSTypeGeoKey)))(e=Nt(n.ProjLinearUnitsGeoKey))&&(r=new ei({code:i,units:e}));return r}if(n.GeographicTypeGeoKey){var i,r,e;if(!(r=yr(i="EPSG:"+n.GeographicTypeGeoKey)))(e=Nt(n.GeogAngularUnitsGeoKey))&&(r=new ei({code:i,units:e}));return r}return null}function Dp(t){return t.getImageCount().then((function(n){for(var i=new Array(n),r=0;r<n;++r)i[r]=t.getImage(r);return Promise.all(i)}))}function qp(t,n){return(t.blob?Ap(t.blob):t.overviews?async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;const e=await Ep.fromSource(bp(t,i),r),o=await Promise.all(n.map((t=>Ep.fromSource(bp(t,i)))));return new Tp(e,o)}(t.url,t.overviews,n):async function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return Ep.fromSource(bp(t,n),i)}(t.url,n)).then(Dp)}function Up(t,n,i,r,e){if(Array.isArray(t)){var o=t.length;if(!Array.isArray(n)||o!=n.length){var s=new Error(r);throw e(s),s}for(var u=0;u<o;++u)Up(t[u],n[u],i,r,e)}else if(n=n,Math.abs(t-n)>i*t)throw new Error(r)}function Bp(t){return t instanceof Int8Array?-128:t instanceof Int16Array?-32768:t instanceof Int32Array?-2147483648:t instanceof Float32Array?12e-39:0}function Xp(t){return t instanceof Int8Array?127:t instanceof Uint8Array||t instanceof Uint8ClampedArray?255:t instanceof Int16Array?32767:t instanceof Uint16Array?65535:t instanceof Int32Array?2147483647:t instanceof Uint32Array?4294967295:t instanceof Float32Array?34e37:255}var Vp=function(t){function n(n){var i=t.call(this,{state:"loading",tileGrid:null,projection:null,opaque:n.opaque,transition:n.transition,interpolate:!1!==n.interpolate,wrapX:n.wrapX})||this;i.Qa=n.sources;var r=i.Qa.length;i.th=n.sourceOptions,i.nh=new Array(r),i.ih=new Array(r),i.rh,i.eh,i.oh,i.sh=!1!==n.normalize,i.uh=!1,i.V=null,i.ah=n.convertToRGB?"readRGB":"readRasters",i.setKey(i.Qa.map((function(t){return t.url})).join(","));for(var e=i,o=new Array(r),s=0;s<r;++s)o[s]=qp(i.Qa[s],i.th);return Promise.all(o).then((function(t){e.hh(t)})).catch((function(t){console.error(t),e.V=t,e.setState("error")})),i}return Ip(n,t),n.prototype.getError=function(){return this.V},n.prototype.hh=function(t){for(var n,i,r,e,o,s=new Array(t.length),u=new Array(t.length),a=new Array(t.length),h=0,f=t.length,c=function(f){var c=t[f],v=c.length,d=void 0,p=void 0,y=new Array(v),m=new Array(v),w=new Array(v);u[f]=new Array(v),a[f]=new Array(v);for(var g=0;g<v;++g){var b=c[g],x=b.getGDALNoData();a[f][g]=b.getGDALMetadata(0),u[f][g]=x;var M=l.Qa[f].bands;s[f]=M?M.length:b.getSamplesPerPixel();var _=v-(g+1);d||(d=zp(b)),p||(p=Rp(b));var S=Fp(b,c[0]);w[_]=S[0];var O=[b.getTileWidth(),b.getTileHeight()];y[_]=O;var j=S[0]/Math.abs(S[1]);m[_]=[O[0],O[1]/j]}if(n?Wn(n,d,n):n=d,i){var E="Origin mismatch for source ".concat(f,", got [").concat(p,"] but expected [").concat(i,"]");Up(i,p,0,E,l.viewRejector)}else i=p;if(o){o.length-h>w.length&&(h=o.length-w.length);var T=o[o.length-1]/w[w.length-1];l.ih[f]=T;var A=w.map((function(t){return t*T}));E="Resolution mismatch for source ".concat(f,", got [").concat(A,"] but expected [").concat(o,"]");Up(o.slice(h,o.length),A,.02,E,l.viewRejector)}else o=w,l.ih[f]=1;r?Up(r.slice(h,r.length),m,.01,"Tile size mismatch for source ".concat(f),l.viewRejector):r=m,e?Up(e.slice(h,e.length),y,0,"Tile size mismatch for source ".concat(f),l.viewRejector):e=y,l.nh[f]=c.reverse()},l=this,v=0;v<f;++v)c(v);for(var d=0,p=this.nh.length;d<p;++d)for(var y=this.nh[d];y.length<o.length;)y.unshift(void 0);if(!this.getProjection()){var m=t[0];for(d=m.length-1;d>=0;--d){var w=Gp(m[d]);if(w){this.projection=w;break}}}this.rh=s,this.eh=u,this.oh=a;t:for(v=0;v<f;++v){if(void 0!==this.Qa[v].nodata){this.uh=!0;break}var g=u[v],b=this.Qa[v].bands;if(b){for(d=0;d<b.length;++d)if(null!==g[b[d]-1]){this.uh=!0;break t}}else for(var x=0;x<g.length;++x)if(null!==g[x]){this.uh=!0;break t}}var M=this.uh?1:0;this.bandCount=s.reduce((function(t,n){return t+=n}),0)+M;var _=new xf({extent:n,minZoom:h,origin:i,resolutions:o,tileSizes:r});this.tileGrid=_,this.setTileSizes(e),this.setLoader(this.fh.bind(this)),this.setState("ready"),this.viewResolver({projection:this.projection,resolutions:o,center:kr(qn(n),this.projection),extent:Nr(n,this.projection),zoom:0})},n.prototype.fh=function(t,n,i){for(var r=this.getTileSize(t),e=this.nh.length,o=new Array(e),s=this.uh,u=this.bandCount,a=this.rh,h=this.eh,f=this.Qa,c=function(e){var s=f[e],u=l.ih[e],a=[Math.round(n*(r[0]*u)),Math.round(i*(r[1]*u)),Math.round((n+1)*(r[0]*u)),Math.round((i+1)*(r[1]*u))],c=l.nh[e][t],v=void 0;s.bands&&(v=s.bands.map((function(t){return t-1})));var d=void 0;d="nodata"in s&&null!==s.nodata?s.nodata:v?v.map((function(t){return h[e][t]})):h[e],o[e]=c[l.ah]({window:a,width:r[0],height:r[1],samples:v,fillValue:d,pool:(Cp||(Cp=new kp),Cp),interleave:!1})},l=this,v=0;v<e;++v)c(v);var d=r[0]*r[1],p=d*u,y=this.sh,m=this.oh;return Promise.all(o).then((function(t){var n;n=y?new Uint8Array(p):new Float32Array(p);for(var i=0,r=0;r<d;++r){for(var o=s,u=0;u<e;++u){var c=f[u],l=c.min,v=c.max,w=void 0,g=void 0;if(y){var b=m[u][0];void 0===l&&(l=b&&Lp in b?parseFloat(b.STATISTICS_MINIMUM):Bp(t[u][0])),void 0===v&&(v=b&&Np in b?parseFloat(b.STATISTICS_MAXIMUM):Xp(t[u][0])),g=-l*(w=255/(v-l))}for(var x=0;x<a[u];++x){var M=t[u][x][r],_=void 0;if(_=y?oi(w*M+g,0,255):M,s){var S=c.nodata;if(void 0===S){var O=void 0;O=c.bands?c.bands[x]-1:x,S=h[u][O]}var j=isNaN(S);(!j&&M!==S||j&&!isNaN(M))&&(o=!1,n[i]=_)}else n[i]=_;i++}}s&&(o||(n[i]=255),i++)}return n})).catch((function(t){throw console.error(t),t}))},n}(ld);Vp.prototype.getView;var Wp=Vp,Yp=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Zp="default",$p="truncated",Kp=function(t){function n(n,i,r,e,o,s,u){var a=t.call(this,i,r,e,o,s,u)||this;return a.lh=null,a.jo=n,a}return Yp(n,t),n.prototype.getImage=function(){if(this.lh)return this.lh;var n=t.prototype.getImage.call(this);if(this.state==vt){var i=this.jo;if(n.width==i[0]&&n.height==i[1])return this.lh=n,n;var r=_o(i[0],i[1]);return r.drawImage(n,0,0),this.lh=r.canvas,r.canvas}return n},n}(ko),Hp=function(t){function n(n){var i=this,r=n,e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate);var o=r.size,s=void 0!==r.tierSizeCalculation?r.tierSizeCalculation:Zp,u=r.tilePixelRatio||1,a=o[0],h=o[1],f=[],c=r.tileSize||Pu,l=c*u;switch(s){case Zp:for(;a>l||h>l;)f.push([Math.ceil(a/l),Math.ceil(h/l)]),l+=l;break;case $p:for(var v=a,d=h;v>l||d>l;)f.push([Math.ceil(v/l),Math.ceil(d/l)]),v>>=1,d>>=1;break;default:St(!1,53)}f.push([1,1]),f.reverse();for(var p=[u],y=[0],m=1,w=f.length;m<w;m++)p.push(u<<m),y.push(f[m-1][0]*f[m-1][1]+y[m-1]);p.reverse();var g=new xf({tileSize:c,extent:r.extent||[0,-h,a,0],resolutions:p}),b=r.url;b&&-1==b.indexOf("{TileGroup}")&&-1==b.indexOf("{tileIndex}")&&(b+="{TileGroup}/{z}-{x}-{y}.jpg");var x=If(b),M=c*u;var _=Cf(x.map((function(t){return function(n,i,r){if(n){var e=n[0],o=n[1],s=n[2],u=o+s*f[e][0],a={z:e,x:o,y:s,tileIndex:u,TileGroup:"TileGroup"+((u+y[e])/M|0)};return t.replace(/\{(\w+?)\}/g,(function(t,n){return a[n]}))}}}))),S=Kp.bind(null,Qu(c*u));(i=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,projection:r.projection,tilePixelRatio:u,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileClass:S,tileGrid:g,tileUrlFunction:_,transition:r.transition})||this).zDirection=r.zDirection;var O=_(g.getTileCoordForCoordAndResolution(qn(g.getExtent()),p[p.length-1]),1,null),j=new Image;return j.addEventListener("error",function(){M=c,this.changed()}.bind(i)),j.src=O,i}return Yp(n,t),n}(Vv),Jp=function(t,n,i){if(i||2===arguments.length)for(var r,e=0,o=n.length;e<o;e++)!r&&e in n||(r||(r=Array.prototype.slice.call(n,0,e)),r[e]=n[e]);return t.concat(r||Array.prototype.slice.call(n))},Qp="version1",ty="version2",ny="version3",iy={};iy[Qp]={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"]}},iy[ty]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},iy[ny]={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"]}},iy.none={none:{supports:[],formats:[],qualities:[]}};var ry=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,ey=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,oy=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;var sy={};sy[Qp]=function(t){var n=t.getComplianceLevelSupportedFeatures();return void 0===n&&(n=iy[Qp].level0),{url:void 0===t.imageInfo["@id"]?void 0:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:n.supports,formats:Jp(Jp([],n.formats,!0),[void 0===t.imageInfo.formats?[]:t.imageInfo.formats],!1),qualities:Jp(Jp([],n.qualities,!0),[void 0===t.imageInfo.qualities?[]:t.imageInfo.qualities],!1),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}},sy[ty]=function(t){var n=t.getComplianceLevelSupportedFeatures(),i=Array.isArray(t.imageInfo.profile)&&t.imageInfo.profile.length>1,r=i&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],e=i&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],o=i&&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:Jp(Jp([],n.supports,!0),r,!0),formats:Jp(Jp([],n.formats,!0),e,!0),qualities:Jp(Jp([],n.qualities,!0),o,!0)}},sy[ny]=function(t){var n=t.getComplianceLevelSupportedFeatures(),i=void 0===t.imageInfo.extraFormats?n.formats:Jp(Jp([],n.formats,!0),t.imageInfo.extraFormats,!0),r=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return y(["jpg","png","gif"],t)})).reduce((function(t,n){return void 0===t&&y(i,n)?n:t}),void 0):void 0;return{url:t.imageInfo.id,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 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?n.supports:Jp(Jp([],n.supports,!0),t.imageInfo.extraFeatures,!0),formats:i,qualities:void 0===t.imageInfo.extraQualities?n.qualities:Jp(Jp([],n.qualities,!0),t.imageInfo.extraQualities,!0),preferredFormat:r}};var uy=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 n=0;n<t.length;n++)switch(t[n]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return Qp;case"http://iiif.io/api/image/2/context.json":return ty;case"http://iiif.io/api/image/3/context.json":return ny;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(Qp)&&this.imageInfo.identifier)return Qp}St(!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 Qp:if(ry.test(this.imageInfo.profile))return this.imageInfo.profile;break;case ny:if(oy.test(this.imageInfo.profile))return this.imageInfo.profile;break;case ty:if("string"==typeof this.imageInfo.profile&&ey.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]&&ey.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}},t.prototype.getComplianceLevelFromProfile=function(t){var n=this.getComplianceLevelEntryFromProfile(t);if(void 0!==n){var i=n.match(/level[0-2](?:\.json)?$/g);return Array.isArray(i)?i[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),n=this.getComplianceLevelFromProfile(t);return void 0===n?iy.none.none:iy[t][n]}},t.prototype.getTileSourceOptions=function(t){var n=t||{},i=this.getImageApiVersion();if(void 0!==i){var r=void 0===i?void 0:sy[i](this);if(void 0!==r)return{url:r.url,version:i,size:[this.imageInfo.width,this.imageInfo.height],sizes:r.sizes,format:void 0!==n.format&&y(r.formats,n.format)?n.format:void 0!==r.preferredFormat?r.preferredFormat:"jpg",supports:r.supports,quality:n.quality&&y(r.qualities,n.quality)?n.quality:y(r.qualities,"native")?"native":"default",resolutions:Array.isArray(r.resolutions)?r.resolutions.sort((function(t,n){return n-t})):void 0,tileSize:r.tileSize}}},t}(),ay=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function hy(t){return t.toLocaleString("en",{maximumFractionDigits:10})}var fy=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate);var o=r.url||"";o+=o.lastIndexOf("/")===o.length-1||""===o?"":"/";var s=r.version||ty,u=r.sizes||[],a=r.size;St(null!=a&&Array.isArray(a)&&2==a.length&&!isNaN(a[0])&&a[0]>0&&!isNaN(a[1])&&a[1]>0,60);var h,f,c,l=a[0],v=a[1],d=r.tileSize,p=r.tilePixelRatio||1,m=r.format||"jpg",w=r.quality||(r.version==Qp?"native":"default"),g=r.resolutions||[],b=r.supports||[],x=r.extent||[0,-v,l,0],M=null!=u&&Array.isArray(u)&&u.length>0,_=void 0!==d&&("number"==typeof d&&Number.isInteger(d)&&d>0||Array.isArray(d)&&d.length>0),S=null!=b&&Array.isArray(b)&&(y(b,"regionByPx")||y(b,"regionByPct"))&&(y(b,"sizeByWh")||y(b,"sizeByH")||y(b,"sizeByW")||y(b,"sizeByPct"));if(g.sort((function(t,n){return n-t})),_||S)if(null!=d&&("number"==typeof d&&Number.isInteger(d)&&d>0?(h=d,f=d):Array.isArray(d)&&d.length>0&&((1==d.length||null==d[1]&&Number.isInteger(d[0]))&&(h=d[0],f=d[0]),2==d.length&&(Number.isInteger(d[0])&&Number.isInteger(d[1])?(h=d[0],f=d[1]):null==d[0]&&Number.isInteger(d[1])&&(h=d[1],f=d[1])))),void 0!==h&&void 0!==f||(h=Pu,f=Pu),0==g.length)for(var O=c=Math.max(Math.ceil(Math.log(l/h)/Math.LN2),Math.ceil(Math.log(v/f)/Math.LN2));O>=0;O--)g.push(Math.pow(2,O));else{var j=Math.max.apply(Math,g);c=Math.round(Math.log(j)/Math.LN2)}else if(h=l,f=v,g=[],M){u.sort((function(t,n){return t[0]-n[0]})),c=-1;var E=[];for(O=0;O<u.length;O++){var T=l/u[O][0];g.length>0&&g[g.length-1]==T?E.push(O):(g.push(T),c++)}if(E.length>0)for(O=0;O<E.length;O++)u.splice(E[O]-O,1)}else g.push(1),u.push([l,v]),c=0;var A=new xf({tileSize:[h,f],extent:x,origin:Yn(x),resolutions:g}),P=Kp.bind(null,Qu(d||256).map((function(t){return t*p})));return(i=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,state:r.state,tileClass:P,tileGrid:A,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:function(t,n,i){var r,e,a=t[0];if(!(a>c)){var d=t[1],p=t[2],x=g[a];if(!(void 0===d||void 0===p||void 0===x||d<0||Math.ceil(l/x/h)<=d||p<0||Math.ceil(v/x/f)<=p)){if(S||_){var O=d*h*x,j=p*f*x,E=h*x,T=f*x,A=h,P=f;if(O+E>l&&(E=l-O),j+T>v&&(T=v-j),O+h*x>l&&(A=Math.floor((l-O+x-1)/x)),j+f*x>v&&(P=Math.floor((v-j+x-1)/x)),0==O&&E==l&&0==j&&T==v)r="full";else if(!S||y(b,"regionByPx"))r=O+","+j+","+E+","+T;else if(y(b,"regionByPct")){r="pct:"+hy(O/l*100)+","+hy(j/v*100)+","+hy(E/l*100)+","+hy(T/v*100)}s!=ny||S&&!y(b,"sizeByWh")?!S||y(b,"sizeByW")?e=A+",":y(b,"sizeByH")?e=","+P:y(b,"sizeByWh")?e=A+","+P:y(b,"sizeByPct")&&(e="pct:"+hy(100/x)):e=A+","+P}else if(r="full",M){var C=u[a][0],k=u[a][1];e=s==ny?C==l&&k==v?"max":C+","+k:C==l?"full":C+","}else e=s==ny?"max":"full";return o+r+"/"+e+"/0/"+w+"."+m}}},transition:r.transition})||this).zDirection=r.zDirection,i}return ay(n,t),n}(Vv),cy=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ly=function(t){function n(n,i,r,e,o,s,u){var a=this,h=n.getExtent(),f=i.getExtent(),c=f?Wn(r,f):r,l=mf(n,i,qn(c),e),v=new qc(n,i,c,h,.5*l,e),d=s(v.calculateSourceExtent(),l,o),p=d?lo:mo,y=d?d.getPixelRatio():1;return(a=t.call(this,r,e,y,p)||this).vs=i,a.ps=h,a.Is=v,a.wi=e,a.dh=r,a.ph=d,a.yh=y,a.da=u,a.qt=null,a.mh=null,a}return cy(n,t),n.prototype.disposeInternal=function(){this.state==vo&&this.wh(),t.prototype.disposeInternal.call(this)},n.prototype.getImage=function(){return this.qt},n.prototype.getProjection=function(){return this.vs},n.prototype.Ns=function(){var t=this.ph.getState();if(t==po){var n=$n(this.dh)/this.wi,i=Vn(this.dh)/this.wi;this.qt=gf(n,i,this.yh,this.ph.getResolution(),this.ps,this.wi,this.dh,this.Is,[{extent:this.ph.getExtent(),image:this.ph.getImage()}],0,void 0,this.da)}this.state=t,this.changed()},n.prototype.load=function(){if(this.state==lo){this.state=vo,this.changed();var t=this.ph.getState();t==po||t==yo?this.Ns():(this.mh=$(this.ph,L,(function(t){var n=this.ph.getState();n!=po&&n!=yo||(this.wh(),this.Ns())}),this),this.ph.load())}},n.prototype.wh=function(){H(this.mh),this.mh=null},n}(co),vy=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dy="imageloadstart",py="imageloadend",yy="imageloaderror",my=function(t){function n(n,i){var r=t.call(this,n)||this;return r.image=i,r}return vy(n,t),n}(c);function wy(t,n){t.getImage().src=n}var gy=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{attributions:n.attributions,projection:n.projection,state:n.state,interpolate:r})||this).on,i.once,i.un,i.Ti=void 0!==n.resolutions?n.resolutions:null,i.gh=null,i.bh=0,i}return vy(n,t),n.prototype.getResolutions=function(){return this.Ti},n.prototype.findNearestResolution=function(t){if(this.Ti){var n=m(this.Ti,t,0);t=this.Ti[n]}return t},n.prototype.getImage=function(t,n,i,r){var e=this.getProjection();if(e&&r&&!Sr(e,r)){if(this.gh){if(this.bh==this.getRevision()&&Sr(this.gh.getProjection(),r)&&this.gh.getResolution()==n&&An(this.gh.getExtent(),t))return this.gh;this.gh.dispose(),this.gh=null}return this.gh=new ly(e,r,t,n,i,function(t,n,i){return this.getImageInternal(t,n,i,e)}.bind(this),this.getInterpolate()),this.bh=this.getRevision(),this.gh}return e&&(r=e),this.getImageInternal(t,n,i,r)},n.prototype.getImageInternal=function(t,n,i,e){return r()},n.prototype.handleImageChange=function(t){var n,i=t.target;switch(i.getState()){case vo:this.loading=!0,n=dy;break;case po:this.loading=!1,n=py;break;case yo:this.loading=!1,n=yy;break;default:return}this.hasListener(n)&&this.dispatchEvent(new my(n,i))},n}(zv),by=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xy=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,interpolate:e,projection:r.projection,resolutions:r.resolutions})||this).Bt=void 0!==r.crossOrigin?r.crossOrigin:null,i._a=void 0===r.hidpi||r.hidpi,i.Fe=r.url,i.Rt=void 0!==r.imageLoadFunction?r.imageLoadFunction:wy,i.xh=r.params||{},i.Lt=null,i.Mh=[0,0],i._h=0,i.Sh=void 0!==r.ratio?r.ratio:1.5,i}return by(n,t),n.prototype.getParams=function(){return this.xh},n.prototype.getImageInternal=function(t,n,i,r){if(void 0===this.Fe)return null;n=this.findNearestResolution(n),i=this._a?i:1;var e=this.Lt;if(e&&this._h==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&xn(e.getExtent(),t))return e;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};A(o,this.xh);var s=((t=t.slice())[0]+t[2])/2,u=(t[1]+t[3])/2;if(1!=this.Sh){var a=this.Sh*$n(t)/2,h=this.Sh*Vn(t)/2;t[0]=s-a,t[1]=u-h,t[2]=s+a,t[3]=u+h}var f=n/i,c=Math.ceil($n(t)/f),l=Math.ceil(Vn(t)/f);t[0]=s-f*c/2,t[2]=s+f*c/2,t[1]=u-f*l/2,t[3]=u+f*l/2,this.Mh[0]=c,this.Mh[1]=l;var v=this.Oh(t,this.Mh,i,r,o);return this.Lt=new bo(t,n,i,v,this.Bt,this.Rt),this._h=this.getRevision(),this.Lt.addEventListener(L,this.handleImageChange.bind(this)),this.Lt},n.prototype.getImageLoadFunction=function(){return this.Rt},n.prototype.Oh=function(t,n,i,r,e){var o=r.getCode().split(/:(?=\d+$)/).pop();e.SIZE=n[0]+","+n[1],e.BBOX=t.join(","),e.BBOXSR=o,e.IMAGESR=o,e.DPI=Math.round(90*i);var s=this.Fe,u=s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return u==s&&St(!1,50),Nf(u,e)},n.prototype.getUrl=function(){return this.Fe},n.prototype.setImageLoadFunction=function(t){this.Lt=null,this.Rt=t,this.changed()},n.prototype.setUrl=function(t){t!=this.Fe&&(this.Fe=t,this.Lt=null,this.changed())},n.prototype.updateParams=function(t){A(this.xh,t),this.Lt=null,this.changed()},n}(gy),My=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_y=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,interpolate:e,projection:r.projection,resolutions:r.resolutions,state:r.state})||this).jh=r.canvasFunction,i.qt=null,i._h=0,i.Sh=void 0!==r.ratio?r.ratio:1.5,i}return My(n,t),n.prototype.getImageInternal=function(t,n,i,r){n=this.findNearestResolution(n);var e=this.qt;if(e&&this._h==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&xn(e.getExtent(),t))return e;Qn(t=t.slice(),this.Sh);var o=[$n(t)/n*i,Vn(t)/n*i],s=this.jh.call(this,t,n,i,o,r);return s&&(e=new Mo(t,n,i,s)),this.qt=e,this._h=this.getRevision(),e},n}(gy),Sy=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();var Oy=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{interpolate:r,projection:n.projection,resolutions:n.resolutions})||this).Bt=void 0!==n.crossOrigin?n.crossOrigin:null,i.Eh=void 0!==n.displayDpi?n.displayDpi:96,i.xh=n.params||{},i.Fe=n.url,i.Rt=void 0!==n.imageLoadFunction?n.imageLoadFunction:wy,i._a=void 0===n.hidpi||n.hidpi,i.dt=void 0!==n.metersPerUnit?n.metersPerUnit:1,i.Sh=void 0!==n.ratio?n.ratio:1,i.Th=void 0!==n.useOverlay&&n.useOverlay,i.Lt=null,i._h=0,i}return Sy(n,t),n.prototype.getParams=function(){return this.xh},n.prototype.getImageInternal=function(t,n,i,r){n=this.findNearestResolution(n),i=this._a?i:1;var e=this.Lt;if(e&&this._h==this.getRevision()&&e.getResolution()==n&&e.getPixelRatio()==i&&xn(e.getExtent(),t))return e;1!=this.Sh&&Qn(t=t.slice(),this.Sh);var o=[$n(t)/n*i,Vn(t)/n*i];if(void 0!==this.Fe){var s=this.getUrl(this.Fe,this.xh,t,o,r);(e=new bo(t,n,i,s,this.Bt,this.Rt)).addEventListener(L,this.handleImageChange.bind(this))}else e=null;return this.Lt=e,this._h=this.getRevision(),e},n.prototype.getImageLoadFunction=function(){return this.Rt},n.prototype.updateParams=function(t){A(this.xh,t),this.changed()},n.prototype.getUrl=function(t,n,i,r,e){var o=function(t,n,i,r){var e=$n(t),o=Vn(t),s=n[0],u=n[1],a=.0254/r;return u*e>s*o?e*i/(s*a):o*i/(u*a)}(i,r,this.dt,this.Eh),s=qn(i),u={OPERATION:this.Th?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.Eh,SETDISPLAYWIDTH:Math.round(r[0]),SETDISPLAYHEIGHT:Math.round(r[1]),SETVIEWSCALE:o,SETVIEWCENTERX:s[0],SETVIEWCENTERY:s[1]};return A(u,n),Nf(t,u)},n.prototype.setImageLoadFunction=function(t){this.Lt=null,this.Rt=t,this.changed()},n}(gy),jy=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ey=function(t){function n(n){var i=this,r=void 0!==n.crossOrigin?n.crossOrigin:null,e=void 0!==n.imageLoadFunction?n.imageLoadFunction:wy,o=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(o=n.interpolate),(i=t.call(this,{attributions:n.attributions,interpolate:o,projection:yr(n.projection)})||this).Fe=n.url,i.Ah=n.imageExtent,i.Lt=new bo(i.Ah,void 0,1,i.Fe,r,e),i.Mh=n.imageSize?n.imageSize:null,i.Lt.addEventListener(L,i.handleImageChange.bind(i)),i}return jy(n,t),n.prototype.getImageExtent=function(){return this.Ah},n.prototype.getImageInternal=function(t,n,i,r){return Kn(t,this.Lt.getExtent())?this.Lt:null},n.prototype.getUrl=function(){return this.Fe},n.prototype.handleImageChange=function(n){if(this.Lt.getState()==po){var i=this.Lt.getExtent(),r=this.Lt.getImage(),e=void 0,o=void 0;this.Mh?(e=this.Mh[0],o=this.Mh[1]):(e=r.width,o=r.height);var s=$n(i),u=Vn(i),a=s/e,h=u/o,f=e,c=o;if(a>h?f=Math.round(s/h):c=Math.round(u/a),f!==e||c!==o){var l=_o(f,c);this.getInterpolate()||A(l,lf);var v=l.canvas;l.drawImage(r,0,0,e,o,0,0,v.width,v.height),this.Lt.setImage(v)}}t.prototype.handleImageChange.call(this,n)},n}(gy),Ty="1.3.0",Ay=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Py=[101,101],Cy=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,interpolate:e,projection:r.projection,resolutions:r.resolutions})||this).Bt=void 0!==r.crossOrigin?r.crossOrigin:null,i.Fe=r.url,i.Rt=void 0!==r.imageLoadFunction?r.imageLoadFunction:wy,i.xh=r.params||{},i.Ph=!0,i.Ch(),i.kh=r.serverType,i._a=void 0===r.hidpi||r.hidpi,i.Lt=null,i.Mh=[0,0],i._h=0,i.Sh=void 0!==r.ratio?r.ratio:1.5,i}return Ay(n,t),n.prototype.getFeatureInfoUrl=function(t,n,i,r){if(void 0!==this.Fe){var e=yr(i),o=this.getProjection();o&&o!==e&&(n=mf(o,e,t,n),t=Er(t,e,o));var s=Bn(t,n,0,Py),u={SERVICE:"WMS",VERSION:Ty,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.xh.LAYERS};A(u,this.xh,r);var a=mi((t[0]-s[0])/n,4),h=mi((s[3]-t[1])/n,4);return u[this.Ph?"I":"X"]=a,u[this.Ph?"J":"Y"]=h,this.Oh(s,Py,1,o||e,u)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.Fe){var i={SERVICE:"WMS",VERSION:Ty,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.xh.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;i.LAYER=r}if(void 0!==t){var e=this.getProjection()?this.getProjection().getMetersPerUnit():1;i.SCALE=t*e/28e-5}return A(i,n),Nf(this.Fe,i)}},n.prototype.getParams=function(){return this.xh},n.prototype.getImageInternal=function(t,n,i,r){if(void 0===this.Fe)return null;n=this.findNearestResolution(n),1==i||this._a&&void 0!==this.kh||(i=1);var e=n/i,o=qn(t),s=Bn(o,e,0,[wi($n(t)/e,4),wi(Vn(t)/e,4)]),u=Bn(o,e,0,[wi(this.Sh*$n(t)/e,4),wi(this.Sh*Vn(t)/e,4)]),a=this.Lt;if(a&&this._h==this.getRevision()&&a.getResolution()==n&&a.getPixelRatio()==i&&xn(a.getExtent(),s))return a;var h={SERVICE:"WMS",VERSION:Ty,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};A(h,this.xh),this.Mh[0]=yi($n(u)/e,4),this.Mh[1]=yi(Vn(u)/e,4);var f=this.Oh(u,this.Mh,i,r,h);return this.Lt=new bo(u,n,i,f,this.Bt,this.Rt),this._h=this.getRevision(),this.Lt.addEventListener(L,this.handleImageChange.bind(this)),this.Lt},n.prototype.getImageLoadFunction=function(){return this.Rt},n.prototype.Oh=function(t,n,i,r,e){if(St(void 0!==this.Fe,9),e[this.Ph?"CRS":"SRS"]=r.getCode(),"STYLES"in this.xh||(e.STYLES=""),1!=i)switch(this.kh){case"geoserver":var o=90*i+.5|0;"FORMAT_OPTIONS"in e?e.FORMAT_OPTIONS+=";dpi:"+o:e.FORMAT_OPTIONS="dpi:"+o;break;case"mapserver":e.MAP_RESOLUTION=90*i;break;case"carmentaserver":case"qgis":e.DPI=90*i;break;default:St(!1,8)}e.WIDTH=n[0],e.HEIGHT=n[1];var s,u=r.getAxisOrientation();return s=this.Ph&&"ne"==u.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,e.BBOX=s.join(","),Nf(this.Fe,e)},n.prototype.getUrl=function(){return this.Fe},n.prototype.setImageLoadFunction=function(t){this.Lt=null,this.Rt=t,this.changed()},n.prototype.setUrl=function(t){t!=this.Fe&&(this.Fe=t,this.Lt=null,this.changed())},n.prototype.updateParams=function(t){A(this.xh,t),this.Ch(),this.Lt=null,this.changed()},n.prototype.Ch=function(){var t=this.xh.VERSION||Ty;this.Ph=Xi(t,"1.3")>=0},n}(gy),ky={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},Iy={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function Ny(t,n){for(var i,r,e=0;e<t.length;++e){var o=t[e];if("item"===o.rel){if(o.type===n){i=o.href;break}ky[o.type]?r=o.href:r||0!==o.type.indexOf("image/")||(r=o.href)}}if(!i){if(!r)throw new Error('Could not find "item" link');i=r}return i}function Ly(t,n,i){for(var r,e,o={},s=0;s<t.length;++s){var u=t[s];if(o[u.type]=u.href,"item"===u.rel){if(u.type===n){r=u.href;break}Iy[u.type]&&(e=u.href)}}if(!r&&i)for(s=0;s<i.length;++s){var a=i[s];if(o[a]){r=o[a];break}}if(!r){if(!e)throw new Error('Could not find "item" link');r=e}return r}function zy(t,n,i,r){var e=t.projection;if(!e&&!(e=yr(n.crs)))throw new Error("Unsupported CRS: ".concat(n.crs));for(var o="en"!==e.getAxisOrientation().substr(0,2),s=n.tileMatrices,u={},a=0;a<s.length;++a){var h=s[a];u[h.id]=h}var f={},c=[];if(r)for(a=0;a<r.length;++a){var l=(g=r[a]).tileMatrix;c.push(l),f[l]=g}else for(a=0;a<s.length;++a){l=s[a].id;c.push(l)}var v=c.length,d=new Array(v),p=new Array(v),y=new Array(v),m=new Array(v),w=[-1/0,-1/0,1/0,1/0];for(a=0;a<v;++a){l=c[a];var g,b=(h=u[l]).pointOfOrigin;if(d[a]=o?[b[1],b[0]]:b,p[a]=h.cellSize,y[a]=[h.matrixWidth,h.matrixHeight],m[a]=[h.tileWidth,h.tileHeight],g=f[l]){var x=h.cellSize*h.tileWidth,M=d[a][0]+g.minTileCol*x,_=d[a][0]+(g.maxTileCol+1)*x,S=h.cellSize*h.tileHeight,O=void 0,j=void 0;"bottomLeft"===h.cornerOfOrigin?(O=d[a][1]+g.minTileRow*S,j=d[a][1]+(g.maxTileRow+1)*S):(O=d[a][1]-(g.maxTileRow+1)*S,j=d[a][1]-g.minTileRow*S),Wn(w,[M,O,_,j],w)}}var E=new xf({origins:d,resolutions:p,sizes:y,tileSizes:m,extent:r?w:void 0}),T=t.context,P=t.url;return{grid:E,urlTemplate:i,urlFunction:function(t,n,e){if(t){var o=c[t[0]],s=u[o],a="bottomLeft"===s.cornerOfOrigin,h={tileMatrix:o,tileCol:t[1],tileRow:a?-t[2]-1:t[2]};if(r){var l=f[s.id];if(h.tileCol<l.minTileCol||h.tileCol>l.maxTileCol||h.tileRow<l.minTileRow||h.tileRow>l.maxTileRow)return}A(h,T);var v=i.replace(/\{(\w+?)\}/g,(function(t,n){return h[n]}));return Qh(P,v)}}}}function Ry(t){return Jh(t.url).then((function(n){return function(t,n){var i,r=n.tileMatrixSetLimits;if("map"===n.dataType)i=Ny(n.links,t.mediaType);else{if("vector"!==n.dataType)throw new Error('Expected tileset data type to be "map" or "vector"');i=Ly(n.links,t.mediaType,t.supportedMediaTypes)}if(n.tileMatrixSet)return zy(t,n.tileMatrixSet,i,r);var e=n.links.find((function(t){return"http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme"===t.rel}));if(!e)throw new Error("Expected http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme link or tileMatrixSet");var o=e.href;return Jh(Qh(t.url,o)).then((function(n){return zy(t,n,i,r)}))}(t,n)}))}var Fy=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Gy=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;return void 0!==n.interpolate&&(r=n.interpolate),i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:"loading",tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition})||this,Ry({url:n.url,projection:i.getProjection(),mediaType:n.mediaType,context:n.context||null}).then(i.Ih.bind(i)).catch(i.Nh.bind(i)),i}return Fy(n,t),n.prototype.Ih=function(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState("ready")},n.prototype.Nh=function(t){console.error(t),this.setState("error")},n}(Vv),Dy=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qy=function(t){function n(n){var i=this,r=n.projection||"EPSG:3857",e=n.extent||Tf(r),o=n.tileGrid||Of({extent:e,maxResolution:n.maxResolution,maxZoom:void 0!==n.maxZoom?n.maxZoom:22,minZoom:n.minZoom,tileSize:n.tileSize||512});return(i=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,interpolate:!0,opaque:!1,projection:r,state:n.state,tileGrid:o,tileLoadFunction:n.tileLoadFunction?n.tileLoadFunction:Uy,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:void 0===n.zDirection?1:n.zDirection})||this).ze=n.format?n.format:null,i.sourceTileCache=new Ih(i.tileCache.highWaterMark),i.za=null==n.overlaps||n.overlaps,i.tileClass=n.tileClass?n.tileClass:qh,i.Lh={},i}return Dy(n,t),n.prototype.getFeaturesInExtent=function(t){var n=[],i=this.tileCache;if(0===i.getCount())return n;var r=Ah(i.peekFirstKey())[0],e=this.tileGrid;return i.forEach((function(i){if(i.tileCoord[0]===r&&i.getState()===vt)for(var o=i.getSourceTiles(),s=0,u=o.length;s<u;++s){var a=o[s],h=a.tileCoord;if(Kn(t,e.getTileCoordExtent(h))){var f=a.getFeatures();if(f)for(var c=0,l=f.length;c<l;++c){var v=f[c],d=v.getGeometry();Kn(t,d.getExtent())&&n.push(v)}}}})),n},n.prototype.getOverlaps=function(){return this.za},n.prototype.clear=function(){this.tileCache.clear(),this.sourceTileCache.clear()},n.prototype.expireCache=function(n,i){var r=this.getTileCacheForProjection(n),e=Object.keys(i).reduce((function(t,n){var i=Th(n),e=r.peek(i);if(e)for(var o=e.sourceTiles,s=0,u=o.length;s<u;++s)t[o[s].getKey()]=!0;return t}),{});t.prototype.expireCache.call(this,n,i),this.sourceTileCache.expireCache(e)},n.prototype.getSourceTiles=function(t,n,i){var r=this;if(i.getState()===ct){i.setState(lt);var e=i.wrappedTileCoord,o=this.getTileGridForProjection(n),s=o.getTileCoordExtent(e),u=e[0],a=o.getResolution(u);mn(s,-a,s);var h=this.tileGrid,f=h.getExtent();f&&Wn(s,f,s);var c=h.getZForResolution(a,this.zDirection);h.forEachTileCoord(s,c,(function(e){var o=r.tileUrlFunction(e,t,n),s=r.sourceTileCache.containsKey(o)?r.sourceTileCache.get(o):new r.tileClass(e,o?ct:pt,o,r.ze,r.tileLoadFunction);i.sourceTiles.push(s);var u=s.getState();if(u<vt){var a=function(t){r.handleTileChange(t);var n=s.getState();if(n===vt||n===dt){var e=s.getKey();e in i.errorTileKeys?s.getState()===vt&&delete i.errorTileKeys[e]:i.loadingSourceTiles--,n===dt?i.errorTileKeys[e]=!0:s.removeEventListener(L,a),0===i.loadingSourceTiles&&i.setState(k(i.errorTileKeys)?vt:dt)}};s.addEventListener(L,a),i.loadingSourceTiles++}u===ct&&(s.extent=h.getTileCoordExtent(e),s.projection=n,s.resolution=h.getResolution(e[0]),r.sourceTileCache.set(o,s),s.load())})),i.loadingSourceTiles||i.setState(i.sourceTiles.some((function(t){return t.getState()===dt}))?dt:vt)}return i.sourceTiles},n.prototype.getTile=function(t,n,i,r,e){var o,s=jh(t,n,i),u=this.getKey();if(this.tileCache.containsKey(s)&&(o=this.tileCache.get(s)).key===u)return o;var a=[t,n,i],h=this.getTileCoordForTileUrlFunction(a,e),f=this.getTileGrid().getExtent(),c=this.getTileGridForProjection(e);if(h&&f){var l=c.getTileCoordExtent(h);mn(l,-c.getResolution(t),l),Kn(f,l)||(h=null)}var v=!0;if(null!==h){var d=this.tileGrid,p=c.getResolution(t),y=d.getZForResolution(p,1),m=c.getTileCoordExtent(h);mn(m,-p,m),d.forEachTileCoord(m,y,function(t){v=v&&!this.tileUrlFunction(t,r,e)}.bind(this))}var w=new Gh(a,v?pt:ct,h,this.getSourceTiles.bind(this,r,e));return w.key=u,o?(w.interimTile=o,w.refreshInterimChain(),this.tileCache.replace(s,w)):this.tileCache.set(s,w),w},n.prototype.getTileGridForProjection=function(t){var n=t.getCode(),i=this.Lh[n];if(!i){for(var r=this.tileGrid,e=r.getResolutions().slice(),o=e.map((function(t,n){return r.getOrigin(n)})),s=e.map((function(t,n){return r.getTileSize(n)})),u=e.length;u<43;++u)e.push(e[u-1]/2),o.push(o[u-1]),s.push(s[u-1]);i=new xf({extent:r.getExtent(),origins:o,resolutions:e,tileSizes:s}),this.Lh[n]=i}return i},n.prototype.getTilePixelRatio=function(t){return t},n.prototype.getTilePixelSize=function(t,n,i){var r=Qu(this.getTileGridForProjection(i).getTileSize(t),this.tmpSize);return[Math.round(r[0]*n),Math.round(r[1]*n)]},n.prototype.updateCacheSize=function(n,i){t.prototype.updateCacheSize.call(this,2*n,i),this.sourceTileCache.highWaterMark=this.getTileCacheForProjection(i).highWaterMark},n}(Uv);function Uy(t,n){t.setLoader((function(i,r,e){Xh(n,t.getFormat(),i,r,e,t.onLoad.bind(t),t.onError.bind(t))}))}var By=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Xy=function(t){function n(n){var i=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,format:n.format,overlaps:n.overlaps,projection:n.projection,tileClass:n.tileClass,transition:n.transition,wrapX:n.wrapX,zDirection:n.zDirection,state:"loading"})||this;return Ry({url:n.url,projection:i.getProjection(),mediaType:n.mediaType,supportedMediaTypes:n.format.supportedMediaTypes,context:n.context||null}).then(i.Ih.bind(i)).catch(i.Nh.bind(i)),i}return By(n,t),n.prototype.Ih=function(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState("ready")},n.prototype.Nh=function(t){console.error(t),this.setState("error")},n}(qy),Vy=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Wy='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',Yy=function(t){function n(n){var i,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate),i=void 0!==r.attributions?r.attributions:[Wy];var o=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",s=void 0!==r.url?r.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return t.call(this,{attributions:i,attributionsCollapsible:!1,cacheSize:r.cacheSize,crossOrigin:o,interpolate:e,maxZoom:void 0!==r.maxZoom?r.maxZoom:19,opaque:void 0===r.opaque||r.opaque,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileLoadFunction:r.tileLoadFunction,transition:r.transition,url:s,wrapX:r.wrapX,zDirection:r.zDirection})||this}return Vy(n,t),n}(Kv),Zy=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$y=function(t){function n(n){var i=n||{};return t.call(this,i)||this}return Zy(n,t),n}(ls),Ky=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Hy=[],Jy=null;var Qy,tm=function(t){function n(n){var i=t.call(this,n)||this;return i.container=null,i.renderedResolution,i.tempTransform=[1,0,0,1,0,0],i.pixelTransform=[1,0,0,1,0,0],i.inversePixelTransform=[1,0,0,1,0,0],i.context=null,i.containerReused=!1,i.Us=null,i.frameState=null,i}return Ky(n,t),n.prototype.getImageData=function(t,n,i){var r,e;Jy||((r=document.createElement("canvas")).width=1,r.height=1,Jy=r.getContext("2d")),Jy.clearRect(0,0,1,1);try{Jy.drawImage(t,n,i,1,1,0,0,1,1),e=Jy.getImageData(0,0,1,1).data}catch(t){return Jy=null,null}return e},n.prototype.getBackground=function(t){var n=this.getLayer().getBackground();return"function"==typeof n&&(n=n(t.viewState.resolution)),n||void 0},n.prototype.useContainer=function(t,n,i){var r,e,o=this.getLayer().getClassName();t&&t.className===o&&(!i||t&&t.style.backgroundColor&&x(Go(t.style.backgroundColor),Go(i)))&&((u=t.firstElementChild)instanceof HTMLCanvasElement&&(e=u.getContext("2d")));if(e&&e.canvas.style.transform===n?(this.container=t,this.context=e,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){(r=document.createElement("div")).className=o;var s=r.style;s.position="absolute",s.width="100%",s.height="100%";var u=(e=_o()).canvas;r.appendChild(u),(s=u.style).position="absolute",s.left="0",s.transformOrigin="top left",this.container=r,this.context=e}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)},n.prototype.clipUnrotated=function(t,n,i){var r=Yn(i),e=Zn(i),o=Dn(i),s=Gn(i);tn(n.coordinateToPixelTransform,r),tn(n.coordinateToPixelTransform,e),tn(n.coordinateToPixelTransform,o),tn(n.coordinateToPixelTransform,s);var u=this.inversePixelTransform;tn(u,r),tn(u,e),tn(u,o),tn(u,s),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(e[0]),Math.round(e[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},n.prototype.Xs=function(t,n,i){var r=this.getLayer();if(r.hasListener(t)){var e=new ms(t,this.inversePixelTransform,i,n);r.dispatchEvent(e)}},n.prototype.preRender=function(t,n){this.frameState=n,this.Xs(os,t,n)},n.prototype.postRender=function(t,n){this.Xs(ss,t,n)},n.prototype.getRenderTransform=function(t,n,i,r,e,o,s){var u=e/2,a=o/2,h=r/n,f=-h,c=-t[0]+s,l=-t[1];return sn(this.tempTransform,u,a,h,f,-i,c,l)},n.prototype.getDataAtPixel=function(t,n,i){var r=tn(this.inversePixelTransform,t.slice()),e=this.context,o=this.getLayer().getExtent();if(o&&!bn(o,tn(n.pixelToCoordinateTransform,t.slice())))return null;var s,u=Math.round(r[0]),a=Math.round(r[1]),h=this.Us;if(!h){var f=document.createElement("canvas");f.width=1,f.height=1,h=f.getContext("2d"),this.Us=h}h.clearRect(0,0,1,1);try{h.drawImage(e.canvas,u,a,1,1,0,0,1,1),s=h.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?(this.Us=null,new Uint8Array):s}return 0===s[3]?null:s},n.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},n}(Kc),nm=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),im=function(t){function n(n){var i=t.call(this,n)||this;return i.Lt=null,i}return nm(n,t),n.prototype.getImage=function(){return this.Lt?this.Lt.getImage():null},n.prototype.prepareFrame=function(t){var n=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,r=t.viewState,e=r.resolution,o=this.getLayer().getSource(),s=t.viewHints,u=t.extent;if(void 0!==n.extent&&(u=Wn(u,Lr(n.extent,r.projection))),!s[Eu]&&!s[Tu]&&!Hn(u))if(o){var a=r.projection,h=o.getImage(u,e,i,a);h&&(this.loadImage(h)?this.Lt=h:h.getState()===mo&&(this.Lt=null))}else this.Lt=null;return!!this.Lt},n.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),r=tn(n.pixelToCoordinateTransform,t.slice()),e=i.getExtent();if(e&&!bn(e,r))return null;var o=this.Lt.getExtent(),s=this.Lt.getImage(),u=$n(o),a=Math.floor(s.width*((r[0]-o[0])/u));if(a<0||a>=s.width)return null;var h=Vn(o),f=Math.floor(s.height*((o[3]-r[1])/h));return f<0||f>=s.height?null:this.getImageData(s,a,f)},n.prototype.renderFrame=function(t,n){var i=this.Lt,r=i.getExtent(),e=i.getResolution(),o=i.getPixelRatio(),s=t.layerStatesArray[t.layerIndex],u=t.pixelRatio,a=t.viewState,h=a.center,f=u*e/(a.resolution*o),c=t.extent,l=a.resolution,v=a.rotation,d=Math.round($n(c)/l*u),p=Math.round(Vn(c)/l*u);sn(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/u,1/u,v,-d/2,-p/2),un(this.inversePixelTransform,this.pixelTransform);var y=hn(this.pixelTransform);this.useContainer(n,y,this.getBackground(t));var m=this.context,w=m.canvas;w.width!=d||w.height!=p?(w.width=d,w.height=p):this.containerReused||m.clearRect(0,0,d,p);var g=!1,b=!0;if(s.extent){var x=Lr(s.extent,a.projection);(g=(b=Kn(x,t.extent))&&!xn(x,t.extent))&&this.clipUnrotated(m,t,x)}var M=i.getImage(),_=sn(this.tempTransform,d/2,p/2,f,f,0,o*(r[0]-h[0])/e,o*(h[1]-r[3])/e);this.renderedResolution=e*u/o;var S=M.width*_[0],O=M.height*_[3];if(this.getLayer().getSource().getInterpolate()||A(m,lf),this.preRender(m,t),b&&S>=.5&&O>=.5){var j=_[4],E=_[5],T=s.opacity,P=void 0;1!==T&&(P=m.globalAlpha,m.globalAlpha=T),m.drawImage(M,0,0,+M.width,+M.height,j,E,S,O),1!==T&&(m.globalAlpha=P)}return this.postRender(m,t),g&&m.restore(),A(m,vf),y!==w.style.transform&&(w.style.transform=y),this.container},n}(tm),rm=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),em=function(t){function n(n){return t.call(this,n)||this}return rm(n,t),n.prototype.createRenderer=function(){return new im(this)},n.prototype.getData=function(n){return t.prototype.getData.call(this,n)},n}($y),om="preload",sm="useInterimTilesOnError",um=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),am=function(t){function n(n){var i=this,r=n||{},e=A({},r);return delete e.preload,delete e.useInterimTilesOnError,(i=t.call(this,e)||this).on,i.once,i.un,i.setPreload(void 0!==r.preload?r.preload:0),i.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),i}return um(n,t),n.prototype.getPreload=function(){return this.get(om)},n.prototype.setPreload=function(t){this.set(om,t)},n.prototype.getUseInterimTilesOnError=function(){return this.get(sm)},n.prototype.setUseInterimTilesOnError=function(t){this.set(sm,t)},n.prototype.getData=function(n){return t.prototype.getData.call(this,n)},n}(ls),hm=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fm=function(t){function n(n){var i=t.call(this,n)||this;return i.extentChanged=!0,i.zh=null,i.renderedPixelRatio,i.renderedProjection=null,i.renderedRevision,i.renderedTiles=[],i.Rh=!1,i.tmpExtent=[1/0,1/0,-1/0,-1/0],i.Fh=new zh(0,0,0,0),i}return hm(n,t),n.prototype.isDrawableTile=function(t){var n=this.getLayer(),i=t.getState(),r=n.getUseInterimTilesOnError();return i==vt||i==pt||i==dt&&!r},n.prototype.getTile=function(t,n,i,r){var e=r.pixelRatio,o=r.viewState.projection,s=this.getLayer(),u=s.getSource().getTile(t,n,i,e,o);return u.getState()==dt&&(s.getUseInterimTilesOnError()?s.getPreload()>0&&(this.Rh=!0):u.setState(vt)),this.isDrawableTile(u)||(u=u.getInterimTile()),u},n.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),r=tn(n.pixelToCoordinateTransform,t.slice()),e=i.getExtent();if(e&&!bn(e,r))return null;for(var o=n.pixelRatio,s=n.viewState.projection,u=n.viewState,a=i.getRenderSource(),h=a.getTileGridForProjection(u.projection),f=a.getTilePixelRatio(n.pixelRatio),c=h.getZForResolution(u.resolution);c>=h.getMinZoom();--c){var l=h.getTileCoordForCoordAndZ(r,c),v=a.getTile(c,l[1],l[2],o,s);if(!(v instanceof ko||v instanceof Bc))return null;if(v.getState()===vt){var d=h.getOrigin(c),p=Qu(h.getTileSize(c)),y=h.getResolution(c),m=Math.floor(f*((r[0]-d[0])/y-l[1]*p[0])),w=Math.floor(f*((d[1]-r[1])/y-l[2]*p[1])),g=Math.round(f*a.getGutterForProjection(u.projection));return this.getImageData(v.getImage(),m+g,w+g)}}return null},n.prototype.loadedTileCallback=function(n,i,r){return!!this.isDrawableTile(r)&&t.prototype.loadedTileCallback.call(this,n,i,r)},n.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},n.prototype.renderFrame=function(t,n){var i=t.layerStatesArray[t.layerIndex],r=t.viewState,e=r.projection,s=r.resolution,u=r.center,a=r.rotation,h=t.pixelRatio,f=this.getLayer(),c=f.getSource(),l=c.getRevision(),v=c.getTileGridForProjection(e),d=v.getZForResolution(s,c.zDirection),y=v.getResolution(d),m=t.extent,w=t.viewState.resolution,g=c.getTilePixelRatio(h),b=Math.round($n(m)/w*h),x=Math.round(Vn(m)/w*h),M=i.extent&&Lr(i.extent,e);M&&(m=Wn(m,Lr(i.extent,e)));var _=y*b/2/g,S=y*x/2/g,O=[u[0]-_,u[1]-S,u[0]+_,u[1]+S],j=v.getTileRangeForExtentAndZ(m,d),E={};E[d]={};var T=this.createLoadedTileFinder(c,e,E),P=this.tmpExtent,C=this.Fh;this.Rh=!1;for(var k=a?Xn(r.center,w,a,t.size):void 0,I=j.minX;I<=j.maxX;++I)for(var N=j.minY;N<=j.maxY;++N)if(!a||v.tileCoordIntersectsViewport([d,I,N],k)){var L=this.getTile(d,I,N,t);if(this.isDrawableTile(L)){var z=o(this);if(L.getState()==vt)E[d][L.tileCoord.toString()]=L,(ot=L.inTransition(z))&&1!==i.opacity&&(L.endTransition(z),ot=!1),this.Rh||!ot&&-1!==this.renderedTiles.indexOf(L)||(this.Rh=!0);if(1===L.getAlpha(z,t.time))continue}var R=v.getTileCoordChildTileRange(L.tileCoord,C,P),F=!1;R&&(F=T(d+1,R)),F||v.forEachTileCoordParentTileRange(L.tileCoord,T,C,P)}var G=y/s*h/g;sn(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,a,-b/2,-x/2);var D=hn(this.pixelTransform);this.useContainer(n,D,this.getBackground(t));var q=this.context,U=q.canvas;un(this.inversePixelTransform,this.pixelTransform),sn(this.tempTransform,b/2,x/2,G,G,0,-b/2,-x/2),U.width!=b||U.height!=x?(U.width=b,U.height=x):this.containerReused||q.clearRect(0,0,b,x),M&&this.clipUnrotated(q,t,M),c.getInterpolate()||A(q,lf),this.preRender(q,t),this.renderedTiles.length=0;var B,X,V,W=Object.keys(E).map(Number);W.sort(p),1!==i.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(B=[],X=[]):W=W.reverse();for(var Y=W.length-1;Y>=0;--Y){var Z=W[Y],$=c.getTilePixelSize(Z,h,e),K=v.getResolution(Z)/y,H=$[0]*K*G,J=$[1]*K*G,Q=v.getTileCoordForCoordAndZ(Yn(O),Z),tt=v.getTileCoordExtent(Q),nt=tn(this.tempTransform,[g*(tt[0]-O[0])/y,g*(O[3]-tt[3])/y]),it=g*c.getGutterForProjection(e),rt=E[Z];for(var et in rt){var ot,st=(L=rt[et]).tileCoord,ut=Q[1]-st[1],at=Math.round(nt[0]-(ut-1)*H),ht=Q[2]-st[2],ft=Math.round(nt[1]-(ht-1)*J),ct=at-(I=Math.round(nt[0]-ut*H)),lt=ft-(N=Math.round(nt[1]-ht*J)),dt=d===Z,pt=!1;if(!(ot=dt&&1!==L.getAlpha(o(this),t.time)))if(B){V=[I,N,I+ct,N,I+ct,N+lt,I,N+lt];for(var yt=0,mt=B.length;yt<mt;++yt)if(d!==Z&&Z<X[yt]){var wt=B[yt];Kn([I,N,I+ct,N+lt],[wt[0],wt[3],wt[4],wt[7]])&&(pt||(q.save(),pt=!0),q.beginPath(),q.moveTo(V[0],V[1]),q.lineTo(V[2],V[3]),q.lineTo(V[4],V[5]),q.lineTo(V[6],V[7]),q.moveTo(wt[6],wt[7]),q.lineTo(wt[4],wt[5]),q.lineTo(wt[2],wt[3]),q.lineTo(wt[0],wt[1]),q.clip())}B.push(V),X.push(Z)}else q.clearRect(I,N,ct,lt);this.drawTileImage(L,t,I,N,ct,lt,it,dt),B&&!ot?(pt&&q.restore(),this.renderedTiles.unshift(L)):this.renderedTiles.push(L),this.updateUsedTiles(t.usedTiles,c,L)}}return this.renderedRevision=l,this.renderedResolution=y,this.extentChanged=!this.zh||!An(this.zh,O),this.zh=O,this.renderedPixelRatio=h,this.renderedProjection=e,this.manageTilePyramid(t,c,v,h,e,m,d,f.getPreload()),this.scheduleExpireCache(t,c),this.postRender(q,t),i.extent&&q.restore(),A(q,vf),D!==U.style.transform&&(U.style.transform=D),this.container},n.prototype.drawTileImage=function(t,n,i,r,e,s,u,a){var h=this.getTileImage(t);if(h){var f=o(this),c=n.layerStatesArray[n.layerIndex],l=c.opacity*(a?t.getAlpha(f,n.time):1),v=l!==this.context.globalAlpha;v&&(this.context.save(),this.context.globalAlpha=l),this.context.drawImage(h,u,u,h.width-2*u,h.height-2*u,i,r,e,s),v&&this.context.restore(),l!==c.opacity?n.animate=!0:a&&t.endTransition(f)}},n.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},n.prototype.getTileImage=function(t){return t.getImage()},n.prototype.scheduleExpireCache=function(t,n){if(n.canExpireCache()){var i=function(t,n,i){var r=o(t);r in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[r])}.bind(null,n);t.postRenderFunctions.push(i)}},n.prototype.updateUsedTiles=function(t,n,i){var r=o(n);r in t||(t[r]={}),t[r][i.getKey()]=!0},n.prototype.manageTilePyramid=function(t,n,i,r,e,s,u,a,h){var f=o(n);f in t.wantedTiles||(t.wantedTiles[f]={});var c,l,v,d,p,y,m=t.wantedTiles[f],w=t.tileQueue,g=i.getMinZoom(),b=t.viewState.rotation,x=b?Xn(t.viewState.center,t.viewState.resolution,b,t.size):void 0,M=0;for(y=g;y<=u;++y)for(l=i.getTileRangeForExtentAndZ(s,y,l),v=i.getResolution(y),d=l.minX;d<=l.maxX;++d)for(p=l.minY;p<=l.maxY;++p)b&&!i.tileCoordIntersectsViewport([y,d,p],x)||(u-y<=a?(++M,(c=n.getTile(y,d,p,r,e)).getState()==ct&&(m[c.getKey()]=!0,w.isKeyQueued(c.getKey())||w.enqueue([c,f,i.getTileCoordCenter(c.tileCoord),v])),void 0!==h&&h(c)):n.useTile(y,d,p,e));n.updateCacheSize(M,e)},n}(tm),cm=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lm=function(t){function n(n){return t.call(this,n)||this}return cm(n,t),n.prototype.createRenderer=function(){return new fm(this)},n}(am),vm=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dm=!0;try{new ImageData(10,10)}catch(t){dm=!1}function pm(t,n,i){if(dm)return new ImageData(t,n,i);Qy||(Qy=document.createElement("canvas").getContext("2d"));var r=Qy.createImageData(n,i);return r.data.set(t),r}function ym(t){var n=!0;try{new ImageData(10,10)}catch(t){n=!1}function i(t,i,r){return n?new ImageData(t,i,r):{data:t,width:i,height:r}}return function(n){var r=n.buffers,e=n.meta,o=n.imageOps,s=n.width,u=n.height,a=r.length,h=r[0].byteLength;if(o){for(var f=new Array(a),c=0;c<a;++c)f[c]=i(new Uint8ClampedArray(r[c]),s,u);return t(f,e).data.buffer}var l=new Uint8ClampedArray(h),v=new Array(a),d=new Array(a);for(c=0;c<a;++c)v[c]=new Uint8ClampedArray(r[c]),d[c]=[0,0,0,0];for(var p=0;p<h;p+=4){for(var y=0;y<a;++y){var m=v[y];d[y][0]=m[p],d[y][1]=m[p+1],d[y][2]=m[p+2],d[y][3]=m[p+3]}var w=t(d,e);l[p]=w[0],l[p+1]=w[1],l[p+2]=w[2],l[p+3]=w[3]}return l.buffer}}function mm(t,n){var i=Object.keys(t.lib||{}).map((function(n){return"var "+n+" = "+t.lib[n].toString()+";"})).concat(["var __minion__ = ("+ym.toString()+")(",t.operation.toString(),");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),r=new Worker("undefined"==typeof Blob?"data:text/javascript;base64,"+Buffer.from(i.join("\n"),"binary").toString("base64"):URL.createObjectURL(new Blob(i,{type:"text/javascript"})));return r.addEventListener("message",n),r}var wm=function(t){function n(n){var i,r=t.call(this)||this;r._imageOps=!!n.imageOps,i=0===n.threads?0:r._imageOps?1:n.threads||1;var e=new Array(i);if(i)for(var o=0;o<i;++o)e[o]=mm(n,r._onWorkerMessage.bind(r,o));else e[0]=function(t,n){var i=ym(t.operation),r=!1;return{postMessage:function(t){setTimeout((function(){r||n({data:{buffer:i(t),meta:t.meta}})}),0)},terminate:function(){r=!0}}}(n,r._onWorkerMessage.bind(r,0));return r._workers=e,r._queue=[],r._maxQueueLength=n.queue||1/0,r._running=0,r._dataLookup={},r._job=null,r}return vm(n,t),n.prototype.process=function(t,n,i){this._enqueue({inputs:t,meta:n,callback:i}),this._dispatch()},n.prototype._enqueue=function(t){for(this._queue.push(t);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)},n.prototype._dispatch=function(){if(!this._running&&0!==this._queue.length){var t=this._queue.shift();this._job=t;var n=t.inputs[0].width,i=t.inputs[0].height,r=t.inputs.map((function(t){return t.data.buffer})),e=this._workers.length;if(this._running=e,1!==e)for(var o=t.inputs[0].data.length,s=4*Math.ceil(o/4/e),u=0;u<e;++u){for(var a=u*s,h=[],f=0,c=r.length;f<c;++f)h.push(r[f].slice(a,a+s));this._workers[u].postMessage({buffers:h,meta:t.meta,imageOps:this._imageOps,width:n,height:i},h)}else this._workers[0].postMessage({buffers:r,meta:t.meta,imageOps:this._imageOps,width:n,height:i},r)}},n.prototype._onWorkerMessage=function(t,n){this.disposed||(this._dataLookup[t]=n.data,--this._running,0===this._running&&this._resolveJob())},n.prototype._resolveJob=function(){var t,n,i=this._job,r=this._workers.length;if(1===r)t=new Uint8ClampedArray(this._dataLookup[0].buffer),n=this._dataLookup[0].meta;else{var e=i.inputs[0].data.length;t=new Uint8ClampedArray(e),n=new Array(r);for(var o=4*Math.ceil(e/4/r),s=0;s<r;++s){var u=this._dataLookup[s].buffer,a=s*o;t.set(new Uint8ClampedArray(u),a),n[s]=this._dataLookup[s].meta}}this._job=null,this._dataLookup={},i.callback(null,pm(t,i.inputs[0].width,i.inputs[0].height),n),this._dispatch()},n.prototype.disposeInternal=function(){for(var t=0;t<this._workers.length;++t)this._workers[t].terminate();this._workers.length=0},n}(v),gm="beforeoperations",bm="afteroperations",xm="pixel",Mm="image",_m=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.extent=i.extent,e.resolution=i.viewState.resolution/i.pixelRatio,e.data=r,e}return vm(n,t),n}(c),Sm=function(t){function n(n){var i=t.call(this,{projection:null})||this;i.on,i.once,i.un,i.Gh=null,i.Dh=void 0!==n.operationType?n.operationType:xm,i.qh=void 0!==n.threads?n.threads:1,i.Uh=function(t){for(var n=t.length,i=new Array(n),r=0;r<n;++r)i[r]=Em(t[r]);return i}(n.sources);for(var r,e=i.changed.bind(i),s=0,u=i.Uh.length;s<u;++s)i.Uh[s].addEventListener(L,e);return i.hr=new Ou((function(){return 1}),i.changed.bind(i)),i.Bh,i.Xh=null,i._h,i.Zi={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],declutterTree:null,extent:null,index:0,layerIndex:0,layerStatesArray:(r=i.Uh,r.map((function(t){return t.getLayerState()}))),pixelRatio:1,pixelToCoordinateTransform:[1,0,0,1,0,0],postRenderFunctions:[],size:[0,0],tileQueue:i.hr,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:o(i),renderTargets:{}},i.setAttributions((function(t){for(var i=[],r=0,e=n.sources.length;r<e;++r){var o=n.sources[r],s=(o instanceof zv?o:o.getSource()).getAttributions();if("function"==typeof s){var u=s(t);i.push.apply(i,u)}}return 0!==i.length?i:null})),void 0!==n.operation&&i.setOperation(n.operation,n.lib),i}return vm(n,t),n.prototype.setOperation=function(t,n){this.Gh&&this.Gh.dispose(),this.Gh=new wm({operation:t,imageOps:this.Dh===Mm,queue:1,lib:n,threads:this.qh}),this.changed()},n.prototype.Vh=function(t,n,i){var r=A({},this.Zi);r.viewState=A({},r.viewState);var e=qn(t);r.extent=t.slice(),r.size[0]=Math.round($n(t)/n),r.size[1]=Math.round(Vn(t)/n),r.time=Date.now();var o=r.viewState;return o.center=e,o.projection=i,o.resolution=n,r},n.prototype.Wh=function(){for(var t=!0,n=0,i=this.Uh.length;n<i;++n)if("ready"!==this.Uh[n].getSource().getState()){t=!1;break}return t},n.prototype.getImage=function(t,n,i,r){if(!this.Wh())return null;var e=this.Vh(t,n,r);if(this.Bh=e,this.Xh){var o=this.Xh.getResolution(),s=this.Xh.getExtent();n===o&&An(t,s)||(this.Xh=null)}return this.Xh&&this.getRevision()===this._h||this.Yh(),e.tileQueue.loadMoreTiles(16,16),e.animate&&requestAnimationFrame(this.changed.bind(this)),this.Xh},n.prototype.Yh=function(){for(var t=this.Bh,n=this.Uh.length,i=new Array(n),r=0;r<n;++r){t.layerIndex=r;var e=jm(this.Uh[r],t);if(!e)return;i[r]=e}var o={};this.dispatchEvent(new _m(gm,t,o)),this.Gh.process(i,o,this.Zh.bind(this,t))},n.prototype.Zh=function(t,n,i,r){if(!n&&i){var e=t.extent,o=t.viewState.resolution;if(o===this.Bh.viewState.resolution&&An(e,this.Bh.extent)){var s;if(this.Xh)s=this.Xh.getImage().getContext("2d");else s=_o(Math.round($n(e)/o),Math.round(Vn(e)/o)),this.Xh=new Mo(e,o,1,s.canvas);s.putImageData(i,0,0),this.changed(),this._h=this.getRevision(),this.dispatchEvent(new _m(bm,t,r)),t.animate&&requestAnimationFrame(this.changed.bind(this))}}},n.prototype.disposeInternal=function(){this.Gh&&this.Gh.dispose(),t.prototype.disposeInternal.call(this)},n}(gy);Sm.prototype.dispose;var Om=null;function jm(t,n){var i=t.getRenderer();if(!i)throw new Error("Unsupported layer type: "+t);if(!i.prepareFrame(n))return null;var r=n.size[0],e=n.size[1];if(0===r||0===e)return null;var o,s=i.renderFrame(n,null);if(s instanceof HTMLCanvasElement)o=s;else{if(s&&(o=s.firstElementChild),!(o instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+o);if(o.width===r&&o.height===e)return o.getContext("2d").getImageData(0,0,r,e)}if(Om){var u=Om.canvas;u.width!==r||u.height!==e?Om=_o(r,e):Om.clearRect(0,0,r,e)}else Om=_o(r,e);return Om.drawImage(o,0,0,r,e),Om.getImageData(0,0,r,e)}function Em(t){var n;return t instanceof zv?t instanceof Dv?n=new lm({source:t}):t instanceof gy&&(n=new em({source:t})):n=t,n}var Tm=Sm,Am=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Pm=['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>.',Wy],Cm={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}},km={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},Im=function(t){function n(n){var i=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(i=n.interpolate);var r=n.layer.indexOf("-"),e=-1==r?n.layer:n.layer.slice(0,r),o=km[e],s=Cm[n.layer],u=void 0!==n.url?n.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+n.layer+"/{z}/{x}/{y}."+s.extension;return t.call(this,{attributions:Pm,cacheSize:n.cacheSize,crossOrigin:"anonymous",interpolate:i,maxZoom:null!=n.maxZoom?n.maxZoom:o.maxZoom,minZoom:null!=n.minZoom?n.minZoom:o.minZoom,opaque:s.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:u,wrapX:n.wrapX,zDirection:n.zDirection})||this}return Am(n,t),n}(Kv),Nm=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Lm=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;return void 0!==r.interpolate&&(e=r.interpolate),(i=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).xh=r.params||{},i._a=void 0===r.hidpi||r.hidpi,i.Ao=[1/0,1/0,-1/0,-1/0],i.setKey(i.$h()),i}return Nm(n,t),n.prototype.$h=function(){var t=0,n=[];for(var i in this.xh)n[t++]=i+"-"+this.xh[i];return n.join("/")},n.prototype.getParams=function(){return this.xh},n.prototype.Oh=function(t,n,i,r,e,o){var s=this.urls;if(s){var u,a=e.getCode().split(/:(?=\d+$)/).pop();if(o.SIZE=n[0]+","+n[1],o.BBOX=i.join(","),o.BBOXSR=a,o.IMAGESR=a,o.DPI=Math.round(o.DPI?o.DPI*r:90*r),1==s.length)u=s[0];else u=s[vi(Ph(t),s.length)];return Nf(u.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},n.prototype.getTilePixelRatio=function(t){return this._a?t:1},n.prototype.updateParams=function(t){A(this.xh,t),this.setKey(this.$h())},n.prototype.tileUrlFunction=function(t,n,i){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=t[0])){1==n||this._a||(n=1);var e=r.getTileCoordExtent(t,this.Ao),o=Qu(r.getTileSize(t[0]),this.tmpSize);1!=n&&(o=Ju(o,n,this.tmpSize));var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return A(s,this.xh),this.Oh(t,o,e,n,i,s)}},n}(Vv),zm=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Rm=function(t){function n(n){var i=this,r=n||{};return i=t.call(this,{opaque:!1,projection:r.projection,tileGrid:r.tileGrid,wrapX:void 0===r.wrapX||r.wrapX,zDirection:r.zDirection,url:r.template||"z:{z} x:{x} y:{y}",tileLoadFunction:function(t,n){var r=t.getTileCoord()[0],e=Qu(i.tileGrid.getTileSize(r)),o=_o(e[0],e[1]);o.strokeStyle="grey",o.strokeRect(.5,.5,e[0]+.5,e[1]+.5),o.fillStyle="grey",o.strokeStyle="white",o.textAlign="center",o.textBaseline="middle",o.font="24px sans-serif",o.lineWidth=4,o.strokeText(n,e[0]/2,e[1]/2,e[0]),o.fillText(n,e[0]/2,e[1]/2,e[0]),t.setImage(o.canvas)}})||this}return zm(n,t),n}(Kv),Fm=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Gm=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;if(void 0!==n.interpolate&&(r=n.interpolate),(i=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:yr("EPSG:3857"),reprojectionErrorThreshold:n.reprojectionErrorThreshold,state:"loading",tileLoadFunction:n.tileLoadFunction,wrapX:void 0===n.wrapX||n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).Kh=null,i.jo=n.tileSize,n.url)if(n.jsonp)Zh(n.url,i.handleTileJSONResponse.bind(i),i.handleTileJSONError.bind(i));else{var e=new XMLHttpRequest;e.addEventListener("load",i.Hh.bind(i)),e.addEventListener("error",i.Jh.bind(i)),e.open("GET",n.url),e.send()}else n.tileJSON?i.handleTileJSONResponse(n.tileJSON):St(!1,51);return i}return Fm(n,t),n.prototype.Hh=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},n.prototype.Jh=function(t){this.handleTileJSONError()},n.prototype.getTileJSON=function(){return this.Kh},n.prototype.handleTileJSONResponse=function(t){var n,i=yr("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var e=Or(i,r);n=ni(t.bounds,e)}var o=Tf(r),s=t.minzoom||0,u=Of({extent:o,maxZoom:t.maxzoom||22,minZoom:s,tileSize:this.jo});if(this.tileGrid=u,this.tileUrlFunction=Pf(t.tiles,u),void 0!==t.attribution&&!this.getAttributions()){var a=void 0!==n?n:o;this.setAttributions((function(n){return Kn(a,n.extent)?[t.attribution]:null}))}this.Kh=t,this.setState("ready")},n.prototype.handleTileJSONError=function(){this.setState("error")},n}(Vv),Dm=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qm=function(t){function n(n){var i=this,r=n||{},e=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(e=r.interpolate);var o=r.params||{},s=!("TRANSPARENT"in o)||o.TRANSPARENT;return(i=t.call(this,{attributions:r.attributions,attributionsCollapsible:r.attributionsCollapsible,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:e,opaque:!s,projection:r.projection,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileClass:r.tileClass,tileGrid:r.tileGrid,tileLoadFunction:r.tileLoadFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,zDirection:r.zDirection})||this).js=void 0!==r.gutter?r.gutter:0,i.xh=o,i.Ph=!0,i.kh=r.serverType,i._a=void 0===r.hidpi||r.hidpi,i.Ao=[1/0,1/0,-1/0,-1/0],i.Ch(),i.setKey(i.$h()),i}return Dm(n,t),n.prototype.getFeatureInfoUrl=function(t,n,i,r){var e=yr(i),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(e));var u=s.getZForResolution(n,this.zDirection),a=s.getTileCoordForCoordAndZ(t,u);if(!(s.getResolutions().length<=a[0])){var h=s.getResolution(a[0]),f=s.getTileCoordExtent(a,this.Ao),c=Qu(s.getTileSize(a[0]),this.tmpSize),l=this.js;0!==l&&(c=Ku(c,l,this.tmpSize),f=mn(f,h*l,f)),o&&o!==e&&(h=mf(o,e,t,h),f=Tr(f,e,o),t=Er(t,e,o));var v={SERVICE:"WMS",VERSION:Ty,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.xh.LAYERS};A(v,this.xh,r);var d=Math.floor((t[0]-f[0])/h),p=Math.floor((f[3]-t[1])/h);return v[this.Ph?"I":"X"]=d,v[this.Ph?"J":"Y"]=p,this.Oh(a,c,f,1,o||e,v)}},n.prototype.getLegendUrl=function(t,n){if(void 0!==this.urls[0]){var i={SERVICE:"WMS",VERSION:Ty,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===n||void 0===n.LAYER){var r=this.xh.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;i.LAYER=r}if(void 0!==t){var e=this.getProjection()?this.getProjection().getMetersPerUnit():1;i.SCALE=t*e/28e-5}return A(i,n),Nf(this.urls[0],i)}},n.prototype.getGutter=function(){return this.js},n.prototype.getParams=function(){return this.xh},n.prototype.Oh=function(t,n,i,r,e,o){var s=this.urls;if(s){if(o.WIDTH=n[0],o.HEIGHT=n[1],o[this.Ph?"CRS":"SRS"]=e.getCode(),"STYLES"in this.xh||(o.STYLES=""),1!=r)switch(this.kh){case"geoserver":var u=90*r+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+u:o.FORMAT_OPTIONS="dpi:"+u;break;case"mapserver":o.MAP_RESOLUTION=90*r;break;case"carmentaserver":case"qgis":o.DPI=90*r;break;default:St(!1,52)}var a,h=e.getAxisOrientation(),f=i;if(this.Ph&&"ne"==h.substr(0,2)){var c=void 0;c=i[0],f[0]=i[1],f[1]=c,c=i[2],f[2]=i[3],f[3]=c}if(o.BBOX=f.join(","),1==s.length)a=s[0];else a=s[vi(Ph(t),s.length)];return Nf(a,o)}},n.prototype.getTilePixelRatio=function(t){return this._a&&void 0!==this.kh?t:1},n.prototype.$h=function(){var t=0,n=[];for(var i in this.xh)n[t++]=i+"-"+this.xh[i];return n.join("/")},n.prototype.updateParams=function(t){A(this.xh,t),this.Ch(),this.setKey(this.$h())},n.prototype.Ch=function(){var t=this.xh.VERSION||Ty;this.Ph=Xi(t,"1.3")>=0},n.prototype.tileUrlFunction=function(t,n,i){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=t[0])){1==n||this._a&&void 0!==this.kh||(n=1);var e=r.getResolution(t[0]),o=r.getTileCoordExtent(t,this.Ao),s=Qu(r.getTileSize(t[0]),this.tmpSize),u=this.js;0!==u&&(s=Ku(s,u,this.tmpSize),o=mn(o,e*u,o)),1!=n&&(s=Ju(s,n,this.tmpSize));var a={SERVICE:"WMS",VERSION:Ty,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return A(a,this.xh),this.Oh(t,s,o,n,i,a)}},n}(Vv),Um=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Bm=function(t){function n(n,i,r,e,o,s){var u=t.call(this,n,i)||this;return u.Nt=r,u.st=e,u.Qh=o,u.tf=null,u.nf=null,u.B=null,u.if=s,u}return Um(n,t),n.prototype.getImage=function(){return null},n.prototype.getData=function(t){if(!this.tf||!this.nf)return null;var n=(t[0]-this.st[0])/(this.st[2]-this.st[0]),i=(t[1]-this.st[1])/(this.st[3]-this.st[1]),r=this.tf[Math.floor((1-i)*this.tf.length)];if("string"!=typeof r)return null;var e=r.charCodeAt(Math.floor(n*r.length));e>=93&&e--,e>=35&&e--;var o=null;if((e-=32)in this.nf){var s=this.nf[e];o=this.B&&s in this.B?this.B[s]:s}return o},n.prototype.forDataAtCoordinate=function(t,n,i){this.state==pt&&!0===i?(this.state=ct,K(this,L,(function(i){n(this.getData(t))}),this),this.rf()):!0===i?setTimeout(function(){n(this.getData(t))}.bind(this),0):n(this.getData(t))},n.prototype.getKey=function(){return this.Nt},n.prototype.Nh=function(){this.state=dt,this.changed()},n.prototype.Ut=function(t){this.tf=t.grid,this.nf=t.keys,this.B=t.data,this.state=vt,this.changed()},n.prototype.rf=function(){if(this.state==ct)if(this.state=lt,this.if)Zh(this.Nt,this.Ut.bind(this),this.Nh.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.Hh.bind(this)),t.addEventListener("error",this.Jh.bind(this)),t.open("GET",this.Nt),t.send()}},n.prototype.Hh=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch(t){return void this.Nh()}this.Ut(i)}else this.Nh()},n.prototype.Jh=function(t){this.Nh()},n.prototype.load=function(){this.Qh?this.rf():this.setState(pt)},n}(xt),Xm=function(t){function n(n){var i=t.call(this,{projection:yr("EPSG:3857"),state:"loading",zDirection:n.zDirection})||this;if(i.Qh=void 0===n.preemptive||n.preemptive,i.ef=kf,i.uf=void 0,i.if=n.jsonp||!1,n.url)if(i.if)Zh(n.url,i.handleTileJSONResponse.bind(i),i.handleTileJSONError.bind(i));else{var r=new XMLHttpRequest;r.addEventListener("load",i.Hh.bind(i)),r.addEventListener("error",i.Jh.bind(i)),r.open("GET",n.url),r.send()}else n.tileJSON?i.handleTileJSONResponse(n.tileJSON):St(!1,51);return i}return Um(n,t),n.prototype.Hh=function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var i=void 0;try{i=JSON.parse(n.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},n.prototype.Jh=function(t){this.handleTileJSONError()},n.prototype.getTemplate=function(){return this.uf},n.prototype.forDataAtCoordinateAndResolution=function(t,n,i,r){if(this.tileGrid){var e=this.tileGrid.getZForResolution(n,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,e);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,i,r)}else!0===r?setTimeout((function(){i(null)}),0):i(null)},n.prototype.handleTileJSONError=function(){this.setState("error")},n.prototype.handleTileJSONResponse=function(t){var n,i=yr("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var e=Or(i,r);n=ni(t.bounds,e)}var o=Tf(r),s=t.minzoom||0,u=Of({extent:o,maxZoom:t.maxzoom||22,minZoom:s});this.tileGrid=u,this.uf=t.template;var a=t.grids;if(a){if(this.ef=Pf(a,u),void 0!==t.attribution){var h=void 0!==n?n:o;this.setAttributions((function(n){return Kn(h,n.extent)?[t.attribution]:null}))}this.setState("ready")}else this.setState("error")},n.prototype.getTile=function(t,n,i,r,e){var o=jh(t,n,i);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=[t,n,i],u=this.getTileCoordForTileUrlFunction(s,e),a=this.ef(u,r,e),h=new Bm(s,void 0!==a?ct:pt,void 0!==a?a:"",this.tileGrid.getTileCoordExtent(s),this.Qh,this.if);return this.tileCache.set(o,h),h},n.prototype.useTile=function(t,n,i){var r=jh(t,n,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},n}(Dv),Vm=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Wm=function(t){function n(n){var i=this,r=void 0===n.imageSmoothing||n.imageSmoothing;void 0!==n.interpolate&&(r=n.interpolate);var e=void 0!==n.requestEncoding?n.requestEncoding:"KVP",o=n.tileGrid,s=n.urls;return void 0===s&&void 0!==n.url&&(s=If(n.url)),(i=t.call(this,{attributions:n.attributions,attributionsCollapsible:n.attributionsCollapsible,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:r,projection:n.projection,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileClass:n.tileClass,tileGrid:o,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,urls:s,wrapX:void 0!==n.wrapX&&n.wrapX,transition:n.transition,zDirection:n.zDirection})||this).af=void 0!==n.version?n.version:"1.0.0",i.ze=void 0!==n.format?n.format:"image/jpeg",i.hf=void 0!==n.dimensions?n.dimensions:{},i.Ds=n.layer,i.ff=n.matrixSet,i.H=n.style,i.cf=e,i.setKey(i.lf()),s&&s.length>0&&(i.tileUrlFunction=Cf(s.map(i.createFromWMTSTemplate.bind(i)))),i}return Vm(n,t),n.prototype.setUrls=function(t){this.urls=t;var n=t.join("\n");this.setTileUrlFunction(Cf(t.map(this.createFromWMTSTemplate.bind(this))),n)},n.prototype.getDimensions=function(){return this.hf},n.prototype.getFormat=function(){return this.ze},n.prototype.getLayer=function(){return this.Ds},n.prototype.getMatrixSet=function(){return this.ff},n.prototype.getRequestEncoding=function(){return this.cf},n.prototype.getStyle=function(){return this.H},n.prototype.getVersion=function(){return this.af},n.prototype.lf=function(){var t=0,n=[];for(var i in this.hf)n[t++]=i+"-"+this.hf[i];return n.join("/")},n.prototype.updateDimensions=function(t){A(this.hf,t),this.setKey(this.lf())},n.prototype.createFromWMTSTemplate=function(t){var n=this.cf,i={layer:this.Ds,style:this.H,tilematrixset:this.ff};"KVP"==n&&A(i,{Service:"WMTS",Request:"GetTile",Version:this.af,Format:this.ze}),t="KVP"==n?Nf(t,i):t.replace(/\{(\w+?)\}/g,(function(t,n){return n.toLowerCase()in i?i[n.toLowerCase()]:t}));var r=this.tileGrid,e=this.hf;return function(i,o,s){if(i){var u={TileMatrix:r.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};A(u,e);var a=t;return a="KVP"==n?Nf(a,u):a.replace(/\{(\w+?)\}/g,(function(t,n){return u[n]}))}}},n}(Vv);var Ym=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Zm="renderOrder",$m=function(t){function n(n){var i=this,r=n||{},e=A({},r);return delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,(i=t.call(this,e)||this).vf=void 0!==r.declutter&&r.declutter,i.df=void 0!==r.renderBuffer?r.renderBuffer:100,i.H=null,i.tt=void 0,i.setStyle(r.style),i.pf=void 0!==r.updateWhileAnimating&&r.updateWhileAnimating,i.yf=void 0!==r.updateWhileInteracting&&r.updateWhileInteracting,i}return Ym(n,t),n.prototype.getDeclutter=function(){return this.vf},n.prototype.getFeatures=function(n){return t.prototype.getFeatures.call(this,n)},n.prototype.getRenderBuffer=function(){return this.df},n.prototype.getRenderOrder=function(){return this.get(Zm)},n.prototype.getStyle=function(){return this.H},n.prototype.getStyleFunction=function(){return this.tt},n.prototype.getUpdateWhileAnimating=function(){return this.pf},n.prototype.getUpdateWhileInteracting=function(){return this.yf},n.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new Av(9)),this.getRenderer().renderDeclutter(t)},n.prototype.setRenderOrder=function(t){this.set(Zm,t)},n.prototype.setStyle=function(t){this.H=void 0!==t?t:xv,this.tt=null===t?void 0:gv(this.H),this.changed()},n}(ls);var Km=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Hm=function(t){function n(n,i){var r=this,e=i.uniforms||{},s=[1,0,0,1,0,0];e[Sc]=s,(r=t.call(this,n,{uniforms:e,postProcesses:i.postProcesses})||this).ready=!1,r.mf=-1,r.wf=new mc(zf,Gf),r.gf=new mc(zf,Gf),r.bf=new mc(Rf,Gf),r.Hs=i.vertexShader,r.Js=i.fragmentShader,r.Ks,r.xf=!(!i.hitFragmentShader||!i.hitVertexShader),r.Mf=i.hitVertexShader,r._f=i.hitFragmentShader,r.Sf;var u=i.attributes?i.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:Pc.FLOAT}})):[];r.attributes=[{name:"a_position",size:2,type:Pc.FLOAT},{name:"a_index",size:1,type:Pc.FLOAT}].concat(u),r.hitDetectionAttributes=[{name:"a_position",size:2,type:Pc.FLOAT},{name:"a_index",size:1,type:Pc.FLOAT},{name:"a_hitColor",size:4,type:Pc.FLOAT},{name:"a_featureUid",size:1,type:Pc.FLOAT}].concat(u),r.customAttributes=i.attributes?i.attributes:[],r.$i=[1/0,1/0,-1/0,-1/0],r.Of=s,r.jf=[1,0,0,1,0,0],r.Ef=[1,0,0,1,0,0],r.Tf=new Float32Array(0),r.Af=new Float32Array(0),r.Pf,r.Cf=0,r.kf=function(){var t='const e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const t=Object(e);for(let e=1,n=arguments.length;e<n;++e){const n=arguments[e];if(null!=n)for(const e in n)n.hasOwnProperty(e)&&(t[e]=n[e])}return t},n="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"";n.indexOf("firefox");-1!==n.indexOf("safari")&&-1==n.indexOf("chrom")&&(n.indexOf("version/15.4")>=0||n.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==n.indexOf("webkit")&&n.indexOf("edge"),n.indexOf("macintosh"),"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&(self,WorkerGlobalScope),function(){let e=!1;try{const n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("_",null,n),window.removeEventListener("_",null,n)}catch(e){}}(),new Array(6);const t="GENERATE_BUFFERS",o=[],r={vertexPosition:0,indexPosition:0};function i(e,n,t,o,r){e[n+0]=t,e[n+1]=o,e[n+2]=r}function s(e,n,t,s,f,c){const l=3+f,a=e[n+0],u=e[n+1],d=o;d.length=f;for(let t=0;t<d.length;t++)d[t]=e[n+2+t];let g=c?c.vertexPosition:0,x=c?c.indexPosition:0;const h=g/l;return i(t,g,a,u,0),d.length&&t.set(d,g+3),g+=l,i(t,g,a,u,1),d.length&&t.set(d,g+3),g+=l,i(t,g,a,u,2),d.length&&t.set(d,g+3),g+=l,i(t,g,a,u,3),d.length&&t.set(d,g+3),g+=l,s[x++]=h,s[x++]=h+1,s[x++]=h+3,s[x++]=h+1,s[x++]=h+2,s[x++]=h+3,r.vertexPosition=g,r.indexPosition=x,r}const f=self;f.onmessage=n=>{const o=n.data;if(o.type===t){const n=3,t=2,r=o.customAttributesCount,i=t+r,c=new Float32Array(o.renderInstructions),l=c.length/i,a=4*l*(r+n),u=new Uint32Array(6*l),d=new Float32Array(a);let g;for(let e=0;e<c.length;e+=i)g=s(c,e,d,u,r,g);const x=e({vertexBuffer:d.buffer,indexBuffer:u.buffer,renderInstructions:c.buffer},o);f.postMessage(x,[d.buffer,u.buffer,c.buffer])}};';return new Worker("undefined"==typeof Blob?"data:application/javascript;base64,"+Buffer.from(t,"binary").toString("base64"):URL.createObjectURL(new Blob([t],{type:"application/javascript"})))}(),r.kf.addEventListener("message",function(t){var n=t.data;if(n.type===Jc){var i=n.projectionTransform;n.hitDetection?(this.gf.fromArrayBuffer(n.vertexBuffer),this.helper.flushBufferData(this.gf)):(this.wf.fromArrayBuffer(n.vertexBuffer),this.helper.flushBufferData(this.wf)),this.bf.fromArrayBuffer(n.indexBuffer),this.helper.flushBufferData(this.bf),this.jf=i,un(this.Ef,this.jf),n.hitDetection?this.Af=new Float32Array(t.data.renderInstructions):(this.Tf=new Float32Array(t.data.renderInstructions),n.generateBuffersRun===this.Cf&&(this.ready=!0)),this.getLayer().changed()}}.bind(r)),r.If={},r.Nf=0;var a=r.getLayer().getSource();return r.Lf=[$(a,Qv,r.zf,r),$(a,td,r.Rf,r),$(a,id,r.Ff,r),$(a,nd,r.Gf,r)],a.forEachFeature(function(t){this.If[o(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.Nf++}.bind(r)),r}return Km(n,t),n.prototype.afterHelperCreated=function(){this.Ks=this.helper.getProgram(this.Js,this.Hs),this.xf&&(this.Sf=this.helper.getProgram(this._f,this.Mf),this.Pf=new Gc(this.helper))},n.prototype.zf=function(t){var n=t.feature;this.If[o(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()},this.Nf++},n.prototype.Rf=function(t){var n=t.feature;this.If[o(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()}},n.prototype.Ff=function(t){var n=t.feature;delete this.If[o(n)],this.Nf--},n.prototype.Gf=function(){this.If={},this.Nf=0},n.prototype.renderFrame=function(t){var n=this.helper.getGL();this.preRender(n,t);var i=t.viewState.projection,r=this.getLayer().getSource().getWrapX()&&i.canWrapX(),e=i.getExtent(),o=t.extent,s=r?$n(e):null,u=r?Math.ceil((o[2]-e[2])/s)+1:1,a=r?Math.floor((o[0]-e[0])/s):0,h=a,f=this.bf.getSize();do{this.helper.makeProjectionTransform(t,this.Of),on(this.Of,h*s,0),Ht(this.Of,this.Ef),this.helper.applyUniforms(t),this.helper.drawElements(0,f)}while(++h<u);this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);var c=this.helper.getCanvas();return this.xf&&(this.renderHitDetection(t,a,u,s),this.Pf.clearCachedData()),this.postRender(n,t),c},n.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),i=n.getSource(),r=t.viewState,e=!t.viewHints[Eu]&&!t.viewHints[Tu],o=!An(this.$i,t.extent),s=this.mf<i.getRevision();if(s&&(this.mf=i.getRevision()),e&&(o||s)){var u=r.projection,a=r.resolution,h=n instanceof $m?n.getRenderBuffer():0,f=mn(t.extent,h*a);i.loadFeatures(f,a,u),this.Df(t),this.$i=t.extent.slice()}return this.helper.useProgram(this.Ks),this.helper.prepareDraw(t),this.helper.bindBuffer(this.wf),this.helper.bindBuffer(this.bf),this.helper.enableAttributes(this.attributes),!0},n.prototype.Df=function(t){var n=[1,0,0,1,0,0];this.helper.makeProjectionTransform(t,n);var i,r,e=(2+this.customAttributes.length)*this.Nf;if(this.Tf&&this.Tf.length===e||(this.Tf=new Float32Array(e)),this.xf){var o=(7+this.customAttributes.length)*this.Nf;this.Af&&this.Af.length===o||(this.Af=new Float32Array(o))}var s,u=[],a=[],h=0,f=0;for(var c in this.If)if((r=(i=this.If[c]).geometry)&&"Point"===r.getType()){u[0]=r.getFlatCoordinates()[0],u[1]=r.getFlatCoordinates()[1],tn(n,u),s=rl(f+6,a),this.Tf[h++]=u[0],this.Tf[h++]=u[1],this.xf&&(this.Af[f++]=u[0],this.Af[f++]=u[1],this.Af[f++]=s[0],this.Af[f++]=s[1],this.Af[f++]=s[2],this.Af[f++]=s[3],this.Af[f++]=Number(c));for(var l=void 0,v=0;v<this.customAttributes.length;v++)l=this.customAttributes[v].callback(i.feature,i.properties),this.Tf[h++]=l,this.xf&&(this.Af[f++]=l)}var d={type:Jc,renderInstructions:this.Tf.buffer,customAttributesCount:this.customAttributes.length};if(d.projectionTransform=n,d.generateBuffersRun=++this.Cf,this.ready=!1,this.kf.postMessage(d,[this.Tf.buffer]),this.Tf=null,this.xf){var p={type:Jc,renderInstructions:this.Af.buffer,customAttributesCount:5+this.customAttributes.length};p.projectionTransform=n,p.hitDetection=!0,this.kf.postMessage(p,[this.Af.buffer]),this.Af=null}},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e){if(St(this.xf,66),this.Af){var o=tn(n.coordinateToPixelTransform,t.slice()),s=this.Pf.readPixel(o[0]/2,o[1]/2),u=el([s[0]/255,s[1]/255,s[2]/255,s[3]/255]),a=this.Af[u],h=Math.floor(a).toString(),f=this.getLayer().getSource().getFeatureByUid(h);return f?r(f,this.getLayer(),null):void 0}},n.prototype.renderHitDetection=function(t,n,i,r){if(this.gf.getSize()){var e=n;this.Pf.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.Sf),this.helper.prepareDrawToRenderTarget(t,this.Pf,!0),this.helper.bindBuffer(this.gf),this.helper.bindBuffer(this.bf),this.helper.enableAttributes(this.hitDetectionAttributes);do{this.helper.makeProjectionTransform(t,this.Of),on(this.Of,e*r,0),Ht(this.Of,this.Ef),this.helper.applyUniforms(t);var o=this.bf.getSize();this.helper.drawElements(0,o)}while(++e<i)}},n.prototype.disposeInternal=function(){this.kf.terminate(),this.Ds=null,this.Lf.forEach((function(t){H(t)})),this.Lf=null,t.prototype.disposeInternal.call(this)},n}(ol),Jm={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},Qm=[Jm.FILL],tw=[Jm.STROKE],nw=[Jm.BEGIN_PATH],iw=[Jm.CLOSE_PATH],rw=Jm,ew=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ow=function(t){function n(n,i,r,e){var o=t.call(this)||this;return o.tolerance=n,o.maxExtent=i,o.pixelRatio=e,o.maxLineWidth=0,o.resolution=r,o.qf=null,o.Uf=null,o.Bf=null,o.instructions=[],o.coordinates=[],o.Xf=[],o.hitDetectionInstructions=[],o.state={},o}return ew(n,t),n.prototype.applyPixelRatio=function(t){var n=this.pixelRatio;return 1==n?t:t.map((function(t){return t*n}))},n.prototype.appendFlatPointCoordinates=function(t,n){for(var i=this.getBufferedMaxExtent(),r=this.Xf,e=this.coordinates,o=e.length,s=0,u=t.length;s<u;s+=n)r[0]=t[s],r[1]=t[s+1],bn(i,r)&&(e[o++]=r[0],e[o++]=r[1]);return o},n.prototype.appendFlatLineCoordinates=function(t,n,i,r,e,o){var s=this.coordinates,u=s.length,a=this.getBufferedMaxExtent();o&&(n+=r);var h,f,c,l=t[n],v=t[n+1],d=this.Xf,p=!0;for(h=n+r;h<i;h+=r)d[0]=t[h],d[1]=t[h+1],(c=_n(a,d))!==f?(p&&(s[u++]=l,s[u++]=v,p=!1),s[u++]=d[0],s[u++]=d[1]):c===cn?(s[u++]=d[0],s[u++]=d[1],p=!1):p=!0,l=d[0],v=d[1],f=c;return(e&&p||h===n+r)&&(s[u++]=l,s[u++]=v),u},n.prototype.Vf=function(t,n,i,r,e){for(var o=0,s=i.length;o<s;++o){var u=i[o],a=this.appendFlatLineCoordinates(t,n,u,r,!1,!1);e.push(a),n=u}return n},n.prototype.drawCustom=function(t,n,i,r){this.beginGeometry(t,n);var e,o,s,u,a,h=t.getType(),f=t.getStride(),c=this.coordinates.length;switch(h){case"MultiPolygon":e=t.getOrientedFlatCoordinates(),u=[];var l=t.getEndss();a=0;for(var v=0,d=l.length;v<d;++v){var p=[];a=this.Vf(e,a,l[v],f,p),u.push(p)}this.instructions.push([rw.CUSTOM,c,u,t,i,me]),this.hitDetectionInstructions.push([rw.CUSTOM,c,u,t,r||i,me]);break;case"Polygon":case"MultiLineString":s=[],e="Polygon"==h?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),a=this.Vf(e,0,t.getEnds(),f,s),this.instructions.push([rw.CUSTOM,c,s,t,i,ye]),this.hitDetectionInstructions.push([rw.CUSTOM,c,s,t,r||i,ye]);break;case"LineString":case"Circle":e=t.getFlatCoordinates(),o=this.appendFlatLineCoordinates(e,0,e.length,f,!1,!1),this.instructions.push([rw.CUSTOM,c,o,t,i,pe]),this.hitDetectionInstructions.push([rw.CUSTOM,c,o,t,r||i,pe]);break;case"MultiPoint":e=t.getFlatCoordinates(),(o=this.appendFlatPointCoordinates(e,f))>c&&(this.instructions.push([rw.CUSTOM,c,o,t,i,pe]),this.hitDetectionInstructions.push([rw.CUSTOM,c,o,t,r||i,pe]));break;case"Point":e=t.getFlatCoordinates(),this.coordinates.push(e[0],e[1]),o=this.coordinates.length,this.instructions.push([rw.CUSTOM,c,o,t,i]),this.hitDetectionInstructions.push([rw.CUSTOM,c,o,t,r||i])}this.endGeometry(n)},n.prototype.beginGeometry=function(t,n){this.qf=[rw.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.qf),this.Uf=[rw.BEGIN_GEOMETRY,n,0,t],this.hitDetectionInstructions.push(this.Uf)},n.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},n.prototype.reverseHitDetectionInstructions=function(){var t,n=this.hitDetectionInstructions;n.reverse();var i,r,e=n.length,o=-1;for(t=0;t<e;++t)(r=(i=n[t])[0])==rw.END_GEOMETRY?o=t:r==rw.BEGIN_GEOMETRY&&(i[2]=t,w(this.hitDetectionInstructions,o,t),o=-1)},n.prototype.setFillStrokeStyle=function(t,n){var i=this.state;if(t){var r=t.getColor();i.fillStyle=Uh(r||Ts)}else i.fillStyle=void 0;if(n){var e=n.getColor();i.strokeStyle=Uh(e||Is);var o=n.getLineCap();i.lineCap=void 0!==o?o:As;var s=n.getLineDash();i.lineDash=s?s.slice():Ps;var u=n.getLineDashOffset();i.lineDashOffset=u||0;var a=n.getLineJoin();i.lineJoin=void 0!==a?a:Cs;var h=n.getWidth();i.lineWidth=void 0!==h?h:1;var f=n.getMiterLimit();i.miterLimit=void 0!==f?f:ks,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.Bf=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},n.prototype.createFill=function(t){var n=t.fillStyle,i=[rw.SET_FILL_STYLE,n];return"string"!=typeof n&&i.push(!0),i},n.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},n.prototype.createStroke=function(t){return[rw.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},n.prototype.updateFillStyle=function(t,n){var i=t.fillStyle;"string"==typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(n.call(this,t)),t.currentFillStyle=i)},n.prototype.updateStrokeStyle=function(t,n){var i=t.strokeStyle,r=t.lineCap,e=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,u=t.lineWidth,a=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=r||e!=t.currentLineDash&&!x(t.currentLineDash,e)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=u||t.currentMiterLimit!=a)&&(void 0!==i&&n.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=r,t.currentLineDash=e,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=u,t.currentMiterLimit=a)},n.prototype.endGeometry=function(t){this.qf[2]=this.instructions.length,this.qf=null,this.Uf[2]=this.hitDetectionInstructions.length,this.Uf=null;var n=[rw.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},n.prototype.getBufferedMaxExtent=function(){if(!this.Bf&&(this.Bf=wn(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;mn(this.Bf,t,this.Bf)}return this.Bf},n}(tf),sw=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uw=function(t){function n(n,i,r,e){var o=t.call(this,n,i,r,e)||this;return o._u=null,o.Lt=null,o.Wf=void 0,o.Yf=void 0,o.Zf=void 0,o.$f=void 0,o.ou=void 0,o.Kf=void 0,o.Hf=void 0,o.su=void 0,o.Dr=void 0,o.uu=void 0,o.Uu=void 0,o.fu=void 0,o.Jf=void 0,o}return sw(n,t),n.prototype.drawPoint=function(t,n){if(this.Lt){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),r=t.getStride(),e=this.coordinates.length,o=this.appendFlatPointCoordinates(i,r);this.instructions.push([rw.DRAW_IMAGE,e,o,this.Lt,this.Yf*this.Wf,this.Zf*this.Wf,Math.ceil(this.$f*this.Wf),this.ou,this.Kf*this.Wf,this.Hf*this.Wf,this.su,this.Dr,[this.uu[0]*this.pixelRatio/this.Wf,this.uu[1]*this.pixelRatio/this.Wf],Math.ceil(this.Uu*this.Wf),this.fu,this.Jf]),this.hitDetectionInstructions.push([rw.DRAW_IMAGE,e,o,this._u,this.Yf,this.Zf,this.$f,this.ou,this.Kf,this.Hf,this.su,this.Dr,this.uu,this.Uu,this.fu,this.Jf]),this.endGeometry(n)}},n.prototype.drawMultiPoint=function(t,n){if(this.Lt){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),r=t.getStride(),e=this.coordinates.length,o=this.appendFlatPointCoordinates(i,r);this.instructions.push([rw.DRAW_IMAGE,e,o,this.Lt,this.Yf*this.Wf,this.Zf*this.Wf,Math.ceil(this.$f*this.Wf),this.ou,this.Kf*this.Wf,this.Hf*this.Wf,this.su,this.Dr,[this.uu[0]*this.pixelRatio/this.Wf,this.uu[1]*this.pixelRatio/this.Wf],Math.ceil(this.Uu*this.Wf),this.fu,this.Jf]),this.hitDetectionInstructions.push([rw.DRAW_IMAGE,e,o,this._u,this.Yf,this.Zf,this.$f,this.ou,this.Kf,this.Hf,this.su,this.Dr,this.uu,this.Uu,this.fu,this.Jf]),this.endGeometry(n)}},n.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.Yf=void 0,this.Zf=void 0,this._u=null,this.Lt=null,this.Wf=void 0,this.$f=void 0,this.uu=void 0,this.ou=void 0,this.Kf=void 0,this.Hf=void 0,this.su=void 0,this.Dr=void 0,this.Uu=void 0,t.prototype.finish.call(this)},n.prototype.setImageStyle=function(t,n){var i=t.getAnchor(),r=t.getSize(),e=t.getOrigin();this.Wf=t.getPixelRatio(this.pixelRatio),this.Yf=i[0],this.Zf=i[1],this._u=t.getHitDetectionImage(),this.Lt=t.getImage(this.pixelRatio),this.$f=r[1],this.ou=t.getOpacity(),this.Kf=e[0],this.Hf=e[1],this.su=t.getRotateWithView(),this.Dr=t.getRotation(),this.uu=t.getScaleArray(),this.Uu=r[0],this.fu=t.getDeclutterMode(),this.Jf=n},n}(ow),aw=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),hw=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e)||this}return aw(n,t),n.prototype.Qf=function(t,n,i,r){var e=this.coordinates.length,o=this.appendFlatLineCoordinates(t,n,i,r,!1,!1),s=[rw.MOVE_TO_LINE_TO,e,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},n.prototype.drawLineString=function(t,n){var i=this.state,r=i.strokeStyle,e=i.lineWidth;if(void 0!==r&&void 0!==e){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([rw.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Ps,0],nw);var o=t.getFlatCoordinates(),s=t.getStride();this.Qf(o,0,o.length,s),this.hitDetectionInstructions.push(tw),this.endGeometry(n)}},n.prototype.drawMultiLineString=function(t,n){var i=this.state,r=i.strokeStyle,e=i.lineWidth;if(void 0!==r&&void 0!==e){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([rw.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],nw);for(var o=t.getEnds(),s=t.getFlatCoordinates(),u=t.getStride(),a=0,h=0,f=o.length;h<f;++h)a=this.Qf(s,a,o[h],u);this.hitDetectionInstructions.push(tw),this.endGeometry(n)}},n.prototype.finish=function(){var n=this.state;return null!=n.lastStroke&&n.lastStroke!=this.coordinates.length&&this.instructions.push(tw),this.reverseHitDetectionInstructions(),this.state=null,t.prototype.finish.call(this)},n.prototype.applyStroke=function(n){null!=n.lastStroke&&n.lastStroke!=this.coordinates.length&&(this.instructions.push(tw),n.lastStroke=this.coordinates.length),n.lastStroke=0,t.prototype.applyStroke.call(this,n),this.instructions.push(nw)},n}(ow),fw=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),cw=function(t){function n(n,i,r,e){return t.call(this,n,i,r,e)||this}return fw(n,t),n.prototype.tc=function(t,n,i,r){var e=this.state,o=void 0!==e.fillStyle,s=void 0!==e.strokeStyle,u=i.length;this.instructions.push(nw),this.hitDetectionInstructions.push(nw);for(var a=0;a<u;++a){var h=i[a],f=this.coordinates.length,c=this.appendFlatLineCoordinates(t,n,h,r,!0,!s),l=[rw.MOVE_TO_LINE_TO,f,c];this.instructions.push(l),this.hitDetectionInstructions.push(l),s&&(this.instructions.push(iw),this.hitDetectionInstructions.push(iw)),n=h}return o&&(this.instructions.push(Qm),this.hitDetectionInstructions.push(Qm)),s&&(this.instructions.push(tw),this.hitDetectionInstructions.push(tw)),n},n.prototype.drawCircle=function(t,n){var i=this.state,r=i.fillStyle,e=i.strokeStyle;if(void 0!==r||void 0!==e){this.ic(),this.beginGeometry(t,n),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([rw.SET_FILL_STYLE,Ts]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([rw.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),u=this.coordinates.length;this.appendFlatLineCoordinates(o,0,o.length,s,!1,!1);var a=[rw.CIRCLE,u];this.instructions.push(nw,a),this.hitDetectionInstructions.push(nw,a),void 0!==i.fillStyle&&(this.instructions.push(Qm),this.hitDetectionInstructions.push(Qm)),void 0!==i.strokeStyle&&(this.instructions.push(tw),this.hitDetectionInstructions.push(tw)),this.endGeometry(n)}},n.prototype.drawPolygon=function(t,n){var i=this.state,r=i.fillStyle,e=i.strokeStyle;if(void 0!==r||void 0!==e){this.ic(),this.beginGeometry(t,n),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([rw.SET_FILL_STYLE,Ts]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([rw.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),u=t.getStride();this.tc(s,0,o,u),this.endGeometry(n)}},n.prototype.drawMultiPolygon=function(t,n){var i=this.state,r=i.fillStyle,e=i.strokeStyle;if(void 0!==r||void 0!==e){this.ic(),this.beginGeometry(t,n),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([rw.SET_FILL_STYLE,Ts]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([rw.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),u=t.getStride(),a=0,h=0,f=o.length;h<f;++h)a=this.tc(s,a,o[h],u);this.endGeometry(n)}},n.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var n=this.tolerance;if(0!==n)for(var i=this.coordinates,r=0,e=i.length;r<e;++r)i[r]=ce(i[r],n);return t.prototype.finish.call(this)},n.prototype.ic=function(){var t=this.state;void 0!==t.fillStyle&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)},n}(ow);function lw(t,n,i,r,e){var o,s,u,a,h,f,c,l,v,d=i,p=i,y=0,m=0,w=i;for(o=i;o<r;o+=e){var g=n[o],b=n[o+1];void 0!==a&&(l=g-a,v=b-h,u=Math.sqrt(l*l+v*v),void 0!==f&&(m+=s,Math.acos((f*l+c*v)/(s*u))>t&&(m>y&&(y=m,d=w,p=o),m=0,w=o-e)),s=u,f=l,c=v),a=g,h=b}return(m+=u)>y?[w,o]:[d,p]}var vw=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dw={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},pw=function(t){function n(n,i,r,e){var o=t.call(this,n,i,r,e)||this;return o.rc=null,o.eo="",o.oo=0,o.so=0,o.uo=void 0,o.ao=0,o.fo=null,o.fillStates={},o.co=null,o.strokeStates={},o.lo={},o.textStates={},o.ec="",o.oc="",o.sc="",o.Jf=void 0,o}return vw(n,t),n.prototype.finish=function(){var n=t.prototype.finish.call(this);return n.textStates=this.textStates,n.fillStates=this.fillStates,n.strokeStates=this.strokeStates,n},n.prototype.drawText=function(t,n){var i=this.fo,r=this.co,e=this.lo;if(""!==this.eo&&e&&(i||r)){var o=this.coordinates,s=o.length,u=t.getType(),a=null,h=t.getStride();if(e.placement!==jv||"LineString"!=u&&"MultiLineString"!=u&&"Polygon"!=u&&"MultiPolygon"!=u){var f=e.overflow?null:[];switch(u){case"Point":case"MultiPoint":a=t.getFlatCoordinates();break;case"LineString":a=t.getFlatMidpoint();break;case"Circle":a=t.getCenter();break;case"MultiLineString":a=t.getFlatMidpoints(),h=2;break;case"Polygon":a=t.getFlatInteriorPoint(),e.overflow||f.push(a[2]/this.resolution),h=3;break;case"MultiPolygon":var c=t.getFlatInteriorPoints();a=[];for(M=0,_=c.length;M<_;M+=3)e.overflow||f.push(c[M+2]/this.resolution),a.push(c[M],c[M+1]);if(0===a.length)return;h=2}if((P=this.appendFlatPointCoordinates(a,h))===s)return;if(f&&(P-s)/2!=a.length/h){var l=s/2;f=f.filter((function(t,n){var i=o[2*(l+n)]===a[n*h]&&o[2*(l+n)+1]===a[n*h+1];return i||--l,i}))}this.uc(),(e.backgroundFill||e.backgroundStroke)&&(this.setFillStrokeStyle(e.backgroundFill,e.backgroundStroke),e.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),e.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,n);var v=e.padding;if(v!=zs&&(e.scale[0]<0||e.scale[1]<0)){var d=e.padding[0],p=e.padding[1],y=e.padding[2],m=e.padding[3];e.scale[0]<0&&(p=-p,m=-m),e.scale[1]<0&&(d=-d,y=-y),v=[d,p,y,m]}var w=this.pixelRatio;this.instructions.push([rw.DRAW_IMAGE,s,P,null,NaN,NaN,NaN,1,0,0,this.uo,this.ao,[1,1],NaN,void 0,this.Jf,v==zs?zs:v.map((function(t){return t*w})),!!e.backgroundFill,!!e.backgroundStroke,this.eo,this.ec,this.sc,this.oc,this.oo,this.so,f]);var g=1/w;this.hitDetectionInstructions.push([rw.DRAW_IMAGE,s,P,null,NaN,NaN,NaN,1,0,0,this.uo,this.ao,[g,g],NaN,void 0,this.Jf,v,!!e.backgroundFill,!!e.backgroundStroke,this.eo,this.ec,this.sc,this.oc,this.oo,this.so,f]),this.endGeometry(n)}else{if(!Kn(this.getBufferedMaxExtent(),t.getExtent()))return;var b=void 0;if(a=t.getFlatCoordinates(),"LineString"==u)b=[a.length];else if("MultiLineString"==u)b=t.getEnds();else if("Polygon"==u)b=t.getEnds().slice(0,1);else if("MultiPolygon"==u){var x=t.getEndss();b=[];for(var M=0,_=x.length;M<_;++M)b.push(x[M][0])}this.beginGeometry(t,n);for(var S=e.textAlign,O=0,j=void 0,E=0,T=b.length;E<T;++E){if(null==S){var A=lw(e.maxAngle,a,O,b[E],h);O=A[0],j=A[1]}else j=b[E];for(var M=O;M<j;M+=h)o.push(a[M],a[M+1]);var P=o.length;O=b[E],this.ac(s,P),s=P}this.endGeometry(n)}}},n.prototype.uc=function(){var t=this.co,n=this.lo,i=this.fo,r=this.sc;t&&(r in this.strokeStates||(this.strokeStates[r]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var e=this.ec;e in this.textStates||(this.textStates[e]={font:n.font,textAlign:n.textAlign||Ns,justify:n.justify,textBaseline:n.textBaseline||Ls,scale:n.scale});var o=this.oc;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))},n.prototype.ac=function(t,n){var i=this.co,r=this.lo,e=this.sc,o=this.ec,s=this.oc;this.uc();var u=this.pixelRatio,a=dw[r.textBaseline],h=this.so*u,f=this.eo,c=i?i.lineWidth*Math.abs(r.scale[0])/2:0;this.instructions.push([rw.DRAW_CHARS,t,n,a,r.overflow,s,r.maxAngle,u,h,e,c*u,f,o,1]),this.hitDetectionInstructions.push([rw.DRAW_CHARS,t,n,a,r.overflow,s,r.maxAngle,1,h,e,c,f,o,1/u])},n.prototype.setTextStyle=function(t,n){var i,r,e;if(t){var s=t.getFill();s?((r=this.fo)||(r={},this.fo=r),r.fillStyle=Uh(s.getColor()||Ts)):(r=null,this.fo=r);var u=t.getStroke();if(u){(e=this.co)||(e={},this.co=e);var a=u.getLineDash(),h=u.getLineDashOffset(),f=u.getWidth(),c=u.getMiterLimit();e.lineCap=u.getLineCap()||As,e.lineDash=a?a.slice():Ps,e.lineDashOffset=void 0===h?0:h,e.lineJoin=u.getLineJoin()||Cs,e.lineWidth=void 0===f?1:f,e.miterLimit=void 0===c?ks:c,e.strokeStyle=Uh(u.getColor()||Is)}else e=null,this.co=e;i=this.lo;var l=t.getFont()||Es;Bs(l);var v=t.getScaleArray();i.overflow=t.getOverflow(),i.font=l,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||Ls,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||zs,i.scale=void 0===v?[1,1]:v;var d=t.getOffsetX(),p=t.getOffsetY(),y=t.getRotateWithView(),m=t.getRotation();this.eo=t.getText()||"",this.oo=void 0===d?0:d,this.so=void 0===p?0:p,this.uo=void 0!==y&&y,this.ao=void 0===m?0:m,this.sc=e?("string"==typeof e.strokeStyle?e.strokeStyle:o(e.strokeStyle))+e.lineCap+e.lineDashOffset+"|"+e.lineWidth+e.lineJoin+e.miterLimit+"["+e.lineDash.join()+"]":"",this.ec=i.font+i.scale+(i.textAlign||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.oc=r?"string"==typeof r.fillStyle?r.fillStyle:"|"+o(r.fillStyle):""}else this.eo="";this.Jf=n},n}(ow),yw={Circle:cw,Default:ow,Image:uw,LineString:hw,Polygon:cw,Text:pw},mw=function(){function t(t,n,i,r){this.hc=t,this.fc=n,this.kt=r,this.cc=i,this.lc={}}return t.prototype.finish=function(){var t={};for(var n in this.lc){t[n]=t[n]||{};var i=this.lc[n];for(var r in i){var e=i[r].finish();t[n][r]=e}}return t},t.prototype.getBuilder=function(t,n){var i=void 0!==t?t.toString():"0",r=this.lc[i];void 0===r&&(r={},this.lc[i]=r);var e=r[n];void 0===e&&(e=new(0,yw[n])(this.hc,this.fc,this.cc,this.kt),r[n]=e);return e},t}();function ww(t,n,i,r,e,o,s,u,a,h,f,c){var l=t[n],v=t[n+1],d=0,p=0,y=0,m=0;function w(){d=l,p=v,l=t[n+=r],v=t[n+1],m+=y,y=Math.sqrt((l-d)*(l-d)+(v-p)*(v-p))}do{w()}while(n<i-r&&m+y<o);for(var g=0===y?0:(o-m)/y,b=di(d,l,g),x=di(p,v,g),M=n-r,_=m,S=o+u*a(h,e,f);n<i-r&&m+y<S;)w();var O,j=di(d,l,g=0===y?0:(S-m)/y),E=di(p,v,g);if(c){var T=[b,x,j,E];qr(T,0,4,2,c,T,T),O=T[0]>T[2]}else O=b>j;var A,P=Math.PI,C=[],k=M+r===n;if(y=0,m=_,l=t[n=M],v=t[n+1],k){w(),A=Math.atan2(v-p,l-d),O&&(A+=A>0?-P:P);var I=(j+b)/2,N=(E+x)/2;return C[0]=[I,N,(S-o)/2,A,e],C}for(var L=0,z=(e=e.replace(/\n/g," ")).length;L<z;){w();var R=Math.atan2(v-p,l-d);if(O&&(R+=R>0?-P:P),void 0!==A){var F=R-A;if(F+=F>P?-2*P:F<-P?2*P:0,Math.abs(F)>s)return null}A=R;for(var G=L,D=0;L<z;++L){var q=u*a(h,e[O?z-L-1:L],f);if(n+r<i&&m+y<o+D+q/2)break;D+=q}if(L!==G){var U=O?e.substring(z-G,z-L):e.substring(G,L);I=di(d,l,g=0===y?0:(o+D/2-m)/y),N=di(p,v,g);C.push([I,N,D/2,R,U]),o+=D}}return C}function gw(t,n,i,r){for(var e=t[n],o=t[n+1],s=0,u=n+r;u<i;u+=r){var a=t[u],h=t[u+1];s+=Math.sqrt((a-e)*(a-e)+(h-o)*(h-o)),e=a,o=h}return s}var bw=[1/0,1/0,-1/0,-1/0],xw=[],Mw=[],_w=[],Sw=[];function Ow(t){return t[3].declutterBox}var jw=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function Ew(t,n){return"start"!==n&&"end"!==n||jw.test(t)||(n="start"===n?"left":"right"),dw[n]}function Tw(t,n,i){return i>0&&t.push("\n",""),t.push(n,""),t}var Aw=function(){function t(t,n,i,r){this.overlaps=i,this.pixelRatio=n,this.resolution=t,this.vc,this.instructions=r.instructions,this.coordinates=r.coordinates,this.dc={},this.yc=[1,0,0,1,0,0],this.hitDetectionInstructions=r.hitDetectionInstructions,this.vo=null,this.Ge=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.mc={},this.rc={}}return t.prototype.createLabel=function(t,n,i,r){var e=t+n+i+r;if(this.rc[e])return this.rc[e];var o=r?this.strokeStates[r]:null,s=i?this.fillStates[i]:null,u=this.textStates[n],a=this.pixelRatio,h=[u.scale[0]*a,u.scale[1]*a],f=Array.isArray(t),c=u.justify?dw[u.justify]:Ew(Array.isArray(t)?t[0]:t,u.textAlign||Ns),l=r&&o.lineWidth?o.lineWidth:0,v=f?t:t.split("\n").reduce(Tw,[]),d=Zs(u,v),p=d.width,y=d.height,m=d.widths,w=d.heights,g=d.lineWidths,b=p+l,x=[],M=(b+2)*h[0],_=(y+l)*h[1],S={width:M<0?Math.floor(M):Math.ceil(M),height:_<0?Math.floor(_):Math.ceil(_),contextInstructions:x};(1==h[0]&&1==h[1]||x.push("scale",h),r)&&(x.push("strokeStyle",o.strokeStyle),x.push("lineWidth",l),x.push("lineCap",o.lineCap),x.push("lineJoin",o.lineJoin),x.push("miterLimit",o.miterLimit),(Vt?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D).prototype.setLineDash&&(x.push("setLineDash",[o.lineDash]),x.push("lineDashOffset",o.lineDashOffset)));i&&x.push("fillStyle",s.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");for(var O,j=.5-c,E=c*b+j*l,T=[],A=[],P=0,C=0,k=0,I=0,N=0,L=v.length;N<L;N+=2){var z=v[N];if("\n"!==z){var R=v[N+1]||u.font;R!==O&&(r&&T.push("font",R),i&&A.push("font",R),O=R),P=Math.max(P,w[k]);var F=[z,E+j*m[k]+c*(m[k]-g[I]),.5*(l+P)+C];E+=m[k],r&&T.push("strokeText",F),i&&A.push("fillText",F),++k}else C+=P,P=0,E=c*b+j*l,++I}return Array.prototype.push.apply(x,T),Array.prototype.push.apply(x,A),this.rc[e]=S,S},t.prototype.wc=function(t,n,i,r,e,o,s){t.beginPath(),t.moveTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,r),t.lineTo.apply(t,e),t.lineTo.apply(t,n),o&&(this.vc=o[2],this.lu(t)),s&&(this.gc(t,s),t.stroke())},t.prototype.bc=function(t,n,i,r,e,o,s,u,a,h,f,c,l,v,d,p){var y,m=i-(s*=c[0]),w=r-(u*=c[1]),g=e+a>t?t-a:e,b=o+h>n?n-h:o,x=v[3]+g*c[0]+v[1],M=v[0]+b*c[1]+v[2],_=m-v[3],S=w-v[0];return(d||0!==f)&&(xw[0]=_,Sw[0]=_,xw[1]=S,Mw[1]=S,Mw[0]=_+x,_w[0]=Mw[0],_w[1]=S+M,Sw[1]=_w[1]),0!==f?(tn(y=sn([1,0,0,1,0,0],i,r,1,1,f,-i,-r),xw),tn(y,Mw),tn(y,_w),tn(y,Sw),On(Math.min(xw[0],Mw[0],_w[0],Sw[0]),Math.min(xw[1],Mw[1],_w[1],Sw[1]),Math.max(xw[0],Mw[0],_w[0],Sw[0]),Math.max(xw[1],Mw[1],_w[1],Sw[1]),bw)):On(Math.min(_,_+x),Math.min(S,S+M),Math.max(_,_+x),Math.max(S,S+M),bw),l&&(m=Math.round(m),w=Math.round(w)),{drawImageX:m,drawImageY:w,drawImageW:g,drawImageH:b,originX:a,originY:h,declutterBox:{minX:bw[0],minY:bw[1],maxX:bw[2],maxY:bw[3],value:p},canvasTransform:y,scale:c}},t.prototype.xc=function(t,n,i,r,e,o,s){var u=!(!o&&!s),a=r.declutterBox,h=t.canvas,f=s?s[2]*r.scale[0]/2:0;return a.minX-f<=h.width/n&&a.maxX+f>=0&&a.minY-f<=h.height/n&&a.maxY+f>=0&&(u&&this.wc(t,xw,Mw,_w,Sw,o,s),$s(t,r.canvasTransform,e,i,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},t.prototype.lu=function(t){if(this.vc){var n=tn(this.yc,[0,0]),i=512*this.pixelRatio;t.save(),t.translate(n[0]%i,n[1]%i),t.rotate(this.Ge)}t.fill(),this.vc&&t.restore()},t.prototype.gc=function(t,n){t.strokeStyle=n[1],t.lineWidth=n[2],t.lineCap=n[3],t.lineJoin=n[4],t.miterLimit=n[5],t.setLineDash&&(t.lineDashOffset=n[7],t.setLineDash(n[6]))},t.prototype.Mc=function(t,n,i,r){var e=this.textStates[n],o=this.createLabel(t,n,r,i),s=this.strokeStates[i],u=this.pixelRatio,a=Ew(Array.isArray(t)?t[0]:t,e.textAlign||Ns),h=dw[e.textBaseline||Ls],f=s&&s.lineWidth?s.lineWidth:0;return{label:o,anchorX:a*(o.width/u-2*e.scale[0])+2*(.5-a)*f,anchorY:h*o.height/u+2*(.5-h)*f}},t.prototype._c=function(t,n,i,r,e,o,s,u){var a;this.vo&&x(i,this.yc)?a=this.vo:(this.vo||(this.vo=[]),a=Dr(this.coordinates,0,this.coordinates.length,2,i,this.vo),Qt(this.yc,i));for(var h,f,c,l,v,d,p,y,m,w,g,b,M,_,S,O,j=0,E=r.length,T=0,A=0,P=0,C=null,k=null,I=this.dc,N=this.Ge,L=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,z={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:N},R=this.instructions!=r||this.overlaps?0:200;j<E;){var F=r[j];switch(F[0]){case rw.BEGIN_GEOMETRY:M=F[1],O=F[3],M.getGeometry()?void 0===s||Kn(s,O.getExtent())?++j:j=F[2]+1:j=F[2];break;case rw.BEGIN_PATH:A>R&&(this.lu(t),A=0),P>R&&(t.stroke(),P=0),A||P||(t.beginPath(),l=NaN,v=NaN),++j;break;case rw.CIRCLE:var G=a[T=F[1]],D=a[T+1],q=a[T+2]-G,U=a[T+3]-D,B=Math.sqrt(q*q+U*U);t.moveTo(G+B,D),t.arc(G,D,B,0,2*Math.PI,!0),++j;break;case rw.CLOSE_PATH:t.closePath(),++j;break;case rw.CUSTOM:T=F[1],h=F[2];var X=F[3],V=F[4],W=6==F.length?F[5]:void 0;z.geometry=X,z.feature=M,j in I||(I[j]=[]);var Y=I[j];W?W(a,T,h,2,Y):(Y[0]=a[T],Y[1]=a[T+1],Y.length=2),V(Y,z),++j;break;case rw.DRAW_IMAGE:T=F[1],h=F[2],y=F[3],f=F[4],c=F[5];var Z=F[6],$=F[7],K=F[8],H=F[9],J=F[10],Q=F[11],tt=F[12],nt=F[13],it=F[14],rt=F[15];if(!y&&F.length>=20){m=F[19],w=F[20],g=F[21],b=F[22];var et=this.Mc(m,w,g,b);y=et.label,F[3]=y;var ot=F[23];f=(et.anchorX-ot)*this.pixelRatio,F[4]=f;var st=F[24];c=(et.anchorY-st)*this.pixelRatio,F[5]=c,Z=y.height,F[6]=Z,nt=y.width,F[13]=nt}var ut=void 0;F.length>25&&(ut=F[25]);var at=void 0,ht=void 0,ft=void 0;F.length>17?(at=F[16],ht=F[17],ft=F[18]):(at=zs,ht=!1,ft=!1),J&&L?Q+=N:J||L||(Q-=N);for(var ct=0;T<h;T+=2)if(!(ut&&ut[ct++]<nt/this.pixelRatio)){var lt=[t,n,y,Gt=this.bc(y.width,y.height,a[T],a[T+1],nt,Z,f,c,K,H,Q,tt,e,at,ht||ft,M),$,ht?C:null,ft?k:null];if(u){if("none"===it)continue;if("obstacle"===it){u.insert(Gt.declutterBox);continue}var vt=void 0,dt=void 0;if(rt){var pt=h-T;if(!rt[pt]){rt[pt]=lt;continue}if(vt=rt[pt],delete rt[pt],dt=Ow(vt),u.collides(dt))continue}if(u.collides(Gt.declutterBox))continue;vt&&(u.insert(dt),this.xc.apply(this,vt)),u.insert(Gt.declutterBox)}this.xc.apply(this,lt)}++j;break;case rw.DRAW_CHARS:var yt=F[1],mt=F[2],wt=F[3],gt=F[4];b=F[5];var bt=F[6],xt=F[7],Mt=F[8];g=F[9];var _t=F[10];m=F[11],w=F[12];var St=[F[13],F[13]],Ot=this.textStates[w],jt=Ot.font,Et=[Ot.scale[0]*xt,Ot.scale[1]*xt],Tt=void 0;jt in this.mc?Tt=this.mc[jt]:(Tt={},this.mc[jt]=Tt);var At=gw(a,yt,mt,2),Pt=Math.abs(Et[0])*Ys(jt,m,Tt);if(gt||Pt<=At){var Ct=this.textStates[w].textAlign,kt=ww(a,yt,mt,2,m,(At-Pt)*dw[Ct],bt,Math.abs(Et[0]),Ys,jt,Tt,L?0:this.Ge);t:if(kt){var It=[],Nt=void 0,Lt=void 0,zt=void 0,Rt=void 0,Ft=void 0;if(g)for(Nt=0,Lt=kt.length;Nt<Lt;++Nt){zt=(Ft=kt[Nt])[4],Rt=this.createLabel(zt,w,"",g),f=Ft[2]+(Et[0]<0?-_t:_t),c=wt*Rt.height+2*(.5-wt)*_t*Et[1]/Et[0]-Mt;var Gt=this.bc(Rt.width,Rt.height,Ft[0],Ft[1],Rt.width,Rt.height,f,c,0,0,Ft[3],St,!1,zs,!1,M);if(u&&u.collides(Gt.declutterBox))break t;It.push([t,n,Rt,Gt,1,null,null])}if(b)for(Nt=0,Lt=kt.length;Nt<Lt;++Nt){zt=(Ft=kt[Nt])[4],Rt=this.createLabel(zt,w,b,""),f=Ft[2],c=wt*Rt.height-Mt;Gt=this.bc(Rt.width,Rt.height,Ft[0],Ft[1],Rt.width,Rt.height,f,c,0,0,Ft[3],St,!1,zs,!1,M);if(u&&u.collides(Gt.declutterBox))break t;It.push([t,n,Rt,Gt,1,null,null])}u&&u.load(It.map(Ow));for(var Dt=0,qt=It.length;Dt<qt;++Dt)this.xc.apply(this,It[Dt])}}++j;break;case rw.END_GEOMETRY:if(void 0!==o){var Ut=o(M=F[1],O);if(Ut)return Ut}++j;break;case rw.FILL:R?A++:this.lu(t),++j;break;case rw.MOVE_TO_LINE_TO:for(T=F[1],h=F[2],_=a[T],p=(S=a[T+1])+.5|0,(d=_+.5|0)===l&&p===v||(t.moveTo(_,S),l=d,v=p),T+=2;T<h;T+=2)d=(_=a[T])+.5|0,p=(S=a[T+1])+.5|0,T!=h-2&&d===l&&p===v||(t.lineTo(_,S),l=d,v=p);++j;break;case rw.SET_FILL_STYLE:C=F,this.vc=F[2],A&&(this.lu(t),A=0,P&&(t.stroke(),P=0)),t.fillStyle=F[1],++j;break;case rw.SET_STROKE_STYLE:k=F,P&&(t.stroke(),P=0),this.gc(t,F),++j;break;case rw.STROKE:R?P++:t.stroke(),++j;break;default:++j}}A&&this.lu(t),P&&t.stroke()},t.prototype.execute=function(t,n,i,r,e,o){this.Ge=r,this._c(t,n,i,this.instructions,e,void 0,void 0,o)},t.prototype.executeHitDetection=function(t,n,i,r,e){return this.Ge=i,this._c(t,1,n,this.hitDetectionInstructions,!0,r,e)},t}(),Pw=["Polygon","Circle","LineString","Image","Text","Default"],Cw=function(){function t(t,n,i,r,e,o){this.fc=t,this.za=r,this.kt=i,this.cc=n,this.df=o,this.Sc={},this.Oc=null,this.jc=[1,0,0,1,0,0],this.Ec(e)}return t.prototype.clip=function(t,n){var i=this.getClipCoords(n);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()},t.prototype.Ec=function(t){for(var n in t){var i=this.Sc[n];void 0===i&&(i={},this.Sc[n]=i);var r=t[n];for(var e in r){var o=r[e];i[e]=new Aw(this.cc,this.kt,this.za,o)}}},t.prototype.hasExecutors=function(t){for(var n in this.Sc)for(var i=this.Sc[n],r=0,e=t.length;r<e;++r)if(t[r]in i)return!0;return!1},t.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e,o){var s=2*(r=Math.round(r))+1,u=sn(this.jc,r+.5,r+.5,1/n,-1/n,-i,-t[0],-t[1]),a=!this.Oc;a&&(this.Oc=_o(s,s));var h,f=this.Oc;f.canvas.width!==s||f.canvas.height!==s?(f.canvas.width=s,f.canvas.height=s):a||f.clearRect(0,0,s,s),void 0!==this.df&&(kn(h=[1/0,1/0,-1/0,-1/0],t),mn(h,n*(this.df+r),h));var c,l=Iw(r);function v(t,n){for(var i=f.getImageData(0,0,s,s).data,u=0,a=l.length;u<a;u++)if(i[l[u]]>0){if(!o||"Image"!==c&&"Text"!==c||-1!==o.indexOf(t)){var h=(l[u]-3)/4,v=r-h%s,d=r-(h/s|0),p=e(t,n,v*v+d*d);if(p)return p}f.clearRect(0,0,s,s);break}}var d,y,m,w,g,b=Object.keys(this.Sc).map(Number);for(b.sort(p),d=b.length-1;d>=0;--d){var x=b[d].toString();for(m=this.Sc[x],y=Pw.length-1;y>=0;--y)if(void 0!==(w=m[c=Pw[y]])&&(g=w.executeHitDetection(f,u,i,v,h)))return g}},t.prototype.getClipCoords=function(t){var n=this.fc;if(!n)return null;var i=n[0],r=n[1],e=n[2],o=n[3],s=[i,r,i,o,e,o,e,r];return Dr(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return k(this.Sc)},t.prototype.execute=function(t,n,i,r,e,o,s){var u=Object.keys(this.Sc).map(Number);u.sort(p),this.fc&&(t.save(),this.clip(t,i));var a,h,f,c,l,v,d=o||Pw;for(s&&u.reverse(),a=0,h=u.length;a<h;++a){var y=u[a].toString();for(l=this.Sc[y],f=0,c=d.length;f<c;++f){void 0!==(v=l[d[f]])&&v.execute(t,n,i,r,e,s)}}this.fc&&t.restore()},t}(),kw={};function Iw(t){if(void 0!==kw[t])return kw[t];for(var n=2*t+1,i=t*t,r=new Array(i+1),e=0;e<=t;++e)for(var o=0;o<=t;++o){var s=e*e+o*o;if(s>i)break;var u=r[s];u||(u=[],r[s]=u),u.push(4*((t+e)*n+(t+o))+3),e>0&&u.push(4*((t-e)*n+(t+o))+3),o>0&&(u.push(4*((t+e)*n+(t-o))+3),e>0&&u.push(4*((t-e)*n+(t-o))+3))}for(var a=[],h=(e=0,r.length);e<h;++e)r[e]&&a.push.apply(a,r[e]);return kw[t]=a,a}var Nw=Cw,Lw=.5;function zw(t,n,i,r,e,o,s){var u=_o(t[0]*Lw,t[1]*Lw);u.imageSmoothingEnabled=!1;for(var a=u.canvas,h=new rf(u,Lw,e,null,s),f=i.length,c=Math.floor(16777215/f),l={},v=1;v<=f;++v){var d=i[v-1],y=d.getStyleFunction()||r;if(r){var m=y(d,o);if(m){Array.isArray(m)||(m=[m]);for(var w="#"+("000000"+(v*c).toString(16)).slice(-6),g=0,b=m.length;g<b;++g){var x=m[g],M=x.getGeometryFunction()(d);if(M&&Kn(e,M.getExtent())){var _=x.clone(),S=_.getFill();S&&S.setColor(w);var O=_.getStroke();O&&(O.setColor(w),O.setLineDash(null)),_.setText(void 0);var j=x.getImage();if(j&&0!==j.getOpacity()){var E=j.getImageSize();if(!E)continue;var T=_o(E[0],E[1],void 0,{alpha:!1}),A=T.canvas;T.fillStyle=w,T.fillRect(0,0,A.width,A.height),_.setImage(new yv({img:A,imgSize:E,anchor:j.getAnchor(),anchorXUnits:ov,anchorYUnits:ov,offset:j.getOrigin(),opacity:1,size:j.getSize(),scale:j.getScale(),rotation:j.getRotation(),rotateWithView:j.getRotateWithView()}))}var P=_.getZIndex()||0;(I=l[P])||(I={},l[P]=I,I.Polygon=[],I.Circle=[],I.LineString=[],I.Point=[]),I[M.getType().replace("Multi","")].push(M,_)}}}}}for(var C=Object.keys(l).map(Number).sort(p),k=(v=0,C.length);v<k;++v){var I=l[C[v]];for(var N in I){var L=I[N];for(g=0,b=L.length;g<b;g+=2){h.setStyle(L[g+1]);for(var z=0,R=n.length;z<R;++z)h.setTransform(n[z]),h.drawGeometry(L[g])}}}return u.getImageData(0,0,a.width,a.height)}function Rw(t,n,i){var r=[];if(i){var e=Math.floor(Math.round(t[0])*Lw),o=Math.floor(Math.round(t[1])*Lw),s=4*(oi(e,0,i.width-1)+oi(o,0,i.height-1)*i.width),u=i.data[s],a=i.data[s+1],h=i.data[s+2]+256*(a+256*u),f=Math.floor(16777215/n.length);h&&h%f==0&&r.push(n[h/f-1])}return r}var Fw=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Gw=function(t){function n(n){var i=t.call(this,n)||this;return i.Tc=i.Ac.bind(i),i.Pc,i.Cc=null,i.kc=null,i._h=-1,i.Ic=NaN,i.zh=[1/0,1/0,-1/0,-1/0],i.Nc=[1/0,1/0,-1/0,-1/0],i.Lc,i.zc=null,i.Rc=null,i.Fc=null,i.Gc=null,i.replayGroupChanged=!0,i.declutterExecutorGroup=null,i.clipping=!0,i.Dc=null,i.ou=1,i}return Fw(n,t),n.prototype.renderWorlds=function(t,n,i){var r=n.extent,e=n.viewState,o=e.center,s=e.resolution,u=e.projection,a=e.rotation,h=u.getExtent(),f=this.getLayer().getSource(),c=n.pixelRatio,l=n.viewHints,v=!(l[Eu]||l[Tu]),d=this.Dc,p=Math.round(n.size[0]*c),y=Math.round(n.size[1]*c),m=f.getWrapX()&&u.canWrapX(),w=m?$n(h):null,g=m?Math.ceil((r[2]-h[2])/w)+1:1,b=m?Math.floor((r[0]-h[0])/w):0;do{var x=this.getRenderTransform(o,s,a,c,p,y,b*w);t.execute(d,1,x,a,v,void 0,i)}while(++b<g)},n.prototype.qc=function(){if(1!==this.ou){var t=_o(this.context.canvas.width,this.context.canvas.height,Hy);this.Dc=t}else this.Dc=this.context},n.prototype.Uc=function(){if(1!==this.ou){var t=this.context.globalAlpha;this.context.globalAlpha=this.ou,this.context.drawImage(this.Dc.canvas,0,0),this.context.globalAlpha=t,So(this.Dc),Hy.push(this.Dc.canvas),this.Dc=null}},n.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&(this.qc(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.Uc())},n.prototype.renderFrame=function(t,n){var i=t.pixelRatio,r=t.layerStatesArray[t.layerIndex];en(this.pixelTransform,1/i,1/i),un(this.inversePixelTransform,this.pixelTransform);var e=hn(this.pixelTransform);this.useContainer(n,e,this.getBackground(t));var o=this.context,s=o.canvas,u=this.Gc,a=this.declutterExecutorGroup;if((!u||u.isEmpty())&&(!a||a.isEmpty()))return null;var h=Math.round(t.size[0]*i),f=Math.round(t.size[1]*i);s.width!=h||s.height!=f?(s.width=h,s.height=f,s.style.transform!==e&&(s.style.transform=e)):this.containerReused||o.clearRect(0,0,h,f),this.preRender(o,t);var c=t.viewState,l=c.projection;this.ou=r.opacity,this.qc();var v=!1,d=!0;if(r.extent&&this.clipping){var p=Lr(r.extent,l);(v=(d=Kn(p,t.extent))&&!xn(p,t.extent))&&this.clipUnrotated(this.Dc,t,p)}return d&&this.renderWorlds(u,t),v&&this.Dc.restore(),this.Uc(),this.postRender(o,t),this.Lc!==c.rotation&&(this.Lc=c.rotation,this.Cc=null),this.container},n.prototype.getFeatures=function(t){return new Promise(function(n){if(!this.Cc&&!this.Pc){var i=[this.context.canvas.width,this.context.canvas.height];tn(this.pixelTransform,i);var r=this.zc,e=this.Ic,o=this.Lc,s=this.Rc,u=this.Nc,a=this.getLayer(),h=[],f=i[0]*Lw,c=i[1]*Lw;h.push(this.getRenderTransform(r,e,o,Lw,f,c,0).slice());var l=a.getSource(),v=s.getExtent();if(l.getWrapX()&&s.canWrapX()&&!xn(v,u)){for(var d=u[0],p=$n(v),y=0,m=void 0;d<v[0];)m=p*--y,h.push(this.getRenderTransform(r,e,o,Lw,f,c,m).slice()),d+=p;for(y=0,d=u[2];d>v[2];)m=p*++y,h.push(this.getRenderTransform(r,e,o,Lw,f,c,m).slice()),d-=p}this.Cc=zw(i,h,this.kc,a.getStyleFunction(),u,e,o)}n(Rw(t,this.kc,this.Cc))}.bind(this))},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e){var s=this;if(this.Gc){var u,a=n.viewState.resolution,h=n.viewState.rotation,f=this.getLayer(),c={},l=function(t,n,i){var s=o(t),u=c[s];if(u){if(!0!==u&&i<u.distanceSq){if(0===i)return c[s]=!0,e.splice(e.lastIndexOf(u),1),r(t,f,n);u.geometry=n,u.distanceSq=i}}else{if(0===i)return c[s]=!0,r(t,f,n);e.push(c[s]={feature:t,layer:f,geometry:n,distanceSq:i,callback:r})}},v=[this.Gc];return this.declutterExecutorGroup&&v.push(this.declutterExecutorGroup),v.some((function(r){return u=r.forEachFeatureAtCoordinate(t,a,h,i,l,r===s.declutterExecutorGroup&&n.declutterTree?n.declutterTree.all().map((function(t){return t.value})):null)})),u}},n.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.Gc&&t.changed()},n.prototype.Ac=function(t){this.renderIfReadyAndVisible()},n.prototype.prepareFrame=function(t){var n=this.getLayer(),i=n.getSource();if(!i)return!1;var r=t.viewHints[Eu],e=t.viewHints[Tu],o=n.getUpdateWhileAnimating(),s=n.getUpdateWhileInteracting();if(this.ready&&!o&&r||!s&&e)return this.Pc=!0,!0;this.Pc=!1;var u=t.extent,a=t.viewState,h=a.projection,f=a.resolution,c=t.pixelRatio,l=n.getRevision(),v=n.getRenderBuffer(),d=n.getRenderOrder();void 0===d&&(d=of);var p=a.center.slice(),y=mn(u,v*f),m=y.slice(),w=[y.slice()],g=h.getExtent();if(i.getWrapX()&&h.canWrapX()&&!xn(g,t.extent)){var b=$n(g),M=Math.max($n(y)/2,b);y[0]=g[0]-M,y[2]=g[2]+M,rr(p,h);var _=ii(w[0],h);_[0]<g[0]&&_[2]<g[2]?w.push([_[0]+b,_[1],_[2]+b,_[3]]):_[0]>g[0]&&_[2]>g[2]&&w.push([_[0]-b,_[1],_[2]-b,_[3]])}if(this.ready&&this.Ic==f&&this._h==l&&this.Fc==d&&xn(this.Nc,y))return x(this.zh,m)||(this.Cc=null,this.zh=m),this.zc=p,this.replayGroupChanged=!1,!0;this.Gc=null;var S,O=new mw(uf(f,c),y,f,c);this.getLayer().getDeclutter()&&(S=new mw(uf(f,c),y,f,c));var j,E=Cr();if(E){for(var T=0,A=w.length;T<A;++T){var P=Nr(w[T],h);i.loadFeatures(P,zr(f,h),E)}j=Or(E,h)}else for(T=0,A=w.length;T<A;++T)i.loadFeatures(w[T],f,h);var C=sf(f,c),k=!0,I=function(t){var i,r=t.getStyleFunction()||n.getStyleFunction();if(r&&(i=r(t,f)),i){var e=this.renderFeature(t,C,i,O,j,S);k=k&&!e}}.bind(this),N=Nr(y,h),L=i.getFeaturesInExtent(N);d&&L.sort(d);for(T=0,A=L.length;T<A;++T)I(L[T]);this.kc=L,this.ready=k;var z=O.finish(),R=new Nw(y,f,c,i.getOverlaps(),z,n.getRenderBuffer());return S&&(this.declutterExecutorGroup=new Nw(y,f,c,i.getOverlaps(),S.finish(),n.getRenderBuffer())),this.Ic=f,this._h=l,this.Fc=d,this.zh=m,this.Nc=y,this.zc=p,this.Rc=h,this.Gc=R,this.Cc=null,this.replayGroupChanged=!0,!0},n.prototype.renderFeature=function(t,n,i,r,e,o){if(!i)return!1;var s=!1;if(Array.isArray(i))for(var u=0,a=i.length;u<a;++u)s=af(r,t,i[u],n,this.Tc,e,o)||s;else s=af(r,t,i,n,this.Tc,e,o);return s},n}(tm),Dw=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qw=function(t){function n(n){var i=t.call(this,n)||this;return i.Bc=new Gw(n),i.Xc=n.getImageRatio(),i.Vc=[1,0,0,1,0,0],i.Wc=null,i}return Dw(n,t),n.prototype.disposeInternal=function(){this.Bc.dispose(),t.prototype.disposeInternal.call(this)},n.prototype.getFeatures=function(t){if(!this.Bc)return new Promise((function(t){return t([])}));var n=tn(this.Vc,tn(this.Wc,t.slice()));return this.Bc.getFeatures(n)},n.prototype.handleFontsChanged=function(){this.Bc.handleFontsChanged()},n.prototype.prepareFrame=function(t){var n=t.pixelRatio,i=t.viewState,r=i.resolution,e=t.viewHints,o=this.Bc,s=t.extent;1!==this.Xc&&Qn(s=s.slice(0),this.Xc);var u=$n(s)/r,a=Vn(s)/r;if(!e[Eu]&&!e[Tu]&&!Hn(s)){o.useContainer(null,null);var h=o.context,f=t.layerStatesArray[t.layerIndex];h.globalAlpha=f.opacity;var c=A({},f,{opacity:1}),l=A({},t,{declutterTree:new Av(9),extent:s,size:[u,a],viewState:A({},t.viewState,{rotation:0}),layerStatesArray:[c],layerIndex:0}),v=!0,d=new Mo(s,r,n,h.canvas,(function(t){o.prepareFrame(l)&&o.replayGroupChanged&&(o.clipping=!1,o.renderFrame(l,null)&&(o.renderDeclutter(l),v=!1),t())}));d.addEventListener(L,function(){if(d.getState()===po){this.Lt=v?null:d;var t=d.getResolution(),r=d.getPixelRatio(),e=t*n/r;this.renderedResolution=e,this.Vc=sn(this.Vc,u/2,a/2,1/e,-1/e,0,-i.center[0],-i.center[1])}}.bind(this)),d.load()}return this.Lt&&(this.Wc=t.pixelToCoordinateTransform.slice()),!!this.Lt},n.prototype.preRender=function(){},n.prototype.postRender=function(){},n.prototype.renderDeclutter=function(){},n.prototype.forEachFeatureAtCoordinate=function(n,i,r,e,o){return this.Bc?this.Bc.forEachFeatureAtCoordinate(n,i,r,e,o):t.prototype.forEachFeatureAtCoordinate.call(this,n,i,r,e,o)},n}(im),Uw="image",Bw="hybrid",Xw="vector",Vw=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ww={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},Yw={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]},Zw=function(t){function n(n){var i=t.call(this,n)||this;return i.Tc=i.Ac.bind(i),i.Yc,i.Wc=null,i.Lc,i.Zc=[1,0,0,1,0,0],i}return Vw(n,t),n.prototype.prepareTile=function(t,n,i){var r,e=t.getState();return e!==vt&&e!==dt||(this.$c(t,n,i),this.Kc(t)&&(r=!0)),r},n.prototype.getTile=function(n,i,r,e){var o=e.pixelRatio,s=e.viewState,u=s.resolution,a=s.projection,h=this.getLayer(),f=h.getSource().getTile(n,i,r,o,a),c=e.viewHints,l=!(c[Eu]||c[Tu]);return!l&&f.wantedResolution||(f.wantedResolution=u),this.prepareTile(f,o,a)&&(l||Date.now()-e.time<8)&&h.getRenderMode()!==Xw&&this.Hc(f,e),t.prototype.getTile.call(this,n,i,r,e)},n.prototype.isDrawableTile=function(n){var i=this.getLayer();return t.prototype.isDrawableTile.call(this,n)&&(i.getRenderMode()===Xw?o(i)in n.executorGroups:n.hasContext(i))},n.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},n.prototype.prepareFrame=function(n){var i=this.getLayer().getRevision();return this.Yc!==i&&(this.Yc=i,this.renderedTiles.length=0),t.prototype.prepareFrame.call(this,n)},n.prototype.$c=function(t,n,i){var r=this.getLayer(),e=r.getRevision(),s=r.getRenderOrder()||null,u=t.wantedResolution,a=t.getReplayState(r);if(a.dirty||a.renderedResolution!==u||a.renderedRevision!=e||a.renderedRenderOrder!=s){var h=r.getSource(),f=r.getDeclutter(),c=h.getTileGrid(),l=h.getTileGridForProjection(i).getTileCoordExtent(t.wrappedTileCoord),v=h.getSourceTiles(n,i,t),d=o(r);delete t.hitDetectionImageData[d],t.executorGroups[d]=[],f&&(t.declutterExecutorGroups[d]=[]),a.dirty=!1;for(var p=function(i,e){var o=v[i];if(o.getState()!=vt)return"continue";var p=o.tileCoord,m=c.getTileCoordExtent(p),w=Wn(l,m),g=mn(w,r.getRenderBuffer()*u,y.tmpExtent),b=An(m,w)?null:g,x=new mw(0,g,u,n),M=f?new mw(0,w,u,n):void 0,_=sf(u,n),S=function(t){var n,i=t.getStyleFunction()||r.getStyleFunction();if(i&&(n=i(t,u)),n){var e=this.renderFeature(t,_,n,x,M);a.dirty=a.dirty||e}},O=o.getFeatures();s&&s!==a.renderedRenderOrder&&O.sort(s);for(var j=0,E=O.length;j<E;++j){var T=O[j];b&&!Kn(b,T.getGeometry().getExtent())||S.call(y,T)}var A=x.finish(),P=r.getRenderMode()!==Xw&&f&&1===v.length?null:w,C=new Nw(P,u,n,h.getOverlaps(),A,r.getRenderBuffer());if(t.executorGroups[d].push(C),M){var k=new Nw(null,u,n,h.getOverlaps(),M.finish(),r.getRenderBuffer());t.declutterExecutorGroups[d].push(k)}},y=this,m=0,w=v.length;m<w;++m)p(m);a.renderedRevision=e,a.renderedRenderOrder=s,a.renderedResolution=u}},n.prototype.forEachFeatureAtCoordinate=function(t,n,i,r,e){var s=n.viewState.resolution,u=n.viewState.rotation;i=null==i?0:i;var a=this.getLayer(),h=a.getSource().getTileGridForProjection(n.viewState.projection),f=yn([t]);mn(f,s*i,f);for(var c,l={},v=function(t,n,i){var s=t.getId();void 0===s&&(s=o(t));var u=l[s];if(u){if(!0!==u&&i<u.distanceSq){if(0===i)return l[s]=!0,e.splice(e.lastIndexOf(u),1),r(t,a,n);u.geometry=n,u.distanceSq=i}}else{if(0===i)return l[s]=!0,r(t,a,n);e.push(l[s]={feature:t,layer:a,geometry:n,distanceSq:i,callback:r})}},d=this.renderedTiles,p=function(r,e){var l=d[r];if(!Kn(h.getTileCoordExtent(l.wrappedTileCoord),f))return"continue";var p=o(a),y=[l.executorGroups[p]],m=l.declutterExecutorGroups[p];m&&y.push(m),y.some((function(r){for(var e=r===m?n.declutterTree.all().map((function(t){return t.value})):null,o=0,a=r.length;o<a;++o){var h=r[o];if(c=h.forEachFeatureAtCoordinate(t,s,u,i,v,e))return!0}}))},y=0,m=d.length;!c&&y<m;++y)p(y);return c},n.prototype.getFeatures=function(t){return new Promise(function(n,i){for(var r,e=this.getLayer(),s=o(e),u=e.getSource(),a=this.renderedProjection,h=a.getExtent(),f=this.renderedResolution,c=u.getTileGridForProjection(a),l=tn(this.Wc,t.slice()),v=c.getTileCoordForCoordAndResolution(l,f),d=0,p=this.renderedTiles.length;d<p;++d)if(v.toString()===this.renderedTiles[d].tileCoord.toString()){if((r=this.renderedTiles[d]).getState()===vt){var y=c.getTileCoordExtent(r.tileCoord);u.getWrapX()&&a.canWrapX()&&!xn(h,y)&&rr(l,a);break}r=void 0}if(!r||r.loadingSourceTiles>0)n([]);else{var m=Yn(c.getTileCoordExtent(r.wrappedTileCoord)),w=[(l[0]-m[0])/f,(m[1]-l[1])/f],g=r.getSourceTiles().reduce((function(t,n){return t.concat(n.getFeatures())}),[]),b=r.hitDetectionImageData[s];if(!b&&!this.Pc){var x=Qu(c.getTileSize(c.getZForResolution(f,u.zDirection))),M=this.Lc;b=zw(x,[this.getRenderTransform(c.getTileCoordCenter(r.wrappedTileCoord),f,0,Lw,x[0]*Lw,x[1]*Lw,0)],g,e.getStyleFunction(),c.getTileCoordExtent(r.wrappedTileCoord),r.getReplayState(e).renderedResolution,M),r.hitDetectionImageData[s]=b}n(Rw(w,g,b))}}.bind(this))},n.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&void 0!==this.Yc&&t.changed()},n.prototype.Ac=function(t){this.renderIfReadyAndVisible()},n.prototype.renderDeclutter=function(t){var n=this.context,i=n.globalAlpha;n.globalAlpha=this.getLayer().getOpacity();for(var r=t.viewHints,e=!(r[Eu]||r[Tu]),s=this.renderedTiles,u=0,a=s.length;u<a;++u){var h=s[u],f=h.declutterExecutorGroups[o(this.getLayer())];if(f)for(var c=f.length-1;c>=0;--c)f[c].execute(this.context,1,this.getTileRenderTransform(h,t),t.viewState.rotation,e,void 0,t.declutterTree)}n.globalAlpha=i},n.prototype.getTileRenderTransform=function(t,n){var i=n.pixelRatio,r=n.viewState,e=r.center,o=r.resolution,s=r.rotation,u=n.size,a=Math.round(u[0]*i),h=Math.round(u[1]*i),f=this.getLayer().getSource().getTileGridForProjection(n.viewState.projection),c=t.tileCoord,l=f.getTileCoordExtent(t.wrappedTileCoord),v=f.getTileCoordExtent(c,this.tmpExtent)[0]-l[0];return Ht(rn(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(e,o,s,i,a,h,v))},n.prototype.renderFrame=function(n,i){var r=n.viewHints,e=!(r[Eu]||r[Tu]);t.prototype.renderFrame.call(this,n,i),this.Wc=n.pixelToCoordinateTransform.slice(),this.Lc=n.viewState.rotation;var s=this.getLayer(),u=s.getRenderMode(),a=this.context,h=a.globalAlpha;a.globalAlpha=s.getOpacity();for(var f=Yw[u],c=n.viewState,l=c.rotation,v=s.getSource(),d=v.getTileGridForProjection(c.projection).getZForResolution(c.resolution,v.zDirection),p=this.renderedTiles,y=[],m=[],w=!0,g=p.length-1;g>=0;--g){var b=p[g];w=w&&!b.getReplayState(s).dirty;var x=b.executorGroups[o(s)].filter((function(t){return t.hasExecutors(f)}));if(0!==x.length){var M=this.getTileRenderTransform(b,n),_=b.tileCoord[0],S=!1,O=x[0].getClipCoords(M);if(O){for(var j=0,E=y.length;j<E;++j)if(d!==_&&_<m[j]){var T=y[j];Kn([O[0],O[3],O[4],O[7]],[T[0],T[3],T[4],T[7]])&&(S||(a.save(),S=!0),a.beginPath(),a.moveTo(O[0],O[1]),a.lineTo(O[2],O[3]),a.lineTo(O[4],O[5]),a.lineTo(O[6],O[7]),a.moveTo(T[6],T[7]),a.lineTo(T[4],T[5]),a.lineTo(T[2],T[3]),a.lineTo(T[0],T[1]),a.clip())}y.push(O),m.push(_)}for(var A=0,P=x.length;A<P;++A){x[A].execute(a,1,M,l,e,f)}S&&a.restore()}}return a.globalAlpha=h,this.ready=w,this.container},n.prototype.renderFeature=function(t,n,i,r,e){if(!i)return!1;var o=!1;if(Array.isArray(i))for(var s=0,u=i.length;s<u;++s)o=af(r,t,i[s],n,this.Tc,void 0,e)||o;else o=af(r,t,i,n,this.Tc,void 0,e);return o},n.prototype.Kc=function(t){var n=this.getLayer();if(n.getRenderMode()===Xw)return!1;var i=t.getReplayState(n),r=n.getRevision(),e=t.wantedResolution;return i.renderedTileResolution!==e||i.renderedTileRevision!==r},n.prototype.Hc=function(t,n){var i=this.getLayer(),r=t.getReplayState(i),e=i.getRevision(),s=t.executorGroups[o(i)];r.renderedTileRevision=e;var u=t.wrappedTileCoord,a=u[0],h=i.getSource(),f=n.pixelRatio,c=n.viewState.projection,l=h.getTileGridForProjection(c),v=l.getResolution(t.tileCoord[0]),d=n.pixelRatio/t.wantedResolution*v,p=l.getResolution(a),y=t.getContext(i);f=Math.round(Math.max(f,d/f));var m=h.getTilePixelSize(a,f,c);y.canvas.width=m[0],y.canvas.height=m[1];var w=f/d;if(1!==w){var g=Kt(this.Zc);rn(g,w,w),y.setTransform.apply(y,g)}var b=l.getTileCoordExtent(u,this.tmpExtent),x=d/p,M=Kt(this.Zc);rn(M,x,-x),on(M,-b[0],-b[3]);for(var _=0,S=s.length;_<S;++_){s[_].execute(y,w,M,0,!0,Ww[i.getRenderMode()])}r.renderedTileResolution=t.wantedResolution},n}(fm),$w=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kw=function(t){function n(n,i){var r=t.call(this)||this;return i&&!Array.isArray(n[0])?r.setFlatCoordinates(i,n):r.setCoordinates(n,i),r}return $w(n,t),n.prototype.appendPoint=function(t){this.flatCoordinates?g(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){if(r<gn(this.getExtent(),t,n))return r;for(var e=this.flatCoordinates,o=this.stride,s=0,u=e.length;s<u;s+=o){var a=hi(t,n,e[s],e[s+1]);if(a<r){r=a;for(var h=0;h<o;++h)i[h]=e[s+h];i.length=o}}return r},n.prototype.getCoordinates=function(){return pe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getPoint=function(t){var n=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||n<=t?null:new Se(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},n.prototype.getPoints=function(){for(var t=this.flatCoordinates,n=this.layout,i=this.stride,r=[],e=0,o=t.length;e<o;e+=i){var s=new Se(t.slice(e,e+i),n);r.push(s)}return r},n.prototype.getType=function(){return"MultiPoint"},n.prototype.intersectsExtent=function(t){for(var n=this.flatCoordinates,i=this.stride,r=0,e=n.length;r<e;r+=i){if(Mn(t,n[r],n[r+1]))return!0}return!1},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=oe(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Kr);function Hw(t,n,i,r,e,o,s){var u,a,h=(i-n)/r;if(1===h)u=n;else if(2===h)u=n,a=e;else if(0!==h){for(var f=t[n],c=t[n+1],l=0,v=[0],p=n+r;p<i;p+=r){var y=t[p],m=t[p+1];l+=Math.sqrt((y-f)*(y-f)+(m-c)*(m-c)),v.push(l),f=y,c=m}var w=e*l,g=d(v,w);g<0?(a=(w-v[-g-2])/(v[-g-1]-v[-g-2]),u=n+(-g-2)*r):u=n+g*r}var b=s>1?s:2,x=o||new Array(b);for(p=0;p<b;++p)x[p]=void 0===u?NaN:void 0===a?t[u+p]:di(t[u+p],t[u+r+p],a);return x}function Jw(t,n,i,r,e,o){if(i==n)return null;var s;if(e<t[n+r-1])return o?((s=t.slice(n,n+r))[r-1]=e,s):null;if(t[i-1]<e)return o?((s=t.slice(i-r,i))[r-1]=e,s):null;if(e==t[n+r-1])return t.slice(n,n+r);for(var u=n/r,a=i/r;u<a;){var h=u+a>>1;e<t[(h+1)*r-1]?a=h:u=h+1}var f=t[u*r-1];if(e==f)return t.slice((u-1)*r,(u-1)*r+r);var c=(e-f)/(t[(u+1)*r-1]-f);s=[];for(var l=0;l<r-1;++l)s.push(di(t[(u-1)*r+l],t[u*r+l],c));return s.push(e),s}function Qw(t,n,i,r,e,o,s){if(s)return Jw(t,n,i[i.length-1],r,e,o);var u;if(e<t[r-1])return o?((u=t.slice(0,r))[r-1]=e,u):null;if(t[t.length-1]<e)return o?((u=t.slice(t.length-r))[r-1]=e,u):null;for(var a=0,h=i.length;a<h;++a){var f=i[a];if(n!=f){if(e<t[n+r-1])return null;if(e<=t[f-1])return Jw(t,n,f,r,e,!1);n=f}}return null}var tg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ng=function(t){function n(n,i){var r=t.call(this)||this;return r.Jc=null,r.Qc=-1,r.wt=-1,r.gt=-1,void 0===i||Array.isArray(n[0])?r.setCoordinates(n,i):r.setFlatCoordinates(i,n),r}return tg(n,t),n.prototype.appendCoordinate=function(t){this.flatCoordinates?g(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){return r<gn(this.getExtent(),t,n)?r:(this.gt!=this.getRevision()&&(this.wt=Math.sqrt(Jr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.gt=this.getRevision()),ne(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.wt,!1,t,n,i,r))},n.prototype.forEachSegment=function(t){return Ce(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.getCoordinateAtM=function(t,n){if(this.layout!=Pt&&this.layout!=Ct)return null;var i=void 0!==n&&n;return Jw(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},n.prototype.getCoordinates=function(){return pe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getCoordinateAt=function(t,n){return Hw(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,this.stride)},n.prototype.getLength=function(){return gw(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},n.prototype.getFlatMidpoint=function(){return this.Qc!=this.getRevision()&&(this.Jc=this.getCoordinateAt(.5,this.Jc),this.Qc=this.getRevision()),this.Jc},n.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=ae(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new n(i,Tt)},n.prototype.getType=function(){return"LineString"},n.prototype.intersectsExtent=function(t){return ke(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=oe(this.flatCoordinates,0,t,this.stride),this.changed()},n}(Kr),ig=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rg=function(t){function n(n,i,r){var e=t.call(this)||this;if(e.bt=[],e.wt=-1,e.gt=-1,Array.isArray(n[0]))e.setCoordinates(n,i);else if(void 0!==i&&r)e.setFlatCoordinates(i,n),e.bt=r;else{for(var o=e.getLayout(),s=n,u=[],a=[],h=0,f=s.length;h<f;++h){var c=s[h];0===h&&(o=c.getLayout()),g(u,c.getFlatCoordinates()),a.push(u.length)}e.setFlatCoordinates(o,u),e.bt=a}return e}return ig(n,t),n.prototype.appendLineString=function(t){this.flatCoordinates?g(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.bt.push(this.flatCoordinates.length),this.changed()},n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),this.layout,this.bt.slice());return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){return r<gn(this.getExtent(),t,n)?r:(this.gt!=this.getRevision()&&(this.wt=Math.sqrt(Qr(this.flatCoordinates,0,this.bt,this.stride,0)),this.gt=this.getRevision()),ie(this.flatCoordinates,0,this.bt,this.stride,this.wt,!1,t,n,i,r))},n.prototype.getCoordinateAtM=function(t,n,i){if(this.layout!=Pt&&this.layout!=Ct||0===this.flatCoordinates.length)return null;var r=void 0!==n&&n,e=void 0!==i&&i;return Qw(this.flatCoordinates,0,this.bt,this.stride,t,r,e)},n.prototype.getCoordinates=function(){return ye(this.flatCoordinates,0,this.bt,this.stride)},n.prototype.getEnds=function(){return this.bt},n.prototype.getLineString=function(t){return t<0||this.bt.length<=t?null:new ng(this.flatCoordinates.slice(0===t?0:this.bt[t-1],this.bt[t]),this.layout)},n.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,n=this.bt,i=this.layout,r=[],e=0,o=0,s=n.length;o<s;++o){var u=n[o],a=new ng(t.slice(e,u),i);r.push(a),e=u}return r},n.prototype.getFlatMidpoints=function(){for(var t=[],n=this.flatCoordinates,i=0,r=this.bt,e=this.stride,o=0,s=r.length;o<s;++o){var u=r[o];g(t,Hw(n,i,u,e,.5)),i=u}return t},n.prototype.getSimplifiedGeometryInternal=function(t){var i=[],r=[];return i.length=he(this.flatCoordinates,0,this.bt,this.stride,t,i,0,r),new n(i,Tt,r)},n.prototype.getType=function(){return"MultiLineString"},n.prototype.intersectsExtent=function(t){return Ie(this.flatCoordinates,0,this.bt,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=se(this.flatCoordinates,0,t,this.stride,this.bt);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},n}(Kr);function eg(t,n,i,r){for(var e=[],o=[1/0,1/0,-1/0,-1/0],s=0,u=i.length;s<u;++s){var a=i[s];o=Tn(t,n,a[0],r),e.push((o[0]+o[2])/2,(o[1]+o[3])/2),n=a[a.length-1]}return e}var og=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sg=function(t){function n(n,i,r){var e=t.call(this)||this;if(e.tl=[],e.nl=-1,e.il=null,e.wt=-1,e.gt=-1,e._t=-1,e.St=null,!r&&!Array.isArray(n[0])){for(var o=e.getLayout(),s=n,u=[],a=[],h=0,f=s.length;h<f;++h){var c=s[h];0===h&&(o=c.getLayout());for(var l=u.length,v=c.getEnds(),d=0,p=v.length;d<p;++d)v[d]+=l;g(u,c.getFlatCoordinates()),a.push(v)}i=o,n=u,r=a}return void 0!==i&&r?(e.setFlatCoordinates(i,n),e.tl=r):e.setCoordinates(n,i),e}return og(n,t),n.prototype.appendPolygon=function(t){var n;if(this.flatCoordinates){var i=this.flatCoordinates.length;g(this.flatCoordinates,t.getFlatCoordinates());for(var r=0,e=(n=t.getEnds().slice()).length;r<e;++r)n[r]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),n=t.getEnds().slice(),this.tl.push();this.tl.push(n),this.changed()},n.prototype.clone=function(){for(var t=this.tl.length,i=new Array(t),r=0;r<t;++r)i[r]=this.tl[r].slice();var e=new n(this.flatCoordinates.slice(),this.layout,i);return e.applyProperties(this),e},n.prototype.closestPointXY=function(t,n,i,r){return r<gn(this.getExtent(),t,n)?r:(this.gt!=this.getRevision()&&(this.wt=Math.sqrt(te(this.flatCoordinates,0,this.tl,this.stride,0)),this.gt=this.getRevision()),re(this.getOrientedFlatCoordinates(),0,this.tl,this.stride,this.wt,!0,t,n,i,r))},n.prototype.containsXY=function(t,n){return Te(this.getOrientedFlatCoordinates(),0,this.tl,this.stride,t,n)},n.prototype.getArea=function(){return be(this.getOrientedFlatCoordinates(),0,this.tl,this.stride)},n.prototype.getCoordinates=function(t){var n;return void 0!==t?Ue(n=this.getOrientedFlatCoordinates().slice(),0,this.tl,this.stride,t):n=this.flatCoordinates,me(n,0,this.tl,this.stride)},n.prototype.getEndss=function(){return this.tl},n.prototype.getFlatInteriorPoints=function(){if(this.nl!=this.getRevision()){var t=eg(this.flatCoordinates,0,this.tl,this.stride);this.il=Pe(this.getOrientedFlatCoordinates(),0,this.tl,this.stride,t),this.nl=this.getRevision()}return this.il},n.prototype.getInteriorPoints=function(){return new Kw(this.getFlatInteriorPoints().slice(),Pt)},n.prototype.getOrientedFlatCoordinates=function(){if(this._t!=this.getRevision()){var t=this.flatCoordinates;De(t,0,this.tl,this.stride)?this.St=t:(this.St=t.slice(),this.St.length=Ue(this.St,0,this.tl,this.stride)),this._t=this.getRevision()}return this.St},n.prototype.getSimplifiedGeometryInternal=function(t){var i=[],r=[];return i.length=de(this.flatCoordinates,0,this.tl,this.stride,Math.sqrt(t),i,0,r),new n(i,Tt,r)},n.prototype.getPolygon=function(t){if(t<0||this.tl.length<=t)return null;var n;if(0===t)n=0;else{var i=this.tl[t-1];n=i[i.length-1]}var r=this.tl[t].slice(),e=r[r.length-1];if(0!==n)for(var o=0,s=r.length;o<s;++o)r[o]-=n;return new We(this.flatCoordinates.slice(n,e),this.layout,r)},n.prototype.getPolygons=function(){for(var t=this.layout,n=this.flatCoordinates,i=this.tl,r=[],e=0,o=0,s=i.length;o<s;++o){var u=i[o].slice(),a=u[u.length-1];if(0!==e)for(var h=0,f=u.length;h<f;++h)u[h]-=e;var c=new We(n.slice(e,a),t,u);r.push(c),e=a}return r},n.prototype.getType=function(){return"MultiPolygon"},n.prototype.intersectsExtent=function(t){return ze(this.getOrientedFlatCoordinates(),0,this.tl,this.stride,t)},n.prototype.setCoordinates=function(t,n){this.setLayout(n,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=ue(this.flatCoordinates,0,t,this.stride,this.tl);if(0===i.length)this.flatCoordinates.length=0;else{var r=i[i.length-1];this.flatCoordinates.length=0===r.length?0:r[r.length-1]}this.changed()},n}(Kr),ug=[1,0,0,1,0,0],ag=function(){function t(t,n,i,r,e){this.styleFunction,this.st,this.$=e,this.rl=t,this.el=n,this.il=null,this.sl=null,this.bt=i,this.ul=r}return t.prototype.get=function(t){return this.ul[t]},t.prototype.getExtent=function(){return this.st||(this.st="Point"===this.rl?En(this.el):Tn(this.el,0,this.el.length,2)),this.st},t.prototype.getFlatInteriorPoint=function(){if(!this.il){var t=qn(this.getExtent());this.il=Ae(this.el,0,this.bt,2,t,0)}return this.il},t.prototype.getFlatInteriorPoints=function(){if(!this.il){var t=eg(this.el,0,this.bt,2);this.il=Pe(this.el,0,this.bt,2,t)}return this.il},t.prototype.getFlatMidpoint=function(){return this.sl||(this.sl=Hw(this.el,0,this.el.length,2,.5)),this.sl},t.prototype.getFlatMidpoints=function(){if(!this.sl){this.sl=[];for(var t=this.el,n=0,i=this.bt,r=0,e=i.length;r<e;++r){var o=i[r],s=Hw(t,n,o,2,.5);g(this.sl,s),n=o}}return this.sl},t.prototype.getId=function(){return this.$},t.prototype.getOrientedFlatCoordinates=function(){return this.el},t.prototype.getGeometry=function(){return this},t.prototype.getSimplifiedGeometry=function(t){return this},t.prototype.simplifyTransformed=function(t,n){return this},t.prototype.getProperties=function(){return this.ul},t.prototype.getStride=function(){return 2},t.prototype.getStyleFunction=function(){return this.styleFunction},t.prototype.getType=function(){return this.rl},t.prototype.transform=function(t){var n=(t=yr(t)).getExtent(),i=t.getWorldExtent();if(n&&i){var r=Vn(i)/Vn(n);sn(ug,i[0],i[3],r,-r,0,0,0),Dr(this.el,0,this.el.length,2,ug,this.el)}},t.prototype.getEnds=function(){return this.bt},t}();function hg(t){var n=t.getType();switch(n){case"Point":return new Se(t.getFlatCoordinates());case"MultiPoint":return new Kw(t.getFlatCoordinates(),Tt);case"LineString":return new ng(t.getFlatCoordinates(),Tt);case"MultiLineString":return new rg(t.getFlatCoordinates(),Tt,t.getEnds());case"Polygon":var i=t.getFlatCoordinates(),r=t.getEnds(),e=Be(i,r);return e.length>1?new sg(i,Tt,e):new We(i,Tt,r);default:throw new Error("Invalid geometry type:"+n)}}ag.prototype.getEndss=ag.prototype.getEnds,ag.prototype.getFlatCoordinates=ag.prototype.getOrientedFlatCoordinates;var fg=ag;var cg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lg=function(t){function n(n){return t.call(this,n)||this}return cg(n,t),n.prototype.createRenderer=function(){return new Gw(this)},n}($m);function vg(t,n,i){for(var r,e,o,s,u,a,h=[],f=t(0),c=t(1),l=n(f),v=n(c),d=[c,f],p=[v,l],y=[1,0],m={},w=1e5;--w>0&&y.length>0;)o=y.pop(),f=d.pop(),l=p.pop(),(a=o.toString())in m||(h.push(l[0],l[1]),m[a]=!0),s=y.pop(),c=d.pop(),v=p.pop(),ai((e=n(r=t(u=(o+s)/2)))[0],e[1],l[0],l[1],v[0],v[1])<i?(h.push(v[0],v[1]),m[a=s.toString()]=!0):(y.push(s,u,u,o),p.push(v,e,e,l),d.push(c,r,r,f));return h}function dg(t,n,i,r,e){return vg((function(r){return[t,n+(i-n)*r]}),jr(yr("EPSG:4326"),r),e)}function pg(t,n,i,r,e){return vg((function(r){return[n+(i-n)*r,t]}),jr(yr("EPSG:4326"),r),e)}var yg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mg=new mv({color:"rgba(0,0,0,0.2)"}),wg=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],gg=function(t){function n(n){var i=this,r=n||{},e=A({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},r);return delete e.maxLines,delete e.strokeStyle,delete e.targetSize,delete e.showLabels,delete e.lonLabelFormatter,delete e.latLabelFormatter,delete e.lonLabelPosition,delete e.latLabelPosition,delete e.lonLabelStyle,delete e.latLabelStyle,delete e.intervals,(i=t.call(this,e)||this).di=null,i.al=1/0,i.hl=1/0,i.fl=-1/0,i.cl=-1/0,i.ll=1/0,i.vl=1/0,i.dl=-1/0,i.pl=-1/0,i.yl=void 0!==r.targetSize?r.targetSize:100,i.ml=void 0!==r.maxLines?r.maxLines:100,i.wl=[],i.gl=[],i.bl=void 0!==r.strokeStyle?r.strokeStyle:mg,i.xl=void 0,i.Ml=void 0,i._l=null,i.Sl=null,i.Ol=null,i.jl=null,i.El=null,i.Tl=null,i.Al=null,r.showLabels&&(i.Pl=null==r.lonLabelFormatter?Zi.bind(i,"EW"):r.lonLabelFormatter,i.Cl=null==r.latLabelFormatter?Zi.bind(i,"NS"):r.latLabelFormatter,i.kl=null==r.lonLabelPosition?0:r.lonLabelPosition,i.Il=null==r.latLabelPosition?1:r.latLabelPosition,i.Nl=new Sv({text:void 0!==r.lonLabelStyle?r.lonLabelStyle.clone():new Ev({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new rv({color:"rgba(0,0,0,1)"}),stroke:new mv({color:"rgba(255,255,255,1)",width:3})})}),i.Ll=function(t){var n=t.get("graticule_label");return this.Nl.getText().setText(n),this.Nl}.bind(i),i.zl=new Sv({text:void 0!==r.latLabelStyle?r.latLabelStyle.clone():new Ev({font:"12px Calibri,sans-serif",textAlign:"right",fill:new rv({color:"rgba(0,0,0,1)"}),stroke:new mv({color:"rgba(255,255,255,1)",width:3})})}),i.Rl=function(t){var n=t.get("graticule_label");return this.zl.getText().setText(n),this.zl}.bind(i),i.Tl=[],i.Al=[],i.addEventListener(ss,i.Fl.bind(i))),i.Gl=void 0!==r.intervals?r.intervals:wg,i.setSource(new ad({loader:i.loaderFunction.bind(i),strategy:i.strategyFunction.bind(i),features:new ft,overlaps:!1,useSpatialIndex:!1,wrapX:r.wrapX})),i.Dl=[],i.ql=new Sv({stroke:i.bl}),i.Ul=null,i.zh=null,i.Ic=null,i.setRenderOrder(null),i}return yg(n,t),n.prototype.strategyFunction=function(t,n){var i=t.slice();return this.di&&this.getSource().getWrapX()&&ii(i,this.di),this.Ul&&(Pn(this.Ul,i,n)?i=this.Ul.slice():this.getSource().removeLoadedExtent(this.Ul)),[i]},n.prototype.loaderFunction=function(t,n,i){this.Ul=t;var r=this.getSource(),e=Wn(this.getExtent()||[-1/0,-1/0,1/0,1/0],t);if(!(this.zh&&An(this.zh,e)&&this.Ic===n||(this.zh=e,this.Ic=n,Hn(e)))){var o=qn(e),s=n*n/4;(!this.di||!Sr(this.di,i))&&this.Bl(i),this.Xl(e,o,n,s);var u,a=this.wl.length+this.gl.length;for(this.Tl&&(a+=this.wl.length),this.Al&&(a+=this.gl.length);a>this.Dl.length;)u=new Et,this.Dl.push(u);var h=r.getFeaturesCollection();h.clear();var f,c,l=0;for(f=0,c=this.wl.length;f<c;++f)(u=this.Dl[l++]).setGeometry(this.wl[f]),u.setStyle(this.ql),h.push(u);for(f=0,c=this.gl.length;f<c;++f)(u=this.Dl[l++]).setGeometry(this.gl[f]),u.setStyle(this.ql),h.push(u)}},n.prototype.Vl=function(t,n,i,r,e,o){var s=this.Wl(t,n,i,r,o);if(Kn(s.getExtent(),e)){if(this.Tl){var u=this.Pl(t);o in this.Tl?this.Tl[o].text=u:this.Tl[o]={geom:new Se([]),text:u}}this.wl[o++]=s}return o},n.prototype.Yl=function(t,n,i,r,e,o){var s=this.Zl(t,n,i,r,o);if(Kn(s.getExtent(),e)){if(this.Al){var u=this.Cl(t);o in this.Al?this.Al[o].text=u:this.Al[o]={geom:new Se([]),text:u}}this.gl[o++]=s}return o},n.prototype.Fl=function(t){var n=t.frameState.viewState.rotation,i=t.frameState.viewState.resolution,r=t.frameState.size,e=t.frameState.extent,o=qn(e),s=e;if(n){var u=r[0]*i,a=r[1]*i;s=[o[0]-u/2,o[1]-a/2,o[0]+u/2,o[1]+a/2]}var h=0,f=0,c=this.Il<.5,l=this.di.getExtent(),v=$n(l);this.getSource().getWrapX()&&this.di.canWrapX()&&!xn(l,e)&&(h=Math.floor((e[0]-l[0])/v),f=Math.ceil((e[2]-l[2])/v),c=c!==Math.abs(n)>Math.PI/2);for(var d=ff(t),p=h;p<=f;++p){var y=this.wl.length+this.gl.length,m=void 0,w=void 0,g=void 0,b=void 0;if(this.Tl)for(w=0,g=this.Tl.length;w<g;++w){var x=this.wl[w];if(n||0!==p)(M=x.clone()).translate(p*v,0),M.rotate(-n,o),(b=this.$l(M,s,w)).rotate(n,o);else b=this.$l(x,e,w);(m=this.Dl[y++]).setGeometry(b),m.set("graticule_label",this.Tl[w].text),d.drawFeature(m,this.Ll(m))}if(this.Al&&(p===h&&c||p===f&&!c))for(w=0,g=this.gl.length;w<g;++w){var M;x=this.gl[w];if(n||0!==p)(M=x.clone()).translate(p*v,0),M.rotate(-n,o),(b=this.Kl(M,s,w)).rotate(n,o);else b=this.Kl(x,e,w);(m=this.Dl[y++]).setGeometry(b),m.set("graticule_label",this.Al[w].text),d.drawFeature(m,this.Rl(m))}}},n.prototype.Xl=function(t,n,i,r){var e=this.Hl(i);if(-1==e)return this.wl.length=0,this.gl.length=0,this.Tl&&(this.Tl.length=0),void(this.Al&&(this.Al.length=0));var o=!1,s=this.di.getExtent(),u=$n(s);this.getSource().getWrapX()&&this.di.canWrapX()&&!xn(s,t)&&($n(t)>=u?(t[0]=s[0],t[2]=s[2]):o=!0);var a=[oi(n[0],this.dl,this.ll),oi(n[1],this.pl,this.vl)],h=this.Ml(a);isNaN(h[1])&&(h[1]=Math.abs(this.al)>=Math.abs(this.fl)?this.al:this.fl);var f,c,l,v,d=oi(h[0],this.cl,this.hl),p=oi(h[1],this.fl,this.al),y=this.ml,m=t;o||(m=[oi(t[0],this.dl,this.ll),oi(t[1],this.pl,this.vl),oi(t[2],this.dl,this.ll),oi(t[3],this.pl,this.vl)]);var w=ni(m,this.Ml,void 0,8),g=w[3],b=w[2],x=w[1],M=w[0];if(o||(bn(m,this.Sl)&&(M=this.cl,x=this.fl),bn(m,this.Ol)&&(b=this.hl,x=this.fl),bn(m,this.jl)&&(M=this.cl,g=this.al),bn(m,this.El)&&(b=this.hl,g=this.al),g=oi(g,p,this.al),b=oi(b,d,this.hl),x=oi(x,this.fl,p),M=oi(M,this.cl,d)),v=oi(d=Math.floor(d/e)*e,this.cl,this.hl),c=this.Vl(v,x,g,r,t,0),f=0,o)for(;(v-=e)>=M&&f++<y;)c=this.Vl(v,x,g,r,t,c);else for(;v!=this.cl&&f++<y;)v=Math.max(v-e,this.cl),c=this.Vl(v,x,g,r,t,c);if(v=oi(d,this.cl,this.hl),f=0,o)for(;(v+=e)<=b&&f++<y;)c=this.Vl(v,x,g,r,t,c);else for(;v!=this.hl&&f++<y;)v=Math.min(v+e,this.hl),c=this.Vl(v,x,g,r,t,c);for(this.wl.length=c,this.Tl&&(this.Tl.length=c),l=oi(p=Math.floor(p/e)*e,this.fl,this.al),c=this.Yl(l,M,b,r,t,0),f=0;l!=this.fl&&f++<y;)l=Math.max(l-e,this.fl),c=this.Yl(l,M,b,r,t,c);for(l=oi(p,this.fl,this.al),f=0;l!=this.al&&f++<y;)l=Math.min(l+e,this.al),c=this.Yl(l,M,b,r,t,c);this.gl.length=c,this.Al&&(this.Al.length=c)},n.prototype.Hl=function(t){for(var n=this._l[0],i=this._l[1],r=-1,e=Math.pow(this.yl*t,2),o=[],s=[],u=0,a=this.Gl.length;u<a;++u){var h=oi(this.Gl[u]/2,0,90),f=oi(i,-90+h,90-h);if(o[0]=n-h,o[1]=f-h,s[0]=n+h,s[1]=f+h,this.xl(o,o),this.xl(s,s),Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)<=e)break;r=this.Gl[u]}return r},n.prototype.Wl=function(t,n,i,r,e){var o=dg(t,n,i,this.di,r),s=this.wl[e];return s?(s.setFlatCoordinates(Tt,o),s.changed()):(s=new ng(o,Tt),this.wl[e]=s),s},n.prototype.$l=function(t,n,i){var r=t.getFlatCoordinates(),e=1,o=r.length-1;r[e]>r[o]&&(e=o,o=1);var s=Math.max(n[1],r[e]),u=Math.min(n[3],r[o]),a=oi(n[1]+Math.abs(n[1]-n[3])*this.kl,s,u),h=[r[e-1]+(r[o-1]-r[e-1])*(a-r[e])/(r[o]-r[e]),a],f=this.Tl[i].geom;return f.setCoordinates(h),f},n.prototype.getMeridians=function(){return this.wl},n.prototype.Zl=function(t,n,i,r,e){var o=pg(t,n,i,this.di,r),s=this.gl[e];return s?(s.setFlatCoordinates(Tt,o),s.changed()):s=new ng(o,Tt),s},n.prototype.Kl=function(t,n,i){var r=t.getFlatCoordinates(),e=0,o=r.length-2;r[e]>r[o]&&(e=o,o=0);var s=Math.max(n[0],r[e]),u=Math.min(n[2],r[o]),a=oi(n[0]+Math.abs(n[0]-n[2])*this.Il,s,u),h=[a,r[e+1]+(r[o+1]-r[e+1])*(a-r[e])/(r[o]-r[e])],f=this.Al[i].geom;return f.setCoordinates(h),f},n.prototype.getParallels=function(){return this.gl},n.prototype.Bl=function(t){var n=yr("EPSG:4326"),i=t.getWorldExtent();this.al=i[3],this.hl=i[2],this.fl=i[1],this.cl=i[0];var r=jr(t,n);if(this.cl<this.hl)this.Ml=r;else{var e=this.cl+this.hl/2;this.hl+=360,this.Ml=function(t,n,i){for(var o=i||2,s=r(t,n,o),u=0,a=s.length;u<a;u+=o)s[u]<e&&(s[u]+=360);return s}}this.xl=jr(n,t);var o=ni([this.cl,this.fl,this.hl,this.al],this.xl,void 0,8);this.dl=o[0],this.ll=o[2],this.pl=o[1],this.vl=o[3],this.Sl=this.xl([this.cl,this.fl]),this.Ol=this.xl([this.hl,this.fl]),this.jl=this.xl([this.cl,this.al]),this.El=this.xl([this.hl,this.al]),this._l=this.Ml(qn(t.getExtent())),isNaN(this._l[1])&&(this._l[1]=Math.abs(this.al)>=Math.abs(this.fl)?this.al:this.fl),this.di=t},n}(lg),bg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xg="blur",Mg="gradient",_g="radius",Sg=["#00f","#0ff","#0f0","#ff0","#f00"];var Og=function(t){function n(n){var i=this,r=n||{},e=A({},r);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,(i=t.call(this,e)||this).Jl=null,i.addChangeListener(Mg,i.Ql),i.setGradient(r.gradient?r.gradient:Sg),i.setBlur(void 0!==r.blur?r.blur:15),i.setRadius(void 0!==r.radius?r.radius:8);var o=r.weight?r.weight:"weight";return i.tv="string"==typeof o?function(t){return t.get(o)}:o,i.setRenderOrder(null),i}return bg(n,t),n.prototype.getBlur=function(){return this.get(xg)},n.prototype.getGradient=function(){return this.get(Mg)},n.prototype.getRadius=function(){return this.get(_g)},n.prototype.Ql=function(){this.Jl=function(t){for(var n=1,i=256,r=_o(n,i),e=r.createLinearGradient(0,0,n,i),o=1/(t.length-1),s=0,u=t.length;s<u;++s)e.addColorStop(s*o,t[s]);return r.fillStyle=e,r.fillRect(0,0,n,i),r.canvas}(this.getGradient())},n.prototype.setBlur=function(t){this.set(xg,t)},n.prototype.setGradient=function(t){this.set(Mg,t)},n.prototype.setRadius=function(t){this.set(_g,t)},n.prototype.createRenderer=function(){return new Hm(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var n=this.tv(t);return void 0!==n?oi(n,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_weight;\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(_g)+this.get(xg))}.bind(this),u_blurSlope:function(){return this.get(_g)/Math.max(1,this.get(xg))}.bind(this)},postProcesses:[{fragmentShader:"\n            precision mediump float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n            uniform float u_opacity;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a * u_opacity;\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.Jl}.bind(this),u_opacity:function(){return this.getOpacity()}.bind(this)}}]})},n.prototype.renderDeclutter=function(){},n}($m),jg=function(){function t(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return t.prototype.getReadOptions=function(t,n){var i;if(n){var r=n.dataProjection?yr(n.dataProjection):this.readProjection(t);n.extent&&r&&r.getUnits()===Rt.TILE_PIXELS&&(r=yr(r)).setWorldExtent(n.extent),i={dataProjection:r,featureProjection:n.featureProjection}}return this.adaptOptions(i)},t.prototype.adaptOptions=function(t){return A({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return r()},t.prototype.readFeature=function(t,n){return r()},t.prototype.readFeatures=function(t,n){return r()},t.prototype.readGeometry=function(t,n){return r()},t.prototype.readProjection=function(t){return r()},t.prototype.writeFeature=function(t,n){return r()},t.prototype.writeFeatures=function(t,n){return r()},t.prototype.writeGeometry=function(t,n){return r()},t}();function Eg(t,n,i){var r,e=i?yr(i.featureProjection):null,o=i?yr(i.dataProjection):null;if(r=e&&o&&!Sr(e,o)?(n?t.clone():t).transform(n?e:o,n?o:e):t,n&&i&&void 0!==i.decimals){var s=Math.pow(10,i.decimals);r===t&&(r=t.clone()),r.applyTransform((function(t){for(var n=0,i=t.length;n<i;++n)t[n]=Math.round(t[n]*s)/s;return t}))}return r}function Tg(t,n){var i=n?yr(n.featureProjection):null,r=n?yr(n.dataProjection):null;return i&&r&&!Sr(i,r)?Tr(t,r,i):t}var Ag=i(98),Pg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Cg(t,n,i){if(3===t){var r={keys:[],values:[],features:[]},e=i.readVarint()+i.pos;i.readFields(kg,r,e),r.length=r.features.length,r.length&&(n[r.name]=r)}}function kg(t,n,i){if(15===t)n.version=i.readVarint();else if(1===t)n.name=i.readString();else if(5===t)n.extent=i.readVarint();else if(2===t)n.features.push(i.pos);else if(3===t)n.keys.push(i.readString());else if(4===t){for(var r=null,e=i.readVarint()+i.pos;i.pos<e;)r=1===(t=i.readVarint()>>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;n.values.push(r)}}function Ig(t,n,i){if(1==t)n.id=i.readVarint();else if(2==t)for(var r=i.readVarint()+i.pos;i.pos<r;){var e=n.layer.keys[i.readVarint()],o=n.layer.values[i.readVarint()];n.properties[e]=o}else 3==t?n.type=i.readVarint():4==t&&(n.geometry=i.pos)}function Ng(t,n,i){t.pos=n.features[i];var r=t.readVarint()+t.pos,e={layer:n,type:0,properties:{}};return t.readFields(Ig,e,r),e}var Lg=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.dataProjection=new ei({code:"",units:Rt.TILE_PIXELS}),i.nv=r.featureClass?r.featureClass:fg,i.K=r.geometryName,i.iv=r.layerName?r.layerName:"layer",i.Uh=r.layers?r.layers:null,i.rv=r.idProperty,i.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],i}return Pg(n,t),n.prototype.ev=function(t,n,i,r){t.pos=n.geometry;for(var e=t.readVarint()+t.pos,o=1,s=0,u=0,a=0,h=0,f=0;t.pos<e;){if(!s){var c=t.readVarint();o=7&c,s=c>>3}s--,1===o||2===o?(u+=t.readSVarint(),a+=t.readSVarint(),1===o&&h>f&&(r.push(h),f=h),i.push(u,a),h+=2):7===o?h>f&&(i.push(i[f],i[f+1]),h+=2):St(!1,59)}h>f&&(r.push(h),f=h)},n.prototype.ov=function(t,n,i){var r,e=n.type;if(0===e)return null;var o,s=n.properties;this.rv?(o=s[this.rv],delete s[this.rv]):o=n.id,s[this.iv]=n.layer.name;var u=[],a=[];this.ev(t,n,u,a);var h=function(t,n){var i;1===t?i=1===n?"Point":"MultiPoint":2===t?i=1===n?"LineString":"MultiLineString":3===t&&(i="Polygon");return i}(e,a.length);if(this.nv===fg)(r=new this.nv(h,u,a,s,o)).transform(i.dataProjection);else{var f=void 0;if("Polygon"==h){var c=Be(u,a);f=c.length>1?new sg(u,Tt,c):new We(u,Tt,a)}else f="Point"===h?new Se(u,Tt):"LineString"===h?new ng(u,Tt):"MultiPoint"===h?new Kw(u,Tt):"MultiLineString"===h?new rg(u,Tt,a):null;r=new(0,this.nv),this.K&&r.setGeometryName(this.K);var l=Eg(f,!1,i);r.setGeometry(l),void 0!==o&&r.setId(o),r.setProperties(s,!0)}return r},n.prototype.getType=function(){return"arraybuffer"},n.prototype.readFeatures=function(t,n){var i=this.Uh,r=this.adaptOptions(n),e=yr(r.dataProjection);e.setWorldExtent(r.extent),r.dataProjection=e;var o=new Ag(t),s=o.readFields(Cg,{}),u=[];for(var a in s)if(!i||-1!=i.indexOf(a)){var h=s[a],f=h?[0,0,h.extent,h.extent]:null;e.setExtent(f);for(var c=0,l=h.length;c<l;++c){var v=Ng(o,h,c),d=this.ov(o,v,r);null!==d&&u.push(d)}}return u},n.prototype.readProjection=function(t){return this.dataProjection},n.prototype.setLayers=function(t){this.Uh=t},n}(jg),zg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Rg=function(t){function n(n){var i=this,r=n||{},e=A({},r);delete e.preload,delete e.useInterimTilesOnError,(i=t.call(this,e)||this).on,i.once,i.un,r.renderMode===Uw&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),r.renderMode=void 0);var o=r.renderMode||Bw;return St(o==Bw||o==Xw,28),i.sv=o,i.setPreload(r.preload?r.preload:0),i.setUseInterimTilesOnError(void 0===r.useInterimTilesOnError||r.useInterimTilesOnError),i.getBackground,i.setBackground,i}return zg(n,t),n.prototype.createRenderer=function(){return new Zw(this)},n.prototype.getFeatures=function(n){return t.prototype.getFeatures.call(this,n)},n.prototype.getRenderMode=function(){return this.sv},n.prototype.getPreload=function(){return this.get(om)},n.prototype.getUseInterimTilesOnError=function(){return this.get(sm)},n.prototype.setPreload=function(t){this.set(om,t)},n.prototype.setUseInterimTilesOnError=function(t){this.set(sm,t)},n}($m),Fg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Gg(t){for(var n=[],i=0,r=t.length;i<r;++i)n.push(t[i].clone());return n}var Dg=function(t){function n(n){var i=t.call(this)||this;return i.uv=n||null,i.av=[],i.hv(),i}return Fg(n,t),n.prototype.fv=function(){this.av.forEach(H),this.av.length=0},n.prototype.hv=function(){if(this.uv)for(var t=0,n=this.uv.length;t<n;++t)this.av.push($(this.uv[t],L,this.changed,this))},n.prototype.clone=function(){var t=new n(null);return t.setGeometries(this.uv),t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){if(r<gn(this.getExtent(),t,n))return r;for(var e=this.uv,o=0,s=e.length;o<s;++o)r=e[o].closestPointXY(t,n,i,r);return r},n.prototype.containsXY=function(t,n){for(var i=this.uv,r=0,e=i.length;r<e;++r)if(i[r].containsXY(t,n))return!0;return!1},n.prototype.computeExtent=function(t){jn(t);for(var n=this.uv,i=0,r=n.length;i<r;++i)Cn(t,n[i].getExtent());return t},n.prototype.getGeometries=function(){return Gg(this.uv)},n.prototype.getGeometriesArray=function(){return this.uv},n.prototype.getGeometriesArrayRecursive=function(){for(var t=[],n=this.uv,i=0,r=n.length;i<r;++i)n[i].getType()===this.getType()?t=t.concat(n[i].getGeometriesArrayRecursive()):t.push(n[i]);return t},n.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;for(var i=[],r=this.uv,e=!1,o=0,s=r.length;o<s;++o){var u=r[o],a=u.getSimplifiedGeometry(t);i.push(a),a!==u&&(e=!0)}if(e){var h=new n(null);return h.setGeometriesArray(i),h}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},n.prototype.getType=function(){return"GeometryCollection"},n.prototype.intersectsExtent=function(t){for(var n=this.uv,i=0,r=n.length;i<r;++i)if(n[i].intersectsExtent(t))return!0;return!1},n.prototype.isEmpty=function(){return 0===this.uv.length},n.prototype.rotate=function(t,n){for(var i=this.uv,r=0,e=i.length;r<e;++r)i[r].rotate(t,n);this.changed()},n.prototype.scale=function(t,n,i){var r=i;r||(r=qn(this.getExtent()));for(var e=this.uv,o=0,s=e.length;o<s;++o)e[o].scale(t,n,r);this.changed()},n.prototype.setGeometries=function(t){this.setGeometriesArray(Gg(t))},n.prototype.setGeometriesArray=function(t){this.fv(),this.uv=t,this.hv(),this.changed()},n.prototype.applyTransform=function(t){for(var n=this.uv,i=0,r=n.length;i<r;++i)n[i].applyTransform(t);this.changed()},n.prototype.translate=function(t,n){for(var i=this.uv,r=0,e=i.length;r<e;++r)i[r].translate(t,n);this.changed()},n.prototype.disposeInternal=function(){this.fv(),t.prototype.disposeInternal.call(this)},n}(Wr),qg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Ug(t){if("string"==typeof t){var n=JSON.parse(t);return n||null}return null!==t?t:null}var Bg=function(t){function n(){return t.call(this)||this}return qg(n,t),n.prototype.getType=function(){return"json"},n.prototype.readFeature=function(t,n){return this.readFeatureFromObject(Ug(t),this.getReadOptions(t,n))},n.prototype.readFeatures=function(t,n){return this.readFeaturesFromObject(Ug(t),this.getReadOptions(t,n))},n.prototype.readFeatureFromObject=function(t,n){return r()},n.prototype.readFeaturesFromObject=function(t,n){return r()},n.prototype.readGeometry=function(t,n){return this.readGeometryFromObject(Ug(t),this.getReadOptions(t,n))},n.prototype.readGeometryFromObject=function(t,n){return r()},n.prototype.readProjection=function(t){return this.readProjectionFromObject(Ug(t))},n.prototype.readProjectionFromObject=function(t){return r()},n.prototype.writeFeature=function(t,n){return JSON.stringify(this.writeFeatureObject(t,n))},n.prototype.writeFeatureObject=function(t,n){return r()},n.prototype.writeFeatures=function(t,n){return JSON.stringify(this.writeFeaturesObject(t,n))},n.prototype.writeFeaturesObject=function(t,n){return r()},n.prototype.writeGeometry=function(t,n){return JSON.stringify(this.writeGeometryObject(t,n))},n.prototype.writeGeometryObject=function(t,n){return r()},n}(jg),Xg=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Vg(t,n){if(!t)return null;var i;switch(t.type){case"Point":i=function(t){return new Se(t.coordinates)}(t);break;case"LineString":i=function(t){return new ng(t.coordinates)}(t);break;case"Polygon":i=function(t){return new We(t.coordinates)}(t);break;case"MultiPoint":i=function(t){return new Kw(t.coordinates)}(t);break;case"MultiLineString":i=function(t){return new rg(t.coordinates)}(t);break;case"MultiPolygon":i=function(t){return new sg(t.coordinates)}(t);break;case"GeometryCollection":i=function(t,n){var i=t.geometries.map((function(t){return Vg(t,n)}));return new Dg(i)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return Eg(i,!1,n)}function Wg(t,n){var i,r=(t=Eg(t,!0,n)).getType();switch(r){case"Point":i=function(t,n){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case"LineString":i=function(t,n){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case"Polygon":i=function(t,n){var i;n&&(i=n.rightHanded);return{type:"Polygon",coordinates:t.getCoordinates(i)}}(t,n);break;case"MultiPoint":i=function(t,n){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case"MultiLineString":i=function(t,n){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case"MultiPolygon":i=function(t,n){var i;n&&(i=n.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(i)}}(t,n);break;case"GeometryCollection":i=function(t,n){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map((function(t){var i=A({},n);return delete i.featureProjection,Wg(t,i)}))}}(t,n);break;case"Circle":i={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+r)}return i}var Yg,Zg=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this)||this).dataProjection=yr(r.dataProjection?r.dataProjection:"EPSG:4326"),r.featureProjection&&(i.defaultFeatureProjection=yr(r.featureProjection)),i.K=r.geometryName,i.cv=r.extractGeometryName,i.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],i}return Xg(n,t),n.prototype.readFeatureFromObject=function(t,n){var i=null,r=Vg((i="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,n),e=new Et;return this.K?e.setGeometryName(this.K):this.cv&&"geometry_name"in i!==void 0&&e.setGeometryName(i.geometry_name),e.setGeometry(r),"id"in i&&e.setId(i.id),i.properties&&e.setProperties(i.properties,!0),e},n.prototype.readFeaturesFromObject=function(t,n){var i=null;if("FeatureCollection"===t.type){i=[];for(var r=t.features,e=0,o=r.length;e<o;++e)i.push(this.readFeatureFromObject(r[e],n))}else i=[this.readFeatureFromObject(t,n)];return i},n.prototype.readGeometryFromObject=function(t,n){return Vg(t,n)},n.prototype.readProjectionFromObject=function(t){var n,i=t.crs;return i?"name"==i.type?n=yr(i.properties.name):"EPSG"===i.type?n=yr("EPSG:"+i.properties.code):St(!1,36):n=this.dataProjection,n},n.prototype.writeFeatureObject=function(t,n){n=this.adaptOptions(n);var i={type:"Feature",geometry:null,properties:null},r=t.getId();if(void 0!==r&&(i.id=r),!t.hasProperties())return i;var e=t.getProperties(),o=t.getGeometry();return o&&(i.geometry=Wg(o,n),delete e[t.getGeometryName()]),k(e)||(i.properties=e),i},n.prototype.writeFeaturesObject=function(t,n){n=this.adaptOptions(n);for(var i=[],r=0,e=t.length;r<e;++r)i.push(this.writeFeatureObject(t[r],n));return{type:"FeatureCollection",features:i}},n.prototype.writeGeometryObject=function(t,n){return Wg(t,this.adaptOptions(n))},n}(Bg),$g={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],chartreuse:[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],green:[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],mediumslateblue:[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 Kg(t){return(t=Math.round(t))<0?0:t>255?255:t}function Hg(t){return t<0?0:t>1?1:t}function Jg(t){return"%"===t[t.length-1]?Kg(parseFloat(t)/100*255):Kg(parseInt(t))}function Qg(t){return"%"===t[t.length-1]?Hg(parseFloat(t)/100):Hg(parseFloat(t))}function tb(t,n,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(n-t)*i*6:2*i<1?n:3*i<2?t+(n-t)*(2/3-i)*6:t}try{Yg={}.parseCSSColor=function(t){var n,i=t.replace(/ /g,"").toLowerCase();if(i in $g)return $g[i].slice();if("#"===i[0])return 4===i.length?(n=parseInt(i.substr(1),16))>=0&&n<=4095?[(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1]:null:7===i.length&&(n=parseInt(i.substr(1),16))>=0&&n<=16777215?[(16711680&n)>>16,(65280&n)>>8,255&n,1]:null;var r=i.indexOf("("),e=i.indexOf(")");if(-1!==r&&e+1===i.length){var o=i.substr(0,r),s=i.substr(r+1,e-(r+1)).split(","),u=1;switch(o){case"rgba":if(4!==s.length)return null;u=Qg(s.pop());case"rgb":return 3!==s.length?null:[Jg(s[0]),Jg(s[1]),Jg(s[2]),u];case"hsla":if(4!==s.length)return null;u=Qg(s.pop());case"hsl":if(3!==s.length)return null;var a=(parseFloat(s[0])%360+360)%360/360,h=Qg(s[1]),f=Qg(s[2]),c=f<=.5?f*(h+1):f+h-f*h,l=2*f-c;return[Kg(255*tb(l,c,a+1/3)),Kg(255*tb(l,c,a)),Kg(255*tb(l,c,a-1/3)),u];default:return null}}return null}}catch(t){}var nb=function(t,n,i,r){void 0===r&&(r=1),this.r=t,this.g=n,this.b=i,this.a=r};function ib(t){return"object"==typeof t?["literal",t]:t}function rb(t,n){var i=t.stops;if(!i)return function(t,n){var i=["get",t.property];if(void 0===t.default)return"string"===n.type?["string",i]:i;if("enum"===n.type)return["match",i,Object.keys(n.values),i,t.default];var r=["color"===n.type?"to-color":n.type,i,ib(t.default)];return"array"===n.type&&r.splice(1,0,n.value,n.length||null),r}(t,n);var r=i&&"object"==typeof i[0][0],e=r||void 0!==t.property,o=r||!e;return i=i.map((function(t){return!e&&n.tokens&&"string"==typeof t[1]?[t[0],fb(t[1])]:[t[0],ib(t[1])]})),r?function(t,n,i){for(var r={},e={},o=[],s=0;s<i.length;s++){var u=i[s],a=u[0].zoom;void 0===r[a]&&(r[a]={zoom:a,type:t.type,property:t.property,default:t.default},e[a]=[],o.push(a)),e[a].push([u[0].value,u[1]])}if("exponential"===hb({},n)){for(var h=[eb(t),["linear"],["zoom"]],f=0,c=o;f<c.length;f+=1){var l=c[f];ab(h,l,sb(r[l],n,e[l]),!1)}return h}for(var v=["step",["zoom"]],d=0,p=o;d<p.length;d+=1){var y=p[d];ab(v,y,sb(r[y],n,e[y]),!0)}return ub(v),v}(t,n,i):o?function(t,n,i,r){void 0===r&&(r=["zoom"]);var e,o=hb(t,n),s=!1;if("interval"===o)e=["step",r],s=!0;else{if("exponential"!==o)throw new Error('Unknown zoom function type "'+o+'"');var u=void 0!==t.base?t.base:1;e=[eb(t),1===u?["linear"]:["exponential",u],r]}for(var a=0,h=i;a<h.length;a+=1){var f=h[a];ab(e,f[0],f[1],s)}return ub(e),e}(t,n,i):sb(t,n,i)}function eb(t){switch(t.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function ob(t,n){var i,r,e=ib((i=t.default,r=n.default,void 0!==i?i:void 0!==r?r:void 0));return void 0===e&&"resolvedImage"===n.type?"":e}function sb(t,n,i){var r=hb(t,n),e=["get",t.property];if("categorical"===r&&"boolean"==typeof i[0][0]){for(var o=["case"],s=0,u=i;s<u.length;s+=1){var a=u[s];o.push(["==",e,a[0]],a[1])}return o.push(ob(t,n)),o}if("categorical"===r){for(var h=["match",e],f=0,c=i;f<c.length;f+=1){var l=c[f];ab(h,l[0],l[1],!1)}return h.push(ob(t,n)),h}if("interval"===r){for(var v=["step",["number",e]],d=0,p=i;d<p.length;d+=1){var y=p[d];ab(v,y[0],y[1],!0)}return ub(v),void 0===t.default?v:["case",["==",["typeof",e],"number"],v,ib(t.default)]}if("exponential"===r){for(var m=void 0!==t.base?t.base:1,w=[eb(t),1===m?["linear"]:["exponential",m],["number",e]],g=0,b=i;g<b.length;g+=1){var x=b[g];ab(w,x[0],x[1],!1)}return void 0===t.default?w:["case",["==",["typeof",e],"number"],w,ib(t.default)]}throw new Error("Unknown property function type "+r)}function ub(t){"step"===t[0]&&3===t.length&&(t.push(0),t.push(t[3]))}function ab(t,n,i,r){t.length>3&&n===t[t.length-2]||(r&&2===t.length||t.push(n),t.push(i))}function hb(t,n){return t.type?t.type:n.expression.interpolated?"exponential":"interval"}function fb(t){for(var n=["concat"],i=/{([^{}]+)}/g,r=0,e=i.exec(t);null!==e;e=i.exec(t)){var o=t.slice(r,i.lastIndex-e[0].length);r=i.lastIndex,o.length>0&&n.push(o),n.push(["get",e[1]])}if(1===n.length)return t;if(r<t.length)n.push(t.slice(r));else if(2===n.length)return["to-string",n[1]];return n}nb.parse=function(t){if(t){if(t instanceof nb)return t;if("string"==typeof t){var n=Yg(t);if(n)return new nb(n[0]/255*n[3],n[1]/255*n[3],n[2]/255*n[3],n[3])}}},nb.prototype.toString=function(){var t=this.toArray(),n=t[0],i=t[1],r=t[2],e=t[3];return"rgba("+Math.round(n)+","+Math.round(i)+","+Math.round(r)+","+e+")"},nb.prototype.toArray=function(){var t=this,n=t.r,i=t.g,r=t.b,e=t.a;return 0===e?[0,0,0,0]:[255*n/e,255*i/e,255*r/e,e]},nb.black=new nb(0,0,0,1),nb.white=new nb(1,1,1,1),nb.transparent=new nb(0,0,0,0),nb.red=new nb(1,0,0,1),nb.blue=new nb(0,0,1,1);var cb=function(t){function n(n,i){t.call(this,i),this.message=i,this.key=n}return t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n,n}(Error),lb=function(t,n){void 0===n&&(n=[]),this.parent=t,this.bindings={};for(var i=0,r=n;i<r.length;i+=1){var e=r[i],o=e[0],s=e[1];this.bindings[o]=s}};lb.prototype.concat=function(t){return new lb(this,t)},lb.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.")},lb.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var vb={kind:"null"},db={kind:"number"},pb={kind:"string"},yb={kind:"boolean"},mb={kind:"color"},wb={kind:"object"},gb={kind:"value"},bb={kind:"collator"},xb={kind:"formatted"},Mb={kind:"resolvedImage"};function _b(t,n){return{kind:"array",itemType:t,N:n}}function Sb(t){if("array"===t.kind){var n=Sb(t.itemType);return"number"==typeof t.N?"array<"+n+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+n+">"}return t.kind}var Ob=[vb,db,pb,yb,mb,xb,wb,_b(gb),Mb];function jb(t,n){if("error"===n.kind)return null;if("array"===t.kind){if("array"===n.kind&&(0===n.N&&"value"===n.itemType.kind||!jb(t.itemType,n.itemType))&&("number"!=typeof t.N||t.N===n.N))return null}else{if(t.kind===n.kind)return null;if("value"===t.kind)for(var i=0,r=Ob;i<r.length;i+=1){if(!jb(r[i],n))return null}}return"Expected "+Sb(t)+" but found "+Sb(n)+" instead."}function Eb(t,n){return n.some((function(n){return n.kind===t.kind}))}function Tb(t,n){return n.some((function(n){return"null"===n?null===t:"array"===n?Array.isArray(t):"object"===n?t&&!Array.isArray(t)&&"object"==typeof t:n===typeof t}))}var Ab=function(t,n,i){this.sensitivity=t?n?"variant":"case":n?"accent":"base",this.locale=i,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Ab.prototype.compare=function(t,n){return this.collator.compare(t,n)},Ab.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Pb=function(t,n,i,r,e){this.text=t.normalize?t.normalize():t,this.image=n,this.scale=i,this.fontStack=r,this.textColor=e},Cb=function(t){this.sections=t};Cb.fromString=function(t){return new Cb([new Pb(t,null,null,null,null)])},Cb.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}))},Cb.factory=function(t){return t instanceof Cb?t:Cb.fromString(t)},Cb.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},Cb.prototype.serialize=function(){for(var t=["format"],n=0,i=this.sections;n<i.length;n+=1){var r=i[n];if(r.image)t.push(["image",r.image.name]);else{t.push(r.text);var e={};r.fontStack&&(e["text-font"]=["literal",r.fontStack.split(",")]),r.scale&&(e["font-scale"]=r.scale),r.textColor&&(e["text-color"]=["rgba"].concat(r.textColor.toArray())),t.push(e)}}return t};var kb=function(t){this.name=t.name,this.available=t.available};function Ib(t,n,i,r){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof n&&n>=0&&n<=255&&"number"==typeof i&&i>=0&&i<=255?void 0===r||"number"==typeof r&&r>=0&&r<=1?null:"Invalid rgba value ["+[t,n,i,r].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof r?[t,n,i,r]:[t,n,i]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Nb(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 nb)return!0;if(t instanceof Ab)return!0;if(t instanceof Cb)return!0;if(t instanceof kb)return!0;if(Array.isArray(t)){for(var n=0,i=t;n<i.length;n+=1){if(!Nb(i[n]))return!1}return!0}if("object"==typeof t){for(var r in t)if(!Nb(t[r]))return!1;return!0}return!1}function Lb(t){if(null===t)return vb;if("string"==typeof t)return pb;if("boolean"==typeof t)return yb;if("number"==typeof t)return db;if(t instanceof nb)return mb;if(t instanceof Ab)return bb;if(t instanceof Cb)return xb;if(t instanceof kb)return Mb;if(Array.isArray(t)){for(var n,i=t.length,r=0,e=t;r<e.length;r+=1){var o=Lb(e[r]);if(n){if(n===o)continue;n=gb;break}n=o}return _b(n||gb,i)}return wb}function zb(t){var n=typeof t;return null===t?"":"string"===n||"number"===n||"boolean"===n?String(t):t instanceof nb||t instanceof Cb||t instanceof kb?t.toString():JSON.stringify(t)}kb.prototype.toString=function(){return this.name},kb.fromString=function(t){return t?new kb({name:t,available:!1}):null},kb.prototype.serialize=function(){return["image",this.name]};var Rb=function(t,n){this.type=t,this.value=n};Rb.parse=function(t,n){if(2!==t.length)return n.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!Nb(t[1]))return n.error("invalid value");var i=t[1],r=Lb(i),e=n.expectedType;return"array"!==r.kind||0!==r.N||!e||"array"!==e.kind||"number"==typeof e.N&&0!==e.N||(r=e),new Rb(r,i)},Rb.prototype.evaluate=function(){return this.value},Rb.prototype.eachChild=function(){},Rb.prototype.outputDefined=function(){return!0},Rb.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof nb?["rgba"].concat(this.value.toArray()):this.value instanceof Cb?this.value.serialize():this.value};var Fb=function(t){this.name="ExpressionEvaluationError",this.message=t};Fb.prototype.toJSON=function(){return this.message};var Gb={string:pb,number:db,boolean:yb,object:wb},Db=function(t,n){this.type=t,this.args=n};Db.parse=function(t,n){if(t.length<2)return n.error("Expected at least one argument.");var i,r=1,e=t[0];if("array"===e){var o,s;if(t.length>2){var u=t[1];if("string"!=typeof u||!(u in Gb)||"object"===u)return n.error('The item type argument of "array" must be one of string, number, boolean',1);o=Gb[u],r++}else o=gb;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return n.error('The length argument to "array" must be a positive integer literal',2);s=t[2],r++}i=_b(o,s)}else i=Gb[e];for(var a=[];r<t.length;r++){var h=n.parse(t[r],r,gb);if(!h)return null;a.push(h)}return new Db(i,a)},Db.prototype.evaluate=function(t){for(var n=0;n<this.args.length;n++){var i=this.args[n].evaluate(t);if(!jb(this.type,Lb(i)))return i;if(n===this.args.length-1)throw new Fb("Expected value to be of type "+Sb(this.type)+", but found "+Sb(Lb(i))+" instead.")}return null},Db.prototype.eachChild=function(t){this.args.forEach(t)},Db.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},Db.prototype.serialize=function(){var t=this.type,n=[t.kind];if("array"===t.kind){var i=t.itemType;if("string"===i.kind||"number"===i.kind||"boolean"===i.kind){n.push(i.kind);var r=t.N;("number"==typeof r||this.args.length>1)&&n.push(r)}}return n.concat(this.args.map((function(t){return t.serialize()})))};var qb=function(t){this.type=xb,this.sections=t};qb.parse=function(t,n){if(t.length<2)return n.error("Expected at least one argument.");var i=t[1];if(!Array.isArray(i)&&"object"==typeof i)return n.error("First argument must be an image or text section.");for(var r=[],e=!1,o=1;o<=t.length-1;++o){var s=t[o];if(e&&"object"==typeof s&&!Array.isArray(s)){e=!1;var u=null;if(s["font-scale"]&&!(u=n.parse(s["font-scale"],1,db)))return null;var a=null;if(s["text-font"]&&!(a=n.parse(s["text-font"],1,_b(pb))))return null;var h=null;if(s["text-color"]&&!(h=n.parse(s["text-color"],1,mb)))return null;var f=r[r.length-1];f.scale=u,f.font=a,f.textColor=h}else{var c=n.parse(t[o],1,gb);if(!c)return null;var l=c.type.kind;if("string"!==l&&"value"!==l&&"null"!==l&&"resolvedImage"!==l)return n.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");e=!0,r.push({content:c,scale:null,font:null,textColor:null})}}return new qb(r)},qb.prototype.evaluate=function(t){return new Cb(this.sections.map((function(n){var i=n.content.evaluate(t);return Lb(i)===Mb?new Pb("",i,null,null,null):new Pb(zb(i),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null)})))},qb.prototype.eachChild=function(t){for(var n=0,i=this.sections;n<i.length;n+=1){var r=i[n];t(r.content),r.scale&&t(r.scale),r.font&&t(r.font),r.textColor&&t(r.textColor)}},qb.prototype.outputDefined=function(){return!1},qb.prototype.serialize=function(){for(var t=["format"],n=0,i=this.sections;n<i.length;n+=1){var r=i[n];t.push(r.content.serialize());var e={};r.scale&&(e["font-scale"]=r.scale.serialize()),r.font&&(e["text-font"]=r.font.serialize()),r.textColor&&(e["text-color"]=r.textColor.serialize()),t.push(e)}return t};var Ub=function(t){this.type=Mb,this.input=t};Ub.parse=function(t,n){if(2!==t.length)return n.error("Expected two arguments.");var i=n.parse(t[1],1,pb);return i?new Ub(i):n.error("No image name provided.")},Ub.prototype.evaluate=function(t){var n=this.input.evaluate(t),i=kb.fromString(n);return i&&t.availableImages&&(i.available=t.availableImages.indexOf(n)>-1),i},Ub.prototype.eachChild=function(t){t(this.input)},Ub.prototype.outputDefined=function(){return!1},Ub.prototype.serialize=function(){return["image",this.input.serialize()]};var Bb={"to-boolean":yb,"to-color":mb,"to-number":db,"to-string":pb},Xb=function(t,n){this.type=t,this.args=n};Xb.parse=function(t,n){if(t.length<2)return n.error("Expected at least one argument.");var i=t[0];if(("to-boolean"===i||"to-string"===i)&&2!==t.length)return n.error("Expected one argument.");for(var r=Bb[i],e=[],o=1;o<t.length;o++){var s=n.parse(t[o],o,gb);if(!s)return null;e.push(s)}return new Xb(r,e)},Xb.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var n,i,r=0,e=this.args;r<e.length;r+=1){if(i=null,(n=e[r].evaluate(t))instanceof nb)return n;if("string"==typeof n){var o=t.parseColor(n);if(o)return o}else if(Array.isArray(n)&&!(i=n.length<3||n.length>4?"Invalid rbga value "+JSON.stringify(n)+": expected an array containing either three or four numeric values.":Ib(n[0],n[1],n[2],n[3])))return new nb(n[0]/255,n[1]/255,n[2]/255,n[3])}throw new Fb(i||"Could not parse color from value '"+("string"==typeof n?n:String(JSON.stringify(n)))+"'")}if("number"===this.type.kind){for(var s=null,u=0,a=this.args;u<a.length;u+=1){if(null===(s=a[u].evaluate(t)))return 0;var h=Number(s);if(!isNaN(h))return h}throw new Fb("Could not convert "+JSON.stringify(s)+" to number.")}return"formatted"===this.type.kind?Cb.fromString(zb(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?kb.fromString(zb(this.args[0].evaluate(t))):zb(this.args[0].evaluate(t))},Xb.prototype.eachChild=function(t){this.args.forEach(t)},Xb.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},Xb.prototype.serialize=function(){if("formatted"===this.type.kind)return new qb([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new Ub(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(n){t.push(n.serialize())})),t};var Vb=["Unknown","Point","LineString","Polygon"],Wb=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null};Wb.prototype.id=function(){return this.feature&&"id"in this.feature&&this.feature.id?this.feature.id:null},Wb.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?Vb[this.feature.type]:this.feature.type:null},Wb.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Wb.prototype.canonicalID=function(){return this.canonical},Wb.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Wb.prototype.distanceFromCenter=function(){if(this.featureTileCoord&&this.featureDistanceData){var t=this.featureDistanceData.center,n=this.featureDistanceData.scale,i=this.featureTileCoord,r=i.x,e=i.y,o=r*n-t[0],s=e*n-t[1];return this.featureDistanceData.bearing[0]*o+this.featureDistanceData.bearing[1]*s}return 0},Wb.prototype.parseColor=function(t){var n=this._parseColorCache[t];return n||(n=this._parseColorCache[t]=nb.parse(t)),n};var Yb=function(t,n,i,r){this.name=t,this.type=n,this._evaluate=i,this.args=r};Yb.prototype.evaluate=function(t){return this._evaluate(t,this.args)},Yb.prototype.eachChild=function(t){this.args.forEach(t)},Yb.prototype.outputDefined=function(){return!1},Yb.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},Yb.parse=function(t,n){var i,r=t[0],e=Yb.definitions[r];if(!e)return n.error('Unknown expression "'+r+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(e)?e[0]:e.type,s=Array.isArray(e)?[[e[1],e[2]]]:e.overloads,u=s.filter((function(n){var i=n[0];return!Array.isArray(i)||i.length===t.length-1})),a=null,h=0,f=u;h<f.length;h+=1){var c=f[h],l=c[0],v=c[1];a=new mx(n.registry,n.path,null,n.scope);for(var d=[],p=!1,y=1;y<t.length;y++){var m=t[y],w=Array.isArray(l)?l[y-1]:l.type,g=a.parse(m,1+d.length,w);if(!g){p=!0;break}d.push(g)}if(!p)if(Array.isArray(l)&&l.length!==d.length)a.error("Expected "+l.length+" arguments, but found "+d.length+" instead.");else{for(var b=0;b<d.length;b++){var x=Array.isArray(l)?l[b]:l.type,M=d[b];a.concat(b+1).checkSubtype(x,M.type)}if(0===a.errors.length)return new Yb(r,o,v,d)}}if(1===u.length)(i=n.errors).push.apply(i,a.errors);else{for(var _=(u.length?u:s).map((function(t){var n,i=t[0];return n=i,Array.isArray(n)?"("+n.map(Sb).join(", ")+")":"("+Sb(n.type)+"...)"})).join(" | "),S=[],O=1;O<t.length;O++){var j=n.parse(t[O],1+S.length);if(!j)return null;S.push(Sb(j.type))}n.error("Expected arguments of type "+_+", but found ("+S.join(", ")+") instead.")}return null},Yb.register=function(t,n){for(var i in Yb.definitions=n,n)t[i]=Yb};var Zb=function(t,n,i){this.type=bb,this.locale=i,this.caseSensitive=t,this.diacriticSensitive=n};Zb.parse=function(t,n){if(2!==t.length)return n.error("Expected one argument.");var i=t[1];if("object"!=typeof i||Array.isArray(i))return n.error("Collator options argument must be an object.");var r=n.parse(void 0!==i["case-sensitive"]&&i["case-sensitive"],1,yb);if(!r)return null;var e=n.parse(void 0!==i["diacritic-sensitive"]&&i["diacritic-sensitive"],1,yb);if(!e)return null;var o=null;return i.locale&&!(o=n.parse(i.locale,1,pb))?null:new Zb(r,e,o)},Zb.prototype.evaluate=function(t){return new Ab(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},Zb.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},Zb.prototype.outputDefined=function(){return!1},Zb.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]};var $b=8192;function Kb(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[0]),t[3]=Math.max(t[3],n[1])}function Hb(t,n){return!(t[0]<=n[0])&&(!(t[2]>=n[2])&&(!(t[1]<=n[1])&&!(t[3]>=n[3])))}function Jb(t,n){var i,r=(180+t[0])/360,e=(i=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360),o=Math.pow(2,n.z);return[Math.round(r*o*$b),Math.round(e*o*$b)]}function Qb(t,n,i){var r=t[0]-n[0],e=t[1]-n[1],o=t[0]-i[0],s=t[1]-i[1];return r*s-o*e==0&&r*o<=0&&e*s<=0}function tx(t,n,i){return n[1]>t[1]!=i[1]>t[1]&&t[0]<(i[0]-n[0])*(t[1]-n[1])/(i[1]-n[1])+n[0]}function nx(t,n){for(var i=!1,r=0,e=n.length;r<e;r++)for(var o=n[r],s=0,u=o.length;s<u-1;s++){if(Qb(t,o[s],o[s+1]))return!1;tx(t,o[s],o[s+1])&&(i=!i)}return i}function ix(t,n){for(var i=0;i<n.length;i++)if(nx(t,n[i]))return!0;return!1}function rx(t,n,i,r){var e=t[0]-i[0],o=t[1]-i[1],s=n[0]-i[0],u=n[1]-i[1],a=r[0]-i[0],h=r[1]-i[1],f=e*h-a*o,c=s*h-a*u;return f>0&&c<0||f<0&&c>0}function ex(t,n,i){for(var r=0,e=i;r<e.length;r+=1)for(var o=e[r],s=0;s<o.length-1;++s)if(u=t,a=n,h=o[s],f=o[s+1],c=void 0,l=void 0,v=void 0,d=void 0,v=[a[0]-u[0],a[1]-u[1]],d=[f[0]-h[0],f[1]-h[1]],0!=(c=d)[0]*(l=v)[1]-c[1]*l[0]&&rx(u,a,h,f)&&rx(h,f,u,a))return!0;var u,a,h,f,c,l,v,d;return!1}function ox(t,n){for(var i=0;i<t.length;++i)if(!nx(t[i],n))return!1;for(var r=0;r<t.length-1;++r)if(ex(t[r],t[r+1],n))return!1;return!0}function sx(t,n){for(var i=0;i<n.length;i++)if(ox(t,n[i]))return!0;return!1}function ux(t,n,i){for(var r=[],e=0;e<t.length;e++){for(var o=[],s=0;s<t[e].length;s++){var u=Jb(t[e][s],i);Kb(n,u),o.push(u)}r.push(o)}return r}function ax(t,n,i){for(var r=[],e=0;e<t.length;e++){var o=ux(t[e],n,i);r.push(o)}return r}function hx(t,n,i,r){if(t[0]<i[0]||t[0]>i[2]){var e=.5*r,o=t[0]-i[0]>e?-r:i[0]-t[0]>e?r:0;0===o&&(o=t[0]-i[2]>e?-r:i[2]-t[0]>e?r:0),t[0]+=o}Kb(n,t)}function fx(t,n,i,r){var e=Math.pow(2,r.z)*$b,o=[r.x*$b,r.y*$b],s=[];if(!t)return s;for(var u=0,a=t;u<a.length;u+=1)for(var h=0,f=a[u];h<f.length;h+=1){var c=f[h],l=[c.x+o[0],c.y+o[1]];hx(l,n,i,e),s.push(l)}return s}function cx(t,n,i,r){var e=Math.pow(2,r.z)*$b,o=[r.x*$b,r.y*$b],s=[];if(!t)return s;for(var u=0,a=t;u<a.length;u+=1){for(var h=[],f=0,c=a[u];f<c.length;f+=1){var l=c[f],v=[l.x+o[0],l.y+o[1]];Kb(n,v),h.push(v)}s.push(h)}if(n[2]-n[0]<=e/2){!function(t){t[0]=t[1]=1/0,t[2]=t[3]=-1/0}(n);for(var d=0,p=s;d<p.length;d+=1)for(var y=0,m=p[d];y<m.length;y+=1){hx(m[y],n,i,e)}}return s}var lx=function(t,n){this.type=yb,this.geojson=t,this.geometries=n};function vx(t){if(t instanceof Yb){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.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof lx)return!1;var n=!0;return t.eachChild((function(t){n&&!vx(t)&&(n=!1)})),n}function dx(t){if(t instanceof Yb&&"feature-state"===t.name)return!1;var n=!0;return t.eachChild((function(t){n&&!dx(t)&&(n=!1)})),n}function px(t,n){if(t instanceof Yb&&n.indexOf(t.name)>=0)return!1;var i=!0;return t.eachChild((function(t){i&&!px(t,n)&&(i=!1)})),i}lx.parse=function(t,n){if(2!==t.length)return n.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(Nb(t[1])){var i=t[1];if("FeatureCollection"===i.type)for(var r=0;r<i.features.length;++r){var e=i.features[r].geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new lx(i,i.features[r].geometry)}else if("Feature"===i.type){var o=i.geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new lx(i,i.geometry)}else if("Polygon"===i.type||"MultiPolygon"===i.type)return new lx(i,i)}return n.error("'within' expression requires valid geojson object that contains polygon geometry type.")},lx.prototype.evaluate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,n){var i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],e=t.canonicalID();if(!e)return!1;if("Polygon"===n.type){var o=ux(n.coordinates,r,e),s=fx(t.geometry(),i,r,e);if(!Hb(i,r))return!1;for(var u=0,a=s;u<a.length;u+=1)if(!nx(a[u],o))return!1}if("MultiPolygon"===n.type){var h=ax(n.coordinates,r,e),f=fx(t.geometry(),i,r,e);if(!Hb(i,r))return!1;for(var c=0,l=f;c<l.length;c+=1)if(!ix(l[c],h))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,n){var i=[1/0,1/0,-1/0,-1/0],r=[1/0,1/0,-1/0,-1/0],e=t.canonicalID();if(!e)return!1;if("Polygon"===n.type){var o=ux(n.coordinates,r,e),s=cx(t.geometry(),i,r,e);if(!Hb(i,r))return!1;for(var u=0,a=s;u<a.length;u+=1)if(!ox(a[u],o))return!1}if("MultiPolygon"===n.type){var h=ax(n.coordinates,r,e),f=cx(t.geometry(),i,r,e);if(!Hb(i,r))return!1;for(var c=0,l=f;c<l.length;c+=1)if(!sx(l[c],h))return!1}return!0}(t,this.geometries)}return!1},lx.prototype.eachChild=function(){},lx.prototype.outputDefined=function(){return!0},lx.prototype.serialize=function(){return["within",this.geojson]};var yx=function(t,n){this.type=n.type,this.name=t,this.boundExpression=n};yx.parse=function(t,n){if(2!==t.length||"string"!=typeof t[1])return n.error("'var' expression requires exactly one string literal argument.");var i=t[1];return n.scope.has(i)?new yx(i,n.scope.get(i)):n.error('Unknown variable "'+i+'". Make sure "'+i+'" has been bound in an enclosing "let" expression before using it.',1)},yx.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},yx.prototype.eachChild=function(){},yx.prototype.outputDefined=function(){return!1},yx.prototype.serialize=function(){return["var",this.name]};var mx=function(t,n,i,r,e){void 0===n&&(n=[]),void 0===r&&(r=new lb),void 0===e&&(e=[]),this.registry=t,this.path=n,this.key=n.map((function(t){return"["+t+"]"})).join(""),this.scope=r,this.errors=e,this.expectedType=i};function wx(t){if(t instanceof yx)return wx(t.boundExpression);if(t instanceof Yb&&"error"===t.name)return!1;if(t instanceof Zb)return!1;if(t instanceof lx)return!1;var n=t instanceof Xb||t instanceof Db,i=!0;return t.eachChild((function(t){i=n?i&&wx(t):i&&t instanceof Rb})),!!i&&(vx(t)&&px(t,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"]))}function gx(t,n){for(var i,r,e=t.length-1,o=0,s=e,u=0;o<=s;)if(i=t[u=Math.floor((o+s)/2)],r=t[u+1],i<=n){if(u===e||n<r)return u;o=u+1}else{if(!(i>n))throw new Fb("Input is not a number.");s=u-1}return 0}mx.prototype.parse=function(t,n,i,r,e){return void 0===e&&(e={}),n?this.concat(n,i,r)._parse(t,e):this._parse(t,e)},mx.prototype._parse=function(t,n){function i(t,n,i){return"assert"===i?new Db(n,[t]):"coerce"===i?new Xb(n,[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 r=t[0];if("string"!=typeof r)return this.error("Expression name must be a string, but found "+typeof r+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var e=this.registry[r];if(e){var o=e.parse(t,this);if(!o)return null;if(this.expectedType){var s=this.expectedType,u=o.type;if("string"!==s.kind&&"number"!==s.kind&&"boolean"!==s.kind&&"object"!==s.kind&&"array"!==s.kind||"value"!==u.kind)if("color"!==s.kind&&"formatted"!==s.kind&&"resolvedImage"!==s.kind||"value"!==u.kind&&"string"!==u.kind){if(this.checkSubtype(s,u))return null}else o=i(o,s,n.typeAnnotation||"coerce");else o=i(o,s,n.typeAnnotation||"assert")}if(!(o instanceof Rb)&&"resolvedImage"!==o.type.kind&&wx(o)){var a=new Wb;try{o=new Rb(o.type,o.evaluate(a))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+r+'". 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.")},mx.prototype.concat=function(t,n,i){var r="number"==typeof t?this.path.concat(t):this.path,e=i?this.scope.concat(i):this.scope;return new mx(this.registry,r,n||null,e,this.errors)},mx.prototype.error=function(t){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];var r=""+this.key+n.map((function(t){return"["+t+"]"})).join("");this.errors.push(new cb(r,t))},mx.prototype.checkSubtype=function(t,n){var i=jb(t,n);return i&&this.error(i),i};var bx=function(t,n,i){this.type=t,this.input=n,this.labels=[],this.outputs=[];for(var r=0,e=i;r<e.length;r+=1){var o=e[r],s=o[0],u=o[1];this.labels.push(s),this.outputs.push(u)}};bx.parse=function(t,n){if(t.length-1<4)return n.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return n.error("Expected an even number of arguments.");var i=n.parse(t[1],1,db);if(!i)return null;var r=[],e=null;n.expectedType&&"value"!==n.expectedType.kind&&(e=n.expectedType);for(var o=1;o<t.length;o+=2){var s=1===o?-1/0:t[o],u=t[o+1],a=o,h=o+1;if("number"!=typeof s)return n.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',a);if(r.length&&r[r.length-1][0]>=s)return n.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',a);var f=n.parse(u,h,e);if(!f)return null;e=e||f.type,r.push([s,f])}return new bx(e,i,r)},bx.prototype.evaluate=function(t){var n=this.labels,i=this.outputs;if(1===n.length)return i[0].evaluate(t);var r=this.input.evaluate(t);if(r<=n[0])return i[0].evaluate(t);var e=n.length;return r>=n[e-1]?i[e-1].evaluate(t):i[gx(n,r)].evaluate(t)},bx.prototype.eachChild=function(t){t(this.input);for(var n=0,i=this.outputs;n<i.length;n+=1){t(i[n])}},bx.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},bx.prototype.serialize=function(){for(var t=["step",this.input.serialize()],n=0;n<this.labels.length;n++)n>0&&t.push(this.labels[n]),t.push(this.outputs[n].serialize());return t};var xx=Mx;function Mx(t,n,i,r){this.cx=3*t,this.bx=3*(i-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(r-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=r,this.p2x=i,this.p2y=r}function _x(t,n,i){return t*(1-i)+n*i}Mx.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},Mx.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},Mx.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},Mx.prototype.solveCurveX=function(t,n){var i,r,e,o,s;for(void 0===n&&(n=1e-6),e=t,s=0;s<8;s++){if(o=this.sampleCurveX(e)-t,Math.abs(o)<n)return e;var u=this.sampleCurveDerivativeX(e);if(Math.abs(u)<1e-6)break;e-=o/u}if((e=t)<(i=0))return i;if(e>(r=1))return r;for(;i<r;){if(o=this.sampleCurveX(e),Math.abs(o-t)<n)return e;t>o?i=e:r=e,e=.5*(r-i)+i}return e},Mx.prototype.solve=function(t,n){return this.sampleCurveY(this.solveCurveX(t,n))};var Sx=Object.freeze({__proto__:null,number:_x,color:function(t,n,i){return new nb(_x(t.r,n.r,i),_x(t.g,n.g,i),_x(t.b,n.b,i),_x(t.a,n.a,i))},array:function(t,n,i){return t.map((function(t,r){return _x(t,n[r],i)}))}}),Ox=.95047,jx=1.08883,Ex=4/29,Tx=6/29,Ax=3*Tx*Tx,Px=Math.PI/180,Cx=180/Math.PI;function kx(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ax+Ex}function Ix(t){return t>Tx?t*t*t:Ax*(t-Ex)}function Nx(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Lx(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function zx(t){var n=Lx(t.r),i=Lx(t.g),r=Lx(t.b),e=kx((.4124564*n+.3575761*i+.1804375*r)/Ox),o=kx((.2126729*n+.7151522*i+.072175*r)/1);return{l:116*o-16,a:500*(e-o),b:200*(o-kx((.0193339*n+.119192*i+.9503041*r)/jx)),alpha:t.a}}function Rx(t){var n=(t.l+16)/116,i=isNaN(t.a)?n:n+t.a/500,r=isNaN(t.b)?n:n-t.b/200;return n=1*Ix(n),i=Ox*Ix(i),r=jx*Ix(r),new nb(Nx(3.2404542*i-1.5371385*n-.4985314*r),Nx(-.969266*i+1.8760108*n+.041556*r),Nx(.0556434*i-.2040259*n+1.0572252*r),t.alpha)}function Fx(t,n,i){var r=n-t;return t+i*(r>180||r<-180?r-360*Math.round(r/360):r)}var Gx={forward:zx,reverse:Rx,interpolate:function(t,n,i){return{l:_x(t.l,n.l,i),a:_x(t.a,n.a,i),b:_x(t.b,n.b,i),alpha:_x(t.alpha,n.alpha,i)}}},Dx={forward:function(t){var n=zx(t),i=n.l,r=n.a,e=n.b,o=Math.atan2(e,r)*Cx;return{h:o<0?o+360:o,c:Math.sqrt(r*r+e*e),l:i,alpha:t.a}},reverse:function(t){var n=t.h*Px,i=t.c;return Rx({l:t.l,a:Math.cos(n)*i,b:Math.sin(n)*i,alpha:t.alpha})},interpolate:function(t,n,i){return{h:Fx(t.h,n.h,i),c:_x(t.c,n.c,i),l:_x(t.l,n.l,i),alpha:_x(t.alpha,n.alpha,i)}}},qx=function(t,n,i,r,e){this.type=t,this.operator=n,this.interpolation=i,this.input=r,this.labels=[],this.outputs=[];for(var o=0,s=e;o<s.length;o+=1){var u=s[o],a=u[0],h=u[1];this.labels.push(a),this.outputs.push(h)}};function Ux(t,n,i,r){var e=r-i,o=t-i;return 0===e?0:1===n?o/e:(Math.pow(n,o)-1)/(Math.pow(n,e)-1)}qx.interpolationFactor=function(t,n,i,r){var e=0;if("exponential"===t.name)e=Ux(n,t.base,i,r);else if("linear"===t.name)e=Ux(n,1,i,r);else if("cubic-bezier"===t.name){var o=t.controlPoints;e=new xx(o[0],o[1],o[2],o[3]).solve(Ux(n,1,i,r))}return e},qx.parse=function(t,n){var i=t[0],r=t[1],e=t[2],o=t.slice(3);if(!Array.isArray(r)||0===r.length)return n.error("Expected an interpolation type expression.",1);if("linear"===r[0])r={name:"linear"};else if("exponential"===r[0]){var s=r[1];if("number"!=typeof s)return n.error("Exponential interpolation requires a numeric base.",1,1);r={name:"exponential",base:s}}else{if("cubic-bezier"!==r[0])return n.error("Unknown interpolation type "+String(r[0]),1,0);var u=r.slice(1);if(4!==u.length||u.some((function(t){return"number"!=typeof t||t<0||t>1})))return n.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);r={name:"cubic-bezier",controlPoints:u}}if(t.length-1<4)return n.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return n.error("Expected an even number of arguments.");if(!(e=n.parse(e,2,db)))return null;var a=[],h=null;"interpolate-hcl"===i||"interpolate-lab"===i?h=mb:n.expectedType&&"value"!==n.expectedType.kind&&(h=n.expectedType);for(var f=0;f<o.length;f+=2){var c=o[f],l=o[f+1],v=f+3,d=f+4;if("number"!=typeof c)return n.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',v);if(a.length&&a[a.length-1][0]>=c)return n.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',v);var p=n.parse(l,d,h);if(!p)return null;h=h||p.type,a.push([c,p])}return"number"===h.kind||"color"===h.kind||"array"===h.kind&&"number"===h.itemType.kind&&"number"==typeof h.N?new qx(h,i,r,e,a):n.error("Type "+Sb(h)+" is not interpolatable.")},qx.prototype.evaluate=function(t){var n=this.labels,i=this.outputs;if(1===n.length)return i[0].evaluate(t);var r=this.input.evaluate(t);if(r<=n[0])return i[0].evaluate(t);var e=n.length;if(r>=n[e-1])return i[e-1].evaluate(t);var o=gx(n,r),s=n[o],u=n[o+1],a=qx.interpolationFactor(this.interpolation,r,s,u),h=i[o].evaluate(t),f=i[o+1].evaluate(t);return"interpolate"===this.operator?Sx[this.type.kind.toLowerCase()](h,f,a):"interpolate-hcl"===this.operator?Dx.reverse(Dx.interpolate(Dx.forward(h),Dx.forward(f),a)):Gx.reverse(Gx.interpolate(Gx.forward(h),Gx.forward(f),a))},qx.prototype.eachChild=function(t){t(this.input);for(var n=0,i=this.outputs;n<i.length;n+=1){t(i[n])}},qx.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))},qx.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 n=[this.operator,t,this.input.serialize()],i=0;i<this.labels.length;i++)n.push(this.labels[i],this.outputs[i].serialize());return n};var Bx=function(t,n){this.type=t,this.args=n};Bx.parse=function(t,n){if(t.length<2)return n.error("Expectected at least one argument.");var i=null,r=n.expectedType;r&&"value"!==r.kind&&(i=r);for(var e=[],o=0,s=t.slice(1);o<s.length;o+=1){var u=s[o],a=n.parse(u,1+e.length,i,void 0,{typeAnnotation:"omit"});if(!a)return null;i=i||a.type,e.push(a)}var h=r&&e.some((function(t){return jb(r,t.type)}));return new Bx(h?gb:i,e)},Bx.prototype.evaluate=function(t){for(var n,i=null,r=0,e=0,o=this.args;e<o.length;e+=1){if(r++,(i=o[e].evaluate(t))&&i instanceof kb&&!i.available&&(n||(n=i),i=null,r===this.args.length))return n;if(null!==i)break}return i},Bx.prototype.eachChild=function(t){this.args.forEach(t)},Bx.prototype.outputDefined=function(){return this.args.every((function(t){return t.outputDefined()}))},Bx.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(n){t.push(n.serialize())})),t};var Xx=function(t,n){this.type=n.type,this.bindings=[].concat(t),this.result=n};Xx.prototype.evaluate=function(t){return this.result.evaluate(t)},Xx.prototype.eachChild=function(t){for(var n=0,i=this.bindings;n<i.length;n+=1){t(i[n][1])}t(this.result)},Xx.parse=function(t,n){if(t.length<4)return n.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var i=[],r=1;r<t.length-1;r+=2){var e=t[r];if("string"!=typeof e)return n.error("Expected string, but found "+typeof e+" instead.",r);if(/[^a-zA-Z0-9_]/.test(e))return n.error("Variable names must contain only alphanumeric characters or '_'.",r);var o=n.parse(t[r+1],r+1);if(!o)return null;i.push([e,o])}var s=n.parse(t[t.length-1],t.length-1,n.expectedType,i);return s?new Xx(i,s):null},Xx.prototype.outputDefined=function(){return this.result.outputDefined()},Xx.prototype.serialize=function(){for(var t=["let"],n=0,i=this.bindings;n<i.length;n+=1){var r=i[n],e=r[0],o=r[1];t.push(e,o.serialize())}return t.push(this.result.serialize()),t};var Vx=function(t,n,i){this.type=t,this.index=n,this.input=i};Vx.parse=function(t,n){if(3!==t.length)return n.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var i=n.parse(t[1],1,db),r=n.parse(t[2],2,_b(n.expectedType||gb));if(!i||!r)return null;var e=r.type;return new Vx(e.itemType,i,r)},Vx.prototype.evaluate=function(t){var n=this.index.evaluate(t),i=this.input.evaluate(t);if(n<0)throw new Fb("Array index out of bounds: "+n+" < 0.");if(n>=i.length)throw new Fb("Array index out of bounds: "+n+" > "+(i.length-1)+".");if(n!==Math.floor(n))throw new Fb("Array index must be an integer, but found "+n+" instead.");return i[n]},Vx.prototype.eachChild=function(t){t(this.index),t(this.input)},Vx.prototype.outputDefined=function(){return!1},Vx.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Wx=function(t,n){this.type=yb,this.needle=t,this.haystack=n};Wx.parse=function(t,n){if(3!==t.length)return n.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var i=n.parse(t[1],1,gb),r=n.parse(t[2],2,gb);return i&&r?Eb(i.type,[yb,pb,db,vb,gb])?new Wx(i,r):n.error("Expected first argument to be of type boolean, string, number or null, but found "+Sb(i.type)+" instead"):null},Wx.prototype.evaluate=function(t){var n=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(null==i)return!1;if(!Tb(n,["boolean","string","number","null"]))throw new Fb("Expected first argument to be of type boolean, string, number or null, but found "+Sb(Lb(n))+" instead.");if(!Tb(i,["string","array"]))throw new Fb("Expected second argument to be of type array or string, but found "+Sb(Lb(i))+" instead.");return i.indexOf(n)>=0},Wx.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},Wx.prototype.outputDefined=function(){return!0},Wx.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Yx=function(t,n,i){this.type=db,this.needle=t,this.haystack=n,this.fromIndex=i};Yx.parse=function(t,n){if(t.length<=2||t.length>=5)return n.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var i=n.parse(t[1],1,gb),r=n.parse(t[2],2,gb);if(!i||!r)return null;if(!Eb(i.type,[yb,pb,db,vb,gb]))return n.error("Expected first argument to be of type boolean, string, number or null, but found "+Sb(i.type)+" instead");if(4===t.length){var e=n.parse(t[3],3,db);return e?new Yx(i,r,e):null}return new Yx(i,r)},Yx.prototype.evaluate=function(t){var n=this.needle.evaluate(t),i=this.haystack.evaluate(t);if(!Tb(n,["boolean","string","number","null"]))throw new Fb("Expected first argument to be of type boolean, string, number or null, but found "+Sb(Lb(n))+" instead.");if(!Tb(i,["string","array"]))throw new Fb("Expected second argument to be of type array or string, but found "+Sb(Lb(i))+" instead.");if(this.fromIndex){var r=this.fromIndex.evaluate(t);return i.indexOf(n,r)}return i.indexOf(n)},Yx.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},Yx.prototype.outputDefined=function(){return!1},Yx.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 Zx=function(t,n,i,r,e,o){this.inputType=t,this.type=n,this.input=i,this.cases=r,this.outputs=e,this.otherwise=o};Zx.parse=function(t,n){if(t.length<5)return n.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return n.error("Expected an even number of arguments.");var i,r;n.expectedType&&"value"!==n.expectedType.kind&&(r=n.expectedType);for(var e={},o=[],s=2;s<t.length-1;s+=2){var u=t[s],a=t[s+1];Array.isArray(u)||(u=[u]);var h=n.concat(s);if(0===u.length)return h.error("Expected at least one branch label.");for(var f=0,c=u;f<c.length;f+=1){var l=c[f];if("number"!=typeof l&&"string"!=typeof l)return h.error("Branch labels must be numbers or strings.");if("number"==typeof l&&Math.abs(l)>Number.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof l&&Math.floor(l)!==l)return h.error("Numeric branch labels must be integer values.");if(i){if(h.checkSubtype(i,Lb(l)))return null}else i=Lb(l);if(void 0!==e[String(l)])return h.error("Branch labels must be unique.");e[String(l)]=o.length}var v=n.parse(a,s,r);if(!v)return null;r=r||v.type,o.push(v)}var d=n.parse(t[1],1,gb);if(!d)return null;var p=n.parse(t[t.length-1],t.length-1,r);return p?"value"!==d.type.kind&&n.concat(1).checkSubtype(i,d.type)?null:new Zx(i,r,d,e,o,p):null},Zx.prototype.evaluate=function(t){var n=this.input.evaluate(t);return(Lb(n)===this.inputType&&this.outputs[this.cases[n]]||this.otherwise).evaluate(t)},Zx.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Zx.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},Zx.prototype.serialize=function(){for(var t=this,n=["match",this.input.serialize()],i=[],r={},e=0,o=Object.keys(this.cases).sort();e<o.length;e+=1){var s=o[e];void 0===(c=r[this.cases[s]])?(r[this.cases[s]]=i.length,i.push([this.cases[s],[s]])):i[c][1].push(s)}for(var u=function(n){return"number"===t.inputType.kind?Number(n):n},a=0,h=i;a<h.length;a+=1){var f=h[a],c=f[0],l=f[1];1===l.length?n.push(u(l[0])):n.push(l.map(u)),n.push(this.outputs[outputIndex$1].serialize())}return n.push(this.otherwise.serialize()),n};var $x=function(t,n,i){this.type=t,this.branches=n,this.otherwise=i};$x.parse=function(t,n){if(t.length<4)return n.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return n.error("Expected an odd number of arguments.");var i;n.expectedType&&"value"!==n.expectedType.kind&&(i=n.expectedType);for(var r=[],e=1;e<t.length-1;e+=2){var o=n.parse(t[e],e,yb);if(!o)return null;var s=n.parse(t[e+1],e+1,i);if(!s)return null;r.push([o,s]),i=i||s.type}var u=n.parse(t[t.length-1],t.length-1,i);return u?new $x(i,r,u):null},$x.prototype.evaluate=function(t){for(var n=0,i=this.branches;n<i.length;n+=1){var r=i[n],e=r[0],o=r[1];if(e.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},$x.prototype.eachChild=function(t){for(var n=0,i=this.branches;n<i.length;n+=1){var r=i[n],e=r[0],o=r[1];t(e),t(o)}t(this.otherwise)},$x.prototype.outputDefined=function(){return this.branches.every((function(t){return t[0],t[1].outputDefined()}))&&this.otherwise.outputDefined()},$x.prototype.serialize=function(){var t=["case"];return this.eachChild((function(n){t.push(n.serialize())})),t};var Kx=function(t,n,i,r){this.type=t,this.input=n,this.beginIndex=i,this.endIndex=r};function Hx(t,n){return"=="===t||"!="===t?"boolean"===n.kind||"string"===n.kind||"number"===n.kind||"null"===n.kind||"value"===n.kind:"string"===n.kind||"number"===n.kind||"value"===n.kind}function Jx(t,n,i,r){return 0===r.compare(n,i)}function Qx(t,n,i){var r="=="!==t&&"!="!==t;return function(){function e(t,n,i){this.type=yb,this.lhs=t,this.rhs=n,this.collator=i,this.hasUntypedArgument="value"===t.type.kind||"value"===n.type.kind}return e.parse=function(t,n){if(3!==t.length&&4!==t.length)return n.error("Expected two or three arguments.");var i=t[0],o=n.parse(t[1],1,gb);if(!o)return null;if(!Hx(i,o.type))return n.concat(1).error('"'+i+"\" comparisons are not supported for type '"+Sb(o.type)+"'.");var s=n.parse(t[2],2,gb);if(!s)return null;if(!Hx(i,s.type))return n.concat(2).error('"'+i+"\" comparisons are not supported for type '"+Sb(s.type)+"'.");if(o.type.kind!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return n.error("Cannot compare types '"+Sb(o.type)+"' and '"+Sb(s.type)+"'.");r&&("value"===o.type.kind&&"value"!==s.type.kind?o=new Db(s.type,[o]):"value"!==o.type.kind&&"value"===s.type.kind&&(s=new Db(o.type,[s])));var u=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==s.type.kind&&"value"!==o.type.kind&&"value"!==s.type.kind)return n.error("Cannot use collator to compare non-string types.");if(!(u=n.parse(t[3],3,bb)))return null}return new e(o,s,u)},e.prototype.evaluate=function(e){var o=this.lhs.evaluate(e),s=this.rhs.evaluate(e);if(r&&this.hasUntypedArgument){var u=Lb(o),a=Lb(s);if(u.kind!==a.kind||"string"!==u.kind&&"number"!==u.kind)throw new Fb('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+u.kind+", "+a.kind+") instead.")}if(this.collator&&!r&&this.hasUntypedArgument){var h=Lb(o),f=Lb(s);if("string"!==h.kind||"string"!==f.kind)return n(e,o,s)}return this.collator?i(e,o,s,this.collator.evaluate(e)):n(e,o,s)},e.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},e.prototype.outputDefined=function(){return!0},e.prototype.serialize=function(){var n=[t];return this.eachChild((function(t){n.push(t.serialize())})),n},e}()}Kx.parse=function(t,n){if(t.length<=2||t.length>=5)return n.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var i=n.parse(t[1],1,gb),r=n.parse(t[2],2,db);if(!i||!r)return null;if(!Eb(i.type,[_b(gb),pb,gb]))return n.error("Expected first argument to be of type array or string, but found "+Sb(i.type)+" instead");if(4===t.length){var e=n.parse(t[3],3,db);return e?new Kx(i.type,i,r,e):null}return new Kx(i.type,i,r)},Kx.prototype.evaluate=function(t){var n=this.input.evaluate(t),i=this.beginIndex.evaluate(t);if(!Tb(n,["string","array"]))throw new Fb("Expected first argument to be of type array or string, but found "+Sb(Lb(n))+" instead.");if(this.endIndex){var r=this.endIndex.evaluate(t);return n.slice(i,r)}return n.slice(i)},Kx.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},Kx.prototype.outputDefined=function(){return!1},Kx.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 tM=Qx("==",(function(t,n,i){return n===i}),Jx),nM=Qx("!=",(function(t,n,i){return n!==i}),(function(t,n,i,r){return!Jx(0,n,i,r)})),iM=Qx("<",(function(t,n,i){return n<i}),(function(t,n,i,r){return r.compare(n,i)<0})),rM=Qx(">",(function(t,n,i){return n>i}),(function(t,n,i,r){return r.compare(n,i)>0})),eM=Qx("<=",(function(t,n,i){return n<=i}),(function(t,n,i,r){return r.compare(n,i)<=0})),oM=Qx(">=",(function(t,n,i){return n>=i}),(function(t,n,i,r){return r.compare(n,i)>=0})),sM=function(t,n,i,r,e){this.type=pb,this.number=t,this.locale=n,this.currency=i,this.minFractionDigits=r,this.maxFractionDigits=e};sM.parse=function(t,n){if(3!==t.length)return n.error("Expected two arguments.");var i=n.parse(t[1],1,db);if(!i)return null;var r=t[2];if("object"!=typeof r||Array.isArray(r))return n.error("NumberFormat options argument must be an object.");var e=null;if(r.locale&&!(e=n.parse(r.locale,1,pb)))return null;var o=null;if(r.currency&&!(o=n.parse(r.currency,1,pb)))return null;var s=null;if(r["min-fraction-digits"]&&!(s=n.parse(r["min-fraction-digits"],1,db)))return null;var u=null;return r["max-fraction-digits"]&&!(u=n.parse(r["max-fraction-digits"],1,db))?null:new sM(i,e,o,s,u)},sM.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?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},sM.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)},sM.prototype.outputDefined=function(){return!1},sM.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 uM=function(t){this.type=db,this.input=t};uM.parse=function(t,n){if(2!==t.length)return n.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var i=n.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?n.error("Expected argument of type string or array, but found "+Sb(i.type)+" instead."):new uM(i):null},uM.prototype.evaluate=function(t){var n=this.input.evaluate(t);if("string"==typeof n)return n.length;if(Array.isArray(n))return n.length;throw new Fb("Expected value to be of type string or array, but found "+Sb(Lb(n))+" instead.")},uM.prototype.eachChild=function(t){t(this.input)},uM.prototype.outputDefined=function(){return!1},uM.prototype.serialize=function(){var t=["length"];return this.eachChild((function(n){t.push(n.serialize())})),t};var aM={"==":tM,"!=":nM,">":rM,"<":iM,">=":oM,"<=":eM,array:Db,at:Vx,boolean:Db,case:$x,coalesce:Bx,collator:Zb,format:qb,image:Ub,in:Wx,"index-of":Yx,interpolate:qx,"interpolate-hcl":qx,"interpolate-lab":qx,length:uM,let:Xx,literal:Rb,match:Zx,number:Db,"number-format":sM,object:Db,slice:Kx,step:bx,string:Db,"to-boolean":Xb,"to-color":Xb,"to-number":Xb,"to-string":Xb,var:yx,within:lx};function hM(t,n){var i=n[0],r=n[1],e=n[2],o=n[3];i=i.evaluate(t),r=r.evaluate(t),e=e.evaluate(t);var s=o?o.evaluate(t):1,u=Ib(i,r,e,s);if(u)throw new Fb(u);return new nb(i/255*s,r/255*s,e/255*s,s)}function fM(t,n){return t in n}function cM(t,n){var i=n[t];return void 0===i?null:i}function lM(t){return{type:t}}function vM(t){return{result:"success",value:t}}function dM(t){return{result:"error",value:t}}function pM(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}Yb.register(aM,{error:[{kind:"error"},[pb],function(t,n){var i=n[0];throw new Fb(i.evaluate(t))}],typeof:[pb,[gb],function(t,n){return Sb(Lb(n[0].evaluate(t)))}],"to-rgba":[_b(db,4),[mb],function(t,n){return n[0].evaluate(t).toArray()}],rgb:[mb,[db,db,db],hM],rgba:[mb,[db,db,db,db],hM],has:{type:yb,overloads:[[[pb],function(t,n){return fM(n[0].evaluate(t),t.properties())}],[[pb,wb],function(t,n){var i=n[0],r=n[1];return fM(i.evaluate(t),r.evaluate(t))}]]},get:{type:gb,overloads:[[[pb],function(t,n){return cM(n[0].evaluate(t),t.properties())}],[[pb,wb],function(t,n){var i=n[0],r=n[1];return cM(i.evaluate(t),r.evaluate(t))}]]},"feature-state":[gb,[pb],function(t,n){return cM(n[0].evaluate(t),t.featureState||{})}],properties:[wb,[],function(t){return t.properties()}],"geometry-type":[pb,[],function(t){return t.geometryType()}],id:[gb,[],function(t){return t.id()}],zoom:[db,[],function(t){return t.globals.zoom}],pitch:[db,[],function(t){return t.globals.pitch||0}],"distance-from-center":[db,[],function(t){return t.distanceFromCenter()}],"heatmap-density":[db,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[db,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[db,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[gb,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[db,lM(db),function(t,n){for(var i=0,r=0,e=n;r<e.length;r+=1){i+=e[r].evaluate(t)}return i}],"*":[db,lM(db),function(t,n){for(var i=1,r=0,e=n;r<e.length;r+=1){i*=e[r].evaluate(t)}return i}],"-":{type:db,overloads:[[[db,db],function(t,n){var i=n[0],r=n[1];return i.evaluate(t)-r.evaluate(t)}],[[db],function(t,n){return-n[0].evaluate(t)}]]},"/":[db,[db,db],function(t,n){var i=n[0],r=n[1];return i.evaluate(t)/r.evaluate(t)}],"%":[db,[db,db],function(t,n){var i=n[0],r=n[1];return i.evaluate(t)%r.evaluate(t)}],ln2:[db,[],function(){return Math.LN2}],pi:[db,[],function(){return Math.PI}],e:[db,[],function(){return Math.E}],"^":[db,[db,db],function(t,n){var i=n[0],r=n[1];return Math.pow(i.evaluate(t),r.evaluate(t))}],sqrt:[db,[db],function(t,n){var i=n[0];return Math.sqrt(i.evaluate(t))}],log10:[db,[db],function(t,n){var i=n[0];return Math.log(i.evaluate(t))/Math.LN10}],ln:[db,[db],function(t,n){var i=n[0];return Math.log(i.evaluate(t))}],log2:[db,[db],function(t,n){var i=n[0];return Math.log(i.evaluate(t))/Math.LN2}],sin:[db,[db],function(t,n){var i=n[0];return Math.sin(i.evaluate(t))}],cos:[db,[db],function(t,n){var i=n[0];return Math.cos(i.evaluate(t))}],tan:[db,[db],function(t,n){var i=n[0];return Math.tan(i.evaluate(t))}],asin:[db,[db],function(t,n){var i=n[0];return Math.asin(i.evaluate(t))}],acos:[db,[db],function(t,n){var i=n[0];return Math.acos(i.evaluate(t))}],atan:[db,[db],function(t,n){var i=n[0];return Math.atan(i.evaluate(t))}],min:[db,lM(db),function(t,n){return Math.min.apply(Math,n.map((function(n){return n.evaluate(t)})))}],max:[db,lM(db),function(t,n){return Math.max.apply(Math,n.map((function(n){return n.evaluate(t)})))}],abs:[db,[db],function(t,n){var i=n[0];return Math.abs(i.evaluate(t))}],round:[db,[db],function(t,n){var i=n[0].evaluate(t);return i<0?-Math.round(-i):Math.round(i)}],floor:[db,[db],function(t,n){var i=n[0];return Math.floor(i.evaluate(t))}],ceil:[db,[db],function(t,n){var i=n[0];return Math.ceil(i.evaluate(t))}],"filter-==":[yb,[pb,gb],function(t,n){var i=n[0],r=n[1];return t.properties()[i.value]===r.value}],"filter-id-==":[yb,[gb],function(t,n){var i=n[0];return t.id()===i.value}],"filter-type-==":[yb,[pb],function(t,n){var i=n[0];return t.geometryType()===i.value}],"filter-<":[yb,[pb,gb],function(t,n){var i=n[0],r=n[1],e=t.properties()[i.value],o=r.value;return typeof e==typeof o&&e<o}],"filter-id-<":[yb,[gb],function(t,n){var i=n[0],r=t.id(),e=i.value;return typeof r==typeof e&&r<e}],"filter->":[yb,[pb,gb],function(t,n){var i=n[0],r=n[1],e=t.properties()[i.value],o=r.value;return typeof e==typeof o&&e>o}],"filter-id->":[yb,[gb],function(t,n){var i=n[0],r=t.id(),e=i.value;return typeof r==typeof e&&r>e}],"filter-<=":[yb,[pb,gb],function(t,n){var i=n[0],r=n[1],e=t.properties()[i.value],o=r.value;return typeof e==typeof o&&e<=o}],"filter-id-<=":[yb,[gb],function(t,n){var i=n[0],r=t.id(),e=i.value;return typeof r==typeof e&&r<=e}],"filter->=":[yb,[pb,gb],function(t,n){var i=n[0],r=n[1],e=t.properties()[i.value],o=r.value;return typeof e==typeof o&&e>=o}],"filter-id->=":[yb,[gb],function(t,n){var i=n[0],r=t.id(),e=i.value;return typeof r==typeof e&&r>=e}],"filter-has":[yb,[gb],function(t,n){return n[0].value in t.properties()}],"filter-has-id":[yb,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[yb,[_b(pb)],function(t,n){return n[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[yb,[_b(gb)],function(t,n){return n[0].value.indexOf(t.id())>=0}],"filter-in-small":[yb,[pb,_b(gb)],function(t,n){var i=n[0];return n[1].value.indexOf(t.properties()[i.value])>=0}],"filter-in-large":[yb,[pb,_b(gb)],function(t,n){var i=n[0],r=n[1];return function(t,n,i,r){for(;i<=r;){var e=i+r>>1;if(n[e]===t)return!0;n[e]>t?r=e-1:i=e+1}return!1}(t.properties()[i.value],r.value,0,r.value.length-1)}],all:{type:yb,overloads:[[[yb,yb],function(t,n){var i=n[0],r=n[1];return i.evaluate(t)&&r.evaluate(t)}],[lM(yb),function(t,n){for(var i=0,r=n;i<r.length;i+=1){if(!r[i].evaluate(t))return!1}return!0}]]},any:{type:yb,overloads:[[[yb,yb],function(t,n){var i=n[0],r=n[1];return i.evaluate(t)||r.evaluate(t)}],[lM(yb),function(t,n){for(var i=0,r=n;i<r.length;i+=1){if(r[i].evaluate(t))return!0}return!1}]]},"!":[yb,[yb],function(t,n){return!n[0].evaluate(t)}],"is-supported-script":[yb,[pb],function(t,n){var i=n[0],r=t.globals&&t.globals.isSupportedScript;return!r||r(i.evaluate(t))}],upcase:[pb,[pb],function(t,n){return n[0].evaluate(t).toUpperCase()}],downcase:[pb,[pb],function(t,n){return n[0].evaluate(t).toLowerCase()}],concat:[pb,lM(gb),function(t,n){return n.map((function(n){return zb(n.evaluate(t))})).join("")}],"resolved-locale":[pb,[bb],function(t,n){return n[0].evaluate(t).resolvedLocale()}]});var yM=function(t,n){this.expression=t,this._warningHistory={},this._evaluator=new Wb,this._defaultValue=n?function(t){return"color"===t.type&&pM(t.default)?new nb(0,0,0,0):"color"===t.type?nb.parse(t.default)||null:void 0===t.default?null:t.default}(n):null,this._enumValues=n&&"enum"===n.type?n.values:null};function mM(t,n){var i=new mx(aM,[],n?function(t){var n={color:mb,string:pb,number:db,enum:pb,boolean:yb,formatted:xb,resolvedImage:Mb};if("array"===t.type)return _b(n[t.value]||gb,t.length);return n[t.type]}(n):void 0),r=i.parse(t,void 0,void 0,void 0,n&&"string"===n.type?{typeAnnotation:"coerce"}:void 0);return r?vM(new yM(r,n)):dM(i.errors)}yM.prototype.evaluateWithoutErrorHandling=function(t,n,i,r,e,o,s,u){return this._evaluator.globals=t,this._evaluator.feature=n,this._evaluator.featureState=i,this._evaluator.canonical=r||null,this._evaluator.availableImages=e||null,this._evaluator.formattedSection=o,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=u||null,this.expression.evaluate(this._evaluator)},yM.prototype.evaluate=function(t,n,i,r,e,o,s,u){this._evaluator.globals=t,this._evaluator.feature=n||null,this._evaluator.featureState=i||null,this._evaluator.canonical=r||null,this._evaluator.availableImages=e||null,this._evaluator.formattedSection=o||null,this._evaluator.featureTileCoord=s||null,this._evaluator.featureDistanceData=u||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 Fb("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 wM=function(t,n){this.kind=t,this._styleExpression=n,this.isStateDependent="constant"!==t&&!dx(n.expression)};wM.prototype.evaluateWithoutErrorHandling=function(t,n,i,r,e,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,i,r,e,o)},wM.prototype.evaluate=function(t,n,i,r,e,o){return this._styleExpression.evaluate(t,n,i,r,e,o)};var gM=function(t,n,i,r){this.kind=t,this.zoomStops=i,this._styleExpression=n,this.isStateDependent="camera"!==t&&!dx(n.expression),this.interpolationType=r};function bM(t,n){if("error"===(t=mM(t,n)).result)return t;var i=t.value.expression,r=vx(i);if(!r&&!function(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}(n))return dM([new cb("","data expressions not supported")]);var e=px(i,["zoom","pitch","distance-from-center"]);if(!e&&!function(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}(n))return dM([new cb("","zoom expressions not supported")]);var o=xM(i);if(!o&&!e)return dM([new cb("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(o instanceof cb)return dM([o]);if(o instanceof qx&&!function(t){return!!t.expression&&t.expression.interpolated}(n))return dM([new cb("",'"interpolate" expressions cannot be used with this property')]);if(!o)return vM(new wM(r?"constant":"source",t.value));var s=o instanceof qx?o.interpolation:void 0;return vM(new gM(r?"camera":"composite",t.value,o.labels,s))}function xM(t){var n=null;if(t instanceof Xx)n=xM(t.result);else if(t instanceof Bx)for(var i=0,r=t.args;i<r.length;i+=1){var e=r[i];if(n=xM(e))break}else(t instanceof bx||t instanceof qx)&&t.input instanceof Yb&&"zoom"===t.input.name&&(n=t);return n instanceof cb||t.eachChild((function(t){var i=xM(t);i instanceof cb?n=i:!n&&i?n=new cb("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&i&&n!==i&&(n=new cb("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),n}function MM(t){if(Array.isArray(t))return t.map(MM);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var n={};for(var i in t)n[i]=MM(t[i]);return n}return function(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}(t)}gM.prototype.evaluateWithoutErrorHandling=function(t,n,i,r,e,o){return this._styleExpression.evaluateWithoutErrorHandling(t,n,i,r,e,o)},gM.prototype.evaluate=function(t,n,i,r,e,o){return this._styleExpression.evaluate(t,n,i,r,e,o)},gM.prototype.interpolationFactor=function(t,n,i){return this.interpolationType?qx.interpolationFactor(this.interpolationType,t,n,i):0};var _M={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},fog:{type:"fog"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},projection:{type:"projection"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{},sky:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],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",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!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"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_symbol:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature","pitch","distance-from-center"]}},filter_fill:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_line:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_circle:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},"filter_fill-extrusion":{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_heatmap:{type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Camera"},pitch:{group:"Camera"},"distance-from-center":{group:"Camera"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},"sky-radial-progress":{group:"sky"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},projection:{name:{type:"enum",values:{albers:{},equalEarth:{},equirectangular:{},lambertConformalConic:{},mercator:{},naturalEarth:{},winkelTripel:{}},default:"mercator",required:!0},center:{type:"array",length:2,value:"number","property-type":"data-constant",transition:!1,requires:[{name:["albers","lambertConformalConic"]}]},parallels:{type:"array",length:2,value:"number","property-type":"data-constant",transition:!1,requires:[{name:["albers","lambertConformalConic"]}]}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!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",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!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,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],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",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],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",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!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",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!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",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!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,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],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,requires:["icon-image"],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",requires:["icon-image"],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",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],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,requires:["text-field"],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",requires:["text-field"],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",requires:["text-field"],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",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{},atmosphere:{}},default:"atmosphere",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],transition:!1,requires:[{"sky-type":"gradient"}],expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",transition:!1,requires:[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};function SM(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":return 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 n=0,i=t.slice(1);n<i.length;n+=1){var r=i[n];if(!SM(r)&&"boolean"!=typeof r)return!1}return!0;default:return!0}}function OM(t,n){if(void 0===n&&(n="fill"),null==t)return{filter:function(){return!0},needGeometry:!1,needFeature:!1};SM(t)||(t=kM(t));var i=t,r=!0;try{r=function(t){if(!TM(t))return t;var n=MM(t);return EM(n),n=jM(n)}(i)}catch(t){console.warn("Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n"+JSON.stringify(i,null,2)+"\n        ")}var e=_M["filter_"+n],o=mM(r,e),s=null;if("error"===o.result)throw new Error(o.value.map((function(t){return t.key+": "+t.message})).join(", "));s=function(t,n,i){return o.value.evaluate(t,n,{},i)};var u=null,a=null;if(r!==i){var h=mM(i,e);if("error"===h.result)throw new Error(h.value.map((function(t){return t.key+": "+t.message})).join(", "));u=function(t,n,i,r,e){return h.value.evaluate(t,n,{},i,void 0,void 0,r,e)},a=!vx(h.value.expression)}return{filter:s=s,dynamicFilter:u||void 0,needGeometry:CM(r),needFeature:!!a}}function jM(t){if(!Array.isArray(t))return t;var n=function(t){if(AM.has(t[0]))for(var n=1;n<t.length;n++){if(TM(t[n]))return!0}return t}(t);return!0===n?n:n.map((function(t){return jM(t)}))}function EM(t){var n=!1,i=[];if("case"===t[0]){for(var r=1;r<t.length-1;r+=2)n=n||TM(t[r]),i.push(t[r+1]);i.push(t[t.length-1])}else if("match"===t[0]){n=n||TM(t[1]);for(var e=2;e<t.length-1;e+=2)i.push(t[e+1]);i.push(t[t.length-1])}else if("step"===t[0]){n=n||TM(t[1]);for(var o=1;o<t.length-1;o+=2)i.push(t[o+1])}n&&(t.length=0,t.push.apply(t,["any"].concat(i)));for(var s=1;s<t.length;s++)EM(t[s])}function TM(t){if(!Array.isArray(t))return!1;if("pitch"===(n=t[0])||"distance-from-center"===n)return!0;for(var n,i=1;i<t.length;i++){if(TM(t[i]))return!0}return!1}var AM=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function PM(t,n){return t<n?-1:t>n?1:0}function CM(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var n=1;n<t.length;n++)if(CM(t[n]))return!0;return!1}function kM(t){if(!t)return!0;var n,i=t[0];return t.length<=1?"any"!==i:"=="===i?IM(t[1],t[2],"=="):"!="===i?zM(IM(t[1],t[2],"==")):"<"===i||">"===i||"<="===i||">="===i?IM(t[1],t[2],i):"any"===i?(n=t.slice(1),["any"].concat(n.map(kM))):"all"===i?["all"].concat(t.slice(1).map(kM)):"none"===i?["all"].concat(t.slice(1).map(kM).map(zM)):"in"===i?NM(t[1],t.slice(2)):"!in"===i?zM(NM(t[1],t.slice(2))):"has"===i?LM(t[1]):"!has"===i?zM(LM(t[1])):"within"!==i||t}function IM(t,n,i){switch(t){case"$type":return["filter-type-"+i,n];case"$id":return["filter-id-"+i,n];default:return["filter-"+i,t,n]}}function NM(t,n){if(0===n.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",n]];case"$id":return["filter-id-in",["literal",n]];default:return n.length>200&&!n.some((function(t){return typeof t!=typeof n[0]}))?["filter-in-large",t,["literal",n.sort(PM)]]:["filter-in-small",t,["literal",n]]}}function LM(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function zM(t){return["!",t]}var RM=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function FM(t,n){var i={};for(var r in t)"ref"!==r&&(i[r]=t[r]);return RM.forEach((function(t){t in n&&(i[t]=n[t])})),i}var GM={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book: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},DM=" ",qM=/(italic|oblique)$/i,UM={},BM=function(t,n,i){var r=UM[t];if(!r){Array.isArray(t)||(t=[t]);for(var e=400,o="normal",s=[],u=0,a=t.length;u<a;++u){var h=t[u].split(" "),f=h[h.length-1].toLowerCase();for(var c in"normal"==f||"italic"==f||"oblique"==f?(o=f,h.pop(),f=h[h.length-1].toLowerCase()):qM.test(f)&&(f=f.replace(qM,""),o=h[h.length-1].replace(f,"")),GM){var l=h.length>1?h[h.length-2].toLowerCase():"";if(f==c||f==c.replace("-","")||l+"-"+f==c){e=GM[c],h.pop(),l&&c.startsWith(l)&&h.pop();break}}"number"==typeof f&&(e=f);var v=h.join(DM).replace("Klokantech Noto Sans","Noto Sans");-1!==v.indexOf(DM)&&(v='"'+v+'"'),s.push(v)}r=UM[t]=[o,e,s]}return r[0]+DM+r[1]+DM+n+"px"+(i?"/"+i:"")+DM+r[2]},XM="https://api.mapbox.com";function VM(t){var n="mapbox://";return 0!==t.indexOf(n)?"":t.slice(n.length)}function WM(t,n){var i=VM(t);if(!i)return decodeURI(new URL(t,location.href).href);var r="styles/";if(0!==i.indexOf(r))throw new Error("unexpected style url: "+t);var e=i.slice(r.length);return XM+"/styles/v1/"+e+"?&access_token="+n}function YM(t,n,i,r){var e=new URL(t,r),o=VM(t);return o?"https://{a-d}.tiles.mapbox.com/v4/"+o+"/{z}/{x}/{y}.vector.pbf?access_token="+n:n?(e.searchParams.set(i,n),decodeURI(e.href)):decodeURI(e.href)}function ZM(t){return t*Math.PI/180}var $M=function(){for(var t=[],n=78271.51696402048;t.length<=24;n/=2)t.push(n);return t}();function KM(t,n){if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas)return new OffscreenCanvas(t,n);var i=document.createElement("canvas");return i.width=t,i.height=n,i}var HM={};function JM(t,n,i){if(void 0===i&&(i={}),n in HM)return HM[n];var r=i.transformRequest&&i.transformRequest(n,t)||new Request(n);r.headers.get("Accept")||r.headers.set("Accept","application/json");var e=fetch(r).then((function(t){return delete HM[n],t.ok?t.json():Promise.reject(new Error("Error fetching source "+n))})).catch((function(t){return delete HM[n],Promise.reject(new Error("Error fetching source "+n))}));return HM[n]=e,e}function QM(t,n){if("string"!=typeof t)return Promise.resolve(t);if(!t.trim().startsWith("{"))return JM("Style",t=WM(t,n.accessToken),n);try{var i=JSON.parse(t);return Promise.resolve(i)}catch(t){return Promise.reject(t)}}var t_={};function n_(t,n,i){void 0===i&&(i={});var r=[n,JSON.stringify(t)].toString(),e=t_[r];if(!e||i.transformRequest){var o=t.url;if(o){var s=YM(o,i.accessToken,i.accessTokenParam||"access_token",n||location.href);e=o.startsWith("mapbox://")?Promise.resolve(A({},t,{url:void 0,tiles:s})):JM("Source",s,i).then((function(t){for(var n=0,r=t.tiles.length;n<r;++n){var e=t.tiles[n];if(i.transformRequest){var o=i.transformRequest(s,"Source");o&&(s=o.url)}var u=YM(e,i.accessToken,i.accessTokenParam||"access_token",s);if(i.transformRequest){var a=i.transformRequest(u,"Tiles");a instanceof Request&&(u=decodeURI(a.url))}t.tiles[n]=u}return Promise.resolve(t)}))}else t=A({},t,{tiles:t.tiles.map((function(t){return YM(t,i.accessToken,i.accessTokenParam||"access_token",n||location.href)}))}),e=Promise.resolve(A({},t));t_[r]=e}return e}var i_,r_=Array(256).join(" ");function e_(t,n){if(n>=.05){for(var i="",r=t.split("\n"),e=r_.slice(0,Math.round(n/.1)),o=0,s=r.length;o<s;++o)o>0&&(i+="\n"),i+=r[o].split("").join(e);return i}return t}function o_(){return i_||(i_=KM(1,1).getContext("2d")),i_}function s_(t,n){return o_().measureText(t).width+(t.length-1)*n}var u_={};function a_(t,n,i,r){if(-1!==t.indexOf("\n")){for(var e=t.split("\n"),o=[],s=0,u=e.length;s<u;++s)o.push(a_(e[s],n,i,r));return o.join("\n")}var a=i+","+n+","+t+","+r,h=u_[a];if(!h){var f=t.split(" ");if(f.length>1){var c=o_();c.font=n;for(var l=c.measureText("M").width*i,v="",d=[],p=0,y=f.length;p<y;++p){var m=f[p],w=v+(v?" ":"")+m;s_(w,r)<=l?v=w:(v&&d.push(v),v=m)}v&&d.push(v);for(var g=0,b=d.length;g<b&&b>1;++g){var x=d[g];if(s_(x,r)<.35*l){var M=g>0?s_(d[g-1],r):1/0,_=g<b-1?s_(d[g+1],r):1/0;d.splice(g,1),b-=1,M<_?(d[g-1]+=" "+x,g-=1):d[g]=x+" "+d[g]}}for(var S=0,O=d.length-1;S<O;++S){var j=d[S],E=d[S+1];if(s_(j,r)>.7*l&&s_(E,r)<.6*l){var T=j.split(" "),A=T.pop();s_(A,r)<.2*l&&(d[S]=T.join(" "),d[S+1]=A+" "+E),O-=1}}h=d.join("\n")}else h=t;h=e_(h,r),u_[a]=h}return h}var h_,f_=/font-family: ?([^;]*);/,c_=/("|')/g;function l_(t){if(!h_){h_={};for(var n=document.styleSheets,i=0,r=n.length;i<r;++i){var e=n[i];try{var o=e.rules||e.cssRules;if(o)for(var s=0,u=o.length;s<u;++s){var a=o[s];if(5==a.type){var h=a.cssText.match(f_);h_[h[1].replace(c_,"")]=!0}}}catch(t){}}}return t in h_}var v_={};function d_(t){var n=t.toString();if(n in v_)return v_[n];for(var i=[],r=0,e=t.length;r<e;++r){t[r]=t[r].replace("Arial Unicode MS","Arial");var o=t[r],s=BM(o,1);Bs(s);var u=s.split(" ");i.push([u.slice(3).join(" ").replace(/"/g,""),u[1],u[0]])}for(var a=0,h=i.length;a<h;++a){var f=i[a],c=f[0];if(!l_(c)&&100!==Rs.get(f[2]+"\n"+f[1]+" \n"+c)){var l="https://fonts.googleapis.com/css?family="+c.replace(/ /g,"+")+":"+f[1]+f[2];if(!document.querySelector('link[href="'+l+'"]')){var v=document.createElement("link");v.href=l,v.rel="stylesheet",document.head.appendChild(v)}}}return v_[n]=t,t}var p_,y_,m_={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},w_={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]},g_={},b_={zoom:0};function x_(t,n,i,r,e,o,s){var u=t.id;o||(o={},console.warn("No functionCache provided to getValue()")),o[u]||(o[u]={});var a,h=o[u];if(!h[i]){var f=(t[n]||g_)[i],c=_M[n+"_"+t.type][i];void 0===f&&(f=c.default);var l=(a=f,Array.isArray(a)&&a.length>0&&"string"==typeof a[0]&&a[0]in aM);if(!l&&pM(f)&&(f=rb(f,c),l=!0),l){var v=function(t,n){var i=bM(t,n);if("error"===i.result)throw new Error(i.value.map((function(t){return t.key+": "+t.message})).join(", "));return i.value}(f,c);h[i]=v.evaluate.bind(v)}else"color"==c.type&&(f=nb.parse(f)),h[i]=function(){return f}}return b_.zoom=r,h[i](b_,e,s)}function M_(t,n,i,r){return x_(t,"layout","icon-allow-overlap",n,i,r)?x_(t,"layout","icon-ignore-placement",n,i,r)?"none":"obstacle":"declutter"}function __(t,n,i,r,e){return e||console.warn("No filterCache provided to evaluateFilter()"),t in e||(e[t]=OM(n).filter),b_.zoom=r,e[t](b_,i)}var S_=!1;function O_(t,n){if(t){if(!S_&&(0===t.a||0===n))return;var i=t.a;return n=void 0===n?1:n,0===i?"transparent":"rgba("+Math.round(255*t.r/i)+","+Math.round(255*t.g/i)+","+Math.round(255*t.b/i)+","+i*n+")"}return t}var j_=/^([^]*)\{(.*)\}([^]*)$/;function E_(t,n){var i;do{if(i=t.match(j_)){var r=n[i[2]]||"";t=i[1]+r+i[3]}}while(i);return t}var T_=!1;function A_(t,n,i,r,e,o,s){if(void 0===r&&(r=$M),void 0===e&&(e=void 0),void 0===o&&(o=void 0),void 0===s&&(s=void 0),"string"==typeof n&&(n=JSON.parse(n)),8!=n.version)throw new Error("glStyle version 8 required.");var u,a;if(o)if("undefined"!=typeof Image){var h=new Image;h.crossOrigin="anonymous",h.onload=function(){u=h,a=[h.width,h.height],t.changed(),h.onload=null},h.src=o}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var f=self;f.postMessage({action:"loadImage",src:o}),f.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===o&&(u=t.data.image,a=[u.width,u.height])}))}for(var c,l=function(t){t=t.slice();for(var n=Object.create(null),i=0;i<t.length;i++)n[t[i].id]=t[i];for(var r=0;r<t.length;r++)"ref"in t[r]&&(t[r]=FM(t[r],n[t[r].ref]));return t}(n.layers),v={},d=[],p={},y={},m={},w={},g=0,b=l.length;g<b;++g){var x=l[g],M=x.id;if("string"==typeof i&&x.source==i||-1!==i.indexOf(M)){var _=x["source-layer"];if(c){if(x.source!==c)throw new Error('Layer "'+M+'" does not use source "'+c)}else{c=x.source;var S=n.sources[c];if(!S)throw new Error('Source "'+c+'" is not defined');var O=S.type;if("vector"!==O&&"geojson"!==O)throw new Error('Source "'+c+'" is not of type "vector" or "geojson", but "'+O+'"')}var j=v[_];j||(j=[],v[_]=j),j.push({layer:x,index:g}),d.push(M)}}var E=new mv,T=new rv,A=[],P=function(n,i){var o=n.getProperties(),h=v[o.layer];if(h){var f=r.indexOf(i);-1==f&&(f=function(t,n){for(var i=0,r=n.length;i<r;++i)if(n[i]<t&&i+1<r){var e=n[i]/n[i+1];return i+Math.log(n[i]/t)/Math.log(e)}return r-1}(i,r));for(var c,l=m_[n.getGeometry().getType()],d={properties:o,type:l},g=t.get("mapbox-featurestate")[n.getId()],b=-1,x=0,M=h.length;x<M;++x){var _=h[x],S=_.layer,O=S.id,j=S.layout||g_,P=S.paint||g_;if(!("none"===j.visibility||"minzoom"in S&&f<S.minzoom||"maxzoom"in S&&f>=S.maxzoom)){var C=S.filter;if(!C||__(O,C,d,f,w)){c=S;var k=void 0,I=void 0,N=void 0,L=void 0,z=void 0,R=void 0,F=_.index;if(3==l&&("fill"==S.type||"fill-extrusion"==S.type))if(I=x_(S,"paint",S.type+"-opacity",f,d,m,g),S.type+"-pattern"in P){var G=x_(S,"paint",S.type+"-pattern",f,d,m,g);if(G){var D="string"==typeof G?E_(G,o):G.toString();if(u&&e&&e[D]){++b,(R=A[b])&&R.getFill()&&!R.getStroke()&&!R.getText()||(R=new Sv({fill:new rv}),A[b]=R),N=R.getFill(),R.setZIndex(F);var q=D+"."+I,U=y[q];if(!U){var B=e[D],X=KM(B.width,B.height),V=X.getContext("2d");V.globalAlpha=I,V.drawImage(u,B.x,B.y,B.width,B.height,0,0,B.width,B.height),U=V.createPattern(X,"repeat"),y[q]=U}N.setColor(U)}}}else k=O_(x_(S,"paint",S.type+"-color",f,d,m,g),I),S.type+"-outline-color"in P&&(z=O_(x_(S,"paint",S.type+"-outline-color",f,d,m,g),I)),z||(z=k),(k||z)&&(++b,(!(R=A[b])||k&&!R.getFill()||!k&&R.getFill()||z&&!R.getStroke()||!z&&R.getStroke()||R.getText())&&(R=new Sv({fill:k?new rv:void 0,stroke:z?new mv:void 0}),A[b]=R),k&&(N=R.getFill()).setColor(k),z&&((L=R.getStroke()).setColor(z),L.setWidth(.5)),R.setZIndex(F));if(1!=l&&"line"==S.type){k=!("line-pattern"in P)&&"line-color"in P?O_(x_(S,"paint","line-color",f,d,m,g),x_(S,"paint","line-opacity",f,d,m,g)):void 0;var W=x_(S,"paint","line-width",f,d,m,g);k&&W>0&&(++b,(R=A[b])&&R.getStroke()&&!R.getFill()&&!R.getText()||(R=new Sv({stroke:new mv}),A[b]=R),(L=R.getStroke()).setLineCap(x_(S,"layout","line-cap",f,d,m,g)),L.setLineJoin(x_(S,"layout","line-join",f,d,m,g)),L.setMiterLimit(x_(S,"layout","line-miter-limit",f,d,m,g)),L.setColor(k),L.setWidth(W),L.setLineDash(P["line-dasharray"]?x_(S,"paint","line-dasharray",f,d,m,g).map((function(t){return t*W})):null),R.setZIndex(F))}var Y=!1,Z=null,$=0,K=void 0,H=void 0,J=void 0;if((1==l||2==l)&&"icon-image"in j){var Q=x_(S,"layout","icon-image",f,d,m,g);if(Q){K="string"==typeof Q?E_(Q,o):Q.toString();var tt=void 0;if(u&&e&&e[K]){var nt=x_(S,"layout","icon-rotation-alignment",f,d,m,g);if(2==l){var it=n.getGeometry();if(it.getFlatMidpoint||it.getFlatMidpoints){var rt=it.getExtent();if(Math.sqrt(Math.max(Math.pow((rt[2]-rt[0])/i,2),Math.pow((rt[3]-rt[1])/i,2)))>150){var et="MultiLineString"===it.getType()?it.getFlatMidpoints():it.getFlatMidpoint();if(y_||(y_=new fg("Point",p_=[NaN,NaN],[],{},null)),tt=y_,p_[0]=et[0],p_[1]=et[1],"line"===x_(S,"layout","symbol-placement",f,d,m,g)&&"map"===nt)for(var ot=it.getStride(),st=it.getFlatCoordinates(),ut=0,at=st.length-ot;ut<at;ut+=ot){var ht=st[ut],ft=st[ut+1],ct=st[ut+ot],lt=st[ut+ot+1],vt=Math.min(ht,ct),dt=Math.min(ft,lt),pt=Math.max(ht,ct),yt=Math.max(ft,lt);if(et[0]>=vt&&et[0]<=pt&&et[1]>=dt&&et[1]<=yt){$=Math.atan2(ft-lt,ct-ht);break}}}}}if(2!==l||tt){var mt=x_(S,"layout","icon-size",f,d,m,g),wt=void 0!==P["icon-color"]?x_(S,"paint","icon-color",f,d,m,g):null;if(!wt||0!==wt.a){var gt=K+"."+mt;if(null!==wt&&(gt+="."+wt),!(H=p[gt])){var bt=e[K],xt=M_(S,f,d,m);H=new yv({color:wt?[255*wt.r,255*wt.g,255*wt.b,wt.a]:void 0,img:u,imgSize:a,size:[bt.width,bt.height],offset:[bt.x,bt.y],rotateWithView:"map"===nt,scale:mt/bt.pixelRatio,displacement:"icon-offset"in j?x_(S,"layout","icon-offset",f,d,m,g).map((function(t){return-t*bt.pixelRatio})):void 0,declutterMode:xt}),p[gt]=H}}H&&(++b,(R=A[b])&&R.getImage()&&!R.getFill()&&!R.getStroke()||(R=new Sv,A[b]=R),R.setGeometry(tt),H.setRotation($+ZM(x_(S,"layout","icon-rotate",f,d,m,g))),H.setOpacity(x_(S,"paint","icon-opacity",f,d,m,g)),H.setAnchor(w_[x_(S,"layout","icon-anchor",f,d,m,g)]),R.setImage(H),Z=R.getText(),R.setText(void 0),R.setZIndex(F),Y=!0,J=!1)}else J=!0}}}if(1==l&&"circle"===S.type){++b,(R=A[b])&&R.getImage()&&!R.getFill()&&!R.getStroke()||(R=new Sv,A[b]=R);var Mt="circle-radius"in P?x_(S,"paint","circle-radius",f,d,m,g):5,_t=O_(x_(S,"paint","circle-stroke-color",f,d,m,g),x_(S,"paint","circle-stroke-opacity",f,d,m,g)),St=O_(x_(S,"paint","circle-color",f,d,m,g),x_(S,"paint","circle-opacity",f,d,m,g)),Ot=x_(S,"paint","circle-stroke-width",f,d,m,g),jt=Mt+"."+_t+"."+St+"."+Ot;(H=p[jt])||(H=new iv({radius:Mt,stroke:_t&&Ot>0?new mv({width:Ot,color:_t}):void 0,fill:St?new rv({color:St}):void 0,declutterMode:"none"}),p[jt]=H),R.setImage(H),Z=R.getText(),R.setText(void 0),R.setGeometry(void 0),R.setZIndex(F),Y=!0}var Et=void 0,Tt=void 0,At=void 0,Pt=void 0,Ct=void 0,kt=void 0;if("text-field"in j){Pt=Math.round(x_(S,"layout","text-size",f,d,m,g));var It=x_(S,"layout","text-font",f,d,m,g);At=x_(S,"layout","text-line-height",f,d,m,g),(Tt=BM(s?s(It):It,Pt,At)).includes("sans-serif")||(Tt+=",sans-serif"),Ct=x_(S,"layout","text-letter-spacing",f,d,m,g),kt=x_(S,"layout","text-max-width",f,d,m,g);var Nt=x_(S,"layout","text-field",f,d,m,g);Et="object"==typeof Nt&&Nt.sections?1===Nt.sections.length?Nt.toString():Nt.sections.reduce((function(t,n,i){var r=n.fontStack?n.fontStack.split(","):It,e=BM(s?s(r):r,Pt*(n.scale||1),At),o=n.text;if("\n"===o)return t.push("\n",""),t;if(2!=l){for(var u=0,a=(o=a_(o,e,kt,Ct).split("\n")).length;u<a;++u)u>0&&t.push("\n",""),t.push(o[u],e);return t}t.push(e_(o,Ct),e)}),[]):E_(Nt,o).trim(),I=x_(S,"paint","text-opacity",f,d,m,g)}if(Et&&I&&!J){Y||(++b,(R=A[b])&&R.getText()&&!R.getFill()&&!R.getStroke()||(R=new Sv,A[b]=R),R.setImage(void 0),R.setGeometry(void 0)),R.getText()||R.setText(Z||new Ev({padding:[2,2,2,2]})),Z=R.getText();var Lt=j["text-transform"];"uppercase"==Lt?Et=Array.isArray(Et)?Et.map((function(t,n){return n%2?t:t.toUpperCase()})):Et.toUpperCase():"lowercase"==Lt&&(Et=Array.isArray(Et)?Et.map((function(t,n){return n%2?t:t.toLowerCase()})):Et.toLowerCase());var zt=Array.isArray(Et)?Et:2==l?e_(Et,Ct):a_(Et,Tt,kt,Ct);Z.setText(zt),Z.setFont(Tt),Z.setRotation(ZM(x_(S,"layout","text-rotate",f,d,m,g)));var Rt=x_(S,"layout","text-anchor",f,d,m,g),Ft=Y||1==l?"point":x_(S,"layout","symbol-placement",f,d,m,g);Z.setPlacement(Ft),Z.setOverflow("point"===Ft);var Gt=x_(S,"paint","text-halo-width",f,d,m,g),Dt=x_(S,"layout","text-offset",f,d,m,g),qt=x_(S,"paint","text-translate",f,d,m,g),Ut=0,Bt=0;if("point"==Ft){var Xt="center";-1!==Rt.indexOf("left")?(Xt="left",Bt=Gt):-1!==Rt.indexOf("right")&&(Xt="right",Bt=-Gt),Z.setTextAlign(Xt);var Vt=x_(S,"layout","text-rotation-alignment",f,d,m,g);Z.setRotateWithView("map"==Vt)}else Z.setMaxAngle(ZM(x_(S,"layout","text-max-angle",f,d,m,g))*Et.length/zt.length),Z.setTextAlign(),Z.setRotateWithView(!1);var Wt="middle";0==Rt.indexOf("bottom")?(Wt="bottom",Ut=-Gt-.5*(At-1)*Pt):0==Rt.indexOf("top")&&(Wt="top",Ut=Gt+.5*(At-1)*Pt),Z.setTextBaseline(Wt),Z.setOffsetX(Dt[0]*Pt+Bt+qt[0]),Z.setOffsetY(Dt[1]*Pt+Ut+qt[1]),T.setColor(O_(x_(S,"paint","text-color",f,d,m,g),I)),Z.setFill(T);var Yt=O_(x_(S,"paint","text-halo-color",f,d,m,g),I);if(Yt){E.setColor(Yt),Gt*=2;var Zt=.5*Pt;E.setWidth(Gt<=Zt?Gt:Zt),Z.setStroke(E)}else Z.setStroke(void 0);var $t=x_(S,"layout","text-padding",f,d,m,g),Kt=Z.getPadding();$t!==Kt[0]&&(Kt[0]=$t,Kt[1]=$t,Kt[2]=$t,Kt[3]=$t),R.setZIndex(F)}}}}return b>-1?(A.length=b+1,T_&&("function"==typeof n.set?n.set("mapbox-layer",c):n.getProperties()["mapbox-layer"]=c),A):void 0}};return t.setStyle(P),t.set("mapbox-source",c),t.set("mapbox-layers",d),t.set("mapbox-featurestate",{}),P}function P_(t,n){n.accessToken||(n=A({},n),new URL(t).searchParams.forEach((function(t,i){n.accessToken=t,n.accessTokenParam=i})));return n}function C_(t,n,i,r,e){var o,s,u;return void 0===i&&(i=""),void 0===r&&(r={}),void 0===e&&(e=void 0),"string"==typeof r?(o=r,u={}):(o=r.styleUrl,u=r),e||(e=u.resolutions),o||"string"!=typeof n||n.trim().startsWith("{")||(o=n),o&&(o=o.startsWith("data:")?location.href:WM(o,u.accessToken),u=P_(o,u)),new Promise((function(r,a){QM(n,u).then((function(n){if(8!=n.version)return a(new Error("glStyle version 8 required."));if(!(t instanceof lg||t instanceof Rg))return a(new Error("Can only apply to VectorLayer or VectorTileLayer"));var h,f,c,l=t instanceof Rg?"vector":"geojson";if(i?s=Array.isArray(i)?n.layers.find((function(t){return t.id===i[0]})).source:i:(s=Object.keys(n.sources).find((function(t){return n.sources[t].type===l})),i=s),!s)return a(new Error("No "+l+" source found in the glStyle."));function v(){if(t instanceof Rg)return z_(n.sources[s],o,u).then((function(n){var i=t.getSource();if(i?n!==i&&(i.setTileUrlFunction(n.getTileUrlFunction()),i.ze||(i.ze=n.ze),i.getAttributions()||i.setAttributions(n.getAttributions()),i.getTileLoadFunction()===Uy&&i.setTileLoadFunction(n.getTileLoadFunction()),Sr(i.getProjection(),n.getProjection())&&(i.tileGrid=n.getTileGrid())):t.setSource(n),!isFinite(t.getMaxResolution())&&!isFinite(t.getMinZoom())){var r=t.getSource().getTileGrid();t.setMaxResolution(r.getResolution(r.getMinZoom()))}}));var i=n.sources[s],r=t.getSource();r&&r.get("mapbox-source")===i||(r=F_(i,o,u));var e=t.getSource();return e?r!==e&&(e.getAttributions()||e.setAttributions(r.getAttributions()),e.ze||(e.ze=r.getFormat()),e.Fe=r.getUrl()):t.setSource(r),Promise.resolve()}function d(){c||n.sprite&&!h?c?(t.setStyle(c),v().then(r).catch(a)):a(new Error("Something went wrong trying to apply style.")):(c=A_(t,n,i,e,h,f,d_),t.getStyle()?v().then(r).catch(a):a(new Error("Nothing to show for source ["+s+"]")))}if(n.sprite){var p=new URL(function(t,n,i){var r=VM(t);if(!r)return decodeURI(new URL(t,i).href);var e="sprites/";if(0!==r.indexOf(e))throw new Error("unexpected sprites url: "+t);var o=r.slice(e.length);return XM+"/styles/v1/"+o+"/sprite?access_token="+n}(n.sprite,u.accessToken,o||location.href)),y=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",m=p.origin+p.pathname+y+".json"+p.search;new Promise((function(t,n){JM("Sprite",m,u).then(t).catch((function(i){JM("Sprite",m=p.origin+p.pathname+".json"+p.search,u).then(t).catch(n)}))})).then((function(t){void 0===t&&a(new Error("No sprites found.")),h=t,f=p.origin+p.pathname+y+".png"+p.search,d()})).catch((function(t){a(new Error("Sprites cannot be loaded: "+m+": "+t.message))}))}else d()})).catch(a)}))}var k_={};function I_(t,n){var i={id:n.id,type:n.type},r={};function e(e){var o=n.layout||{},s=n.paint||{};i.paint=s;var u,a,h="function"==typeof t.getSource?t.getSource().getTileGrid().getZForResolution(e):t.getView().getZoom(),f="function"==typeof t.getTargetElement?t.getTargetElement():void 0;if(void 0!==s["background-color"]&&(u=x_(i,"paint","background-color",h,k_,r),f&&(f.style.background=nb.parse(u).toString())),void 0!==s["background-opacity"]&&(a=x_(i,"paint","background-opacity",h,k_,r),f&&(f.style.opacity=a)),"none"!=o.visibility)return O_(u,a);f&&(f.style.backgroundColor="",f.style.opacity="")}if("function"==typeof t.getTargetElement)t.getTargetElement()&&e(),t.on(["change:resolution","change:target"],e);else{if("function"!=typeof t.setBackground)throw new Error("Unable to apply background.");t.setBackground(e)}}function N_(t,n){n.layers.some((function(n){if("background"===n.type)return I_(t,n),!0}))}function L_(t){var n=t.bounds;if(n){var i=_r([n[0],n[1]]),r=_r([n[2],n[3]]);return[i[0],i[1],r[0],r[1]]}}function z_(t,n,i){return new Promise((function(r,e){n_(t,n,i).then((function(t){var n=new Gm({tileJSON:t}),i=n.getTileJSON(),e=n.getTileGrid(),o=L_(i),s=i.minzoom||0,u=i.maxzoom||22,a={attributions:n.getAttributions(),format:new Lg,tileGrid:new xf({origin:e.getOrigin(0),extent:o||e.getExtent(),minZoom:s,resolutions:$M.slice(0,u+1),tileSize:512})};Array.isArray(i.tiles)?a.urls=i.tiles:a.url=i.tiles,t.olSourceOptions&&Object.assign(a,t.olSourceOptions),r(new qy(a))})).catch(e)}))}var R_=new Zg;function F_(t,n,i){var r=t.data,e={};if("string"==typeof r){var o=YM(r,i.accessToken,i.accessTokenParam||"access_token",n||location.href);if(i.transformRequest){var s=i.transformRequest(o,"GeoJSON");s instanceof Request&&(o=encodeURI(s.url))}e.url=o}else e.features=R_.readFeatures(r,{featureProjection:Cr()||"EPSG:3857"});var u=new ad(A({attributions:t.attribution,format:R_},e));return u.set("mapbox-source",t),u}var G_=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),D_=function(t){function n(n){var i=t.call(this,z)||this;return i.error=n,i}return G_(n,t),n}(c),q_=function(t){function n(n){var i=this,r=!("declutter"in n)||n.declutter,e=new qy({state:"loading",format:new Lg});i=t.call(this,{source:e,background:n.background,declutter:r,className:n.className,opacity:n.opacity,visible:n.visible,zIndex:n.zIndex,minResolution:n.minResolution,maxResolution:n.maxResolution,minZoom:n.minZoom,maxZoom:n.maxZoom,renderOrder:n.renderOrder,renderBuffer:n.renderBuffer,renderMode:n.renderMode,map:n.map,updateWhileAnimating:n.updateWhileAnimating,updateWhileInteracting:n.updateWhileInteracting,preload:n.preload,useInterimTilesOnError:n.useInterimTilesOnError,properties:n.properties})||this,n.accessToken&&(i.accessToken=n.accessToken);var o=n.styleUrl;return C_(i,o,n.layers||n.source,{accessToken:i.accessToken}).then((function(){e.setState("ready")})).catch((function(t){i.dispatchEvent(new D_(t)),i.getSource().setState("error")})),void 0===i.getBackground()&&function(t,n,i){void 0===i&&(i={}),"object"==typeof n?(N_(t,n),Promise.resolve()):QM(n,i).then((function(n){N_(t,n)}))}(i,n.styleUrl,{accessToken:i.accessToken}),i}return G_(n,t),n}(Rg),U_=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),B_=function(t){function n(n){var i=this,r=n||{},e=A({},r);return delete e.imageRatio,(i=t.call(this,e)||this).lv=void 0!==r.imageRatio?r.imageRatio:1,i}return U_(n,t),n.prototype.getImageRatio=function(){return this.lv},n.prototype.createRenderer=function(){return new qw(this)},n}($m),X_=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),V_=function(t){function n(n){var i=this,r=A({},n);return(i=t.call(this,r)||this).vv=Yl(n.style),i.dv=n.style.variables||{},i.pv=!!n.disableHitDetection,i}return X_(n,t),n.prototype.createRenderer=function(){return new Hm(this,{vertexShader:this.vv.builder.getSymbolVertexShader(),fragmentShader:this.vv.builder.getSymbolFragmentShader(),hitVertexShader:!this.pv&&this.vv.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.pv&&this.vv.builder.getSymbolFragmentShader(!0),uniforms:this.vv.uniforms,attributes:this.vv.attributes})},n.prototype.updateStyleVariables=function(t){A(this.dv,t),this.changed()},n}(ls),W_=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Y_(t,n){var i="\n    attribute vec2 ".concat(al.TEXTURE_COORD,";\n    uniform mat4 ").concat(ul.TILE_TRANSFORM,";\n    uniform float ").concat(ul.TEXTURE_PIXEL_WIDTH,";\n    uniform float ").concat(ul.TEXTURE_PIXEL_HEIGHT,";\n    uniform float ").concat(ul.TEXTURE_RESOLUTION,";\n    uniform float ").concat(ul.TEXTURE_ORIGIN_X,";\n    uniform float ").concat(ul.TEXTURE_ORIGIN_Y,";\n    uniform float ").concat(ul.DEPTH,";\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n\n    void main() {\n      v_textureCoord = ").concat(al.TEXTURE_COORD,";\n      v_mapCoord = vec2(\n        ").concat(ul.TEXTURE_ORIGIN_X," + ").concat(ul.TEXTURE_RESOLUTION," * ").concat(ul.TEXTURE_PIXEL_WIDTH," * v_textureCoord[0],\n        ").concat(ul.TEXTURE_ORIGIN_Y," - ").concat(ul.TEXTURE_RESOLUTION," * ").concat(ul.TEXTURE_PIXEL_HEIGHT," * v_textureCoord[1]\n      );\n      gl_Position = ").concat(ul.TILE_TRANSFORM," * vec4(").concat(al.TEXTURE_COORD,", ").concat(ul.DEPTH,", 1.0);\n    }\n  "),r={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:n},e=[];if(void 0!==t.color){var o=Cl(r,t.color,wl);e.push("color = ".concat(o,";"))}if(void 0!==t.contrast){var s=Cl(r,t.contrast,yl);e.push("color.rgb = clamp((".concat(s," + 1.0) * color.rgb - (").concat(s," / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(void 0!==t.exposure){var u=Cl(r,t.exposure,yl);e.push("color.rgb = clamp((".concat(u," + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(void 0!==t.saturation){var a=Cl(r,t.saturation,yl);e.push("\n      float saturation = ".concat(a," + 1.0;\n      float sr = (1.0 - saturation) * 0.2126;\n      float sg = (1.0 - saturation) * 0.7152;\n      float sb = (1.0 - saturation) * 0.0722;\n      mat3 saturationMatrix = mat3(\n        sr + saturation, sr, sr,\n        sg, sg + saturation, sg,\n        sb, sb, sb + saturation\n      );\n      color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n    "))}if(void 0!==t.gamma){var h=Cl(r,t.gamma,yl);e.push("color.rgb = pow(color.rgb, vec3(1.0 / ".concat(h,"));"))}if(void 0!==t.brightness){var f=Cl(r,t.brightness,yl);e.push("color.rgb = clamp(color.rgb + ".concat(f,", vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}var c={},l=r.variables.length;if(l>1&&!t.variables)throw new Error("Missing variables in style (expected ".concat(r.variables,")"));for(var v=function(n){var i=r.variables[n];if(!(i in t.variables))throw new Error("Missing '".concat(i,"' in style variables"));var e=ql(i);c[e]=function(){var n=t.variables[i];return"string"==typeof n&&(n=Al(r,n)),void 0!==n?n:-9999999}},d=0;d<l;++d)v(d);var p=Object.keys(c).map((function(t){return"uniform float ".concat(t,";")})),y=Math.ceil(n/4);p.push("uniform sampler2D ".concat(ul.TILE_TEXTURE_ARRAY,"[").concat(y,"];")),r.paletteTextures&&p.push("uniform sampler2D ".concat(Ul,"[").concat(r.paletteTextures.length,"];"));var m=Object.keys(r.functions).map((function(t){return r.functions[t]}));return{vertexShader:i,fragmentShader:"\n    #ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n    #else\n    precision mediump float;\n    #endif\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n    uniform vec4 ".concat(ul.RENDER_EXTENT,";\n    uniform float ").concat(ul.TRANSITION_ALPHA,";\n    uniform float ").concat(ul.TEXTURE_PIXEL_WIDTH,";\n    uniform float ").concat(ul.TEXTURE_PIXEL_HEIGHT,";\n    uniform float ").concat(ul.RESOLUTION,";\n    uniform float ").concat(ul.ZOOM,";\n\n    ").concat(p.join("\n"),"\n\n    ").concat(m.join("\n"),"\n\n    void main() {\n      if (\n        v_mapCoord[0] < ").concat(ul.RENDER_EXTENT,"[0] ||\n        v_mapCoord[1] < ").concat(ul.RENDER_EXTENT,"[1] ||\n        v_mapCoord[0] > ").concat(ul.RENDER_EXTENT,"[2] ||\n        v_mapCoord[1] > ").concat(ul.RENDER_EXTENT,"[3]\n      ) {\n        discard;\n      }\n\n      vec4 color = texture2D(").concat(ul.TILE_TEXTURE_ARRAY,"[0],  v_textureCoord);\n\n      ").concat(e.join("\n"),"\n\n      if (color.a == 0.0) {\n        discard;\n      }\n\n      gl_FragColor = color;\n      gl_FragColor.rgb *= gl_FragColor.a;\n      gl_FragColor *= ").concat(ul.TRANSITION_ALPHA,";\n    }"),uniforms:c,paletteTextures:r.paletteTextures}}var Z_=function(t){function n(n){var i=this,r=n?A({},n):{},e=r.style||{};delete r.style;var o=r.cacheSize;return delete r.cacheSize,(i=t.call(this,r)||this).yv=r.sources,i.mv=null,i.Ic=NaN,i.H=e,i.Jt=o,i.dv=i.H.variables||{},i.addChangeListener(ns,i.wv),i}return W_(n,t),n.prototype.getSources=function(t,n){var i=this.getSource();return this.yv?"function"==typeof this.yv?this.yv(t,n):this.yv:i?[i]:[]},n.prototype.getRenderSource=function(){return this.mv||this.getSource()},n.prototype.getSourceState=function(){var t=this.getRenderSource();return t?t.getState():"undefined"},n.prototype.wv=function(){this.getSource()&&this.setStyle(this.H)},n.prototype.gv=function(){var t=Number.MAX_SAFE_INTEGER,n=this.getSources([-t,-t,t,t],t);return n&&n.length&&"bandCount"in n[0]?n[0].bandCount:4},n.prototype.createRenderer=function(){var t=Y_(this.H,this.gv());return new pl(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.Jt,paletteTextures:t.paletteTextures})},n.prototype.renderSources=function(t,n){for(var i,r=this.getRenderer(),e=0,o=n.length;e<o;++e)this.mv=n[e],r.prepareFrame(t)&&(i=r.renderFrame(t));return i},n.prototype.render=function(t,n){var i=this;this.rendered=!0;for(var r=t.viewState,e=this.getSources(t.extent,r.resolution),o=!0,s=function(t,n){var r=e[t],s=r.getState();if("loading"==s){var u=function(){"ready"==r.getState()&&(r.removeEventListener("change",u),i.changed())};r.addEventListener("change",u)}o=o&&"ready"==s},u=0,a=e.length;u<a;++u)s(u);var h=this.renderSources(t,e);if(this.getRenderer().renderComplete&&o)return this.Ic=r.resolution,h;if(this.Ic>.5*r.resolution){var f=this.getSources(t.extent,this.Ic).filter((function(t){return!e.includes(t)}));if(f.length>0)return this.renderSources(t,f)}return h},n.prototype.setStyle=function(t){this.dv=t.variables||{},this.H=t;var n=Y_(this.H,this.gv());this.getRenderer().reset({vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,uniforms:n.uniforms,paletteTextures:n.paletteTextures}),this.changed()},n.prototype.updateStyleVariables=function(t){A(this.dv,t),this.changed()},n}(am);Z_.prototype.dispose;var $_=Z_,K_=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),H_="addfeatures",J_=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.features=r,o.file=i,o.projection=e,o}return K_(n,t),n}(c),Q_=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{handleEvent:S})||this).on,i.once,i.un,i.bv=!1,i.xv=[];for(var e=r.formatConstructors?r.formatConstructors:[],o=0,s=e.length;o<s;++o){var u=e[o];"function"==typeof u&&(u=new u),i.xv.push(u),i.bv=i.bv||"arraybuffer"===u.getType()}return i.di=r.projection?yr(r.projection):null,i.Mv=null,i._v=r.source||null,i.target=r.target?r.target:null,i}return K_(n,t),n.prototype.Sv=function(t,n){var i,r=n.target.result,e=this.getMap(),o=this.di;o||(o=e.getView().getProjection());for(var s=this.xv,u=0,a=s.length;u<a;++u){var h=s[u],f=r;this.bv&&"arraybuffer"!==h.getType()&&(void 0===i&&(i=(new TextDecoder).decode(r)),f=i);var c=this.Ov(h,f,{featureProjection:o});if(c&&c.length>0){this._v&&(this._v.clear(),this._v.addFeatures(c)),this.dispatchEvent(new J_(H_,t,c,o));break}}},n.prototype.jv=function(){var t=this.getMap();if(t){var n=this.target?this.target:t.getViewport();this.Mv=[$(n,U,this.handleDrop,this),$(n,D,this.handleStop,this),$(n,q,this.handleStop,this),$(n,U,this.handleStop,this)]}},n.prototype.setActive=function(n){!this.getActive()&&n&&this.jv(),this.getActive()&&!n&&this.Ev(),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.Ev(),t.prototype.setMap.call(this,n),this.getActive()&&this.jv()},n.prototype.Ov=function(t,n,i){try{return t.readFeatures(n,i)}catch(t){return null}},n.prototype.Ev=function(){this.Mv&&(this.Mv.forEach(H),this.Mv=null)},n.prototype.handleDrop=function(t){for(var n=t.dataTransfer.files,i=0,r=n.length;i<r;++i){var e=n.item(i),o=new FileReader;o.addEventListener(V,this.Sv.bind(this,e)),this.bv?o.readAsArrayBuffer(e):o.readAsText(e)}},n.prototype.handleStop=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},n}(ma),tS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),nS=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,r)||this).Zr=r.condition?r.condition:Ia,i.Kr=void 0,i.Tv=void 0,i.je=0,i.Fr=void 0!==r.duration?r.duration:400,i}return tS(n,t),n.prototype.handleDragEvent=function(t){if(La(t)){var n=t.map,i=n.getSize(),r=t.pixel,e=r[0]-i[0]/2,o=i[1]/2-r[1],s=Math.atan2(o,e),u=Math.sqrt(e*e+o*o),a=n.getView();if(void 0!==this.Kr){var h=this.Kr-s;a.adjustRotationInternal(h)}this.Kr=s,void 0!==this.Tv&&a.adjustResolutionInternal(this.Tv/u),void 0!==this.Tv&&(this.je=this.Tv/u),this.Tv=u}},n.prototype.handleUpEvent=function(t){if(!La(t))return!0;var n=t.map.getView(),i=this.je>1?1:-1;return n.endInteraction(this.Fr,i),this.je=0,!1},n.prototype.handleDownEvent=function(t){return!!La(t)&&(!!this.Zr(t)&&(t.map.getView().beginInteraction(),this.Kr=void 0,this.Tv=void 0,!0))},n}(Ma),iS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rS=function(t){function n(n,i,r){var e=t.call(this)||this;if(void 0!==r&&void 0===i)e.setFlatCoordinates(r,n);else{var o=i||0;e.setCenterAndRadius(n,o,r)}return e}return iS(n,t),n.prototype.clone=function(){var t=new n(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},n.prototype.closestPointXY=function(t,n,i,r){var e=this.flatCoordinates,o=t-e[0],s=n-e[1],u=o*o+s*s;if(u<r){if(0===u)for(var a=0;a<this.stride;++a)i[a]=e[a];else{var h=this.getRadius()/Math.sqrt(u);i[0]=e[0]+h*o,i[1]=e[1]+h*s;for(a=2;a<this.stride;++a)i[a]=e[a]}return i.length=this.stride,u}return r},n.prototype.containsXY=function(t,n){var i=this.flatCoordinates,r=t-i[0],e=n-i[1];return r*r+e*e<=this.Av()},n.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},n.prototype.computeExtent=function(t){var n=this.flatCoordinates,i=n[this.stride]-n[0];return On(n[0]-i,n[1]-i,n[0]+i,n[1]+i,t)},n.prototype.getRadius=function(){return Math.sqrt(this.Av())},n.prototype.Av=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],n=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+n*n},n.prototype.getType=function(){return"Circle"},n.prototype.intersectsExtent=function(t){if(Kn(t,this.getExtent())){var n=this.getCenter();return t[0]<=n[0]&&t[2]>=n[0]||(t[1]<=n[1]&&t[3]>=n[1]||Rn(t,this.intersectsCoordinate.bind(this)))}return!1},n.prototype.setCenter=function(t){var n=this.stride,i=this.flatCoordinates[n]-this.flatCoordinates[0],r=t.slice();r[n]=r[0]+i;for(var e=1;e<n;++e)r[n+e]=t[e];this.setFlatCoordinates(this.layout,r),this.changed()},n.prototype.setCenterAndRadius=function(t,n,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var r=this.flatCoordinates,e=ee(r,0,t,this.stride);r[e++]=r[0]+n;for(var o=1,s=this.stride;o<s;++o)r[e++]=r[o];r.length=e,this.changed()},n.prototype.getCoordinates=function(){return null},n.prototype.setCoordinates=function(t,n){},n.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},n.prototype.rotate=function(t,n){var i=this.getCenter(),r=this.getStride();this.setCenter(qr(i,0,i.length,r,t,n,i)),this.changed()},n.prototype.translate=function(t,n){var i=this.getCenter(),r=this.getStride();this.setCenter(Br(i,0,i.length,r,t,n,i)),this.changed()},n}(Kr);rS.prototype.transform;var eS=rS,oS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sS="Point",uS="LineString",aS="Polygon",hS="Circle",fS="drawstart",cS="drawend",lS="drawabort",vS=function(t){function n(n,i){var r=t.call(this,n)||this;return r.feature=i,r}return oS(n,t),n}(c);var dS=function(t){function n(n){var i=this,r=n;r.stopDown||(r.stopDown=O),(i=t.call(this,r)||this).on,i.once,i.un,i.Pv=!1,i.Cv=null,i.kv,i.Iv,i.Nv,i.Lv=!1,i._v=n.source?n.source:null,i.Re=n.features?n.features:null,i.zv=n.snapTolerance?n.snapTolerance:12,i.rl=n.type,i.pe=function(t){switch(t){case"Point":case"MultiPoint":return sS;case"LineString":case"MultiLineString":return uS;case"Polygon":case"MultiPolygon":return aS;case"Circle":return hS;default:throw new Error("Invalid type: "+t)}}(i.rl),i.Rv=!!n.stopClick,i.Fv=n.minPoints?n.minPoints:i.pe===aS?3:2,i.Gv=i.pe===hS?2:n.maxPoints?n.maxPoints:1/0,i.Dv=n.finishCondition?n.finishCondition:S,i.qv=n.geometryLayout?n.geometryLayout:Tt;var e,o=n.geometryFunction;if(!o){var s,u=i.pe;if(u===hS)o=function(t,n,i){var r=n||new eS([NaN,NaN]),e=Ir(t[0],i),o=Qi(e,Ir(t[t.length-1],i));r.setCenterAndRadius(e,Math.sqrt(o),this.qv);var s=Cr();return s&&r.transform(i,s),r};else u===sS?s=Se:u===uS?s=ng:u===aS&&(s=We),o=function(t,n,i){return n?u===aS?t[0].length?n.setCoordinates([t[0].concat([t[0][0]])],this.qv):n.setCoordinates([],this.qv):n.setCoordinates(t,this.qv):n=new s(t,this.qv),n}}return i.Bu=o,i.Uv=void 0!==n.dragVertexDelay?n.dragVertexDelay:500,i.Bv=null,i.Xv=null,i.Vv=null,i.Wv=null,i.Yv=null,i.Zv=null,i.$v=n.clickTolerance?n.clickTolerance*n.clickTolerance:36,i.Kv=new lg({source:new ad({useSpatialIndex:!1,wrapX:!!n.wrapX&&n.wrapX}),style:n.style?n.style:(e=Mv(),function(t,n){return e[t.getGeometry().getType()]}),updateWhileInteracting:!0}),i.K=n.geometryName,i.Zr=n.condition?n.condition:ka,i.Hv,n.freehand?i.Hv=Ta:i.Hv=n.freehandCondition?n.freehandCondition:Ia,i.addChangeListener(va,i.Jv),i}return oS(n,t),n.prototype.setMap=function(n){t.prototype.setMap.call(this,n),this.Jv()},n.prototype.getOverlay=function(){return this.Kv},n.prototype.handleEvent=function(n){n.originalEvent.type===R&&n.originalEvent.preventDefault(),this.Lv=this.pe!==sS&&this.Hv(n);var i=n.type===su.POINTERMOVE,r=!0;!this.Lv&&this.Iv&&n.type===su.POINTERDRAG&&(Date.now()-this.Iv>=this.Uv?(this.Cv=n.pixel,this.Pv=!this.Lv,i=!0):this.Iv=void 0,this.Pv&&void 0!==this.kv&&(clearTimeout(this.kv),this.kv=void 0));return this.Lv&&n.type===su.POINTERDRAG&&null!==this.Xv?(this.Qv(n.coordinate),r=!1):this.Lv&&n.type===su.POINTERDOWN?r=!1:i&&this.getPointerCount()<2?(r=n.type===su.POINTERMOVE)&&this.Lv?(this.Zn(n),this.Pv&&n.originalEvent.preventDefault()):("mouse"===n.originalEvent.pointerType||n.type===su.POINTERDRAG&&void 0===this.kv)&&this.Zn(n):n.type===su.DBLCLICK&&(r=!1),t.prototype.handleEvent.call(this,n)&&r},n.prototype.handleDownEvent=function(t){return this.Pv=!this.Lv,this.Lv?(this.Cv=t.pixel,this.Bv||this.td(t.coordinate),!0):this.Zr(t)?(this.Iv=Date.now(),this.kv=setTimeout(function(){this.Zn(new ou(su.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.Uv),this.Cv=t.pixel,!0):(this.Iv=void 0,!1)},n.prototype.handleUpEvent=function(t){var n=!0;if(0===this.getPointerCount())if(this.kv&&(clearTimeout(this.kv),this.kv=void 0),this.Zn(t),this.Pv){var i=!this.Bv;i&&this.td(t.coordinate),!i&&this.Lv?this.finishDrawing():this.Lv||i&&this.pe!==sS||(this.rd(t.pixel)?this.Dv(t)&&this.finishDrawing():this.Qv(t.coordinate)),n=!1}else this.Lv&&this.abortDrawing();return!n&&this.Rv&&t.preventDefault(),n},n.prototype.Zn=function(t){if(this.Nv=t.originalEvent.pointerType,this.Cv&&(!this.Lv&&this.Pv||this.Lv&&!this.Pv)){var n=this.Cv,i=t.pixel,r=n[0]-i[0],e=n[1]-i[1],o=r*r+e*e;if(this.Pv=this.Lv?o>this.$v:o<=this.$v,!this.Pv)return}this.Bv?this.ed(t.coordinate):this.od(t.coordinate.slice())},n.prototype.rd=function(t){var n=!1;if(this.Xv){var i=!1,r=[this.Bv],e=this.pe;if(e===sS)n=!0;else if(e===hS)n=2===this.Wv.length;else if(e===uS)i=this.Wv.length>this.Fv;else if(e===aS){var o=this.Wv;i=o[0].length>this.Fv,r=[o[0][0],o[0][o[0].length-2]]}if(i)for(var s=this.getMap(),u=0,a=r.length;u<a;u++){var h=r[u],f=s.getPixelFromCoordinate(h),c=t[0]-f[0],l=t[1]-f[1],v=this.Lv?1:this.zv;if(n=Math.sqrt(c*c+l*l)<=v){this.Bv=h;break}}}return n},n.prototype.od=function(t){this.Vv?this.Vv.getGeometry().setCoordinates(t):(this.Vv=new Et(new Se(t)),this.sd())},n.prototype.ud=function(t){this.Yv||(this.Yv=new Et);var n=t.getLinearRing(0),i=this.Yv.getGeometry();i?(i.setFlatCoordinates(n.getLayout(),n.getFlatCoordinates()),i.changed()):(i=new ng(n.getFlatCoordinates(),n.getLayout()),this.Yv.setGeometry(i))},n.prototype.td=function(t){for(var n=this.getMap().getView().getProjection(),i=Zr(this.qv);t.length<i;)t.push(0);this.Bv=t,this.pe===sS?this.Wv=t.slice():this.pe===aS?(this.Wv=[[t.slice(),t.slice()]],this.Zv=this.Wv[0]):this.Wv=[t.slice(),t.slice()],this.Zv&&(this.Yv=new Et(new ng(this.Zv)));var r=this.Bu(this.Wv,void 0,n);this.Xv=new Et,this.K&&this.Xv.setGeometryName(this.K),this.Xv.setGeometry(r),this.sd(),this.dispatchEvent(new vS(fS,this.Xv))},n.prototype.ed=function(t){for(var n,i,r=this.getMap(),e=this.Xv.getGeometry(),o=r.getView().getProjection(),s=Zr(this.qv);t.length<s;)t.push(0);(this.pe===sS?i=this.Wv:this.pe===aS?(i=(n=this.Wv[0])[n.length-1],this.rd(r.getPixelFromCoordinate(t))&&(t=this.Bv.slice())):i=(n=this.Wv)[n.length-1],i[0]=t[0],i[1]=t[1],this.Bu(this.Wv,e,o),this.Vv)&&this.Vv.getGeometry().setCoordinates(t);if("Polygon"===e.getType()&&this.pe!==aS)this.ud(e);else if(this.Zv){this.Yv.getGeometry().setCoordinates(this.Zv)}this.sd()},n.prototype.Qv=function(t){var n,i,r=this.Xv.getGeometry(),e=this.getMap().getView().getProjection(),o=this.pe;o===uS||o===hS?(this.Bv=t.slice(),(i=this.Wv).length>=this.Gv&&(this.Lv?i.pop():n=!0),i.push(t.slice()),this.Bu(i,r,e)):o===aS&&((i=this.Wv[0]).length>=this.Gv&&(this.Lv?i.pop():n=!0),i.push(t.slice()),n&&(this.Bv=i[0]),this.Bu(this.Wv,r,e)),this.od(t.slice()),this.sd(),n&&this.finishDrawing()},n.prototype.removeLastPoint=function(){if(this.Xv){var t,n=this.Xv.getGeometry(),i=this.getMap().getView().getProjection(),r=this.pe;if(r===uS||r===hS){if((t=this.Wv).splice(-2,1),t.length>=2){this.Bv=t[t.length-2].slice();var e=this.Bv.slice();t[t.length-1]=e,this.od(e)}this.Bu(t,n,i),"Polygon"===n.getType()&&this.Yv&&this.ud(n)}else if(r===aS){(t=this.Wv[0]).splice(-2,1);var o=this.Yv.getGeometry();if(t.length>=2){e=t[t.length-2].slice();t[t.length-1]=e,this.od(e)}o.setCoordinates(t),this.Bu(this.Wv,n,i)}1===t.length&&this.abortDrawing(),this.sd()}},n.prototype.finishDrawing=function(){var t=this.ad();if(t){var n=this.Wv,i=t.getGeometry(),r=this.getMap().getView().getProjection();this.pe===uS?(n.pop(),this.Bu(n,i,r)):this.pe===aS&&(n[0].pop(),this.Bu(n,i,r),n=i.getCoordinates()),"MultiPoint"===this.rl?t.setGeometry(new Kw([n])):"MultiLineString"===this.rl?t.setGeometry(new rg([n])):"MultiPolygon"===this.rl&&t.setGeometry(new sg([n])),this.dispatchEvent(new vS(cS,t)),this.Re&&this.Re.push(t),this._v&&this._v.addFeature(t)}},n.prototype.ad=function(){this.Bv=null;var t=this.Xv;return this.Xv=null,this.Vv=null,this.Yv=null,this.Kv.getSource().clear(!0),t},n.prototype.abortDrawing=function(){var t=this.ad();t&&this.dispatchEvent(new vS(lS,t))},n.prototype.appendCoordinates=function(t){var n,i=this.pe,r=!this.Xv;if(r&&this.td(t[0]),i===uS||i===hS)n=this.Wv;else{if(i!==aS)return;n=this.Wv&&this.Wv.length?this.Wv[0]:[]}r&&n.shift(),n.pop();for(var e=0;e<t.length;e++)this.Qv(t[e]);var o=t[t.length-1];this.Qv(o),this.ed(o)},n.prototype.extend=function(t){var n=t.getGeometry();this.Xv=t,this.Wv=n.getCoordinates();var i=this.Wv[this.Wv.length-1];this.Bv=i.slice(),this.Wv.push(i.slice()),this.Vv=new Et(new Se(i)),this.sd(),this.dispatchEvent(new vS(fS,this.Xv))},n.prototype.sd=function(){var t=[];this.Xv&&t.push(this.Xv),this.Yv&&t.push(this.Yv),this.Vv&&t.push(this.Vv);var n=this.Kv.getSource();n.clear(!0),n.addFeatures(t)},n.prototype.Jv=function(){var t=this.getMap(),n=this.getActive();t&&n||this.abortDrawing(),this.Kv.setMap(n?t:null)},n}(Ma),pS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),yS="extentchanged",mS=function(t){function n(n){var i=t.call(this,yS)||this;return i.extent=n,i}return pS(n,t),n}(c);function wS(){var t=Mv();return function(n,i){return t.Point}}function gS(t){return function(n){return yn([t,n])}}function bS(t,n){return t[0]==n[0]?function(i){return yn([t,[i[0],n[1]]])}:t[1]==n[1]?function(i){return yn([t,[n[0],i[1]]])}:null}var xS=function(t){function n(n){var i,r=this,e=n||{};return(r=t.call(this,e)||this).on,r.once,r.un,r.Zr=e.condition?e.condition:Ta,r.st=null,r.hd=null,r.fd=void 0!==e.pixelTolerance?e.pixelTolerance:10,r.ld=!1,r.vd=null,r.dd=null,n||(n={}),r.yd=new lg({source:new ad({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.boxStyle?n.boxStyle:(i=Mv(),function(t,n){return i.Polygon}),updateWhileAnimating:!0,updateWhileInteracting:!0}),r.md=new lg({source:new ad({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.pointerStyle?n.pointerStyle:wS(),updateWhileAnimating:!0,updateWhileInteracting:!0}),n.extent&&r.setExtent(n.extent),r}return pS(n,t),n.prototype.wd=function(t,n){var i=n.getCoordinateFromPixelInternal(t),r=this.getExtentInternal();if(r){var e=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]]]]}(r);e.sort((function(t,n){return nr(i,t)-nr(i,n)}));var o=e[0],s=Yi(i,o),u=n.getPixelFromCoordinateInternal(s);if(tr(t,u)<=this.fd){var a=n.getPixelFromCoordinateInternal(o[0]),h=n.getPixelFromCoordinateInternal(o[1]),f=Qi(u,a),c=Qi(u,h),l=Math.sqrt(Math.min(f,c));return this.ld=l<=this.fd,this.ld&&(s=f>c?o[1]:o[0]),s}}return null},n.prototype.Zn=function(t){var n=t.pixel,i=t.map,r=this.wd(n,i);r||(r=i.getCoordinateFromPixelInternal(n)),this.gd(r)},n.prototype.bd=function(t){var n=this.vd;return n?t?n.setGeometry(Ze(t)):n.setGeometry(void 0):(n=new Et(t?Ze(t):{}),this.vd=n,this.yd.getSource().addFeature(n)),n},n.prototype.gd=function(t){var n=this.dd;n?n.getGeometry().setCoordinates(t):(n=new Et(new Se(t)),this.dd=n,this.md.getSource().addFeature(n));return n},n.prototype.handleEvent=function(n){return!n.originalEvent||!this.Zr(n)||(n.type!=su.POINTERMOVE||this.handlingDownUpSequence||this.Zn(n),t.prototype.handleEvent.call(this,n),!1)},n.prototype.handleDownEvent=function(t){var n=t.pixel,i=t.map,r=this.getExtentInternal(),e=this.wd(n,i),o=function(t){var n=null,i=null;return t[0]==r[0]?n=r[2]:t[0]==r[2]&&(n=r[0]),t[1]==r[1]?i=r[3]:t[1]==r[3]&&(i=r[1]),null!==n&&null!==i?[n,i]:null};if(e&&r){var s=e[0]==r[0]||e[0]==r[2]?e[0]:null,u=e[1]==r[1]||e[1]==r[3]?e[1]:null;null!==s&&null!==u?this.hd=gS(o(e)):null!==s?this.hd=bS(o([s,r[1]]),o([s,r[3]])):null!==u&&(this.hd=bS(o([r[0],u]),o([r[2],u])))}else e=i.getCoordinateFromPixelInternal(n),this.setExtent([e[0],e[1],e[0],e[1]]),this.hd=gS(e);return!0},n.prototype.handleDragEvent=function(t){if(this.hd){var n=t.coordinate;this.setExtent(this.hd(n)),this.gd(n)}},n.prototype.handleUpEvent=function(t){this.hd=null;var n=this.getExtentInternal();return n&&0!==Fn(n)||this.setExtent(null),!1},n.prototype.setMap=function(n){this.yd.setMap(n),this.md.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getExtent=function(){return Nr(this.getExtentInternal(),this.getMap().getView().getProjection())},n.prototype.getExtentInternal=function(){return this.st},n.prototype.setExtent=function(t){this.st=t||null,this.bd(t),this.dispatchEvent(new mS(this.st))},n}(Ma),MS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function _S(t){return parseFloat(t)}function SS(t){return function(t){return pi(t,5)}(t).toString()}function OS(t,n){return!isNaN(t)&&t!==_S(SS(n))}var jS=function(t){function n(n){var i,r=t.call(this)||this,e=A({animate:!0,replace:!1,prefix:""},n||{});return i=!0===e.animate?{duration:250}:e.animate?e.animate:null,r.xd=i,r.Md=e.replace,r._d=e.prefix,r.gn=[],r.Sd=!0,r.Jv=r.Jv.bind(r),r}return MS(n,t),n.prototype.Od=function(t){return this._d?this._d+t:t},n.prototype.jd=function(t,n){return t.get(this.Od(n))},n.prototype.Ed=function(t,n,i){t.set(this.Od(n),i)},n.prototype.Td=function(t,n){t.delete(this.Od(n))},n.prototype.setMap=function(n){var i=this.getMap();t.prototype.setMap.call(this,n),n!==i&&(i&&this.Ev(i),n&&(this.Sd=!0,this.Jv(),this.jv(n)))},n.prototype.jv=function(t){this.gn.push($(t,pu,this.Ad,this),$(t.getLayerGroup(),L,this.Ad,this),$(t,"change:layergroup",this.Pd,this)),this.Md||addEventListener("popstate",this.Jv)},n.prototype.Ev=function(t){for(var n=0,i=this.gn.length;n<i;++n)H(this.gn[n]);this.gn.length=0,this.Md||removeEventListener("popstate",this.Jv);var r=new URL(window.location.href),e=r.searchParams;this.Td(e,"x"),this.Td(e,"y"),this.Td(e,"z"),this.Td(e,"r"),this.Td(e,"l"),window.history.replaceState(null,"",r)},n.prototype.Pd=function(){var t=this.getMap();t&&(this.Ev(t),this.jv(t),this.Sd=!0,this.Ad())},n.prototype.Jv=function(){var t=this.getMap();if(t){var n=t.getView();if(n){var i=new URL(window.location.href).searchParams,r=!1,e={},o=_S(this.jd(i,"z"));OS(o,n.getZoom())&&(r=!0,e.zoom=o);var s=_S(this.jd(i,"r"));OS(s,n.getRotation())&&(r=!0,e.rotation=s);var u,a,h=[_S(this.jd(i,"x")),_S(this.jd(i,"y"))];u=h,a=n.getCenter(),(OS(u[0],a[0])||OS(u[1],a[1]))&&(r=!0,e.center=h),r&&(!this.Sd&&this.xd?n.animate(A(e,this.xd)):(e.center&&n.setCenter(e.center),"zoom"in e&&n.setZoom(e.zoom),"rotation"in e&&n.setRotation(e.rotation)));var f=t.getAllLayers(),c=this.jd(i,"l");if(c&&c.length===f.length)for(var l=0,v=f.length;l<v;++l){var d=parseInt(c[l]);if(!isNaN(d)){var p=Boolean(d),y=f[l];y.getVisible()!==p&&y.setVisible(p)}}}}},n.prototype.Ad=function(){var t=this.getMap();if(t){var n=t.getView();if(n){var i=this.Sd;this.Sd=!1;for(var r=n.getCenter(),e=n.getZoom(),o=n.getRotation(),s=t.getAllLayers(),u=new Array(s.length),a=0,h=s.length;a<h;++a)u[a]=s[a].getVisible()?"1":"0";var f=new URL(window.location.href),c=f.searchParams;this.Ed(c,"x",SS(r[0])),this.Ed(c,"y",SS(r[1])),this.Ed(c,"z",SS(e)),this.Ed(c,"r",SS(o)),this.Ed(c,"l",u.join("")),f.href!==window.location.href&&(i||this.Md?window.history.replaceState(null,"",f):window.history.pushState(null,"",f))}}},n}(ma),ES=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),TS=[0,0,0,0],AS=[],PS="modifystart",CS="modifyend",kS=function(t){function n(n,i,r){var e=t.call(this,n)||this;return e.features=i,e.mapBrowserEvent=r,e}return ES(n,t),n}(c);function IS(t,n){return t.index-n.index}function NS(t,n,i){var r=n.geometry;if("Circle"===r.getType()){var e=r;if(1===n.index){var o=Cr();o&&(e=e.clone().transform(o,i));var s=Qi(e.getCenter(),Ir(t,i)),u=Math.sqrt(s)-e.getRadius();return u*u}}var a=Ir(t,i);return AS[0]=Ir(n.segment[0],i),AS[1]=Ir(n.segment[1],i),nr(a,AS)}function LS(t,n,i){var r=n.geometry;if("Circle"===r.getType()&&1===n.index){var e=r,o=Cr();return o&&(e=e.clone().transform(o,i)),kr(e.getClosestPoint(Ir(t,i)),i)}var s=Ir(t,i);return AS[0]=Ir(n.segment[0],i),AS[1]=Ir(n.segment[1],i),kr(Yi(s,AS),i)}var zS=function(t){function n(n){var i,r,e=t.call(this,n)||this;if(e.on,e.once,e.un,e.Cd=e.$a.bind(e),e.Zr=n.condition?n.condition:za,e.kd=function(t){return Sa(t)&&Ca(t)},e.Id=n.deleteCondition?n.deleteCondition:e.kd,e.Nd=n.insertVertexCondition?n.insertVertexCondition:Ta,e.dd=null,e.Ld=null,e.zd=[0,0],e.Rd=!1,e.Fd=null,e.Gd=new Pv,e.fd=void 0!==n.pixelTolerance?n.pixelTolerance:10,e.ld=!1,e.Dd=!1,e.qd=[],e.Kv=new lg({source:new ad({useSpatialIndex:!1,wrapX:!!n.wrapX}),style:n.style?n.style:(i=Mv(),function(t,n){return i.Point}),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.Ud={Point:e.Bd.bind(e),LineString:e.Xd.bind(e),LinearRing:e.Xd.bind(e),Polygon:e.Vd.bind(e),MultiPoint:e.Wd.bind(e),MultiLineString:e.Yd.bind(e),MultiPolygon:e.Zd.bind(e),Circle:e.$d.bind(e),GeometryCollection:e.Kd.bind(e)},e._v=null,e.Hd=null,n.features?r=n.features:n.source&&(e._v=n.source,r=new ft(e._v.getFeatures()),e._v.addEventListener(Qv,e.Jd.bind(e)),e._v.addEventListener(id,e.Qd.bind(e))),!r)throw new Error("The modify interaction requires features, a source or a layer");return n.hitDetection&&(e.Hd=n.hitDetection),e.Re=r,e.Re.forEach(e.tp.bind(e)),e.Re.addEventListener(ot,e.np.bind(e)),e.Re.addEventListener(st,e.ip.bind(e)),e.rp=null,e.Br=[0,0],e.ep=void 0===n.snapToPointer?!e.Hd:n.snapToPointer,e}return ES(n,t),n.prototype.tp=function(t){var n=t.getGeometry();if(n){var i=this.Ud[n.getType()];i&&i(t,n)}var r=this.getMap();r&&r.isRendered()&&this.getActive()&&this.op(this.zd,r),t.addEventListener(L,this.Cd)},n.prototype.sp=function(t,n){if(!this.Fd){this.Fd=new ft;for(var i=this.Fd.getArray(),r=0,e=n.length;r<e;++r)for(var o=n[r],s=0,u=o.length;s<u;++s){var a=o[s].feature;a&&-1===i.indexOf(a)&&this.Fd.push(a)}0===this.Fd.getLength()?this.Fd=null:this.dispatchEvent(new kS(PS,this.Fd,t))}},n.prototype.up=function(t){this.ap(t),this.dd&&0===this.Re.getLength()&&(this.Kv.getSource().removeFeature(this.dd),this.dd=null),t.removeEventListener(L,this.Cd)},n.prototype.ap=function(t){var n=this.Gd,i=[];n.forEach((function(n){t===n.feature&&i.push(n)}));for(var r=i.length-1;r>=0;--r){for(var e=i[r],o=this.qd.length-1;o>=0;--o)this.qd[o][0]===e&&this.qd.splice(o,1);n.remove(e)}},n.prototype.setActive=function(n){this.dd&&!n&&(this.Kv.getSource().removeFeature(this.dd),this.dd=null),t.prototype.setActive.call(this,n)},n.prototype.setMap=function(n){this.Kv.setMap(n),t.prototype.setMap.call(this,n)},n.prototype.getOverlay=function(){return this.Kv},n.prototype.Jd=function(t){t.feature&&this.Re.push(t.feature)},n.prototype.Qd=function(t){t.feature&&this.Re.remove(t.feature)},n.prototype.np=function(t){this.tp(t.element)},n.prototype.$a=function(t){if(!this.Dd){var n=t.target;this.up(n),this.tp(n)}},n.prototype.ip=function(t){var n=t.element;this.up(n)},n.prototype.Bd=function(t,n){var i=n.getCoordinates(),r={feature:t,geometry:n,segment:[i,i]};this.Gd.insert(n.getExtent(),r)},n.prototype.Wd=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r){var o=i[r],s={feature:t,geometry:n,depth:[r],index:r,segment:[o,o]};this.Gd.insert(n.getExtent(),s)}},n.prototype.Xd=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length-1;r<e;++r){var o=i.slice(r,r+2),s={feature:t,geometry:n,index:r,segment:o};this.Gd.insert(yn(o),s)}},n.prototype.Yd=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,u=o.length-1;s<u;++s){var a=o.slice(s,s+2),h={feature:t,geometry:n,depth:[r],index:s,segment:a};this.Gd.insert(yn(a),h)}},n.prototype.Vd=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,u=o.length-1;s<u;++s){var a=o.slice(s,s+2),h={feature:t,geometry:n,depth:[r],index:s,segment:a};this.Gd.insert(yn(a),h)}},n.prototype.Zd=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,u=o.length;s<u;++s)for(var a=o[s],h=0,f=a.length-1;h<f;++h){var c=a.slice(h,h+2),l={feature:t,geometry:n,depth:[s,r],index:h,segment:c};this.Gd.insert(yn(c),l)}},n.prototype.$d=function(t,n){var i=n.getCenter(),r={feature:t,geometry:n,index:0,segment:[i,i]},e={feature:t,geometry:n,index:1,segment:[i,i]},o=[r,e];r.featureSegments=o,e.featureSegments=o,this.Gd.insert(En(i),r);var s=n,u=Cr();if(u&&this.getMap()){var a=this.getMap().getView().getProjection();s=$e(s=s.clone().transform(u,a)).transform(a,u)}this.Gd.insert(s.getExtent(),e)},n.prototype.Kd=function(t,n){for(var i=n.getGeometriesArray(),r=0;r<i.length;++r){var e=i[r];(0,this.Ud[e.getType()])(t,e)}},n.prototype.hp=function(t,n,i){var r=this.dd;r?r.getGeometry().setCoordinates(t):(r=new Et(new Se(t)),this.dd=r,this.Kv.getSource().addFeature(r));return r.set("features",n),r.set("geometries",i),r},n.prototype.handleEvent=function(n){return!n.originalEvent||(this.rp=n,n.map.getView().getInteracting()||n.type!=su.POINTERMOVE||this.handlingDownUpSequence||this.Zn(n),this.dd&&this.Id(n)&&(i=!(n.type!=su.SINGLECLICK||!this.Rd)||this.removePoint()),n.type==su.SINGLECLICK&&(this.Rd=!1),t.prototype.handleEvent.call(this,n)&&!i);var i},n.prototype.handleDragEvent=function(t){this.Rd=!1,this.sp(t,this.qd);for(var n=[t.coordinate[0]+this.Br[0],t.coordinate[1]+this.Br[1]],i=[],r=[],e=0,o=this.qd.length;e<o;++e){var s=this.qd[e],u=s[0],a=u.feature;-1===i.indexOf(a)&&i.push(a);var h=u.geometry;-1===r.indexOf(h)&&r.push(h);for(var f=u.depth,c=void 0,l=u.segment,v=s[1];n.length<h.getStride();)n.push(l[v][n.length]);switch(h.getType()){case"Point":c=n,l[0]=n,l[1]=n;break;case"MultiPoint":(c=h.getCoordinates())[u.index]=n,l[0]=n,l[1]=n;break;case"LineString":(c=h.getCoordinates())[u.index+v]=n,l[v]=n;break;case"MultiLineString":case"Polygon":(c=h.getCoordinates())[f[0]][u.index+v]=n,l[v]=n;break;case"MultiPolygon":(c=h.getCoordinates())[f[1]][f[0]][u.index+v]=n,l[v]=n;break;case"Circle":if(l[0]=n,l[1]=n,0===u.index)this.Dd=!0,h.setCenter(n),this.Dd=!1;else{this.Dd=!0;var d=t.map.getView().getProjection(),p=tr(Ir(h.getCenter(),d),Ir(n,d)),y=Cr();if(y){var m=h.clone().transform(y,d);m.setRadius(p),p=m.transform(d,y).getRadius()}h.setRadius(p),this.Dd=!1}}c&&this.fp(h,c)}this.hp(n,i,r)},n.prototype.handleDownEvent=function(t){if(!this.Zr(t))return!1;var n=t.coordinate;this.op(t.pixel,t.map,n),this.qd.length=0,this.Fd=null;var i=this.dd;if(i){var r=t.map.getView().getProjection(),e=[],s=i.getGeometry().getCoordinates(),u=yn([s]),a=this.Gd.getInExtent(u),h={};a.sort(IS);for(var f=0,c=a.length;f<c;++f){var l=a[f],v=l.segment,d=o(l.geometry),p=l.depth;if(p&&(d+="-"+p.join("-")),h[d]||(h[d]=new Array(2)),"Circle"!==l.geometry.getType()||1!==l.index)if(!Ki(v[0],s)||h[d][0])if(!Ki(v[1],s)||h[d][1])o(v)in this.Ld&&!h[d][0]&&!h[d][1]&&this.Nd(t)&&e.push(l);else{if(h[d][0]&&0===h[d][0].index){var y=l.geometry.getCoordinates();switch(l.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":y=y[p[1]];case"Polygon":if(l.index!==y[p[0]].length-2)continue}}this.qd.push([l,1]),h[d][1]=l}else this.qd.push([l,0]),h[d][0]=l;else Ki(LS(n,l,r),s)&&!h[d][0]&&(this.qd.push([l,0]),h[d][0]=l)}e.length&&this.sp(t,[e]);for(var m=e.length-1;m>=0;--m)this.cp(e[m],s)}return!!this.dd},n.prototype.handleUpEvent=function(t){for(var n=this.qd.length-1;n>=0;--n){var i=this.qd[n][0],r=i.geometry;if("Circle"===r.getType()){var e=r.getCenter(),o=i.featureSegments[0],s=i.featureSegments[1];o.segment[0]=e,o.segment[1]=e,s.segment[0]=e,s.segment[1]=e,this.Gd.update(En(e),o);var u=r,a=Cr();if(a){var h=t.map.getView().getProjection();u=$e(u=u.clone().transform(a,h)).transform(h,a)}this.Gd.update(u.getExtent(),s)}else this.Gd.update(yn(i.segment),i)}return this.Fd&&(this.dispatchEvent(new kS(CS,this.Fd,t)),this.Fd=null),!1},n.prototype.Zn=function(t){this.zd=t.pixel,this.op(t.pixel,t.map,t.coordinate)},n.prototype.op=function(t,n,i){var r,e,s=this,u=i||n.getCoordinateFromPixel(t),a=n.getView().getProjection();if(this.Hd){var h="object"==typeof this.Hd?function(t){return t===s.Hd}:void 0;n.forEachFeatureAtPixel(t,(function(t,n,i){if("Point"===(i=i||t.getGeometry()).getType()&&y(s.Re.getArray(),t)){e=i;var o=i.getFlatCoordinates().slice(0,2);r=[{feature:t,geometry:i,segment:[o,o]}]}return!0}),{layerFilter:h})}if(!r){var f=Nr(mn(Lr(En(u,TS),a),n.getView().getResolution()*this.fd,TS),a);r=this.Gd.getInExtent(f)}if(r&&r.length>0){var c=r.sort((function(t,n){return NS(u,t,a)-NS(u,n,a)}))[0],l=c.segment,v=LS(u,c,a),d=n.getPixelFromCoordinate(v),p=tr(t,d);if(e||p<=this.fd){var m={};if(m[o(l)]=!0,this.ep||(this.Br[0]=v[0]-u[0],this.Br[1]=v[1]-u[1]),"Circle"===c.geometry.getType()&&1===c.index)this.ld=!0,this.hp(v,[c.feature],[c.geometry]);else{var w=n.getPixelFromCoordinate(l[0]),g=n.getPixelFromCoordinate(l[1]),b=Qi(d,w),x=Qi(d,g);p=Math.sqrt(Math.min(b,x)),this.ld=p<=this.fd,this.ld&&(v=b>x?l[1]:l[0]),this.hp(v,[c.feature],[c.geometry]);var M={};M[o(c.geometry)]=!0;for(var _=1,S=r.length;_<S;++_){var O=r[_].segment;if(!(Ki(l[0],O[0])&&Ki(l[1],O[1])||Ki(l[0],O[1])&&Ki(l[1],O[0])))break;var j=o(r[_].geometry);j in M||(M[j]=!0,m[o(O)]=!0)}}return void(this.Ld=m)}}this.dd&&(this.Kv.getSource().removeFeature(this.dd),this.dd=null)},n.prototype.cp=function(t,n){for(var i,r=t.segment,e=t.feature,o=t.geometry,s=t.depth,u=t.index;n.length<o.getStride();)n.push(0);switch(o.getType()){case"MultiLineString":case"Polygon":(i=o.getCoordinates())[s[0]].splice(u+1,0,n);break;case"MultiPolygon":(i=o.getCoordinates())[s[1]][s[0]].splice(u+1,0,n);break;case"LineString":(i=o.getCoordinates()).splice(u+1,0,n);break;default:return}this.fp(o,i);var a=this.Gd;a.remove(t),this.lp(o,u,s,1);var h={segment:[r[0],n],feature:e,geometry:o,depth:s,index:u};a.insert(yn(h.segment),h),this.qd.push([h,1]);var f={segment:[n,r[1]],feature:e,geometry:o,depth:s,index:u+1};a.insert(yn(f.segment),f),this.qd.push([f,0]),this.Rd=!0},n.prototype.removePoint=function(){if(this.rp&&this.rp.type!=su.POINTERDRAG){var t=this.rp;this.sp(t,this.qd);var n=this.vp();return this.Fd&&this.dispatchEvent(new kS(CS,this.Fd,t)),this.Fd=null,n}return!1},n.prototype.vp=function(){var t,n,i,r,e,s,u,a,h,f,c,l=this.qd,v={},d=!1;for(e=l.length-1;e>=0;--e)c=o((f=(i=l[e])[0]).feature),f.depth&&(c+="-"+f.depth.join("-")),c in v||(v[c]={}),0===i[1]?(v[c].right=f,v[c].index=f.index):1==i[1]&&(v[c].left=f,v[c].index=f.index+1);for(c in v){switch(h=v[c].right,u=v[c].left,(a=(s=v[c].index)-1)<0&&(a=0),t=n=(r=(f=void 0!==u?u:h).geometry).getCoordinates(),d=!1,r.getType()){case"MultiLineString":n[f.depth[0]].length>2&&(n[f.depth[0]].splice(s,1),d=!0);break;case"LineString":n.length>2&&(n.splice(s,1),d=!0);break;case"MultiPolygon":t=t[f.depth[1]];case"Polygon":(t=t[f.depth[0]]).length>4&&(s==t.length-1&&(s=0),t.splice(s,1),d=!0,0===s&&(t.pop(),t.push(t[0]),a=t.length-1))}if(d){this.fp(r,n);var p=[];if(void 0!==u&&(this.Gd.remove(u),p.push(u.segment[0])),void 0!==h&&(this.Gd.remove(h),p.push(h.segment[1])),void 0!==u&&void 0!==h){var y={depth:f.depth,feature:f.feature,geometry:f.geometry,index:a,segment:p};this.Gd.insert(yn(y.segment),y)}this.lp(r,s,f.depth,-1),this.dd&&(this.Kv.getSource().removeFeature(this.dd),this.dd=null),l.length=0}}return d},n.prototype.fp=function(t,n){this.Dd=!0,t.setCoordinates(n),this.Dd=!1},n.prototype.lp=function(t,n,i,r){this.Gd.forEachInExtent(t.getExtent(),(function(e){e.geometry===t&&(void 0===i||void 0===e.depth||x(e.depth,i))&&e.index>n&&(e.index+=r)}))},n}(Ma),RS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),FS="select",GS=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.selected=i,o.deselected=r,o.mapBrowserEvent=e,o}return RS(n,t),n}(c),DS={};var qS=function(t){function n(n){var i=t.call(this)||this;i.on,i.once,i.un;var r,e,o=n||{};if(i.dp=i.tp.bind(i),i.pp=i.up.bind(i),i.Zr=o.condition?o.condition:Ca,i.yp=o.addCondition?o.addCondition:Pa,i.mp=o.removeCondition?o.removeCondition:Pa,i.wp=o.toggleCondition?o.toggleCondition:Ia,i.gp=!!o.multi&&o.multi,i.bp=o.filter?o.filter:S,i.xp=o.hitTolerance?o.hitTolerance:0,i.H=void 0!==o.style?o.style:(g((r=Mv()).Polygon,r.LineString),g(r.GeometryCollection,r.LineString),function(t){return t.getGeometry()?r[t.getGeometry().getType()]:null}),i.Re=o.features||new ft,o.layers)if("function"==typeof o.layers)e=o.layers;else{var s=o.layers;e=function(t){return y(s,t)}}else e=S;return i.Mp=e,i._p={},i}return RS(n,t),n.prototype.Sp=function(t,n){this._p[o(t)]=n},n.prototype.getFeatures=function(){return this.Re},n.prototype.getHitTolerance=function(){return this.xp},n.prototype.getLayer=function(t){return this._p[o(t)]},n.prototype.setHitTolerance=function(t){this.xp=t},n.prototype.setMap=function(n){this.getMap()&&this.H&&this.Re.forEach(this.Op.bind(this)),t.prototype.setMap.call(this,n),n?(this.Re.addEventListener(ot,this.dp),this.Re.addEventListener(st,this.pp),this.H&&this.Re.forEach(this.jp.bind(this))):(this.Re.removeEventListener(ot,this.dp),this.Re.removeEventListener(st,this.pp))},n.prototype.tp=function(t){var n=t.element;if(this.H&&this.jp(n),!this.getLayer(n)){var i=this.getMap().getAllLayers().find((function(t){if(t instanceof lg&&t.getSource()&&t.getSource().hasFeature(n))return t}));i&&this.Sp(n,i)}},n.prototype.up=function(t){var n=t.element;this.H&&this.Op(n)},n.prototype.getStyle=function(){return this.H},n.prototype.jp=function(t){var n=o(t);n in DS||(DS[n]=t.getStyle()),t.setStyle(this.H)},n.prototype.Op=function(t){for(var i=this.getMap().getInteractions().getArray(),r=i.length-1;r>=0;--r){var e=i[r];if(e!==this&&e instanceof n&&e.getStyle()&&-1!==e.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(e.getStyle())}var s=o(t);t.setStyle(DS[s]),delete DS[s]},n.prototype.Ep=function(t){delete this._p[o(t)]},n.prototype.handleEvent=function(t){if(!this.Zr(t))return!0;var n=this.yp(t),i=this.mp(t),r=this.wp(t),e=!n&&!i&&!r,o=t.map,s=this.getFeatures(),u=[],a=[];if(e){P(this._p),o.forEachFeatureAtPixel(t.pixel,function(t,n){if(this.bp(t,n))return this.Sp(t,n),a.push(t),!this.gp}.bind(this),{layerFilter:this.Mp,hitTolerance:this.xp});for(var h=s.getLength()-1;h>=0;--h){var f=s.item(h),c=a.indexOf(f);c>-1?a.splice(c,1):(s.remove(f),u.push(f))}0!==a.length&&s.extend(a)}else{o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.bp(t,e))return!n&&!r||y(s.getArray(),t)?(i||r)&&y(s.getArray(),t)&&(u.push(t),this.Ep(t)):(this.Sp(t,e),a.push(t)),!this.gp}.bind(this),{layerFilter:this.Mp,hitTolerance:this.xp});for(var l=u.length-1;l>=0;--l)s.remove(u[l]);s.extend(a)}return(a.length>0||u.length>0)&&this.dispatchEvent(new GS(FS,a,u,t)),!0},n}(ma),US=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function BS(t){return t.feature?t.feature:t.element?t.element:void 0}var XS=[],VS=function(t){function n(n){var i=this,r=n||{},e=r;return e.handleDownEvent||(e.handleDownEvent=S),e.stopDown||(e.stopDown=O),(i=t.call(this,e)||this)._v=r.source?r.source:null,i.Tp=void 0===r.vertex||r.vertex,i.Ap=void 0===r.edge||r.edge,i.Re=r.features?r.features:null,i.Pp=[],i.Cp={},i.kp={},i.Ip={},i.fd=void 0!==r.pixelTolerance?r.pixelTolerance:10,i.Gd=new Pv,i.Np={Point:i.Lp.bind(i),LineString:i.zp.bind(i),LinearRing:i.zp.bind(i),Polygon:i.Rp.bind(i),MultiPoint:i.Fp.bind(i),MultiLineString:i.Gp.bind(i),MultiPolygon:i.Dp.bind(i),GeometryCollection:i.qp.bind(i),Circle:i.Up.bind(i)},i}return US(n,t),n.prototype.addFeature=function(t,n){var i=void 0===n||n,r=o(t),e=t.getGeometry();if(e){var s=this.Np[e.getType()];if(s){this.kp[r]=e.getExtent([1/0,1/0,-1/0,-1/0]);var u=[];if(s(u,e),1===u.length)this.Gd.insert(yn(u[0]),{feature:t,segment:u[0]});else if(u.length>1){var a=u.map((function(t){return yn(t)})),h=u.map((function(n){return{feature:t,segment:n}}));this.Gd.load(a,h)}}}i&&(this.Cp[r]=$(t,L,this.$a,this))},n.prototype.Bp=function(t){this.addFeature(t)},n.prototype.Xp=function(t){this.removeFeature(t)},n.prototype.Vp=function(){var t;return this.Re?t=this.Re:this._v&&(t=this._v.getFeatures()),t},n.prototype.handleEvent=function(n){var i=this.snapTo(n.pixel,n.coordinate,n.map);return i&&(n.coordinate=i.vertex.slice(0,2),n.pixel=i.vertexPixel),t.prototype.handleEvent.call(this,n)},n.prototype.np=function(t){var n=BS(t);this.addFeature(n)},n.prototype.ip=function(t){var n=BS(t);this.removeFeature(n)},n.prototype.$a=function(t){var n=t.target;if(this.handlingDownUpSequence){var i=o(n);i in this.Ip||(this.Ip[i]=n)}else this.Wp(n)},n.prototype.handleUpEvent=function(t){var n=C(this.Ip);return n.length&&(n.forEach(this.Wp.bind(this)),this.Ip={}),!1},n.prototype.removeFeature=function(t,n){var i=void 0===n||n,r=o(t),e=this.kp[r];if(e){var s=this.Gd,u=[];s.forEachInExtent(e,(function(n){t===n.feature&&u.push(n)}));for(var a=u.length-1;a>=0;--a)s.remove(u[a])}i&&(H(this.Cp[r]),delete this.Cp[r])},n.prototype.setMap=function(n){var i=this.getMap(),r=this.Pp,e=this.Vp();i&&(r.forEach(H),r.length=0,e.forEach(this.Xp.bind(this))),t.prototype.setMap.call(this,n),n&&(this.Re?r.push($(this.Re,ot,this.np,this),$(this.Re,st,this.ip,this)):this._v&&r.push($(this._v,Qv,this.np,this),$(this._v,id,this.ip,this)),e.forEach(this.Bp.bind(this)))},n.prototype.snapTo=function(t,n,i){var r=yn([i.getCoordinateFromPixel([t[0]-this.fd,t[1]+this.fd]),i.getCoordinateFromPixel([t[0]+this.fd,t[1]-this.fd])]),e=this.Gd.getInExtent(r),o=e.length;if(0===o)return null;var s,u=i.getView().getProjection(),a=Ir(n,u),h=1/0,f=this.fd*this.fd,c=function(){if(s){var n=i.getPixelFromCoordinate(s);if(Qi(t,n)<=f)return{vertex:s,vertexPixel:[Math.round(n[0]),Math.round(n[1])]}}return null};if(this.Tp){for(var l=0;l<o;++l){"Circle"!==(v=e[l]).feature.getGeometry().getType()&&v.segment.forEach((function(t){var n=Ir(t,u),i=Qi(a,n);i<h&&(s=t,h=i)}))}if(x=c())return x}if(this.Ap){for(l=0;l<o;++l){var v,d=null;if("Circle"===(v=e[l]).feature.getGeometry().getType()){var p=v.feature.getGeometry(),y=Cr();y&&(p=p.clone().transform(y,u)),d=kr(Wi(a,p),u)}else{var m=v.segment,w=m[0],g=m[1];g&&(XS[0]=Ir(w,u),XS[1]=Ir(g,u),d=Yi(a,XS))}if(d){var b=Qi(a,d);b<h&&(s=d,h=b)}}var x;if(x=c())return x}return null},n.prototype.Wp=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},n.prototype.Up=function(t,n){var i=this.getMap().getView().getProjection(),r=n,e=Cr();e&&(r=r.clone().transform(e,i));var o=$e(r);e&&o.transform(i,e);for(var s=o.getCoordinates()[0],u=0,a=s.length-1;u<a;++u)t.push(s.slice(u,u+2))},n.prototype.qp=function(t,n){for(var i=n.getGeometriesArray(),r=0;r<i.length;++r){var e=this.Np[i[r].getType()];e&&e(t,i[r])}},n.prototype.zp=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length-1;r<e;++r)t.push(i.slice(r,r+2))},n.prototype.Gp=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,u=o.length-1;s<u;++s)t.push(o.slice(s,s+2))},n.prototype.Fp=function(t,n){n.getCoordinates().forEach((function(n){t.push([n])}))},n.prototype.Dp=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,u=o.length;s<u;++s)for(var a=o[s],h=0,f=a.length-1;h<f;++h)t.push(a.slice(h,h+2))},n.prototype.Lp=function(t,n){t.push([n.getCoordinates()])},n.prototype.Rp=function(t,n){for(var i=n.getCoordinates(),r=0,e=i.length;r<e;++r)for(var o=i[r],s=0,u=o.length-1;s<u;++s)t.push(o.slice(s,s+2))},n}(Ma),WS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),YS="translatestart",ZS="translating",$S="translateend",KS=function(t){function n(n,i,r,e,o){var s=t.call(this,n)||this;return s.features=i,s.coordinate=r,s.startCoordinate=e,s.mapBrowserEvent=o,s}return WS(n,t),n}(c),HS=function(t){function n(n){var i,r=this,e=n||{};if((r=t.call(this,e)||this).on,r.once,r.un,r.Yp=null,r.Zp=null,r.Re=void 0!==e.features?e.features:null,e.layers&&!r.Re)if("function"==typeof e.layers)i=e.layers;else{var o=e.layers;i=function(t){return y(o,t)}}else i=S;return r.Mp=i,r.bp=e.filter&&!r.Re?e.filter:S,r.xp=e.hitTolerance?e.hitTolerance:0,r.Zr=e.condition?e.condition:Ta,r.$p=null,r.addChangeListener(va,r.Kp),r}return WS(n,t),n.prototype.handleDownEvent=function(t){if(!t.originalEvent||!this.Zr(t))return!1;if(this.$p=this.Hp(t.pixel,t.map),!this.Yp&&this.$p){this.Zp=t.coordinate,this.Yp=t.coordinate,this.handleMoveEvent(t);var n=this.Re||new ft([this.$p]);return this.dispatchEvent(new KS(YS,n,t.coordinate,this.Zp,t)),!0}return!1},n.prototype.handleUpEvent=function(t){if(this.Yp){this.Yp=null,this.handleMoveEvent(t);var n=this.Re||new ft([this.$p]);return this.dispatchEvent(new KS($S,n,t.coordinate,this.Zp,t)),this.Zp=null,!0}return!1},n.prototype.handleDragEvent=function(t){if(this.Yp){var n=t.coordinate,i=n[0]-this.Yp[0],r=n[1]-this.Yp[1],e=this.Re||new ft([this.$p]);e.forEach((function(t){var n=t.getGeometry();n.translate(i,r),t.setGeometry(n)})),this.Yp=n,this.dispatchEvent(new KS(ZS,e,n,this.Zp,t))}},n.prototype.handleMoveEvent=function(t){var n=t.map.getViewport();this.Hp(t.pixel,t.map)?(n.classList.remove(this.Yp?"ol-grab":"ol-grabbing"),n.classList.add(this.Yp?"ol-grabbing":"ol-grab")):n.classList.remove("ol-grab","ol-grabbing")},n.prototype.Hp=function(t,n){return n.forEachFeatureAtPixel(t,function(t,n){if(this.bp(t,n)&&(!this.Re||y(this.Re.getArray(),t)))return t}.bind(this),{layerFilter:this.Mp,hitTolerance:this.xp})},n.prototype.getHitTolerance=function(){return this.xp},n.prototype.setHitTolerance=function(t){this.xp=t},n.prototype.setMap=function(n){var i=this.getMap();t.prototype.setMap.call(this,n),this.Jv(i)},n.prototype.Kp=function(){this.Jv(null)},n.prototype.Jv=function(t){var n=this.getMap(),i=this.getActive();n&&i||(n=n||t)&&n.getViewport().classList.remove("ol-grab","ol-grabbing")},n}(Ma);function JS(t,n,i,r,e,o){var s,u;void 0!==e?(s=e,u=void 0!==o?o:0):(s=[],u=0);for(var a=n;a<i;){var h=t[a++];s[u++]=t[a++],s[u++]=h;for(var f=2;f<r;++f)s[u++]=t[a++]}return s.length=u,s}var QS=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),tO={Point:function(t){var n;n=void 0!==t.m&&void 0!==t.z?new Se([t.x,t.y,t.z,t.m],Ct):void 0!==t.z?new Se([t.x,t.y,t.z],At):void 0!==t.m?new Se([t.x,t.y,t.m],Pt):new Se([t.x,t.y]);return n},LineString:function(t){var n=rO(t);return new ng(t.paths[0],n)},Polygon:function(t){var n=rO(t);return new We(t.rings,n)},MultiPoint:function(t){var n=rO(t);return new Kw(t.points,n)},MultiLineString:function(t){var n=rO(t);return new rg(t.paths,n)},MultiPolygon:function(t){var n=rO(t);return new sg(t.rings,n)}},nO={Point:function(t,n){var i,r=t.getCoordinates(),e=t.getLayout();e===At?i={x:r[0],y:r[1],z:r[2]}:e===Pt?i={x:r[0],y:r[1],m:r[2]}:e===Ct?i={x:r[0],y:r[1],z:r[2],m:r[3]}:e===Tt?i={x:r[0],y:r[1]}:St(!1,34);return i},LineString:function(t,n){var i=eO(t);return{hasZ:i.hasZ,hasM:i.hasM,paths:[t.getCoordinates()]}},Polygon:function(t,n){var i=eO(t);return{hasZ:i.hasZ,hasM:i.hasM,rings:t.getCoordinates(!1)}},MultiPoint:function(t,n){var i=eO(t);return{hasZ:i.hasZ,hasM:i.hasM,points:t.getCoordinates()}},MultiLineString:function(t,n){var i=eO(t);return{hasZ:i.hasZ,hasM:i.hasM,paths:t.getCoordinates()}},MultiPolygon:function(t,n){for(var i=eO(t),r=t.getCoordinates(!1),e=[],o=0;o<r.length;o++)for(var s=r[o].length-1;s>=0;s--)e.push(r[o][s]);return{hasZ:i.hasZ,hasM:i.hasM,rings:e}}};function iO(t,n){var i,r,e;if(!t)return null;if("number"==typeof t.x&&"number"==typeof t.y)e="Point";else if(t.points)e="MultiPoint";else if(t.paths){e=1===t.paths.length?"LineString":"MultiLineString"}else if(t.rings){var o=t,s=rO(o),u=function(t,n){var i,r,e=[],o=[],s=[];for(i=0,r=t.length;i<r;++i){e.length=0,oe(e,0,t[i],n.length),Fe(e,0,e.length,n.length)?o.push([t[i]]):s.push(t[i])}for(;s.length;){var u=s.shift(),a=!1;for(i=o.length-1;i>=0;i--){var h=o[i][0];if(xn(new Me(h).getExtent(),new Me(u).getExtent())){o[i].push(u),a=!0;break}}a||o.push([u.reverse()])}return o}(o.rings,s);1===u.length?(e="Polygon",t=A({},t,((i={}).rings=u[0],i))):(e="MultiPolygon",t=A({},t,((r={}).rings=u,r)))}return Eg((0,tO[e])(t),!1,n)}function rO(t){var n=Tt;return!0===t.hasZ&&!0===t.hasM?n=Ct:!0===t.hasZ?n=At:!0===t.hasM&&(n=Pt),n}function eO(t){var n=t.getLayout();return{hasZ:n===At||n===Ct,hasM:n===Pt||n===Ct}}function oO(t,n){return(0,nO[t.getType()])(Eg(t,!0,n),n)}var sO=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this)||this).K=r.geometryName,i}return QS(n,t),n.prototype.readFeatureFromObject=function(t,n,i){var r=t,e=iO(r.geometry,n),o=new Et;if(this.K&&o.setGeometryName(this.K),o.setGeometry(e),r.attributes){o.setProperties(r.attributes,!0);var s=r.attributes[i];void 0!==s&&o.setId(s)}return o},n.prototype.readFeaturesFromObject=function(t,n){var i=n||{};if(t.features){for(var r=[],e=t.features,o=0,s=e.length;o<s;++o)r.push(this.readFeatureFromObject(e[o],i,t.objectIdFieldName));return r}return[this.readFeatureFromObject(t,i)]},n.prototype.readGeometryFromObject=function(t,n){return iO(t,n)},n.prototype.readProjectionFromObject=function(t){return t.spatialReference&&void 0!==t.spatialReference.wkid?yr("EPSG:"+t.spatialReference.wkid):null},n.prototype.writeGeometryObject=function(t,n){return oO(t,this.adaptOptions(n))},n.prototype.writeFeatureObject=function(t,n){n=this.adaptOptions(n);var i={};if(!t.hasProperties())return i.attributes={},i;var r=t.getProperties(),e=t.getGeometry();if(e){i.geometry=oO(e,n);var o=n&&(n.dataProjection||n.featureProjection);o&&(i.geometry.spatialReference={wkid:Number(yr(o).getCode().split(":").pop())}),delete r[t.getGeometryName()]}return k(r)?i.attributes={}:i.attributes=r,i},n.prototype.writeFeaturesObject=function(t,n){n=this.adaptOptions(n);for(var i=[],r=0,e=t.length;r<e;++r)i.push(this.writeFeatureObject(t[r],n));return{features:i}},n}(Bg),uO=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),aO=function(t){function n(){var n=t.call(this)||this;return n.Jp=lc(),n}return uO(n,t),n.prototype.getType=function(){return"xml"},n.prototype.readFeature=function(t,n){if(t){if("string"==typeof t){var i=$f(t);return this.readFeatureFromDocument(i,n)}return Yf(t)?this.readFeatureFromDocument(t,n):this.readFeatureFromNode(t,n)}return null},n.prototype.readFeatureFromDocument=function(t,n){var i=this.readFeaturesFromDocument(t,n);return i.length>0?i[0]:null},n.prototype.readFeatureFromNode=function(t,n){return null},n.prototype.readFeatures=function(t,n){if(t){if("string"==typeof t){var i=$f(t);return this.readFeaturesFromDocument(i,n)}return Yf(t)?this.readFeaturesFromDocument(t,n):this.readFeaturesFromNode(t,n)}return[]},n.prototype.readFeaturesFromDocument=function(t,n){for(var i=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&g(i,this.readFeaturesFromNode(r,n));return i},n.prototype.readFeaturesFromNode=function(t,n){return r()},n.prototype.readGeometry=function(t,n){if(t){if("string"==typeof t){var i=$f(t);return this.readGeometryFromDocument(i,n)}return Yf(t)?this.readGeometryFromDocument(t,n):this.readGeometryFromNode(t,n)}return null},n.prototype.readGeometryFromDocument=function(t,n){return null},n.prototype.readGeometryFromNode=function(t,n){return null},n.prototype.readProjection=function(t){if(t){if("string"==typeof t){var n=$f(t);return this.readProjectionFromDocument(n)}return Yf(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},n.prototype.readProjectionFromDocument=function(t){return this.dataProjection},n.prototype.readProjectionFromNode=function(t){return this.dataProjection},n.prototype.writeFeature=function(t,n){var i=this.writeFeatureNode(t,n);return this.Jp.serializeToString(i)},n.prototype.writeFeatureNode=function(t,n){return null},n.prototype.writeFeatures=function(t,n){var i=this.writeFeaturesNode(t,n);return this.Jp.serializeToString(i)},n.prototype.writeFeaturesNode=function(t,n){return null},n.prototype.writeGeometry=function(t,n){var i=this.writeGeometryNode(t,n);return this.Jp.serializeToString(i)},n.prototype.writeGeometryNode=function(t,n){return null},n}(jg),hO=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fO="http://www.opengis.net/gml",cO=/^[\s\xa0]*$/,lO=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.featureType=r.featureType,i.featureNS=r.featureNS,i.srsName=r.srsName,i.schemaLocation="",i.FEATURE_COLLECTION_PARSERS={},i.FEATURE_COLLECTION_PARSERS[i.namespace]={featureMember:Hf(i.readFeaturesInternal),featureMembers:Jf(i.readFeaturesInternal)},i.supportedMediaTypes=["application/gml+xml"],i}return hO(n,t),n.prototype.readFeaturesInternal=function(t,n){var i=t.localName,r=null;if("FeatureCollection"==i)r=ac([],this.FEATURE_COLLECTION_PARSERS,t,n,this);else if("featureMembers"==i||"featureMember"==i||"member"==i){var e=n[0],o=e.featureType,s=e.featureNS;if(!o&&t.childNodes){o=[],s={};for(var u=0,a=t.childNodes.length;u<a;++u){var h=t.childNodes[u];if(1===h.nodeType){var f=h.nodeName.split(":").pop();if(-1===o.indexOf(f)){var c="",l=0,v=h.namespaceURI;for(var d in s){if(s[d]===v){c=d;break}++l}c||(s[c="p"+l]=v),o.push(c+":"+f)}}}"featureMember"!=i&&(e.featureType=o,e.featureNS=s)}if("string"==typeof s){var p=s;(s={}).p0=p}var y={},m=Array.isArray(o)?o:[o];for(var w in s){var g={};for(u=0,a=m.length;u<a;++u){(-1===m[u].indexOf(":")?"p0":m[u].split(":")[0])===w&&(g[m[u].split(":").pop()]="featureMembers"==i?Hf(this.readFeatureElement,this):Jf(this.readFeatureElement,this))}y[s[w]]=g}r=ac("featureMember"==i||"member"==i?void 0:[],y,t,n)}return null===r&&(r=[]),r},n.prototype.readGeometryOrExtent=function(t,n){var i=n[0];return i.srsName=t.firstElementChild.getAttribute("srsName"),i.srsDimension=t.firstElementChild.getAttribute("srsDimension"),ac(null,this.GEOMETRY_PARSERS,t,n,this)},n.prototype.readExtentElement=function(t,n){var i=n[0],r=this.readGeometryOrExtent(t,n);return r?Tg(r,i):void 0},n.prototype.readGeometryElement=function(t,n){var i=n[0],r=this.readGeometryOrExtent(t,n);return r?Eg(r,!1,i):void 0},n.prototype.readFeatureElementInternal=function(t,n,i){for(var r,e={},o=t.firstElementChild;o;o=o.nextElementSibling){var s=void 0,u=o.localName;0===o.childNodes.length||1===o.childNodes.length&&(3===o.firstChild.nodeType||4===o.firstChild.nodeType)?(s=Vf(o,!1),cO.test(s)&&(s=void 0)):(i&&(s="boundedBy"===u?this.readExtentElement(o,n):this.readGeometryElement(o,n)),s?"boundedBy"!==u&&(r=u):s=this.readFeatureElementInternal(o,n,!1));var a=o.attributes.length;if(a>0){s={Qp:s};for(var h=0;h<a;h++){s[o.attributes[h].name]=o.attributes[h].value}}e[u]?(e[u]instanceof Array||(e[u]=[e[u]]),e[u].push(s)):e[u]=s}if(i){var f=new Et(e);r&&f.setGeometryName(r);var c=t.getAttribute("fid")||Zf(t,this.namespace,"id");return c&&f.setId(c),f}return e},n.prototype.readFeatureElement=function(t,n){return this.readFeatureElementInternal(t,n,!0)},n.prototype.readPoint=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i)return new Se(i,At)},n.prototype.readMultiPoint=function(t,n){var i=ac([],this.MULTIPOINT_PARSERS,t,n,this);return i?new Kw(i):void 0},n.prototype.readMultiLineString=function(t,n){var i=ac([],this.MULTILINESTRING_PARSERS,t,n,this);if(i)return new rg(i)},n.prototype.readMultiPolygon=function(t,n){var i=ac([],this.MULTIPOLYGON_PARSERS,t,n,this);if(i)return new sg(i)},n.prototype.pointMemberParser=function(t,n){uc(this.POINTMEMBER_PARSERS,t,n,this)},n.prototype.lineStringMemberParser=function(t,n){uc(this.LINESTRINGMEMBER_PARSERS,t,n,this)},n.prototype.polygonMemberParser=function(t,n){uc(this.POLYGONMEMBER_PARSERS,t,n,this)},n.prototype.readLineString=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);return i?new ng(i,At):void 0},n.prototype.readFlatLinearRing=function(t,n){var i=ac(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this);return i||void 0},n.prototype.readLinearRing=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i)return new Me(i,At)},n.prototype.readPolygon=function(t,n){var i=ac([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this);if(i&&i[0]){var r,e=i[0],o=[e.length],s=void 0;for(s=1,r=i.length;s<r;++s)g(e,i[s]),o.push(e.length);return new We(e,At,o)}},n.prototype.readFlatCoordinatesFromNode=function(t,n){return ac(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},n.prototype.readGeometryFromNode=function(t,n){var i=this.readGeometryElement(t,[this.getReadOptions(t,n||{})]);return i||null},n.prototype.readFeaturesFromNode=function(t,n){var i={featureType:this.featureType,featureNS:this.featureNS};return n&&A(i,this.getReadOptions(t,n)),this.readFeaturesInternal(t,[i])||[]},n.prototype.readProjectionFromNode=function(t){return yr(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},n}(aO);lO.prototype.namespace=fO,lO.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},lO.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},lO.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},lO.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:Hf(lO.prototype.pointMemberParser),pointMembers:Hf(lO.prototype.pointMemberParser)}},lO.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:Hf(lO.prototype.lineStringMemberParser),lineStringMembers:Hf(lO.prototype.lineStringMemberParser)}},lO.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:Hf(lO.prototype.polygonMemberParser),polygonMembers:Hf(lO.prototype.polygonMemberParser)}},lO.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:Hf(lO.prototype.readFlatCoordinatesFromNode)}},lO.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Hf(lO.prototype.readLineString)}},lO.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Hf(lO.prototype.readPolygon)}},lO.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:Jf(lO.prototype.readFlatLinearRing)}};var vO=lO;function dO(t){return pO(Vf(t,!1))}function pO(t){var n=/^\s*(true|1)|(false|0)\s*$/.exec(t);return n?void 0!==n[1]||!1:void 0}function yO(t){var n=Vf(t,!1),i=Date.parse(n);return isNaN(i)?void 0:i/1e3}function mO(t){return wO(Vf(t,!1))}function wO(t){var n=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(t);return n?parseFloat(n[1]):void 0}function gO(t){return bO(Vf(t,!1))}function bO(t){var n=/^\s*(\d+)\s*$/.exec(t);return n?parseInt(n[1],10):void 0}function xO(t){return Vf(t,!1).trim()}function MO(t,n){EO(t,n?"1":"0")}function _O(t,n){t.appendChild(dc().createCDATASection(n))}function SO(t,n){var i=new Date(1e3*n),r=i.getUTCFullYear()+"-"+Bi(i.getUTCMonth()+1,2)+"-"+Bi(i.getUTCDate(),2)+"T"+Bi(i.getUTCHours(),2)+":"+Bi(i.getUTCMinutes(),2)+":"+Bi(i.getUTCSeconds(),2)+"Z";t.appendChild(dc().createTextNode(r))}function OO(t,n){var i=n.toPrecision();t.appendChild(dc().createTextNode(i))}function jO(t,n){var i=n.toString();t.appendChild(dc().createTextNode(i))}function EO(t,n){t.appendChild(dc().createTextNode(n))}var TO=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),AO={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},PO=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,r)||this).FEATURE_COLLECTION_PARSERS[fO].featureMember=Hf(i.readFeaturesInternal),i.schemaLocation=r.schemaLocation?r.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",i}return TO(n,t),n.prototype.readFlatCoordinates=function(t,n){var i=Vf(t,!1).replace(/^\s*|\s*$/g,""),r=n[0].srsName,e="enu";if(r){var o=yr(r);o&&(e=o.getAxisOrientation())}for(var s=i.trim().split(/\s+/),u=[],a=0,h=s.length;a<h;a++){var f=s[a].split(/,+/),c=parseFloat(f[0]),l=parseFloat(f[1]),v=3===f.length?parseFloat(f[2]):0;"en"===e.substr(0,2)?u.push(c,l,v):u.push(l,c,v)}return u},n.prototype.readBox=function(t,n){var i=ac([null],this.ty,t,n,this);return On(i[1][0],i[1][1],i[1][3],i[1][4])},n.prototype.innerBoundaryIsParser=function(t,n){var i=ac(void 0,this.RING_PARSERS,t,n,this);i&&n[n.length-1].push(i)},n.prototype.outerBoundaryIsParser=function(t,n){var i=ac(void 0,this.RING_PARSERS,t,n,this);i&&(n[n.length-1][0]=i)},n.prototype.ny=function(t,n,i){var r,e=n[n.length-1],o=e.multiSurface,s=e.surface,u=e.multiCurve;return Array.isArray(t)?r="Envelope":"MultiPolygon"===(r=t.getType())&&!0===o?r="MultiSurface":"Polygon"===r&&!0===s?r="Surface":"MultiLineString"===r&&!0===u&&(r="MultiCurve"),Xf("http://www.opengis.net/gml",r)},n.prototype.writeFeatureElement=function(t,n,i){var r=n.getId();r&&t.setAttribute("fid",r);var e=i[i.length-1],o=e.featureNS,s=n.getGeometryName();e.serializers||(e.serializers={},e.serializers[o]={});var u=[],a=[];if(n.hasProperties()){var h=n.getProperties();for(var f in h){var c=h[f];null!==c&&(u.push(f),a.push(c),f==s||"function"==typeof c.getSimplifiedGeometry?f in e.serializers[o]||(e.serializers[o][f]=nc(this.writeGeometryElement,this)):f in e.serializers[o]||(e.serializers[o][f]=nc(EO)))}}var l=A({},e);l.node=t,fc(l,e.serializers,rc(void 0,o),a,i,u)},n.prototype.writeCurveOrLineString=function(t,n,i){var r=i[i.length-1].srsName;if("LineStringSegment"!==t.nodeName&&r&&t.setAttribute("srsName",r),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var e=this.iy(t.namespaceURI);t.appendChild(e),this.ey(e,n,i)}else if("Curve"===t.nodeName){var o=Xf(t.namespaceURI,"segments");t.appendChild(o),this.oy(o,n,i)}},n.prototype.writeLineStringOrCurveMember=function(t,n,i){var r=this.ny(n,i);r&&(t.appendChild(r),this.writeCurveOrLineString(r,n,i))},n.prototype.writeMultiCurveOrLineString=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName,s=r.curve;o&&t.setAttribute("srsName",o);var u=n.getLineStrings();fc({node:t,hasZ:e,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.sy,u,i,void 0,this)},n.prototype.writeGeometryElement=function(t,n,i){var r,e=i[i.length-1],o=A({},e);o.node=t,r=Array.isArray(n)?Tg(n,e):Eg(n,!0,e),fc(o,this.GEOMETRY_SERIALIZERS,this.ny,[r],i,void 0,this)},n.prototype.iy=function(t){var n=Xf(t,"coordinates");return n.setAttribute("decimal","."),n.setAttribute("cs",","),n.setAttribute("ts"," "),n},n.prototype.ey=function(t,n,i){for(var r=i[i.length-1],e=r.hasZ,o=r.srsName,s=n.getCoordinates(),u=s.length,a=new Array(u),h=0;h<u;++h){var f=s[h];a[h]=this.uy(f,o,e)}EO(t,a.join(" "))},n.prototype.oy=function(t,n,i){var r=Xf(t.namespaceURI,"LineStringSegment");t.appendChild(r),this.writeCurveOrLineString(r,n,i)},n.prototype.writeSurfaceOrPolygon=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=n.getLinearRings();fc({node:t,hasZ:e,srsName:o},this.RING_SERIALIZERS,this.hy,s,i,void 0,this)}else if("Surface"===t.nodeName){var u=Xf(t.namespaceURI,"patches");t.appendChild(u),this.ly(u,n,i)}},n.prototype.hy=function(t,n,i){var r=n[n.length-1],e=r.node,o=r.exteriorWritten;return void 0===o&&(r.exteriorWritten=!0),Xf(e.namespaceURI,void 0!==o?"innerBoundaryIs":"outerBoundaryIs")},n.prototype.ly=function(t,n,i){var r=Xf(t.namespaceURI,"PolygonPatch");t.appendChild(r),this.writeSurfaceOrPolygon(r,n,i)},n.prototype.writeRing=function(t,n,i){var r=Xf(t.namespaceURI,"LinearRing");t.appendChild(r),this.writeLinearRing(r,n,i)},n.prototype.uy=function(t,n,i){var r="enu";n&&(r=yr(n).getAxisOrientation());var e="en"===r.substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0];i&&(e+=","+(t[2]||0));return e},n.prototype.writePoint=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName;o&&t.setAttribute("srsName",o);var s=this.iy(t.namespaceURI);t.appendChild(s);var u=n.getCoordinates();EO(s,this.uy(u,o,e))},n.prototype.writeMultiPoint=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName;o&&t.setAttribute("srsName",o);var s=n.getPoints();fc({node:t,hasZ:e,srsName:o},this.POINTMEMBER_SERIALIZERS,rc("pointMember"),s,i,void 0,this)},n.prototype.writePointMember=function(t,n,i){var r=Xf(t.namespaceURI,"Point");t.appendChild(r),this.writePoint(r,n,i)},n.prototype.writeLinearRing=function(t,n,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var e=this.iy(t.namespaceURI);t.appendChild(e),this.ey(e,n,i)},n.prototype.writeMultiSurfaceOrPolygon=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName,s=r.surface;o&&t.setAttribute("srsName",o);var u=n.getPolygons();fc({node:t,hasZ:e,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.sy,u,i,void 0,this)},n.prototype.writeSurfaceOrPolygonMember=function(t,n,i){var r=this.ny(n,i);r&&(t.appendChild(r),this.writeSurfaceOrPolygon(r,n,i))},n.prototype.writeEnvelope=function(t,n,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var e=[n[0]+" "+n[1],n[2]+" "+n[3]];fc({node:t},this.ENVELOPE_SERIALIZERS,ec,e,i,["lowerCorner","upperCorner"],this)},n.prototype.sy=function(t,n,i){var r=n[n.length-1].node;return Xf("http://www.opengis.net/gml",AO[r.nodeName])},n}(vO);PO.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:Jf(PO.prototype.readFlatCoordinates)}},PO.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:PO.prototype.innerBoundaryIsParser,outerBoundaryIs:PO.prototype.outerBoundaryIsParser}},PO.prototype.ty={"http://www.opengis.net/gml":{coordinates:Hf(PO.prototype.readFlatCoordinates)}},PO.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Jf(vO.prototype.readPoint),MultiPoint:Jf(vO.prototype.readMultiPoint),LineString:Jf(vO.prototype.readLineString),MultiLineString:Jf(vO.prototype.readMultiLineString),LinearRing:Jf(vO.prototype.readLinearRing),Polygon:Jf(vO.prototype.readPolygon),MultiPolygon:Jf(vO.prototype.readMultiPolygon),Box:Jf(PO.prototype.readBox)}},PO.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:nc(PO.prototype.writeCurveOrLineString),MultiCurve:nc(PO.prototype.writeMultiCurveOrLineString),Point:nc(PO.prototype.writePoint),MultiPoint:nc(PO.prototype.writeMultiPoint),LineString:nc(PO.prototype.writeCurveOrLineString),MultiLineString:nc(PO.prototype.writeMultiCurveOrLineString),LinearRing:nc(PO.prototype.writeLinearRing),Polygon:nc(PO.prototype.writeSurfaceOrPolygon),MultiPolygon:nc(PO.prototype.writeMultiSurfaceOrPolygon),Surface:nc(PO.prototype.writeSurfaceOrPolygon),MultiSurface:nc(PO.prototype.writeMultiSurfaceOrPolygon),Envelope:nc(PO.prototype.writeEnvelope)}},PO.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:nc(PO.prototype.writeLineStringOrCurveMember),curveMember:nc(PO.prototype.writeLineStringOrCurveMember)}},PO.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:nc(PO.prototype.writeRing),innerBoundaryIs:nc(PO.prototype.writeRing)}},PO.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:nc(PO.prototype.writePointMember)}},PO.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:nc(PO.prototype.writeSurfaceOrPolygonMember),polygonMember:nc(PO.prototype.writeSurfaceOrPolygonMember)}},PO.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:nc(EO),upperCorner:nc(EO)}};var CO=PO,kO=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),IO={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},NO=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,r)||this).vy=void 0!==r.surface&&r.surface,i.py=void 0!==r.curve&&r.curve,i.yy=void 0===r.multiCurve||r.multiCurve,i.my=void 0===r.multiSurface||r.multiSurface,i.schemaLocation=r.schemaLocation?r.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",i.hasZ=void 0!==r.hasZ&&r.hasZ,i}return kO(n,t),n.prototype.readMultiCurve=function(t,n){var i=ac([],this.MULTICURVE_PARSERS,t,n,this);return i?new rg(i):void 0},n.prototype.readFlatCurveRing=function(t,n){for(var i=ac([],this.MULTICURVE_PARSERS,t,n,this),r=[],e=0,o=i.length;e<o;++e)g(r,i[e].getFlatCoordinates());return r},n.prototype.readMultiSurface=function(t,n){var i=ac([],this.MULTISURFACE_PARSERS,t,n,this);if(i)return new sg(i)},n.prototype.curveMemberParser=function(t,n){uc(this.CURVEMEMBER_PARSERS,t,n,this)},n.prototype.surfaceMemberParser=function(t,n){uc(this.SURFACEMEMBER_PARSERS,t,n,this)},n.prototype.readPatch=function(t,n){return ac([null],this.PATCHES_PARSERS,t,n,this)},n.prototype.readSegment=function(t,n){return ac([],this.SEGMENTS_PARSERS,t,n,this)},n.prototype.readPolygonPatch=function(t,n){return ac([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this)},n.prototype.readLineStringSegment=function(t,n){return ac([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},n.prototype.interiorParser=function(t,n){var i=ac(void 0,this.RING_PARSERS,t,n,this);i&&n[n.length-1].push(i)},n.prototype.exteriorParser=function(t,n){var i=ac(void 0,this.RING_PARSERS,t,n,this);i&&(n[n.length-1][0]=i)},n.prototype.readSurface=function(t,n){var i=ac([null],this.SURFACE_PARSERS,t,n,this);if(i&&i[0]){var r,e=i[0],o=[e.length],s=void 0;for(s=1,r=i.length;s<r;++s)g(e,i[s]),o.push(e.length);return new We(e,At,o)}},n.prototype.readCurve=function(t,n){var i=ac([null],this.CURVE_PARSERS,t,n,this);return i?new ng(i,At):void 0},n.prototype.readEnvelope=function(t,n){var i=ac([null],this.ENVELOPE_PARSERS,t,n,this);return On(i[1][0],i[1][1],i[2][0],i[2][1])},n.prototype.readFlatPos=function(t,n){for(var i,r=Vf(t,!1),e=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[];i=e.exec(r);)o.push(parseFloat(i[1])),r=r.substr(i[0].length);if(""===r){var s=n[0].srsName,u="enu";if(s)u=yr(s).getAxisOrientation();if("neu"===u){var a,h=void 0;for(h=0,a=o.length;h<a;h+=3){var f=o[h],c=o[h+1];o[h]=c,o[h+1]=f}}var l=o.length;if(2==l&&o.push(0),0!==l)return o}},n.prototype.readFlatPosList=function(t,n){var i=Vf(t,!1).replace(/^\s*|\s*$/g,""),r=n[0],e=r.srsName,o=r.srsDimension,s="enu";e&&(s=yr(e).getAxisOrientation());var u,a,h,f=i.split(/\s+/),c=2;t.getAttribute("srsDimension")?c=bO(t.getAttribute("srsDimension")):t.getAttribute("dimension")?c=bO(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?c=bO(t.parentNode.getAttribute("srsDimension")):o&&(c=bO(o));for(var l=[],v=0,d=f.length;v<d;v+=c)u=parseFloat(f[v]),a=parseFloat(f[v+1]),h=3===c?parseFloat(f[v+2]):0,"en"===s.substr(0,2)?l.push(u,a,h):l.push(a,u,h);return l},n.prototype.wy=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=e?"3":"2";t.setAttribute("srsDimension",o);var s=r.srsName,u="enu";s&&(u=yr(s).getAxisOrientation());var a,h=n.getCoordinates();(a="en"===u.substr(0,2)?h[0]+" "+h[1]:h[1]+" "+h[0],e)&&(a+=" "+(h[2]||0));EO(t,a)},n.prototype.uy=function(t,n,i){var r="enu";n&&(r=yr(n).getAxisOrientation());var e="en"===r.substr(0,2)?t[0]+" "+t[1]:t[1]+" "+t[0];i&&(e+=" "+(t[2]||0));return e},n.prototype.gy=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=e?"3":"2";t.setAttribute("srsDimension",o);for(var s,u=r.srsName,a=n.getCoordinates(),h=a.length,f=new Array(h),c=0;c<h;++c)s=a[c],f[c]=this.uy(s,u,e);EO(t,f.join(" "))},n.prototype.writePoint=function(t,n,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var e=Xf(t.namespaceURI,"pos");t.appendChild(e),this.wy(e,n,i)},n.prototype.writeEnvelope=function(t,n,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var e=[n[0]+" "+n[1],n[2]+" "+n[3]];fc({node:t},this.ENVELOPE_SERIALIZERS,ec,e,i,["lowerCorner","upperCorner"],this)},n.prototype.writeLinearRing=function(t,n,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var e=Xf(t.namespaceURI,"posList");t.appendChild(e),this.gy(e,n,i)},n.prototype.hy=function(t,n,i){var r=n[n.length-1],e=r.node,o=r.exteriorWritten;return void 0===o&&(r.exteriorWritten=!0),Xf(e.namespaceURI,void 0!==o?"interior":"exterior")},n.prototype.writeSurfaceOrPolygon=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=n.getLinearRings();fc({node:t,hasZ:e,srsName:o},this.RING_SERIALIZERS,this.hy,s,i,void 0,this)}else if("Surface"===t.nodeName){var u=Xf(t.namespaceURI,"patches");t.appendChild(u),this.ly(u,n,i)}},n.prototype.writeCurveOrLineString=function(t,n,i){var r=i[i.length-1].srsName;if("LineStringSegment"!==t.nodeName&&r&&t.setAttribute("srsName",r),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var e=Xf(t.namespaceURI,"posList");t.appendChild(e),this.gy(e,n,i)}else if("Curve"===t.nodeName){var o=Xf(t.namespaceURI,"segments");t.appendChild(o),this.oy(o,n,i)}},n.prototype.writeMultiSurfaceOrPolygon=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName,s=r.surface;o&&t.setAttribute("srsName",o);var u=n.getPolygons();fc({node:t,hasZ:e,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.sy,u,i,void 0,this)},n.prototype.writeMultiPoint=function(t,n,i){var r=i[i.length-1],e=r.srsName,o=r.hasZ;e&&t.setAttribute("srsName",e);var s=n.getPoints();fc({node:t,hasZ:o,srsName:e},this.POINTMEMBER_SERIALIZERS,rc("pointMember"),s,i,void 0,this)},n.prototype.writeMultiCurveOrLineString=function(t,n,i){var r=i[i.length-1],e=r.hasZ,o=r.srsName,s=r.curve;o&&t.setAttribute("srsName",o);var u=n.getLineStrings();fc({node:t,hasZ:e,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.sy,u,i,void 0,this)},n.prototype.writeRing=function(t,n,i){var r=Xf(t.namespaceURI,"LinearRing");t.appendChild(r),this.writeLinearRing(r,n,i)},n.prototype.writeSurfaceOrPolygonMember=function(t,n,i){var r=this.ny(n,i);r&&(t.appendChild(r),this.writeSurfaceOrPolygon(r,n,i))},n.prototype.writePointMember=function(t,n,i){var r=Xf(t.namespaceURI,"Point");t.appendChild(r),this.writePoint(r,n,i)},n.prototype.writeLineStringOrCurveMember=function(t,n,i){var r=this.ny(n,i);r&&(t.appendChild(r),this.writeCurveOrLineString(r,n,i))},n.prototype.ly=function(t,n,i){var r=Xf(t.namespaceURI,"PolygonPatch");t.appendChild(r),this.writeSurfaceOrPolygon(r,n,i)},n.prototype.oy=function(t,n,i){var r=Xf(t.namespaceURI,"LineStringSegment");t.appendChild(r),this.writeCurveOrLineString(r,n,i)},n.prototype.writeGeometryElement=function(t,n,i){var r,e=i[i.length-1],o=A({},e);o.node=t,r=Array.isArray(n)?Tg(n,e):Eg(n,!0,e),fc(o,this.GEOMETRY_SERIALIZERS,this.ny,[r],i,void 0,this)},n.prototype.writeFeatureElement=function(t,n,i){var r=n.getId();r&&t.setAttribute("fid",r);var e=i[i.length-1],o=e.featureNS,s=n.getGeometryName();e.serializers||(e.serializers={},e.serializers[o]={});var u=[],a=[];if(n.hasProperties()){var h=n.getProperties();for(var f in h){var c=h[f];null!==c&&(u.push(f),a.push(c),f==s||"function"==typeof c.getSimplifiedGeometry?f in e.serializers[o]||(e.serializers[o][f]=nc(this.writeGeometryElement,this)):f in e.serializers[o]||(e.serializers[o][f]=nc(EO)))}}var l=A({},e);l.node=t,fc(l,e.serializers,rc(void 0,o),a,i,u)},n.prototype.xy=function(t,n,i){var r=i[i.length-1],e=r.featureType,o=r.featureNS,s={};s[o]={},s[o][e]=nc(this.writeFeatureElement,this);var u=A({},r);u.node=t,fc(u,s,rc(e,o),n,i)},n.prototype.sy=function(t,n,i){var r=n[n.length-1].node;return Xf(this.namespace,IO[r.nodeName])},n.prototype.ny=function(t,n,i){var r,e=n[n.length-1],o=e.multiSurface,s=e.surface,u=e.curve,a=e.multiCurve;return Array.isArray(t)?r="Envelope":"MultiPolygon"===(r=t.getType())&&!0===o?r="MultiSurface":"Polygon"===r&&!0===s?r="Surface":"LineString"===r&&!0===u?r="Curve":"MultiLineString"===r&&!0===a&&(r="MultiCurve"),Xf(this.namespace,r)},n.prototype.writeGeometryNode=function(t,n){n=this.adaptOptions(n);var i=Xf(this.namespace,"geom"),r={node:i,hasZ:this.hasZ,srsName:this.srsName,curve:this.py,surface:this.vy,multiSurface:this.my,multiCurve:this.yy};return n&&A(r,n),this.writeGeometryElement(i,t,[r]),i},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=Xf(this.namespace,"featureMembers");i.setAttributeNS(Bf,"xsi:schemaLocation",this.schemaLocation);var r={srsName:this.srsName,hasZ:this.hasZ,curve:this.py,surface:this.vy,multiSurface:this.my,multiCurve:this.yy,featureNS:this.featureNS,featureType:this.featureType};return n&&A(r,n),this.xy(i,t,[r]),i},n}(vO);NO.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:Jf(NO.prototype.readFlatPos),posList:Jf(NO.prototype.readFlatPosList),coordinates:Jf(CO.prototype.readFlatCoordinates)}},NO.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:NO.prototype.interiorParser,exterior:NO.prototype.exteriorParser}},NO.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Jf(vO.prototype.readPoint),MultiPoint:Jf(vO.prototype.readMultiPoint),LineString:Jf(vO.prototype.readLineString),MultiLineString:Jf(vO.prototype.readMultiLineString),LinearRing:Jf(vO.prototype.readLinearRing),Polygon:Jf(vO.prototype.readPolygon),MultiPolygon:Jf(vO.prototype.readMultiPolygon),Surface:Jf(NO.prototype.readSurface),MultiSurface:Jf(NO.prototype.readMultiSurface),Curve:Jf(NO.prototype.readCurve),MultiCurve:Jf(NO.prototype.readMultiCurve),Envelope:Jf(NO.prototype.readEnvelope)}},NO.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:Hf(NO.prototype.curveMemberParser),curveMembers:Hf(NO.prototype.curveMemberParser)}},NO.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:Hf(NO.prototype.surfaceMemberParser),surfaceMembers:Hf(NO.prototype.surfaceMemberParser)}},NO.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Hf(vO.prototype.readLineString),Curve:Hf(NO.prototype.readCurve)}},NO.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Hf(vO.prototype.readPolygon),Surface:Hf(NO.prototype.readSurface)}},NO.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:Jf(NO.prototype.readPatch)}},NO.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:Jf(NO.prototype.readSegment)}},NO.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:Hf(NO.prototype.readFlatPosList),upperCorner:Hf(NO.prototype.readFlatPosList)}},NO.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:Jf(NO.prototype.readPolygonPatch)}},NO.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:Kf(NO.prototype.readLineStringSegment)}},vO.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:Jf(vO.prototype.readFlatLinearRing),Ring:Jf(NO.prototype.readFlatCurveRing)}},NO.prototype.writeFeatures,NO.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:nc(NO.prototype.writeRing),interior:nc(NO.prototype.writeRing)}},NO.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:nc(EO),upperCorner:nc(EO)}},NO.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:nc(NO.prototype.writeSurfaceOrPolygonMember),polygonMember:nc(NO.prototype.writeSurfaceOrPolygonMember)}},NO.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:nc(NO.prototype.writePointMember)}},NO.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:nc(NO.prototype.writeLineStringOrCurveMember),curveMember:nc(NO.prototype.writeLineStringOrCurveMember)}},NO.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:nc(NO.prototype.writeCurveOrLineString),MultiCurve:nc(NO.prototype.writeMultiCurveOrLineString),Point:nc(NO.prototype.writePoint),MultiPoint:nc(NO.prototype.writeMultiPoint),LineString:nc(NO.prototype.writeCurveOrLineString),MultiLineString:nc(NO.prototype.writeMultiCurveOrLineString),LinearRing:nc(NO.prototype.writeLinearRing),Polygon:nc(NO.prototype.writeSurfaceOrPolygon),MultiPolygon:nc(NO.prototype.writeMultiSurfaceOrPolygon),Surface:nc(NO.prototype.writeSurfaceOrPolygon),MultiSurface:nc(NO.prototype.writeMultiSurfaceOrPolygon),Envelope:nc(NO.prototype.writeEnvelope)}};var LO=NO,zO=LO;zO.prototype.writeFeatures,zO.prototype.writeFeaturesNode;var RO=zO,FO=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),GO=function(t){function n(n){var i=this,r=n||{};return(i=t.call(this,r)||this).schemaLocation=r.schemaLocation?r.schemaLocation:i.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",i}return FO(n,t),n}(LO);GO.prototype.namespace="http://www.opengis.net/gml/3.2",GO.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:Jf(LO.prototype.readFlatPos),posList:Jf(LO.prototype.readFlatPosList),coordinates:Jf(CO.prototype.readFlatCoordinates)}},GO.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:LO.prototype.interiorParser,exterior:LO.prototype.exteriorParser}},GO.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Jf(vO.prototype.readPoint),MultiPoint:Jf(vO.prototype.readMultiPoint),LineString:Jf(vO.prototype.readLineString),MultiLineString:Jf(vO.prototype.readMultiLineString),LinearRing:Jf(vO.prototype.readLinearRing),Polygon:Jf(vO.prototype.readPolygon),MultiPolygon:Jf(vO.prototype.readMultiPolygon),Surface:Jf(GO.prototype.readSurface),MultiSurface:Jf(LO.prototype.readMultiSurface),Curve:Jf(GO.prototype.readCurve),MultiCurve:Jf(LO.prototype.readMultiCurve),Envelope:Jf(GO.prototype.readEnvelope)}},GO.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:Hf(LO.prototype.curveMemberParser),curveMembers:Hf(LO.prototype.curveMemberParser)}},GO.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:Hf(LO.prototype.surfaceMemberParser),surfaceMembers:Hf(LO.prototype.surfaceMemberParser)}},GO.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Hf(vO.prototype.readLineString),Curve:Hf(LO.prototype.readCurve)}},GO.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Hf(vO.prototype.readPolygon),Surface:Hf(LO.prototype.readSurface)}},GO.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:Jf(LO.prototype.readPatch)}},GO.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:Jf(LO.prototype.readSegment)}},GO.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:Hf(LO.prototype.readFlatPosList),upperCorner:Hf(LO.prototype.readFlatPosList)}},GO.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:Jf(LO.prototype.readPolygonPatch)}},GO.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:Kf(LO.prototype.readLineStringSegment)}},GO.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:Hf(vO.prototype.pointMemberParser),pointMembers:Hf(vO.prototype.pointMemberParser)}},GO.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:Hf(vO.prototype.lineStringMemberParser),lineStringMembers:Hf(vO.prototype.lineStringMemberParser)}},GO.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:Hf(vO.prototype.polygonMemberParser),polygonMembers:Hf(vO.prototype.polygonMemberParser)}},GO.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Hf(vO.prototype.readFlatCoordinatesFromNode)}},GO.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Hf(vO.prototype.readLineString)}},GO.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Hf(vO.prototype.readPolygon)}},GO.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:Jf(vO.prototype.readFlatLinearRing),Ring:Jf(GO.prototype.readFlatCurveRing)}},GO.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:nc(LO.prototype.writeRing),interior:nc(LO.prototype.writeRing)}},GO.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:nc(EO),upperCorner:nc(EO)}},GO.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:nc(LO.prototype.writeSurfaceOrPolygonMember),polygonMember:nc(LO.prototype.writeSurfaceOrPolygonMember)}},GO.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:nc(LO.prototype.writePointMember)}},GO.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:nc(LO.prototype.writeLineStringOrCurveMember),curveMember:nc(LO.prototype.writeLineStringOrCurveMember)}},GO.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:nc(LO.prototype.writeCurveOrLineString),MultiCurve:nc(LO.prototype.writeMultiCurveOrLineString),Point:nc(GO.prototype.writePoint),MultiPoint:nc(LO.prototype.writeMultiPoint),LineString:nc(LO.prototype.writeCurveOrLineString),MultiLineString:nc(LO.prototype.writeMultiCurveOrLineString),LinearRing:nc(LO.prototype.writeLinearRing),Polygon:nc(LO.prototype.writeSurfaceOrPolygon),MultiPolygon:nc(LO.prototype.writeMultiSurfaceOrPolygon),Surface:nc(LO.prototype.writeSurfaceOrPolygon),MultiSurface:nc(LO.prototype.writeMultiSurfaceOrPolygon),Envelope:nc(LO.prototype.writeEnvelope)}};var DO=GO,qO=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),UO=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],BO={rte:mj,trk:wj,wpt:gj},XO=sc(UO,{rte:Hf(mj),trk:Hf(wj),wpt:Hf(gj)}),VO=sc(UO,{text:tc(xO,"linkText"),type:tc(xO,"linkType")}),WO=sc(UO,{rte:nc((function(t,n,i){var r=i[0],e=n.getProperties(),o={node:t};o.properties=e;var s=n.getGeometry();if("LineString"==s.getType()){var u=Eg(s,!0,r);o.geometryLayout=u.getLayout(),e.rtept=u.getCoordinates()}var a=i[i.length-1].node,h=ij[a.namespaceURI],f=oc(e,h);fc(o,rj,ec,f,i,h)})),trk:nc((function(t,n,i){var r=i[0],e=n.getProperties(),o={node:t};o.properties=e;var s=n.getGeometry();if("MultiLineString"==s.getType()){var u=Eg(s,!0,r);e.trkseg=u.getLineStrings()}var a=i[i.length-1].node,h=oj[a.namespaceURI],f=oc(e,h);fc(o,sj,ec,f,i,h)})),wpt:nc((function(t,n,i){var r=i[0],e=i[i.length-1];e.properties=n.getProperties();var o=n.getGeometry();if("Point"==o.getType()){var s=Eg(o,!0,r);e.geometryLayout=s.getLayout(),xj(t,s.getCoordinates(),i)}}))}),YO=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.dataProjection=yr("EPSG:4326"),i.My=r.readExtensions,i}return qO(n,t),n.prototype._y=function(t){t||(t=[]);for(var n=0,i=t.length;n<i;++n){var r=t[n];if(this.My){var e=r.get("extensionsNode_")||null;this.My(r,e)}r.set("extensionsNode_",void 0)}},n.prototype.readFeatureFromNode=function(t,n){if(!y(UO,t.namespaceURI))return null;var i=BO[t.localName];if(!i)return null;var r=i(t,[this.getReadOptions(t,n)]);return r?(this._y([r]),r):null},n.prototype.readFeaturesFromNode=function(t,n){if(!y(UO,t.namespaceURI))return[];if("gpx"==t.localName){var i=ac([],XO,t,[this.getReadOptions(t,n)]);return i?(this._y(i),i):[]}return[]},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=Xf("http://www.topografix.com/GPX/1/1","gpx");return i.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",Bf),i.setAttributeNS(Bf,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),fc({node:i},WO,lj,t,[n]),i},n}(aO),ZO=sc(UO,{name:tc(xO),cmt:tc(xO),desc:tc(xO),src:tc(xO),link:pj,number:tc(gO),extensions:yj,type:tc(xO),rtept:function(t,n){var i=ac({},$O,t,n);if(i){var r=n[n.length-1],e=r.flatCoordinates,o=r.layoutOptions;vj(e,o,t,i)}}}),$O=sc(UO,{ele:tc(mO),time:tc(yO)}),KO=sc(UO,{name:tc(xO),cmt:tc(xO),desc:tc(xO),src:tc(xO),link:pj,number:tc(gO),type:tc(xO),extensions:yj,trkseg:function(t,n){var i=n[n.length-1];uc(HO,t,n);var r=i.flatCoordinates;i.ends.push(r.length)}}),HO=sc(UO,{trkpt:function(t,n){var i=ac({},JO,t,n);if(i){var r=n[n.length-1],e=r.flatCoordinates,o=r.layoutOptions;vj(e,o,t,i)}}}),JO=sc(UO,{ele:tc(mO),time:tc(yO)}),QO=sc(UO,{ele:tc(mO),time:tc(yO),magvar:tc(mO),geoidheight:tc(mO),name:tc(xO),cmt:tc(xO),desc:tc(xO),src:tc(xO),link:pj,sym:tc(xO),type:tc(xO),fix:tc(xO),sat:tc(gO),hdop:tc(mO),vdop:tc(mO),pdop:tc(mO),ageofdgpsdata:tc(mO),dgpsid:tc(gO),extensions:yj}),tj=["text","type"],nj=sc(UO,{text:nc(EO),type:nc(EO)}),ij=sc(UO,["name","cmt","desc","src","link","number","type","rtept"]),rj=sc(UO,{name:nc(EO),cmt:nc(EO),desc:nc(EO),src:nc(EO),link:nc(bj),number:nc(jO),type:nc(EO),rtept:ic(nc(xj))}),ej=sc(UO,["ele","time"]),oj=sc(UO,["name","cmt","desc","src","link","number","type","trkseg"]),sj=sc(UO,{name:nc(EO),cmt:nc(EO),desc:nc(EO),src:nc(EO),link:nc(bj),number:nc(jO),type:nc(EO),trkseg:ic(nc((function(t,n,i){var r={node:t};r.geometryLayout=n.getLayout(),r.properties={},fc(r,aj,uj,n.getCoordinates(),i)})))}),uj=rc("trkpt"),aj=sc(UO,{trkpt:nc(xj)}),hj=sc(UO,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),fj=sc(UO,{ele:nc(OO),time:nc(SO),magvar:nc(OO),geoidheight:nc(OO),name:nc(EO),cmt:nc(EO),desc:nc(EO),src:nc(EO),link:nc(bj),sym:nc(EO),type:nc(EO),fix:nc(EO),sat:nc(jO),hdop:nc(OO),vdop:nc(OO),pdop:nc(OO),ageofdgpsdata:nc(OO),dgpsid:nc(jO)}),cj={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function lj(t,n,i){var r=t.getGeometry();if(r){var e=cj[r.getType()];if(e)return Xf(n[n.length-1].node.namespaceURI,e)}}function vj(t,n,i,r){return t.push(parseFloat(i.getAttribute("lon")),parseFloat(i.getAttribute("lat"))),"ele"in r?(t.push(r.ele),delete r.ele,n.hasZ=!0):t.push(0),"time"in r?(t.push(r.time),delete r.time,n.hasM=!0):t.push(0),t}function dj(t,n,i){var r=Tt,e=2;if(t.hasZ&&t.hasM?(r=Ct,e=4):t.hasZ?(r=At,e=3):t.hasM&&(r=Pt,e=3),4!==e){for(var o=0,s=n.length/4;o<s;o++)n[o*e]=n[4*o],n[o*e+1]=n[4*o+1],t.hasZ&&(n[o*e+2]=n[4*o+2]),t.hasM&&(n[o*e+2]=n[4*o+3]);if(n.length=n.length/4*e,i)for(o=0,s=i.length;o<s;o++)i[o]=i[o]/4*e}return r}function pj(t,n){var i=n[n.length-1],r=t.getAttribute("href");null!==r&&(i.link=r),uc(VO,t,n)}function yj(t,n){n[n.length-1].Sy=t}function mj(t,n){var i=n[0],r=ac({flatCoordinates:[],layoutOptions:{}},ZO,t,n);if(r){var e=r.flatCoordinates;delete r.flatCoordinates;var o=r.layoutOptions;delete r.layoutOptions;var s=dj(o,e),u=new ng(e,s);Eg(u,!1,i);var a=new Et(u);return a.setProperties(r,!0),a}}function wj(t,n){var i=n[0],r=ac({flatCoordinates:[],ends:[],layoutOptions:{}},KO,t,n);if(r){var e=r.flatCoordinates;delete r.flatCoordinates;var o=r.ends;delete r.ends;var s=r.layoutOptions;delete r.layoutOptions;var u=dj(s,e,o),a=new rg(e,u,o);Eg(a,!1,i);var h=new Et(a);return h.setProperties(r,!0),h}}function gj(t,n){var i=n[0],r=ac({},QO,t,n);if(r){var e={},o=vj([],e,t,r),s=dj(e,o),u=new Se(o,s);Eg(u,!1,i);var a=new Et(u);return a.setProperties(r,!0),a}}function bj(t,n,i){t.setAttribute("href",n);var r=i[i.length-1].properties,e=[r.linkText,r.linkType];fc({node:t},nj,ec,e,i,tj)}function xj(t,n,i){var r=i[i.length-1],e=r.node.namespaceURI,o=r.properties;switch(t.setAttributeNS(null,"lat",String(n[1])),t.setAttributeNS(null,"lon",String(n[0])),r.geometryLayout){case Ct:0!==n[3]&&(o.time=n[3]);case At:0!==n[2]&&(o.ele=n[2]);break;case Pt:0!==n[2]&&(o.time=n[2])}var s="rtept"==t.nodeName?ej[e]:hj[e],u=oc(o,s);fc({node:t,properties:o},fj,ec,u,i,s)}var Mj=YO,_j=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function Sj(t){return"string"==typeof t?t:""}var Oj,jj,Ej,Tj,Aj,Pj,Cj=function(t){function n(){return t.call(this)||this}return _j(n,t),n.prototype.getType=function(){return"text"},n.prototype.readFeature=function(t,n){return this.readFeatureFromText(Sj(t),this.adaptOptions(n))},n.prototype.readFeatureFromText=function(t,n){return r()},n.prototype.readFeatures=function(t,n){return this.readFeaturesFromText(Sj(t),this.adaptOptions(n))},n.prototype.readFeaturesFromText=function(t,n){return r()},n.prototype.readGeometry=function(t,n){return this.readGeometryFromText(Sj(t),this.adaptOptions(n))},n.prototype.readGeometryFromText=function(t,n){return r()},n.prototype.readProjection=function(t){return this.readProjectionFromText(Sj(t))},n.prototype.readProjectionFromText=function(t){return this.dataProjection},n.prototype.writeFeature=function(t,n){return this.writeFeatureText(t,this.adaptOptions(n))},n.prototype.writeFeatureText=function(t,n){return r()},n.prototype.writeFeatures=function(t,n){return this.writeFeaturesText(t,this.adaptOptions(n))},n.prototype.writeFeaturesText=function(t,n){return r()},n.prototype.writeGeometry=function(t,n){return this.writeGeometryText(t,this.adaptOptions(n))},n.prototype.writeGeometryText=function(t,n){return r()},n}(jg),kj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ij="barometric",Nj="gps",Lj="none",zj=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Rj=/^H.([A-Z]{3}).*?:(.*)/,Fj=/^HFDTE(\d{2})(\d{2})(\d{2})/,Gj=/\r\n|\r|\n/,Dj=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.dataProjection=yr("EPSG:4326"),i.Oy=r.altitudeMode?r.altitudeMode:Lj,i}return kj(n,t),n.prototype.readFeatureFromText=function(t,n){var i,r,e=this.Oy,o=t.split(Gj),s={},u=[],a=2e3,h=0,f=1,c=-1;for(i=0,r=o.length;i<r;++i){var l=o[i],v=void 0;if("B"==l.charAt(0)){if(v=zj.exec(l)){var d=parseInt(v[1],10),p=parseInt(v[2],10),y=parseInt(v[3],10),m=parseInt(v[4],10)+parseInt(v[5],10)/6e4;"S"==v[6]&&(m=-m);var w=parseInt(v[7],10)+parseInt(v[8],10)/6e4;if("W"==v[9]&&(w=-w),u.push(w,m),e!=Lj){var g=void 0;g=e==Nj?parseInt(v[11],10):e==Ij?parseInt(v[12],10):0,u.push(g)}var b=Date.UTC(a,h,f,d,p,y);b<c&&(b=Date.UTC(a,h,f+1,d,p,y)),u.push(b/1e3),c=b}}else"H"==l.charAt(0)&&((v=Fj.exec(l))?(f=parseInt(v[1],10),h=parseInt(v[2],10)-1,a=2e3+parseInt(v[3],10)):(v=Rj.exec(l))&&(s[v[1]]=v[2].trim()))}if(0===u.length)return null;var x=new ng(u,e==Lj?Pt:Ct),M=new Et(Eg(x,!1,n));return M.setProperties(s,!0),M},n.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return i?[i]:[]},n}(Cj),qj=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Uj=["http://www.google.com/kml/ext/2.2"],Bj=[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"],Xj={fraction:ev,pixels:ov,insetPixels:ov},Vj=sc(Bj,{ExtendedData:UE,Region:BE,MultiGeometry:tc(IE,"geometry"),LineString:tc(PE,"geometry"),LinearRing:tc(CE,"geometry"),Point:tc(NE,"geometry"),Polygon:tc(zE,"geometry"),Style:tc(FE),StyleMap:function(t,n){var i=yE.call(this,t,n);if(!i)return;var r=n[n.length-1];Array.isArray(i)?r.Style=i:"string"==typeof i?r.styleUrl=i:St(!1,38)},address:tc(xO),description:tc(xO),name:tc(xO),open:tc(dO),phoneNumber:tc(xO),styleUrl:tc(vE),visibility:tc(dO)},sc(Uj,{MultiTrack:tc((function(t,n){var i=ac([],_E,t,n);if(!i)return;return new rg(i)}),"geometry"),Track:tc(OE,"geometry")})),Wj=sc(Bj,{ExtendedData:UE,Region:BE,Link:function(t,n){uc(Yj,t,n)},address:tc(xO),description:tc(xO),name:tc(xO),open:tc(dO),phoneNumber:tc(xO),visibility:tc(dO)}),Yj=sc(Bj,{href:tc(lE)}),Zj=sc(Bj,{LatLonAltBox:function(t,n){var i=ac({},WE,t,n);if(!i)return;var r=n[n.length-1],e=[parseFloat(i.west),parseFloat(i.south),parseFloat(i.east),parseFloat(i.north)];r.extent=e,r.altitudeMode=i.altitudeMode,r.minAltitude=parseFloat(i.minAltitude),r.maxAltitude=parseFloat(i.maxAltitude)},Lod:function(t,n){var i=ac({},YE,t,n);if(!i)return;var r=n[n.length-1];r.minLodPixels=parseFloat(i.minLodPixels),r.maxLodPixels=parseFloat(i.maxLodPixels),r.minFadeExtent=parseFloat(i.minFadeExtent),r.maxFadeExtent=parseFloat(i.maxFadeExtent)}}),$j=sc(Bj,["Document","Placemark"]),Kj=sc(Bj,{Document:nc((function(t,n,i){fc({node:t},JE,QE,n,i,void 0,this)})),Placemark:nc(_T)}),Hj=null;var Jj,Qj=null;var tE,nE=null;var iE=null;var rE=null;var eE,oE=null;function sE(t){return 32/Math.min(t[0],t[1])}function uE(t){return t}var aE=function(t){function n(n){var i=t.call(this)||this,r=n||{};return oE||(Hj=new rv({color:Oj=[255,255,255,1]}),Pj="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",Qj=new yv({anchor:jj=[20,2],anchorOrigin:sv,anchorXUnits:Ej=ov,anchorYUnits:Tj=ov,crossOrigin:"anonymous",rotation:0,scale:sE(Aj=[64,64]),size:Aj,src:Pj}),Jj="NO_IMAGE",nE=new mv({color:Oj,width:1}),tE=new mv({color:[51,51,51,1],width:2}),iE=new Ev({font:"bold 16px Helvetica",fill:Hj,stroke:tE,scale:.8}),rE=new Sv({fill:Hj,image:Qj,text:iE,stroke:nE,zIndex:0}),oE=[rE]),i.dataProjection=yr("EPSG:4326"),i.jy=r.defaultStyle?r.defaultStyle:oE,i.Ey=void 0===r.extractStyles||r.extractStyles,i.Ty=void 0===r.writeStyles||r.writeStyles,i.Ay={},i.Py=void 0===r.showPointNames||r.showPointNames,i.Bt=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",i.Cy=r.iconUrlFunction?r.iconUrlFunction:uE,i.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],i}return qj(n,t),n.prototype.ky=function(t,n){var i=ac([],sc(Bj,{Document:Kf(this.ky,this),Folder:Kf(this.ky,this),Placemark:Hf(this.Iy,this),Style:this.Ny.bind(this),StyleMap:this.Ly.bind(this)}),t,n,this);return i||void 0},n.prototype.Iy=function(t,n){var i=ac({geometry:null},Vj,t,n,this);if(i){var r=new Et,e=t.getAttribute("id");null!==e&&r.setId(e);var o=n[0],s=i.geometry;if(s&&Eg(s,!1,o),r.setGeometry(s),delete i.geometry,this.Ey){var u=function(t,n,i,r,e){return function(o,s){var u=e,a="",h=[];if(u){var f=o.getGeometry();if(f)if(f instanceof Dg)u=(h=f.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return"Point"===n||"MultiPoint"===n}))).length>0;else{var c=f.getType();u="Point"===c||"MultiPoint"===c}}u&&(a=o.get("name"),(u=u&&!!a)&&a.search(/&[^&]+;/)>-1&&(eE||(eE=document.createElement("textarea")),eE.innerHTML=a,a=eE.value));var l=i;if(t?l=t:n&&(l=hE(n,i,r)),u){var v=function(t,n){var i=[0,0],r="start",e=t.getImage();if(e){var o=e.getSize();if(o&&2==o.length){var s=e.getScaleArray(),u=e.getAnchor();i[0]=s[0]*(o[0]-u[0]),i[1]=s[1]*(o[1]/2-u[1]),r="left"}}var a=t.getText();a?((a=a.clone()).setFont(a.getFont()||iE.getFont()),a.setScale(a.getScale()||iE.getScale()),a.setFill(a.getFill()||iE.getFill()),a.setStroke(a.getStroke()||tE)):a=iE.clone();return a.setText(n),a.setOffsetX(i[0]),a.setOffsetY(i[1]),a.setTextAlign(r),new Sv({image:e,text:a})}(l[0],a);return h.length>0?(v.setGeometry(new Dg(h)),[v,new Sv({geometry:l[0].getGeometry(),image:null,fill:l[0].getFill(),stroke:l[0].getStroke(),text:null})].concat(l.slice(1))):v}return l}}(i.Style,i.styleUrl,this.jy,this.Ay,this.Py);r.setStyle(u)}return delete i.Style,r.setProperties(i,!0),r}},n.prototype.Ny=function(t,n){var i=t.getAttribute("id");if(null!==i){var r=FE.call(this,t,n);if(r){var e=void 0,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)e=new URL("#"+i,o).href;else e="#"+i;this.Ay[e]=r}}},n.prototype.Ly=function(t,n){var i=t.getAttribute("id");if(null!==i){var r=yE.call(this,t,n);if(r){var e,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)e=new URL("#"+i,o).href;else e="#"+i;this.Ay[e]=r}}},n.prototype.readFeatureFromNode=function(t,n){if(!y(Bj,t.namespaceURI))return null;var i=this.Iy(t,[this.getReadOptions(t,n)]);return i||null},n.prototype.readFeaturesFromNode=function(t,n){if(!y(Bj,t.namespaceURI))return[];var i,r=t.localName;if("Document"==r||"Folder"==r)return(i=this.ky(t,[this.getReadOptions(t,n)]))||[];if("Placemark"==r){var e=this.Iy(t,[this.getReadOptions(t,n)]);return e?[e]:[]}if("kml"==r){i=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var s=this.readFeaturesFromNode(o,n);s&&g(i,s)}return i}return[]},n.prototype.readName=function(t){if(t){if("string"==typeof t){var n=$f(t);return this.readNameFromDocument(n)}return Yf(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},n.prototype.readNameFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE){var i=this.readNameFromNode(n);if(i)return i}},n.prototype.readNameFromNode=function(t){for(var n=t.firstElementChild;n;n=n.nextElementSibling)if(y(Bj,n.namespaceURI)&&"name"==n.localName)return xO(n);for(n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;if(y(Bj,n.namespaceURI)&&("Document"==i||"Folder"==i||"Placemark"==i||"kml"==i)){var r=this.readNameFromNode(n);if(r)return r}}},n.prototype.readNetworkLinks=function(t){var n=[];if("string"==typeof t){var i=$f(t);g(n,this.readNetworkLinksFromDocument(i))}else Yf(t)?g(n,this.readNetworkLinksFromDocument(t)):g(n,this.readNetworkLinksFromNode(t));return n},n.prototype.readNetworkLinksFromDocument=function(t){for(var n=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&g(n,this.readNetworkLinksFromNode(i));return n},n.prototype.readNetworkLinksFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(y(Bj,i.namespaceURI)&&"NetworkLink"==i.localName){var r=ac({},Wj,i,[]);n.push(r)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var e=i.localName;!y(Bj,i.namespaceURI)||"Document"!=e&&"Folder"!=e&&"kml"!=e||g(n,this.readNetworkLinksFromNode(i))}return n},n.prototype.readRegion=function(t){var n=[];if("string"==typeof t){var i=$f(t);g(n,this.readRegionFromDocument(i))}else Yf(t)?g(n,this.readRegionFromDocument(t)):g(n,this.readRegionFromNode(t));return n},n.prototype.readRegionFromDocument=function(t){for(var n=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&g(n,this.readRegionFromNode(i));return n},n.prototype.readRegionFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(y(Bj,i.namespaceURI)&&"Region"==i.localName){var r=ac({},Zj,i,[]);n.push(r)}for(i=t.firstElementChild;i;i=i.nextElementSibling){var e=i.localName;!y(Bj,i.namespaceURI)||"Document"!=e&&"Folder"!=e&&"kml"!=e||g(n,this.readRegionFromNode(i))}return n},n.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=Xf(Bj[4],"kml"),r="http://www.w3.org/2000/xmlns/";i.setAttributeNS(r,"xmlns:gx",Uj[0]),i.setAttributeNS(r,"xmlns:xsi",Bf),i.setAttributeNS(Bf,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var e={node:i},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var s=$j[i.namespaceURI],u=oc(o,s);return fc(e,Kj,ec,u,[n],s,this),i},n}(aO);function hE(t,n,i){return Array.isArray(t)?t:"string"==typeof t?hE(i[t],n,i):n}function fE(t){var n=Vf(t,!1),i=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(n);if(i){var r=i[1];return[parseInt(r.substr(6,2),16),parseInt(r.substr(4,2),16),parseInt(r.substr(2,2),16),parseInt(r.substr(0,2),16)/255]}}function cE(t){var n=Vf(t,!1),i=[];n=n.replace(/\s*,\s*/g,",");for(var r,e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;r=e.exec(n);){var o=parseFloat(r[1]),s=parseFloat(r[2]),u=r[3]?parseFloat(r[3]):0;i.push(o,s,u),n=n.substr(r[0].length)}if(""===n)return i}function lE(t){var n=Vf(t,!1).trim(),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(n,i).href:n}function vE(t){var n=Vf(t,!1).trim().replace(/^(?!.*#)/,"#"),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(n,i).href:n}function dE(t){return mO(t)}var pE=sc(Bj,{Pair:function(t,n){var i=ac({},XE,t,n,this);if(!i)return;var r=i.key;if(r&&"normal"==r){var e=i.styleUrl;e&&(n[n.length-1]=e);var o=i.Style;o&&(n[n.length-1]=o)}}});function yE(t,n){return ac(void 0,pE,t,n,this)}var mE=sc(Bj,{Icon:tc((function(t,n){var i=ac({},jE,t,n);return i||null})),color:tc(fE),heading:tc(mO),hotSpot:tc((function(t){var n,i=t.getAttribute("xunits"),r=t.getAttribute("yunits");return n="insetPixels"!==i?"insetPixels"!==r?sv:av:"insetPixels"!==r?uv:hv,{x:parseFloat(t.getAttribute("x")),xunits:Xj[i],y:parseFloat(t.getAttribute("y")),yunits:Xj[r],origin:n}})),scale:tc(dE)});var wE=sc(Bj,{color:tc(fE),scale:tc(dE)});var gE=sc(Bj,{color:tc(fE),width:tc(mO)});var bE=sc(Bj,{color:tc(fE),fill:tc(dO),outline:tc(dO)});var xE=sc(Bj,{coordinates:Jf(cE)});function ME(t,n){return ac(null,xE,t,n)}var _E=sc(Uj,{Track:Hf(OE)});var SE=sc(Bj,{when:function(t,n){var i=n[n.length-1].whens,r=Vf(t,!1),e=Date.parse(r);i.push(isNaN(e)?0:e)}},sc(Uj,{coord:function(t,n){var i=n[n.length-1].coordinates,r=Vf(t,!1),e=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(r);if(e){var o=parseFloat(e[1]),s=parseFloat(e[2]),u=parseFloat(e[3]);i.push([o,s,u])}else i.push([])}}));function OE(t,n){var i=ac({coordinates:[],whens:[]},SE,t,n);if(i){for(var r=[],e=i.coordinates,o=i.whens,s=0,u=Math.min(e.length,o.length);s<u;++s)3==e[s].length&&r.push(e[s][0],e[s][1],e[s][2],o[s]);return new ng(r,Ct)}}var jE=sc(Bj,{href:tc(lE)},sc(Uj,{x:tc(mO),y:tc(mO),w:tc(mO),h:tc(mO)}));var EE=sc(Bj,{coordinates:Jf(cE)});function TE(t,n){return ac(null,EE,t,n)}var AE=sc(Bj,{extrude:tc(dO),tessellate:tc(dO),altitudeMode:tc(xO)});function PE(t,n){var i=ac({},AE,t,n),r=TE(t,n);if(r){var e=new ng(r,At);return e.setProperties(i,!0),e}}function CE(t,n){var i=ac({},AE,t,n),r=TE(t,n);if(r){var e=new We(r,At,[r.length]);return e.setProperties(i,!0),e}}var kE=sc(Bj,{LineString:Hf(PE),LinearRing:Hf(CE),MultiGeometry:Hf(IE),Point:Hf(NE),Polygon:Hf(zE)});function IE(t,n){var i,r=ac([],kE,t,n);if(!r)return null;if(0===r.length)return new Dg(r);for(var e=!0,o=r[0].getType(),s=1,u=r.length;s<u;++s)if(r[s].getType()!=o){e=!1;break}if(e){var a=void 0,h=void 0;if("Point"==o){var f=r[0];a=f.getLayout(),h=f.getFlatCoordinates();for(s=1,u=r.length;s<u;++s)g(h,r[s].getFlatCoordinates());GE(i=new Kw(h,a),r)}else"LineString"==o?GE(i=new rg(r),r):"Polygon"==o?GE(i=new sg(r),r):"GeometryCollection"==o?i=new Dg(r):St(!1,37)}else i=new Dg(r);return i}function NE(t,n){var i=ac({},AE,t,n),r=TE(t,n);if(r){var e=new Se(r,At);return e.setProperties(i,!0),e}}var LE=sc(Bj,{innerBoundaryIs:function(t,n){var i=ac([],ZE,t,n);if(i.length>0){var r=n[n.length-1];r.push.apply(r,i)}},outerBoundaryIs:function(t,n){var i=ac(void 0,$E,t,n);if(i){n[n.length-1][0]=i}}});function zE(t,n){var i=ac({},AE,t,n),r=ac([null],LE,t,n);if(r&&r[0]){for(var e=r[0],o=[e.length],s=1,u=r.length;s<u;++s)g(e,r[s]),o.push(e.length);var a=new We(e,At,o);return a.setProperties(i,!0),a}}var RE=sc(Bj,{IconStyle:function(t,n){var i=ac({},mE,t,n);if(i){var r,e,o,s,u=n[n.length-1],a="Icon"in i?i.Icon:{},h=!("Icon"in i)||Object.keys(a).length>0,f=a.href;f?r=f:h&&(r=Pj);var c,l=sv,v=i.hotSpot;v?(e=[v.x,v.y],o=v.xunits,s=v.yunits,l=v.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(r)&&(/pushpin/.test(r)?(e=jj,o=Ej,s=Tj):/arrow-reverse/.test(r)?(e=[54,42],o=Ej,s=Tj):/paddle/.test(r)&&(e=[32,1],o=Ej,s=Tj));var d,p=a.x,y=a.y;void 0!==p&&void 0!==y&&(c=[p,y]);var m,w=a.w,g=a.h;void 0!==w&&void 0!==g&&(d=[w,g]);var b=i.heading;void 0!==b&&(m=li(b));var x=i.scale,M=i.color;if(h){r==Pj&&(d=Aj);var _=new yv({anchor:e,anchorOrigin:l,anchorXUnits:o,anchorYUnits:s,crossOrigin:this.Bt,offset:c,offsetOrigin:sv,rotation:m,scale:x,size:d,src:this.Cy(r),color:M}),S=_.getScaleArray()[0],O=_.getSize();if(null===O){var j=_.getImageState();if(j===lo||j===vo){var E=function(){var t=_.getImageState();if(t!==lo&&t!==vo){var n=_.getSize();if(n&&2==n.length){var i=sE(n);_.setScale(S*i)}_.unlistenImageChange(E)}};_.listenImageChange(E),j===lo&&_.load()}}else if(2==O.length){var T=sE(O);_.setScale(S*T)}u.imageStyle=_}else u.imageStyle=Jj}},LabelStyle:function(t,n){var i=ac({},wE,t,n);if(i){var r=n[n.length-1],e=new Ev({fill:new rv({color:"color"in i?i.color:Oj}),scale:i.scale});r.textStyle=e}},LineStyle:function(t,n){var i=ac({},gE,t,n);if(i){var r=n[n.length-1],e=new mv({color:"color"in i?i.color:Oj,width:"width"in i?i.width:1});r.strokeStyle=e}},PolyStyle:function(t,n){var i=ac({},bE,t,n);if(i){var r=n[n.length-1],e=new rv({color:"color"in i?i.color:Oj});r.fillStyle=e;var o=i.fill;void 0!==o&&(r.fill=o);var s=i.outline;void 0!==s&&(r.outline=s)}}});function FE(t,n){var i=ac({},RE,t,n,this);if(!i)return null;var r,e="fillStyle"in i?i.fillStyle:Hj,o=i.fill;void 0===o||o||(e=null),"imageStyle"in i?i.imageStyle!=Jj&&(r=i.imageStyle):r=Qj;var s="textStyle"in i?i.textStyle:iE,u="strokeStyle"in i?i.strokeStyle:nE,a=i.outline;return void 0===a||a?[new Sv({fill:e,image:r,stroke:u,text:s,zIndex:void 0})]:[new Sv({geometry:function(t){var n=t.getGeometry(),i=n.getType();return"GeometryCollection"===i?new Dg(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return"Polygon"!==n&&"MultiPolygon"!==n}))):"Polygon"!==i&&"MultiPolygon"!==i?n:void 0},fill:e,image:r,stroke:u,text:s,zIndex:void 0}),new Sv({geometry:function(t){var n=t.getGeometry(),i=n.getType();return"GeometryCollection"===i?new Dg(n.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return"Polygon"===n||"MultiPolygon"===n}))):"Polygon"===i||"MultiPolygon"===i?n:void 0},fill:e,stroke:null,zIndex:void 0})]}function GE(t,n){var i,r,e,o=n.length,s=new Array(n.length),u=new Array(n.length),a=new Array(n.length);i=!1,r=!1,e=!1;for(var h=0;h<o;++h){var f=n[h];s[h]=f.get("extrude"),u[h]=f.get("tessellate"),a[h]=f.get("altitudeMode"),i=i||void 0!==s[h],r=r||void 0!==u[h],e=e||a[h]}i&&t.set("extrude",s),r&&t.set("tessellate",u),e&&t.set("altitudeMode",a)}var DE=sc(Bj,{displayName:tc(xO),value:tc(xO)});var qE=sc(Bj,{Data:function(t,n){var i=t.getAttribute("name");uc(DE,t,n);var r=n[n.length-1];i&&r.displayName?r[i]={value:r.value,displayName:r.displayName,toString:function(){return r.value}}:null!==i?r[i]=r.value:null!==r.displayName&&(r[r.displayName]=r.value),delete r.value},SchemaData:function(t,n){uc(VE,t,n)}});function UE(t,n){uc(qE,t,n)}function BE(t,n){uc(Zj,t,n)}var XE=sc(Bj,{Style:tc(FE),key:tc(xO),styleUrl:tc(vE)});var VE=sc(Bj,{SimpleData:function(t,n){var i=t.getAttribute("name");if(null!==i){var r=xO(t);n[n.length-1][i]=r}}});var WE=sc(Bj,{altitudeMode:tc(xO),minAltitude:tc(mO),maxAltitude:tc(mO),north:tc(mO),south:tc(mO),east:tc(mO),west:tc(mO)});var YE=sc(Bj,{minLodPixels:tc(mO),maxLodPixels:tc(mO),minFadeExtent:tc(mO),maxFadeExtent:tc(mO)});var ZE=sc(Bj,{LinearRing:Hf(ME)});var $E=sc(Bj,{LinearRing:Jf(ME)});function KE(t,n){for(var i=Go(n),r=[255*(4==i.length?i[3]:1),i[2],i[1],i[0]],e=0;e<4;++e){var o=Math.floor(r[e]).toString(16);r[e]=1==o.length?"0"+o:o}EO(t,r.join(""))}var HE=sc(Bj,{Data:nc((function(t,n,i){t.setAttribute("name",n.name);var r={node:t},e=n.value;"object"==typeof e?(null!==e&&e.displayName&&fc(r,HE,ec,[e.displayName],i,["displayName"]),null!==e&&e.value&&fc(r,HE,ec,[e.value],i,["value"])):fc(r,HE,ec,[e],i,["value"])})),value:nc((function(t,n){EO(t,n)})),displayName:nc((function(t,n){_O(t,n)}))});var JE=sc(Bj,{Placemark:nc(_T)}),QE=function(t,n,i){return Xf(n[n.length-1].node.namespaceURI,"Placemark")};var tT=rc("Data");var nT=sc(Bj,["href"],sc(Uj,["x","y","w","h"])),iT=sc(Bj,{href:nc(EO)},sc(Uj,{x:nc(OO),y:nc(OO),w:nc(OO),h:nc(OO)})),rT=function(t,n,i){return Xf(Uj[0],"gx:"+i)};var eT=sc(Bj,["scale","heading","Icon","color","hotSpot"]),oT=sc(Bj,{Icon:nc((function(t,n,i){var r={node:t},e=i[i.length-1].node,o=nT[e.namespaceURI],s=oc(n,o);fc(r,iT,ec,s,i,o),s=oc(n,o=nT[Uj[0]]),fc(r,iT,rT,s,i,o)})),color:nc(KE),heading:nc(OO),hotSpot:nc((function(t,n){t.setAttribute("x",String(n.x)),t.setAttribute("y",String(n.y)),t.setAttribute("xunits",n.xunits),t.setAttribute("yunits",n.yunits)})),scale:nc(IT)});var sT=sc(Bj,["color","scale"]),uT=sc(Bj,{color:nc(KE),scale:nc(IT)});var aT=sc(Bj,["color","width"]),hT=sc(Bj,{color:nc(KE),width:nc(OO)});var fT={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},cT=function(t,n,i){if(t)return Xf(n[n.length-1].node.namespaceURI,fT[t.getType()])},lT=rc("Point"),vT=rc("LineString"),dT=rc("LinearRing"),pT=rc("Polygon"),yT=sc(Bj,{LineString:nc(jT),Point:nc(jT),Polygon:nc(CT),GeometryCollection:nc(mT)});function mT(t,n,i){var r,e={node:t},o=n.getType(),s=[];"GeometryCollection"===o?(n.getGeometriesArrayRecursive().forEach((function(t){var n=t.getType();"MultiPoint"===n?s=s.concat(t.getPoints()):"MultiLineString"===n?s=s.concat(t.getLineStrings()):"MultiPolygon"===n?s=s.concat(t.getPolygons()):"Point"===n||"LineString"===n||"Polygon"===n?s.push(t):St(!1,39)})),r=cT):"MultiPoint"===o?(s=n.getPoints(),r=lT):"MultiLineString"===o?(s=n.getLineStrings(),r=vT):"MultiPolygon"===o?(s=n.getPolygons(),r=pT):St(!1,39),fc(e,yT,r,s,i)}var wT=sc(Bj,{LinearRing:nc(jT)});function gT(t,n,i){fc({node:t},wT,dT,[n],i)}var bT=sc(Bj,{ExtendedData:nc((function(t,n,i){for(var r={node:t},e=n.names,o=n.values,s=e.length,u=0;u<s;u++)fc(r,HE,tT,[{name:e[u],value:o[u]}],i)})),MultiGeometry:nc(mT),LineString:nc(jT),LinearRing:nc(jT),Point:nc(jT),Polygon:nc(CT),Style:nc((function(t,n,i){var r={node:t},e={};if(n.pointStyles.length){var o=n.pointStyles[0].getText();o&&(e.LabelStyle=o);var s=n.pointStyles[0].getImage();s&&"function"==typeof s.getSrc&&(e.IconStyle=s)}if(n.lineStyles.length){(u=n.lineStyles[0].getStroke())&&(e.LineStyle=u)}if(n.polyStyles.length){var u;(u=n.polyStyles[0].getStroke())&&!e.LineStyle&&(e.LineStyle=u),e.PolyStyle=n.polyStyles[0]}var a=i[i.length-1].node,h=NT[a.namespaceURI],f=oc(e,h);fc(r,LT,ec,f,i,h)})),address:nc(EO),description:nc(EO),name:nc(EO),open:nc(MO),phoneNumber:nc(EO),styleUrl:nc(EO),visibility:nc(MO)}),xT=sc(Bj,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),MT=rc("ExtendedData");function _T(t,n,i){var r={node:t};n.getId()&&t.setAttribute("id",n.getId());var e=n.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[n.getGeometryName()]=1;var s=Object.keys(e||{}).sort().filter((function(t){return!o[t]})),u=n.getStyleFunction();if(u){var a=u(n,0);if(a){var h=Array.isArray(a)?a:[a],f=h;if(n.getGeometry()&&(f=h.filter((function(t){var i=t.getGeometryFunction()(n);if(i){var r=i.getType();return"GeometryCollection"===r?i.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return"Point"===n||"MultiPoint"===n})).length:"Point"===r||"MultiPoint"===r}}))),this.Ty){var c=h,l=h;n.getGeometry()&&(c=h.filter((function(t){var i=t.getGeometryFunction()(n);if(i){var r=i.getType();return"GeometryCollection"===r?i.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return"LineString"===n||"MultiLineString"===n})).length:"LineString"===r||"MultiLineString"===r}})),l=h.filter((function(t){var i=t.getGeometryFunction()(n);if(i){var r=i.getType();return"GeometryCollection"===r?i.getGeometriesArrayRecursive().filter((function(t){var n=t.getType();return"Polygon"===n||"MultiPolygon"===n})).length:"Polygon"===r||"MultiPolygon"===r}}))),e.Style={pointStyles:f,lineStyles:c,polyStyles:l}}if(f.length&&void 0===e.name){var v=f[0].getText();v&&(e.name=v.getText())}}}var d=i[i.length-1].node,p=xT[d.namespaceURI],y=oc(e,p);if(fc(r,bT,ec,y,i,p),s.length>0){var m=oc(e,s);fc(r,bT,MT,[{names:s,values:m}],i)}var w=i[0],g=n.getGeometry();g&&(g=Eg(g,!0,w)),fc(r,bT,cT,[g],i)}var ST=sc(Bj,["extrude","tessellate","altitudeMode","coordinates"]),OT=sc(Bj,{extrude:nc(MO),tessellate:nc(MO),altitudeMode:nc(EO),coordinates:nc((function(t,n,i){var r,e=i[i.length-1],o=e.layout,s=e.stride;o==Tt||o==Pt?r=2:o==At||o==Ct?r=3:St(!1,34);var u=n.length,a="";if(u>0){a+=n[0];for(var h=1;h<r;++h)a+=","+n[h];for(var f=s;f<u;f+=s){a+=" "+n[f];for(h=1;h<r;++h)a+=","+n[f+h]}}EO(t,a)}))});function jT(t,n,i){var r=n.getFlatCoordinates(),e={node:t};e.layout=n.getLayout(),e.stride=n.getStride();var o=n.getProperties();o.coordinates=r;var s=i[i.length-1].node,u=ST[s.namespaceURI],a=oc(o,u);fc(e,OT,ec,a,i,u)}var ET=sc(Bj,["color","fill","outline"]),TT=sc(Bj,{outerBoundaryIs:nc(gT),innerBoundaryIs:nc(gT)}),AT=rc("innerBoundaryIs"),PT=rc("outerBoundaryIs");function CT(t,n,i){var r=n.getLinearRings(),e=r.shift(),o={node:t};fc(o,TT,AT,r,i),fc(o,TT,PT,[e],i)}var kT=sc(Bj,{color:nc(KE),fill:nc(MO),outline:nc(MO)});function IT(t,n){OO(t,Math.round(1e6*n)/1e6)}var NT=sc(Bj,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),LT=sc(Bj,{IconStyle:nc((function(t,n,i){var r={node:t},e={},o=n.getSrc(),s=n.getSize(),u=n.getImageSize(),a={href:o};if(s){a.w=s[0],a.h=s[1];var h=n.getAnchor(),f=n.getOrigin();if(f&&u&&0!==f[0]&&f[1]!==s[1]&&(a.x=f[0],a.y=u[1]-(f[1]+s[1])),h&&(h[0]!==s[0]/2||h[1]!==s[1]/2)){var c={x:h[0],xunits:ov,y:s[1]-h[1],yunits:ov};e.hotSpot=c}}e.Icon=a;var l=n.getScaleArray()[0],v=s;null===v&&(v=Aj),2==v.length&&(l/=sE(v)),1!==l&&(e.scale=l);var d=n.getRotation();0!==d&&(e.heading=d);var p=n.getColor();p&&(e.color=p);var y=i[i.length-1].node,m=eT[y.namespaceURI],w=oc(e,m);fc(r,oT,ec,w,i,m)})),LabelStyle:nc((function(t,n,i){var r={node:t},e={},o=n.getFill();o&&(e.color=o.getColor());var s=n.getScale();s&&1!==s&&(e.scale=s);var u=i[i.length-1].node,a=sT[u.namespaceURI],h=oc(e,a);fc(r,uT,ec,h,i,a)})),LineStyle:nc((function(t,n,i){var r={node:t},e={color:n.getColor(),width:Number(n.getWidth())||1},o=i[i.length-1].node,s=aT[o.namespaceURI],u=oc(e,s);fc(r,hT,ec,u,i,s)})),PolyStyle:nc((function(t,n,i){var r={node:t},e=n.getFill(),o=n.getStroke(),s={color:e?e.getColor():void 0,fill:!!e&&void 0,outline:!!o&&void 0},u=i[i.length-1].node,a=ET[u.namespaceURI],h=oc(s,a);fc(r,kT,ec,h,i,a)}))});var zT=aE,RT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),FT=[null],GT=sc(FT,{nd:function(t,n){n[n.length-1].ndrefs.push(t.getAttribute("ref"))},tag:BT}),DT=sc(FT,{node:function(t,n){var i=n[0],r=n[n.length-1],e=t.getAttribute("id"),o=[parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))];r.nodes[e]=o;var s=ac({tags:{}},UT,t,n);if(!k(s.tags)){var u=new Se(o);Eg(u,!1,i);var a=new Et(u);void 0!==e&&a.setId(e),a.setProperties(s.tags,!0),r.features.push(a)}},way:function(t,n){var i=ac({id:t.getAttribute("id"),ndrefs:[],tags:{}},GT,t,n);n[n.length-1].ways.push(i)}}),qT=function(t){function n(){var n=t.call(this)||this;return n.dataProjection=yr("EPSG:4326"),n}return RT(n,t),n.prototype.readFeaturesFromNode=function(t,n){var i=this.getReadOptions(t,n);if("osm"==t.localName){for(var r=ac({nodes:{},ways:[],features:[]},DT,t,[i]),e=0;e<r.ways.length;e++){for(var o=r.ways[e],s=[],u=0,a=o.ndrefs.length;u<a;u++){g(s,r.nodes[o.ndrefs[u]])}var h=void 0;Eg(h=o.ndrefs[0]==o.ndrefs[o.ndrefs.length-1]?new We(s,Tt,[s.length]):new ng(s,Tt),!1,i);var f=new Et(h);void 0!==o.id&&f.setId(o.id),f.setProperties(o.tags,!0),r.features.push(f)}if(r.features)return r.features}return[]},n}(aO),UT=sc(FT,{tag:BT});function BT(t,n){n[n.length-1].tags[t.getAttribute("k")]=t.getAttribute("v")}var XT=qT,VT=function(){function t(){}return t.prototype.read=function(t){if(t){if("string"==typeof t){var n=$f(t);return this.readFromDocument(n)}return Yf(t)?this.readFromDocument(t):this.readFromNode(t)}return null},t.prototype.readFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readFromNode(n);return null},t.prototype.readFromNode=function(t){},t}();function WT(t){return t.getAttributeNS("http://www.w3.org/1999/xlink","href")}var YT=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ZT=[null,"http://www.opengis.net/ows/1.1"],$T=sc(ZT,{ServiceIdentification:tc((function(t,n){return ac({},aA,t,n)})),ServiceProvider:tc((function(t,n){return ac({},hA,t,n)})),OperationsMetadata:tc((function(t,n){return ac({},eA,t,n)}))}),KT=function(t){function n(){return t.call(this)||this}return YT(n,t),n.prototype.readFromNode=function(t){var n=ac({},$T,t,[]);return n||null},n}(VT),HT=sc(ZT,{DeliveryPoint:tc(xO),City:tc(xO),AdministrativeArea:tc(xO),PostalCode:tc(xO),Country:tc(xO),ElectronicMailAddress:tc(xO)}),JT=sc(ZT,{Value:Qf((function(t,n){return xO(t)}))}),QT=sc(ZT,{AllowedValues:tc((function(t,n){return ac({},JT,t,n)}))}),tA=sc(ZT,{Phone:tc((function(t,n){return ac({},oA,t,n)})),Address:tc((function(t,n){return ac({},HT,t,n)}))}),nA=sc(ZT,{HTTP:tc((function(t,n){return ac({},iA,t,n)}))}),iA=sc(ZT,{Get:Qf((function(t,n){var i=WT(t);if(!i)return;return ac({href:i},sA,t,n)})),Post:void 0}),rA=sc(ZT,{DCP:tc((function(t,n){return ac({},nA,t,n)}))}),eA=sc(ZT,{Operation:function(t,n){var i=t.getAttribute("name"),r=ac({},rA,t,n);if(!r)return;n[n.length-1][i]=r}}),oA=sc(ZT,{Voice:tc(xO),Facsimile:tc(xO)}),sA=sc(ZT,{Constraint:Qf((function(t,n){var i=t.getAttribute("name");if(!i)return;return ac({name:i},QT,t,n)}))}),uA=sc(ZT,{IndividualName:tc(xO),PositionName:tc(xO),ContactInfo:tc((function(t,n){return ac({},tA,t,n)}))}),aA=sc(ZT,{Abstract:tc(xO),AccessConstraints:tc(xO),Fees:tc(xO),Title:tc(xO),ServiceTypeVersion:tc(xO),ServiceType:tc(xO)}),hA=sc(ZT,{ProviderName:tc(xO),ProviderSite:tc(WT),ServiceContact:tc((function(t,n){return ac({},uA,t,n)}))});var fA=KT,cA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();function lA(t,n,i){var r,e=i||1e5,o=new Array(n);for(r=0;r<n;++r)o[r]=0;for(var s=0,u=t.length;s<u;)for(r=0;r<n;++r,++s){var a=t[s],h=a-o[r];o[r]=a,t[s]=h}return dA(t,e)}function vA(t,n,i){var r,e=i||1e5,o=new Array(n);for(r=0;r<n;++r)o[r]=0;for(var s=pA(t,e),u=0,a=s.length;u<a;)for(r=0;r<n;++r,++u)o[r]+=s[u],s[u]=o[r];return s}function dA(t,n){for(var i=n||1e5,r=0,e=t.length;r<e;++r)t[r]=Math.round(t[r]*i);return yA(t)}function pA(t,n){for(var i=n||1e5,r=mA(t),e=0,o=r.length;e<o;++e)r[e]/=i;return r}function yA(t){for(var n=0,i=t.length;n<i;++n){var r=t[n];t[n]=r<0?~(r<<1):r<<1}return wA(t)}function mA(t){for(var n=gA(t),i=0,r=n.length;i<r;++i){var e=n[i];n[i]=1&e?~(e>>1):e>>1}return n}function wA(t){for(var n="",i=0,r=t.length;i<r;++i)n+=bA(t[i]);return n}function gA(t){for(var n=[],i=0,r=0,e=0,o=t.length;e<o;++e){var s=t.charCodeAt(e)-63;i|=(31&s)<<r,s<32?(n.push(i),i=0,r=0):r+=5}return n}function bA(t){for(var n,i="";t>=32;)n=63+(32|31&t),i+=String.fromCharCode(n),t>>=5;return n=t+63,i+=String.fromCharCode(n)}var xA=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.dataProjection=yr("EPSG:4326"),i.zy=r.factor?r.factor:1e5,i.qv=r.geometryLayout?r.geometryLayout:Tt,i}return cA(n,t),n.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n);return new Et(i)},n.prototype.readFeaturesFromText=function(t,n){return[this.readFeatureFromText(t,n)]},n.prototype.readGeometryFromText=function(t,n){var i=Zr(this.qv),r=vA(t,i,this.zy);JS(r,0,r.length,i,r);var e=pe(r,0,r.length,i);return Eg(new ng(e,this.qv),!1,this.adaptOptions(n))},n.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):(St(!1,40),"")},n.prototype.writeFeaturesText=function(t,n){return this.writeFeatureText(t[0],n)},n.prototype.writeGeometryText=function(t,n){var i=(t=Eg(t,!0,this.adaptOptions(n))).getFlatCoordinates(),r=t.getStride();return JS(i,0,i.length,r,i),lA(i,r,this.zy)},n}(Cj),MA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_A=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.iv=r.layerName,i.Uh=r.layers?r.layers:null,i.dataProjection=yr(r.dataProjection?r.dataProjection:"EPSG:4326"),i}return MA(n,t),n.prototype.readFeaturesFromObject=function(t,n){if("Topology"==t.type){var i=t,r=void 0,e=null,o=null;i.transform&&(e=(r=i.transform).scale,o=r.translate);var s=i.arcs;r&&function(t,n,i){for(var r=0,e=t.length;r<e;++r)TA(t[r],n,i)}(s,e,o);var u=[],a=i.objects,h=this.iv,f=void 0;for(var c in a)this.Uh&&-1==this.Uh.indexOf(c)||("GeometryCollection"===a[c].type?(f=a[c],u.push.apply(u,jA(f,s,e,o,h,c,n))):(f=a[c],u.push(EA(f,s,e,o,h,c,n))));return u}return[]},n.prototype.readProjectionFromObject=function(t){return this.dataProjection},n}(Bg),SA={Point:function(t,n,i){var r=t.coordinates;n&&i&&AA(r,n,i);return new Se(r)},LineString:function(t,n){var i=OA(t.arcs,n);return new ng(i)},Polygon:function(t,n){for(var i=[],r=0,e=t.arcs.length;r<e;++r)i[r]=OA(t.arcs[r],n);return new We(i)},MultiPoint:function(t,n,i){var r=t.coordinates;if(n&&i)for(var e=0,o=r.length;e<o;++e)AA(r[e],n,i);return new Kw(r)},MultiLineString:function(t,n){for(var i=[],r=0,e=t.arcs.length;r<e;++r)i[r]=OA(t.arcs[r],n);return new rg(i)},MultiPolygon:function(t,n){for(var i=[],r=0,e=t.arcs.length;r<e;++r){for(var o=t.arcs[r],s=[],u=0,a=o.length;u<a;++u)s[u]=OA(o[u],n);i[r]=s}return new sg(i)}};function OA(t,n){for(var i,r=[],e=0,o=t.length;e<o;++e)if(i=t[e],e>0&&r.pop(),i>=0)for(var s=0,u=(a=n[i]).length;s<u;++s)r.push(a[s].slice(0));else{var a;for(s=(a=n[~i]).length-1;s>=0;--s)r.push(a[s].slice(0))}return r}function jA(t,n,i,r,e,o,s){for(var u=t.geometries,a=[],h=0,f=u.length;h<f;++h)a[h]=EA(u[h],n,i,r,e,o,s);return a}function EA(t,n,i,r,e,o,s){var u=null,a=t.type;if(a){var h=SA[a];u=Eg(u="Point"===a||"MultiPoint"===a?h(t,i,r):h(t,n),!1,s)}var f=new Et({geometry:u});void 0!==t.id&&f.setId(t.id);var c=t.properties;return e&&(c||(c={}),c[e]=o),c&&f.setProperties(c,!0),f}function TA(t,n,i){for(var r=0,e=0,o=0,s=t.length;o<s;++o){var u=t[o];r+=u[0],e+=u[1],u[0]=r,u[1]=e,AA(u,n,i)}}function AA(t,n,i){t[0]=t[0]*n[0]+i[0],t[1]=t[1]*n[1]+i[1]}var PA=_A,CA=function(){function t(t){this.Ry=t}return t.prototype.getTagName=function(){return this.Ry},t}(),kA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),IA=function(t){function n(n,i){var r=t.call(this,n)||this;return r.conditions=i,St(r.conditions.length>=2,57),r}return kA(n,t),n}(CA),NA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),LA=function(t){function n(n){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return NA(n,t),n}(IA),zA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),RA=function(t){function n(n,i,r){var e=t.call(this,"BBOX")||this;if(e.geometryName=n,e.extent=i,4!==i.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return e.srsName=r,e}return zA(n,t),n}(CA),FA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),GA=function(t){function n(n,i,r,e){var o=t.call(this,n)||this;return o.geometryName=i||"the_geom",o.geometry=r,o.srsName=e,o}return FA(n,t),n}(CA),DA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qA=function(t){function n(n,i,r){return t.call(this,"Contains",n,i,r)||this}return DA(n,t),n}(GA),UA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),BA=function(t){function n(n,i,r,e,o){var s=t.call(this,"DWithin",n,i,o)||this;return s.distance=r,s.unit=e,s}return UA(n,t),n}(GA),XA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),VA=function(t){function n(n,i,r){return t.call(this,"Disjoint",n,i,r)||this}return XA(n,t),n}(GA),WA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),YA=function(t){function n(n,i){var r=t.call(this,n)||this;return r.propertyName=i,r}return WA(n,t),n}(CA),ZA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$A=function(t){function n(n,i,r){var e=t.call(this,"During",n)||this;return e.begin=i,e.end=r,e}return ZA(n,t),n}(YA),KA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),HA=function(t){function n(n,i,r,e){var o=t.call(this,n,i)||this;return o.expression=r,o.matchCase=e,o}return KA(n,t),n}(YA),JA=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),QA=function(t){function n(n,i,r){return t.call(this,"PropertyIsEqualTo",n,i,r)||this}return JA(n,t),n}(HA),tP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),nP=function(t){function n(n,i){return t.call(this,"PropertyIsGreaterThan",n,i)||this}return tP(n,t),n}(HA),iP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rP=function(t){function n(n,i){return t.call(this,"PropertyIsGreaterThanOrEqualTo",n,i)||this}return iP(n,t),n}(HA),eP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),oP=function(t){function n(n,i,r){return t.call(this,"Intersects",n,i,r)||this}return eP(n,t),n}(GA),sP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uP=function(t){function n(n,i,r){var e=t.call(this,"PropertyIsBetween",n)||this;return e.lowerBoundary=i,e.upperBoundary=r,e}return sP(n,t),n}(YA),aP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),hP=function(t){function n(n,i,r,e,o,s){var u=t.call(this,"PropertyIsLike",n)||this;return u.pattern=i,u.wildCard=void 0!==r?r:"*",u.singleChar=void 0!==e?e:".",u.escapeChar=void 0!==o?o:"!",u.matchCase=s,u}return aP(n,t),n}(YA),fP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),cP=function(t){function n(n){return t.call(this,"PropertyIsNull",n)||this}return fP(n,t),n}(YA),lP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vP=function(t){function n(n,i){return t.call(this,"PropertyIsLessThan",n,i)||this}return lP(n,t),n}(HA),dP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),pP=function(t){function n(n,i){return t.call(this,"PropertyIsLessThanOrEqualTo",n,i)||this}return dP(n,t),n}(HA),yP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mP=function(t){function n(n){var i=t.call(this,"Not")||this;return i.condition=n,i}return yP(n,t),n}(CA),wP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),gP=function(t){function n(n,i,r){return t.call(this,"PropertyIsNotEqualTo",n,i,r)||this}return wP(n,t),n}(HA),bP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xP=function(t){function n(n){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}return bP(n,t),n}(IA),MP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_P=function(t){function n(n){var i=t.call(this,"ResourceId")||this;return i.rid=n,i}return MP(n,t),n}(CA),SP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),OP=function(t){function n(n,i,r){return t.call(this,"Within",n,i,r)||this}return SP(n,t),n}(GA);function jP(t){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(LA,n))}function EP(t,n,i){return new RA(t,n,i)}var TP=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),AP={"http://www.opengis.net/gml":{boundedBy:tc(vO.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:Hf(vO.prototype.readFeaturesInternal)}},PP={"http://www.opengis.net/wfs":{totalInserted:tc(gO),totalUpdated:tc(gO),totalDeleted:tc(gO)},"http://www.opengis.net/wfs/2.0":{totalInserted:tc(gO),totalUpdated:tc(gO),totalDeleted:tc(gO)}},CP={"http://www.opengis.net/wfs":{TransactionSummary:tc(BP,"transactionSummary"),InsertResults:tc(YP,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:tc(BP,"transactionSummary"),InsertResults:tc(YP,"insertIds")}},kP={"http://www.opengis.net/wfs":{PropertyName:nc(EO)},"http://www.opengis.net/wfs/2.0":{PropertyName:nc(EO)}},IP={"http://www.opengis.net/wfs":{Insert:nc(ZP),Update:nc(JP),Delete:nc(HP),Property:nc(QP),Native:nc(tC)},"http://www.opengis.net/wfs/2.0":{Insert:nc(ZP),Update:nc(JP),Delete:nc(HP),Property:nc(QP),Native:nc(tC)}},NP="feature",LP="http://www.w3.org/2000/xmlns/",zP={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},RP={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},FP={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},GP={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","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"},DP={"2.0.0":DO,"1.1.0":LO,"1.0.0":CO},qP=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.af=r.version?r.version:"1.1.0",i.Fy=r.featureType,i.Gy=r.featureNS,i.Dy=r.gmlFormat?r.gmlFormat:new DP[i.af],i.qy=r.schemaLocation?r.schemaLocation:GP[i.af],i}return TP(n,t),n.prototype.getFeatureType=function(){return this.Fy},n.prototype.setFeatureType=function(t){this.Fy=t},n.prototype.readFeaturesFromNode=function(t,n){var i={node:t};A(i,{featureType:this.Fy,featureNS:this.Gy}),A(i,this.getReadOptions(t,n||{}));var r=[i],e=ac([],"2.0.0"===this.af?AP:this.Dy.FEATURE_COLLECTION_PARSERS,t,r,this.Dy);return e||(e=[]),e},n.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var n=$f(t);return this.readTransactionResponseFromDocument(n)}return Yf(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},n.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var n=$f(t);return this.readFeatureCollectionMetadataFromDocument(n)}return Yf(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},n.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(n)},n.prototype.readFeatureCollectionMetadataFromNode=function(t){var n={},i=bO(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=i,ac(n,AP,t,[],this.Dy)},n.prototype.readTransactionResponseFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(n)},n.prototype.readTransactionResponseFromNode=function(t){return ac({},CP,t,[])},n.prototype.writeGetFeature=function(t){var n=this,i=Xf(RP[this.af],"GetFeature");i.setAttribute("service","WFS"),i.setAttribute("version",this.af),t.handle&&i.setAttribute("handle",t.handle),t.outputFormat&&i.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&i.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&i.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&i.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&i.setAttribute("count",String(t.count)),void 0!==t.viewParams&&i.setAttribute("viewParams",t.viewParams),i.setAttributeNS(Bf,"xsi:schemaLocation",this.qy);var r={node:i};if(A(r,{version:this.af,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.Gy,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),St(Array.isArray(t.featureTypes),11),"string"==typeof t.featureTypes[0]){var e=t.filter;t.bbox&&(St(t.geometryName,12),e=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,e)),A(r,{geometryName:t.geometryName,filter:e}),wC(i,t.featureTypes,[r])}else t.featureTypes.forEach((function(e){var o=n.combineBboxAndFilter(e.geometryName,e.bbox,t.srsName,t.filter);A(r,{geometryName:e.geometryName,filter:o}),wC(i,[e.name],[r])}));return i},n.prototype.combineBboxAndFilter=function(t,n,i,r){var e=EP(t,n,i);return r?jP(r,e):e},n.prototype.writeTransaction=function(t,n,i,r){var e,o=[],s=r.version?r.version:this.af,u=Xf(RP[s],"Transaction");u.setAttribute("service","WFS"),u.setAttribute("version",s),r&&(e=r.gmlOptions?r.gmlOptions:{},r.handle&&u.setAttribute("handle",r.handle)),u.setAttributeNS(Bf,"xsi:schemaLocation",GP[s]);var a=function(t,n,i,r){var e,o=r.featurePrefix?r.featurePrefix:NP;"1.0.0"===i?e=2:"1.1.0"===i?e=3:"2.0.0"===i&&(e=3.2);return A({node:t},{version:i,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:o,gmlVersion:e,hasZ:r.hasZ,srsName:r.srsName},n)}(u,e,s,r);return t&&UP("Insert",t,o,a),n&&UP("Update",n,o,a),i&&UP("Delete",i,o,a),r.nativeElements&&UP("Native",r.nativeElements,o,a),u},n.prototype.readProjectionFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(n);return null},n.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var n=(t=t.firstElementChild.firstElementChild).firstElementChild;n;n=n.nextElementSibling)if(0!==n.childNodes.length&&(1!==n.childNodes.length||3!==n.firstChild.nodeType)){var i=[{}];return this.Dy.readGeometryElement(n,i),yr(i.pop().srsName)}return null},n}(aO);function UP(t,n,i,r){fc(r,IP,rc(t),n,i)}function BP(t,n){return ac({},PP,t,n)}var XP={"http://www.opengis.net/ogc":{FeatureId:Hf((function(t,n){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:Hf((function(t,n){return t.getAttribute("fid")}))}};function VP(t,n){uc(XP,t,n)}var WP={"http://www.opengis.net/wfs":{Feature:VP},"http://www.opengis.net/wfs/2.0":{Feature:VP}};function YP(t,n){return ac([],WP,t,n)}function ZP(t,n,i){var r=i[i.length-1],e=r.featureType,o=r.featureNS,s=r.gmlVersion,u=Xf(o,e);t.appendChild(u),2===s?CO.prototype.writeFeatureElement(u,n,i):3===s?LO.prototype.writeFeatureElement(u,n,i):DO.prototype.writeFeatureElement(u,n,i)}function $P(t,n,i){var r=i[i.length-1].version,e=zP[r],o=Xf(e,"Filter"),s=Xf(e,"FeatureId");o.appendChild(s),s.setAttribute("fid",n),t.appendChild(o)}function KP(t,n){var i=(t=t||NP)+":";return 0===n.indexOf(i)?n:i+n}function HP(t,n,i){var r=i[i.length-1];St(void 0!==n.getId(),26);var e=r.featureType,o=r.featurePrefix,s=r.featureNS,u=KP(o,e);t.setAttribute("typeName",u),t.setAttributeNS(LP,"xmlns:"+o,s);var a=n.getId();void 0!==a&&$P(t,a,i)}function JP(t,n,i){var r=i[i.length-1];St(void 0!==n.getId(),27);var e=r.version,o=r.featureType,s=r.featurePrefix,u=r.featureNS,a=KP(s,o),h=n.getGeometryName();t.setAttribute("typeName",a),t.setAttributeNS(LP,"xmlns:"+s,u);var f=n.getId();if(void 0!==f){for(var c=n.getKeys(),l=[],v=0,d=c.length;v<d;v++){var p=n.get(c[v]);if(void 0!==p){var y=c[v];p&&"function"==typeof p.getSimplifiedGeometry&&(y=h),l.push({name:y,value:p})}}fc({version:e,gmlVersion:r.gmlVersion,node:t,hasZ:r.hasZ,srsName:r.srsName},IP,rc("Property"),l,i),$P(t,f,i)}}function QP(t,n,i){var r=i[i.length-1],e=r.version,o=RP[e],s=Xf(o,"Name"),u=r.gmlVersion;if(t.appendChild(s),EO(s,n.name),void 0!==n.value&&null!==n.value){var a=Xf(o,"Value");t.appendChild(a),n.value&&"function"==typeof n.value.getSimplifiedGeometry?2===u?CO.prototype.writeGeometryElement(a,n.value,i):3===u?LO.prototype.writeGeometryElement(a,n.value,i):DO.prototype.writeGeometryElement(a,n.value,i):EO(a,n.value)}}function tC(t,n,i){n.vendorId&&t.setAttribute("vendorId",n.vendorId),void 0!==n.safeToIgnore&&t.setAttribute("safeToIgnore",String(n.safeToIgnore)),void 0!==n.value&&EO(t,n.value)}var nC={"http://www.opengis.net/wfs":{Query:nc(iC)},"http://www.opengis.net/wfs/2.0":{Query:nc(iC)},"http://www.opengis.net/ogc":{During:nc(uC),And:nc(aC),Or:nc(aC),Not:nc(hC),BBOX:nc(eC),Contains:nc(oC),Intersects:nc(oC),Within:nc(oC),DWithin:nc(sC),PropertyIsEqualTo:nc(fC),PropertyIsNotEqualTo:nc(fC),PropertyIsLessThan:nc(fC),PropertyIsLessThanOrEqualTo:nc(fC),PropertyIsGreaterThan:nc(fC),PropertyIsGreaterThanOrEqualTo:nc(fC),PropertyIsNull:nc(cC),PropertyIsBetween:nc(lC),PropertyIsLike:nc(vC)},"http://www.opengis.net/fes/2.0":{During:nc(uC),And:nc(aC),Or:nc(aC),Not:nc(hC),BBOX:nc(eC),Contains:nc(oC),Disjoint:nc(oC),Intersects:nc(oC),ResourceId:nc((function(t,n,i){t.setAttribute("rid",n.rid)})),Within:nc(oC),DWithin:nc(sC),PropertyIsEqualTo:nc(fC),PropertyIsNotEqualTo:nc(fC),PropertyIsLessThan:nc(fC),PropertyIsLessThanOrEqualTo:nc(fC),PropertyIsGreaterThan:nc(fC),PropertyIsGreaterThanOrEqualTo:nc(fC),PropertyIsNull:nc(cC),PropertyIsBetween:nc(lC),PropertyIsLike:nc(vC)}};function iC(t,n,i){var r,e,o=i[i.length-1],s=o.version,u=o.featurePrefix,a=o.featureNS,h=o.propertyNames,f=o.srsName;r=u?KP(u,n):n,e="2.0.0"===s?"typeNames":"typeName",t.setAttribute(e,r),f&&t.setAttribute("srsName",f),a&&t.setAttributeNS(LP,"xmlns:"+u,a);var c=A({},o);c.node=t,fc(c,kP,rc("PropertyName"),h,i);var l=o.filter;if(l){var v=Xf(gC(s),"Filter");t.appendChild(v),rC(v,l,i)}}function rC(t,n,i){var r=i[i.length-1],e={node:t};A(e,{context:r}),fc(e,nC,rc(n.getTagName()),[n],i)}function eC(t,n,i){var r=i[i.length-1],e=r.context.version;r.srsName=n.srsName;var o=DP[e];yC(e,t,n.geometryName),o.prototype.writeGeometryElement(t,n.extent,i)}function oC(t,n,i){var r=i[i.length-1],e=r.context.version;r.srsName=n.srsName;var o=DP[e];yC(e,t,n.geometryName),o.prototype.writeGeometryElement(t,n.geometry,i)}function sC(t,n,i){var r=i[i.length-1].context.version;oC(t,n,i);var e=Xf(gC(r),"Distance");EO(e,n.distance.toString()),"2.0.0"===r?e.setAttribute("uom",n.unit):e.setAttribute("units",n.unit),t.appendChild(e)}function uC(t,n,i){var r=i[i.length-1].context.version;dC(FP[r],"ValueReference",t,n.propertyName);var e=Xf(fO,"TimePeriod");t.appendChild(e);var o=Xf(fO,"begin");e.appendChild(o),mC(o,n.begin);var s=Xf(fO,"end");e.appendChild(s),mC(s,n.end)}function aC(t,n,i){var r=i[i.length-1].context,e={node:t};A(e,{context:r});for(var o=n.conditions,s=0,u=o.length;s<u;++s){var a=o[s];fc(e,nC,rc(a.getTagName()),[a],i)}}function hC(t,n,i){var r=i[i.length-1].context,e={node:t};A(e,{context:r});var o=n.condition;fc(e,nC,rc(o.getTagName()),[o],i)}function fC(t,n,i){var r=i[i.length-1].context.version;void 0!==n.matchCase&&t.setAttribute("matchCase",n.matchCase.toString()),yC(r,t,n.propertyName),pC(r,t,""+n.expression)}function cC(t,n,i){yC(i[i.length-1].context.version,t,n.propertyName)}function lC(t,n,i){var r=i[i.length-1].context.version,e=gC(r);yC(r,t,n.propertyName);var o=Xf(e,"LowerBoundary");t.appendChild(o),pC(r,o,""+n.lowerBoundary);var s=Xf(e,"UpperBoundary");t.appendChild(s),pC(r,s,""+n.upperBoundary)}function vC(t,n,i){var r=i[i.length-1].context.version;t.setAttribute("wildCard",n.wildCard),t.setAttribute("singleChar",n.singleChar),t.setAttribute("escapeChar",n.escapeChar),void 0!==n.matchCase&&t.setAttribute("matchCase",n.matchCase.toString()),yC(r,t,n.propertyName),pC(r,t,""+n.pattern)}function dC(t,n,i,r){var e=Xf(t,n);EO(e,r),i.appendChild(e)}function pC(t,n,i){dC(gC(t),"Literal",n,i)}function yC(t,n,i){"2.0.0"===t?dC(FP[t],"ValueReference",n,i):dC(zP[t],"PropertyName",n,i)}function mC(t,n){var i=Xf(fO,"TimeInstant");t.appendChild(i);var r=Xf(fO,"timePosition");i.appendChild(r),EO(r,n)}function wC(t,n,i){var r=i[i.length-1],e=A({},r);e.node=t,fc(e,nC,rc("Query"),n,i)}function gC(t){return"2.0.0"===t?FP[t]:zP[t]}var bC=qP,xC=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),MC=1,_C=2,SC=3,OC=4,jC=5,EC=6,TC=7,AC=15,PC=16,CC=17,kC=function(){function t(t){this.Uy=t,this.By=0,this.Xy=!1,this.Vy=!1,this.Wy=!1,this.Yy=!1,this.Zy=null,this.$y=Tt}return t.prototype.readUint8=function(){return this.Uy.getUint8(this.By++)},t.prototype.readUint32=function(t){return this.Uy.getUint32((this.By+=4)-4,void 0!==t?t:this.Vy)},t.prototype.readDouble=function(t){return this.Uy.getFloat64((this.By+=8)-8,void 0!==t?t:this.Vy)},t.prototype.readPoint=function(){var t=[];return t.push(this.readDouble()),t.push(this.readDouble()),this.Wy&&t.push(this.readDouble()),this.Yy&&t.push(this.readDouble()),t},t.prototype.readLineString=function(){for(var t=this.readUint32(),n=[],i=0;i<t;i++)n.push(this.readPoint());return n},t.prototype.readPolygon=function(){for(var t=this.readUint32(),n=[],i=0;i<t;i++)n.push(this.readLineString());return n},t.prototype.readWkbHeader=function(t){var n=this.readUint8()>0,i=this.readUint32(n),r=Math.floor((268435455&i)/1e3),e=Boolean(2147483648&i)||1===r||3===r,o=Boolean(1073741824&i)||2===r||3===r,s=Boolean(536870912&i),u=(268435455&i)%1e3,a=["XY",e?"Z":"",o?"M":""].join(""),h=s?this.readUint32(n):null;if(void 0!==t&&t!==u)throw new Error("Unexpected WKB geometry type "+u);if(this.Xy){if(this.Vy!==n)throw new Error("Inconsistent endian");if(this.$y!==a)throw new Error("Inconsistent geometry layout");if(h&&this.Zy!==h)throw new Error("Inconsistent coordinate system (SRID)")}else this.Vy=n,this.Wy=e,this.Yy=o,this.$y=a,this.Zy=h,this.Xy=!0;return u},t.prototype.readWkbPayload=function(t){switch(t){case MC:return this.readPoint();case _C:return this.readLineString();case SC:case CC:return this.readPolygon();case OC:return this.readMultiPoint();case jC:return this.readMultiLineString();case EC:case AC:case PC:return this.readMultiPolygon();case TC:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+t+" is found")}},t.prototype.readWkbBlock=function(t){return this.readWkbPayload(this.readWkbHeader(t))},t.prototype.readWkbCollection=function(t,n){for(var i=this.readUint32(),r=[],e=0;e<i;e++){var o=t.call(this,n);o&&r.push(o)}return r},t.prototype.readMultiPoint=function(){return this.readWkbCollection(this.readWkbBlock,MC)},t.prototype.readMultiLineString=function(){return this.readWkbCollection(this.readWkbBlock,_C)},t.prototype.readMultiPolygon=function(){return this.readWkbCollection(this.readWkbBlock,SC)},t.prototype.readGeometryCollection=function(){return this.readWkbCollection(this.readGeometry)},t.prototype.readGeometry=function(){var t=this.readWkbHeader(),n=this.readWkbPayload(t);switch(t){case MC:return new Se(n,this.$y);case _C:return new ng(n,this.$y);case SC:case CC:return new We(n,this.$y);case OC:return new Kw(n,this.$y);case jC:return new rg(n,this.$y);case EC:case AC:case PC:return new sg(n,this.$y);case TC:return new Dg(n);default:return null}},t.prototype.getSrid=function(){return this.Zy},t}(),IC=function(){function t(t){t=t||{},this.$y=t.layout,this.Vy=!1!==t.littleEndian,this.Ky=!1!==t.ewkb,this.Hy=[],this.Jy=A({X:0,Y:0,Z:0,M:0},t.nodata)}return t.prototype.writeUint8=function(t){this.Hy.push([1,t])},t.prototype.writeUint32=function(t){this.Hy.push([4,t])},t.prototype.writeDouble=function(t){this.Hy.push([8,t])},t.prototype.writePoint=function(t,n){for(var i=A.apply(null,n.split("").map((function(n,i){var r;return(r={})[n]=t[i],r}))),r=0,e=this.$y;r<e.length;r++){var o=e[r];this.writeDouble(o in i?i[o]:this.Jy[o])}},t.prototype.writeLineString=function(t,n){this.writeUint32(t.length);for(var i=0;i<t.length;i++)this.writePoint(t[i],n)},t.prototype.writePolygon=function(t,n){this.writeUint32(t.length);for(var i=0;i<t.length;i++)this.writeLineString(t[i],n)},t.prototype.writeWkbHeader=function(t,n){t%=1e3,this.$y.indexOf("Z")>=0&&(t+=this.Ky?2147483648:1e3),this.$y.indexOf("M")>=0&&(t+=this.Ky?1073741824:2e3),this.Ky&&Number.isInteger(n)&&(t|=536870912),this.writeUint8(this.Vy?1:0),this.writeUint32(t),this.Ky&&Number.isInteger(n)&&this.writeUint32(n)},t.prototype.writeMultiPoint=function(t,n){this.writeUint32(t.length);for(var i=0;i<t.length;i++)this.writeWkbHeader(1),this.writePoint(t[i],n)},t.prototype.writeMultiLineString=function(t,n){this.writeUint32(t.length);for(var i=0;i<t.length;i++)this.writeWkbHeader(2),this.writeLineString(t[i],n)},t.prototype.writeMultiPolygon=function(t,n){this.writeUint32(t.length);for(var i=0;i<t.length;i++)this.writeWkbHeader(3),this.writePolygon(t[i],n)},t.prototype.writeGeometryCollection=function(t){this.writeUint32(t.length);for(var n=0;n<t.length;n++)this.writeGeometry(t[n])},t.prototype.findMinimumLayout=function(t,n){void 0===n&&(n=Ct);var i,r;if(t instanceof Kr)return(i=t.getLayout())===(r=n)?i:i===Ct?r:r===Ct?i:Tt;if(t instanceof Dg)for(var e=t.getGeometriesArray(),o=0;o<e.length&&n!==Tt;o++)n=this.findMinimumLayout(e[o],n);return n},t.prototype.writeGeometry=function(t,n){var i={Point:MC,LineString:_C,Polygon:SC,MultiPoint:OC,MultiLineString:jC,MultiPolygon:EC,GeometryCollection:TC},r=t.getType(),e=i[r];if(!e)throw new Error("GeometryType "+r+" is not supported");(this.$y||(this.$y=this.findMinimumLayout(t)),this.writeWkbHeader(e,n),t instanceof Kr)?{Point:this.writePoint,LineString:this.writeLineString,Polygon:this.writePolygon,MultiPoint:this.writeMultiPoint,MultiLineString:this.writeMultiLineString,MultiPolygon:this.writeMultiPolygon}[r].call(this,t.getCoordinates(),t.getLayout()):t instanceof Dg&&this.writeGeometryCollection(t.getGeometriesArray())},t.prototype.getBuffer=function(){var t=this,n=this.Hy.reduce((function(t,n){return t+n[0]}),0),i=new ArrayBuffer(n),r=new DataView(i),e=0;return this.Hy.forEach((function(n){switch(n[0]){case 1:r.setUint8(e,n[1]);break;case 4:r.setUint32(e,n[1],t.Vy);break;case 8:r.setFloat64(e,n[1],t.Vy)}e+=n[0]})),i},t}();function NC(t){return"string"==typeof t?function(t){for(var n=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)n[i]=parseInt(t.substr(2*i,2),16);return new DataView(n.buffer)}(t):ArrayBuffer.isView(t)?t instanceof DataView?t:new DataView(t.buffer,t.byteOffset,t.byteLength):t instanceof ArrayBuffer?new DataView(t):null}var LC=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.splitCollection=Boolean(r.splitCollection),i.Qy=null,i.tm=!1!==r.hex,i.nm=!1!==r.littleEndian,i.im=!1!==r.ewkb,i.$y=r.geometryLayout,i.rm=r.nodataZ||0,i.om=r.nodataM||0,i.Zy=r.srid,i}return xC(n,t),n.prototype.getType=function(){return this.tm?"text":"arraybuffer"},n.prototype.readFeature=function(t,n){return new Et({geometry:this.readGeometry(t,n)})},n.prototype.readFeatures=function(t,n){var i=this.readGeometry(t,n);return(this.splitCollection&&i instanceof Dg?i.getGeometriesArray():[i]).map((function(t){return new Et({geometry:t})}))},n.prototype.readGeometry=function(t,n){var i=NC(t);if(!i)return null;var r=new kC(i).readGeometry();this.Qy=i;var e=this.getReadOptions(t,n);return this.Qy=null,Eg(r,!1,e)},n.prototype.readProjection=function(t){var n=this.Qy||NC(t);if(n){var i=new kC(n);return i.readWkbHeader(),i.getSrid()&&yr("EPSG:"+i.getSrid())||void 0}},n.prototype.writeFeature=function(t,n){return this.writeGeometry(t.getGeometry(),n)},n.prototype.writeFeatures=function(t,n){return this.writeGeometry(new Dg(t.map((function(t){return t.getGeometry()}))),n)},n.prototype.writeGeometry=function(t,n){var i=this.adaptOptions(n),r=new IC({layout:this.$y,littleEndian:this.nm,ewkb:this.im,nodata:{Z:this.rm,M:this.om}}),e=Number.isInteger(this.Zy)?Number(this.Zy):null;if(!1!==this.Zy&&!Number.isInteger(this.Zy)){var o=i.dataProjection&&yr(i.dataProjection);if(o){var s=o.getCode();0===s.indexOf("EPSG:")&&(e=Number(s.substring(5)))}}r.writeGeometry(Eg(t,!0,i),e);var u=r.getBuffer();return this.tm?function(t){var n=new Uint8Array(t);return Array.from(n.values()).map((function(t){return(t<16?"0":"")+Number(t).toString(16).toUpperCase()})).join("")}(u):u},n}(jg),zC=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),RC={POINT:Se,LINESTRING:ng,POLYGON:We,MULTIPOINT:Kw,MULTILINESTRING:rg,MULTIPOLYGON:sg},FC="EMPTY",GC=0,DC=1,qC=2,UC=3,BC=4,XC=5,VC=6,WC={Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION",Circle:"CIRCLE"},YC=function(){function t(t){this.wkt=t,this.sm=-1}return t.prototype.um=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.am=function(t,n){return t>="0"&&t<="9"||"."==t&&!(void 0!==n&&n)},t.prototype.hm=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.fm=function(){return this.wkt.charAt(++this.sm)},t.prototype.nextToken=function(){var t,n=this.fm(),i=this.sm,r=n;if("("==n)t=qC;else if(","==n)t=XC;else if(")"==n)t=UC;else if(this.am(n)||"-"==n)t=BC,r=this.lm();else if(this.um(n))t=DC,r=this.vm();else{if(this.hm(n))return this.nextToken();if(""!==n)throw new Error("Unexpected character: "+n);t=VC}return{position:i,value:r,type:t}},t.prototype.lm=function(){var t,n=this.sm,i=!1,r=!1;do{"."==t?i=!0:"e"!=t&&"E"!=t||(r=!0),t=this.fm()}while(this.am(t,i)||!r&&("e"==t||"E"==t)||r&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(n,this.sm--))},t.prototype.vm=function(){var t,n=this.sm;do{t=this.fm()}while(this.um(t));return this.wkt.substring(n,this.sm--).toUpperCase()},t}(),ZC=function(){function t(t){this.dm=t,this.pm={position:0,type:GC},this.$y=Tt}return t.prototype.ym=function(){this.pm=this.dm.nextToken()},t.prototype.isTokenType=function(t){return this.pm.type==t},t.prototype.match=function(t){var n=this.isTokenType(t);return n&&this.ym(),n},t.prototype.parse=function(){return this.ym(),this.wm()},t.prototype.gm=function(){var t=Tt,n=this.pm;if(this.isTokenType(DC)){var i=n.value;"Z"===i?t=At:"M"===i?t=Pt:"ZM"===i&&(t=Ct),t!==Tt&&this.ym()}return t},t.prototype.bm=function(){if(this.match(qC)){var t=[];do{t.push(this.wm())}while(this.match(XC));if(this.match(UC))return t}throw new Error(this.xm())},t.prototype.Mm=function(){if(this.match(qC)){var t=this._m();if(this.match(UC))return t}throw new Error(this.xm())},t.prototype.Sm=function(){if(this.match(qC)){var t=this.Om();if(this.match(UC))return t}throw new Error(this.xm())},t.prototype.jm=function(){if(this.match(qC)){var t=this.Em();if(this.match(UC))return t}throw new Error(this.xm())},t.prototype.Tm=function(){if(this.match(qC)){var t=void 0;if(t=this.pm.type==qC?this.Am():this.Om(),this.match(UC))return t}throw new Error(this.xm())},t.prototype.Pm=function(){if(this.match(qC)){var t=this.Em();if(this.match(UC))return t}throw new Error(this.xm())},t.prototype.Cm=function(){if(this.match(qC)){var t=this.km();if(this.match(UC))return t}throw new Error(this.xm())},t.prototype._m=function(){for(var t=[],n=this.$y.length,i=0;i<n;++i){var r=this.pm;if(!this.match(BC))break;t.push(r.value)}if(t.length==n)return t;throw new Error(this.xm())},t.prototype.Om=function(){for(var t=[this._m()];this.match(XC);)t.push(this._m());return t},t.prototype.Am=function(){for(var t=[this.Mm()];this.match(XC);)t.push(this.Mm());return t},t.prototype.Em=function(){for(var t=[this.Sm()];this.match(XC);)t.push(this.Sm());return t},t.prototype.km=function(){for(var t=[this.jm()];this.match(XC);)t.push(this.jm());return t},t.prototype.Im=function(){var t=this.isTokenType(DC)&&this.pm.value==FC;return t&&this.ym(),t},t.prototype.xm=function(){return"Unexpected `"+this.pm.value+"` at position "+this.pm.position+" in `"+this.dm.wkt+"`"},t.prototype.wm=function(){var t=this.pm;if(this.match(DC)){var n=t.value;this.$y=this.gm();var i=this.Im();if("GEOMETRYCOLLECTION"==n){if(i)return new Dg([]);var r=this.bm();return new Dg(r)}var e=RC[n];if(!e)throw new Error("Invalid geometry type: "+n);var o=void 0;if(i)o="POINT"==n?[NaN,NaN]:[];else switch(n){case"POINT":o=this.Mm();break;case"LINESTRING":o=this.Sm();break;case"POLYGON":o=this.jm();break;case"MULTIPOINT":o=this.Tm();break;case"MULTILINESTRING":o=this.Pm();break;case"MULTIPOLYGON":o=this.Cm()}return new e(o,this.$y)}throw new Error(this.xm())},t}(),$C=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Nm=void 0!==r.splitCollection&&r.splitCollection,i}return zC(n,t),n.prototype.Lm=function(t){var n=new YC(t);return new ZC(n).parse()},n.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n),r=new Et;return r.setGeometry(i),r},n.prototype.readFeaturesFromText=function(t,n){for(var i=[],r=this.readGeometryFromText(t,n),e=[],o=0,s=(i=this.Nm&&"GeometryCollection"==r.getType()?r.getGeometriesArray():[r]).length;o<s;++o){var u=new Et;u.setGeometry(i[o]),e.push(u)}return e},n.prototype.readGeometryFromText=function(t,n){return Eg(this.Lm(t),!1,n)},n.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):""},n.prototype.writeFeaturesText=function(t,n){if(1==t.length)return this.writeFeatureText(t[0],n);for(var i=[],r=0,e=t.length;r<e;++r)i.push(t[r].getGeometry());var o=new Dg(i);return this.writeGeometryText(o,n)},n.prototype.writeGeometryText=function(t,n){return tk(Eg(t,!0,n))},n}(Cj);function KC(t){var n=t.getCoordinates();return 0===n.length?"":n.join(" ")}function HC(t){for(var n=t.getCoordinates(),i=[],r=0,e=n.length;r<e;++r)i.push(n[r].join(" "));return i.join(",")}function JC(t){for(var n=[],i=t.getLinearRings(),r=0,e=i.length;r<e;++r)n.push("("+HC(i[r])+")");return n.join(",")}var QC={Point:KC,LineString:HC,Polygon:JC,MultiPoint:function(t){for(var n=[],i=t.getPoints(),r=0,e=i.length;r<e;++r)n.push("("+KC(i[r])+")");return n.join(",")},MultiLineString:function(t){for(var n=[],i=t.getLineStrings(),r=0,e=i.length;r<e;++r)n.push("("+HC(i[r])+")");return n.join(",")},MultiPolygon:function(t){for(var n=[],i=t.getPolygons(),r=0,e=i.length;r<e;++r)n.push("("+JC(i[r])+")");return n.join(",")},GeometryCollection:function(t){for(var n=[],i=t.getGeometries(),r=0,e=i.length;r<e;++r)n.push(tk(i[r]));return n.join(",")}};function tk(t){var n=t.getType(),i=(0,QC[n])(t),r=WC[n];if("function"==typeof t.getFlatCoordinates){var e=function(t){var n=t.getLayout(),i="";return n!==At&&n!==Ct||(i+="Z"),n!==Pt&&n!==Ct||(i+="M"),i}(t);e.length>0&&(r+=" "+e)}return 0===i.length?r+" "+FC:r+"("+i+")"}var nk=$C,ik=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rk=[null,"http://www.opengis.net/wms"],ek=sc(rk,{Service:tc((function(t,n){return ac({},uk,t,n)})),Capability:tc((function(t,n){return ac({},ok,t,n)}))}),ok=sc(rk,{Request:tc((function(t,n){return ac({},pk,t,n)})),Exception:tc((function(t,n){return ac([],ck,t,n)})),Layer:tc((function(t,n){var i=ac({},lk,t,n);if(void 0===i.Layer)return Object.assign(i,Mk(t,n));return i}))}),sk=function(t){function n(){var n=t.call(this)||this;return n.version=void 0,n}return ik(n,t),n.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var n=ac({version:this.version},ek,t,[]);return n||null},n}(VT),uk=sc(rk,{Name:tc(xO),Title:tc(xO),Abstract:tc(xO),KeywordList:tc(jk),OnlineResource:tc(WT),ContactInformation:tc((function(t,n){return ac({},ak,t,n)})),Fees:tc(xO),AccessConstraints:tc(xO),LayerLimit:tc(gO),MaxWidth:tc(gO),MaxHeight:tc(gO)}),ak=sc(rk,{ContactPersonPrimary:tc((function(t,n){return ac({},hk,t,n)})),ContactPosition:tc(xO),ContactAddress:tc((function(t,n){return ac({},fk,t,n)})),ContactVoiceTelephone:tc(xO),ContactFacsimileTelephone:tc(xO),ContactElectronicMailAddress:tc(xO)}),hk=sc(rk,{ContactPerson:tc(xO),ContactOrganization:tc(xO)}),fk=sc(rk,{AddressType:tc(xO),Address:tc(xO),City:tc(xO),StateOrProvince:tc(xO),PostCode:tc(xO),Country:tc(xO)}),ck=sc(rk,{Format:Hf(xO)}),lk=sc(rk,{Name:tc(xO),Title:tc(xO),Abstract:tc(xO),KeywordList:tc(jk),CRS:Qf(xO),EX_GeographicBoundingBox:tc((function(t,n){var i=ac({},dk,t,n);if(!i)return;var r=i.westBoundLongitude,e=i.southBoundLatitude,o=i.eastBoundLongitude,s=i.northBoundLatitude;if(void 0===r||void 0===e||void 0===o||void 0===s)return;return[r,e,o,s]})),BoundingBox:Qf((function(t,n){var i=[wO(t.getAttribute("minx")),wO(t.getAttribute("miny")),wO(t.getAttribute("maxx")),wO(t.getAttribute("maxy"))],r=[wO(t.getAttribute("resx")),wO(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:i,res:r}})),Dimension:Qf((function(t,n){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:pO(t.getAttribute("multipleValues")),nearestValue:pO(t.getAttribute("nearestValue")),current:pO(t.getAttribute("current")),values:xO(t)}})),Attribution:tc((function(t,n){return ac({},vk,t,n)})),AuthorityURL:Qf((function(t,n){var i=_k(t,n);if(i)return i.name=t.getAttribute("name"),i;return})),Identifier:Qf(xO),MetadataURL:Qf((function(t,n){var i=_k(t,n);if(i)return i.type=t.getAttribute("type"),i;return})),DataURL:Qf(_k),FeatureListURL:Qf(_k),Style:Qf((function(t,n){return ac({},gk,t,n)})),MinScaleDenominator:tc(mO),MaxScaleDenominator:tc(mO),Layer:Qf(Mk)}),vk=sc(rk,{Title:tc(xO),OnlineResource:tc(WT),LogoURL:tc(Ok)}),dk=sc(rk,{westBoundLongitude:tc(mO),eastBoundLongitude:tc(mO),southBoundLatitude:tc(mO),northBoundLatitude:tc(mO)}),pk=sc(rk,{GetCapabilities:tc(Sk),GetMap:tc(Sk),GetFeatureInfo:tc(Sk)}),yk=sc(rk,{Format:Qf(xO),DCPType:Qf((function(t,n){return ac({},mk,t,n)}))}),mk=sc(rk,{HTTP:tc((function(t,n){return ac({},wk,t,n)}))}),wk=sc(rk,{Get:tc(_k),Post:tc(_k)}),gk=sc(rk,{Name:tc(xO),Title:tc(xO),Abstract:tc(xO),LegendURL:Qf(Ok),StyleSheetURL:tc(_k),StyleURL:tc(_k)}),bk=sc(rk,{Format:tc(xO),OnlineResource:tc(WT)}),xk=sc(rk,{Keyword:Hf(xO)});function Mk(t,n){var i=n[n.length-1],r=ac({},lk,t,n);if(r){var e=pO(t.getAttribute("queryable"));void 0===e&&(e=i.queryable),r.queryable=void 0!==e&&e;var o=bO(t.getAttribute("cascaded"));void 0===o&&(o=i.cascaded),r.cascaded=o;var s=pO(t.getAttribute("opaque"));void 0===s&&(s=i.opaque),r.opaque=void 0!==s&&s;var u=pO(t.getAttribute("noSubsets"));void 0===u&&(u=i.noSubsets),r.noSubsets=void 0!==u&&u;var a=wO(t.getAttribute("fixedWidth"));a||(a=i.fixedWidth),r.fixedWidth=a;var h=wO(t.getAttribute("fixedHeight"));h||(h=i.fixedHeight),r.fixedHeight=h;["Style","CRS","AuthorityURL"].forEach((function(t){if(t in i){var n=r[t]||[];r[t]=n.concat(i[t])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(t){if(!(t in r)){var n=i[t];r[t]=n}})),r}}function _k(t,n){return ac({},bk,t,n)}function Sk(t,n){return ac({},yk,t,n)}function Ok(t,n){var i=_k(t,n);if(i){var r=[bO(t.getAttribute("width")),bO(t.getAttribute("height"))];return i.size=r,i}}function jk(t,n){return ac([],xk,t,n)}var Ek=sk,Tk=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ak=function(t){function n(n){var i=t.call(this)||this,r=n||{};return i.Gy="http://mapserver.gis.umn.edu/mapserver",i.Dy=new CO,i.Uh=r.layers?r.layers:null,i}return Tk(n,t),n.prototype.getLayers=function(){return this.Uh},n.prototype.setLayers=function(t){this.Uh=t},n.prototype.zm=function(t,n){t.setAttribute("namespaceURI",this.Gy);var i=t.localName,r=[];if(0===t.childNodes.length)return r;if("msGMLOutput"==i)for(var e=0,o=t.childNodes.length;e<o;e++){var s=t.childNodes[e];if(s.nodeType===Node.ELEMENT_NODE){var u=s,a=n[0],h=u.localName.replace("_layer","");if(!this.Uh||y(this.Uh,h)){var f=h+"_feature";a.featureType=f,a.featureNS=this.Gy;var c={};c[f]=Hf(this.Dy.readFeatureElement,this.Dy);var l=sc([a.featureNS,null],c);u.setAttribute("namespaceURI",this.Gy);var v=ac([],l,u,n,this.Dy);v&&g(r,v)}}}if("FeatureCollection"==i){var d=ac([],this.Dy.FEATURE_COLLECTION_PARSERS,t,[{}],this.Dy);d&&(r=d)}return r},n.prototype.readFeaturesFromNode=function(t,n){var i={};return n&&A(i,this.getReadOptions(t,n)),this.zm(t,[i])},n}(aO),Pk=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ck=[null,"http://www.opengis.net/wmts/1.0"],kk=[null,"http://www.opengis.net/ows/1.1"],Ik=sc(Ck,{Contents:tc((function(t,n){return ac({},Lk,t,n)}))}),Nk=function(t){function n(){var n=t.call(this)||this;return n.Rm=new fA,n}return Pk(n,t),n.prototype.readFromNode=function(t){var n=t.getAttribute("version");n&&(n=n.trim());var i=this.Rm.readFromNode(t);return i?(i.version=n,(i=ac(i,Ik,t,[]))||null):null},n}(VT),Lk=sc(Ck,{Layer:Qf((function(t,n){return ac({},zk,t,n)})),TileMatrixSet:Qf((function(t,n){return ac({},Bk,t,n)}))}),zk=sc(Ck,{Style:Qf((function(t,n){var i=ac({},Rk,t,n);if(!i)return;var r="true"===t.getAttribute("isDefault");return i.isDefault=r,i})),Format:Qf(xO),TileMatrixSetLink:Qf((function(t,n){return ac({},Fk,t,n)})),Dimension:Qf((function(t,n){return ac({},qk,t,n)})),ResourceURL:Qf((function(t,n){var i=t.getAttribute("format"),r=t.getAttribute("template"),e=t.getAttribute("resourceType"),o={};i&&(o.format=i);r&&(o.template=r);e&&(o.resourceType=e);return o}))},sc(kk,{Title:tc(xO),Abstract:tc(xO),WGS84BoundingBox:tc(Vk),Identifier:tc(xO)})),Rk=sc(Ck,{LegendURL:Qf((function(t,n){var i={};return i.format=t.getAttribute("format"),i.href=WT(t),i}))},sc(kk,{Title:tc(xO),Identifier:tc(xO)})),Fk=sc(Ck,{TileMatrixSet:tc(xO),TileMatrixSetLimits:tc((function(t,n){return ac([],Gk,t,n)}))}),Gk=sc(Ck,{TileMatrixLimits:Hf((function(t,n){return ac({},Dk,t,n)}))}),Dk=sc(Ck,{TileMatrix:tc(xO),MinTileRow:tc(gO),MaxTileRow:tc(gO),MinTileCol:tc(gO),MaxTileCol:tc(gO)}),qk=sc(Ck,{Default:tc(xO),Value:Qf(xO)},sc(kk,{Identifier:tc(xO)})),Uk=sc(kk,{LowerCorner:Hf(Wk),UpperCorner:Hf(Wk)}),Bk=sc(Ck,{WellKnownScaleSet:tc(xO),TileMatrix:Qf((function(t,n){return ac({},Xk,t,n)}))},sc(kk,{SupportedCRS:tc(xO),Identifier:tc(xO),BoundingBox:tc(Vk)})),Xk=sc(Ck,{TopLeftCorner:tc(Wk),ScaleDenominator:tc(mO),TileWidth:tc(gO),TileHeight:tc(gO),MatrixWidth:tc(gO),MatrixHeight:tc(gO)},sc(kk,{Identifier:tc(xO)}));function Vk(t,n){var i=ac([],Uk,t,n);if(2==i.length)return yn(i)}function Wk(t,n){var i=xO(t).split(/\s+/);if(i&&2==i.length){var r=+i[0],e=+i[1];if(!isNaN(r)&&!isNaN(e))return[r,e]}}var Yk=Nk,Zk=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$k=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],Kk="enterfullscreen",Hk="leavefullscreen";function Jk(t){var n=t.body;return!!(n.webkitRequestFullscreen||n.msRequestFullscreen&&t.msFullscreenEnabled||n.requestFullscreen&&t.fullscreenEnabled)}function Qk(t){return!!(t.webkitIsFullScreen||t.msFullscreenElement||t.fullscreenElement)}function tI(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}var nI=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),target:r.target})||this).on,i.once,i.un,i.nf=void 0!==r.keys&&r.keys,i._v=r.source,i.Fm=!1,i.Gm=i.Dm.bind(i),i.qm=void 0!==r.className?r.className:"ol-full-screen",i.Um=[],i.Bm=void 0!==r.activeClassName?r.activeClassName.split(" "):[i.qm+"-true"],i.Xm=void 0!==r.inactiveClassName?r.inactiveClassName.split(" "):[i.qm+"-false"];var e=void 0!==r.label?r.label:"⤢";i.Vm="string"==typeof e?document.createTextNode(e):e;var o=void 0!==r.labelActive?r.labelActive:"×";i.Wm="string"==typeof o?document.createTextNode(o):o;var s=r.tipLabel?r.tipLabel:"Toggle full-screen";return i.Ym=document.createElement("button"),i.Ym.title=s,i.Ym.setAttribute("type","button"),i.Ym.appendChild(i.Vm),i.Ym.addEventListener(F,i.kr.bind(i),!1),i.Zm(i.Ym,i.Fm),i.element.className="".concat(i.qm," ").concat(bs," ").concat(Ms),i.element.appendChild(i.Ym),i}return Zk(n,t),n.prototype.kr=function(t){t.preventDefault(),this.$m()},n.prototype.$m=function(){var t=this.getMap();if(t){var n=t.getOwnerDocument();if(Jk(n))if(Qk(n))!function(t){t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(n);else{var i=void 0;i=this._v?"string"==typeof this._v?n.getElementById(this._v):this._v:t.getTargetElement(),this.nf?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():tI(t)}(i):tI(i)}}},n.prototype.Km=function(){var t=this.getMap();if(t){var n=this.Fm;this.Fm=Qk(t.getOwnerDocument()),n!==this.Fm&&(this.Zm(this.Ym,this.Fm),this.Fm?(Eo(this.Wm,this.Vm),this.dispatchEvent(Kk)):(Eo(this.Vm,this.Wm),this.dispatchEvent(Hk)),t.updateSize())}},n.prototype.Zm=function(t,n){var i,r,e,o;n?((i=t.classList).remove.apply(i,this.Xm),(r=t.classList).add.apply(r,this.Bm)):((e=t.classList).remove.apply(e,this.Bm),(o=t.classList).add.apply(o,this.Xm))},n.prototype.setMap=function(n){var i=this.getMap();i&&i.removeChangeListener(bu,this.Gm),t.prototype.setMap.call(this,n),this.Dm(),n&&n.addChangeListener(bu,this.Gm)},n.prototype.Dm=function(){for(var t=this.Um,n=0,i=t.length;n<i;++n)H(t[n]);t.length=0;var r=this.getMap();if(r){var e=r.getOwnerDocument();Jk(e)?this.element.classList.remove(xs):this.element.classList.add(xs);for(n=0,i=$k.length;n<i;++n)t.push($(e,$k[n],this.Km,this));this.Km()}},n}(oa),iI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rI="projection",eI="coordinateFormat",oI=function(t){function n(n){var i=this,r=n||{},e=document.createElement("div");e.className=void 0!==r.className?r.className:"ol-mouse-position",(i=t.call(this,{element:e,render:r.render,target:r.target})||this).on,i.once,i.un,i.addChangeListener(rI,i.Tt),r.coordinateFormat&&i.setCoordinateFormat(r.coordinateFormat),r.projection&&i.setProjection(r.projection);var o=!0,s="&#160;";return"undefinedHTML"in r?(void 0!==r.undefinedHTML&&(s=r.undefinedHTML),o=!!s):"placeholder"in r&&(!1===r.placeholder?o=!1:s=String(r.placeholder)),i.Hm=s,i.Jm=o,i.Qm=e.innerHTML,i.tw=null,i.jt=null,i}return iI(n,t),n.prototype.Tt=function(){this.jt=null},n.prototype.getCoordinateFormat=function(){return this.get(eI)},n.prototype.getProjection=function(){return this.get(rI)},n.prototype.handleMouseMove=function(t){var n=this.getMap();this.nw(n.getEventPixel(t))},n.prototype.handleMouseOut=function(t){this.nw(null)},n.prototype.setMap=function(n){if(t.prototype.setMap.call(this,n),n){var i=n.getViewport();this.listenerKeys.push($(i,uu,this.handleMouseMove,this)),this.Jm&&this.listenerKeys.push($(i,fu,this.handleMouseOut,this)),this.nw(null)}},n.prototype.setCoordinateFormat=function(t){this.set(eI,t)},n.prototype.setProjection=function(t){this.set(rI,yr(t))},n.prototype.nw=function(t){var n=this.Hm;if(t&&this.tw){if(!this.jt){var i=this.getProjection();this.jt=i?Or(this.tw,i):vr}var r=this.getMap().getCoordinateFromPixelInternal(t);if(r){var e=Cr();e&&(this.jt=Or(this.tw,e)),this.jt(r,r);var o=this.getCoordinateFormat();n=o?o(r):r.toString()}}this.Qm&&n===this.Qm||(this.element.innerHTML=n,this.Qm=n)},n.prototype.render=function(t){var n=t.frameState;n?this.tw!=n.viewState.projection&&(this.tw=n.viewState.projection,this.jt=null):this.tw=null},n}(oa),sI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uI=.75,aI=.1,hI=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return sI(n,t),n.prototype.createRenderer=function(){return new Hs(this)},n}(ra),fI=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).iw=i.rw.bind(i),i.Sr=void 0===r.collapsed||r.collapsed,i.Tr=void 0===r.collapsible||r.collapsible,i.Tr||(i.Sr=!1),i.su=void 0!==r.rotateWithView&&r.rotateWithView,i.ew=void 0;var e=void 0!==r.className?r.className:"ol-overviewmap",o=void 0!==r.tipLabel?r.tipLabel:"Overview map",s=void 0!==r.collapseLabel?r.collapseLabel:"‹";"string"==typeof s?(i.Ar=document.createElement("span"),i.Ar.textContent=s):i.Ar=s;var u=void 0!==r.label?r.label:"›";"string"==typeof u?(i.Pr=document.createElement("span"),i.Pr.textContent=u):i.Pr=u;var a=i.Tr&&!i.Sr?i.Ar:i.Pr,h=document.createElement("button");h.setAttribute("type","button"),h.title=o,h.appendChild(a),h.addEventListener(F,i.kr.bind(i),!1),i.ow=document.createElement("div"),i.ow.className="ol-overviewmap-map",i.Uy=r.view,i.sw=new hI({view:r.view});var f=i.sw;r.layers&&r.layers.forEach((function(t){f.addLayer(t)}));var c=document.createElement("div");c.className="ol-overviewmap-box",c.style.boxSizing="border-box",i.uw=new _h({position:[0,0],positioning:"center-center",element:c}),i.sw.addOverlay(i.uw);var l=e+" "+"ol-unselectable "+Ms+(i.Sr&&i.Tr?" ol-collapsed":"")+(i.Tr?"":" ol-uncollapsible"),v=i.element;v.className=l,v.appendChild(i.ow),v.appendChild(h);var d=i,p=i.uw,y=i.uw.getElement(),m=function(t){var n,i={clientX:(n=t).clientX,clientY:n.clientY},r=f.getEventCoordinateInternal(i);p.setPosition(r)},w=function(t){var n=f.getEventCoordinateInternal(t);d.getMap().getView().setCenterInternal(n),window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",w)};return y.addEventListener("mousedown",(function(){window.addEventListener("mousemove",m),window.addEventListener("mouseup",w)})),i}return sI(n,t),n.prototype.setMap=function(n){var i=this.getMap();if(n!==i){if(i){var r=i.getView();r&&this.aw(r),this.sw.setTarget(null)}if(t.prototype.setMap.call(this,n),n){this.sw.setTarget(this.ow),this.listenerKeys.push($(n,l,this.hw,this));var e=n.getView();e&&(this.fw(e),e.isDef()&&(this.sw.updateSize(),this.cw())),this.sw.isRendered()||this.lw()}}},n.prototype.hw=function(t){if(t.key===xu){var n=t.oldValue;n&&this.aw(n);var i=this.getMap().getView();this.fw(i)}else this.sw.isRendered()||t.key!==bu&&t.key!==gu||this.sw.updateSize()},n.prototype.fw=function(t){if(!this.Uy){var n=new $u({projection:t.getProjection()});this.sw.setView(n)}t.addChangeListener(Au.ROTATION,this.iw),this.rw()},n.prototype.aw=function(t){t.removeChangeListener(Au.ROTATION,this.iw)},n.prototype.rw=function(){this.su&&this.sw.getView().setRotation(this.getMap().getView().getRotation())},n.prototype.dw=function(){var t=this.getMap(),n=this.sw;if(t.isRendered()&&n.isRendered()){var i=t.getSize(),r=t.getView().calculateExtentInternal(i);if(!this.ew||!An(r,this.ew)){this.ew=r;var e=n.getSize(),o=n.getView().calculateExtentInternal(e),s=n.getPixelFromCoordinateInternal(Yn(r)),u=n.getPixelFromCoordinateInternal(Dn(r)),a=Math.abs(s[0]-u[0]),h=Math.abs(s[1]-u[1]),f=e[0],c=e[1];a<f*aI||h<c*aI||a>f*uI||h>c*uI?this.cw():xn(o,r)||this.pw()}}},n.prototype.cw=function(){var t=this.getMap(),n=this.sw,i=t.getSize(),r=t.getView().calculateExtentInternal(i),e=n.getView(),o=Math.log(7.5)/Math.LN2;Qn(r,1/(Math.pow(2,o/2)*aI)),e.fitInternal(Ze(r))},n.prototype.pw=function(){var t=this.getMap(),n=this.sw,i=t.getView();n.getView().setCenterInternal(i.getCenterInternal())},n.prototype.yw=function(){var t=this.getMap(),n=this.sw;if(t.isRendered()&&n.isRendered()){var i=t.getSize(),r=t.getView(),e=n.getView(),o=this.su?0:-r.getRotation(),s=this.uw,u=this.uw.getElement(),a=r.getCenterInternal(),h=r.getResolution(),f=e.getResolution(),c=i[0]*h/f,l=i[1]*h/f;if(s.setPosition(a),u){u.style.width=c+"px",u.style.height=l+"px";var v="rotate("+o+"rad)";u.style.transform=v}}},n.prototype.lw=function(){this.mw||(this.mw=K(this.sw,vu,(function(t){delete this.mw,this.yw()}),this))},n.prototype.kr=function(t){t.preventDefault(),this.zr()},n.prototype.zr=function(){this.element.classList.toggle(_s),this.Sr?Eo(this.Ar,this.Pr):Eo(this.Pr,this.Ar),this.Sr=!this.Sr;var t=this.sw;if(!this.Sr){if(t.isRendered())return this.ew=void 0,void t.render();t.updateSize(),this.cw(),this.lw()}},n.prototype.getCollapsible=function(){return this.Tr},n.prototype.setCollapsible=function(t){this.Tr!==t&&(this.Tr=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.Sr&&this.zr())},n.prototype.setCollapsed=function(t){this.Tr&&this.Sr!==t&&this.zr()},n.prototype.getCollapsed=function(){return this.Sr},n.prototype.getRotateWithView=function(){return this.su},n.prototype.setRotateWithView=function(t){this.su!==t&&(this.su=t,0!==this.getMap().getView().getRotation()&&(this.su?this.rw():this.sw.getView().setRotation(0),this.ew=void 0,this.dw(),this.yw()))},n.prototype.getOverviewMap=function(){return this.sw},n.prototype.render=function(t){this.dw(),this.yw()},n}(oa),cI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lI="units",vI="degrees",dI="imperial",pI="nautical",yI="metric",mI="us",wI=[1,2,5],gI=25.4/.28,bI=function(t){function n(n){var i=this,r=n||{},e=void 0!==r.className?r.className:r.bar?"ol-scale-bar":"ol-scale-line";return(i=t.call(this,{element:document.createElement("div"),render:r.render,target:r.target})||this).on,i.once,i.un,i.ww=document.createElement("div"),i.ww.className=e+"-inner",i.element.className=e+" "+bs,i.element.appendChild(i.ww),i.gw=null,i.bw=void 0!==r.minWidth?r.minWidth:64,i.xw=r.maxWidth,i.mn=!1,i.Mw=void 0,i.Qm="",i.addChangeListener(lI,i._w),i.setUnits(r.units||yI),i.Sw=r.bar||!1,i.Ow=r.steps||4,i.jw=r.text||!1,i.Ew=r.dpi||void 0,i}return cI(n,t),n.prototype.getUnits=function(){return this.get(lI)},n.prototype._w=function(){this.Lr()},n.prototype.setUnits=function(t){this.set(lI,t)},n.prototype.setDpi=function(t){this.Ew=t},n.prototype.Lr=function(){var t=this.gw;if(t){var n=t.center,i=t.projection,r=this.getUnits(),e=r==vI?Rt.DEGREES:Rt.METERS,o=mr(i,t.resolution,n,e),s=this.bw*(this.Ew||gI)/gI,u=void 0!==this.xw?this.xw*(this.Ew||gI)/gI:void 0,a=s*o,h="";if(r==vI){var f=Lt[Rt.DEGREES];(a*=f)<f/60?(h="″",o*=3600):a<f?(h="′",o*=60):h="°"}else r==dI?a<.9144?(h="in",o/=.0254):a<1609.344?(h="ft",o/=.3048):(h="mi",o/=1609.344):r==pI?(o/=1852,h="NM"):r==yI?a<.001?(h="μm",o*=1e6):a<1?(h="mm",o*=1e3):a<1e3?h="m":(h="km",o/=1e3):r==mI?a<.9144?(h="in",o*=39.37):a<1609.344?(h="ft",o/=.30480061):(h="mi",o/=1609.3472):St(!1,33);for(var c,l,v,d,p,y,m,w=3*Math.floor(Math.log(s*o)/Math.log(10));;){v=Math.floor(w/3);var g=Math.pow(10,v);if(c=wI[(w%3+3)%3]*g,l=Math.round(c/o),isNaN(l))return this.element.style.display="none",void(this.mn=!1);if(void 0!==u&&l>=u){c=d,l=p,v=y;break}if(l>=s)break;d=c,p=l,y=v,++w}m=this.Sw?this.createScaleBar(l,c,h):c.toFixed(v<0?-v:0)+" "+h,this.Qm!=m&&(this.ww.innerHTML=m,this.Qm=m),this.Mw!=l&&(this.ww.style.width=l+"px",this.Mw=l),this.mn||(this.element.style.display="",this.mn=!0)}else this.mn&&(this.element.style.display="none",this.mn=!1)},n.prototype.createScaleBar=function(t,n,i){for(var r="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),e=[],o=t/this.Ow,s="ol-scale-singlebar-odd",u=0;u<this.Ow;u++)0===u&&e.push(this.createMarker("absolute",u)),e.push('<div><div class="ol-scale-singlebar '+s+'" style="width: '+o+'px;"></div>'+this.createMarker("relative",u)+(u%2==0||2===this.Ow?this.createStepText(u,t,!1,n,i):"")+"</div>"),u===this.Ow-1&&e.push(this.createStepText(u+1,t,!0,n,i)),s="ol-scale-singlebar-odd"===s?"ol-scale-singlebar-even":"ol-scale-singlebar-odd";return'<div style="display: flex;">'+(this.jw?'<div class="ol-scale-text" style="width: '+t+'px;">'+r+"</div>":"")+e.join("")+"</div>"},n.prototype.createMarker=function(t,n){return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+("absolute"===t?3:-10)+'px;"></div>'},n.prototype.createStepText=function(t,n,i,r,e){var o=(0===t?0:Math.round(r/this.Ow*t*100)/100)+(0===t?"":" "+e);return'<div class="ol-scale-step-text" style="margin-left: '+(0===t?-3:n/this.Ow*-1)+"px;text-align: "+(0===t?"left":"center")+"; min-width: "+(0===t?0:n/this.Ow*2)+"px;left: "+(i?n+"px":"unset")+';">'+o+"</div>"},n.prototype.getScaleForResolution=function(){var t=mr(this.gw.projection,this.gw.resolution,this.gw.center,Rt.METERS),n=this.Ew||gI;return parseFloat(t.toString())*(1e3/25.4)*n},n.prototype.render=function(t){var n=t.frameState;this.gw=n?n.viewState:null,this.Lr()},n}(oa),xI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),MI=0,_I=1,SI=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),render:r.render})||this).kn=[],i.Tw=void 0,i.Aw=MI,i.Cn,i.Pw=0,i.Cw=0,i.kw,i.Iw,i.Nw=null,i.Lw=!1,i.Fr=void 0!==r.duration?r.duration:200;var e=void 0!==r.className?r.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=e+"-thumb "+bs;var s=i.element;return s.className=e+" "+"ol-unselectable "+Ms,s.appendChild(o),s.addEventListener(au,i.zw.bind(i),!1),s.addEventListener(uu,i.Rw.bind(i),!1),s.addEventListener(hu,i.Fw.bind(i),!1),s.addEventListener(F,i.Gw.bind(i),!1),o.addEventListener(F,f,!1),i}return xI(n,t),n.prototype.setMap=function(n){t.prototype.setMap.call(this,n),n&&n.render()},n.prototype.Dw=function(){var t=this.element,n=t.offsetWidth,i=t.offsetHeight;if(0===n&&0===i)return this.Lw=!1;var r=getComputedStyle(t);n-=parseFloat(r.paddingRight)+parseFloat(r.paddingLeft),i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);var e=t.firstElementChild,o=getComputedStyle(e),s=e.offsetWidth+parseFloat(o.marginRight)+parseFloat(o.marginLeft),u=e.offsetHeight+parseFloat(o.marginTop)+parseFloat(o.marginBottom);return this.Nw=[s,u],n>i?(this.Aw=_I,this.Cw=n-s):(this.Aw=MI,this.Pw=i-u),this.Lw=!0},n.prototype.Gw=function(t){var n=this.getMap().getView(),i=this.qw(t.offsetX-this.Nw[0]/2,t.offsetY-this.Nw[1]/2),r=this.Uw(i),e=n.getConstrainedZoom(n.getZoomForResolution(r));n.animateInternal({zoom:e,duration:this.Fr,easing:mt})},n.prototype.zw=function(t){if(!this.Cn&&t.target===this.element.firstElementChild){var n=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.kw=t.clientX-parseFloat(n.style.left),this.Iw=t.clientY-parseFloat(n.style.top),this.Cn=!0,0===this.kn.length){var i=this.Rw,r=this.Fw,e=this.getMap().getOwnerDocument();this.kn.push($(e,uu,i,this),$(e,hu,r,this))}}},n.prototype.Rw=function(t){if(this.Cn){var n=t.clientX-this.kw,i=t.clientY-this.Iw,r=this.qw(n,i);this.Tw=this.Uw(r),this.getMap().getView().setResolution(this.Tw)}},n.prototype.Fw=function(t){this.Cn&&(this.getMap().getView().endInteraction(),this.Cn=!1,this.kw=void 0,this.Iw=void 0,this.kn.forEach(H),this.kn.length=0)},n.prototype.Bw=function(t){var n=this.Xw(t),i=this.element.firstElementChild;this.Aw==_I?i.style.left=this.Cw*n+"px":i.style.top=this.Pw*n+"px"},n.prototype.qw=function(t,n){return oi(this.Aw===_I?t/this.Cw:n/this.Pw,0,1)},n.prototype.Uw=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},n.prototype.Xw=function(t){return oi(1-this.getMap().getView().getValueForResolutionFunction()(t),0,1)},n.prototype.render=function(t){if(t.frameState&&(this.Lw||this.Dw())){var n=t.frameState.viewState.resolution;this.Tw=n,this.Bw(n)}},n}(oa),OI=function(){var t=function(n,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(n,i)};return function(n,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=n}t(n,i),n.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jI=function(t){function n(n){var i=this,r=n||{};(i=t.call(this,{element:document.createElement("div"),target:r.target})||this).extent=r.extent?r.extent:null;var e=void 0!==r.className?r.className:"ol-zoom-extent",o=void 0!==r.label?r.label:"E",s=void 0!==r.tipLabel?r.tipLabel:"Fit to extent",u=document.createElement("button");u.setAttribute("type","button"),u.title=s,u.appendChild("string"==typeof o?document.createTextNode(o):o),u.addEventListener(F,i.kr.bind(i),!1);var a=e+" "+"ol-unselectable "+Ms,h=i.element;return h.className=a,h.appendChild(u),i}return OI(n,t),n.prototype.kr=function(t){t.preventDefault(),this.handleZoomToExtent()},n.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),n=this.extent?this.extent:t.getProjection().getExtent();t.fitInternal(Ze(n))},n}(oa),EI={};EI.AssertionError=h,EI.Collection=ft,EI.Collection.CollectionEvent=ht,EI.DataTile=_t,EI.Disposable=v,EI.Feature=Et,EI.Feature.createStyleFunction=jt,EI.Geolocation=ho,EI.Image=bo,EI.Image.listenImage=go,EI.ImageBase=co,EI.ImageCanvas=Mo,EI.ImageTile=ko,EI.Kinetic=Io,EI.Map=yh,EI.MapBrowserEvent=ou,EI.MapBrowserEventHandler=lu,EI.MapEvent=ru,EI.Object=et,EI.Object.ObjectEvent=rt,EI.Observable=nt,EI.Observable.unByKey=tt,EI.Overlay=_h,EI.PluggableMap=ra,EI.Tile=xt,EI.TileCache=Ih,EI.TileQueue=Ou,EI.TileQueue.getTilePriority=ju,EI.TileRange=zh,EI.TileRange.createOrUpdate=Lh,EI.VectorRenderTile=Gh,EI.VectorTile=qh,EI.View=$u,EI.View.createCenterConstraint=Xu,EI.View.createResolutionConstraint=Vu,EI.View.createRotationConstraint=Wu,EI.View.isNoopAnimation=Yu,EI.array={},EI.array.binarySearch=d,EI.array.equals=x,EI.array.extend=g,EI.array.find=b,EI.array.findIndex=M,EI.array.includes=y,EI.array.isSorted=_,EI.array.linearFindNearest=m,EI.array.numberSafeCompareFunction=p,EI.array.remove=function(t,n){var i=t.indexOf(n),r=i>-1;return r&&t.splice(i,1),r},EI.array.reverseSubArray=w,EI.array.stableSort=function(t,n){var i,r=t.length,e=Array(t.length);for(i=0;i<r;i++)e[i]={index:i,value:t[i]};for(e.sort((function(t,i){return n(t.value,i.value)||t.index-i.index})),i=0;i<t.length;i++)t[i]=e[i].value},EI.asserts={},EI.asserts.assert=St,EI.centerconstraint={},EI.centerconstraint.createExtent=Cu,EI.centerconstraint.none=ku,EI.color={},EI.color.asArray=Go,EI.color.asString=zo,EI.color.fromString=Fo,EI.color.isStringColor=Uo,EI.color.normalize=Do,EI.color.toString=qo,EI.colorlike={},EI.colorlike.asColorLike=Uh,EI.control={},EI.control.Attribution=ua,EI.control.Control=oa,EI.control.FullScreen=nI,EI.control.MousePosition=oI,EI.control.OverviewMap=fI,EI.control.Rotate=ha,EI.control.ScaleLine=bI,EI.control.Zoom=ca,EI.control.ZoomSlider=SI,EI.control.ZoomToExtent=jI,EI.control.defaults=la,EI.coordinate={},EI.coordinate.add=Vi,EI.coordinate.closestOnCircle=Wi,EI.coordinate.closestOnSegment=Yi,EI.coordinate.createStringXY=function(t){return function(n){return ir(n,t)}},EI.coordinate.degreesToStringHDMS=Zi,EI.coordinate.distance=tr,EI.coordinate.equals=Ki,EI.coordinate.format=$i,EI.coordinate.getWorldsAway=er,EI.coordinate.rotate=Hi,EI.coordinate.scale=Ji,EI.coordinate.squaredDistance=Qi,EI.coordinate.squaredDistanceToSegment=nr,EI.coordinate.toStringHDMS=function(t,n){return t?Zi("NS",t[1],n)+" "+Zi("EW",t[0],n):""},EI.coordinate.toStringXY=ir,EI.coordinate.wrapX=rr,EI.css={},EI.css.CLASS_COLLAPSED=_s,EI.css.CLASS_CONTROL=Ms,EI.css.CLASS_HIDDEN=ws,EI.css.CLASS_SELECTABLE=gs,EI.css.CLASS_UNSELECTABLE=bs,EI.css.CLASS_UNSUPPORTED=xs,EI.css.getFontParameters=js,EI.dom={},EI.dom.createCanvasContext2D=_o,EI.dom.outerHeight=jo,EI.dom.outerWidth=Oo,EI.dom.releaseCanvas=So,EI.dom.removeChildren=Ao,EI.dom.removeNode=To,EI.dom.replaceChildren=Po,EI.dom.replaceNode=Eo,EI.easing={},EI.easing.easeIn=yt,EI.easing.easeOut=mt,EI.easing.inAndOut=wt,EI.easing.linear=gt,EI.easing.upAndDown=function(t){return t<.5?wt(2*t):1-wt(2*(t-.5))},EI.events={},EI.events.Event=c,EI.events.Event.preventDefault=function(t){t.preventDefault()},EI.events.Event.stopPropagation=f,EI.events.Target=N,EI.events.condition={},EI.events.condition.all=_a,EI.events.condition.altKeyOnly=Sa,EI.events.condition.altShiftKeysOnly=Oa,EI.events.condition.always=Ta,EI.events.condition.click=function(t){return t.type==su.CLICK},EI.events.condition.doubleClick=function(t){return t.type==su.DBLCLICK},EI.events.condition.focus=ja,EI.events.condition.focusWithTabindex=Ea,EI.events.condition.mouseActionButton=Aa,EI.events.condition.mouseOnly=La,EI.events.condition.never=Pa,EI.events.condition.noModifierKeys=ka,EI.events.condition.penOnly=function(t){var n=t.originalEvent;return St(void 0!==n,56),"pen"===n.pointerType},EI.events.condition.platformModifierKeyOnly=function(t){var n=t.originalEvent;return!n.altKey&&(Bt?n.metaKey:n.ctrlKey)&&!n.shiftKey},EI.events.condition.pointerMove=function(t){return"pointermove"==t.type},EI.events.condition.primaryAction=za,EI.events.condition.shiftKeyOnly=Ia,EI.events.condition.singleClick=Ca,EI.events.condition.targetNotEditable=Na,EI.events.condition.touchOnly=function(t){var n=t.originalEvent;return St(void 0!==n,56),"touch"===n.pointerType},EI.events.listen=$,EI.events.listenOnce=K,EI.events.unlistenByKey=H,EI.extent={},EI.extent.applyTransform=ni,EI.extent.approximatelyEquals=Pn,EI.extent.boundingExtent=yn,EI.extent.buffer=mn,EI.extent.clone=wn,EI.extent.closestSquaredDistanceXY=gn,EI.extent.containsCoordinate=bn,EI.extent.containsExtent=xn,EI.extent.containsXY=Mn,EI.extent.coordinateRelationship=_n,EI.extent.createEmpty=Sn,EI.extent.createOrUpdate=On,EI.extent.createOrUpdateEmpty=jn,EI.extent.createOrUpdateFromCoordinate=En,EI.extent.createOrUpdateFromCoordinates=function(t,n){return In(jn(n),t)},EI.extent.createOrUpdateFromFlatCoordinates=Tn,EI.extent.createOrUpdateFromRings=function(t,n){return Ln(jn(n),t)},EI.extent.equals=An,EI.extent.extend=Cn,EI.extent.extendCoordinate=kn,EI.extent.extendCoordinates=In,EI.extent.extendFlatCoordinates=Nn,EI.extent.extendRings=Ln,EI.extent.extendXY=zn,EI.extent.forEachCorner=Rn,EI.extent.getArea=Fn,EI.extent.getBottomLeft=Gn,EI.extent.getBottomRight=Dn,EI.extent.getCenter=qn,EI.extent.getCorner=Un,EI.extent.getEnlargedArea=function(t,n){var i=Math.min(t[0],n[0]),r=Math.min(t[1],n[1]);return(Math.max(t[2],n[2])-i)*(Math.max(t[3],n[3])-r)},EI.extent.getForViewAndSize=Bn,EI.extent.getHeight=Vn,EI.extent.getIntersection=Wn,EI.extent.getIntersectionArea=function(t,n){return Fn(Wn(t,n))},EI.extent.getMargin=function(t){return $n(t)+Vn(t)},EI.extent.getRotatedViewport=Xn,EI.extent.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},EI.extent.getTopLeft=Yn,EI.extent.getTopRight=Zn,EI.extent.getWidth=$n,EI.extent.intersects=Kn,EI.extent.intersectsSegment=ti,EI.extent.isEmpty=Hn,EI.extent.returnOrUpdate=Jn,EI.extent.scaleFromCenter=Qn,EI.extent.wrapAndSliceX=ri,EI.extent.wrapX=ii,EI.featureloader={},EI.featureloader.loadFeaturesXhr=Xh,EI.featureloader.setWithCredentials=function(t){Bh=t},EI.featureloader.xhr=Vh,EI.format={},EI.format.EsriJSON=sO,EI.format.Feature=jg,EI.format.Feature.transformExtentWithOptions=Tg,EI.format.Feature.transformGeometryWithOptions=Eg,EI.format.GML=RO,EI.format.GML2=CO,EI.format.GML3=LO,EI.format.GML32=DO,EI.format.GMLBase=vO,EI.format.GMLBase.GMLNS=fO,EI.format.GPX=Mj,EI.format.GeoJSON=Zg,EI.format.IGC=Dj,EI.format.IIIFInfo=uy,EI.format.JSONFeature=Bg,EI.format.KML=zT,EI.format.KML.getDefaultFillStyle=function(){return Hj},EI.format.KML.getDefaultImageStyle=function(){return Qj},EI.format.KML.getDefaultStrokeStyle=function(){return nE},EI.format.KML.getDefaultStyle=function(){return rE},EI.format.KML.getDefaultStyleArray=function(){return oE},EI.format.KML.getDefaultTextStyle=function(){return iE},EI.format.KML.readFlatCoordinates=cE,EI.format.MVT=Lg,EI.format.OSMXML=XT,EI.format.OWS=fA,EI.format.Polyline=xA,EI.format.Polyline.decodeDeltas=vA,EI.format.Polyline.decodeFloats=pA,EI.format.Polyline.decodeSignedIntegers=mA,EI.format.Polyline.decodeUnsignedIntegers=gA,EI.format.Polyline.encodeDeltas=lA,EI.format.Polyline.encodeFloats=dA,EI.format.Polyline.encodeSignedIntegers=yA,EI.format.Polyline.encodeUnsignedInteger=bA,EI.format.Polyline.encodeUnsignedIntegers=wA,EI.format.TextFeature=Cj,EI.format.TopoJSON=PA,EI.format.WFS=bC,EI.format.WFS.writeFilter=function(t,n){var i=n||"1.1.0",r=Xf(gC(i),"Filter"),e={node:r};return A(e,{version:i,filter:t}),rC(r,t,[e]),r},EI.format.WKB=LC,EI.format.WKT=nk,EI.format.WMSCapabilities=Ek,EI.format.WMSGetFeatureInfo=Ak,EI.format.WMTSCapabilities=Yk,EI.format.XML=VT,EI.format.XMLFeature=aO,EI.format.filter={},EI.format.filter.And=LA,EI.format.filter.Bbox=RA,EI.format.filter.Comparison=YA,EI.format.filter.ComparisonBinary=HA,EI.format.filter.Contains=qA,EI.format.filter.DWithin=BA,EI.format.filter.Disjoint=VA,EI.format.filter.During=$A,EI.format.filter.EqualTo=QA,EI.format.filter.Filter=CA,EI.format.filter.GreaterThan=nP,EI.format.filter.GreaterThanOrEqualTo=rP,EI.format.filter.Intersects=oP,EI.format.filter.IsBetween=uP,EI.format.filter.IsLike=hP,EI.format.filter.IsNull=cP,EI.format.filter.LessThan=vP,EI.format.filter.LessThanOrEqualTo=pP,EI.format.filter.LogicalNary=IA,EI.format.filter.Not=mP,EI.format.filter.NotEqualTo=gP,EI.format.filter.Or=xP,EI.format.filter.ResourceId=_P,EI.format.filter.Spatial=GA,EI.format.filter.Within=OP,EI.format.filter.and=jP,EI.format.filter.bbox=EP,EI.format.filter.between=function(t,n,i){return new uP(t,n,i)},EI.format.filter.contains=function(t,n,i){return new qA(t,n,i)},EI.format.filter.disjoint=function(t,n,i){return new VA(t,n,i)},EI.format.filter.during=function(t,n,i){return new $A(t,n,i)},EI.format.filter.dwithin=function(t,n,i,r,e){return new BA(t,n,i,r,e)},EI.format.filter.equalTo=function(t,n,i){return new QA(t,n,i)},EI.format.filter.greaterThan=function(t,n){return new nP(t,n)},EI.format.filter.greaterThanOrEqualTo=function(t,n){return new rP(t,n)},EI.format.filter.intersects=function(t,n,i){return new oP(t,n,i)},EI.format.filter.isNull=function(t){return new cP(t)},EI.format.filter.lessThan=function(t,n){return new vP(t,n)},EI.format.filter.lessThanOrEqualTo=function(t,n){return new pP(t,n)},EI.format.filter.like=function(t,n,i,r,e,o){return new hP(t,n,i,r,e,o)},EI.format.filter.not=function(t){return new mP(t)},EI.format.filter.notEqualTo=function(t,n,i){return new gP(t,n,i)},EI.format.filter.or=function(t){var n=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(xP,n))},EI.format.filter.resourceId=function(t){return new _P(t)},EI.format.filter.within=function(t,n,i){return new OP(t,n,i)},EI.format.xlink={},EI.format.xlink.readHref=WT,EI.format.xsd={},EI.format.xsd.readBoolean=dO,EI.format.xsd.readBooleanString=pO,EI.format.xsd.readDateTime=yO,EI.format.xsd.readDecimal=mO,EI.format.xsd.readDecimalString=wO,EI.format.xsd.readNonNegativeIntegerString=bO,EI.format.xsd.readPositiveInteger=gO,EI.format.xsd.readString=xO,EI.format.xsd.writeBooleanTextNode=MO,EI.format.xsd.writeCDATASection=_O,EI.format.xsd.writeDateTimeTextNode=SO,EI.format.xsd.writeDecimalTextNode=OO,EI.format.xsd.writeNonNegativeIntegerTextNode=jO,EI.format.xsd.writeStringTextNode=EO,EI.functions={},EI.functions.FALSE=O,EI.functions.TRUE=S,EI.functions.VOID=j,EI.functions.memoizeOne=E,EI.functions.toPromise=T,EI.geom={},EI.geom.Circle=eS,EI.geom.Geometry=Wr,EI.geom.GeometryCollection=Dg,EI.geom.LineString=ng,EI.geom.LinearRing=Me,EI.geom.MultiLineString=rg,EI.geom.MultiPoint=Kw,EI.geom.MultiPolygon=sg,EI.geom.Point=Se,EI.geom.Polygon=We,EI.geom.Polygon.circular=Ye,EI.geom.Polygon.fromCircle=$e,EI.geom.Polygon.fromExtent=Ze,EI.geom.Polygon.makeRegular=Ke,EI.geom.SimpleGeometry=Kr,EI.geom.SimpleGeometry.getStrideForLayout=Zr,EI.geom.SimpleGeometry.transformGeom2D=$r,EI.geom.flat={},EI.geom.flat.area={},EI.geom.flat.area.linearRing=we,EI.geom.flat.area.linearRings=ge,EI.geom.flat.area.linearRingss=be,EI.geom.flat.center={},EI.geom.flat.center.linearRingss=eg,EI.geom.flat.closest={},EI.geom.flat.closest.arrayMaxSquaredDelta=Qr,EI.geom.flat.closest.assignClosestArrayPoint=ie,EI.geom.flat.closest.assignClosestMultiArrayPoint=re,EI.geom.flat.closest.assignClosestPoint=ne,EI.geom.flat.closest.maxSquaredDelta=Jr,EI.geom.flat.closest.multiArrayMaxSquaredDelta=te,EI.geom.flat.contains={},EI.geom.flat.contains.linearRingContainsExtent=Oe,EI.geom.flat.contains.linearRingContainsXY=je,EI.geom.flat.contains.linearRingsContainsXY=Ee,EI.geom.flat.contains.linearRingssContainsXY=Te,EI.geom.flat.deflate={},EI.geom.flat.deflate.deflateCoordinate=ee,EI.geom.flat.deflate.deflateCoordinates=oe,EI.geom.flat.deflate.deflateCoordinatesArray=se,EI.geom.flat.deflate.deflateMultiCoordinatesArray=ue,EI.geom.flat.flip={},EI.geom.flat.flip.flipXY=JS,EI.geom.flat.geodesic={},EI.geom.flat.geodesic.greatCircleArc=function(t,n,i,r,e,o){var s=yr("EPSG:4326"),u=Math.cos(li(n)),a=Math.sin(li(n)),h=Math.cos(li(r)),f=Math.sin(li(r)),c=Math.cos(li(i-t)),l=Math.sin(li(i-t)),v=a*f+u*h*c;return vg((function(n){if(1<=v)return[i,r];var e=n*Math.acos(v),o=Math.cos(e),s=Math.sin(e),d=l*h,p=u*f-a*h*c,y=Math.atan2(d,p),m=Math.asin(a*o+u*s*Math.cos(y));return[ci(li(t)+Math.atan2(Math.sin(y)*s*u,o-a*Math.sin(m))),ci(m)]}),jr(s,e),o)},EI.geom.flat.geodesic.meridian=dg,EI.geom.flat.geodesic.parallel=pg,EI.geom.flat.inflate={},EI.geom.flat.inflate.inflateCoordinates=pe,EI.geom.flat.inflate.inflateCoordinatesArray=ye,EI.geom.flat.inflate.inflateMultiCoordinatesArray=me,EI.geom.flat.interiorpoint={},EI.geom.flat.interiorpoint.getInteriorPointOfArray=Ae,EI.geom.flat.interiorpoint.getInteriorPointsOfMultiArray=Pe,EI.geom.flat.interpolate={},EI.geom.flat.interpolate.interpolatePoint=Hw,EI.geom.flat.interpolate.lineStringCoordinateAtM=Jw,EI.geom.flat.interpolate.lineStringsCoordinateAtM=Qw,EI.geom.flat.intersectsextent={},EI.geom.flat.intersectsextent.intersectsLineString=ke,EI.geom.flat.intersectsextent.intersectsLineStringArray=Ie,EI.geom.flat.intersectsextent.intersectsLinearRing=Ne,EI.geom.flat.intersectsextent.intersectsLinearRingArray=Le,EI.geom.flat.intersectsextent.intersectsLinearRingMultiArray=ze,EI.geom.flat.length={},EI.geom.flat.length.lineStringLength=gw,EI.geom.flat.length.linearRingLength=function(t,n,i,r){var e=gw(t,n,i,r),o=t[i-r]-t[n],s=t[i-r+1]-t[n+1];return e+=Math.sqrt(o*o+s*s)},EI.geom.flat.orient={},EI.geom.flat.orient.inflateEnds=Be,EI.geom.flat.orient.linearRingIsClockwise=Fe,EI.geom.flat.orient.linearRingsAreOriented=Ge,EI.geom.flat.orient.linearRingssAreOriented=De,EI.geom.flat.orient.orientLinearRings=qe,EI.geom.flat.orient.orientLinearRingsArray=Ue,EI.geom.flat.reverse={},EI.geom.flat.reverse.coordinates=Re,EI.geom.flat.segments={},EI.geom.flat.segments.forEach=Ce,EI.geom.flat.simplify={},EI.geom.flat.simplify.douglasPeucker=ae,EI.geom.flat.simplify.douglasPeuckerArray=he,EI.geom.flat.simplify.douglasPeuckerMultiArray=function(t,n,i,r,e,o,s,u){for(var a=0,h=i.length;a<h;++a){var f=i[a],c=[];s=he(t,n,f,r,e,o,s,c),u.push(c),n=f[f.length-1]}return s},EI.geom.flat.simplify.quantize=le,EI.geom.flat.simplify.quantizeArray=ve,EI.geom.flat.simplify.quantizeMultiArray=de,EI.geom.flat.simplify.radialDistance=fe,EI.geom.flat.simplify.simplifyLineString=function(t,n,i,r,e,o,s){var u=void 0!==s?s:[];return o||(i=fe(t,n,i,r,e,u,0),t=u,n=0,r=2),u.length=ae(t,n,i,r,e,u,0),u},EI.geom.flat.simplify.snap=ce,EI.geom.flat.straightchunk={},EI.geom.flat.straightchunk.matchingChunk=lw,EI.geom.flat.textpath={},EI.geom.flat.textpath.drawTextOnPath=ww,EI.geom.flat.topology={},EI.geom.flat.topology.lineStringIsClosed=function(t,n,i,r){var e=i-r;return t[n]===t[e]&&t[n+1]===t[e+1]&&(i-n)/r>3&&!!we(t,n,i,r)},EI.geom.flat.transform={},EI.geom.flat.transform.rotate=qr,EI.geom.flat.transform.scale=Ur,EI.geom.flat.transform.transform2D=Dr,EI.geom.flat.transform.translate=Br,EI.has={},EI.has.DEVICE_PIXEL_RATIO=Xt,EI.has.FIREFOX=Gt,EI.has.IMAGE_DECODE=Wt,EI.has.MAC=Bt,EI.has.PASSIVE_EVENT_LISTENERS=Yt,EI.has.SAFARI=Dt,EI.has.SAFARI_BUG_237906=qt,EI.has.WEBKIT=Ut,EI.has.WORKER_OFFSCREEN_CANVAS=Vt,EI.interaction={},EI.interaction.DoubleClickZoom=ga,EI.interaction.DragAndDrop=Q_,EI.interaction.DragAndDrop.DragAndDropEvent=J_,EI.interaction.DragBox=$a,EI.interaction.DragBox.DragBoxEvent=Za,EI.interaction.DragPan=Fa,EI.interaction.DragRotate=Da,EI.interaction.DragRotateAndZoom=nS,EI.interaction.DragZoom=Ha,EI.interaction.Draw=dS,EI.interaction.Draw.DrawEvent=vS,EI.interaction.Draw.createBox=function(){return function(t,n,i){var r=yn([t[0],t[t.length-1]].map((function(t){return Ir(t,i)}))),e=[[Gn(r),Dn(r),Zn(r),Yn(r),Gn(r)]],o=n;o?o.setCoordinates(e):o=new We(e);var s=Cr();return s&&o.transform(i,s),o}},EI.interaction.Draw.createRegularPolygon=function(t,n){return function(i,r,e){var o=Ir(i[0],e),s=Ir(i[i.length-1],e),u=Math.sqrt(Qi(o,s)),a=r||$e(new eS(o),t),h=n;if(!n&&0!==n){var f=s[0]-o[0],c=s[1]-o[1];h=Math.atan2(c,f)}Ke(a,o,u,h);var l=Cr();return l&&a.transform(e,l),a}},EI.interaction.Extent=xS,EI.interaction.Extent.ExtentEvent=mS,EI.interaction.Interaction=ma,EI.interaction.Interaction.pan=pa,EI.interaction.Interaction.zoomByDelta=ya,EI.interaction.KeyboardPan=rh,EI.interaction.KeyboardZoom=oh,EI.interaction.Link=jS,EI.interaction.Modify=zS,EI.interaction.Modify.ModifyEvent=kS,EI.interaction.MouseWheelZoom=hh,EI.interaction.PinchRotate=ch,EI.interaction.PinchZoom=vh,EI.interaction.Pointer=Ma,EI.interaction.Pointer.centroid=xa,EI.interaction.Select=qS,EI.interaction.Select.SelectEvent=GS,EI.interaction.Snap=VS,EI.interaction.Translate=HS,EI.interaction.Translate.TranslateEvent=KS,EI.interaction.defaults=dh,EI.layer={},EI.layer.Base=es,EI.layer.BaseImage=$y,EI.layer.BaseTile=am,EI.layer.BaseVector=$m,EI.layer.Graticule=gg,EI.layer.Group=nu,EI.layer.Group.GroupEvent=Qs,EI.layer.Heatmap=Og,EI.layer.Image=em,EI.layer.Layer=ls,EI.layer.Layer.inView=cs,EI.layer.MapboxVector=q_,EI.layer.Tile=lm,EI.layer.Vector=lg,EI.layer.VectorImage=B_,EI.layer.VectorTile=Rg,EI.layer.WebGLPoints=V_,EI.layer.WebGLTile=$_,EI.loadingstrategy={},EI.loadingstrategy.all=Wh,EI.loadingstrategy.bbox=function(t,n){return[t]},EI.loadingstrategy.tile=function(t){return function(n,i,r){var e=t.getZForResolution(Rr(i,r)),o=t.getTileRangeForExtentAndZ(Lr(n,r),e),s=[],u=[e,0,0];for(u[1]=o.minX;u[1]<=o.maxX;++u[1])for(u[2]=o.minY;u[2]<=o.maxY;++u[2])s.push(Nr(t.getTileCoordExtent(u),r));return s}},EI.math={},EI.math.ceil=wi,EI.math.clamp=oi,EI.math.cosh=si,EI.math.floor=mi,EI.math.lerp=di,EI.math.log2=ui,EI.math.modulo=vi,EI.math.round=yi,EI.math.solveLinearSystem=fi,EI.math.squaredDistance=hi,EI.math.squaredSegmentDistance=ai,EI.math.toDegrees=ci,EI.math.toFixed=pi,EI.math.toRadians=li,EI.net={},EI.net.ClientError=Hh,EI.net.ResponseError=Kh,EI.net.getJSON=Jh,EI.net.jsonp=Zh,EI.net.overrideXHR=function(t){"undefined"!=typeof XMLHttpRequest&&($h=XMLHttpRequest),global.XMLHttpRequest=t},EI.net.resolveUrl=Qh,EI.net.restoreXHR=function(){global.XMLHttpRequest=$h},EI.obj={},EI.obj.assign=A,EI.obj.clear=P,EI.obj.getValues=C,EI.obj.isEmpty=k,EI.proj={},EI.proj.Projection=ei,EI.proj.Units={},EI.proj.Units.METERS_PER_UNIT=Lt,EI.proj.Units.fromCode=Nt,EI.proj.addCommon=Gr,EI.proj.addCoordinateTransforms=Mr,EI.proj.addEquivalentProjections=wr,EI.proj.addEquivalentTransforms=gr,EI.proj.addProjection=dr,EI.proj.addProjections=pr,EI.proj.clearAllProjections=function(){zi(),Di()},EI.proj.clearUserProjection=function(){Ar=null},EI.proj.cloneTransform=lr,EI.proj.createProjection=br,EI.proj.createSafeCoordinateTransform=Fr,EI.proj.createTransformFromCoordinateTransform=xr,EI.proj.disableCoordinateWarning=cr,EI.proj.epsg3857={},EI.proj.epsg3857.EXTENT=Mi,EI.proj.epsg3857.HALF_SIZE=xi,EI.proj.epsg3857.MAX_SAFE_Y=Si,EI.proj.epsg3857.PROJECTIONS=ji,EI.proj.epsg3857.RADIUS=bi,EI.proj.epsg3857.WORLD_EXTENT=_i,EI.proj.epsg3857.fromEPSG4326=Ei,EI.proj.epsg3857.toEPSG4326=Ti,EI.proj.epsg4326={},EI.proj.epsg4326.EXTENT=Ci,EI.proj.epsg4326.METERS_PER_UNIT=ki,EI.proj.epsg4326.PROJECTIONS=Ni,EI.proj.epsg4326.RADIUS=Pi,EI.proj.equivalent=Sr,EI.proj.fromLonLat=_r,EI.proj.fromUserCoordinate=Ir,EI.proj.fromUserExtent=Lr,EI.proj.fromUserResolution=Rr,EI.proj.get=yr,EI.proj.getPointResolution=mr,EI.proj.getTransform=jr,EI.proj.getTransformFromProjections=Or,EI.proj.getUserProjection=Cr,EI.proj.identityTransform=vr,EI.proj.proj4={},EI.proj.proj4.register=function(t){var n,i,r=Object.keys(t.defs),e=r.length;for(n=0;n<e;++n){var o=r[n];if(!yr(o)){var s=t.defs(o),u=s.units;u||"longlat"!==s.projName||(u=Rt.DEGREES),dr(new ei({code:o,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:u}))}}for(n=0;n<e;++n){var a=r[n],h=yr(a);for(i=0;i<e;++i){var f=r[i],c=yr(f);if(!Ui(a,f))if(t.defs[a]===t.defs[f])wr([h,c]);else{var l=t(a,f);Mr(h,c,Fr(h,c,l.forward),Fr(c,h,l.inverse))}}}},EI.proj.projections={},EI.proj.projections.add=Fi,EI.proj.projections.clear=zi,EI.proj.projections.get=Ri,EI.proj.setUserProjection=Pr,EI.proj.toLonLat=function(t,n){var i=Er(t,void 0!==n?n:"EPSG:3857","EPSG:4326"),r=i[0];return(r<-180||r>180)&&(i[0]=vi(r+180,360)-180),i},EI.proj.toUserCoordinate=kr,EI.proj.toUserExtent=Nr,EI.proj.toUserResolution=zr,EI.proj.transform=Er,EI.proj.transformExtent=Tr,EI.proj.transformWithProjections=function(t,n,i){return Or(n,i)(t)},EI.proj.transforms={},EI.proj.transforms.add=qi,EI.proj.transforms.clear=Di,EI.proj.transforms.get=Ui,EI.proj.transforms.remove=function(t,n){var i=t.getCode(),r=n.getCode(),e=Gi[i][r];return delete Gi[i][r],k(Gi[i])&&delete Gi[i],e},EI.proj.useGeographic=function(){Pr("EPSG:4326")},EI.render={},EI.render.Box=Ua,EI.render.Event=ms,EI.render.Feature=fg,EI.render.Feature.toFeature=function(t,n){var i=t.getId(),r=hg(t),e=t.getProperties(),o=new Et;return void 0!==n&&o.setGeometryName(n),o.setGeometry(r),void 0!==i&&o.setId(i),o.setProperties(e,!0),o},EI.render.Feature.toGeometry=hg,EI.render.VectorContext=tf,EI.render.canvas={},EI.render.canvas.Builder=ow,EI.render.canvas.BuilderGroup=mw,EI.render.canvas.Executor=Aw,EI.render.canvas.ExecutorGroup=Nw,EI.render.canvas.ExecutorGroup.getPixelIndexArray=Iw,EI.render.canvas.ImageBuilder=uw,EI.render.canvas.Immediate=rf,EI.render.canvas.Instruction={},EI.render.canvas.Instruction.beginPathInstruction=nw,EI.render.canvas.Instruction.closePathInstruction=iw,EI.render.canvas.Instruction.fillInstruction=Qm,EI.render.canvas.Instruction.strokeInstruction=tw,EI.render.canvas.LineStringBuilder=hw,EI.render.canvas.PolygonBuilder=cw,EI.render.canvas.TextBuilder=pw,EI.render.canvas.checkedFonts=Rs,EI.render.canvas.defaultFillStyle=Ts,EI.render.canvas.defaultFont=Es,EI.render.canvas.defaultLineCap=As,EI.render.canvas.defaultLineDash=Ps,EI.render.canvas.defaultLineDashOffset=0,EI.render.canvas.defaultLineJoin=Cs,EI.render.canvas.defaultLineWidth=1,EI.render.canvas.defaultMiterLimit=ks,EI.render.canvas.defaultPadding=zs,EI.render.canvas.defaultStrokeStyle=Is,EI.render.canvas.defaultTextAlign=Ns,EI.render.canvas.defaultTextBaseline=Ls,EI.render.canvas.drawImageOrLabel=$s,EI.render.canvas.getTextDimensions=Zs,EI.render.canvas.hitdetect={},EI.render.canvas.hitdetect.HIT_DETECT_RESOLUTION=Lw,EI.render.canvas.hitdetect.createHitDetectionImageData=zw,EI.render.canvas.hitdetect.hitDetect=Rw,EI.render.canvas.labelCache=Fs,EI.render.canvas.measureAndCacheTextWidth=Ys,EI.render.canvas.measureTextHeight=Xs,EI.render.canvas.measureTextWidth=Ws,EI.render.canvas.registerFont=Bs,EI.render.canvas.rotateAtOffset=function(t,n,i,r){0!==n&&(t.translate(i,r),t.rotate(n),t.translate(-i,-r))},EI.render.canvas.textHeights=Us,EI.render.getRenderPixel=function(t,n){return tn(t.inversePixelTransform,n.slice(0))},EI.render.getVectorContext=ff,EI.render.toContext=function(t,n){var i=t.canvas,r=n||{},e=r.pixelRatio||Xt,o=r.size;o&&(i.width=o[0]*e,i.height=o[1]*e,i.style.width=o[0]+"px",i.style.height=o[1]+"px");var s=[0,0,i.width,i.height],u=rn([1,0,0,1,0,0],e,e);return new rf(t,e,s,u,0)},EI.renderer={},EI.renderer.Composite=Hs,EI.renderer.Layer=Kc,EI.renderer.Map=ps,EI.renderer.canvas={},EI.renderer.canvas.ImageLayer=im,EI.renderer.canvas.Layer=tm,EI.renderer.canvas.Layer.canvasPool=Hy,EI.renderer.canvas.TileLayer=fm,EI.renderer.canvas.VectorImageLayer=qw,EI.renderer.canvas.VectorLayer=Gw,EI.renderer.canvas.VectorTileLayer=Zw,EI.renderer.canvas.common={},EI.renderer.canvas.common.IMAGE_SMOOTHING_DISABLED=lf,EI.renderer.canvas.common.IMAGE_SMOOTHING_ENABLED=vf,EI.renderer.vector={},EI.renderer.vector.defaultOrder=of,EI.renderer.vector.getSquaredTolerance=sf,EI.renderer.vector.getTolerance=uf,EI.renderer.vector.renderFeature=af,EI.renderer.webgl={},EI.renderer.webgl.Layer=ol,EI.renderer.webgl.Layer.colorDecodeId=el,EI.renderer.webgl.Layer.colorEncodeId=rl,EI.renderer.webgl.Layer.getBlankImageData=function(){var t=document.createElement("canvas").getContext("2d").createImageData(1,1);return t.data[0]=255,t.data[1]=255,t.data[2]=255,t.data[3]=255,t},EI.renderer.webgl.Layer.writePointFeatureToBuffers=function(t,n,i,r,e,o){var s=3+e,u=t[n+0],a=t[n+1],h=tl;h.length=e;for(var f=0;f<h.length;f++)h[f]=t[n+2+f];var c=o?o.vertexPosition:0,l=o?o.indexPosition:0,v=c/s;return il(i,c,u,a,0),h.length&&i.set(h,c+3),il(i,c+=s,u,a,1),h.length&&i.set(h,c+3),il(i,c+=s,u,a,2),h.length&&i.set(h,c+3),il(i,c+=s,u,a,3),h.length&&i.set(h,c+3),c+=s,r[l++]=v,r[l++]=v+1,r[l++]=v+3,r[l++]=v+1,r[l++]=v+2,r[l++]=v+3,nl.vertexPosition=c,nl.indexPosition=l,nl},EI.renderer.webgl.PointsLayer=Hm,EI.renderer.webgl.TileLayer=pl,EI.renderer.webgl.TileLayer.Attributes=al,EI.renderer.webgl.TileLayer.Uniforms=ul,EI.reproj={},EI.reproj.Image=ly,EI.reproj.Tile=Bc,EI.reproj.Triangulation=qc,EI.reproj.calculateSourceExtentResolution=wf,EI.reproj.calculateSourceResolution=mf,EI.reproj.canvasPool=df,EI.reproj.common={},EI.reproj.common.ENABLE_RASTER_REPROJECTION=Dc,EI.reproj.common.ERROR_THRESHOLD=.5,EI.reproj.render=gf,EI.resolutionconstraint={},EI.resolutionconstraint.createMinMaxResolution=Ru,EI.resolutionconstraint.createSnapToPower=zu,EI.resolutionconstraint.createSnapToResolutions=Lu,EI.rotationconstraint={},EI.rotationconstraint.createSnapToN=Du,EI.rotationconstraint.createSnapToZero=qu,EI.rotationconstraint.disable=Fu,EI.rotationconstraint.none=Gu,EI.size={},EI.size.buffer=Ku,EI.size.hasArea=Hu,EI.size.scale=Ju,EI.size.toSize=Qu,EI.source={},EI.source.BingMaps=Zv,EI.source.BingMaps.quadKey=Yv,EI.source.CartoDB=Jv,EI.source.Cluster=fd,EI.source.DataTile=ld,EI.source.GeoTIFF=Wp,EI.source.IIIF=fy,EI.source.Image=gy,EI.source.Image.ImageSourceEvent=my,EI.source.Image.defaultImageLoadFunction=wy,EI.source.ImageArcGISRest=xy,EI.source.ImageCanvas=_y,EI.source.ImageMapGuide=Oy,EI.source.ImageStatic=Ey,EI.source.ImageWMS=Cy,EI.source.OGCMapTile=Gy,EI.source.OGCVectorTile=Xy,EI.source.OSM=Yy,EI.source.OSM.ATTRIBUTION=Wy,EI.source.Raster=Tm,EI.source.Raster.Processor=wm,EI.source.Raster.RasterSourceEvent=_m,EI.source.Raster.newImageData=pm,EI.source.Source=zv,EI.source.Stamen=Im,EI.source.Tile=Dv,EI.source.Tile.TileSourceEvent=Gv,EI.source.TileArcGISRest=Lm,EI.source.TileDebug=Rm,EI.source.TileImage=Vv,EI.source.TileJSON=Gm,EI.source.TileWMS=qm,EI.source.UTFGrid=Xm,EI.source.UTFGrid.CustomTile=Bm,EI.source.UrlTile=Uv,EI.source.Vector=ad,EI.source.Vector.VectorSourceEvent=ud,EI.source.VectorTile=qy,EI.source.VectorTile.defaultLoadFunction=Uy,EI.source.WMTS=Wm,EI.source.WMTS.optionsFromCapabilities=function(t,n){var i=b(t.Contents.Layer,(function(t,i,r){return t.Identifier==n.layer}));if(null===i)return null;var r,e=t.Contents.TileMatrixSet;(r=i.TileMatrixSetLink.length>1?M(i.TileMatrixSetLink,"projection"in n?function(t,i,r){var o=b(e,(function(n){return n.Identifier==t.TileMatrixSet})).SupportedCRS,s=yr(o),u=yr(n.projection);return s&&u?Sr(s,u):o==n.projection}:function(t,i,r){return t.TileMatrixSet==n.matrixSet}):0)<0&&(r=0);var o=i.TileMatrixSetLink[r].TileMatrixSet,s=i.TileMatrixSetLink[r].TileMatrixSetLimits,u=i.Format[0];"format"in n&&(u=n.format),(r=M(i.Style,(function(t,i,r){return"style"in n?t.Title==n.style:t.isDefault})))<0&&(r=0);var a=i.Style[r].Identifier,h={};"Dimension"in i&&i.Dimension.forEach((function(t,n,i){var r=t.Identifier,e=t.Default;void 0===e&&(e=t.Value[0]),h[r]=e}));var f,c=b(t.Contents.TileMatrixSet,(function(t,n,i){return t.Identifier==o})),l=c.SupportedCRS;if(l&&(f=yr(l)),"projection"in n){var v=yr(n.projection);v&&(f&&!Sr(v,f)||(f=v))}var d=!1,p="ne"==f.getAxisOrientation().substr(0,2),m=c.TileMatrix[0],w={MinTileCol:0,MinTileRow:0,MaxTileCol:m.MatrixWidth-1,MaxTileRow:m.MatrixHeight-1};if(s){w=s[s.length-1];var g=b(c.TileMatrix,(function(t){return t.Identifier===w.TileMatrix||c.Identifier+":"+t.Identifier===w.TileMatrix}));g&&(m=g)}var x=28e-5*m.ScaleDenominator/f.getMetersPerUnit(),_=p?[m.TopLeftCorner[1],m.TopLeftCorner[0]]:m.TopLeftCorner,S=m.TileWidth*x,O=m.TileHeight*x,j=c.BoundingBox;j&&p&&(j=[j[1],j[0],j[3],j[2]]);var E=[_[0]+S*w.MinTileCol,_[1]-O*(1+w.MaxTileRow),_[0]+S*(1+w.MaxTileCol),_[1]-O*w.MinTileRow];if(void 0!==j&&!xn(j,E)){var T=i.WGS84BoundingBox,A=yr("EPSG:4326").getExtent();if(E=j,T)d=T[0]===A[0]&&T[2]===A[2];else{var P=Tr(j,c.SupportedCRS,"EPSG:4326");d=P[0]-1e-10<=A[0]&&P[2]+1e-10>=A[2]}}var C=Hl(c,E,s),k=[],I=n.requestEncoding;if(I=void 0!==I?I:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var N=t.OperationsMetadata.GetTile.DCP.HTTP.Get,L=0,z=N.length;L<z;++L)if(N[L].Constraint){var R=b(N[L].Constraint,(function(t){return"GetEncoding"==t.name})).AllowedValues.Value;if(""===I&&(I=R[0]),"KVP"!==I)break;y(R,"KVP")&&k.push(N[L].href)}else N[L].href&&(I="KVP",k.push(N[L].href));return 0===k.length&&(I="REST",i.ResourceURL.forEach((function(t){"tile"===t.resourceType&&(u=t.format,k.push(t.template))}))),{urls:k,layer:n.layer,matrixSet:o,format:u,projection:f,requestEncoding:I,tileGrid:C,style:a,dimensions:h,wrapX:d,crossOrigin:n.crossOrigin}},EI.source.XYZ=Kv,EI.source.Zoomify=Hp,EI.source.Zoomify.CustomTile=Kp,EI.source.common={},EI.source.common.DEFAULT_WMS_VERSION="1.3.0",EI.source.ogcTileUtil={},EI.source.ogcTileUtil.getMapTileUrlTemplate=Ny,EI.source.ogcTileUtil.getTileSetInfo=Ry,EI.source.ogcTileUtil.getVectorTileUrlTemplate=Ly,EI.source.sourcesFromTileGrid=function(t,n){var i=new Sh(32),r=t.getExtent();return function(e,o){i.expireCache(),r&&(e=Wn(r,e));var s=t.getZForResolution(o),u=[];return t.forEachTileCoord(e,s,(function(t){var r=t.toString();if(!i.containsKey(r)){var e=n(t);i.set(r,e)}u.push(i.get(r))})),u}},EI.source.wms={},EI.source.wms.DEFAULT_VERSION=Ty,EI.sphere={},EI.sphere.DEFAULT_RADIUS=or,EI.sphere.getArea=function t(n,i){var r=i||{},e=r.radius||or,o=r.projection||"EPSG:3857",s=n.getType();"GeometryCollection"!==s&&(n=n.clone().transform(o,"EPSG:4326"));var u,a,h,f,c,l,v=0;switch(s){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":for(u=n.getCoordinates(),v=Math.abs(ar(u[0],e)),h=1,f=u.length;h<f;++h)v-=Math.abs(ar(u[h],e));break;case"MultiPolygon":for(h=0,f=(u=n.getCoordinates()).length;h<f;++h)for(a=u[h],v+=Math.abs(ar(a[0],e)),c=1,l=a.length;c<l;++c)v-=Math.abs(ar(a[c],e));break;case"GeometryCollection":var d=n.getGeometries();for(h=0,f=d.length;h<f;++h)v+=t(d[h],i);break;default:throw new Error("Unsupported geometry type: "+s)}return v},EI.sphere.getDistance=sr,EI.sphere.getLength=function t(n,i){var r=i||{},e=r.radius||or,o=r.projection||"EPSG:3857",s=n.getType();"GeometryCollection"!==s&&(n=n.clone().transform(o,"EPSG:4326"));var u,a,h,f,c,l,v=0;switch(s){case"Point":case"MultiPoint":break;case"LineString":case"LinearRing":v=ur(u=n.getCoordinates(),e);break;case"MultiLineString":case"Polygon":for(h=0,f=(u=n.getCoordinates()).length;h<f;++h)v+=ur(u[h],e);break;case"MultiPolygon":for(h=0,f=(u=n.getCoordinates()).length;h<f;++h)for(c=0,l=(a=u[h]).length;c<l;++c)v+=ur(a[c],e);break;case"GeometryCollection":var d=n.getGeometries();for(h=0,f=d.length;h<f;++h)v+=t(d[h],i);break;default:throw new Error("Unsupported geometry type: "+s)}return v},EI.sphere.offset=hr,EI.string={},EI.string.compareVersions=Xi,EI.string.padNumber=Bi,EI.structs={},EI.structs.LRUCache=Sh,EI.structs.LinkedList=Tv,EI.structs.PriorityQueue=_u,EI.structs.PriorityQueue.DROP=Mu,EI.structs.RBush=Pv,EI.style={},EI.style.Circle=iv,EI.style.Fill=rv,EI.style.Icon=yv,EI.style.IconImage=dv,EI.style.IconImage.get=vv,EI.style.IconImageCache=Vo,EI.style.IconImageCache.shared=Wo,EI.style.Image=Jl,EI.style.RegularShape=tv,EI.style.Stroke=mv,EI.style.Style=Sv,EI.style.Style.createDefaultStyle=xv,EI.style.Style.createEditingStyle=Mv,EI.style.Style.toFunction=gv,EI.style.Text=Ev,EI.style.expressions={},EI.style.expressions.Operators=_l,EI.style.expressions.PALETTE_TEXTURE_ARRAY=Ul,EI.style.expressions.arrayToGlsl=El,EI.style.expressions.colorToGlsl=Tl,EI.style.expressions.expressionToGlsl=Cl,EI.style.expressions.getStringNumberEquivalent=Al,EI.style.expressions.getValueType=Sl,EI.style.expressions.isTypeUnique=Ol,EI.style.expressions.numberToGlsl=jl,EI.style.expressions.stringToGlsl=Pl,EI.style.expressions.uniformNameForVariable=ql,EI.tilecoord={},EI.tilecoord.createOrUpdate=Oh,EI.tilecoord.fromKey=Ah,EI.tilecoord.getCacheKeyForTileKey=Th,EI.tilecoord.getKey=Eh,EI.tilecoord.getKeyZXY=jh,EI.tilecoord.hash=Ph,EI.tilecoord.withinExtentAndZ=Ch,EI.tilegrid={},EI.tilegrid.TileGrid=xf,EI.tilegrid.WMTS=Kl,EI.tilegrid.WMTS.createFromCapabilitiesMatrixSet=Hl,EI.tilegrid.common={},EI.tilegrid.common.DEFAULT_MAX_ZOOM=42,EI.tilegrid.common.DEFAULT_TILE_SIZE=Pu,EI.tilegrid.createForExtent=Sf,EI.tilegrid.createForProjection=Ef,EI.tilegrid.createXYZ=Of,EI.tilegrid.extentFromProjection=Tf,EI.tilegrid.getForProjection=Mf,EI.tilegrid.wrapX=_f,EI.tileurlfunction={};EI.tileurlfunction.createFromTemplate=Af,EI.tileurlfunction.createFromTemplates=Pf,EI.tileurlfunction.createFromTileUrlFunctions=Cf,EI.tileurlfunction.expandUrl=If,EI.tileurlfunction.nullTileUrlFunction=kf,EI.transform={},EI.transform.apply=tn,EI.transform.compose=sn,EI.transform.composeCssTransform=function(t,n,i,r,e,o,s){return hn(sn([1,0,0,1,0,0],t,n,i,r,e,o,s))},EI.transform.create=$t,EI.transform.determinant=an,EI.transform.invert=function(t){return un(t,t)},EI.transform.makeInverse=un,EI.transform.makeScale=en,EI.transform.multiply=Ht,EI.transform.reset=Kt,EI.transform.rotate=nn,EI.transform.scale=rn,EI.transform.set=Jt,EI.transform.setFromArray=Qt,EI.transform.toString=hn,EI.transform.translate=on,EI.uri={},EI.uri.appendParams=Nf,EI.util={},EI.util.VERSION=u,EI.util.abstract=r,EI.util.getUid=o,EI.vec={},EI.vec.mat4={},EI.vec.mat4.create=xc,EI.vec.mat4.fromTransform=Mc,EI.webgl={},EI.webgl.ARRAY_BUFFER=zf,EI.webgl.Buffer=mc,EI.webgl.Buffer.getArrayClassForType=yc,EI.webgl.DYNAMIC_DRAW=Gf,EI.webgl.ELEMENT_ARRAY_BUFFER=Rf,EI.webgl.FLOAT=Df,EI.webgl.Helper=zc,EI.webgl.Helper.computeAttributesStride=Nc,EI.webgl.PaletteTexture=Rc,EI.webgl.PostProcessingPass=bc,EI.webgl.RenderTarget=Gc,EI.webgl.STATIC_DRAW=Ff,EI.webgl.STREAM_DRAW=35040,EI.webgl.ShaderBuilder={},EI.webgl.ShaderBuilder.ShaderBuilder=Wl,EI.webgl.ShaderBuilder.parseLiteralStyle=Yl,EI.webgl.TileTexture=Zc,EI.webgl.UNSIGNED_BYTE=5121,EI.webgl.UNSIGNED_INT=5125,EI.webgl.UNSIGNED_SHORT=5123,EI.webgl.getContext=Uf,EI.webgl.getSupportedExtensions=function(){if(!Lf){var t=Uf(document.createElement("canvas"));t&&(Lf=t.getSupportedExtensions())}return Lf},EI.xml={},EI.xml.OBJECT_PROPERTY_NODE_FACTORY=ec,EI.xml.XML_SCHEMA_INSTANCE_URI=Bf,EI.xml.createElementNS=Xf,EI.xml.getAllTextContent=Vf,EI.xml.Vw=Wf,EI.xml.getAttributeNS=Zf,EI.xml.getDocument=dc,EI.xml.getXMLSerializer=lc,EI.xml.isDocument=Yf,EI.xml.makeArrayExtender=Kf,EI.xml.makeArrayPusher=Hf,EI.xml.makeArraySerializer=ic,EI.xml.makeChildAppender=nc,EI.xml.makeObjectPropertyPusher=Qf,EI.xml.makeObjectPropertySetter=tc,EI.xml.makeReplacer=Jf,EI.xml.makeSequence=oc,EI.xml.makeSimpleNodeFactory=rc,EI.xml.makeStructureNS=sc,EI.xml.parse=$f,EI.xml.parseNode=uc,EI.xml.pushParseAndPop=ac,EI.xml.pushSerializeAndPop=fc,EI.xml.registerDocument=function(t){vc=t},EI.xml.registerXMLSerializer=function(t){cc=t},EI.xml.serialize=hc;var TI=EI},150:function(t,n,i){"use strict";i.d(n,{Ie:function(){return a},It:function(){return o},L:function(){return r},L5:function(){return f},P1:function(){return l},Qb:function(){return c},pd:function(){return h},sf:function(){return u}});const r={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},e={};for(const t in r)r.hasOwnProperty(t)&&(e[r[t]]=parseInt(t,10));const o=[e.BitsPerSample,e.ExtraSamples,e.SampleFormat,e.StripByteCounts,e.StripOffsets,e.StripRowCounts,e.TileByteCounts,e.TileOffsets,e.SubIFDs],s={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},u={};for(const t in s)s.hasOwnProperty(t)&&(u[s[t]]=parseInt(t,10));const a={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},h={Unspecified:0,Assocalpha:1,Unassalpha:2},f={Version:0,AddCompression:1},c={None:0,Deflate:1},l={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},v={};for(const t in l)l.hasOwnProperty(t)&&(v[l[t]]=parseInt(t,10))}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return n[t].call(o.exports,o,o.exports,r),o.exports}r.m=n,r.d=function(t,n){for(var i in n)r.o(n,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},r.f={},r.e=function(t){return Promise.all(Object.keys(r.f).reduce((function(n,i){return r.f[i](t,n),n}),[]))},r.u=function(t){return t+".ol.js"},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},t={},r.l=function(n,i,e,o){if(t[n])t[n].push(i);else{var s,u;if(void 0!==e)for(var a=document.getElementsByTagName("script"),h=0;h<a.length;h++){var f=a[h];if(f.getAttribute("src")==n||f.getAttribute("data-webpack")=="ol:"+e){s=f;break}}s||(u=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,r.nc&&s.setAttribute("nonce",r.nc),s.setAttribute("data-webpack","ol:"+e),s.src=n),t[n]=[i];var c=function(i,r){s.onerror=s.onload=null,clearTimeout(l);var e=t[n];if(delete t[n],s.parentNode&&s.parentNode.removeChild(s),e&&e.forEach((function(t){return t(r)})),i)return i(r)},l=setTimeout(c.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=c.bind(null,s.onerror),s.onload=c.bind(null,s.onload),u&&document.head.appendChild(s)}},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var n=r.g.document;if(!t&&n&&(n.currentScript&&(t=n.currentScript.src),!t)){var i=n.getElementsByTagName("script");i.length&&(t=i[i.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}(),function(){var t={179:0};r.f.j=function(n,i){var e=r.o(t,n)?t[n]:void 0;if(0!==e)if(e)i.push(e[2]);else{var o=new Promise((function(i,r){e=t[n]=[i,r]}));i.push(e[2]=o);var s=r.p+r.u(n),u=new Error;r.l(s,(function(i){if(r.o(t,n)&&(0!==(e=t[n])&&(t[n]=void 0),e)){var o=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;u.message="Loading chunk "+n+" failed.\n("+o+": "+s+")",u.name="ChunkLoadError",u.type=o,u.request=s,e[1](u)}}),"chunk-"+n,n)}};var n=function(n,i){var e,o,s=i[0],u=i[1],a=i[2],h=0;if(s.some((function(n){return 0!==t[n]}))){for(e in u)r.o(u,e)&&(r.m[e]=u[e]);if(a)a(r)}for(n&&n(i);h<s.length;h++)o=s[h],r.o(t,o)&&t[o]&&t[o][0](),t[o]=0},i=self.webpackChunkol=self.webpackChunkol||[];i.forEach(n.bind(null,0)),i.push=n.bind(null,i.push.bind(i))}(),r(760);var e=r(429);return e=e.default}()}));
+//# sourceMappingURL=ol.js.map
\ No newline at end of file
diff --git a/VIPSWeb/static/js/3rdparty/ol.js.map b/VIPSWeb/static/js/3rdparty/ol.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..ddb8b5a476bb20c306c198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AErBuoB,IACF+kC,EAAOttD,EAAM0tD,WACRsgF,SAASzlH,GAEZ08I,KACF13G,EAASvtD,EAAM2tD,aACRqgF,SAASi3B,GAChB13G,EAAOi4G,SAAS,KAElBxlK,EAAMolK,UAAUjzK,IAItB,GAAY,GAAR5S,GAA2B,QAAdwrC,EAAMxrC,KAAgB,CACrCgpC,IACI,iBAAkBs8I,IAAU,eAAgBA,EAC1CvB,GACEZ,GACE33I,EACA,QACA,aACAc,EACA7kC,EACA47K,EACA7W,GAEF2W,GACE33I,EACA,QACA,eACAc,EACA7kC,EACA47K,EACA7W,SAGJzvK,EACNqpK,IAAM57I,EAAQ24J,GACZ33I,EACA,QACA,aACAc,EACA7kC,EACA47K,EACA7W,GAEExjI,GAASxe,EAAQ,MACjB46J,GACF3kK,EAAQ8sF,EAAO63E,KAGZ3kK,EAAM2tD,cACP3tD,EAAM0tD,YACN1tD,EAAM+tD,YAEN/tD,EAAQ,IAAIwsF,GAAM,CAChBj/B,OAAQ,IAAI4+B,KAEdW,EAAO63E,GAAgB3kK,IAEzButD,EAASvtD,EAAM2tD,aACR83G,WACL/C,GACE33I,EACA,SACA,WACAc,EACA7kC,EACA47K,EACA7W,IAGJx+F,EAAOm4G,YACLhD,GACE33I,EACA,SACA,YACAc,EACA7kC,EACA47K,EACA7W,IAGJx+F,EAAOo4G,cACLjD,GACE33I,EACA,SACA,mBACAc,EACA7kC,EACA47K,EACA7W,IAGJx+F,EAAOygF,SAASzlH,GAChBglC,EAAOi4G,SAASz7J,GAChBwjD,EAAOuC,YACL+0G,EAAM,kBACFnC,GACE33I,EACA,QACA,iBACAc,EACA7kC,EACA47K,EACA7W,GACApuK,KAAI,SAAUyJ,GACd,OAAOA,EAAI2iB,KAEb,MAEN/J,EAAMolK,UAAUjzK,IAIpBszJ,IAAImgB,GAAW,EACXh0I,EAAO,KACPi0I,EAAiB,EACjBV,OAAAA,EAAMW,OAAV,EAAmBC,OAAAA,EACnB,IAAa,GAARxmL,GAAqB,GAARA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I,EACA,QACA,eACAc,EACA7kC,EACA47K,EACA7W,GAEF2W,GACE33I,EACA,QACA,iBACAc,EACA7kC,EACA47K,EACA7W,IAGEya,GAAoB9D,GACxB33I,EACA,QACA,sBACAc,EACA7kC,EACA47K,EACA7W,GAEI0a,GACJJ,GACA,IACAC,GACA,IACAC,GACA,IACAC,IACFV,EAAUl4I,EAAe64I,OAEvBX,EAAU,IAAIY,GAAO,CACnB/0J,OAAQ00J,GACR94G,OACE+4G,IAAqBE,GAAoB,EACrC,IAAIr6E,GAAO,CACTpiF,MAAOy8J,GACPj+I,MAAO+9I,UAEThqL,EACNgxE,KAAMi5G,GACF,IAAI18E,GAAK,CACPthE,MAAOg+I,UAETjqL,EACJo3E,cAAe,SAEjB9lC,EAAe64I,IAAaX,GAE9B9lK,EAAM4lH,SAASkgD,GACfl0I,EAAO5xB,EAAM+tD,UACb/tD,EAAMiuI,aAAQ3xJ,GACd0jB,EAAMT,iBAAYjjB,GAClB0jB,EAAMolK,UAAUjzK,GAChByzK,GAAW,EAGbngB,IAAI/wH,QAAJ,EAAWnC,QAAX,EAAiBo0I,QAAjB,EAAiCC,QAAjC,EAA2C1G,QAA3C,EAA0D2G,QAAAA,EAC1D,GAAI,eAAgBhuJ,EAAQ,CAC1B+tJ,GAAWxtL,KAAK6zB,MACdy1J,GACE33I,EACA,SACA,YACAc,EACA7kC,EACA47K,EACA7W,IAGJpG,IAAMmhB,GAAYpE,GAChB33I,EACA,SACA,YACAc,EACA7kC,EACA47K,EACA7W,GAEF4a,GAAiBjE,GACf33I,EACA,SACA,mBACAc,EACA7kC,EACA47K,EACA7W,IAEFx5H,GAAO2vI,GACLJ,EAAWA,EAASgF,IAAaA,GACjCF,GACAD,KAEQrxK,SAAS,gBACjBi9B,IAAQ,eAEV2tI,GAAgBwC,GACd33I,EACA,SACA,sBACAc,EACA7kC,EACA47K,EACA7W,GAEF8a,GAAenE,GACb33I,EACA,SACA,iBACAc,EACA7kC,EACA47K,EACA7W,GAEFpG,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P,OAAQ9C,IACzB69P,EAAUkB,EAAS/+P,GAChBy9P,EAAoBzvP,EAAEywP,EAAiBZ,IAAYY,EAAgBZ,IACrEY,EAAgBZ,GAAS,KAE1BY,EAAgBZ,GAAW,GAKzBoB,EAAqB//P,KAAqB,eAAIA,KAAqB,gBAAK,GAC5E+/P,EAAmB36P,QAAQu6P,EAAqBn+O,KAAK,KAAM,IAC3Du+O,EAAmBxzP,KAAOozP,EAAqBn+O,KAAK,KAAMu+O,EAAmBxzP,KAAKiV,KAAKu+O,OCpFvFxB,EAAoB,KACpB,IAAIyB,EAAsBzB,EAAoB","sources":["webpack://ol/webpack/universalModuleDefinition","webpack://ol/webpack/runtime/load script","webpack://ol/./node_modules/ieee754/index.js","webpack://ol/./node_modules/lru-cache/index.js","webpack://ol/./node_modules/pbf/index.js","webpack://ol/./node_modules/rbush/rbush.min.js","webpack://ol/./node_modules/regenerator-runtime/runtime.js","webpack://ol/./node_modules/xml-utils/find-tag-by-name.js","webpack://ol/./node_modules/xml-utils/find-tags-by-name.js","webpack://ol/./node_modules/xml-utils/get-attribute.js","webpack://ol/./node_modules/xml-utils/index-of-match.js","webpack://ol/./node_modules/yallist/iterator.js","webpack://ol/./node_modules/yallist/yallist.js","webpack://ol/src/util.js","webpack://ol/src/AssertionError.js","webpack://ol/../src/events/Event.js","webpack://ol/src/ObjectEventType.js","webpack://ol/src/Disposable.js","webpack://ol/src/array.js","webpack://ol/src/functions.js","webpack://ol/src/obj.js","webpack://ol/../src/events/Target.js","webpack://ol/../src/events/EventType.js","webpack://ol/src/events.js","webpack://ol/src/Observable.js","webpack://ol/src/Object.js","webpack://ol/src/CollectionEventType.js","webpack://ol/src/Collection.js","webpack://ol/src/TileState.js","webpack://ol/src/easing.js","webpack://ol/src/Tile.js","webpack://ol/src/DataTile.js","webpack://ol/src/asserts.js","webpack://ol/src/Feature.js","webpack://ol/../src/geom/GeometryLayout.js","webpack://ol/../src/proj/Units.js","webpack://ol/src/transform.js","webpack://ol/src/has.js","webpack://ol/../src/extent/Relationship.js","webpack://ol/src/extent.js","webpack://ol/../src/proj/Projection.js","webpack://ol/src/math.js","webpack://ol/../src/proj/epsg3857.js","webpack://ol/../src/proj/epsg4326.js","webpack://ol/../src/proj/projections.js","webpack://ol/../src/proj/transforms.js","webpack://ol/src/string.js","webpack://ol/src/coordinate.js","webpack://ol/src/sphere.js","webpack://ol/src/proj.js","webpack://ol/../../src/geom/flat/transform.js","webpack://ol/../src/geom/Geometry.js","webpack://ol/../src/geom/SimpleGeometry.js","webpack://ol/../../src/geom/flat/closest.js","webpack://ol/../../src/geom/flat/deflate.js","webpack://ol/../../src/geom/flat/simplify.js","webpack://ol/../../src/geom/flat/inflate.js","webpack://ol/../../src/geom/flat/area.js","webpack://ol/../src/geom/LinearRing.js","webpack://ol/../src/geom/Point.js","webpack://ol/../../src/geom/flat/contains.js","webpack://ol/../../src/geom/flat/interiorpoint.js","webpack://ol/../../src/geom/flat/segments.js","webpack://ol/../../src/geom/flat/intersectsextent.js","webpack://ol/../../src/geom/flat/reverse.js","webpack://ol/../../src/geom/flat/orient.js","webpack://ol/../src/geom/Polygon.js","webpack://ol/src/Geolocation.js","webpack://ol/src/ImageBase.js","webpack://ol/src/ImageState.js","webpack://ol/src/Image.js","webpack://ol/src/ImageCanvas.js","webpack://ol/src/dom.js","webpack://ol/src/ImageTile.js","webpack://ol/src/Kinetic.js","webpack://ol/src/color.js","webpack://ol/../src/style/IconImageCache.js","webpack://ol/../src/layer/Property.js","webpack://ol/../src/layer/Base.js","webpack://ol/../src/render/EventType.js","webpack://ol/../src/layer/Layer.js","webpack://ol/../src/renderer/Map.js","webpack://ol/../src/render/Event.js","webpack://ol/src/css.js","webpack://ol/../src/render/canvas.js","webpack://ol/../src/renderer/Composite.js","webpack://ol/../src/layer/Group.js","webpack://ol/src/MapEvent.js","webpack://ol/src/MapBrowserEvent.js","webpack://ol/src/MapBrowserEventType.js","webpack://ol/../src/pointer/EventType.js","webpack://ol/src/MapBrowserEventHandler.js","webpack://ol/src/MapEventType.js","webpack://ol/src/MapProperty.js","webpack://ol/../src/structs/PriorityQueue.js","webpack://ol/src/TileQueue.js","webpack://ol/src/ViewHint.js","webpack://ol/src/ViewProperty.js","webpack://ol/../src/tilegrid/common.js","webpack://ol/src/centerconstraint.js","webpack://ol/src/resolutionconstraint.js","webpack://ol/src/rotationconstraint.js","webpack://ol/src/View.js","webpack://ol/src/size.js","webpack://ol/src/PluggableMap.js","webpack://ol/../src/control/Control.js","webpack://ol/../src/control/Attribution.js","webpack://ol/../src/control/Rotate.js","webpack://ol/../src/control/Zoom.js","webpack://ol/src/control.js","webpack://ol/../src/interaction/Property.js","webpack://ol/../src/interaction/Interaction.js","webpack://ol/../src/interaction/DoubleClickZoom.js","webpack://ol/../src/interaction/Pointer.js","webpack://ol/../src/events/condition.js","webpack://ol/../src/interaction/DragPan.js","webpack://ol/../src/interaction/DragRotate.js","webpack://ol/../src/render/Box.js","webpack://ol/../src/interaction/DragBox.js","webpack://ol/../src/interaction/DragZoom.js","webpack://ol/../src/events/KeyCode.js","webpack://ol/../src/interaction/KeyboardPan.js","webpack://ol/../src/interaction/KeyboardZoom.js","webpack://ol/../src/interaction/MouseWheelZoom.js","webpack://ol/../src/interaction/PinchRotate.js","webpack://ol/../src/interaction/PinchZoom.js","webpack://ol/src/interaction.js","webpack://ol/src/Map.js","webpack://ol/src/Overlay.js","webpack://ol/../src/structs/LRUCache.js","webpack://ol/src/tilecoord.js","webpack://ol/src/TileCache.js","webpack://ol/src/TileRange.js","webpack://ol/src/VectorRenderTile.js","webpack://ol/src/VectorTile.js","webpack://ol/src/colorlike.js","webpack://ol/src/featureloader.js","webpack://ol/src/loadingstrategy.js","webpack://ol/src/net.js","webpack://ol/../src/render/VectorContext.js","webpack://ol/../../src/render/canvas/Immediate.js","webpack://ol/../src/renderer/vector.js","webpack://ol/src/render.js","webpack://ol/../../src/renderer/canvas/common.js","webpack://ol/src/reproj.js","webpack://ol/../src/tilegrid/TileGrid.js","webpack://ol/src/tilegrid.js","webpack://ol/src/tileurlfunction.js","webpack://ol/src/uri.js","webpack://ol/src/webgl.js","webpack://ol/src/xml.js","webpack://ol/../src/webgl/Buffer.js","webpack://ol/../src/webgl/ContextEventType.js","webpack://ol/../src/webgl/PostProcessingPass.js","webpack://ol/../src/vec/mat4.js","webpack://ol/../src/webgl/Helper.js","webpack://ol/../src/webgl/PaletteTexture.js","webpack://ol/../src/webgl/RenderTarget.js","webpack://ol/../src/reproj/common.js","webpack://ol/../src/reproj/Triangulation.js","webpack://ol/../src/reproj/Tile.js","webpack://ol/../src/webgl/TileTexture.js","webpack://ol/../src/renderer/Layer.js","webpack://ol/../../src/renderer/webgl/Layer.js","webpack://ol/../../src/renderer/webgl/TileLayer.js","webpack://ol/../src/style/expressions.js","webpack://ol/../src/webgl/ShaderBuilder.js","webpack://ol/../src/tilegrid/WMTS.js","webpack://ol/../src/style/Image.js","webpack://ol/../src/style/RegularShape.js","webpack://ol/../src/style/Circle.js","webpack://ol/../src/style/Fill.js","webpack://ol/../src/style/IconAnchorUnits.js","webpack://ol/../src/style/IconOrigin.js","webpack://ol/../src/style/IconImage.js","webpack://ol/../src/style/Icon.js","webpack://ol/../src/style/Stroke.js","webpack://ol/../src/style/Style.js","webpack://ol/../src/style/TextPlacement.js","webpack://ol/../src/style/Text.js","webpack://ol/../src/structs/LinkedList.js","webpack://ol/../src/structs/RBush.js","webpack://ol/../src/source/TileEventType.js","webpack://ol/../src/source/Source.js","webpack://ol/../src/source/Tile.js","webpack://ol/../src/source/UrlTile.js","webpack://ol/../src/source/TileImage.js","webpack://ol/../src/source/BingMaps.js","webpack://ol/../src/source/XYZ.js","webpack://ol/../src/source/CartoDB.js","webpack://ol/../src/source/VectorEventType.js","webpack://ol/../src/source/Vector.js","webpack://ol/../src/source/Cluster.js","webpack://ol/../src/source/DataTile.js","webpack://ol/./node_modules/@petamoriken/float16/src/helper/converter.mjs","webpack://ol/./node_modules/@petamoriken/float16/src/helper/is.mjs","webpack://ol/./node_modules/@petamoriken/float16/src/DataView.mjs","webpack://ol/./node_modules/geotiff/dist-module/compression/index.js","webpack://ol/./node_modules/geotiff/dist-module/resample.js","webpack://ol/./node_modules/geotiff/dist-module/geotiffimage.js","webpack://ol/./node_modules/geotiff/dist-module/rgb.js","webpack://ol/./node_modules/geotiff/dist-module/dataview64.js","webpack://ol/./node_modules/geotiff/dist-module/dataslice.js","webpack://ol/./node_modules/geotiff/dist-module/source/httputils.js","webpack://ol/./node_modules/geotiff/dist-module/source/basesource.js","webpack://ol/./node_modules/geotiff/dist-module/utils.js","webpack://ol/./node_modules/geotiff/dist-module/source/blockedsource.js","webpack://ol/./node_modules/geotiff/dist-module/source/client/base.js","webpack://ol/./node_modules/geotiff/dist-module/source/client/fetch.js","webpack://ol/./node_modules/geotiff/dist-module/source/client/xhr.js","webpack://ol/./node_modules/geotiff/dist-module/source/client/http.js","webpack://ol/./node_modules/geotiff/dist-module/source/remote.js","webpack://ol/./node_modules/geotiff/dist-module/source/filereader.js","webpack://ol/./node_modules/geotiff/dist-module/geotiff.js","webpack://ol/./node_modules/geotiff/dist-module/pool.js","webpack://ol/../src/source/GeoTIFF.js","webpack://ol/../src/source/Zoomify.js","webpack://ol/../src/format/IIIFInfo.js","webpack://ol/../src/source/IIIF.js","webpack://ol/../src/reproj/Image.js","webpack://ol/../src/source/Image.js","webpack://ol/../src/source/ImageArcGISRest.js","webpack://ol/../src/source/ImageCanvas.js","webpack://ol/../src/source/ImageMapGuide.js","webpack://ol/../src/source/ImageStatic.js","webpack://ol/../src/source/wms.js","webpack://ol/../src/source/ImageWMS.js","webpack://ol/../src/source/ogcTileUtil.js","webpack://ol/../src/source/OGCMapTile.js","webpack://ol/../src/source/VectorTile.js","webpack://ol/../src/source/OGCVectorTile.js","webpack://ol/../src/source/OSM.js","webpack://ol/../src/layer/BaseImage.js","webpack://ol/../../src/renderer/canvas/Layer.js","webpack://ol/../src/source/Raster.js","webpack://ol/../../src/renderer/canvas/ImageLayer.js","webpack://ol/../src/layer/Image.js","webpack://ol/../src/layer/TileProperty.js","webpack://ol/../src/layer/BaseTile.js","webpack://ol/../../src/renderer/canvas/TileLayer.js","webpack://ol/../src/layer/Tile.js","webpack://ol/../src/source/Stamen.js","webpack://ol/../src/source/TileArcGISRest.js","webpack://ol/../src/source/TileDebug.js","webpack://ol/../src/source/TileJSON.js","webpack://ol/../src/source/TileWMS.js","webpack://ol/../src/source/UTFGrid.js","webpack://ol/../src/source/WMTS.js","webpack://ol/../src/source/common.js","webpack://ol/../src/layer/BaseVector.js","webpack://ol/../../src/renderer/webgl/PointsLayer.js","webpack://ol/../src/worker/webgl.js","webpack://ol/../../src/render/canvas/Instruction.js","webpack://ol/../../src/render/canvas/Builder.js","webpack://ol/../../src/render/canvas/ImageBuilder.js","webpack://ol/../../src/render/canvas/LineStringBuilder.js","webpack://ol/../../src/render/canvas/PolygonBuilder.js","webpack://ol/../../src/geom/flat/straightchunk.js","webpack://ol/../../src/render/canvas/TextBuilder.js","webpack://ol/../../src/render/canvas/BuilderGroup.js","webpack://ol/../../src/geom/flat/textpath.js","webpack://ol/../../src/geom/flat/length.js","webpack://ol/../../src/render/canvas/Executor.js","webpack://ol/../../src/render/canvas/ExecutorGroup.js","webpack://ol/../../src/render/canvas/hitdetect.js","webpack://ol/../../src/renderer/canvas/VectorLayer.js","webpack://ol/../../src/renderer/canvas/VectorImageLayer.js","webpack://ol/../src/layer/VectorTileRenderType.js","webpack://ol/../../src/renderer/canvas/VectorTileLayer.js","webpack://ol/../src/geom/MultiPoint.js","webpack://ol/../../src/geom/flat/interpolate.js","webpack://ol/../src/geom/LineString.js","webpack://ol/../src/geom/MultiLineString.js","webpack://ol/../../src/geom/flat/center.js","webpack://ol/../src/geom/MultiPolygon.js","webpack://ol/../src/render/Feature.js","webpack://ol/../src/layer/Vector.js","webpack://ol/../../src/geom/flat/geodesic.js","webpack://ol/../src/layer/Graticule.js","webpack://ol/../src/layer/Heatmap.js","webpack://ol/../src/format/Feature.js","webpack://ol/../src/format/MVT.js","webpack://ol/../src/layer/VectorTile.js","webpack://ol/../src/geom/GeometryCollection.js","webpack://ol/../src/format/JSONFeature.js","webpack://ol/../src/format/GeoJSON.js","webpack://ol/../node_modules/csscolorparser/csscolorparser.js","webpack://ol/./mapbox-gl-style-spec/util/color.js","webpack://ol/./mapbox-gl-style-spec/function/convert.js","webpack://ol/./mapbox-gl-style-spec/expression/parsing_error.js","webpack://ol/./mapbox-gl-style-spec/expression/scope.js","webpack://ol/./mapbox-gl-style-spec/expression/types.js","webpack://ol/./mapbox-gl-style-spec/expression/types/collator.js","webpack://ol/./mapbox-gl-style-spec/expression/types/formatted.js","webpack://ol/./mapbox-gl-style-spec/expression/types/resolved_image.js","webpack://ol/./mapbox-gl-style-spec/expression/values.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/literal.js","webpack://ol/./mapbox-gl-style-spec/expression/runtime_error.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/assertion.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/format.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/image.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/coercion.js","webpack://ol/./mapbox-gl-style-spec/expression/evaluation_context.js","webpack://ol/./mapbox-gl-style-spec/expression/compound_expression.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/collator.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/within.js","webpack://ol/./mapbox-gl-style-spec/expression/is_constant.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/var.js","webpack://ol/./mapbox-gl-style-spec/expression/parsing_context.js","webpack://ol/./mapbox-gl-style-spec/expression/stops.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/step.js","webpack://ol/./unitbezier/index.js","webpack://ol/./mapbox-gl-style-spec/util/interpolate.js","webpack://ol/./mapbox-gl-style-spec/util/color_spaces.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/interpolate.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/coalesce.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/let.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/at.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/in.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/index_of.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/match.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/case.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/slice.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/comparison.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/number_format.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/length.js","webpack://ol/./mapbox-gl-style-spec/expression/definitions/index.js","webpack://ol/./mapbox-gl-style-spec/util/result.js","webpack://ol/./mapbox-gl-style-spec/function/index.js","webpack://ol/./mapbox-gl-style-spec/expression/index.js","webpack://ol/./mapbox-gl-style-spec/util/properties.js","webpack://ol/./mapbox-gl-style-spec/util/unbundle_jsonlint.js","webpack://ol/./mapbox-gl-style-spec/reference/v8.json","webpack://ol/./mapbox-gl-style-spec/feature_filter/index.js","webpack://ol/./mapbox-gl-style-spec/util/ref_properties.js","webpack://ol/./mapbox-gl-style-spec/deref.js","webpack://ol/../node_modules/mapbox-to-css-font/index.js","webpack://ol/../src/mapbox.js","webpack://ol/../src/util.js","webpack://ol/../src/text.js","webpack://ol/../src/stylefunction.js","webpack://ol/../src/apply.js","webpack://ol/../src/layer/MapboxVector.js","webpack://ol/../src/layer/VectorImage.js","webpack://ol/../src/layer/WebGLPoints.js","webpack://ol/../src/layer/WebGLTile.js","webpack://ol/../src/interaction/DragAndDrop.js","webpack://ol/../src/interaction/DragRotateAndZoom.js","webpack://ol/../src/geom/Circle.js","webpack://ol/../src/interaction/Draw.js","webpack://ol/../src/interaction/Extent.js","webpack://ol/../src/interaction/Link.js","webpack://ol/../src/interaction/Modify.js","webpack://ol/../src/interaction/Select.js","webpack://ol/../src/interaction/Snap.js","webpack://ol/../src/interaction/Translate.js","webpack://ol/../../src/geom/flat/flip.js","webpack://ol/../src/format/EsriJSON.js","webpack://ol/../src/format/XMLFeature.js","webpack://ol/../src/format/GMLBase.js","webpack://ol/../src/format/xsd.js","webpack://ol/../src/format/GML2.js","webpack://ol/../src/format/GML3.js","webpack://ol/../src/format/GML.js","webpack://ol/../src/format/GML32.js","webpack://ol/../src/format/GPX.js","webpack://ol/../src/format/TextFeature.js","webpack://ol/../src/format/KML.js","webpack://ol/../src/format/IGC.js","webpack://ol/../src/format/OSMXML.js","webpack://ol/../src/format/XML.js","webpack://ol/../src/format/xlink.js","webpack://ol/../src/format/OWS.js","webpack://ol/../src/format/Polyline.js","webpack://ol/../src/format/TopoJSON.js","webpack://ol/../../src/format/filter/Filter.js","webpack://ol/../../src/format/filter/LogicalNary.js","webpack://ol/../../src/format/filter/And.js","webpack://ol/../../src/format/filter/Bbox.js","webpack://ol/../../src/format/filter/Spatial.js","webpack://ol/../../src/format/filter/Contains.js","webpack://ol/../../src/format/filter/DWithin.js","webpack://ol/../../src/format/filter/Disjoint.js","webpack://ol/../../src/format/filter/Comparison.js","webpack://ol/../../src/format/filter/During.js","webpack://ol/../../src/format/filter/ComparisonBinary.js","webpack://ol/../../src/format/filter/EqualTo.js","webpack://ol/../../src/format/filter/GreaterThan.js","webpack://ol/../../src/format/filter/GreaterThanOrEqualTo.js","webpack://ol/../../src/format/filter/Intersects.js","webpack://ol/../../src/format/filter/IsBetween.js","webpack://ol/../../src/format/filter/IsLike.js","webpack://ol/../../src/format/filter/IsNull.js","webpack://ol/../../src/format/filter/LessThan.js","webpack://ol/../../src/format/filter/LessThanOrEqualTo.js","webpack://ol/../../src/format/filter/Not.js","webpack://ol/../../src/format/filter/NotEqualTo.js","webpack://ol/../../src/format/filter/Or.js","webpack://ol/../../src/format/filter/ResourceId.js","webpack://ol/../../src/format/filter/Within.js","webpack://ol/../src/format/filter.js","webpack://ol/../src/format/WFS.js","webpack://ol/../src/format/WKB.js","webpack://ol/../src/format/WKT.js","webpack://ol/../src/format/WMSCapabilities.js","webpack://ol/../src/format/WMSGetFeatureInfo.js","webpack://ol/../src/format/WMTSCapabilities.js","webpack://ol/../src/control/FullScreen.js","webpack://ol/../src/control/MousePosition.js","webpack://ol/../src/control/OverviewMap.js","webpack://ol/../src/control/ScaleLine.js","webpack://ol/../src/control/ZoomSlider.js","webpack://ol/../src/control/ZoomToExtent.js","webpack://ol/./build/index.js","webpack://ol/../../src/geom/flat/topology.js","webpack://ol/../src/proj/proj4.js","webpack://ol/src/source.js","webpack://ol/./node_modules/geotiff/dist-module/globals.js","webpack://ol/webpack/bootstrap","webpack://ol/webpack/runtime/define property getters","webpack://ol/webpack/runtime/ensure chunk","webpack://ol/webpack/runtime/get javascript chunk filename","webpack://ol/webpack/runtime/global","webpack://ol/webpack/runtime/hasOwnProperty shorthand","webpack://ol/webpack/runtime/make namespace object","webpack://ol/webpack/runtime/publicPath","webpack://ol/webpack/runtime/jsonp chunk loading","webpack://ol/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === '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})(self, function() {\nreturn ","var inProgress = {};\nvar dataWebpackPrefix = \"ol:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.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","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest.  the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node.  This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n  constructor (options) {\n    if (typeof options === 'number')\n      options = { max: options }\n\n    if (!options)\n      options = {}\n\n    if (options.max && (typeof options.max !== 'number' || options.max < 0))\n      throw new TypeError('max must be a non-negative number')\n    // Kind of weird to have a default max of Infinity, but oh well.\n    const max = this[MAX] = options.max || Infinity\n\n    const lc = options.length || naiveLength\n    this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n    this[ALLOW_STALE] = options.stale || false\n    if (options.maxAge && typeof options.maxAge !== 'number')\n      throw new TypeError('maxAge must be a number')\n    this[MAX_AGE] = options.maxAge || 0\n    this[DISPOSE] = options.dispose\n    this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n    this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n    this.reset()\n  }\n\n  // resize the cache when the max changes.\n  set max (mL) {\n    if (typeof mL !== 'number' || mL < 0)\n      throw new TypeError('max must be a non-negative number')\n\n    this[MAX] = mL || Infinity\n    trim(this)\n  }\n  get max () {\n    return this[MAX]\n  }\n\n  set allowStale (allowStale) {\n    this[ALLOW_STALE] = !!allowStale\n  }\n  get allowStale () {\n    return this[ALLOW_STALE]\n  }\n\n  set maxAge (mA) {\n    if (typeof mA !== 'number')\n      throw new TypeError('maxAge must be a non-negative number')\n\n    this[MAX_AGE] = mA\n    trim(this)\n  }\n  get maxAge () {\n    return this[MAX_AGE]\n  }\n\n  // resize the cache when the lengthCalculator changes.\n  set lengthCalculator (lC) {\n    if (typeof lC !== 'function')\n      lC = naiveLength\n\n    if (lC !== this[LENGTH_CALCULATOR]) {\n      this[LENGTH_CALCULATOR] = lC\n      this[LENGTH] = 0\n      this[LRU_LIST].forEach(hit => {\n        hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n        this[LENGTH] += hit.length\n      })\n    }\n    trim(this)\n  }\n  get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n  get length () { return this[LENGTH] }\n  get itemCount () { return this[LRU_LIST].length }\n\n  rforEach (fn, thisp) {\n    thisp = thisp || this\n    for (let walker = this[LRU_LIST].tail; walker !== null;) {\n      const prev = walker.prev\n      forEachStep(this, fn, walker, thisp)\n      walker = prev\n    }\n  }\n\n  forEach (fn, thisp) {\n    thisp = thisp || this\n    for (let walker = this[LRU_LIST].head; walker !== null;) {\n      const next = walker.next\n      forEachStep(this, fn, walker, thisp)\n      walker = next\n    }\n  }\n\n  keys () {\n    return this[LRU_LIST].toArray().map(k => k.key)\n  }\n\n  values () {\n    return this[LRU_LIST].toArray().map(k => k.value)\n  }\n\n  reset () {\n    if (this[DISPOSE] &&\n        this[LRU_LIST] &&\n        this[LRU_LIST].length) {\n      this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n    }\n\n    this[CACHE] = new Map() // hash of items by key\n    this[LRU_LIST] = new Yallist() // list of items in order of use recency\n    this[LENGTH] = 0 // length of items in the list\n  }\n\n  dump () {\n    return this[LRU_LIST].map(hit =>\n      isStale(this, hit) ? false : {\n        k: hit.key,\n        v: hit.value,\n        e: hit.now + (hit.maxAge || 0)\n      }).toArray().filter(h => h)\n  }\n\n  dumpLru () {\n    return this[LRU_LIST]\n  }\n\n  set (key, value, maxAge) {\n    maxAge = maxAge || this[MAX_AGE]\n\n    if (maxAge && typeof maxAge !== 'number')\n      throw new TypeError('maxAge must be a number')\n\n    const now = maxAge ? Date.now() : 0\n    const len = this[LENGTH_CALCULATOR](value, key)\n\n    if (this[CACHE].has(key)) {\n      if (len > this[MAX]) {\n        del(this, this[CACHE].get(key))\n        return false\n      }\n\n      const node = this[CACHE].get(key)\n      const item = node.value\n\n      // dispose of the old one before overwriting\n      // split out into 2 ifs for better coverage tracking\n      if (this[DISPOSE]) {\n        if (!this[NO_DISPOSE_ON_SET])\n          this[DISPOSE](key, item.value)\n      }\n\n      item.now = now\n      item.maxAge = maxAge\n      item.value = value\n      this[LENGTH] += len - item.length\n      item.length = len\n      this.get(key)\n      trim(this)\n      return true\n    }\n\n    const hit = new Entry(key, value, len, now, maxAge)\n\n    // oversized objects fall out of cache automatically.\n    if (hit.length > this[MAX]) {\n      if (this[DISPOSE])\n        this[DISPOSE](key, value)\n\n      return false\n    }\n\n    this[LENGTH] += hit.length\n    this[LRU_LIST].unshift(hit)\n    this[CACHE].set(key, this[LRU_LIST].head)\n    trim(this)\n    return true\n  }\n\n  has (key) {\n    if (!this[CACHE].has(key)) return false\n    const hit = this[CACHE].get(key).value\n    return !isStale(this, hit)\n  }\n\n  get (key) {\n    return get(this, key, true)\n  }\n\n  peek (key) {\n    return get(this, key, false)\n  }\n\n  pop () {\n    const node = this[LRU_LIST].tail\n    if (!node)\n      return null\n\n    del(this, node)\n    return node.value\n  }\n\n  del (key) {\n    del(this, this[CACHE].get(key))\n  }\n\n  load (arr) {\n    // reset the cache\n    this.reset()\n\n    const now = Date.now()\n    // A previous serialized cache has the most recent items first\n    for (let l = arr.length - 1; l >= 0; l--) {\n      const hit = arr[l]\n      const expiresAt = hit.e || 0\n      if (expiresAt === 0)\n        // the item was created without expiration in a non aged cache\n        this.set(hit.k, hit.v)\n      else {\n        const maxAge = expiresAt - now\n        // dont add already expired items\n        if (maxAge > 0) {\n          this.set(hit.k, hit.v, maxAge)\n        }\n      }\n    }\n  }\n\n  prune () {\n    this[CACHE].forEach((value, key) => get(this, key, false))\n  }\n}\n\nconst get = (self, key, doUse) => {\n  const node = self[CACHE].get(key)\n  if (node) {\n    const hit = node.value\n    if (isStale(self, hit)) {\n      del(self, node)\n      if (!self[ALLOW_STALE])\n        return undefined\n    } else {\n      if (doUse) {\n        if (self[UPDATE_AGE_ON_GET])\n          node.value.now = Date.now()\n        self[LRU_LIST].unshiftNode(node)\n      }\n    }\n    return hit.value\n  }\n}\n\nconst isStale = (self, hit) => {\n  if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n    return false\n\n  const diff = Date.now() - hit.now\n  return hit.maxAge ? diff > hit.maxAge\n    : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n  if (self[LENGTH] > self[MAX]) {\n    for (let walker = self[LRU_LIST].tail;\n      self[LENGTH] > self[MAX] && walker !== null;) {\n      // We know that we're about to delete this one, and also\n      // what the next least recently used key will be, so just\n      // go ahead and set it now.\n      const prev = walker.prev\n      del(self, walker)\n      walker = prev\n    }\n  }\n}\n\nconst del = (self, node) => {\n  if (node) {\n    const hit = node.value\n    if (self[DISPOSE])\n      self[DISPOSE](hit.key, hit.value)\n\n    self[LENGTH] -= hit.length\n    self[CACHE].delete(hit.key)\n    self[LRU_LIST].removeNode(node)\n  }\n}\n\nclass Entry {\n  constructor (key, value, length, now, maxAge) {\n    this.key = key\n    this.value = value\n    this.length = length\n    this.now = now\n    this.maxAge = maxAge || 0\n  }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n  let hit = node.value\n  if (isStale(self, hit)) {\n    del(self, node)\n    if (!self[ALLOW_STALE])\n      hit = undefined\n  }\n  if (hit)\n    fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\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 === 'undefined' ? 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 val;\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 browser 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 = readPackedEnd(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 & 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) | (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    writePackedFixed32:  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 writePackedFloat(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 writeInt32(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 > 0xFFFF) {\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","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=t||self).RBush=i()}(this,function(){\"use strict\";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1),m=Math.max(e,Math.floor(r-s*f/o+u)),c=Math.min(a,Math.floor(r+(o-s)*f/o+u));t(n,r,m,c,h)}var p=n[r],d=e,x=a;for(i(n,e,r),h(n[a],p)>0&&i(n,e,a);d<x;){for(i(n,d,x),d++,x--;h(n[d],p)<0;)d++;for(;h(n[x],p)>0;)x--}0===h(n[e],p)?i(n,e,x):i(n,++x,a),x<=r&&(e=x+1),r<=x&&(a=x-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return t<i?-1:t>i?1:0}var r=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 e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r<i.length;r++)if(n(t,i[r]))return r;return-1}function a(t,i){h(t,0,t.children.length,i,t)}function h(t,i,n,r,e){e||(e=p(null)),e.minX=1/0,e.minY=1/0,e.maxX=-1/0,e.maxY=-1/0;for(var a=i;a<n;a++){var h=t.children[a];o(e,t.leaf?r(h):h)}return e}function o(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function s(t,i){return t.minX-i.minX}function l(t,i){return t.minY-i.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function c(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a<i.children.length;a++){var h=i.children[a],o=i.leaf?r(h):h;c(t,o)&&(i.leaf?n.push(h):m(t,o)?this._all(h,n):e.push(h))}i=e.pop()}return n},r.prototype.collides=function(t){var i=this.data;if(!c(t,i))return!1;for(var n=[];i;){for(var r=0;r<i.children.length;r++){var e=i.children[r],a=i.leaf?this.toBBox(e):e;if(c(t,a)){if(i.leaf||m(t,a))return!0;n.push(e)}}i=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var i=0;i<t.length;i++)this.insert(t[i]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,i){if(!t)return this;for(var n,r,a,h=this.data,o=this.toBBox(t),s=[],l=[];h||s.length;){if(h||(h=s.pop(),r=s[s.length-1],n=l.pop(),a=!0),h.leaf){var f=e(t,h.children,i);if(-1!==f)return h.children.splice(f,1),s.push(h),this._condense(s),this}a||h.leaf||!m(h,o)?r?(n++,h=r.children[n],a=!1):h=null:(s.push(h),l.push(n),n=0,r=h,h=h.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,i){return t.minX-i.minX},r.prototype.compareMinY=function(t,i){return t.minY-i.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,i){for(var n=[];t;)t.leaf?i.push.apply(i,t.children):n.push.apply(n,t.children),t=n.pop();return i},r.prototype._build=function(t,i,n,r){var e,h=n-i+1,o=this._maxEntries;if(h<=o)return a(e=p(t.slice(i,n+1)),this.toBBox),e;r||(r=Math.ceil(Math.log(h)/Math.log(o)),o=Math.ceil(h/Math.pow(o,r-1))),(e=p([])).leaf=!1,e.height=r;var s=Math.ceil(h/o),l=s*Math.ceil(Math.sqrt(o));d(t,i,n,l,this.compareMinX);for(var f=i;f<=n;f+=l){var u=Math.min(f+l-1,n);d(t,f,u,s,this.compareMinY);for(var m=f;m<=u;m+=s){var c=Math.min(m+s-1,u);e.children.push(this._build(t,m,c,r-1))}}return a(e,this.toBBox),e},r.prototype._chooseSubtree=function(t,i,n,r){for(;r.push(i),!i.leaf&&r.length-1!==n;){for(var e=1/0,a=1/0,h=void 0,o=0;o<i.children.length;o++){var s=i.children[o],l=f(s),u=(m=t,c=s,(Math.max(c.maxX,m.maxX)-Math.min(c.minX,m.minX))*(Math.max(c.maxY,m.maxY)-Math.min(c.minY,m.minY))-l);u<a?(a=u,e=l<e?l:e,h=s):u===a&&l<e&&(e=l,h=s)}i=h||i.children[0]}var m,c;return i},r.prototype._insert=function(t,i,n){var r=n?t:this.toBBox(t),e=[],a=this._chooseSubtree(r,this.data,i,e);for(a.children.push(t),o(a,r);i>=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,o=void 0,s=void 0,l=void 0,u=void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v<m?(m=v,r=p,c=M<c?M:c):v===m&&M<c&&(c=M,r=p)}return r||n-i},r.prototype._chooseSplitAxis=function(t,i,n){var r=t.leaf?this.compareMinX:s,e=t.leaf?this.compareMinY:l;this._allDistMargin(t,i,n,r)<this._allDistMargin(t,i,n,e)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,i,n,r){t.children.sort(r);for(var e=this.toBBox,a=h(t,0,i,e),s=h(t,n-i,n,e),l=u(a)+u(s),f=i;f<n-i;f++){var m=t.children[f];o(a,t.leaf?e(m):m),l+=u(a)}for(var c=n-i-1;c>=i;c--){var p=t.children[c];o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  function define(obj, key, value) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n    return obj[key];\n  }\n  try {\n    // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n    define({}, \"\");\n  } catch (err) {\n    define = function(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n    return generator;\n  }\n  exports.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = GeneratorFunctionPrototype;\n  define(Gp, \"constructor\", GeneratorFunctionPrototype);\n  define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n  GeneratorFunction.displayName = define(\n    GeneratorFunctionPrototype,\n    toStringTagSymbol,\n    \"GeneratorFunction\"\n  );\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      define(prototype, method, function(arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n\n  exports.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  exports.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  exports.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return PromiseImpl.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return PromiseImpl.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration.\n          result.value = unwrapped;\n          resolve(result);\n        }, function(error) {\n          // If a rejected Promise was yielded, throw the rejection back\n          // into the async generator function so it can be handled there.\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new PromiseImpl(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    this._invoke = enqueue;\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  });\n  exports.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList),\n      PromiseImpl\n    );\n\n    return exports.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method always terminates the yield* loop.\n      context.delegate = null;\n\n      if (context.method === \"throw\") {\n        // Note: [\"return\"] must be used for ES3 parsing compatibility.\n        if (delegate.iterator[\"return\"]) {\n          // If the delegate iterator has a return method, give it a\n          // chance to clean up.\n          context.method = \"return\";\n          context.arg = undefined;\n          maybeInvokeDelegate(delegate, context);\n\n          if (context.method === \"throw\") {\n            // If maybeInvokeDelegate(context) changed context.method from\n            // \"return\" to \"throw\", let that override the TypeError below.\n            return ContinueSentinel;\n          }\n        }\n\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a 'throw' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  define(Gp, toStringTagSymbol, \"Generator\");\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  define(Gp, iteratorSymbol, function() {\n    return this;\n  });\n\n  define(Gp, \"toString\", function() {\n    return \"[object Generator]\";\n  });\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  exports.keys = function(object) {\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  exports.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n\n  // Regardless of whether this script is executing as a CommonJS module\n  // or not, return the runtime object so that we can declare the variable\n  // regeneratorRuntime in the outer scope, which allows this module to be\n  // injected easily by `bin/regenerator --include-runtime script.js`.\n  return exports;\n\n}(\n  // If this script is executing as a CommonJS module, use module.exports\n  // as the regeneratorRuntime namespace. Otherwise create a new empty\n  // object. Either way, the resulting object will be used to initialize\n  // the regeneratorRuntime variable at the top of this file.\n  typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  // This module should not be running in strict mode, so the above\n  // assignment should always work unless something is misconfigured. Just\n  // in case runtime.js accidentally runs in strict mode, in modern engines\n  // we can explicitly access globalThis. In older engines we can escape\n  // strict mode using a global Function call. This could conceivably fail\n  // if a Content Security Policy forbids using Function, but in that case\n  // the proper solution is to fix the accidental strict mode problem. If\n  // you've misconfigured your bundler to force strict mode and applied a\n  // CSP to forbid Function, and you're not willing to fix either of those\n  // problems, please detail your unique predicament in a GitHub issue.\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n","const indexOfMatch = require(\"./index-of-match.js\");\n\nfunction findTagByName(xml, tagName, options) {\n  const debug = (options && options.debug) || false;\n\n  const startIndex = (options && options.startIndex) || 0;\n\n  if (debug) console.log(\"starting findTagByName with\", tagName, \" and \", options);\n\n  const start = indexOfMatch(xml, `\\<${tagName}[ \\>]`, startIndex);\n  if (debug) console.log(\"start:\", start);\n  if (start === -1) return undefined;\n\n  const afterStart = xml.slice(start + tagName.length);\n  let relativeEnd = indexOfMatch(afterStart, \"[ /]\" + tagName + \">\", 0);\n  const selfClosing = relativeEnd === -1;\n\n  if (selfClosing) {\n    relativeEnd = indexOfMatch(afterStart, \"[ /]>\", 0);\n  }\n\n  const end = start + tagName.length + relativeEnd + 1 + (selfClosing ? 0 : tagName.length) + 1;\n  if (debug) console.log(\"end:\", end);\n  if (end === -1) return undefined;\n\n  const outer = xml.slice(start, end);\n  // tag is like <gml:identifier codeSpace=\"OGP\">urn:ogc:def:crs:EPSG::32617</gml:identifier>\n\n  let inner;\n  if (selfClosing) {\n    inner = null;\n  } else {\n    inner = outer.slice(outer.indexOf(\">\") + 1, outer.lastIndexOf(\"<\"));\n  }\n\n  return { inner, outer, start, end };\n}\n\nmodule.exports = findTagByName;\n","const findTagByName = require(\"./find-tag-by-name.js\");\n\nfunction findTagsByName(xml, tagName, options) {\n  const tags = [];\n  const debug = (options && options.debug) || false;\n  let startIndex = (options && options.startIndex) || 0;\n  let tag;\n  while ((tag = findTagByName(xml, tagName, { debug, startIndex }))) {\n    startIndex = tag.end;\n    tags.push(tag);\n  }\n  if (debug) console.log(\"findTagsByName found\", tags.length, \"tags\");\n  return tags;\n}\n\nmodule.exports = findTagsByName;\n","function getAttribute(tag, attributeName, options) {\n  const debug = (options && options.debug) || false;\n  if (debug) console.log(\"getting \" + attributeName + \" in \" + tag);\n\n  const xml = typeof tag === \"object\" ? tag.outer : tag;\n\n  const pattern = `${attributeName}\\\\=\"\\([^\"]*\\)\"`;\n  if (debug) console.log(\"pattern:\", pattern);\n\n  const re = new RegExp(pattern);\n  const match = re.exec(xml);\n  if (debug) console.log(\"match:\", match);\n  if (match) return match[1];\n}\n\nmodule.exports = getAttribute;\n","function indexOfMatch(xml, pattern, startIndex) {\n  const re = new RegExp(pattern);\n  const match = re.exec(xml.slice(startIndex));\n  if (match) return startIndex + match.index;\n  else return -1;\n}\n\nmodule.exports = indexOfMatch;\n","'use strict'\nmodule.exports = function (Yallist) {\n  Yallist.prototype[Symbol.iterator] = function* () {\n    for (let walker = this.head; walker; walker = walker.next) {\n      yield walker.value\n    }\n  }\n}\n","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n  var self = this\n  if (!(self instanceof Yallist)) {\n    self = new Yallist()\n  }\n\n  self.tail = null\n  self.head = null\n  self.length = 0\n\n  if (list && typeof list.forEach === 'function') {\n    list.forEach(function (item) {\n      self.push(item)\n    })\n  } else if (arguments.length > 0) {\n    for (var i = 0, l = arguments.length; i < l; i++) {\n      self.push(arguments[i])\n    }\n  }\n\n  return self\n}\n\nYallist.prototype.removeNode = function (node) {\n  if (node.list !== this) {\n    throw new Error('removing node which does not belong to this list')\n  }\n\n  var next = node.next\n  var prev = node.prev\n\n  if (next) {\n    next.prev = prev\n  }\n\n  if (prev) {\n    prev.next = next\n  }\n\n  if (node === this.head) {\n    this.head = next\n  }\n  if (node === this.tail) {\n    this.tail = prev\n  }\n\n  node.list.length--\n  node.next = null\n  node.prev = null\n  node.list = null\n\n  return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n  if (node === this.head) {\n    return\n  }\n\n  if (node.list) {\n    node.list.removeNode(node)\n  }\n\n  var head = this.head\n  node.list = this\n  node.next = head\n  if (head) {\n    head.prev = node\n  }\n\n  this.head = node\n  if (!this.tail) {\n    this.tail = node\n  }\n  this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n  if (node === this.tail) {\n    return\n  }\n\n  if (node.list) {\n    node.list.removeNode(node)\n  }\n\n  var tail = this.tail\n  node.list = this\n  node.prev = tail\n  if (tail) {\n    tail.next = node\n  }\n\n  this.tail = node\n  if (!this.head) {\n    this.head = node\n  }\n  this.length++\n}\n\nYallist.prototype.push = function () {\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    push(this, arguments[i])\n  }\n  return this.length\n}\n\nYallist.prototype.unshift = function () {\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    unshift(this, arguments[i])\n  }\n  return this.length\n}\n\nYallist.prototype.pop = function () {\n  if (!this.tail) {\n    return undefined\n  }\n\n  var res = this.tail.value\n  this.tail = this.tail.prev\n  if (this.tail) {\n    this.tail.next = null\n  } else {\n    this.head = null\n  }\n  this.length--\n  return res\n}\n\nYallist.prototype.shift = function () {\n  if (!this.head) {\n    return undefined\n  }\n\n  var res = this.head.value\n  this.head = this.head.next\n  if (this.head) {\n    this.head.prev = null\n  } else {\n    this.tail = null\n  }\n  this.length--\n  return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n  thisp = thisp || this\n  for (var walker = this.head, i = 0; walker !== null; i++) {\n    fn.call(thisp, walker.value, i, this)\n    walker = walker.next\n  }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n  thisp = thisp || this\n  for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n    fn.call(thisp, walker.value, i, this)\n    walker = walker.prev\n  }\n}\n\nYallist.prototype.get = function (n) {\n  for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n    // abort out of the list early if we hit a cycle\n    walker = walker.next\n  }\n  if (i === n && walker !== null) {\n    return walker.value\n  }\n}\n\nYallist.prototype.getReverse = function (n) {\n  for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n    // abort out of the list early if we hit a cycle\n    walker = walker.prev\n  }\n  if (i === n && walker !== null) {\n    return walker.value\n  }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n  thisp = thisp || this\n  var res = new Yallist()\n  for (var walker = this.head; walker !== null;) {\n    res.push(fn.call(thisp, walker.value, this))\n    walker = walker.next\n  }\n  return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n  thisp = thisp || this\n  var res = new Yallist()\n  for (var walker = this.tail; walker !== null;) {\n    res.push(fn.call(thisp, walker.value, this))\n    walker = walker.prev\n  }\n  return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n  var acc\n  var walker = this.head\n  if (arguments.length > 1) {\n    acc = initial\n  } else if (this.head) {\n    walker = this.head.next\n    acc = this.head.value\n  } else {\n    throw new TypeError('Reduce of empty list with no initial value')\n  }\n\n  for (var i = 0; walker !== null; i++) {\n    acc = fn(acc, walker.value, i)\n    walker = walker.next\n  }\n\n  return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n  var acc\n  var walker = this.tail\n  if (arguments.length > 1) {\n    acc = initial\n  } else if (this.tail) {\n    walker = this.tail.prev\n    acc = this.tail.value\n  } else {\n    throw new TypeError('Reduce of empty list with no initial value')\n  }\n\n  for (var i = this.length - 1; walker !== null; i--) {\n    acc = fn(acc, walker.value, i)\n    walker = walker.prev\n  }\n\n  return acc\n}\n\nYallist.prototype.toArray = function () {\n  var arr = new Array(this.length)\n  for (var i = 0, walker = this.head; walker !== null; i++) {\n    arr[i] = walker.value\n    walker = walker.next\n  }\n  return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n  var arr = new Array(this.length)\n  for (var i = 0, walker = this.tail; walker !== null; i++) {\n    arr[i] = walker.value\n    walker = walker.prev\n  }\n  return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n  to = to || this.length\n  if (to < 0) {\n    to += this.length\n  }\n  from = from || 0\n  if (from < 0) {\n    from += this.length\n  }\n  var ret = new Yallist()\n  if (to < from || to < 0) {\n    return ret\n  }\n  if (from < 0) {\n    from = 0\n  }\n  if (to > this.length) {\n    to = this.length\n  }\n  for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n    walker = walker.next\n  }\n  for (; walker !== null && i < to; i++, walker = walker.next) {\n    ret.push(walker.value)\n  }\n  return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n  to = to || this.length\n  if (to < 0) {\n    to += this.length\n  }\n  from = from || 0\n  if (from < 0) {\n    from += this.length\n  }\n  var ret = new Yallist()\n  if (to < from || to < 0) {\n    return ret\n  }\n  if (from < 0) {\n    from = 0\n  }\n  if (to > this.length) {\n    to = this.length\n  }\n  for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n    walker = walker.prev\n  }\n  for (; walker !== null && i > from; i--, walker = walker.prev) {\n    ret.push(walker.value)\n  }\n  return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n  if (start > this.length) {\n    start = this.length - 1\n  }\n  if (start < 0) {\n    start = this.length + start;\n  }\n\n  for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n    walker = walker.next\n  }\n\n  var ret = []\n  for (var i = 0; walker && i < deleteCount; i++) {\n    ret.push(walker.value)\n    walker = this.removeNode(walker)\n  }\n  if (walker === null) {\n    walker = this.tail\n  }\n\n  if (walker !== this.head && walker !== this.tail) {\n    walker = walker.prev\n  }\n\n  for (var i = 0; i < nodes.length; i++) {\n    walker = insert(this, walker, nodes[i])\n  }\n  return ret;\n}\n\nYallist.prototype.reverse = function () {\n  var head = this.head\n  var tail = this.tail\n  for (var walker = head; walker !== null; walker = walker.prev) {\n    var p = walker.prev\n    walker.prev = walker.next\n    walker.next = p\n  }\n  this.head = tail\n  this.tail = head\n  return this\n}\n\nfunction insert (self, node, value) {\n  var inserted = node === self.head ?\n    new Node(value, null, node, self) :\n    new Node(value, node, node.next, self)\n\n  if (inserted.next === null) {\n    self.tail = inserted\n  }\n  if (inserted.prev === null) {\n    self.head = inserted\n  }\n\n  self.length++\n\n  return inserted\n}\n\nfunction push (self, item) {\n  self.tail = new Node(item, self.tail, null, self)\n  if (!self.head) {\n    self.head = self.tail\n  }\n  self.length++\n}\n\nfunction unshift (self, item) {\n  self.head = new Node(item, null, self.head, self)\n  if (!self.tail) {\n    self.tail = self.head\n  }\n  self.length++\n}\n\nfunction Node (value, prev, next, list) {\n  if (!(this instanceof Node)) {\n    return new Node(value, prev, next, list)\n  }\n\n  this.list = list\n  this.value = value\n\n  if (prev) {\n    prev.next = this\n    this.prev = prev\n  } else {\n    this.prev = null\n  }\n\n  if (next) {\n    next.prev = this\n    this.next = next\n  } else {\n    this.next = null\n  }\n}\n\ntry {\n  // add if support for Symbol.iterator is present\n  require('./iterator.js')(Yallist)\n} catch (er) {}\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"// algorithm: http://fox-toolkit.org/ftp/fasthalffloatconversion.pdf\n\nconst buffer = new ArrayBuffer(4);\nconst floatView = new Float32Array(buffer);\nconst uint32View = new Uint32Array(buffer);\n\nconst baseTable = new Uint32Array(512);\nconst shiftTable = new Uint32Array(512);\n\nfor (let i = 0; i < 256; ++i) {\n  const e = i - 127;\n\n  // very small number (0, -0)\n  if (e < -27) {\n    baseTable[i]         = 0x0000;\n    baseTable[i | 0x100] = 0x8000;\n    shiftTable[i]         = 24;\n    shiftTable[i | 0x100] = 24;\n\n  // small number (denorm)\n  } else if (e < -14) {\n    baseTable[i]         =  0x0400 >> (-e - 14);\n    baseTable[i | 0x100] = (0x0400 >> (-e - 14)) | 0x8000;\n    shiftTable[i]         = -e - 1;\n    shiftTable[i | 0x100] = -e - 1;\n\n  // normal number\n  } else if (e <= 15) {\n    baseTable[i]         =  (e + 15) << 10;\n    baseTable[i | 0x100] = ((e + 15) << 10) | 0x8000;\n    shiftTable[i]         = 13;\n    shiftTable[i | 0x100] = 13;\n\n  // large number (Infinity, -Infinity)\n  } else if (e < 128) {\n    baseTable[i]         = 0x7c00;\n    baseTable[i | 0x100] = 0xfc00;\n    shiftTable[i]         = 24;\n    shiftTable[i | 0x100] = 24;\n\n  // stay (NaN, Infinity, -Infinity)\n  } else {\n    baseTable[i]         = 0x7c00;\n    baseTable[i | 0x100] = 0xfc00;\n    shiftTable[i]         = 13;\n    shiftTable[i | 0x100] = 13;\n  }\n}\n\n/**\n * round a number to a half float number bits.\n * @param {number} num - double float\n * @returns {number} half float number bits\n */\nexport function roundToFloat16Bits(num) {\n  floatView[0] = num;\n  const f = uint32View[0];\n  const e = (f >> 23) & 0x1ff;\n  return baseTable[e] + ((f & 0x007fffff) >> shiftTable[e]);\n}\n\nconst mantissaTable = new Uint32Array(2048);\nconst exponentTable = new Uint32Array(64);\nconst offsetTable = new Uint32Array(64);\n\nmantissaTable[0] = 0;\nfor (let i = 1; i < 1024; ++i) {\n  let m = i << 13;    // zero pad mantissa bits\n  let e = 0;          // zero exponent\n\n  // normalized\n  while((m & 0x00800000) === 0) {\n    e -= 0x00800000;  // decrement exponent\n    m <<= 1;\n  }\n\n  m &= ~0x00800000;   // clear leading 1 bit\n  e += 0x38800000;    // adjust bias\n\n  mantissaTable[i] = m | e;\n}\nfor (let i = 1024; i < 2048; ++i) {\n  mantissaTable[i] = 0x38000000 + ((i - 1024) << 13);\n}\n\nexponentTable[0] = 0;\nfor (let i = 1; i < 31; ++i) {\n  exponentTable[i] = i << 23;\n}\nexponentTable[31] = 0x47800000;\nexponentTable[32] = 0x80000000;\nfor (let i = 33; i < 63; ++i) {\n  exponentTable[i] = 0x80000000 + ((i - 32) << 23);\n}\nexponentTable[63] = 0xc7800000;\n\noffsetTable[0] = 0;\nfor (let i = 1; i < 64; ++i) {\n  if (i === 32) {\n    offsetTable[i] = 0;\n  } else {\n    offsetTable[i] = 1024;\n  }\n}\n\n/**\n * convert a half float number bits to a number.\n * @param {number} float16bits - half float number bits\n * @returns {number} double float\n */\nexport function convertToNumber(float16bits) {\n  const m = float16bits >> 10;\n  uint32View[0] = mantissaTable[offsetTable[m] + (float16bits & 0x3ff)] + exponentTable[m];\n  return floatView[0];\n}\n","/**\n * @param {unknown} value\n * @returns {value is object}\n */\nexport function isObject(value) {\n  return (value !== null && typeof value === \"object\") || typeof value === \"function\";\n}\n\n/**\n * @param {unknown} value\n * @returns {value is object}\n */\nexport function isObjectLike(value) {\n  return value !== null && typeof value === \"object\";\n}\n\n// Inspired by util.types implementation of Node.js\nconst TypedArrayPrototype = Reflect.getPrototypeOf(Uint8Array).prototype;\nconst getTypedArrayPrototypeSybolToStringTag = Reflect.getOwnPropertyDescriptor(TypedArrayPrototype, Symbol.toStringTag).get;\n\n/**\n * @param {unknown} value\n * @returns {value is Uint8Array|Uint8ClampedArray|Uint16Array|Uint32Array|Int8Array|Int16Array|Int32Array|Float32Array|Float64Array|BigUint64Array|BigInt64Array}\n */\nexport function isTypedArray(value) {\n  return getTypedArrayPrototypeSybolToStringTag.call(value) !== undefined;\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Uint16Array}\n */\nexport function isUint16Array(value) {\n  return getTypedArrayPrototypeSybolToStringTag.call(value) === \"Uint16Array\";\n}\n\nconst toString = Object.prototype.toString;\n\n/**\n * @param {unknown} value\n * @returns {value is DataView}\n */\nexport function isDataView(value) {\n  if (!ArrayBuffer.isView(value)) {\n    return false;\n  }\n\n  if (isTypedArray(value)) {\n    return false;\n  }\n\n  if (toString.call(value) !== \"[object DataView]\") {\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * @param {unknown} value\n * @returns {value is ArrayBuffer}\n */\nexport function isArrayBuffer(value) {\n  return isObjectLike(value) && toString.call(value) === \"[object ArrayBuffer]\";\n}\n\n/**\n * @param {unknown} value\n * @returns {value is SharedArrayBuffer}\n */\nexport function isSharedArrayBuffer(value) {\n  return isObjectLike(value) && toString.call(value) === \"[object SharedArrayBuffer]\";\n}\n\n/**\n * @param {unknown} value\n * @returns {value is Iterable}\n */\nexport function isIterable(value) {\n  return isObject(value) && typeof value[Symbol.iterator] === \"function\";\n}\n\n/**\n * @param {unknown} value\n * @returns {value is any[]}\n */\nexport function isOrdinaryArray(value) {\n  if (!Array.isArray(value)) {\n    return false;\n  }\n\n  const iterator = value[Symbol.iterator]();\n  if (toString.call(iterator) !== \"[object Array Iterator]\") {\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * @param {unknown} value\n * @returns {value is any[]}\n */\nexport function isOrdinaryTypedArray(value) {\n  if (!isTypedArray(value)) {\n    return false;\n  }\n\n  const iterator = value[Symbol.iterator]();\n  if (toString.call(iterator) !== \"[object Array Iterator]\") {\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * @param {unknown} value\n * @returns {value is string}\n */\nexport function isCanonicalIntegerIndexString(value) {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n\n  const number = Number(value);\n  if (value !== number + \"\") {\n    return false;\n  }\n\n  if (!Number.isFinite(number)) {\n    return false;\n  }\n\n  if (number !== Math.trunc(number)) {\n    return false;\n  }\n\n  return true;\n}\n","import { convertToNumber, roundToFloat16Bits } from \"./helper/converter.mjs\";\nimport { isDataView } from \"./helper/is.mjs\";\n\n/**\n * returns an unsigned 16-bit float at the specified byte offset from the start of the DataView.\n * @param {DataView} dataView\n * @param {number} byteOffset\n * @param {[boolean]} opts\n * @returns {number}\n */\nexport function getFloat16(dataView, byteOffset, ...opts) {\n  if (!isDataView(dataView)) {\n    throw new TypeError(\"First argument to getFloat16 function must be a DataView\");\n  }\n\n  return convertToNumber( dataView.getUint16(byteOffset, ...opts) );\n}\n\n/**\n * stores an unsigned 16-bit float value at the specified byte offset from the start of the DataView.\n * @param {DataView} dataView\n * @param {number} byteOffset\n * @param {number} value\n * @param {[boolean]} opts\n */\nexport function setFloat16(dataView, byteOffset, value, ...opts) {\n  if (!isDataView(dataView)) {\n    throw new TypeError(\"First argument to setFloat16 function must be a DataView\");\n  }\n\n  dataView.setUint16(byteOffset, roundToFloat16Bits(value), ...opts);\n}\n","const registry = new Map();\n\nexport function addDecoder(cases, importFn) {\n  if (!Array.isArray(cases)) {\n    cases = [cases]; // eslint-disable-line no-param-reassign\n  }\n  cases.forEach((c) => registry.set(c, importFn));\n}\n\nexport async function getDecoder(fileDirectory) {\n  const importFn = registry.get(fileDirectory.Compression);\n  if (!importFn) {\n    throw new Error(`Unknown compression method identifier: ${fileDirectory.Compression}`);\n  }\n  const Decoder = await importFn();\n  return new Decoder(fileDirectory);\n}\n\n// Add default decoders to registry (end-user may override with other implementations)\naddDecoder([undefined, 1], () => import('./raw.js').then((m) => m.default));\naddDecoder(5, () => import('./lzw.js').then((m) => m.default));\naddDecoder(6, () => {\n  throw new Error('old style JPEG compression is not supported.');\n});\naddDecoder(7, () => import('./jpeg.js').then((m) => m.default));\naddDecoder([8, 32946], () => import('./deflate.js').then((m) => m.default));\naddDecoder(32773, () => import('./packbits.js').then((m) => m.default));\naddDecoder(34887, () => import('./lerc.js').then((m) => m.default));\naddDecoder(50001, () => import('./webimage.js').then((m) => m.default));\n","/**\n * @module resample\n */\n\nfunction copyNewSize(array, width, height, samplesPerPixel = 1) {\n  return new (Object.getPrototypeOf(array).constructor)(width * height * samplesPerPixel);\n}\n\n/**\n * Resample the input arrays using nearest neighbor value selection.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {TypedArray[]} The resampled rasters\n */\nexport function resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n  return valueArrays.map((array) => {\n    const newArray = copyNewSize(array, outWidth, outHeight);\n    for (let y = 0; y < outHeight; ++y) {\n      const cy = Math.min(Math.round(relY * y), inHeight - 1);\n      for (let x = 0; x < outWidth; ++x) {\n        const cx = Math.min(Math.round(relX * x), inWidth - 1);\n        const value = array[(cy * inWidth) + cx];\n        newArray[(y * outWidth) + x] = value;\n      }\n    }\n    return newArray;\n  });\n}\n\n// simple linear interpolation, code from:\n// https://en.wikipedia.org/wiki/Linear_interpolation#Programming_language_support\nfunction lerp(v0, v1, t) {\n  return ((1 - t) * v0) + (t * v1);\n}\n\n/**\n * Resample the input arrays using bilinear interpolation.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {TypedArray[]} The resampled rasters\n */\nexport function resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n\n  return valueArrays.map((array) => {\n    const newArray = copyNewSize(array, outWidth, outHeight);\n    for (let y = 0; y < outHeight; ++y) {\n      const rawY = relY * y;\n\n      const yl = Math.floor(rawY);\n      const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n\n      for (let x = 0; x < outWidth; ++x) {\n        const rawX = relX * x;\n        const tx = rawX % 1;\n\n        const xl = Math.floor(rawX);\n        const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n\n        const ll = array[(yl * inWidth) + xl];\n        const hl = array[(yl * inWidth) + xh];\n        const lh = array[(yh * inWidth) + xl];\n        const hh = array[(yh * inWidth) + xh];\n\n        const value = lerp(\n          lerp(ll, hl, tx),\n          lerp(lh, hh, tx),\n          rawY % 1,\n        );\n        newArray[(y * outWidth) + x] = value;\n      }\n    }\n    return newArray;\n  });\n}\n\n/**\n * Resample the input arrays using the selected resampling method.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {TypedArray[]} The resampled rasters\n */\nexport function resample(valueArrays, inWidth, inHeight, outWidth, outHeight, method = 'nearest') {\n  switch (method.toLowerCase()) {\n    case 'nearest':\n      return resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight);\n    case 'bilinear':\n    case 'linear':\n      return resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight);\n    default:\n      throw new Error(`Unsupported resampling method: '${method}'`);\n  }\n}\n\n/**\n * Resample the pixel interleaved input array using nearest neighbor value selection.\n * @param {TypedArray} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                         interleaved data\n * @returns {TypedArray} The resampled raster\n */\nexport function resampleNearestInterleaved(\n  valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n\n  const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n  for (let y = 0; y < outHeight; ++y) {\n    const cy = Math.min(Math.round(relY * y), inHeight - 1);\n    for (let x = 0; x < outWidth; ++x) {\n      const cx = Math.min(Math.round(relX * x), inWidth - 1);\n      for (let i = 0; i < samples; ++i) {\n        const value = valueArray[(cy * inWidth * samples) + (cx * samples) + i];\n        newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n      }\n    }\n  }\n  return newArray;\n}\n\n/**\n * Resample the pixel interleaved input array using bilinear interpolation.\n * @param {TypedArray} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                         interleaved data\n * @returns {TypedArray} The resampled raster\n */\nexport function resampleBilinearInterleaved(\n  valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n  const relX = inWidth / outWidth;\n  const relY = inHeight / outHeight;\n  const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n  for (let y = 0; y < outHeight; ++y) {\n    const rawY = relY * y;\n\n    const yl = Math.floor(rawY);\n    const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n\n    for (let x = 0; x < outWidth; ++x) {\n      const rawX = relX * x;\n      const tx = rawX % 1;\n\n      const xl = Math.floor(rawX);\n      const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n\n      for (let i = 0; i < samples; ++i) {\n        const ll = valueArray[(yl * inWidth * samples) + (xl * samples) + i];\n        const hl = valueArray[(yl * inWidth * samples) + (xh * samples) + i];\n        const lh = valueArray[(yh * inWidth * samples) + (xl * samples) + i];\n        const hh = valueArray[(yh * inWidth * samples) + (xh * samples) + i];\n\n        const value = lerp(\n          lerp(ll, hl, tx),\n          lerp(lh, hh, tx),\n          rawY % 1,\n        );\n        newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n      }\n    }\n  }\n  return newArray;\n}\n\n/**\n * Resample the pixel interleaved input array using the selected resampling method.\n * @param {TypedArray} valueArray The input array to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n *                                 interleaved data\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {TypedArray} The resampled rasters\n */\nexport function resampleInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples, method = 'nearest') {\n  switch (method.toLowerCase()) {\n    case 'nearest':\n      return resampleNearestInterleaved(\n        valueArray, inWidth, inHeight, outWidth, outHeight, samples,\n      );\n    case 'bilinear':\n    case 'linear':\n      return resampleBilinearInterleaved(\n        valueArray, inWidth, inHeight, outWidth, outHeight, samples,\n      );\n    default:\n      throw new Error(`Unsupported resampling method: '${method}'`);\n  }\n}\n","/** @module geotiffimage */\nimport { getFloat16 } from '@petamoriken/float16';\nimport getAttribute from 'xml-utils/get-attribute.js';\nimport findTagsByName from 'xml-utils/find-tags-by-name.js';\n\nimport { photometricInterpretations, ExtraSamplesValues } from './globals.js';\nimport { fromWhiteIsZero, fromBlackIsZero, fromPalette, fromCMYK, fromYCbCr, fromCIELab } from './rgb.js';\nimport { getDecoder } from './compression/index.js';\nimport { resample, resampleInterleaved } from './resample.js';\n\n/**\n * @typedef {Object} ReadRasterOptions\n * @property {Array<number>} [window=whole window] the subset to read data from in pixels.\n * @property {Array<number>} [bbox=whole image] the subset to read data from in\n *                                           geographical coordinates.\n * @property {Array<number>} [samples=all samples] the selection of samples to read from. Default is all samples.\n * @property {boolean} [interleave=false] whether the data shall be read\n *                                             in one single array or separate\n *                                             arrays.\n * @property {Pool} [pool=null] The optional decoder pool to use.\n * @property {number} [width] The desired width of the output. When the width is not the\n *                                 same as the images, resampling will be performed.\n * @property {number} [height] The desired height of the output. When the width is not the\n *                                  same as the images, resampling will be performed.\n * @property {string} [resampleMethod='nearest'] The desired resampling method.\n * @property {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                                       to be aborted\n * @property {number|number[]} [fillValue] The value to use for parts of the image\n *                                              outside of the images extent. When multiple\n *                                              samples are requested, an array of fill values\n *                                              can be passed.\n */\n\n/** @typedef {import(\"./geotiff.js\").TypedArray} TypedArray */\n\nfunction sum(array, start, end) {\n  let s = 0;\n  for (let i = start; i < end; ++i) {\n    s += array[i];\n  }\n  return s;\n}\n\nfunction arrayForType(format, bitsPerSample, size) {\n  switch (format) {\n    case 1: // unsigned integer data\n      if (bitsPerSample <= 8) {\n        return new Uint8Array(size);\n      } else if (bitsPerSample <= 16) {\n        return new Uint16Array(size);\n      } else if (bitsPerSample <= 32) {\n        return new Uint32Array(size);\n      }\n      break;\n    case 2: // twos complement signed integer data\n      if (bitsPerSample === 8) {\n        return new Int8Array(size);\n      } else if (bitsPerSample === 16) {\n        return new Int16Array(size);\n      } else if (bitsPerSample === 32) {\n        return new Int32Array(size);\n      }\n      break;\n    case 3: // floating point data\n      switch (bitsPerSample) {\n        case 16:\n        case 32:\n          return new Float32Array(size);\n        case 64:\n          return new Float64Array(size);\n        default:\n          break;\n      }\n      break;\n    default:\n      break;\n  }\n  throw Error('Unsupported data format/bitsPerSample');\n}\n\nfunction needsNormalization(format, bitsPerSample) {\n  if ((format === 1 || format === 2) && bitsPerSample <= 32 && bitsPerSample % 8 === 0) {\n    return false;\n  } else if (format === 3 && (bitsPerSample === 16 || bitsPerSample === 32 || bitsPerSample === 64)) {\n    return false;\n  }\n  return true;\n}\n\nfunction normalizeArray(inBuffer, format, planarConfiguration, samplesPerPixel, bitsPerSample, tileWidth, tileHeight) {\n  // const inByteArray = new Uint8Array(inBuffer);\n  const view = new DataView(inBuffer);\n  const outSize = planarConfiguration === 2\n    ? tileHeight * tileWidth\n    : tileHeight * tileWidth * samplesPerPixel;\n  const samplesToTransfer = planarConfiguration === 2\n    ? 1 : samplesPerPixel;\n  const outArray = arrayForType(format, bitsPerSample, outSize);\n  // let pixel = 0;\n\n  const bitMask = parseInt('1'.repeat(bitsPerSample), 2);\n\n  if (format === 1) { // unsigned integer\n    // translation of https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/geotiff.cpp#L7337\n    let pixelBitSkip;\n    // let sampleBitOffset = 0;\n    if (planarConfiguration === 1) {\n      pixelBitSkip = samplesPerPixel * bitsPerSample;\n      // sampleBitOffset = (samplesPerPixel - 1) * bitsPerSample;\n    } else {\n      pixelBitSkip = bitsPerSample;\n    }\n\n    // Bits per line rounds up to next byte boundary.\n    let bitsPerLine = tileWidth * pixelBitSkip;\n    if ((bitsPerLine & 7) !== 0) {\n      bitsPerLine = (bitsPerLine + 7) & (~7);\n    }\n\n    for (let y = 0; y < tileHeight; ++y) {\n      const lineBitOffset = y * bitsPerLine;\n      for (let x = 0; x < tileWidth; ++x) {\n        const pixelBitOffset = lineBitOffset + (x * samplesToTransfer * bitsPerSample);\n        for (let i = 0; i < samplesToTransfer; ++i) {\n          const bitOffset = pixelBitOffset + (i * bitsPerSample);\n          const outIndex = (((y * tileWidth) + x) * samplesToTransfer) + i;\n\n          const byteOffset = Math.floor(bitOffset / 8);\n          const innerBitOffset = bitOffset % 8;\n          if (innerBitOffset + bitsPerSample <= 8) {\n            outArray[outIndex] = (view.getUint8(byteOffset) >> (8 - bitsPerSample) - innerBitOffset) & bitMask;\n          } else if (innerBitOffset + bitsPerSample <= 16) {\n            outArray[outIndex] = (view.getUint16(byteOffset) >> (16 - bitsPerSample) - innerBitOffset) & bitMask;\n          } else if (innerBitOffset + bitsPerSample <= 24) {\n            const raw = (view.getUint16(byteOffset) << 8) | (view.getUint8(byteOffset + 2));\n            outArray[outIndex] = (raw >> (24 - bitsPerSample) - innerBitOffset) & bitMask;\n          } else {\n            outArray[outIndex] = (view.getUint32(byteOffset) >> (32 - bitsPerSample) - innerBitOffset) & bitMask;\n          }\n\n          // let outWord = 0;\n          // for (let bit = 0; bit < bitsPerSample; ++bit) {\n          //   if (inByteArray[bitOffset >> 3]\n          //     & (0x80 >> (bitOffset & 7))) {\n          //     outWord |= (1 << (bitsPerSample - 1 - bit));\n          //   }\n          //   ++bitOffset;\n          // }\n\n          // outArray[outIndex] = outWord;\n          // outArray[pixel] = outWord;\n          // pixel += 1;\n        }\n        // bitOffset = bitOffset + pixelBitSkip - bitsPerSample;\n      }\n    }\n  } else if (format === 3) { // floating point\n    // Float16 is handled elsewhere\n    // normalize 16/24 bit floats to 32 bit floats in the array\n    // console.time();\n    // if (bitsPerSample === 16) {\n    //   for (let byte = 0, outIndex = 0; byte < inBuffer.byteLength; byte += 2, ++outIndex) {\n    //     outArray[outIndex] = getFloat16(view, byte);\n    //   }\n    // }\n    // console.timeEnd()\n  }\n\n  return outArray.buffer;\n}\n\n/**\n * GeoTIFF sub-file image.\n */\nclass GeoTIFFImage {\n  /**\n   * @constructor\n   * @param {Object} fileDirectory The parsed file directory\n   * @param {Object} geoKeys The parsed geo-keys\n   * @param {DataView} dataView The DataView for the underlying file.\n   * @param {Boolean} littleEndian Whether the file is encoded in little or big endian\n   * @param {Boolean} cache Whether or not decoded tiles shall be cached\n   * @param {Source} source The datasource to read from\n   */\n  constructor(fileDirectory, geoKeys, dataView, littleEndian, cache, source) {\n    this.fileDirectory = fileDirectory;\n    this.geoKeys = geoKeys;\n    this.dataView = dataView;\n    this.littleEndian = littleEndian;\n    this.tiles = cache ? {} : null;\n    this.isTiled = !fileDirectory.StripOffsets;\n    const planarConfiguration = fileDirectory.PlanarConfiguration;\n    this.planarConfiguration = (typeof planarConfiguration === 'undefined') ? 1 : planarConfiguration;\n    if (this.planarConfiguration !== 1 && this.planarConfiguration !== 2) {\n      throw new Error('Invalid planar configuration.');\n    }\n\n    this.source = source;\n  }\n\n  /**\n   * Returns the associated parsed file directory.\n   * @returns {Object} the parsed file directory\n   */\n  getFileDirectory() {\n    return this.fileDirectory;\n  }\n\n  /**\n   * Returns the associated parsed geo keys.\n   * @returns {Object} the parsed geo keys\n   */\n  getGeoKeys() {\n    return this.geoKeys;\n  }\n\n  /**\n   * Returns the width of the image.\n   * @returns {Number} the width of the image\n   */\n  getWidth() {\n    return this.fileDirectory.ImageWidth;\n  }\n\n  /**\n   * Returns the height of the image.\n   * @returns {Number} the height of the image\n   */\n  getHeight() {\n    return this.fileDirectory.ImageLength;\n  }\n\n  /**\n   * Returns the number of samples per pixel.\n   * @returns {Number} the number of samples per pixel\n   */\n  getSamplesPerPixel() {\n    return typeof this.fileDirectory.SamplesPerPixel !== 'undefined'\n      ? this.fileDirectory.SamplesPerPixel : 1;\n  }\n\n  /**\n   * Returns the width of each tile.\n   * @returns {Number} the width of each tile\n   */\n  getTileWidth() {\n    return this.isTiled ? this.fileDirectory.TileWidth : this.getWidth();\n  }\n\n  /**\n   * Returns the height of each tile.\n   * @returns {Number} the height of each tile\n   */\n  getTileHeight() {\n    if (this.isTiled) {\n      return this.fileDirectory.TileLength;\n    }\n    if (typeof this.fileDirectory.RowsPerStrip !== 'undefined') {\n      return Math.min(this.fileDirectory.RowsPerStrip, this.getHeight());\n    }\n    return this.getHeight();\n  }\n\n  getBlockWidth() {\n    return this.getTileWidth();\n  }\n\n  getBlockHeight(y) {\n    if (this.isTiled || (y + 1) * this.getTileHeight() <= this.getHeight()) {\n      return this.getTileHeight();\n    } else {\n      return this.getHeight() - (y * this.getTileHeight());\n    }\n  }\n\n  /**\n   * Calculates the number of bytes for each pixel across all samples. Only full\n   * bytes are supported, an exception is thrown when this is not the case.\n   * @returns {Number} the bytes per pixel\n   */\n  getBytesPerPixel() {\n    let bytes = 0;\n    for (let i = 0; i < this.fileDirectory.BitsPerSample.length; ++i) {\n      bytes += this.getSampleByteSize(i);\n    }\n    return bytes;\n  }\n\n  getSampleByteSize(i) {\n    if (i >= this.fileDirectory.BitsPerSample.length) {\n      throw new RangeError(`Sample index ${i} is out of range.`);\n    }\n    return Math.ceil(this.fileDirectory.BitsPerSample[i] / 8);\n  }\n\n  getReaderForSample(sampleIndex) {\n    const format = this.fileDirectory.SampleFormat\n      ? this.fileDirectory.SampleFormat[sampleIndex] : 1;\n    const bitsPerSample = this.fileDirectory.BitsPerSample[sampleIndex];\n    switch (format) {\n      case 1: // unsigned integer data\n        if (bitsPerSample <= 8) {\n          return DataView.prototype.getUint8;\n        } else if (bitsPerSample <= 16) {\n          return DataView.prototype.getUint16;\n        } else if (bitsPerSample <= 32) {\n          return DataView.prototype.getUint32;\n        }\n        break;\n      case 2: // twos complement signed integer data\n        if (bitsPerSample <= 8) {\n          return DataView.prototype.getInt8;\n        } else if (bitsPerSample <= 16) {\n          return DataView.prototype.getInt16;\n        } else if (bitsPerSample <= 32) {\n          return DataView.prototype.getInt32;\n        }\n        break;\n      case 3:\n        switch (bitsPerSample) {\n          case 16:\n            return function (offset, littleEndian) {\n              return getFloat16(this, offset, littleEndian);\n            };\n          case 32:\n            return DataView.prototype.getFloat32;\n          case 64:\n            return DataView.prototype.getFloat64;\n          default:\n            break;\n        }\n        break;\n      default:\n        break;\n    }\n    throw Error('Unsupported data format/bitsPerSample');\n  }\n\n  getSampleFormat(sampleIndex = 0) {\n    return this.fileDirectory.SampleFormat\n      ? this.fileDirectory.SampleFormat[sampleIndex] : 1;\n  }\n\n  getBitsPerSample(sampleIndex = 0) {\n    return this.fileDirectory.BitsPerSample[sampleIndex];\n  }\n\n  getArrayForSample(sampleIndex, size) {\n    const format = this.getSampleFormat(sampleIndex);\n    const bitsPerSample = this.getBitsPerSample(sampleIndex);\n    return arrayForType(format, bitsPerSample, size);\n  }\n\n  /**\n   * Returns the decoded strip or tile.\n   * @param {Number} x the strip or tile x-offset\n   * @param {Number} y the tile y-offset (0 for stripped images)\n   * @param {Number} sample the sample to get for separated samples\n   * @param {import(\"./geotiff\").Pool|AbstractDecoder} poolOrDecoder the decoder or decoder pool\n   * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n   *                               to be aborted\n   * @returns {Promise.<ArrayBuffer>}\n   */\n  async getTileOrStrip(x, y, sample, poolOrDecoder, signal) {\n    const numTilesPerRow = Math.ceil(this.getWidth() / this.getTileWidth());\n    const numTilesPerCol = Math.ceil(this.getHeight() / this.getTileHeight());\n    let index;\n    const { tiles } = this;\n    if (this.planarConfiguration === 1) {\n      index = (y * numTilesPerRow) + x;\n    } else if (this.planarConfiguration === 2) {\n      index = (sample * numTilesPerRow * numTilesPerCol) + (y * numTilesPerRow) + x;\n    }\n\n    let offset;\n    let byteCount;\n    if (this.isTiled) {\n      offset = this.fileDirectory.TileOffsets[index];\n      byteCount = this.fileDirectory.TileByteCounts[index];\n    } else {\n      offset = this.fileDirectory.StripOffsets[index];\n      byteCount = this.fileDirectory.StripByteCounts[index];\n    }\n    const slice = (await this.source.fetch([{ offset, length: byteCount }], signal))[0];\n\n    let request;\n    if (tiles === null || !tiles[index]) {\n    // resolve each request by potentially applying array normalization\n      request = (async () => {\n        let data = await poolOrDecoder.decode(this.fileDirectory, slice);\n        const sampleFormat = this.getSampleFormat();\n        const bitsPerSample = this.getBitsPerSample();\n        if (needsNormalization(sampleFormat, bitsPerSample)) {\n          data = normalizeArray(\n            data,\n            sampleFormat,\n            this.planarConfiguration,\n            this.getSamplesPerPixel(),\n            bitsPerSample,\n            this.getTileWidth(),\n            this.getBlockHeight(y),\n          );\n        }\n        return data;\n      })();\n\n      // set the cache\n      if (tiles !== null) {\n        tiles[index] = request;\n      }\n    } else {\n      // get from the cache\n      request = tiles[index];\n    }\n\n    // cache the tile request\n    return { x, y, sample, data: await request };\n  }\n\n  /**\n   * Internal read function.\n   * @private\n   * @param {Array} imageWindow The image window in pixel coordinates\n   * @param {Array} samples The selected samples (0-based indices)\n   * @param {TypedArray[]|TypedArray} valueArrays The array(s) to write into\n   * @param {Boolean} interleave Whether or not to write in an interleaved manner\n   * @param {import(\"./geotiff\").Pool|AbstractDecoder} poolOrDecoder the decoder or decoder pool\n   * @param {number} width the width of window to be read into\n   * @param {number} height the height of window to be read into\n   * @param {number} resampleMethod the resampling method to be used when interpolating\n   * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n   *                               to be aborted\n   * @returns {Promise<TypedArray[]>|Promise<TypedArray>}\n   */\n  async _readRaster(imageWindow, samples, valueArrays, interleave, poolOrDecoder, width,\n    height, resampleMethod, signal) {\n    const tileWidth = this.getTileWidth();\n    const tileHeight = this.getTileHeight();\n    const imageWidth = this.getWidth();\n    const imageHeight = this.getHeight();\n\n    const minXTile = Math.max(Math.floor(imageWindow[0] / tileWidth), 0);\n    const maxXTile = Math.min(\n      Math.ceil(imageWindow[2] / tileWidth),\n      Math.ceil(imageWidth / tileWidth),\n    );\n    const minYTile = Math.max(Math.floor(imageWindow[1] / tileHeight), 0);\n    const maxYTile = Math.min(\n      Math.ceil(imageWindow[3] / tileHeight),\n      Math.ceil(imageHeight / tileHeight),\n    );\n    const windowWidth = imageWindow[2] - imageWindow[0];\n\n    let bytesPerPixel = this.getBytesPerPixel();\n\n    const srcSampleOffsets = [];\n    const sampleReaders = [];\n    for (let i = 0; i < samples.length; ++i) {\n      if (this.planarConfiguration === 1) {\n        srcSampleOffsets.push(sum(this.fileDirectory.BitsPerSample, 0, samples[i]) / 8);\n      } else {\n        srcSampleOffsets.push(0);\n      }\n      sampleReaders.push(this.getReaderForSample(samples[i]));\n    }\n\n    const promises = [];\n    const { littleEndian } = this;\n\n    for (let yTile = minYTile; yTile < maxYTile; ++yTile) {\n      for (let xTile = minXTile; xTile < maxXTile; ++xTile) {\n        for (let sampleIndex = 0; sampleIndex < samples.length; ++sampleIndex) {\n          const si = sampleIndex;\n          const sample = samples[sampleIndex];\n          if (this.planarConfiguration === 2) {\n            bytesPerPixel = this.getSampleByteSize(sampleIndex);\n          }\n          const promise = this.getTileOrStrip(xTile, yTile, sample, poolOrDecoder, signal);\n          promises.push(promise);\n          promise.then((tile) => {\n            const buffer = tile.data;\n            const dataView = new DataView(buffer);\n            const blockHeight = this.getBlockHeight(tile.y);\n            const firstLine = tile.y * tileHeight;\n            const firstCol = tile.x * tileWidth;\n            const lastLine = firstLine + blockHeight;\n            const lastCol = (tile.x + 1) * tileWidth;\n            const reader = sampleReaders[si];\n\n            const ymax = Math.min(blockHeight, blockHeight - (lastLine - imageWindow[3]), imageHeight - firstLine);\n            const xmax = Math.min(tileWidth, tileWidth - (lastCol - imageWindow[2]), imageWidth - firstCol);\n\n            for (let y = Math.max(0, imageWindow[1] - firstLine); y < ymax; ++y) {\n              for (let x = Math.max(0, imageWindow[0] - firstCol); x < xmax; ++x) {\n                const pixelOffset = ((y * tileWidth) + x) * bytesPerPixel;\n                const value = reader.call(\n                  dataView, pixelOffset + srcSampleOffsets[si], littleEndian,\n                );\n                let windowCoordinate;\n                if (interleave) {\n                  windowCoordinate = ((y + firstLine - imageWindow[1]) * windowWidth * samples.length)\n                    + ((x + firstCol - imageWindow[0]) * samples.length)\n                    + si;\n                  valueArrays[windowCoordinate] = value;\n                } else {\n                  windowCoordinate = (\n                    (y + firstLine - imageWindow[1]) * windowWidth\n                  ) + x + firstCol - imageWindow[0];\n                  valueArrays[si][windowCoordinate] = value;\n                }\n              }\n            }\n          });\n        }\n      }\n    }\n    await Promise.all(promises);\n\n    if ((width && (imageWindow[2] - imageWindow[0]) !== width)\n        || (height && (imageWindow[3] - imageWindow[1]) !== height)) {\n      let resampled;\n      if (interleave) {\n        resampled = resampleInterleaved(\n          valueArrays,\n          imageWindow[2] - imageWindow[0],\n          imageWindow[3] - imageWindow[1],\n          width, height,\n          samples.length,\n          resampleMethod,\n        );\n      } else {\n        resampled = resample(\n          valueArrays,\n          imageWindow[2] - imageWindow[0],\n          imageWindow[3] - imageWindow[1],\n          width, height,\n          resampleMethod,\n        );\n      }\n      resampled.width = width;\n      resampled.height = height;\n      return resampled;\n    }\n\n    valueArrays.width = width || imageWindow[2] - imageWindow[0];\n    valueArrays.height = height || imageWindow[3] - imageWindow[1];\n\n    return valueArrays;\n  }\n\n  /**\n   * Reads raster data from the image. This function reads all selected samples\n   * into separate arrays of the correct type for that sample or into a single\n   * combined array when `interleave` is set. When provided, only a subset\n   * of the raster is read for each sample.\n   *\n   * @param {ReadRasterOptions} [options={}] optional parameters\n   * @returns {Promise.<(TypedArray|TypedArray[])>} the decoded arrays as a promise\n   */\n  async readRasters({\n    window: wnd, samples = [], interleave, pool = null,\n    width, height, resampleMethod, fillValue, signal,\n  } = {}) {\n    const imageWindow = wnd || [0, 0, this.getWidth(), this.getHeight()];\n\n    // check parameters\n    if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n      throw new Error('Invalid subsets');\n    }\n\n    const imageWindowWidth = imageWindow[2] - imageWindow[0];\n    const imageWindowHeight = imageWindow[3] - imageWindow[1];\n    const numPixels = imageWindowWidth * imageWindowHeight;\n    const samplesPerPixel = this.getSamplesPerPixel();\n\n    if (!samples || !samples.length) {\n      for (let i = 0; i < samplesPerPixel; ++i) {\n        samples.push(i);\n      }\n    } else {\n      for (let i = 0; i < samples.length; ++i) {\n        if (samples[i] >= samplesPerPixel) {\n          return Promise.reject(new RangeError(`Invalid sample index '${samples[i]}'.`));\n        }\n      }\n    }\n    let valueArrays;\n    if (interleave) {\n      const format = this.fileDirectory.SampleFormat\n        ? Math.max.apply(null, this.fileDirectory.SampleFormat) : 1;\n      const bitsPerSample = Math.max.apply(null, this.fileDirectory.BitsPerSample);\n      valueArrays = arrayForType(format, bitsPerSample, numPixels * samples.length);\n      if (fillValue) {\n        valueArrays.fill(fillValue);\n      }\n    } else {\n      valueArrays = [];\n      for (let i = 0; i < samples.length; ++i) {\n        const valueArray = this.getArrayForSample(samples[i], numPixels);\n        if (Array.isArray(fillValue) && i < fillValue.length) {\n          valueArray.fill(fillValue[i]);\n        } else if (fillValue && !Array.isArray(fillValue)) {\n          valueArray.fill(fillValue);\n        }\n        valueArrays.push(valueArray);\n      }\n    }\n\n    const poolOrDecoder = pool || await getDecoder(this.fileDirectory);\n\n    const result = await this._readRaster(\n      imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal,\n    );\n    return result;\n  }\n\n  /**\n   * Reads raster data from the image as RGB. The result is always an\n   * interleaved typed array.\n   * Colorspaces other than RGB will be transformed to RGB, color maps expanded.\n   * When no other method is applicable, the first sample is used to produce a\n   * greayscale image.\n   * When provided, only a subset of the raster is read for each sample.\n   *\n   * @param {Object} [options] optional parameters\n   * @param {Array<number>} [options.window] the subset to read data from in pixels.\n   * @param {boolean} [options.interleave=true] whether the data shall be read\n   *                                             in one single array or separate\n   *                                             arrays.\n   * @param {import(\"./geotiff\").Pool} [options.pool=null] The optional decoder pool to use.\n   * @param {number} [options.width] The desired width of the output. When the width is no the\n   *                                 same as the images, resampling will be performed.\n   * @param {number} [options.height] The desired height of the output. When the width is no the\n   *                                  same as the images, resampling will be performed.\n   * @param {string} [options.resampleMethod='nearest'] The desired resampling method.\n   * @param {boolean} [options.enableAlpha=false] Enable reading alpha channel if present.\n   * @param {AbortSignal} [options.signal] An AbortSignal that may be signalled if the request is\n   *                                       to be aborted\n   * @returns {Promise<TypedArray|TypedArray[]>} the RGB array as a Promise\n   */\n  async readRGB({ window, interleave = true, pool = null, width, height,\n    resampleMethod, enableAlpha = false, signal } = {}) {\n    const imageWindow = window || [0, 0, this.getWidth(), this.getHeight()];\n\n    // check parameters\n    if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n      throw new Error('Invalid subsets');\n    }\n\n    const pi = this.fileDirectory.PhotometricInterpretation;\n\n    if (pi === photometricInterpretations.RGB) {\n      let s = [0, 1, 2];\n      if ((!(this.fileDirectory.ExtraSamples === ExtraSamplesValues.Unspecified)) && enableAlpha) {\n        s = [];\n        for (let i = 0; i < this.fileDirectory.BitsPerSample.length; i += 1) {\n          s.push(i);\n        }\n      }\n      return this.readRasters({\n        window,\n        interleave,\n        samples: s,\n        pool,\n        width,\n        height,\n        resampleMethod,\n        signal,\n      });\n    }\n\n    let samples;\n    switch (pi) {\n      case photometricInterpretations.WhiteIsZero:\n      case photometricInterpretations.BlackIsZero:\n      case photometricInterpretations.Palette:\n        samples = [0];\n        break;\n      case photometricInterpretations.CMYK:\n        samples = [0, 1, 2, 3];\n        break;\n      case photometricInterpretations.YCbCr:\n      case photometricInterpretations.CIELab:\n        samples = [0, 1, 2];\n        break;\n      default:\n        throw new Error('Invalid or unsupported photometric interpretation.');\n    }\n\n    const subOptions = {\n      window: imageWindow,\n      interleave: true,\n      samples,\n      pool,\n      width,\n      height,\n      resampleMethod,\n      signal,\n    };\n    const { fileDirectory } = this;\n    const raster = await this.readRasters(subOptions);\n\n    const max = 2 ** this.fileDirectory.BitsPerSample[0];\n    let data;\n    switch (pi) {\n      case photometricInterpretations.WhiteIsZero:\n        data = fromWhiteIsZero(raster, max);\n        break;\n      case photometricInterpretations.BlackIsZero:\n        data = fromBlackIsZero(raster, max);\n        break;\n      case photometricInterpretations.Palette:\n        data = fromPalette(raster, fileDirectory.ColorMap);\n        break;\n      case photometricInterpretations.CMYK:\n        data = fromCMYK(raster);\n        break;\n      case photometricInterpretations.YCbCr:\n        data = fromYCbCr(raster);\n        break;\n      case photometricInterpretations.CIELab:\n        data = fromCIELab(raster);\n        break;\n      default:\n        throw new Error('Unsupported photometric interpretation.');\n    }\n\n    // if non-interleaved data is requested, we must split the channels\n    // into their respective arrays\n    if (!interleave) {\n      const red = new Uint8Array(data.length / 3);\n      const green = new Uint8Array(data.length / 3);\n      const blue = new Uint8Array(data.length / 3);\n      for (let i = 0, j = 0; i < data.length; i += 3, ++j) {\n        red[j] = data[i];\n        green[j] = data[i + 1];\n        blue[j] = data[i + 2];\n      }\n      data = [red, green, blue];\n    }\n\n    data.width = raster.width;\n    data.height = raster.height;\n    return data;\n  }\n\n  /**\n   * Returns an array of tiepoints.\n   * @returns {Object[]}\n   */\n  getTiePoints() {\n    if (!this.fileDirectory.ModelTiepoint) {\n      return [];\n    }\n\n    const tiePoints = [];\n    for (let i = 0; i < this.fileDirectory.ModelTiepoint.length; i += 6) {\n      tiePoints.push({\n        i: this.fileDirectory.ModelTiepoint[i],\n        j: this.fileDirectory.ModelTiepoint[i + 1],\n        k: this.fileDirectory.ModelTiepoint[i + 2],\n        x: this.fileDirectory.ModelTiepoint[i + 3],\n        y: this.fileDirectory.ModelTiepoint[i + 4],\n        z: this.fileDirectory.ModelTiepoint[i + 5],\n      });\n    }\n    return tiePoints;\n  }\n\n  /**\n   * Returns the parsed GDAL metadata items.\n   *\n   * If sample is passed to null, dataset-level metadata will be returned.\n   * Otherwise only metadata specific to the provided sample will be returned.\n   *\n   * @param {number} [sample=null] The sample index.\n   * @returns {Object}\n   */\n  getGDALMetadata(sample = null) {\n    const metadata = {};\n    if (!this.fileDirectory.GDAL_METADATA) {\n      return null;\n    }\n    const string = this.fileDirectory.GDAL_METADATA;\n\n    let items = findTagsByName(string, 'Item');\n\n    if (sample === null) {\n      items = items.filter((item) => getAttribute(item, 'sample') === undefined);\n    } else {\n      items = items.filter((item) => Number(getAttribute(item, 'sample')) === sample);\n    }\n\n    for (let i = 0; i < items.length; ++i) {\n      const item = items[i];\n      metadata[getAttribute(item, 'name')] = item.inner;\n    }\n    return metadata;\n  }\n\n  /**\n   * Returns the GDAL nodata value\n   * @returns {number|null}\n   */\n  getGDALNoData() {\n    if (!this.fileDirectory.GDAL_NODATA) {\n      return null;\n    }\n    const string = this.fileDirectory.GDAL_NODATA;\n    return Number(string.substring(0, string.length - 1));\n  }\n\n  /**\n   * Returns the image origin as a XYZ-vector. When the image has no affine\n   * transformation, then an exception is thrown.\n   * @returns {Array<number>} The origin as a vector\n   */\n  getOrigin() {\n    const tiePoints = this.fileDirectory.ModelTiepoint;\n    const modelTransformation = this.fileDirectory.ModelTransformation;\n    if (tiePoints && tiePoints.length === 6) {\n      return [\n        tiePoints[3],\n        tiePoints[4],\n        tiePoints[5],\n      ];\n    }\n    if (modelTransformation) {\n      return [\n        modelTransformation[3],\n        modelTransformation[7],\n        modelTransformation[11],\n      ];\n    }\n    throw new Error('The image does not have an affine transformation.');\n  }\n\n  /**\n   * Returns the image resolution as a XYZ-vector. When the image has no affine\n   * transformation, then an exception is thrown.\n   * @param {GeoTIFFImage} [referenceImage=null] A reference image to calculate the resolution from\n   *                                             in cases when the current image does not have the\n   *                                             required tags on its own.\n   * @returns {Array<number>} The resolution as a vector\n   */\n  getResolution(referenceImage = null) {\n    const modelPixelScale = this.fileDirectory.ModelPixelScale;\n    const modelTransformation = this.fileDirectory.ModelTransformation;\n\n    if (modelPixelScale) {\n      return [\n        modelPixelScale[0],\n        -modelPixelScale[1],\n        modelPixelScale[2],\n      ];\n    }\n    if (modelTransformation) {\n      return [\n        modelTransformation[0],\n        modelTransformation[5],\n        modelTransformation[10],\n      ];\n    }\n\n    if (referenceImage) {\n      const [refResX, refResY, refResZ] = referenceImage.getResolution();\n      return [\n        refResX * referenceImage.getWidth() / this.getWidth(),\n        refResY * referenceImage.getHeight() / this.getHeight(),\n        refResZ * referenceImage.getWidth() / this.getWidth(),\n      ];\n    }\n\n    throw new Error('The image does not have an affine transformation.');\n  }\n\n  /**\n   * Returns whether or not the pixels of the image depict an area (or point).\n   * @returns {Boolean} Whether the pixels are a point\n   */\n  pixelIsArea() {\n    return this.geoKeys.GTRasterTypeGeoKey === 1;\n  }\n\n  /**\n   * Returns the image bounding box as an array of 4 values: min-x, min-y,\n   * max-x and max-y. When the image has no affine transformation, then an\n   * exception is thrown.\n   * @returns {Array<number>} The bounding box\n   */\n  getBoundingBox() {\n    const origin = this.getOrigin();\n    const resolution = this.getResolution();\n\n    const x1 = origin[0];\n    const y1 = origin[1];\n\n    const x2 = x1 + (resolution[0] * this.getWidth());\n    const y2 = y1 + (resolution[1] * this.getHeight());\n\n    return [\n      Math.min(x1, x2),\n      Math.min(y1, y2),\n      Math.max(x1, x2),\n      Math.max(y1, y2),\n    ];\n  }\n}\n\nexport default GeoTIFFImage;\n","export function fromWhiteIsZero(raster, max) {\n  const { width, height } = raster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  let value;\n  for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n    value = 256 - (raster[i] / max * 256);\n    rgbRaster[j] = value;\n    rgbRaster[j + 1] = value;\n    rgbRaster[j + 2] = value;\n  }\n  return rgbRaster;\n}\n\nexport function fromBlackIsZero(raster, max) {\n  const { width, height } = raster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  let value;\n  for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n    value = raster[i] / max * 256;\n    rgbRaster[j] = value;\n    rgbRaster[j + 1] = value;\n    rgbRaster[j + 2] = value;\n  }\n  return rgbRaster;\n}\n\nexport function fromPalette(raster, colorMap) {\n  const { width, height } = raster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  const greenOffset = colorMap.length / 3;\n  const blueOffset = colorMap.length / 3 * 2;\n  for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n    const mapIndex = raster[i];\n    rgbRaster[j] = colorMap[mapIndex] / 65536 * 256;\n    rgbRaster[j + 1] = colorMap[mapIndex + greenOffset] / 65536 * 256;\n    rgbRaster[j + 2] = colorMap[mapIndex + blueOffset] / 65536 * 256;\n  }\n  return rgbRaster;\n}\n\nexport function fromCMYK(cmykRaster) {\n  const { width, height } = cmykRaster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n  for (let i = 0, j = 0; i < cmykRaster.length; i += 4, j += 3) {\n    const c = cmykRaster[i];\n    const m = cmykRaster[i + 1];\n    const y = cmykRaster[i + 2];\n    const k = cmykRaster[i + 3];\n\n    rgbRaster[j] = 255 * ((255 - c) / 256) * ((255 - k) / 256);\n    rgbRaster[j + 1] = 255 * ((255 - m) / 256) * ((255 - k) / 256);\n    rgbRaster[j + 2] = 255 * ((255 - y) / 256) * ((255 - k) / 256);\n  }\n  return rgbRaster;\n}\n\nexport function fromYCbCr(yCbCrRaster) {\n  const { width, height } = yCbCrRaster;\n  const rgbRaster = new Uint8ClampedArray(width * height * 3);\n  for (let i = 0, j = 0; i < yCbCrRaster.length; i += 3, j += 3) {\n    const y = yCbCrRaster[i];\n    const cb = yCbCrRaster[i + 1];\n    const cr = yCbCrRaster[i + 2];\n\n    rgbRaster[j] = (y + (1.40200 * (cr - 0x80)));\n    rgbRaster[j + 1] = (y - (0.34414 * (cb - 0x80)) - (0.71414 * (cr - 0x80)));\n    rgbRaster[j + 2] = (y + (1.77200 * (cb - 0x80)));\n  }\n  return rgbRaster;\n}\n\nconst Xn = 0.95047;\nconst Yn = 1.00000;\nconst Zn = 1.08883;\n\n// from https://github.com/antimatter15/rgb-lab/blob/master/color.js\n\nexport function fromCIELab(cieLabRaster) {\n  const { width, height } = cieLabRaster;\n  const rgbRaster = new Uint8Array(width * height * 3);\n\n  for (let i = 0, j = 0; i < cieLabRaster.length; i += 3, j += 3) {\n    const L = cieLabRaster[i + 0];\n    const a_ = cieLabRaster[i + 1] << 24 >> 24; // conversion from uint8 to int8\n    const b_ = cieLabRaster[i + 2] << 24 >> 24; // same\n\n    let y = (L + 16) / 116;\n    let x = (a_ / 500) + y;\n    let z = y - (b_ / 200);\n    let r;\n    let g;\n    let b;\n\n    x = Xn * ((x * x * x > 0.008856) ? x * x * x : (x - (16 / 116)) / 7.787);\n    y = Yn * ((y * y * y > 0.008856) ? y * y * y : (y - (16 / 116)) / 7.787);\n    z = Zn * ((z * z * z > 0.008856) ? z * z * z : (z - (16 / 116)) / 7.787);\n\n    r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n    g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n    b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n    r = (r > 0.0031308) ? ((1.055 * (r ** (1 / 2.4))) - 0.055) : 12.92 * r;\n    g = (g > 0.0031308) ? ((1.055 * (g ** (1 / 2.4))) - 0.055) : 12.92 * g;\n    b = (b > 0.0031308) ? ((1.055 * (b ** (1 / 2.4))) - 0.055) : 12.92 * b;\n\n    rgbRaster[j] = Math.max(0, Math.min(1, r)) * 255;\n    rgbRaster[j + 1] = Math.max(0, Math.min(1, g)) * 255;\n    rgbRaster[j + 2] = Math.max(0, Math.min(1, b)) * 255;\n  }\n  return rgbRaster;\n}\n","import { getFloat16 } from '@petamoriken/float16';\n\nexport default class DataView64 {\n  constructor(arrayBuffer) {\n    this._dataView = new DataView(arrayBuffer);\n  }\n\n  get buffer() {\n    return this._dataView.buffer;\n  }\n\n  getUint64(offset, littleEndian) {\n    const left = this.getUint32(offset, littleEndian);\n    const right = this.getUint32(offset + 4, littleEndian);\n    let combined;\n    if (littleEndian) {\n      combined = left + ((2 ** 32) * right);\n      if (!Number.isSafeInteger(combined)) {\n        throw new Error(\n          `${combined} exceeds MAX_SAFE_INTEGER. `\n          + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n        );\n      }\n      return combined;\n    }\n    combined = ((2 ** 32) * left) + right;\n    if (!Number.isSafeInteger(combined)) {\n      throw new Error(\n        `${combined} exceeds MAX_SAFE_INTEGER. `\n        + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n      );\n    }\n\n    return combined;\n  }\n\n  // adapted from https://stackoverflow.com/a/55338384/8060591\n  getInt64(offset, littleEndian) {\n    let value = 0;\n    const isNegative = (this._dataView.getUint8(offset + (littleEndian ? 7 : 0)) & 0x80) > 0;\n    let carrying = true;\n    for (let i = 0; i < 8; i++) {\n      let byte = this._dataView.getUint8(offset + (littleEndian ? i : 7 - i));\n      if (isNegative) {\n        if (carrying) {\n          if (byte !== 0x00) {\n            byte = ~(byte - 1) & 0xff;\n            carrying = false;\n          }\n        } else {\n          byte = ~byte & 0xff;\n        }\n      }\n      value += byte * (256 ** i);\n    }\n    if (isNegative) {\n      value = -value;\n    }\n    return value;\n  }\n\n  getUint8(offset, littleEndian) {\n    return this._dataView.getUint8(offset, littleEndian);\n  }\n\n  getInt8(offset, littleEndian) {\n    return this._dataView.getInt8(offset, littleEndian);\n  }\n\n  getUint16(offset, littleEndian) {\n    return this._dataView.getUint16(offset, littleEndian);\n  }\n\n  getInt16(offset, littleEndian) {\n    return this._dataView.getInt16(offset, littleEndian);\n  }\n\n  getUint32(offset, littleEndian) {\n    return this._dataView.getUint32(offset, littleEndian);\n  }\n\n  getInt32(offset, littleEndian) {\n    return this._dataView.getInt32(offset, littleEndian);\n  }\n\n  getFloat16(offset, littleEndian) {\n    return getFloat16(this._dataView, offset, littleEndian);\n  }\n\n  getFloat32(offset, littleEndian) {\n    return this._dataView.getFloat32(offset, littleEndian);\n  }\n\n  getFloat64(offset, littleEndian) {\n    return this._dataView.getFloat64(offset, littleEndian);\n  }\n}\n","export default class DataSlice {\n  constructor(arrayBuffer, sliceOffset, littleEndian, bigTiff) {\n    this._dataView = new DataView(arrayBuffer);\n    this._sliceOffset = sliceOffset;\n    this._littleEndian = littleEndian;\n    this._bigTiff = bigTiff;\n  }\n\n  get sliceOffset() {\n    return this._sliceOffset;\n  }\n\n  get sliceTop() {\n    return this._sliceOffset + this.buffer.byteLength;\n  }\n\n  get littleEndian() {\n    return this._littleEndian;\n  }\n\n  get bigTiff() {\n    return this._bigTiff;\n  }\n\n  get buffer() {\n    return this._dataView.buffer;\n  }\n\n  covers(offset, length) {\n    return this.sliceOffset <= offset && this.sliceTop >= offset + length;\n  }\n\n  readUint8(offset) {\n    return this._dataView.getUint8(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readInt8(offset) {\n    return this._dataView.getInt8(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readUint16(offset) {\n    return this._dataView.getUint16(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readInt16(offset) {\n    return this._dataView.getInt16(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readUint32(offset) {\n    return this._dataView.getUint32(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readInt32(offset) {\n    return this._dataView.getInt32(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readFloat32(offset) {\n    return this._dataView.getFloat32(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readFloat64(offset) {\n    return this._dataView.getFloat64(\n      offset - this._sliceOffset, this._littleEndian,\n    );\n  }\n\n  readUint64(offset) {\n    const left = this.readUint32(offset);\n    const right = this.readUint32(offset + 4);\n    let combined;\n    if (this._littleEndian) {\n      combined = left + ((2 ** 32) * right);\n      if (!Number.isSafeInteger(combined)) {\n        throw new Error(\n          `${combined} exceeds MAX_SAFE_INTEGER. `\n          + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n        );\n      }\n      return combined;\n    }\n    combined = ((2 ** 32) * left) + right;\n    if (!Number.isSafeInteger(combined)) {\n      throw new Error(\n        `${combined} exceeds MAX_SAFE_INTEGER. `\n        + 'Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues',\n      );\n    }\n\n    return combined;\n  }\n\n  // adapted from https://stackoverflow.com/a/55338384/8060591\n  readInt64(offset) {\n    let value = 0;\n    const isNegative = (this._dataView.getUint8(offset + (this._littleEndian ? 7 : 0)) & 0x80)\n      > 0;\n    let carrying = true;\n    for (let i = 0; i < 8; i++) {\n      let byte = this._dataView.getUint8(\n        offset + (this._littleEndian ? i : 7 - i),\n      );\n      if (isNegative) {\n        if (carrying) {\n          if (byte !== 0x00) {\n            byte = ~(byte - 1) & 0xff;\n            carrying = false;\n          }\n        } else {\n          byte = ~byte & 0xff;\n        }\n      }\n      value += byte * (256 ** i);\n    }\n    if (isNegative) {\n      value = -value;\n    }\n    return value;\n  }\n\n  readOffset(offset) {\n    if (this._bigTiff) {\n      return this.readUint64(offset);\n    }\n    return this.readUint32(offset);\n  }\n}\n","const CRLFCRLF = '\\r\\n\\r\\n';\n\n/*\n * Shim for 'Object.fromEntries'\n */\nfunction itemsToObject(items) {\n  if (typeof Object.fromEntries !== 'undefined') {\n    return Object.fromEntries(items);\n  }\n  const obj = {};\n  for (const [key, value] of items) {\n    obj[key.toLowerCase()] = value;\n  }\n  return obj;\n}\n\n/**\n * Parse HTTP headers from a given string.\n * @param {String} text the text to parse the headers from\n * @returns {Object} the parsed headers with lowercase keys\n */\nfunction parseHeaders(text) {\n  const items = text\n    .split('\\r\\n')\n    .map((line) => {\n      const kv = line.split(':').map((str) => str.trim());\n      kv[0] = kv[0].toLowerCase();\n      return kv;\n    });\n\n  return itemsToObject(items);\n}\n\n/**\n * Parse a 'Content-Type' header value to the content-type and parameters\n * @param {String} rawContentType the raw string to parse from\n * @returns {Object} the parsed content type with the fields: type and params\n */\nexport function parseContentType(rawContentType) {\n  const [type, ...rawParams] = rawContentType.split(';').map((s) => s.trim());\n  const paramsItems = rawParams.map((param) => param.split('='));\n  return { type, params: itemsToObject(paramsItems) };\n}\n\n/**\n * Parse a 'Content-Range' header value to its start, end, and total parts\n * @param {String} rawContentRange the raw string to parse from\n * @returns {Object} the parsed parts\n */\nexport function parseContentRange(rawContentRange) {\n  let start;\n  let end;\n  let total;\n\n  if (rawContentRange) {\n    [, start, end, total] = rawContentRange.match(/bytes (\\d+)-(\\d+)\\/(\\d+)/);\n    start = parseInt(start, 10);\n    end = parseInt(end, 10);\n    total = parseInt(total, 10);\n  }\n\n  return { start, end, total };\n}\n\n/**\n * Parses a list of byteranges from the given 'multipart/byteranges' HTTP response.\n * Each item in the list has the following properties:\n * - headers: the HTTP headers\n * - data: the sliced ArrayBuffer for that specific part\n * - offset: the offset of the byterange within its originating file\n * - length: the length of the byterange\n * @param {ArrayBuffer} responseArrayBuffer the response to be parsed and split\n * @param {String} boundary the boundary string used to split the sections\n * @returns {Object[]} the parsed byteranges\n */\nexport function parseByteRanges(responseArrayBuffer, boundary) {\n  let offset = null;\n  const decoder = new TextDecoder('ascii');\n  const out = [];\n\n  const startBoundary = `--${boundary}`;\n  const endBoundary = `${startBoundary}--`;\n\n  // search for the initial boundary, may be offset by some bytes\n  // TODO: more efficient to check for `--` in bytes directly\n  for (let i = 0; i < 10; ++i) {\n    const text = decoder.decode(\n      new Uint8Array(responseArrayBuffer, i, startBoundary.length),\n    );\n    if (text === startBoundary) {\n      offset = i;\n    }\n  }\n\n  if (offset === null) {\n    throw new Error('Could not find initial boundary');\n  }\n\n  while (offset < responseArrayBuffer.byteLength) {\n    const text = decoder.decode(\n      new Uint8Array(responseArrayBuffer, offset,\n        Math.min(startBoundary.length + 1024, responseArrayBuffer.byteLength - offset),\n      ),\n    );\n\n    // break if we arrived at the end\n    if (text.length === 0 || text.startsWith(endBoundary)) {\n      break;\n    }\n\n    // assert that we are actually dealing with a byterange and are at the correct offset\n    if (!text.startsWith(startBoundary)) {\n      throw new Error('Part does not start with boundary');\n    }\n\n    // get a substring from where we read the headers\n    const innerText = text.substr(startBoundary.length + 2);\n\n    if (innerText.length === 0) {\n      break;\n    }\n\n    // find the double linebreak that denotes the end of the headers\n    const endOfHeaders = innerText.indexOf(CRLFCRLF);\n\n    // parse the headers to get the content range size\n    const headers = parseHeaders(innerText.substr(0, endOfHeaders));\n    const { start, end, total } = parseContentRange(headers['content-range']);\n\n    // calculate the length of the slice and the next offset\n    const startOfData = offset + startBoundary.length + endOfHeaders + CRLFCRLF.length;\n    const length = parseInt(end, 10) + 1 - parseInt(start, 10);\n    out.push({\n      headers,\n      data: responseArrayBuffer.slice(startOfData, startOfData + length),\n      offset: start,\n      length,\n      fileSize: total,\n    });\n\n    offset = startOfData + length + 4;\n  }\n\n  return out;\n}\n","/**\n * @typedef Slice\n * @property {number} offset\n * @property {number} length\n */\n\nexport class BaseSource {\n  /**\n   *\n   * @param {Slice[]} slices\n   * @returns {ArrayBuffer[]}\n   */\n  async fetch(slices, signal = undefined) {\n    return Promise.all(\n      slices.map((slice) => this.fetchSlice(slice, signal)),\n    );\n  }\n\n  /**\n   *\n   * @param {Slice} slice\n   * @returns {ArrayBuffer}\n   */\n  async fetchSlice(slice) {\n    throw new Error(`fetching of slice ${slice} not possible, not implemented`);\n  }\n\n  /**\n   * Returns the filesize if already determined and null otherwise\n   */\n  get fileSize() {\n    return null;\n  }\n\n  async close() {\n    // no-op by default\n  }\n}\n","export function assign(target, source) {\n  for (const key in source) {\n    if (source.hasOwnProperty(key)) {\n      target[key] = source[key];\n    }\n  }\n}\n\nexport function chunk(iterable, length) {\n  const results = [];\n  const lengthOfIterable = iterable.length;\n  for (let i = 0; i < lengthOfIterable; i += length) {\n    const chunked = [];\n    for (let ci = i; ci < i + length; ci++) {\n      chunked.push(iterable[ci]);\n    }\n    results.push(chunked);\n  }\n  return results;\n}\n\nexport function endsWith(string, expectedEnding) {\n  if (string.length < expectedEnding.length) {\n    return false;\n  }\n  const actualEnding = string.substr(string.length - expectedEnding.length);\n  return actualEnding === expectedEnding;\n}\n\nexport function forEach(iterable, func) {\n  const { length } = iterable;\n  for (let i = 0; i < length; i++) {\n    func(iterable[i], i);\n  }\n}\n\nexport function invert(oldObj) {\n  const newObj = {};\n  for (const key in oldObj) {\n    if (oldObj.hasOwnProperty(key)) {\n      const value = oldObj[key];\n      newObj[value] = key;\n    }\n  }\n  return newObj;\n}\n\nexport function range(n) {\n  const results = [];\n  for (let i = 0; i < n; i++) {\n    results.push(i);\n  }\n  return results;\n}\n\nexport function times(numTimes, func) {\n  const results = [];\n  for (let i = 0; i < numTimes; i++) {\n    results.push(func(i));\n  }\n  return results;\n}\n\nexport function toArray(iterable) {\n  const results = [];\n  const { length } = iterable;\n  for (let i = 0; i < length; i++) {\n    results.push(iterable[i]);\n  }\n  return results;\n}\n\nexport function toArrayRecursively(input) {\n  if (input.length) {\n    return toArray(input).map(toArrayRecursively);\n  }\n  return input;\n}\n\n// copied from https://github.com/academia-de-codigo/parse-content-range-header/blob/master/index.js\nexport function parseContentRange(headerValue) {\n  if (!headerValue) {\n    return null;\n  }\n\n  if (typeof headerValue !== 'string') {\n    throw new Error('invalid argument');\n  }\n\n  const parseInt = (number) => Number.parseInt(number, 10);\n\n  // Check for presence of unit\n  let matches = headerValue.match(/^(\\w*) /);\n  const unit = matches && matches[1];\n\n  // check for start-end/size header format\n  matches = headerValue.match(/(\\d+)-(\\d+)\\/(\\d+|\\*)/);\n  if (matches) {\n    return {\n      unit,\n      first: parseInt(matches[1]),\n      last: parseInt(matches[2]),\n      length: matches[3] === '*' ? null : parseInt(matches[3]),\n    };\n  }\n\n  // check for size header format\n  matches = headerValue.match(/(\\d+|\\*)/);\n  if (matches) {\n    return {\n      unit,\n      first: null,\n      last: null,\n      length: matches[1] === '*' ? null : parseInt(matches[1]),\n    };\n  }\n\n  return null;\n}\n\n/*\n * Promisified wrapper around 'setTimeout' to allow 'await'\n */\nexport async function wait(milliseconds) {\n  return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\n\nexport function zip(a, b) {\n  const A = Array.isArray(a) ? a : Array.from(a);\n  const B = Array.isArray(b) ? b : Array.from(b);\n  return A.map((k, i) => [k, B[i]]);\n}\n\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\nexport class AbortError extends Error {\n  constructor(params) {\n    // Pass remaining arguments (including vendor specific ones) to parent constructor\n    super(params);\n\n    // Maintains proper stack trace for where our error was thrown (only available on V8)\n    if (Error.captureStackTrace) {\n      Error.captureStackTrace(this, AbortError);\n    }\n\n    this.name = 'AbortError';\n  }\n}\n\nexport class CustomAggregateError extends Error {\n  constructor(errors, message) {\n    super(message);\n    this.errors = errors;\n    this.message = message;\n    this.name = 'AggregateError';\n  }\n}\n\nexport const AggregateError = CustomAggregateError;\n","import LRUCache from 'lru-cache';\nimport { BaseSource } from './basesource.js';\nimport { AbortError, AggregateError, wait, zip } from '../utils.js';\n\nclass Block {\n  /**\n   *\n   * @param {number} offset\n   * @param {number} length\n   * @param {ArrayBuffer} [data]\n   */\n  constructor(offset, length, data = null) {\n    this.offset = offset;\n    this.length = length;\n    this.data = data;\n  }\n\n  /**\n   * @returns {number} the top byte border\n   */\n  get top() {\n    return this.offset + this.length;\n  }\n}\n\nclass BlockGroup {\n  /**\n   *\n   * @param {number} offset\n   * @param {number} length\n   * @param {number[]} blockIds\n   */\n  constructor(offset, length, blockIds) {\n    this.offset = offset;\n    this.length = length;\n    this.blockIds = blockIds;\n  }\n}\n\nexport class BlockedSource extends BaseSource {\n  /**\n   *\n   * @param {Source} source The underlying source that shall be blocked and cached\n   * @param {object} options\n   */\n  constructor(source, { blockSize = 65536, cacheSize = 100 } = {}) {\n    super();\n    this.source = source;\n    this.blockSize = blockSize;\n\n    this.blockCache = new LRUCache({ max: cacheSize });\n\n    // mapping blockId -> Block instance\n    this.blockRequests = new Map();\n\n    // set of blockIds missing for the current requests\n    this.blockIdsToFetch = new Set();\n  }\n\n  get fileSize() {\n    return this.source.fileSize;\n  }\n\n  /**\n   *\n   * @param {basesource/Slice[]} slices\n   */\n  async fetch(slices, signal) {\n    const cachedBlocks = new Map();\n    const blockRequests = new Map();\n    const missingBlockIds = new Set();\n\n    for (const { offset, length } of slices) {\n      let top = offset + length;\n\n      const { fileSize } = this;\n      if (fileSize !== null) {\n        top = Math.min(top, fileSize);\n      }\n\n      const firstBlockOffset = Math.floor(offset / this.blockSize) * this.blockSize;\n\n      // chunk the current slice into blocks\n      for (let current = firstBlockOffset; current < top; current += this.blockSize) {\n        // check if the block is cached, being requested or still missing\n        const blockId = Math.floor(current / this.blockSize);\n\n        if (this.blockCache.has(blockId)) {\n          cachedBlocks.set(blockId, this.blockCache.get(blockId));\n        } else if (this.blockRequests.has(blockId)) {\n          blockRequests.set(blockId, this.blockRequests.get(blockId));\n        } else if (this.blockIdsToFetch.has(blockId)) {\n          missingBlockIds.add(blockId);\n        } else {\n          this.blockIdsToFetch.add(blockId);\n          missingBlockIds.add(blockId);\n        }\n      }\n    }\n\n    // allow additional block requests to accumulate\n    await wait();\n    this.fetchBlocks(signal);\n\n    for (const blockId of missingBlockIds) {\n      const block = this.blockRequests.get(blockId);\n      const cachedBlock = this.blockCache.get(blockId);\n\n      if (block) {\n        blockRequests.set(blockId, block);\n      } else if (cachedBlock) {\n        cachedBlocks.set(blockId, cachedBlock);\n      } else {\n        throw new Error(`Block ${blockId} is not in the block requests`);\n      }\n    }\n\n    // actually await all pending requests\n    let results = await Promise.allSettled(Array.from(blockRequests.values()));\n\n    // perform retries if a block was interrupted by a previous signal\n    if (results.some((result) => result.status === 'rejected')) {\n      const retriedBlockRequests = new Set();\n      for (const [blockId, result] of zip(blockRequests.keys(), results)) {\n        const { rejected, reason } = result;\n        if (rejected) {\n          // push some blocks back to the to-fetch list if they were\n          // aborted, but only when a different signal was used\n          if (reason.name === 'AbortError' && reason.signal !== signal) {\n            this.blockIdsToFetch.add(blockId);\n            retriedBlockRequests.add(blockId);\n          }\n        }\n      }\n\n      // start the retry of some blocks if required\n      if (this.blockIdsToFetch.length > 0) {\n        this.fetchBlocks(signal);\n        for (const blockId of retriedBlockRequests) {\n          const block = this.blockRequests.get(blockId);\n          if (!block) {\n            throw new Error(`Block ${blockId} is not in the block requests`);\n          }\n          blockRequests.set(blockId, block);\n        }\n        results = await Promise.allSettled(Array.from(blockRequests.values()));\n      }\n    }\n\n    // throw an error (either abort error or AggregateError if no abort was done)\n    if (results.some((result) => result.status === 'rejected')) {\n      if (signal && signal.aborted) {\n        throw new AbortError('Request was aborted');\n      }\n      throw new AggregateError(\n        results.filter((result) => result.status === 'rejected').map((result) => result.reason),\n        'Request failed',\n      );\n    }\n\n    // extract the actual block responses\n    const values = results.map((result) => result.value);\n\n    // create a final Map, with all required blocks for this request to satisfy\n    const requiredBlocks = new Map(zip(Array.from(blockRequests.keys()), values));\n    for (const [blockId, block] of cachedBlocks) {\n      requiredBlocks.set(blockId, block);\n    }\n\n    // TODO: satisfy each slice\n    return this.readSliceData(slices, requiredBlocks);\n  }\n\n  /**\n   *\n   * @param {AbortSignal} signal\n   */\n  fetchBlocks(signal) {\n    // check if we still need to\n    if (this.blockIdsToFetch.size > 0) {\n      const groups = this.groupBlocks(this.blockIdsToFetch);\n\n      // start requesting slices of data\n      const groupRequests = this.source.fetch(groups, signal);\n\n      for (let groupIndex = 0; groupIndex < groups.length; ++groupIndex) {\n        const group = groups[groupIndex];\n\n        for (const blockId of group.blockIds) {\n          // make an async IIFE for each block\n          const blockRequest = (async () => {\n            try {\n              const response = (await groupRequests)[groupIndex];\n              const blockOffset = blockId * this.blockSize;\n              const o = blockOffset - response.offset;\n              const t = Math.min(o + this.blockSize, response.data.byteLength);\n              const data = response.data.slice(o, t);\n              const block = new Block(\n                blockOffset,\n                data.byteLength,\n                data,\n              );\n              this.blockCache.set(blockId, block);\n              return block;\n            } catch (err) {\n              if (err.name === 'AbortError') {\n                // store the signal here, we need it to determine later if an\n                // error was caused by this signal\n                err.signal = signal;\n              }\n              throw err;\n            } finally {\n              this.blockRequests.delete(blockId);\n            }\n          })();\n          this.blockRequests.set(blockId, blockRequest);\n        }\n      }\n      this.blockIdsToFetch.clear();\n    }\n  }\n\n  /**\n   *\n   * @param {Set} blockIds\n   * @returns {BlockGroup[]}\n   */\n  groupBlocks(blockIds) {\n    const sortedBlockIds = Array.from(blockIds).sort((a, b) => a - b);\n    if (sortedBlockIds.length === 0) {\n      return [];\n    }\n    let current = [];\n    let lastBlockId = null;\n    const groups = [];\n\n    for (const blockId of sortedBlockIds) {\n      if (lastBlockId === null || lastBlockId + 1 === blockId) {\n        current.push(blockId);\n        lastBlockId = blockId;\n      } else {\n        groups.push(new BlockGroup(\n          current[0] * this.blockSize,\n          current.length * this.blockSize,\n          current,\n        ));\n        current = [blockId];\n        lastBlockId = blockId;\n      }\n    }\n\n    groups.push(new BlockGroup(\n      current[0] * this.blockSize,\n      current.length * this.blockSize,\n      current,\n    ));\n\n    return groups;\n  }\n\n  /**\n   *\n   * @param {Slice[]} slices\n   * @param {Map} blocks\n   */\n  readSliceData(slices, blocks) {\n    return slices.map((slice) => {\n      const top = slice.offset + slice.length;\n      const blockIdLow = Math.floor(slice.offset / this.blockSize);\n      const blockIdHigh = Math.floor((slice.offset + slice.length) / this.blockSize);\n      const sliceData = new ArrayBuffer(slice.length);\n      const sliceView = new Uint8Array(sliceData);\n\n      for (let blockId = blockIdLow; blockId <= blockIdHigh; ++blockId) {\n        const block = blocks.get(blockId);\n        const delta = block.offset - slice.offset;\n        const topDelta = block.top - top;\n        let blockInnerOffset = 0;\n        let rangeInnerOffset = 0;\n        let usedBlockLength;\n\n        if (delta < 0) {\n          blockInnerOffset = -delta;\n        } else if (delta > 0) {\n          rangeInnerOffset = delta;\n        }\n\n        if (topDelta < 0) {\n          usedBlockLength = block.length - blockInnerOffset;\n        } else {\n          usedBlockLength = top - block.offset - blockInnerOffset;\n        }\n\n        const blockView = new Uint8Array(block.data, blockInnerOffset, usedBlockLength);\n        sliceView.set(blockView, rangeInnerOffset);\n      }\n\n      return sliceData;\n    });\n  }\n}\n","export class BaseResponse {\n  /**\n   * Returns whether the response has an ok'ish status code\n   */\n  get ok() {\n    return this.status >= 200 && this.status <= 299;\n  }\n\n  /**\n   * Returns the status code of the response\n   */\n  get status() {\n    throw new Error('not implemented');\n  }\n\n  /**\n   * Returns the value of the specified header\n   * @param {string} headerName the header name\n   * @returns {string} the header value\n   */\n  getHeader(headerName) { // eslint-disable-line no-unused-vars\n    throw new Error('not implemented');\n  }\n\n  /**\n   * @returns {ArrayBuffer} the response data of the request\n   */\n  async getData() {\n    throw new Error('not implemented');\n  }\n}\n\nexport class BaseClient {\n  constructor(url) {\n    this.url = url;\n  }\n\n  /**\n   * Send a request with the options\n   * @param {object} [options]\n   */\n  async request({ headers, credentials, signal } = {}) { // eslint-disable-line no-unused-vars\n    throw new Error('request is not implemented');\n  }\n}\n","import { BaseClient, BaseResponse } from './base.js';\n\nclass FetchResponse extends BaseResponse {\n  /**\n   * BaseResponse facade for fetch API Response\n   * @param {Response} response\n   */\n  constructor(response) {\n    super();\n    this.response = response;\n  }\n\n  get status() {\n    return this.response.status;\n  }\n\n  getHeader(name) {\n    return this.response.headers.get(name);\n  }\n\n  async getData() {\n    const data = this.response.arrayBuffer\n      ? await this.response.arrayBuffer()\n      : (await this.response.buffer()).buffer;\n    return data;\n  }\n}\n\nexport class FetchClient extends BaseClient {\n  constructor(url, credentials) {\n    super(url);\n    this.credentials = credentials;\n  }\n\n  async request({ headers, credentials, signal } = {}) {\n    const response = await fetch(this.url, {\n      headers, credentials, signal,\n    });\n    return new FetchResponse(response);\n  }\n}\n","import { BaseClient, BaseResponse } from './base.js';\nimport { AbortError } from '../../utils.js';\n\nclass XHRResponse extends BaseResponse {\n  /**\n   * BaseResponse facade for XMLHttpRequest\n   * @param {XMLHttpRequest} xhr\n   * @param {ArrayBuffer} data\n   */\n  constructor(xhr, data) {\n    super();\n    this.xhr = xhr;\n    this.data = data;\n  }\n\n  get status() {\n    return this.xhr.status;\n  }\n\n  getHeader(name) {\n    return this.xhr.getResponseHeader(name);\n  }\n\n  async getData() {\n    return this.data;\n  }\n}\n\nexport class XHRClient extends BaseClient {\n  constructRequest(headers, signal) {\n    return new Promise((resolve, reject) => {\n      const xhr = new XMLHttpRequest();\n      xhr.open('GET', this.url);\n      xhr.responseType = 'arraybuffer';\n      for (const [key, value] of Object.entries(headers)) {\n        xhr.setRequestHeader(key, value);\n      }\n\n      // hook signals\n      xhr.onload = () => {\n        const data = xhr.response;\n        resolve(new XHRResponse(xhr, data));\n      };\n      xhr.onerror = reject;\n      xhr.onabort = () => reject(new AbortError('Request aborted'));\n      xhr.send();\n\n      if (signal) {\n        if (signal.aborted) {\n          xhr.abort();\n        }\n        signal.addEventListener('abort', () => xhr.abort());\n      }\n    });\n  }\n\n  async request({ headers, signal } = {}) {\n    const response = await this.constructRequest(headers, signal);\n    return response;\n  }\n}\n","import http from 'http';\nimport https from 'https';\nimport urlMod from 'url';\n\nimport { BaseClient, BaseResponse } from './base.js';\nimport { AbortError } from '../../utils.js';\n\nclass HttpResponse extends BaseResponse {\n  /**\n   * BaseResponse facade for node HTTP/HTTPS API Response\n   * @param {http.ServerResponse} response\n   */\n  constructor(response, dataPromise) {\n    super();\n    this.response = response;\n    this.dataPromise = dataPromise;\n  }\n\n  get status() {\n    return this.response.statusCode;\n  }\n\n  getHeader(name) {\n    return this.response.headers[name];\n  }\n\n  async getData() {\n    const data = await this.dataPromise;\n    return data;\n  }\n}\n\nexport class HttpClient extends BaseClient {\n  constructor(url) {\n    super(url);\n    this.parsedUrl = urlMod.parse(this.url);\n    this.httpApi = (this.parsedUrl.protocol === 'http:' ? http : https);\n  }\n\n  constructRequest(headers, signal) {\n    return new Promise((resolve, reject) => {\n      const request = this.httpApi.get(\n        {\n          ...this.parsedUrl,\n          headers,\n        },\n        (response) => {\n          const dataPromise = new Promise((resolveData) => {\n            const chunks = [];\n\n            // collect chunks\n            response.on('data', (chunk) => {\n              chunks.push(chunk);\n            });\n\n            // concatenate all chunks and resolve the promise with the resulting buffer\n            response.on('end', () => {\n              const data = Buffer.concat(chunks).buffer;\n              resolveData(data);\n            });\n            response.on('error', reject);\n          });\n          resolve(new HttpResponse(response, dataPromise));\n        },\n      );\n      request.on('error', reject);\n\n      if (signal) {\n        if (signal.aborted) {\n          request.destroy(new AbortError('Request aborted'));\n        }\n        signal.addEventListener('abort', () => request.destroy(new AbortError('Request aborted')));\n      }\n    });\n  }\n\n  async request({ headers, signal } = {}) {\n    const response = await this.constructRequest(headers, signal);\n    return response;\n  }\n}\n","import { parseByteRanges, parseContentRange, parseContentType } from './httputils.js';\nimport { BaseSource } from './basesource.js';\nimport { BlockedSource } from './blockedsource.js';\n\nimport { FetchClient } from './client/fetch.js';\nimport { XHRClient } from './client/xhr.js';\nimport { HttpClient } from './client/http.js';\n\nclass RemoteSource extends BaseSource {\n  /**\n   *\n   * @param {BaseClient} client\n   * @param {object} headers\n   * @param {numbers} maxRanges\n   * @param {boolean} allowFullFile\n   */\n  constructor(client, headers, maxRanges, allowFullFile) {\n    super();\n    this.client = client;\n    this.headers = headers;\n    this.maxRanges = maxRanges;\n    this.allowFullFile = allowFullFile;\n    this._fileSize = null;\n  }\n\n  /**\n   *\n   * @param {Slice[]} slices\n   */\n  async fetch(slices, signal) {\n    // if we allow multi-ranges, split the incoming request into that many sub-requests\n    // and join them afterwards\n    if (this.maxRanges >= slices.length) {\n      return this.fetchSlices(slices, signal);\n    } else if (this.maxRanges > 0 && slices.length > 1) {\n      // TODO: split into multiple multi-range requests\n\n      // const subSlicesRequests = [];\n      // for (let i = 0; i < slices.length; i += this.maxRanges) {\n      //   subSlicesRequests.push(\n      //     this.fetchSlices(slices.slice(i, i + this.maxRanges), signal),\n      //   );\n      // }\n      // return (await Promise.all(subSlicesRequests)).flat();\n    }\n\n    // otherwise make a single request for each slice\n    return Promise.all(\n      slices.map((slice) => this.fetchSlice(slice, signal)),\n    );\n  }\n\n  async fetchSlices(slices, signal) {\n    const response = await this.client.request({\n      headers: {\n        ...this.headers,\n        Range: `bytes=${slices\n          .map(({ offset, length }) => `${offset}-${offset + length}`)\n          .join(',')\n        }`,\n      },\n      signal,\n    });\n\n    if (!response.ok) {\n      throw new Error('Error fetching data.');\n    } else if (response.status === 206) {\n      const { type, params } = parseContentType(response.getHeader('content-type'));\n      if (type === 'multipart/byteranges') {\n        const byteRanges = parseByteRanges(await response.getData(), params.boundary);\n        this._fileSize = byteRanges[0].fileSize || null;\n        return byteRanges;\n      }\n\n      const data = await response.getData();\n\n      const { start, end, total } = parseContentRange(response.getHeader('content-range'));\n      this._fileSize = total || null;\n      const first = [{\n        data,\n        offset: start,\n        length: end - start,\n      }];\n\n      if (slices.length > 1) {\n        // we requested more than one slice, but got only the first\n        // unfortunately, some HTTP Servers don't support multi-ranges\n        // and return onyl the first\n\n        // get the rest of the slices and fetch them iteratetively\n        const others = await Promise.all(slices.slice(1).map((slice) => this.fetchSlice(slice, signal)));\n        return first.concat(others);\n      }\n      return first;\n    } else {\n      if (!this.allowFullFile) {\n        throw new Error('Server responded with full file');\n      }\n      const data = await response.getData();\n      this._fileSize = data.byteLength;\n      return [{\n        data,\n        offset: 0,\n        length: data.byteLength,\n      }];\n    }\n  }\n\n  async fetchSlice(slice, signal) {\n    const { offset, length } = slice;\n    const response = await this.client.request({\n      headers: {\n        ...this.headers,\n        Range: `bytes=${offset}-${offset + length}`,\n      },\n      signal,\n    });\n\n    // check the response was okay and if the server actually understands range requests\n    if (!response.ok) {\n      throw new Error('Error fetching data.');\n    } else if (response.status === 206) {\n      const data = await response.getData();\n\n      const { total } = parseContentRange(response.getHeader('content-range'));\n      this._fileSize = total || null;\n      return {\n        data,\n        offset,\n        length,\n      };\n    } else {\n      if (!this.allowFullFile) {\n        throw new Error('Server responded with full file');\n      }\n\n      const data = await response.getData();\n\n      this._fileSize = data.byteLength;\n      return {\n        data,\n        offset: 0,\n        length: data.byteLength,\n      };\n    }\n  }\n\n  get fileSize() {\n    return this._fileSize;\n  }\n}\n\nfunction maybeWrapInBlockedSource(source, { blockSize, cacheSize }) {\n  if (blockSize === null) {\n    return source;\n  }\n  return new BlockedSource(source, blockSize, cacheSize);\n}\n\nexport function makeFetchSource(url, { headers = {}, credentials, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n  const client = new FetchClient(url, credentials);\n  const source = new RemoteSource(client, headers, maxRanges, allowFullFile);\n  return maybeWrapInBlockedSource(source, blockOptions);\n}\n\nexport function makeXHRSource(url, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n  const client = new XHRClient(url);\n  const source = new RemoteSource(client, headers, maxRanges, allowFullFile);\n  return maybeWrapInBlockedSource(source, blockOptions);\n}\n\nexport function makeHttpSource(url, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n  const client = new HttpClient(url);\n  const source = new RemoteSource(client, headers, maxRanges, allowFullFile);\n  return maybeWrapInBlockedSource(source, blockOptions);\n}\n\n/**\n *\n * @param {string} url\n * @param {object} options\n */\nexport function makeRemoteSource(url, { forceXHR = false, ...clientOptions } = {}) {\n  if (typeof fetch === 'function' && !forceXHR) {\n    return makeFetchSource(url, clientOptions);\n  }\n  if (typeof XMLHttpRequest !== 'undefined') {\n    return makeXHRSource(url, clientOptions);\n  }\n  return makeHttpSource(url, clientOptions);\n}\n","import { BaseSource } from './basesource.js';\n\nclass FileReaderSource extends BaseSource {\n  constructor(file) {\n    super();\n    this.file = file;\n  }\n\n  async fetchSlice(slice, signal) {\n    return new Promise((resolve, reject) => {\n      const blob = this.file.slice(slice.offset, slice.offset + slice.length);\n      const reader = new FileReader();\n      reader.onload = (event) => resolve(event.target.result);\n      reader.onerror = reject;\n      reader.onabort = reject;\n      reader.readAsArrayBuffer(blob);\n\n      if (signal) {\n        signal.addEventListener('abort', () => reader.abort());\n      }\n    });\n  }\n}\n\n/**\n * Create a new source from a given file/blob.\n * @param {Blob} file The file or blob to read from.\n * @returns The constructed source\n */\nexport function makeFileReaderSource(file) {\n  return new FileReaderSource(file);\n}\n","/** @module geotiff */\nimport GeoTIFFImage from './geotiffimage.js';\nimport DataView64 from './dataview64.js';\nimport DataSlice from './dataslice.js';\nimport Pool from './pool.js';\n\nimport { makeRemoteSource } from './source/remote.js';\nimport { makeBufferSource } from './source/arraybuffer.js';\nimport { makeFileReaderSource } from './source/filereader.js';\nimport { makeFileSource } from './source/file.js';\n\nimport { fieldTypes, fieldTagNames, arrayFields, geoKeyNames } from './globals.js';\nimport { writeGeotiff } from './geotiffwriter.js';\nimport * as globals from './globals.js';\nimport * as rgb from './rgb.js';\nimport { getDecoder, addDecoder } from './compression/index.js';\nimport { setLogger } from './logging.js';\n\nexport { globals };\nexport { rgb };\nexport { getDecoder, addDecoder };\nexport { setLogger };\n\n/**\n * @typedef {Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Float32Array | Float64Array}\n * TypedArray\n */\n\nfunction getFieldTypeLength(fieldType) {\n  switch (fieldType) {\n    case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.SBYTE: case fieldTypes.UNDEFINED:\n      return 1;\n    case fieldTypes.SHORT: case fieldTypes.SSHORT:\n      return 2;\n    case fieldTypes.LONG: case fieldTypes.SLONG: case fieldTypes.FLOAT: case fieldTypes.IFD:\n      return 4;\n    case fieldTypes.RATIONAL: case fieldTypes.SRATIONAL: case fieldTypes.DOUBLE:\n    case fieldTypes.LONG8: case fieldTypes.SLONG8: case fieldTypes.IFD8:\n      return 8;\n    default:\n      throw new RangeError(`Invalid field type: ${fieldType}`);\n  }\n}\n\nfunction parseGeoKeyDirectory(fileDirectory) {\n  const rawGeoKeyDirectory = fileDirectory.GeoKeyDirectory;\n  if (!rawGeoKeyDirectory) {\n    return null;\n  }\n\n  const geoKeyDirectory = {};\n  for (let i = 4; i <= rawGeoKeyDirectory[3] * 4; i += 4) {\n    const key = geoKeyNames[rawGeoKeyDirectory[i]];\n    const location = (rawGeoKeyDirectory[i + 1])\n      ? (fieldTagNames[rawGeoKeyDirectory[i + 1]]) : null;\n    const count = rawGeoKeyDirectory[i + 2];\n    const offset = rawGeoKeyDirectory[i + 3];\n\n    let value = null;\n    if (!location) {\n      value = offset;\n    } else {\n      value = fileDirectory[location];\n      if (typeof value === 'undefined' || value === null) {\n        throw new Error(`Could not get value of geoKey '${key}'.`);\n      } else if (typeof value === 'string') {\n        value = value.substring(offset, offset + count - 1);\n      } else if (value.subarray) {\n        value = value.subarray(offset, offset + count);\n        if (count === 1) {\n          value = value[0];\n        }\n      }\n    }\n    geoKeyDirectory[key] = value;\n  }\n  return geoKeyDirectory;\n}\n\nfunction getValues(dataSlice, fieldType, count, offset) {\n  let values = null;\n  let readMethod = null;\n  const fieldTypeLength = getFieldTypeLength(fieldType);\n\n  switch (fieldType) {\n    case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.UNDEFINED:\n      values = new Uint8Array(count); readMethod = dataSlice.readUint8;\n      break;\n    case fieldTypes.SBYTE:\n      values = new Int8Array(count); readMethod = dataSlice.readInt8;\n      break;\n    case fieldTypes.SHORT:\n      values = new Uint16Array(count); readMethod = dataSlice.readUint16;\n      break;\n    case fieldTypes.SSHORT:\n      values = new Int16Array(count); readMethod = dataSlice.readInt16;\n      break;\n    case fieldTypes.LONG: case fieldTypes.IFD:\n      values = new Uint32Array(count); readMethod = dataSlice.readUint32;\n      break;\n    case fieldTypes.SLONG:\n      values = new Int32Array(count); readMethod = dataSlice.readInt32;\n      break;\n    case fieldTypes.LONG8: case fieldTypes.IFD8:\n      values = new Array(count); readMethod = dataSlice.readUint64;\n      break;\n    case fieldTypes.SLONG8:\n      values = new Array(count); readMethod = dataSlice.readInt64;\n      break;\n    case fieldTypes.RATIONAL:\n      values = new Uint32Array(count * 2); readMethod = dataSlice.readUint32;\n      break;\n    case fieldTypes.SRATIONAL:\n      values = new Int32Array(count * 2); readMethod = dataSlice.readInt32;\n      break;\n    case fieldTypes.FLOAT:\n      values = new Float32Array(count); readMethod = dataSlice.readFloat32;\n      break;\n    case fieldTypes.DOUBLE:\n      values = new Float64Array(count); readMethod = dataSlice.readFloat64;\n      break;\n    default:\n      throw new RangeError(`Invalid field type: ${fieldType}`);\n  }\n\n  // normal fields\n  if (!(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {\n    for (let i = 0; i < count; ++i) {\n      values[i] = readMethod.call(\n        dataSlice, offset + (i * fieldTypeLength),\n      );\n    }\n  } else { // RATIONAL or SRATIONAL\n    for (let i = 0; i < count; i += 2) {\n      values[i] = readMethod.call(\n        dataSlice, offset + (i * fieldTypeLength),\n      );\n      values[i + 1] = readMethod.call(\n        dataSlice, offset + ((i * fieldTypeLength) + 4),\n      );\n    }\n  }\n\n  if (fieldType === fieldTypes.ASCII) {\n    return new TextDecoder('utf-8').decode(values);\n  }\n  return values;\n}\n\n/**\n * Data class to store the parsed file directory, geo key directory and\n * offset to the next IFD\n */\nclass ImageFileDirectory {\n  constructor(fileDirectory, geoKeyDirectory, nextIFDByteOffset) {\n    this.fileDirectory = fileDirectory;\n    this.geoKeyDirectory = geoKeyDirectory;\n    this.nextIFDByteOffset = nextIFDByteOffset;\n  }\n}\n\n/**\n * Error class for cases when an IFD index was requested, that does not exist\n * in the file.\n */\nclass GeoTIFFImageIndexError extends Error {\n  constructor(index) {\n    super(`No image at index ${index}`);\n    this.index = index;\n  }\n}\n\nclass GeoTIFFBase {\n  /**\n   * (experimental) Reads raster data from the best fitting image. This function uses\n   * the image with the lowest resolution that is still a higher resolution than the\n   * requested resolution.\n   * When specified, the `bbox` option is translated to the `window` option and the\n   * `resX` and `resY` to `width` and `height` respectively.\n   * Then, the [readRasters]{@link GeoTIFFImage#readRasters} method of the selected\n   * image is called and the result returned.\n   * @see GeoTIFFImage.readRasters\n   * @param {import('./geotiffimage').ReadRasterOptions} [options={}] optional parameters\n   * @returns {Promise<(TypedArray|TypedArray[])>} the decoded arrays as a promise\n   */\n  async readRasters(options = {}) {\n    const { window: imageWindow, width, height } = options;\n    let { resX, resY, bbox } = options;\n\n    const firstImage = await this.getImage();\n    let usedImage = firstImage;\n    const imageCount = await this.getImageCount();\n    const imgBBox = firstImage.getBoundingBox();\n\n    if (imageWindow && bbox) {\n      throw new Error('Both \"bbox\" and \"window\" passed.');\n    }\n\n    // if width/height is passed, transform it to resolution\n    if (width || height) {\n      // if we have an image window (pixel coordinates), transform it to a BBox\n      // using the origin/resolution of the first image.\n      if (imageWindow) {\n        const [oX, oY] = firstImage.getOrigin();\n        const [rX, rY] = firstImage.getResolution();\n\n        bbox = [\n          oX + (imageWindow[0] * rX),\n          oY + (imageWindow[1] * rY),\n          oX + (imageWindow[2] * rX),\n          oY + (imageWindow[3] * rY),\n        ];\n      }\n\n      // if we have a bbox (or calculated one)\n\n      const usedBBox = bbox || imgBBox;\n\n      if (width) {\n        if (resX) {\n          throw new Error('Both width and resX passed');\n        }\n        resX = (usedBBox[2] - usedBBox[0]) / width;\n      }\n      if (height) {\n        if (resY) {\n          throw new Error('Both width and resY passed');\n        }\n        resY = (usedBBox[3] - usedBBox[1]) / height;\n      }\n    }\n\n    // if resolution is set or calculated, try to get the image with the worst acceptable resolution\n    if (resX || resY) {\n      const allImages = [];\n      for (let i = 0; i < imageCount; ++i) {\n        const image = await this.getImage(i);\n        const { SubfileType: subfileType, NewSubfileType: newSubfileType } = image.fileDirectory;\n        if (i === 0 || subfileType === 2 || newSubfileType & 1) {\n          allImages.push(image);\n        }\n      }\n\n      allImages.sort((a, b) => a.getWidth() - b.getWidth());\n      for (let i = 0; i < allImages.length; ++i) {\n        const image = allImages[i];\n        const imgResX = (imgBBox[2] - imgBBox[0]) / image.getWidth();\n        const imgResY = (imgBBox[3] - imgBBox[1]) / image.getHeight();\n\n        usedImage = image;\n        if ((resX && resX > imgResX) || (resY && resY > imgResY)) {\n          break;\n        }\n      }\n    }\n\n    let wnd = imageWindow;\n    if (bbox) {\n      const [oX, oY] = firstImage.getOrigin();\n      const [imageResX, imageResY] = usedImage.getResolution(firstImage);\n\n      wnd = [\n        Math.round((bbox[0] - oX) / imageResX),\n        Math.round((bbox[1] - oY) / imageResY),\n        Math.round((bbox[2] - oX) / imageResX),\n        Math.round((bbox[3] - oY) / imageResY),\n      ];\n      wnd = [\n        Math.min(wnd[0], wnd[2]),\n        Math.min(wnd[1], wnd[3]),\n        Math.max(wnd[0], wnd[2]),\n        Math.max(wnd[1], wnd[3]),\n      ];\n    }\n\n    return usedImage.readRasters({ ...options, window: wnd });\n  }\n}\n\n/**\n * @typedef {Object} GeoTIFFOptions\n * @property {boolean} [cache=false] whether or not decoded tiles shall be cached.\n */\n\n/**\n * The abstraction for a whole GeoTIFF file.\n * @augments GeoTIFFBase\n */\nclass GeoTIFF extends GeoTIFFBase {\n  /**\n   * @constructor\n   * @param {*} source The datasource to read from.\n   * @param {boolean} littleEndian Whether the image uses little endian.\n   * @param {boolean} bigTiff Whether the image uses bigTIFF conventions.\n   * @param {number} firstIFDOffset The numeric byte-offset from the start of the image\n   *                                to the first IFD.\n   * @param {GeoTIFFOptions} [options] further options.\n   */\n  constructor(source, littleEndian, bigTiff, firstIFDOffset, options = {}) {\n    super();\n    this.source = source;\n    this.littleEndian = littleEndian;\n    this.bigTiff = bigTiff;\n    this.firstIFDOffset = firstIFDOffset;\n    this.cache = options.cache || false;\n    this.ifdRequests = [];\n    this.ghostValues = null;\n  }\n\n  async getSlice(offset, size) {\n    const fallbackSize = this.bigTiff ? 4048 : 1024;\n    return new DataSlice(\n      (await this.source.fetch([{\n        offset,\n        length: typeof size !== 'undefined' ? size : fallbackSize,\n      }]))[0],\n      offset,\n      this.littleEndian,\n      this.bigTiff,\n    );\n  }\n\n  /**\n   * Instructs to parse an image file directory at the given file offset.\n   * As there is no way to ensure that a location is indeed the start of an IFD,\n   * this function must be called with caution (e.g only using the IFD offsets from\n   * the headers or other IFDs).\n   * @param {number} offset the offset to parse the IFD at\n   * @returns {Promise<ImageFileDirectory>} the parsed IFD\n   */\n  async parseFileDirectoryAt(offset) {\n    const entrySize = this.bigTiff ? 20 : 12;\n    const offsetSize = this.bigTiff ? 8 : 2;\n\n    let dataSlice = await this.getSlice(offset);\n    const numDirEntries = this.bigTiff\n      ? dataSlice.readUint64(offset)\n      : dataSlice.readUint16(offset);\n\n    // if the slice does not cover the whole IFD, request a bigger slice, where the\n    // whole IFD fits: num of entries + n x tag length + offset to next IFD\n    const byteSize = (numDirEntries * entrySize) + (this.bigTiff ? 16 : 6);\n    if (!dataSlice.covers(offset, byteSize)) {\n      dataSlice = await this.getSlice(offset, byteSize);\n    }\n\n    const fileDirectory = {};\n\n    // loop over the IFD and create a file directory object\n    let i = offset + (this.bigTiff ? 8 : 2);\n    for (let entryCount = 0; entryCount < numDirEntries; i += entrySize, ++entryCount) {\n      const fieldTag = dataSlice.readUint16(i);\n      const fieldType = dataSlice.readUint16(i + 2);\n      const typeCount = this.bigTiff\n        ? dataSlice.readUint64(i + 4)\n        : dataSlice.readUint32(i + 4);\n\n      let fieldValues;\n      let value;\n      const fieldTypeLength = getFieldTypeLength(fieldType);\n      const valueOffset = i + (this.bigTiff ? 12 : 8);\n\n      // check whether the value is directly encoded in the tag or refers to a\n      // different external byte range\n      if (fieldTypeLength * typeCount <= (this.bigTiff ? 8 : 4)) {\n        fieldValues = getValues(dataSlice, fieldType, typeCount, valueOffset);\n      } else {\n        // resolve the reference to the actual byte range\n        const actualOffset = dataSlice.readOffset(valueOffset);\n        const length = getFieldTypeLength(fieldType) * typeCount;\n\n        // check, whether we actually cover the referenced byte range; if not,\n        // request a new slice of bytes to read from it\n        if (dataSlice.covers(actualOffset, length)) {\n          fieldValues = getValues(dataSlice, fieldType, typeCount, actualOffset);\n        } else {\n          const fieldDataSlice = await this.getSlice(actualOffset, length);\n          fieldValues = getValues(fieldDataSlice, fieldType, typeCount, actualOffset);\n        }\n      }\n\n      // unpack single values from the array\n      if (typeCount === 1 && arrayFields.indexOf(fieldTag) === -1\n        && !(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {\n        value = fieldValues[0];\n      } else {\n        value = fieldValues;\n      }\n\n      // write the tags value to the file directly\n      fileDirectory[fieldTagNames[fieldTag]] = value;\n    }\n    const geoKeyDirectory = parseGeoKeyDirectory(fileDirectory);\n    const nextIFDByteOffset = dataSlice.readOffset(\n      offset + offsetSize + (entrySize * numDirEntries),\n    );\n\n    return new ImageFileDirectory(\n      fileDirectory,\n      geoKeyDirectory,\n      nextIFDByteOffset,\n    );\n  }\n\n  async requestIFD(index) {\n    // see if we already have that IFD index requested.\n    if (this.ifdRequests[index]) {\n      // attach to an already requested IFD\n      return this.ifdRequests[index];\n    } else if (index === 0) {\n      // special case for index 0\n      this.ifdRequests[index] = this.parseFileDirectoryAt(this.firstIFDOffset);\n      return this.ifdRequests[index];\n    } else if (!this.ifdRequests[index - 1]) {\n      // if the previous IFD was not yet loaded, load that one first\n      // this is the recursive call.\n      try {\n        this.ifdRequests[index - 1] = this.requestIFD(index - 1);\n      } catch (e) {\n        // if the previous one already was an index error, rethrow\n        // with the current index\n        if (e instanceof GeoTIFFImageIndexError) {\n          throw new GeoTIFFImageIndexError(index);\n        }\n        // rethrow anything else\n        throw e;\n      }\n    }\n    // if the previous IFD was loaded, we can finally fetch the one we are interested in.\n    // we need to wrap this in an IIFE, otherwise this.ifdRequests[index] would be delayed\n    this.ifdRequests[index] = (async () => {\n      const previousIfd = await this.ifdRequests[index - 1];\n      if (previousIfd.nextIFDByteOffset === 0) {\n        throw new GeoTIFFImageIndexError(index);\n      }\n      return this.parseFileDirectoryAt(previousIfd.nextIFDByteOffset);\n    })();\n    return this.ifdRequests[index];\n  }\n\n  /**\n   * Get the n-th internal subfile of an image. By default, the first is returned.\n   *\n   * @param {number} [index=0] the index of the image to return.\n   * @returns {Promise<GeoTIFFImage>} the image at the given index\n   */\n  async getImage(index = 0) {\n    const ifd = await this.requestIFD(index);\n    return new GeoTIFFImage(\n      ifd.fileDirectory, ifd.geoKeyDirectory,\n      this.dataView, this.littleEndian, this.cache, this.source,\n    );\n  }\n\n  /**\n   * Returns the count of the internal subfiles.\n   *\n   * @returns {Promise<number>} the number of internal subfile images\n   */\n  async getImageCount() {\n    let index = 0;\n    // loop until we run out of IFDs\n    let hasNext = true;\n    while (hasNext) {\n      try {\n        await this.requestIFD(index);\n        ++index;\n      } catch (e) {\n        if (e instanceof GeoTIFFImageIndexError) {\n          hasNext = false;\n        } else {\n          throw e;\n        }\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Get the values of the COG ghost area as a parsed map.\n   * See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference\n   * @returns {Promise<Object>} the parsed ghost area or null, if no such area was found\n   */\n  async getGhostValues() {\n    const offset = this.bigTiff ? 16 : 8;\n    if (this.ghostValues) {\n      return this.ghostValues;\n    }\n    const detectionString = 'GDAL_STRUCTURAL_METADATA_SIZE=';\n    const heuristicAreaSize = detectionString.length + 100;\n    let slice = await this.getSlice(offset, heuristicAreaSize);\n    if (detectionString === getValues(slice, fieldTypes.ASCII, detectionString.length, offset)) {\n      const valuesString = getValues(slice, fieldTypes.ASCII, heuristicAreaSize, offset);\n      const firstLine = valuesString.split('\\n')[0];\n      const metadataSize = Number(firstLine.split('=')[1].split(' ')[0]) + firstLine.length;\n      if (metadataSize > heuristicAreaSize) {\n        slice = await this.getSlice(offset, metadataSize);\n      }\n      const fullString = getValues(slice, fieldTypes.ASCII, metadataSize, offset);\n      this.ghostValues = {};\n      fullString\n        .split('\\n')\n        .filter((line) => line.length > 0)\n        .map((line) => line.split('='))\n        .forEach(([key, value]) => {\n          this.ghostValues[key] = value;\n        });\n    }\n    return this.ghostValues;\n  }\n\n  /**\n   * Parse a (Geo)TIFF file from the given source.\n   *\n   * @param {*} source The source of data to parse from.\n   * @param {GeoTIFFOptions} [options] Additional options.\n   * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n   *                               to be aborted\n   */\n  static async fromSource(source, options, signal) {\n    const headerData = (await source.fetch([{ offset: 0, length: 1024 }], signal))[0];\n    const dataView = new DataView64(headerData);\n\n    const BOM = dataView.getUint16(0, 0);\n    let littleEndian;\n    if (BOM === 0x4949) {\n      littleEndian = true;\n    } else if (BOM === 0x4D4D) {\n      littleEndian = false;\n    } else {\n      throw new TypeError('Invalid byte order value.');\n    }\n\n    const magicNumber = dataView.getUint16(2, littleEndian);\n    let bigTiff;\n    if (magicNumber === 42) {\n      bigTiff = false;\n    } else if (magicNumber === 43) {\n      bigTiff = true;\n      const offsetByteSize = dataView.getUint16(4, littleEndian);\n      if (offsetByteSize !== 8) {\n        throw new Error('Unsupported offset byte-size.');\n      }\n    } else {\n      throw new TypeError('Invalid magic number.');\n    }\n\n    const firstIFDOffset = bigTiff\n      ? dataView.getUint64(8, littleEndian)\n      : dataView.getUint32(4, littleEndian);\n    return new GeoTIFF(source, littleEndian, bigTiff, firstIFDOffset, options);\n  }\n\n  /**\n   * Closes the underlying file buffer\n   * N.B. After the GeoTIFF has been completely processed it needs\n   * to be closed but only if it has been constructed from a file.\n   */\n  close() {\n    if (typeof this.source.close === 'function') {\n      return this.source.close();\n    }\n    return false;\n  }\n}\n\nexport { GeoTIFF };\nexport default GeoTIFF;\n\n/**\n * Wrapper for GeoTIFF files that have external overviews.\n * @augments GeoTIFFBase\n */\nclass MultiGeoTIFF extends GeoTIFFBase {\n  /**\n   * Construct a new MultiGeoTIFF from a main and several overview files.\n   * @param {GeoTIFF} mainFile The main GeoTIFF file.\n   * @param {GeoTIFF[]} overviewFiles An array of overview files.\n   */\n  constructor(mainFile, overviewFiles) {\n    super();\n    this.mainFile = mainFile;\n    this.overviewFiles = overviewFiles;\n    this.imageFiles = [mainFile].concat(overviewFiles);\n\n    this.fileDirectoriesPerFile = null;\n    this.fileDirectoriesPerFileParsing = null;\n    this.imageCount = null;\n  }\n\n  async parseFileDirectoriesPerFile() {\n    const requests = [this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)]\n      .concat(this.overviewFiles.map((file) => file.parseFileDirectoryAt(file.firstIFDOffset)));\n\n    this.fileDirectoriesPerFile = await Promise.all(requests);\n    return this.fileDirectoriesPerFile;\n  }\n\n  /**\n   * Get the n-th internal subfile of an image. By default, the first is returned.\n   *\n   * @param {number} [index=0] the index of the image to return.\n   * @returns {Promise<GeoTIFFImage>} the image at the given index\n   */\n  async getImage(index = 0) {\n    await this.getImageCount();\n    await this.parseFileDirectoriesPerFile();\n    let visited = 0;\n    let relativeIndex = 0;\n    for (let i = 0; i < this.imageFiles.length; i++) {\n      const imageFile = this.imageFiles[i];\n      for (let ii = 0; ii < this.imageCounts[i]; ii++) {\n        if (index === visited) {\n          const ifd = await imageFile.requestIFD(relativeIndex);\n          return new GeoTIFFImage(\n            ifd.fileDirectory, ifd.geoKeyDirectory,\n            imageFile.dataView, imageFile.littleEndian, imageFile.cache, imageFile.source,\n          );\n        }\n        visited++;\n        relativeIndex++;\n      }\n      relativeIndex = 0;\n    }\n\n    throw new RangeError('Invalid image index');\n  }\n\n  /**\n   * Returns the count of the internal subfiles.\n   *\n   * @returns {Promise<number>} the number of internal subfile images\n   */\n  async getImageCount() {\n    if (this.imageCount !== null) {\n      return this.imageCount;\n    }\n    const requests = [this.mainFile.getImageCount()]\n      .concat(this.overviewFiles.map((file) => file.getImageCount()));\n    this.imageCounts = await Promise.all(requests);\n    this.imageCount = this.imageCounts.reduce((count, ifds) => count + ifds, 0);\n    return this.imageCount;\n  }\n}\n\nexport { MultiGeoTIFF };\n\n/**\n * Creates a new GeoTIFF from a remote URL.\n * @param {string} url The URL to access the image from\n * @param {object} [options] Additional options to pass to the source.\n *                           See {@link makeRemoteSource} for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromUrl(url, options = {}, signal) {\n  return GeoTIFF.fromSource(makeRemoteSource(url, options), signal);\n}\n\n/**\n * Construct a new GeoTIFF from an\n * [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer}.\n * @param {ArrayBuffer} arrayBuffer The data to read the file from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromArrayBuffer(arrayBuffer, signal) {\n  return GeoTIFF.fromSource(makeBufferSource(arrayBuffer), signal);\n}\n\n/**\n * Construct a GeoTIFF from a local file path. This uses the node\n * [filesystem API]{@link https://nodejs.org/api/fs.html} and is\n * not available on browsers.\n *\n * N.B. After the GeoTIFF has been completely processed it needs\n * to be closed but only if it has been constructed from a file.\n * @param {string} path The file path to read from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromFile(path, signal) {\n  return GeoTIFF.fromSource(makeFileSource(path), signal);\n}\n\n/**\n * Construct a GeoTIFF from an HTML\n * [Blob]{@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} or\n * [File]{@link https://developer.mozilla.org/en-US/docs/Web/API/File}\n * object.\n * @param {Blob|File} blob The Blob or File object to read from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromBlob(blob, signal) {\n  return GeoTIFF.fromSource(makeFileReaderSource(blob), signal);\n}\n\n/**\n * Construct a MultiGeoTIFF from the given URLs.\n * @param {string} mainUrl The URL for the main file.\n * @param {string[]} overviewUrls An array of URLs for the overview images.\n * @param {Object} [options] Additional options to pass to the source.\n *                           See [makeRemoteSource]{@link module:source.makeRemoteSource}\n *                           for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n *                               to be aborted\n * @returns {Promise<MultiGeoTIFF>} The resulting MultiGeoTIFF file.\n */\nexport async function fromUrls(mainUrl, overviewUrls = [], options = {}, signal) {\n  const mainFile = await GeoTIFF.fromSource(makeRemoteSource(mainUrl, options), signal);\n  const overviewFiles = await Promise.all(\n    overviewUrls.map((url) => GeoTIFF.fromSource(makeRemoteSource(url, options))),\n  );\n\n  return new MultiGeoTIFF(mainFile, overviewFiles);\n}\n\n/**\n * Main creating function for GeoTIFF files.\n * @param {(Array)} array of pixel values\n * @returns {metadata} metadata\n */\nexport function writeArrayBuffer(values, metadata) {\n  return writeGeotiff(values, metadata);\n}\n\nexport { Pool };\nexport { GeoTIFFImage };\n","import { getDecoder } from './compression/index.js';\n\nconst defaultPoolSize = typeof navigator !== 'undefined' ? (navigator.hardwareConcurrency || 2) : 2;\n\n/**\n * @module pool\n */\n\n/**\n * Pool for workers to decode chunks of the images.\n */\nclass Pool {\n  /**\n   * @constructor\n   * @param {Number} [size] The size of the pool. Defaults to the number of CPUs\n   *                      available. When this parameter is `null` or 0, then the\n   *                      decoding will be done in the main thread.\n   * @param {function(): Worker} [createWorker] A function that creates the decoder worker.\n   * Defaults to a worker with all decoders that ship with geotiff.js. The `createWorker()`\n   * function is expected to return a `Worker` compatible with Web Workers. For code that\n   * runs in Node, [web-worker](https://www.npmjs.com/package/web-worker) is a good choice.\n   *\n   * A worker that uses a custom lzw decoder would look like this `my-custom-worker.js` file:\n   * ```js\n   * import { addDecoder, getDecoder } from 'geotiff';\n   * addDecoder(5, () => import ('./my-custom-lzw').then((m) => m.default));\n   * self.addEventListener('message', async (e) => {\n   *   const { id, fileDirectory, buffer } = e.data;\n   *   const decoder = await getDecoder(fileDirectory);\n   *   const decoded = await decoder.decode(fileDirectory, buffer);\n   *   self.postMessage({ decoded, id }, [decoded]);\n   * });\n   * ```\n   * The way the above code is built into a worker by the `createWorker()` function\n   * depends on the used bundler. For most bundlers, something like this will work:\n   * ```js\n   * function createWorker() {\n   *   return new Worker(new URL('./my-custom-worker.js', import.meta.url));\n   * }\n   * ```\n   */\n  constructor(size = defaultPoolSize, createWorker) {\n    this.workers = null;\n    this._awaitingDecoder = null;\n    this.size = size;\n    this.messageId = 0;\n    if (size) {\n      this._awaitingDecoder = createWorker ? Promise.resolve(createWorker) : new Promise((resolve) => {\n        import('./worker/decoder.js').then((module) => {\n          resolve(module.create);\n        });\n      });\n      this._awaitingDecoder.then((create) => {\n        this._awaitingDecoder = null;\n        this.workers = [];\n        for (let i = 0; i < size; i++) {\n          this.workers.push({ worker: create(), idle: true });\n        }\n      });\n    }\n  }\n\n  /**\n   * Decode the given block of bytes with the set compression method.\n   * @param {ArrayBuffer} buffer the array buffer of bytes to decode.\n   * @returns {Promise<ArrayBuffer>} the decoded result as a `Promise`\n   */\n  async decode(fileDirectory, buffer) {\n    if (this._awaitingDecoder) {\n      await this._awaitingDecoder;\n    }\n    return this.size === 0\n      ? getDecoder(fileDirectory).then((decoder) => decoder.decode(fileDirectory, buffer))\n      : new Promise((resolve) => {\n        const worker = this.workers.find((candidate) => candidate.idle)\n          || this.workers[Math.floor(Math.random() * this.size)];\n        worker.idle = false;\n        const id = this.messageId++;\n        const onMessage = (e) => {\n          if (e.data.id === id) {\n            worker.idle = true;\n            resolve(e.data.decoded);\n            worker.worker.removeEventListener('message', onMessage);\n          }\n        };\n        worker.worker.addEventListener('message', onMessage);\n        worker.worker.postMessage({ fileDirectory, buffer, id }, [buffer]);\n      });\n  }\n\n  destroy() {\n    if (this.workers) {\n      this.workers.forEach((worker) => {\n        worker.worker.terminate();\n      });\n      this.workers = null;\n    }\n  }\n}\n\nexport default Pool;\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"// (c) Dean McNamee <dean@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, sublicense, 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\": [127,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], \"lemonchiffon\": [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 (params.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","// @flow\n\nimport {parseCSSColor} from 'csscolorparser';\n\n/**\n * An RGBA color value. Create instances from color strings using the static\n * method `Color.parse`. The constructor accepts RGB channel values in the range\n * `[0, 1]`, premultiplied by A.\n *\n * @param {number} r The red channel.\n * @param {number} g The green channel.\n * @param {number} b The blue channel.\n * @param {number} a The alpha channel.\n * @private\n */\nclass Color {\n    r: number;\n    g: number;\n    b: number;\n    a: number;\n\n    constructor(r: number, g: number, b: number, a: number = 1) {\n        this.r = r;\n        this.g = g;\n        this.b = b;\n        this.a = a;\n    }\n\n    static black: Color;\n    static white: Color;\n    static transparent: Color;\n    static red: Color;\n    static blue: Color;\n\n    /**\n     * Parses valid CSS color strings and returns a `Color` instance.\n     * @returns A `Color` instance, or `undefined` if the input is not a valid color string.\n     */\n    static parse(input?: string | Color | null): Color | void {\n        if (!input) {\n            return undefined;\n        }\n\n        if (input instanceof Color) {\n            return input;\n        }\n\n        if (typeof input !== 'string') {\n            return undefined;\n        }\n\n        const rgba = parseCSSColor(input);\n        if (!rgba) {\n            return undefined;\n        }\n\n        return new Color(\n            rgba[0] / 255 * rgba[3],\n            rgba[1] / 255 * rgba[3],\n            rgba[2] / 255 * rgba[3],\n            rgba[3]\n        );\n    }\n\n    /**\n     * Returns an RGBA string representing the color value.\n     *\n     * @returns An RGBA string.\n     * @example\n     * var purple = new Color.parse('purple');\n     * purple.toString; // = \"rgba(128,0,128,1)\"\n     * var translucentGreen = new Color.parse('rgba(26, 207, 26, .73)');\n     * translucentGreen.toString(); // = \"rgba(26,207,26,0.73)\"\n     */\n    toString(): string {\n        const [r, g, b, a] = this.toArray();\n        return `rgba(${Math.round(r)},${Math.round(g)},${Math.round(b)},${a})`;\n    }\n\n    toArray(): [number, number, number, number] {\n        const {r, g, b, a} = this;\n        return a === 0 ? [0, 0, 0, 0] : [\n            r * 255 / a,\n            g * 255 / a,\n            b * 255 / a,\n            a\n        ];\n    }\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);\nColor.blue = new Color(0, 0, 1, 1);\n\nexport default Color;\n","// @flow\n\nimport assert from 'assert';\n\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {ExpressionSpecification} from '../types.js';\n\nfunction convertLiteral(value) {\n    return typeof value === 'object' ? ['literal', value] : value;\n}\n\nexport default function convertFunction(parameters: any, propertySpec: StylePropertySpecification): ExpressionSpecification {\n    let stops = parameters.stops;\n    if (!stops) {\n        // identity function\n        return convertIdentityFunction(parameters, propertySpec);\n    }\n\n    const zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n    const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n    const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n\n    stops = stops.map((stop) => {\n        if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') {\n            return [stop[0], convertTokenString(stop[1])];\n        }\n        return [stop[0], 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}\n\nfunction convertIdentityFunction(parameters, propertySpec): Array<mixed> {\n    const get = ['get', parameters.property];\n\n    if (parameters.default === undefined) {\n        // By default, expressions for string-valued properties get coerced. To preserve\n        // legacy function semantics, insert an explicit assertion instead.\n        return propertySpec.type === 'string' ? ['string', get] : get;\n    } else if (propertySpec.type === 'enum') {\n        return [\n            'match',\n            get,\n            Object.keys(propertySpec.values),\n            get,\n            parameters.default\n        ];\n    } else {\n        const expression = [propertySpec.type === 'color' ? 'to-color' : propertySpec.type, get, convertLiteral(parameters.default)];\n        if (propertySpec.type === 'array') {\n            expression.splice(1, 0, propertySpec.value, propertySpec.length || null);\n        }\n        return expression;\n    }\n}\n\nfunction getInterpolateOperator(parameters) {\n    switch (parameters.colorSpace) {\n    case 'hcl': return 'interpolate-hcl';\n    case 'lab': return 'interpolate-lab';\n    default: return 'interpolate';\n    }\n}\n\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n    const featureFunctionParameters = {};\n    const featureFunctionStops = {};\n    const zoomStops = [];\n    for (let s = 0; s < stops.length; s++) {\n        const stop = stops[s];\n        const zoom = stop[0].zoom;\n        if (featureFunctionParameters[zoom] === undefined) {\n            featureFunctionParameters[zoom] = {\n                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([stop[0].value, stop[1]]);\n    }\n\n    // the interpolation type for the zoom dimension of a zoom-and-property\n    // function is determined directly from the style property specification\n    // for which it's being used: linear for interpolatable properties, step\n    // otherwise.\n    const functionType = getFunctionType({}, propertySpec);\n    if (functionType === 'exponential') {\n        const expression = [getInterpolateOperator(parameters), ['linear'], ['zoom']];\n\n        for (const z of zoomStops) {\n            const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n            appendStopPair(expression, z, output, false);\n        }\n\n        return expression;\n    } else {\n        const expression = ['step', ['zoom']];\n\n        for (const z of zoomStops) {\n            const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n            appendStopPair(expression, z, output, true);\n        }\n\n        fixupDegenerateStepCurve(expression);\n\n        return expression;\n    }\n}\n\nfunction coalesce(a, b) {\n    if (a !== undefined) return a;\n    if (b !== undefined) return b;\n}\n\nfunction getFallback(parameters, propertySpec) {\n    const defaultValue = convertLiteral(coalesce(parameters.default, propertySpec.default));\n\n    /*\n     * Some fields with type: resolvedImage have an undefined default.\n     * Because undefined is an invalid value for resolvedImage, set fallback to\n     * an empty string instead of undefined to ensure output\n     * passes validation.\n     */\n    if (defaultValue === undefined && propertySpec.type === 'resolvedImage') {\n        return '';\n    }\n    return defaultValue;\n}\n\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n    const type = getFunctionType(parameters, propertySpec);\n    const get = ['get', parameters.property];\n    if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n        assert(parameters.stops.length > 0 && parameters.stops.length <= 2);\n        const expression = ['case'];\n        for (const stop of stops) {\n            expression.push(['==', get, stop[0]], stop[1]);\n        }\n\n        expression.push(getFallback(parameters, propertySpec));\n        return expression;\n    } else if (type === 'categorical') {\n        const expression = ['match', get];\n        for (const stop of stops) {\n            appendStopPair(expression, stop[0], stop[1], false);\n        }\n        expression.push(getFallback(parameters, propertySpec));\n        return expression;\n    } else if (type === 'interval') {\n        const expression = ['step', ['number', get]];\n        for (const stop of stops) {\n            appendStopPair(expression, stop[0], stop[1], true);\n        }\n        fixupDegenerateStepCurve(expression);\n        return parameters.default === undefined ? expression : [\n            'case',\n            ['==', ['typeof', get], 'number'],\n            expression,\n            convertLiteral(parameters.default)\n        ];\n    } else if (type === 'exponential') {\n        const base = parameters.base !== undefined ? parameters.base : 1;\n        const expression = [\n            getInterpolateOperator(parameters),\n            base === 1 ? [\"linear\"] : [\"exponential\", base],\n            [\"number\", get]\n        ];\n\n        for (const stop of stops) {\n            appendStopPair(expression, stop[0], stop[1], false);\n        }\n        return parameters.default === undefined ? expression : [\n            'case',\n            ['==', ['typeof', get], 'number'],\n            expression,\n            convertLiteral(parameters.default)\n        ];\n    } else {\n        throw new Error(`Unknown property function type ${type}`);\n    }\n}\n\nfunction convertZoomFunction(parameters, propertySpec, stops, input = ['zoom']) {\n    const type = getFunctionType(parameters, propertySpec);\n    let expression;\n    let isStep = false;\n    if (type === 'interval') {\n        expression = ['step', input];\n        isStep = true;\n    } else if (type === 'exponential') {\n        const base = parameters.base !== undefined ? parameters.base : 1;\n        expression = [getInterpolateOperator(parameters), base === 1 ? [\"linear\"] : [\"exponential\", base], input];\n\n    } else {\n        throw new Error(`Unknown zoom function type \"${type}\"`);\n    }\n\n    for (const stop of stops) {\n        appendStopPair(expression, stop[0], stop[1], isStep);\n    }\n\n    fixupDegenerateStepCurve(expression);\n\n    return expression;\n}\n\nfunction fixupDegenerateStepCurve(expression) {\n    // degenerate step curve (i.e. a constant function): add a noop stop\n    if (expression[0] === 'step' && expression.length === 3) {\n        expression.push(0);\n        expression.push(expression[3]);\n    }\n}\n\nfunction appendStopPair(curve, input, output, isStep) {\n    // Skip duplicate stop values. They were not validated for functions, but they are for expressions.\n    // https://github.com/mapbox/mapbox-gl-js/issues/4107\n    if (curve.length > 3 && input === curve[curve.length - 2]) {\n        return;\n    }\n    // step curves don't get the first input value, as it is redundant.\n    if (!(isStep && curve.length === 2)) {\n        curve.push(input);\n    }\n    curve.push(output);\n}\n\nfunction getFunctionType(parameters, propertySpec) {\n    if (parameters.type) {\n        return parameters.type;\n    } else {\n        assert(propertySpec.expression);\n        return (propertySpec.expression: any).interpolated ? 'exponential' : 'interval';\n    }\n}\n\n// \"String with {name} token\" => [\"concat\", \"String with \", [\"get\", \"name\"], \" token\"]\nexport function convertTokenString(s: string): string | ExpressionSpecification {\n    const result = ['concat'];\n    const re = /{([^{}]+)}/g;\n    let pos = 0;\n    for (let match = re.exec(s); match !== null; match = re.exec(s)) {\n        const literal = s.slice(pos, re.lastIndex - match[0].length);\n        pos = re.lastIndex;\n        if (literal.length > 0) result.push(literal);\n        result.push(['get', match[1]]);\n    }\n\n    if (result.length === 1) {\n        return s;\n    }\n\n    if (pos < s.length) {\n        result.push(s.slice(pos));\n    } else if (result.length === 2) {\n        return ['to-string', result[1]];\n    }\n\n    return result;\n}\n\n","// @flow\n\nclass ParsingError extends Error {\n    key: string;\n    message: string;\n    constructor(key: string, message: string) {\n        super(message);\n        this.message = message;\n        this.key = key;\n    }\n}\n\nexport default ParsingError;\n","// @flow\n\nimport type {Expression} from './expression.js';\n\n/**\n * Tracks `let` bindings during expression parsing.\n * @private\n */\nclass Scope {\n    parent: ?Scope;\n    bindings: {[_: string]: Expression};\n    constructor(parent?: Scope, bindings: Array<[string, Expression]> = []) {\n        this.parent = parent;\n        this.bindings = {};\n        for (const [name, expression] of bindings) {\n            this.bindings[name] = expression;\n        }\n    }\n\n    concat(bindings: Array<[string, Expression]>): Scope {\n        return new Scope(this, bindings);\n    }\n\n    get(name: string): Expression {\n        if (this.bindings[name]) { return this.bindings[name]; }\n        if (this.parent) { return this.parent.get(name); }\n        throw new Error(`${name} not found in scope.`);\n    }\n\n    has(name: string): boolean {\n        if (this.bindings[name]) return true;\n        return this.parent ? this.parent.has(name) : false;\n    }\n}\n\nexport default Scope;\n","// @flow\n\nexport type NullTypeT = { kind: 'null' };\nexport type NumberTypeT = { kind: 'number' };\nexport type StringTypeT = { kind: 'string' };\nexport type BooleanTypeT = { kind: 'boolean' };\nexport type ColorTypeT = { kind: 'color' };\nexport type ObjectTypeT = { kind: 'object' };\nexport type ValueTypeT = { kind: 'value' };\nexport type ErrorTypeT = { kind: 'error' };\nexport type CollatorTypeT = { kind: 'collator' };\nexport type FormattedTypeT = { kind: 'formatted' };\nexport type ResolvedImageTypeT = { kind: 'resolvedImage' };\n\nexport type EvaluationKind = 'constant' | 'source' | 'camera' | 'composite';\n\nexport type Type =\n    NullTypeT |\n    NumberTypeT |\n    StringTypeT |\n    BooleanTypeT |\n    ColorTypeT |\n    ObjectTypeT |\n    ValueTypeT |\n    ArrayType | // eslint-disable-line no-use-before-define\n    ErrorTypeT |\n    CollatorTypeT |\n    FormattedTypeT |\n    ResolvedImageTypeT\n\nexport type ArrayType = {\n    kind: 'array',\n    itemType: Type,\n    N: ?number\n}\n\nexport type NativeType = 'number' | 'string' | 'boolean' | 'null' | 'array' | 'object'\n\nexport const NullType = {kind: 'null'};\nexport const NumberType = {kind: 'number'};\nexport const StringType = {kind: 'string'};\nexport const BooleanType = {kind: 'boolean'};\nexport const ColorType = {kind: 'color'};\nexport const ObjectType = {kind: 'object'};\nexport const ValueType = {kind: 'value'};\nexport const ErrorType = {kind: 'error'};\nexport const CollatorType = {kind: 'collator'};\nexport const FormattedType = {kind: 'formatted'};\nexport const ResolvedImageType = {kind: 'resolvedImage'};\n\nexport function array(itemType: Type, N: ?number): ArrayType {\n    return {\n        kind: 'array',\n        itemType,\n        N\n    };\n}\n\nexport function toString(type: Type): string {\n    if (type.kind === 'array') {\n        const itemType = toString(type.itemType);\n        return typeof type.N === 'number' ?\n            `array<${itemType}, ${type.N}>` :\n            type.itemType.kind === 'value' ? 'array' : `array<${itemType}>`;\n    } else {\n        return type.kind;\n    }\n}\n\nconst valueMemberTypes = [\n    NullType,\n    NumberType,\n    StringType,\n    BooleanType,\n    ColorType,\n    FormattedType,\n    ObjectType,\n    array(ValueType),\n    ResolvedImageType\n];\n\n/**\n * Returns null if `t` is a subtype of `expected`; otherwise returns an\n * error message.\n * @private\n */\nexport function checkSubtype(expected: Type, t: Type): ?string {\n    if (t.kind === 'error') {\n        // Error is a subtype of every type\n        return null;\n    } else if (expected.kind === 'array') {\n        if (t.kind === 'array' &&\n            ((t.N === 0 && t.itemType.kind === 'value') || !checkSubtype(expected.itemType, t.itemType)) &&\n            (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 (const memberType of valueMemberTypes) {\n            if (!checkSubtype(memberType, t)) {\n                return null;\n            }\n        }\n    }\n\n    return `Expected ${toString(expected)} but found ${toString(t)} instead.`;\n}\n\nexport function isValidType(provided: Type, allowedTypes: Array<Type>): boolean {\n    return allowedTypes.some(t => t.kind === provided.kind);\n}\n\nexport function isValidNativeType(provided: any, allowedTypes: Array<NativeType>): boolean {\n    return allowedTypes.some(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","// @flow\n\n// Flow type declarations for Intl cribbed from\n// https://github.com/facebook/flow/issues/1270\n\ndeclare var Intl: {\n    Collator: Class<Intl$Collator>\n};\n\ndeclare class Intl$Collator {\n    constructor (\n        locales?: string | string[],\n        options?: CollatorOptions\n    ): Intl$Collator;\n\n    static (\n        locales?: string | string[],\n        options?: CollatorOptions\n    ): Intl$Collator;\n\n    compare (a: string, b: string): number;\n\n    resolvedOptions(): any;\n}\n\ntype CollatorOptions = {\n    localeMatcher?: 'lookup' | 'best fit',\n    usage?: 'sort' | 'search',\n    sensitivity?: 'base' | 'accent' | 'case' | 'variant',\n    ignorePunctuation?: boolean,\n    numeric?: boolean,\n    caseFirst?: 'upper' | 'lower' | 'false'\n}\n\nexport default class Collator {\n    locale: string | null;\n    sensitivity: 'base' | 'accent' | 'case' | 'variant';\n    collator: Intl$Collator;\n\n    constructor(caseSensitive: boolean, diacriticSensitive: boolean, locale: string | null) {\n        if (caseSensitive)\n            this.sensitivity = diacriticSensitive ? 'variant' : 'case';\n        else\n            this.sensitivity = diacriticSensitive ? 'accent' : 'base';\n\n        this.locale = locale;\n        this.collator = new Intl.Collator(this.locale ? this.locale : [],\n            {sensitivity: this.sensitivity, usage: 'search'});\n    }\n\n    compare(lhs: string, rhs: string): number {\n        return this.collator.compare(lhs, rhs);\n    }\n\n    resolvedLocale(): string {\n        // We create a Collator without \"usage: search\" because we don't want\n        // the search options encoded in our result (e.g. \"en-u-co-search\")\n        return new Intl.Collator(this.locale ? this.locale : [])\n            .resolvedOptions().locale;\n    }\n}\n","// @flow\nimport type Color from '../../util/color.js';\nimport type ResolvedImage from '../types/resolved_image.js';\n\nexport class FormattedSection {\n    text: string;\n    image: ResolvedImage | null;\n    scale: number | null;\n    fontStack: string | null;\n    textColor: Color | null;\n\n    constructor(text: string, image: ResolvedImage | null, scale: number | null, fontStack: string | null, textColor: Color | null) {\n        // combine characters so that diacritic marks are not separate code points\n        this.text = text.normalize ? text.normalize() : text;\n        this.image = image;\n        this.scale = scale;\n        this.fontStack = fontStack;\n        this.textColor = textColor;\n    }\n}\n\nexport default class Formatted {\n    sections: Array<FormattedSection>;\n\n    constructor(sections: Array<FormattedSection>) {\n        this.sections = sections;\n    }\n\n    static fromString(unformatted: string): Formatted {\n        return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n    }\n\n    isEmpty(): boolean {\n        if (this.sections.length === 0) return true;\n        return !this.sections.some(section => section.text.length !== 0 ||\n                                             (section.image && section.image.name.length !== 0));\n    }\n\n    static factory(text: Formatted | string): Formatted {\n        if (text instanceof Formatted) {\n            return text;\n        } else {\n            return Formatted.fromString(text);\n        }\n    }\n\n    toString(): string {\n        if (this.sections.length === 0) return '';\n        return this.sections.map(section => section.text).join('');\n    }\n\n    serialize(): Array<mixed> {\n        const serialized: Array<mixed> = [\"format\"];\n        for (const section of this.sections) {\n            if (section.image) {\n                serialized.push([\"image\", section.image.name]);\n                continue;\n            }\n            serialized.push(section.text);\n            const options: { [key: string]: mixed } = {};\n            if (section.fontStack) {\n                options[\"text-font\"] = [\"literal\", section.fontStack.split(',')];\n            }\n            if (section.scale) {\n                options[\"font-scale\"] = section.scale;\n            }\n            if (section.textColor) {\n                options[\"text-color\"] = ([\"rgba\"]: Array<mixed>).concat(section.textColor.toArray());\n            }\n            serialized.push(options);\n        }\n        return serialized;\n    }\n}\n","// @flow\n\nexport type ResolvedImageOptions = {\n    name: string,\n    available: boolean\n};\n\nexport default class ResolvedImage {\n    name: string;\n    available: boolean;\n\n    constructor(options: ResolvedImageOptions) {\n        this.name = options.name;\n        this.available = options.available;\n    }\n\n    toString(): string {\n        return this.name;\n    }\n\n    static fromString(name: string): ResolvedImage | null {\n        if (!name) return null; // treat empty values as no image\n        return new ResolvedImage({name, available: false});\n    }\n\n    serialize(): Array<string> {\n        return [\"image\", this.name];\n    }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport Color from '../util/color.js';\nimport Collator from './types/collator.js';\nimport Formatted from './types/formatted.js';\nimport ResolvedImage from './types/resolved_image.js';\nimport {NullType, NumberType, StringType, BooleanType, ColorType, ObjectType, ValueType, CollatorType, FormattedType, ResolvedImageType, array} from './types.js';\n\nimport type {Type} from './types.js';\n\nexport function validateRGBA(r: mixed, g: mixed, b: mixed, a?: mixed): string | null {\n    if (!(\n        typeof r === 'number' && r >= 0 && r <= 255 &&\n        typeof g === 'number' && g >= 0 && g <= 255 &&\n        typeof b === 'number' && b >= 0 && b <= 255\n    )) {\n        const value = typeof a === 'number' ? [r, g, b, a] : [r, g, b];\n        return `Invalid rgba value [${value.join(', ')}]: 'r', 'g', and 'b' must be between 0 and 255.`;\n    }\n\n    if (!(\n        typeof a === 'undefined' || (typeof a === 'number' && a >= 0 && a <= 1)\n    )) {\n        return `Invalid rgba value [${[r, g, b, a].join(', ')}]: 'a' must be between 0 and 1.`;\n    }\n\n    return null;\n}\n\nexport type Value = null | string | boolean | number | Color | Collator | Formatted | ResolvedImage | $ReadOnlyArray<Value> | { +[string]: Value }\n\nexport function isValue(mixed: mixed): boolean {\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 (const item of mixed) {\n            if (!isValue(item)) {\n                return false;\n            }\n        }\n        return true;\n    } else if (typeof mixed === 'object') {\n        for (const key in mixed) {\n            if (!isValue(mixed[key])) {\n                return false;\n            }\n        }\n        return true;\n    } else {\n        return false;\n    }\n}\n\nexport function typeOf(value: Value): Type {\n    if (value === null) {\n        return NullType;\n    } else if (typeof value === 'string') {\n        return StringType;\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        const length = value.length;\n        let itemType: Type | typeof undefined;\n\n        for (const item of value) {\n            const 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\n        return array(itemType || ValueType, length);\n    } else {\n        assert(typeof value === 'object');\n        return ObjectType;\n    }\n}\n\nexport function toString(value: Value): string {\n    const 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\nexport {Color, Collator};\n","// @flow\n\nimport assert from 'assert';\nimport {isValue, typeOf, Color} from '../values.js';\nimport Formatted from '../types/formatted.js';\n\nimport type {Type} from '../types.js';\nimport type {Value}  from '../values.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\n\nclass Literal implements Expression {\n    type: Type;\n    value: Value;\n\n    constructor(type: Type, value: Value) {\n        this.type = type;\n        this.value = value;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): void | Literal {\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        const value = (args[1]: any);\n        let type = typeOf(value);\n\n        // special case: infer the item type if possible for zero-length arrays\n        const expected = context.expectedType;\n        if (\n            type.kind === 'array' &&\n            type.N === 0 &&\n            expected &&\n            expected.kind === 'array' &&\n            (typeof expected.N !== 'number' || expected.N === 0)\n        ) {\n            type = expected;\n        }\n\n        return new Literal(type, value);\n    }\n\n    evaluate(): Value {\n        return this.value;\n    }\n\n    eachChild() {}\n\n    outputDefined(): boolean {\n        return true;\n    }\n\n    serialize(): SerializedExpression {\n        if (this.type.kind === 'array' || this.type.kind === 'object') {\n            return [\"literal\", this.value];\n        } else if (this.value instanceof Color) {\n            // Constant-folding can generate Literal expressions that you\n            // couldn't actually generate with a \"literal\" expression,\n            // so we have to implement an equivalent serialization here\n            return [\"rgba\"].concat(this.value.toArray());\n        } else if (this.value instanceof Formatted) {\n            // Same as Color\n            return this.value.serialize();\n        } else {\n            assert(this.value === null ||\n                typeof this.value === 'string' ||\n                typeof this.value === 'number' ||\n                typeof this.value === 'boolean');\n            return (this.value: any);\n        }\n    }\n}\n\nexport default Literal;\n","// @flow\n\nclass RuntimeError {\n    name: string;\n    message: string;\n\n    constructor(message: string) {\n        this.name = 'ExpressionEvaluationError';\n        this.message = message;\n    }\n\n    toJSON(): string {\n        return this.message;\n    }\n}\n\nexport default RuntimeError;\n","// @flow\n\nimport assert from 'assert';\n\nimport {\n    ObjectType,\n    ValueType,\n    StringType,\n    NumberType,\n    BooleanType,\n    checkSubtype,\n    toString,\n    array\n} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n    string: StringType,\n    number: NumberType,\n    boolean: BooleanType,\n    object: ObjectType\n};\n\nclass Assertion implements Expression {\n    type: Type;\n    args: Array<Expression>;\n\n    constructor(type: Type, args: Array<Expression>) {\n        this.type = type;\n        this.args = args;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n        if (args.length < 2)\n            return context.error(`Expected at least one argument.`);\n\n        let i = 1;\n        let type;\n\n        const name: string = (args[0]: any);\n        if (name === 'array') {\n            let itemType;\n            if (args.length > 2) {\n                const type = args[1];\n                if (typeof type !== 'string' || !(type in types) || type === 'object')\n                    return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n                itemType = types[type];\n                i++;\n            } else {\n                itemType = ValueType;\n            }\n\n            let N;\n            if (args.length > 3) {\n                if (args[2] !== null &&\n                    (typeof args[2] !== 'number' ||\n                        args[2] < 0 ||\n                        args[2] !== Math.floor(args[2]))\n                ) {\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\n            type = array(itemType, N);\n        } else {\n            assert(types[name], name);\n            type = types[name];\n        }\n\n        const parsed = [];\n        for (; i < args.length; i++) {\n            const input = context.parse(args[i], i, ValueType);\n            if (!input) return null;\n            parsed.push(input);\n        }\n\n        return new Assertion(type, parsed);\n    }\n\n    evaluate(ctx: EvaluationContext): any | null {\n        for (let i = 0; i < this.args.length; i++) {\n            const value = this.args[i].evaluate(ctx);\n            const 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\n        assert(false);\n        return null;\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        this.args.forEach(fn);\n    }\n\n    outputDefined(): boolean {\n        return this.args.every(arg => arg.outputDefined());\n    }\n\n    serialize(): SerializedExpression {\n        const type = this.type;\n        const serialized = [type.kind];\n        if (type.kind === 'array') {\n            const itemType = type.itemType;\n            if (itemType.kind === 'string' ||\n                itemType.kind === 'number' ||\n                itemType.kind === 'boolean') {\n                serialized.push(itemType.kind);\n                const 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(arg => arg.serialize()));\n    }\n}\n\nexport default Assertion;\n","// @flow\n\nimport {NumberType, ValueType, FormattedType, array, StringType, ColorType, ResolvedImageType} from '../types.js';\nimport Formatted, {FormattedSection} from '../types/formatted.js';\nimport {toString, typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype FormattedSectionExpression = {\n    // Content of a section may be Image expression or other\n    // type of expression that is coercable to 'string'.\n    content: Expression,\n    scale: Expression | null;\n    font: Expression | null;\n    textColor: Expression | null;\n}\n\nexport default class FormatExpression implements Expression {\n    type: Type;\n    sections: Array<FormattedSectionExpression>;\n\n    constructor(sections: Array<FormattedSectionExpression>) {\n        this.type = FormattedType;\n        this.sections = sections;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n        if (args.length < 2) {\n            return context.error(`Expected at least one argument.`);\n        }\n\n        const 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\n        const sections: Array<FormattedSectionExpression> = [];\n        let nextTokenMayBeObject = false;\n        for (let i = 1; i <= args.length - 1; ++i) {\n            const arg = (args[i]: any);\n\n            if (nextTokenMayBeObject && typeof arg === \"object\" && !Array.isArray(arg)) {\n                nextTokenMayBeObject = false;\n\n                let scale = null;\n                if (arg['font-scale']) {\n                    scale = context.parse(arg['font-scale'], 1, NumberType);\n                    if (!scale) return null;\n                }\n\n                let font = null;\n                if (arg['text-font']) {\n                    font = context.parse(arg['text-font'], 1, array(StringType));\n                    if (!font) return null;\n                }\n\n                let textColor = null;\n                if (arg['text-color']) {\n                    textColor = context.parse(arg['text-color'], 1, ColorType);\n                    if (!textColor) return null;\n                }\n\n                const lastExpression = sections[sections.length - 1];\n                lastExpression.scale = scale;\n                lastExpression.font = font;\n                lastExpression.textColor = textColor;\n            } else {\n                const content = context.parse(args[i], 1, ValueType);\n                if (!content) return null;\n\n                const 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({content, scale: null, font: null, textColor: null});\n            }\n        }\n\n        return new FormatExpression(sections);\n    }\n\n    evaluate(ctx: EvaluationContext): Formatted {\n        const evaluateSection = section => {\n            const evaluatedContent = section.content.evaluate(ctx);\n            if (typeOf(evaluatedContent) === ResolvedImageType) {\n                return new FormattedSection('', evaluatedContent, null, null, null);\n            }\n\n            return new FormattedSection(\n                    toString(evaluatedContent),\n                    null,\n                    section.scale ? section.scale.evaluate(ctx) : null,\n                    section.font ? section.font.evaluate(ctx).join(',') : null,\n                    section.textColor ? section.textColor.evaluate(ctx) : null\n            );\n        };\n\n        return new Formatted(this.sections.map(evaluateSection));\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        for (const section of this.sections) {\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    }\n\n    outputDefined(): boolean {\n        // Technically the combinatoric set of all children\n        // Usually, this.text will be undefined anyway\n        return false;\n    }\n\n    serialize(): SerializedExpression {\n        const serialized = [\"format\"];\n        for (const section of this.sections) {\n            serialized.push(section.content.serialize());\n            const 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}\n","// @flow\n\nimport {ResolvedImageType, StringType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class ImageExpression implements Expression {\n    type: Type;\n    input: Expression;\n\n    constructor(input: Expression) {\n        this.type = ResolvedImageType;\n        this.input = input;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n        if (args.length !== 2) {\n            return context.error(`Expected two arguments.`);\n        }\n\n        const name = context.parse(args[1], 1, StringType);\n        if (!name) return context.error(`No image name provided.`);\n\n        return new ImageExpression(name);\n    }\n\n    evaluate(ctx: EvaluationContext): null | ResolvedImage {\n        const evaluatedImageName = this.input.evaluate(ctx);\n\n        const value = ResolvedImage.fromString(evaluatedImageName);\n        if (value && ctx.availableImages) value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n\n        return value;\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.input);\n    }\n\n    outputDefined(): boolean {\n        // The output of image is determined by the list of available images in the evaluation context\n        return false;\n    }\n\n    serialize(): SerializedExpression {\n        return [\"image\", this.input.serialize()];\n    }\n}\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType, ColorType, NumberType, StringType, ValueType} from '../types.js';\nimport {Color, toString as valueToString, validateRGBA} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\nimport Formatted from '../types/formatted.js';\nimport FormatExpression from '../definitions/format.js';\nimport ImageExpression from '../definitions/image.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nconst types = {\n    'to-boolean': BooleanType,\n    'to-color': ColorType,\n    'to-number': NumberType,\n    'to-string': StringType\n};\n\n/**\n * Special form for error-coalescing coercion expressions \"to-number\",\n * \"to-color\".  Since these coercions can fail at runtime, they accept multiple\n * arguments, only evaluating one at a time until one succeeds.\n *\n * @private\n */\nclass Coercion implements Expression {\n    type: Type;\n    args: Array<Expression>;\n\n    constructor(type: Type, args: Array<Expression>) {\n        this.type = type;\n        this.args = args;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n        if (args.length < 2)\n            return context.error(`Expected at least one argument.`);\n\n        const name: string = (args[0]: any);\n        assert(types[name], name);\n\n        if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2)\n            return context.error(`Expected one argument.`);\n\n        const type = types[name];\n\n        const parsed = [];\n        for (let i = 1; i < args.length; i++) {\n            const input = context.parse(args[i], i, ValueType);\n            if (!input) return null;\n            parsed.push(input);\n        }\n\n        return new Coercion(type, parsed);\n    }\n\n    evaluate(ctx: EvaluationContext): null | boolean | number | string | Color | Formatted | ResolvedImage {\n        if (this.type.kind === 'boolean') {\n            return Boolean(this.args[0].evaluate(ctx));\n        } else if (this.type.kind === 'color') {\n            let input;\n            let error;\n            for (const arg of this.args) {\n                input = arg.evaluate(ctx);\n                error = null;\n                if (input instanceof Color) {\n                    return input;\n                } else if (typeof input === 'string') {\n                    const c = ctx.parseColor(input);\n                    if (c) return c;\n                } else if (Array.isArray(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]: any) / 255, (input[1]: any) / 255, (input[2]: any) / 255, (input[3]: any));\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            let value = null;\n            for (const arg of this.args) {\n                value = arg.evaluate(ctx);\n                if (value === null) return 0;\n                const num = Number(value);\n                if (isNaN(num)) continue;\n                return num;\n            }\n            throw new RuntimeError(`Could not convert ${JSON.stringify(value)} to number.`);\n        } else if (this.type.kind === 'formatted') {\n            // There is no explicit 'to-formatted' but this coercion can be implicitly\n            // created by properties that expect the 'formatted' type.\n            return Formatted.fromString(valueToString(this.args[0].evaluate(ctx)));\n        } else if (this.type.kind === 'resolvedImage') {\n            return ResolvedImage.fromString(valueToString(this.args[0].evaluate(ctx)));\n        } else {\n            return valueToString(this.args[0].evaluate(ctx));\n        }\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        this.args.forEach(fn);\n    }\n\n    outputDefined(): boolean {\n        return this.args.every(arg => arg.outputDefined());\n    }\n\n    serialize(): SerializedExpression {\n        if (this.type.kind === 'formatted') {\n            return new FormatExpression([{content: this.args[0], scale: null, font: null, textColor: null}]).serialize();\n        }\n\n        if (this.type.kind === 'resolvedImage') {\n            return new ImageExpression(this.args[0]).serialize();\n        }\n\n        const serialized = [`to-${this.type.kind}`];\n        this.eachChild(child => { serialized.push(child.serialize()); });\n        return serialized;\n    }\n}\n\nexport default Coercion;\n","// @flow\n\nimport {Color} from './values.js';\n\nimport type Point from '@mapbox/point-geometry';\nimport type {FormattedSection} from './types/formatted.js';\nimport type {GlobalProperties, Feature, FeatureState} from './index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type {FeatureDistanceData} from '../feature_filter/index.js';\n\nconst geometryTypes = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nclass EvaluationContext {\n    globals: GlobalProperties;\n    feature: ?Feature;\n    featureState: ?FeatureState;\n    formattedSection: ?FormattedSection;\n    availableImages: ?Array<string>;\n    canonical: null | CanonicalTileID;\n    featureTileCoord: ?Point;\n    featureDistanceData: ?FeatureDistanceData;\n\n    _parseColorCache: {[_: string]: ?Color};\n\n    constructor() {\n        this.globals = (null: any);\n        this.feature = null;\n        this.featureState = null;\n        this.formattedSection = null;\n        this._parseColorCache = {};\n        this.availableImages = null;\n        this.canonical = null;\n        this.featureTileCoord = null;\n        this.featureDistanceData = null;\n    }\n\n    id(): number | null {\n        return this.feature && 'id' in this.feature && this.feature.id ? this.feature.id : null;\n    }\n\n    geometryType(): null | string {\n        return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n    }\n\n    geometry(): ?Array<Array<Point>> {\n        return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n    }\n\n    canonicalID(): null | CanonicalTileID {\n        return this.canonical;\n    }\n\n    properties(): {[string]: any} {\n        return (this.feature && this.feature.properties) || {};\n    }\n\n    distanceFromCenter(): number {\n        if (this.featureTileCoord && this.featureDistanceData) {\n\n            const c = this.featureDistanceData.center;\n            const scale = this.featureDistanceData.scale;\n            const {x, y} = this.featureTileCoord;\n\n            // Calculate the distance vector `d` (left handed)\n            const dX = x * scale - c[0];\n            const dY = y * scale - c[1];\n\n            // The bearing vector `b` (left handed)\n            const bX = this.featureDistanceData.bearing[0];\n            const bY = this.featureDistanceData.bearing[1];\n\n            // Distance is calculated as `dot(d, v)`\n            const dist = (bX * dX + bY * dY);\n            return dist;\n        }\n\n        return 0;\n    }\n\n    parseColor(input: string): ?Color {\n        let cached = this._parseColorCache[input];\n        if (!cached) {\n            cached = this._parseColorCache[input] = Color.parse(input);\n        }\n        return cached;\n    }\n}\n\nexport default EvaluationContext;\n","// @flow\n\nimport {toString} from './types.js';\n\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport assert from 'assert';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\nimport type {Value} from './values.js';\n\nexport type Varargs = {| type: Type |};\ntype Signature = Array<Type> | Varargs;\ntype Evaluate = (EvaluationContext, Array<Expression>) => Value;\ntype Definition = [Type, Signature, Evaluate] |\n    {|type: Type, overloads: Array<[Signature, Evaluate]>|};\n\nclass CompoundExpression implements Expression {\n    name: string;\n    type: Type;\n    _evaluate: Evaluate;\n    args: Array<Expression>;\n\n    static definitions: {[_: string]: Definition };\n\n    constructor(name: string, type: Type, evaluate: Evaluate, args: Array<Expression>) {\n        this.name = name;\n        this.type = type;\n        this._evaluate = evaluate;\n        this.args = args;\n    }\n\n    evaluate(ctx: EvaluationContext): Value {\n        return this._evaluate(ctx, this.args);\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        this.args.forEach(fn);\n    }\n\n    outputDefined(): boolean {\n        return false;\n    }\n\n    serialize(): Array<mixed> {\n        return [this.name].concat(this.args.map(arg => arg.serialize()));\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n        const op: string = (args[0]: any);\n        const 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\n        // Now check argument types against each signature\n        const type = Array.isArray(definition) ?\n            definition[0] : definition.type;\n\n        const availableOverloads = Array.isArray(definition) ?\n            [[definition[1], definition[2]]] :\n            definition.overloads;\n\n        const overloads = availableOverloads.filter(([signature]) => (\n            !Array.isArray(signature) || // varags\n            signature.length === args.length - 1 // correct param count\n        ));\n\n        let signatureContext: ParsingContext = (null: any);\n\n        for (const [params, evaluate] of overloads) {\n            // Use a fresh context for each attempted signature so that, if\n            // we eventually succeed, we haven't polluted `context.errors`.\n            signatureContext = new ParsingContext(context.registry, context.path, null, context.scope);\n\n            // First parse all the args, potentially coercing to the\n            // types expected by this overload.\n            const parsedArgs: Array<Expression> = [];\n            let argParseFailed = false;\n            for (let i = 1; i < args.length; i++) {\n                const arg = args[i];\n                const expectedType = Array.isArray(params) ?\n                    params[i - 1] :\n                    params.type;\n\n                const 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                // Couldn't coerce args of this overload to expected type, move\n                // on to next one.\n                continue;\n            }\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\n            for (let i = 0; i < parsedArgs.length; i++) {\n                const expected = Array.isArray(params) ? params[i] : params.type;\n                const arg = parsedArgs[i];\n                signatureContext.concat(i + 1).checkSubtype(expected, arg.type);\n            }\n\n            if (signatureContext.errors.length === 0) {\n                return new CompoundExpression(op, type, evaluate, parsedArgs);\n            }\n        }\n\n        assert(!signatureContext || signatureContext.errors.length > 0);\n\n        if (overloads.length === 1) {\n            context.errors.push(...signatureContext.errors);\n        } else {\n            const expected = overloads.length ? overloads : availableOverloads;\n            const signatures = expected\n                .map(([params]) => stringifySignature(params))\n                .join(' | ');\n\n            const actualTypes = [];\n            // For error message, re-parse arguments without trying to\n            // apply any coercions\n            for (let i = 1; i < args.length; i++) {\n                const parsed = context.parse(args[i], 1 + actualTypes.length);\n                if (!parsed) return null;\n                actualTypes.push(toString(parsed.type));\n            }\n            context.error(`Expected arguments of type ${signatures}, but found (${actualTypes.join(', ')}) instead.`);\n        }\n\n        return null;\n    }\n\n    static register(\n        registry: ExpressionRegistry,\n        definitions: {[_: string]: Definition }\n    ) {\n        assert(!CompoundExpression.definitions);\n        CompoundExpression.definitions = definitions;\n        for (const name in definitions) {\n            registry[name] = CompoundExpression;\n        }\n    }\n}\n\nfunction stringifySignature(signature: Signature): string {\n    if (Array.isArray(signature)) {\n        return `(${signature.map(toString).join(', ')})`;\n    } else {\n        return `(${toString(signature.type)}...)`;\n    }\n}\n\nexport default CompoundExpression;\n","// @flow\n\nimport {StringType, BooleanType, CollatorType} from '../types.js';\nimport Collator from '../types/collator.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\nexport default class CollatorExpression implements Expression {\n    type: Type;\n    caseSensitive: Expression;\n    diacriticSensitive: Expression;\n    locale: Expression | null;\n\n    constructor(caseSensitive: Expression, diacriticSensitive: Expression, locale: Expression | null) {\n        this.type = CollatorType;\n        this.locale = locale;\n        this.caseSensitive = caseSensitive;\n        this.diacriticSensitive = diacriticSensitive;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n        if (args.length !== 2)\n            return context.error(`Expected one argument.`);\n\n        const options = (args[1]: any);\n        if (typeof options !== \"object\" || Array.isArray(options))\n            return context.error(`Collator options argument must be an object.`);\n\n        const caseSensitive = context.parse(\n            options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n        if (!caseSensitive) return null;\n\n        const diacriticSensitive = context.parse(\n            options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n        if (!diacriticSensitive) return null;\n\n        let locale = null;\n        if (options['locale']) {\n            locale = context.parse(options['locale'], 1, StringType);\n            if (!locale) return null;\n        }\n\n        return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n    }\n\n    evaluate(ctx: EvaluationContext): Collator {\n        return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.caseSensitive);\n        fn(this.diacriticSensitive);\n        if (this.locale) {\n            fn(this.locale);\n        }\n    }\n\n    outputDefined(): boolean {\n        // Technically the set of possible outputs is the combinatoric set of Collators produced\n        // by all possible outputs of locale/caseSensitive/diacriticSensitive\n        // But for the primary use of Collators in comparison operators, we ignore the Collator's\n        // possible outputs anyway, so we can get away with leaving this false for now.\n        return false;\n    }\n\n    serialize(): SerializedExpression {\n        const options = {};\n        options['case-sensitive'] = this.caseSensitive.serialize();\n        options['diacritic-sensitive'] = this.diacriticSensitive.serialize();\n        if (this.locale) {\n            options['locale'] = this.locale.serialize();\n        }\n        return [\"collator\", options];\n    }\n}\n","// @flow\n\nimport {isValue} from '../values.js';\nimport type {Type} from '../types.js';\nimport {BooleanType} from '../types.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {GeoJSON, GeoJSONPolygon, GeoJSONMultiPolygon} from '@mapbox/geojson-types';\nimport Point from '@mapbox/point-geometry';\nimport type {CanonicalTileID} from '../../../source/tile_id.js';\n\ntype GeoJSONPolygons =| GeoJSONPolygon | GeoJSONMultiPolygon;\n\n// minX, minY, maxX, maxY\ntype BBox = [number, number, number, number];\nconst EXTENT = 8192;\n\nfunction updateBBox(bbox: BBox, coord: Point) {\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}\n\nfunction mercatorXfromLng(lng: number) {\n    return (180 + lng) / 360;\n}\n\nfunction mercatorYfromLat(lat: number) {\n    return (180 - (180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360)))) / 360;\n}\n\nfunction boxWithinBox(bbox1: BBox, bbox2: BBox) {\n    if (bbox1[0] <= bbox2[0]) return false;\n    if (bbox1[2] >= bbox2[2]) return false;\n    if (bbox1[1] <= bbox2[1]) return false;\n    if (bbox1[3] >= bbox2[3]) return false;\n    return true;\n}\n\nfunction getTileCoordinates(p, canonical: CanonicalTileID) {\n    const x = mercatorXfromLng(p[0]);\n    const y = mercatorYfromLat(p[1]);\n    const tilesAtZoom = Math.pow(2, canonical.z);\n    return [Math.round(x * tilesAtZoom * EXTENT), Math.round(y * tilesAtZoom * EXTENT)];\n}\n\nfunction onBoundary(p, p1, p2) {\n    const x1 = p[0] - p1[0];\n    const y1 = p[1] - p1[1];\n    const x2 = p[0] - p2[0];\n    const y2 = p[1] - p2[1];\n    return (x1 * y2 - x2 * y1 === 0) && (x1 * x2 <= 0) && (y1 * y2 <= 0);\n}\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}\n\n// ray casting algorithm for detecting if point is in polygon\nfunction pointWithinPolygon(point, rings) {\n    let inside = false;\n    for (let i = 0, len = rings.length; i < len; i++) {\n        const ring = rings[i];\n        for (let j = 0, len2 = ring.length; j < len2 - 1; j++) {\n            if (onBoundary(point, ring[j], ring[j + 1])) return false;\n            if (rayIntersect(point, ring[j], ring[j + 1])) inside = !inside;\n        }\n    }\n    return inside;\n}\n\nfunction pointWithinPolygons(point, polygons) {\n    for (let i = 0; i < polygons.length; i++) {\n        if (pointWithinPolygon(point, polygons[i])) return true;\n    }\n    return false;\n}\n\nfunction perp(v1, v2) {\n    return (v1[0] * v2[1] - v1[1] * v2[0]);\n}\n\n// check if p1 and p2 are in different sides of line segment q1->q2\nfunction  twoSided(p1, p2, q1, q2) {\n    // q1->p1 (x1, y1), q1->p2 (x2, y2), q1->q2 (x3, y3)\n    const x1 = p1[0] - q1[0];\n    const y1 = p1[1] - q1[1];\n    const x2 = p2[0] - q1[0];\n    const y2 = p2[1] - q1[1];\n    const x3 = q2[0] - q1[0];\n    const y3 = q2[1] - q1[1];\n    const det1 = (x1 * y3 - x3 * y1);\n    const det2 =  (x2 * y3 - x3 * y2);\n    if ((det1 > 0 && det2 < 0) || (det1 < 0 && det2 > 0)) return true;\n    return false;\n}\n// a, b are end points for line segment1, c and d are end points for line segment2\nfunction lineIntersectLine(a, b, c, d) {\n    // check if two segments are parallel or not\n    // precondition is end point a, b is inside polygon, if line a->b is\n    // parallel to polygon edge c->d, then a->b won't intersect with c->d\n    const vectorP = [b[0] - a[0], b[1] - a[1]];\n    const vectorQ = [d[0] - c[0], d[1] - c[1]];\n    if (perp(vectorQ, vectorP) === 0) return false;\n\n    // If lines are intersecting with each other, the relative location should be:\n    // a and b lie in different sides of segment c->d\n    // c and d lie in different sides of segment a->b\n    if (twoSided(a, b, c, d) && twoSided(c, d, a, b)) return true;\n    return false;\n}\n\nfunction lineIntersectPolygon(p1, p2, polygon) {\n    for (const ring of polygon) {\n        // loop through every edge of the ring\n        for (let 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}\n\nfunction lineStringWithinPolygon(line, polygon) {\n    // First, check if geometry points of line segments are all inside polygon\n    for (let i = 0; i < line.length; ++i) {\n        if (!pointWithinPolygon(line[i], polygon)) {\n            return false;\n        }\n    }\n\n    // Second, check if there is line segment intersecting polygon edge\n    for (let i = 0; i < line.length - 1; ++i) {\n        if (lineIntersectPolygon(line[i], line[i + 1], polygon)) {\n            return false;\n        }\n    }\n    return true;\n}\n\nfunction lineStringWithinPolygons(line, polygons) {\n    for (let i = 0; i < polygons.length; i++) {\n        if (lineStringWithinPolygon(line, polygons[i])) return true;\n    }\n    return false;\n}\n\nfunction getTilePolygon(coordinates, bbox: BBox, canonical: CanonicalTileID) {\n    const polygon = [];\n    for (let i = 0; i < coordinates.length; i++) {\n        const ring = [];\n        for (let j = 0; j < coordinates[i].length; j++) {\n            const coord = getTileCoordinates(coordinates[i][j], canonical);\n            updateBBox(bbox, coord);\n            ring.push(coord);\n        }\n        polygon.push(ring);\n    }\n    return polygon;\n}\n\nfunction getTilePolygons(coordinates, bbox, canonical: CanonicalTileID) {\n    const polygons = [];\n    for (let i = 0; i < coordinates.length; i++) {\n        const polygon = getTilePolygon(coordinates[i], bbox, canonical);\n        polygons.push(polygon);\n    }\n    return polygons;\n}\n\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n    if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n        const halfWorldSize = worldSize * 0.5;\n        let shift = (p[0] - polyBBox[0] > halfWorldSize) ? -worldSize : (polyBBox[0] - p[0] > halfWorldSize) ? 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}\n\nfunction resetBBox(bbox) {\n    bbox[0] = bbox[1] = Infinity;\n    bbox[2] = bbox[3] = -Infinity;\n}\n\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical: CanonicalTileID) {\n    const worldSize = Math.pow(2, canonical.z) * EXTENT;\n    const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n    const tilePoints = [];\n    if (!geometry) return tilePoints;\n    for (const points of geometry) {\n        for (const point of points) {\n            const p = [point.x + shifts[0], point.y + shifts[1]];\n            updatePoint(p, pointBBox, polyBBox, worldSize);\n            tilePoints.push(p);\n        }\n    }\n    return tilePoints;\n}\n\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical: CanonicalTileID) {\n    const worldSize = Math.pow(2, canonical.z) * EXTENT;\n    const shifts = [canonical.x * EXTENT, canonical.y * EXTENT];\n    const tileLines = [];\n    if (!geometry) return tileLines;\n    for (const line of geometry) {\n        const tileLine = [];\n        for (const point of line) {\n            const p = [point.x + shifts[0], point.y + shifts[1]];\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 (const line of tileLines) {\n            for (const p of line) {\n                updatePoint(p, lineBBox, polyBBox, worldSize);\n            }\n        }\n    }\n    return tileLines;\n}\n\nfunction pointsWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n    const pointBBox = [Infinity, Infinity, -Infinity, -Infinity];\n    const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n    const canonical = ctx.canonicalID();\n    if (!canonical) {\n        return false;\n    }\n\n    if (polygonGeometry.type === 'Polygon') {\n        const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n        const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n        if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n        for (const point of tilePoints) {\n            if (!pointWithinPolygon(point, tilePolygon)) return false;\n        }\n    }\n    if (polygonGeometry.type === 'MultiPolygon') {\n        const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n        const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n        if (!boxWithinBox(pointBBox, polyBBox)) return false;\n\n        for (const point of tilePoints) {\n            if (!pointWithinPolygons(point, tilePolygons)) return false;\n        }\n    }\n\n    return true;\n}\n\nfunction linesWithinPolygons(ctx: EvaluationContext, polygonGeometry: GeoJSONPolygons) {\n    const lineBBox = [Infinity, Infinity, -Infinity, -Infinity];\n    const polyBBox = [Infinity, Infinity, -Infinity, -Infinity];\n\n    const canonical = ctx.canonicalID();\n    if (!canonical) {\n        return false;\n    }\n\n    if (polygonGeometry.type === 'Polygon') {\n        const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n        const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n        if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n        for (const line of tileLines) {\n            if (!lineStringWithinPolygon(line, tilePolygon)) return false;\n        }\n    }\n    if (polygonGeometry.type === 'MultiPolygon') {\n        const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n        const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n        if (!boxWithinBox(lineBBox, polyBBox)) return false;\n\n        for (const line of tileLines) {\n            if (!lineStringWithinPolygons(line, tilePolygons)) return false;\n        }\n    }\n    return true;\n}\n\nclass Within implements Expression {\n    type: Type;\n    geojson: GeoJSON\n    geometries: GeoJSONPolygons;\n\n    constructor(geojson: GeoJSON, geometries: GeoJSONPolygons) {\n        this.type = BooleanType;\n        this.geojson = geojson;\n        this.geometries = geometries;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Within {\n        if (args.length !== 2)\n            return context.error(`'within' expression requires exactly one argument, but found ${args.length - 1} instead.`);\n        if (isValue(args[1])) {\n            const geojson = (args[1]: Object);\n            if (geojson.type === 'FeatureCollection') {\n                for (let i = 0; i < geojson.features.length; ++i) {\n                    const 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                const type = geojson.geometry.type;\n                if (type === 'Polygon' || type === '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    }\n\n    evaluate(ctx: EvaluationContext): boolean {\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    }\n\n    eachChild() {}\n\n    outputDefined(): boolean {\n        return true;\n    }\n\n    serialize(): SerializedExpression {\n        return [\"within\", this.geojson];\n    }\n\n}\n\nexport default Within;\n","// @flow\n\nimport CompoundExpression from './compound_expression.js';\nimport Within from './definitions/within.js';\nimport type {Expression} from './expression.js';\n\nfunction isFeatureConstant(e: Expression): boolean {\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 (\n            e.name === 'properties' ||\n            e.name === 'geometry-type' ||\n            e.name === 'id'\n        ) {\n            return false;\n        } else if (/^filter-/.test(e.name)) {\n            return false;\n        }\n    }\n\n    if (e instanceof Within) {\n        return false;\n    }\n\n    let result = true;\n    e.eachChild(arg => {\n        if (result && !isFeatureConstant(arg)) { result = false; }\n    });\n    return result;\n}\n\nfunction isStateConstant(e: Expression): boolean {\n    if (e instanceof CompoundExpression) {\n        if (e.name === 'feature-state') {\n            return false;\n        }\n    }\n    let result = true;\n    e.eachChild(arg => {\n        if (result && !isStateConstant(arg)) { result = false; }\n    });\n    return result;\n}\n\nfunction isGlobalPropertyConstant(e: Expression, properties: Array<string>): boolean {\n    if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) { return false; }\n    let result = true;\n    e.eachChild((arg) => {\n        if (result && !isGlobalPropertyConstant(arg, properties)) { result = false; }\n    });\n    return result;\n}\n\nexport {isFeatureConstant, isGlobalPropertyConstant, isStateConstant};\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext  from '../evaluation_context.js';\n\nclass Var implements Expression {\n    type: Type;\n    name: string;\n    boundExpression: Expression;\n\n    constructor(name: string, boundExpression: Expression) {\n        this.type = boundExpression.type;\n        this.name = name;\n        this.boundExpression = boundExpression;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): void | Var {\n        if (args.length !== 2 || typeof args[1] !== 'string')\n            return context.error(`'var' expression requires exactly one string literal argument.`);\n\n        const 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\n        return new Var(name, context.scope.get(name));\n    }\n\n    evaluate(ctx: EvaluationContext): any {\n        return this.boundExpression.evaluate(ctx);\n    }\n\n    eachChild() {}\n\n    outputDefined(): boolean {\n        return false;\n    }\n\n    serialize(): Array<string> {\n        return [\"var\", this.name];\n    }\n}\n\nexport default Var;\n","// @flow\n\nimport Scope from './scope.js';\nimport {checkSubtype} from './types.js';\nimport ParsingError from './parsing_error.js';\nimport Literal from './definitions/literal.js';\nimport Assertion from './definitions/assertion.js';\nimport Coercion from './definitions/coercion.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport CollatorExpression from './definitions/collator.js';\nimport Within from './definitions/within.js';\nimport {isGlobalPropertyConstant, isFeatureConstant} from './is_constant.js';\nimport Var from './definitions/var.js';\n\nimport type {Expression, ExpressionRegistry} from './expression.js';\nimport type {Type} from './types.js';\n\n/**\n * State associated parsing at a given point in an expression tree.\n * @private\n */\nclass ParsingContext {\n    registry: ExpressionRegistry;\n    path: Array<number>;\n    key: string;\n    scope: Scope;\n    errors: Array<ParsingError>;\n\n    // The expected type of this expression. Provided only to allow Expression\n    // implementations to infer argument types: Expression#parse() need not\n    // check that the output type of the parsed expression matches\n    // `expectedType`.\n    expectedType: ?Type;\n\n    constructor(\n        registry: ExpressionRegistry,\n        path: Array<number> = [],\n        expectedType: ?Type,\n        scope: Scope = new Scope(),\n        errors: Array<ParsingError> = []\n    ) {\n        this.registry = registry;\n        this.path = path;\n        this.key = path.map(part => `[${part}]`).join('');\n        this.scope = scope;\n        this.errors = errors;\n        this.expectedType = expectedType;\n    }\n\n    /**\n     * @param expr the JSON expression to parse\n     * @param index the optional argument index if this expression is an argument of a parent expression that's being parsed\n     * @param options\n     * @param options.omitTypeAnnotations set true to omit inferred type annotations.  Caller beware: with this option set, the parsed expression's type will NOT satisfy `expectedType` if it would normally be wrapped in an inferred annotation.\n     * @private\n     */\n    parse(\n        expr: mixed,\n        index?: number,\n        expectedType?: ?Type,\n        bindings?: Array<[string, Expression]>,\n        options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'} = {}\n    ): ?Expression {\n        if (index) {\n            return this.concat(index, expectedType, bindings)._parse(expr, options);\n        }\n        return this._parse(expr, options);\n    }\n\n    _parse(expr: mixed, options: {typeAnnotation?: 'assert' | 'coerce' | 'omit'}): ?Expression {\n        if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n            expr = ['literal', expr];\n        }\n\n        function annotate(parsed, type, typeAnnotation: 'assert' | 'coerce' | 'omit') {\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\n        if (Array.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\n            const 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\n            const Expr = this.registry[op];\n            if (Expr) {\n                let parsed = Expr.parse(expr, this);\n                if (!parsed) return null;\n\n                if (this.expectedType) {\n                    const expected = this.expectedType;\n                    const actual = parsed.type;\n\n                    // When we expect a number, string, boolean, or array but have a value, wrap it in an assertion.\n                    // When we expect a color or formatted string, but have a string or value, wrap it in a coercion.\n                    // Otherwise, we do static type-checking.\n                    //\n                    // These behaviors are overridable for:\n                    //   * The \"coalesce\" operator, which needs to omit type annotations.\n                    //   * String-valued properties (e.g. `text-field`), where coercion is more convenient than assertion.\n                    //\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\n                // If an expression's arguments are all literals, we can evaluate\n                // it immediately and replace it with a literal value in the\n                // parsed/compiled result. Expressions that expect an image should\n                // not be resolved here so we can later get the available images.\n                if (!(parsed instanceof Literal) && (parsed.type.kind !== 'resolvedImage') && isConstant(parsed)) {\n                    const 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\n                return parsed;\n            }\n\n            return this.error(`Unknown expression \"${op}\". If 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    }\n\n    /**\n     * Returns a copy of this context suitable for parsing the subexpression at\n     * index `index`, optionally appending to 'let' binding map.\n     *\n     * Note that `errors` property, intended for collecting errors while\n     * parsing, is copied by reference rather than cloned.\n     * @private\n     */\n    concat(index: number, expectedType?: ?Type, bindings?: Array<[string, Expression]>): ParsingContext {\n        const path = typeof index === 'number' ? this.path.concat(index) : this.path;\n        const scope = bindings ? this.scope.concat(bindings) : this.scope;\n        return new ParsingContext(\n            this.registry,\n            path,\n            expectedType || null,\n            scope,\n            this.errors\n        );\n    }\n\n    /**\n     * Push a parsing (or type checking) error into the `this.errors`\n     * @param error The message\n     * @param keys Optionally specify the source of the error at a child\n     * of the current expression at `this.key`.\n     * @private\n     */\n    error(error: string, ...keys: Array<number>) {\n        const key = `${this.key}${keys.map(k => `[${k}]`).join('')}`;\n        this.errors.push(new ParsingError(key, error));\n    }\n\n    /**\n     * Returns null if `t` is a subtype of `expected`; otherwise returns an\n     * error message and also pushes it to `this.errors`.\n     */\n    checkSubtype(expected: Type, t: Type): ?string {\n        const error = checkSubtype(expected, t);\n        if (error) this.error(error);\n        return error;\n    }\n}\n\nexport default ParsingContext;\n\nfunction isConstant(expression: 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        // Although the results of a Collator expression with fixed arguments\n        // generally shouldn't change between executions, we can't serialize them\n        // as constant expressions because results change based on environment.\n        return false;\n    } else if (expression instanceof Within) {\n        return false;\n    }\n\n    const isTypeAnnotation = expression instanceof Coercion ||\n        expression instanceof Assertion;\n\n    let childrenConstant = true;\n    expression.eachChild(child => {\n        // We can _almost_ assume that if `expressions` children are constant,\n        // they would already have been evaluated to Literal values when they\n        // were parsed.  Type annotations are the exception, because they might\n        // have been inferred and added after a child was parsed.\n\n        // So we recurse into isConstant() for the children of type annotations,\n        // but otherwise simply check whether they are Literals.\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\n    return isFeatureConstant(expression) &&\n        isGlobalPropertyConstant(expression, ['zoom', 'heatmap-density', 'line-progress', 'sky-radial-progress', 'accumulated', 'is-supported-script', 'pitch', 'distance-from-center']);\n}\n","// @flow\n\nimport RuntimeError from './runtime_error.js';\n\nimport type {Expression} from './expression.js';\n\nexport type Stops = Array<[number, Expression]>;\n\n/**\n * Returns the index of the last stop <= input, or 0 if it doesn't exist.\n * @private\n */\nexport function findStopLessThanOrEqualTo(stops: Array<number>, input: number): number {\n    const lastIndex = stops.length - 1;\n    let lowerIndex = 0;\n    let upperIndex = lastIndex;\n    let currentIndex = 0;\n    let currentValue, nextValue;\n\n    while (lowerIndex <= upperIndex) {\n        currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n        currentValue = stops[currentIndex];\n        nextValue = stops[currentIndex + 1];\n\n        if (currentValue <= input) {\n            if (currentIndex === lastIndex || input < nextValue) { // Search complete\n                return currentIndex;\n            }\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\n    return 0;\n}\n","// @flow\n\nimport {NumberType} from '../types.js';\n\nimport {findStopLessThanOrEqualTo} from '../stops.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Step implements Expression {\n    type: Type;\n\n    input: Expression;\n    labels: Array<number>;\n    outputs: Array<Expression>;\n\n    constructor(type: Type, input: Expression, stops: Stops) {\n        this.type = type;\n        this.input = input;\n\n        this.labels = [];\n        this.outputs = [];\n        for (const [label, expression] of stops) {\n            this.labels.push(label);\n            this.outputs.push(expression);\n        }\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Step {\n        if (args.length - 1 < 4) {\n            return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n        }\n\n        if ((args.length - 1) % 2 !== 0) {\n            return context.error(`Expected an even number of arguments.`);\n        }\n\n        const input = context.parse(args[1], 1, NumberType);\n        if (!input) return null;\n\n        const stops: Stops = [];\n\n        let outputType: Type = (null: any);\n        if (context.expectedType && context.expectedType.kind !== 'value') {\n            outputType = context.expectedType;\n        }\n\n        for (let i = 1; i < args.length; i += 2) {\n            const label = i === 1 ? -Infinity : args[i];\n            const value = args[i + 1];\n\n            const labelKey = i;\n            const valueKey = i + 1;\n\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\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\n            const parsed = context.parse(value, valueKey, outputType);\n            if (!parsed) return null;\n            outputType = outputType || parsed.type;\n            stops.push([label, parsed]);\n        }\n\n        return new Step(outputType, input, stops);\n    }\n\n    evaluate(ctx: EvaluationContext): any {\n        const labels = this.labels;\n        const outputs = this.outputs;\n\n        if (labels.length === 1) {\n            return outputs[0].evaluate(ctx);\n        }\n\n        const value = ((this.input.evaluate(ctx): any): number);\n        if (value <= labels[0]) {\n            return outputs[0].evaluate(ctx);\n        }\n\n        const stopCount = labels.length;\n        if (value >= labels[stopCount - 1]) {\n            return outputs[stopCount - 1].evaluate(ctx);\n        }\n\n        const index = findStopLessThanOrEqualTo(labels, value);\n        return outputs[index].evaluate(ctx);\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.input);\n        for (const expression of this.outputs) {\n            fn(expression);\n        }\n    }\n\n    outputDefined(): boolean {\n        return this.outputs.every(out => out.outputDefined());\n    }\n\n    serialize(): SerializedExpression {\n        const serialized = [\"step\", this.input.serialize()];\n        for (let 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\nexport default Step;\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\nmodule.exports = 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","// @flow\n\nimport Color from './color.js';\n\nexport function number(a: number, b: number, t: number): number {\n    return (a * (1 - t)) + (b * t);\n}\n\nexport function color(from: Color, to: Color, t: number): Color {\n    return new Color(\n        number(from.r, to.r, t),\n        number(from.g, to.g, t),\n        number(from.b, to.b, t),\n        number(from.a, to.a, t)\n    );\n}\n\nexport function array(from: Array<number>, to: Array<number>, t: number): Array<number> {\n    return from.map((d, i) => {\n        return number(d, to[i], t);\n    });\n}\n","// @flow\n\nimport Color from './color.js';\n\nimport {number as interpolateNumber} from './interpolate.js';\n\ntype LABColor = {\n    l: number,\n    a: number,\n    b: number,\n    alpha: number\n};\n\ntype HCLColor = {\n    h: number,\n    c: number,\n    l: number,\n    alpha: number\n};\n\n// Constants\nconst Xn = 0.950470, // D65 standard referent\n    Yn = 1,\n    Zn = 1.088830,\n    t0 = 4 / 29,\n    t1 = 6 / 29,\n    t2 = 3 * t1 * t1,\n    t3 = t1 * t1 * t1,\n    deg2rad = Math.PI / 180,\n    rad2deg = 180 / Math.PI;\n\n// Utilities\nfunction xyz2lab(t: number) {\n    return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t: number) {\n    return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction xyz2rgb(x: number) {\n    return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2xyz(x: number) {\n    x /= 255;\n    return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\n// LAB\nfunction rgbToLab(rgbColor: Color): LABColor {\n    const b = rgb2xyz(rgbColor.r),\n        a = rgb2xyz(rgbColor.g),\n        l = rgb2xyz(rgbColor.b),\n        x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),\n        y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),\n        z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);\n\n    return {\n        l: 116 * y - 16,\n        a: 500 * (x - y),\n        b: 200 * (y - z),\n        alpha: rgbColor.a\n    };\n}\n\nfunction labToRgb(labColor: LABColor): Color {\n    let y = (labColor.l + 16) / 116,\n        x = isNaN(labColor.a) ? y : y + labColor.a / 500,\n        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(\n        xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB\n        xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),\n        xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z),\n        labColor.alpha\n    );\n}\n\nfunction interpolateLab(from: LABColor, to: LABColor, t: number): LABColor {\n    return {\n        l: interpolateNumber(from.l, to.l, t),\n        a: interpolateNumber(from.a, to.a, t),\n        b: interpolateNumber(from.b, to.b, t),\n        alpha: interpolateNumber(from.alpha, to.alpha, t)\n    };\n}\n\n// HCL\nfunction rgbToHcl(rgbColor: Color): HCLColor {\n    const {l, a, b} = rgbToLab(rgbColor);\n    const 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,\n        alpha: rgbColor.a\n    };\n}\n\nfunction hclToRgb(hclColor: HCLColor): Color {\n    const h = hclColor.h * deg2rad,\n        c = hclColor.c,\n        l = hclColor.l;\n    return labToRgb({\n        l,\n        a: Math.cos(h) * c,\n        b: Math.sin(h) * c,\n        alpha: hclColor.alpha\n    });\n}\n\nfunction interpolateHue(a: number, b: number, t: number) {\n    const d = b - a;\n    return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\n\nfunction interpolateHcl(from: HCLColor, to: HCLColor, t: number): HCLColor {\n    return {\n        h: interpolateHue(from.h, to.h, t),\n        c: interpolateNumber(from.c, to.c, t),\n        l: interpolateNumber(from.l, to.l, t),\n        alpha: interpolateNumber(from.alpha, to.alpha, t)\n    };\n}\n\nexport const lab = {\n    forward: rgbToLab,\n    reverse: labToRgb,\n    interpolate: interpolateLab\n};\n\nexport const hcl = {\n    forward: rgbToHcl,\n    reverse: hclToRgb,\n    interpolate: interpolateHcl\n};\n","// @flow\n\nimport UnitBezier from '@mapbox/unitbezier';\n\nimport * as interpolate from '../../util/interpolate.js';\nimport {toString, NumberType, ColorType} from '../types.js';\nimport {findStopLessThanOrEqualTo} from '../stops.js';\nimport {hcl, lab} from '../../util/color_spaces.js';\nimport Color from '../../util/color.js';\n\nimport type {Stops} from '../stops.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nexport type InterpolationType =\n    { name: 'linear' } |\n    { name: 'exponential', base: number } |\n    { name: 'cubic-bezier', controlPoints: [number, number, number, number] };\n\nclass Interpolate implements Expression {\n    type: Type;\n\n    operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab';\n    interpolation: InterpolationType;\n    input: Expression;\n    labels: Array<number>;\n    outputs: Array<Expression>;\n\n    constructor(type: Type, operator: 'interpolate' | 'interpolate-hcl' | 'interpolate-lab', interpolation: InterpolationType, input: Expression, stops: Stops) {\n        this.type = type;\n        this.operator = operator;\n        this.interpolation = interpolation;\n        this.input = input;\n\n        this.labels = [];\n        this.outputs = [];\n        for (const [label, expression] of stops) {\n            this.labels.push(label);\n            this.outputs.push(expression);\n        }\n    }\n\n    static interpolationFactor(interpolation: InterpolationType, input: number, lower: number, upper: number): number {\n        let t = 0;\n        if (interpolation.name === 'exponential') {\n            t = exponentialInterpolation(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            const c = interpolation.controlPoints;\n            const 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    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Interpolate {\n        let [operator, interpolation, input, ...rest] = args;\n\n        if (!Array.isArray(interpolation) || interpolation.length === 0) {\n            return context.error(`Expected an interpolation type expression.`, 1);\n        }\n\n        if (interpolation[0] === 'linear') {\n            interpolation = {name: 'linear'};\n        } else if (interpolation[0] === 'exponential') {\n            const base = interpolation[1];\n            if (typeof base !== 'number')\n                return context.error(`Exponential interpolation requires a numeric base.`, 1, 1);\n            interpolation = {\n                name: 'exponential',\n                base\n            };\n        } else if (interpolation[0] === 'cubic-bezier') {\n            const controlPoints = interpolation.slice(1);\n            if (\n                controlPoints.length !== 4 ||\n                controlPoints.some(t => 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\n            interpolation = {\n                name: 'cubic-bezier',\n                controlPoints: (controlPoints: any)\n            };\n        } else {\n            return context.error(`Unknown interpolation type ${String(interpolation[0])}`, 1, 0);\n        }\n\n        if (args.length - 1 < 4) {\n            return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n        }\n\n        if ((args.length - 1) % 2 !== 0) {\n            return context.error(`Expected an even number of arguments.`);\n        }\n\n        input = context.parse(input, 2, NumberType);\n        if (!input) return null;\n\n        const stops: Stops = [];\n\n        let outputType: Type = (null: any);\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\n        for (let i = 0; i < rest.length; i += 2) {\n            const label = rest[i];\n            const value = rest[i + 1];\n\n            const labelKey = i + 3;\n            const valueKey = i + 4;\n\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\n            if (stops.length && stops[stops.length - 1][0] >= label) {\n                return context.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n            }\n\n            const parsed = context.parse(value, valueKey, outputType);\n            if (!parsed) return null;\n            outputType = outputType || parsed.type;\n            stops.push([label, parsed]);\n        }\n\n        if (outputType.kind !== 'number' &&\n            outputType.kind !== 'color' &&\n            !(\n                outputType.kind === 'array' &&\n                outputType.itemType.kind === 'number' &&\n                typeof outputType.N === 'number'\n            )\n        ) {\n            return context.error(`Type ${toString(outputType)} is not interpolatable.`);\n        }\n\n        return new Interpolate(outputType, (operator: any), interpolation, input, stops);\n    }\n\n    evaluate(ctx: EvaluationContext): Color {\n        const labels = this.labels;\n        const outputs = this.outputs;\n\n        if (labels.length === 1) {\n            return outputs[0].evaluate(ctx);\n        }\n\n        const value = ((this.input.evaluate(ctx): any): number);\n        if (value <= labels[0]) {\n            return outputs[0].evaluate(ctx);\n        }\n\n        const stopCount = labels.length;\n        if (value >= labels[stopCount - 1]) {\n            return outputs[stopCount - 1].evaluate(ctx);\n        }\n\n        const index = findStopLessThanOrEqualTo(labels, value);\n        const lower = labels[index];\n        const upper = labels[index + 1];\n        const t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n\n        const outputLower = outputs[index].evaluate(ctx);\n        const outputUpper = outputs[index + 1].evaluate(ctx);\n\n        if (this.operator === 'interpolate') {\n            return (interpolate[this.type.kind.toLowerCase()]: any)(outputLower, outputUpper, t); // eslint-disable-line import/namespace\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    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.input);\n        for (const expression of this.outputs) {\n            fn(expression);\n        }\n    }\n\n    outputDefined(): boolean {\n        return this.outputs.every(out => out.outputDefined());\n    }\n\n    serialize(): SerializedExpression {\n        let 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 = [\"exponential\", this.interpolation.base];\n            }\n        } else {\n            interpolation = [\"cubic-bezier\" ].concat(this.interpolation.controlPoints);\n        }\n\n        const serialized = [this.operator, interpolation, this.input.serialize()];\n\n        for (let i = 0; i < this.labels.length; i++) {\n            serialized.push(\n                this.labels[i],\n                this.outputs[i].serialize()\n            );\n        }\n        return serialized;\n    }\n}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n * How it works: Two consecutive stop values define a (scaled and shifted) exponential function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n *                     = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`.  In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n*/\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n    const difference = upperValue - lowerValue;\n    const progress = input - lowerValue;\n\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\nexport default Interpolate;\n","// @flow\n\nimport assert from 'assert';\n\nimport {checkSubtype, ValueType} from '../types.js';\nimport ResolvedImage from '../types/resolved_image.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Coalesce implements Expression {\n    type: Type;\n    args: Array<Expression>;\n\n    constructor(type: Type, args: Array<Expression>) {\n        this.type = type;\n        this.args = args;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Coalesce {\n        if (args.length < 2) {\n            return context.error(\"Expectected at least one argument.\");\n        }\n        let outputType: Type = (null: any);\n        const expectedType = context.expectedType;\n        if (expectedType && expectedType.kind !== 'value') {\n            outputType = expectedType;\n        }\n        const parsedArgs = [];\n\n        for (const arg of args.slice(1)) {\n            const parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, {typeAnnotation: 'omit'});\n            if (!parsed) return null;\n            outputType = outputType || parsed.type;\n            parsedArgs.push(parsed);\n        }\n        assert(outputType);\n\n        // Above, we parse arguments without inferred type annotation so that\n        // they don't produce a runtime error for `null` input, which would\n        // preempt the desired null-coalescing behavior.\n        // Thus, if any of our arguments would have needed an annotation, we\n        // need to wrap the enclosing coalesce expression with it instead.\n        const needsAnnotation = expectedType &&\n            parsedArgs.some(arg => checkSubtype(expectedType, arg.type));\n\n        return needsAnnotation ?\n            new Coalesce(ValueType, parsedArgs) :\n            new Coalesce((outputType: any), parsedArgs);\n    }\n\n    evaluate(ctx: EvaluationContext): any | null {\n        let result = null;\n        let argCount = 0;\n        let firstImage;\n        for (const arg of this.args) {\n            argCount++;\n            result = arg.evaluate(ctx);\n            // we need to keep track of the first requested image in a coalesce statement\n            // if coalesce can't find a valid image, we return the first image so styleimagemissing can fire\n            if (result && result instanceof ResolvedImage && !result.available) {\n                // set to first image\n                if (!firstImage) {\n                    firstImage = result;\n                }\n                result = null;\n                // if we reach the end, return the first image\n                if (argCount === this.args.length) {\n                    return firstImage;\n                }\n            }\n\n            if (result !== null) break;\n        }\n        return result;\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        this.args.forEach(fn);\n    }\n\n    outputDefined(): boolean {\n        return this.args.every(arg => arg.outputDefined());\n    }\n\n    serialize(): SerializedExpression {\n        const serialized = [\"coalesce\"];\n        this.eachChild(child => { serialized.push(child.serialize()); });\n        return serialized;\n    }\n}\n\nexport default Coalesce;\n","// @flow\n\nimport type {Type} from '../types.js';\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext  from '../evaluation_context.js';\n\nclass Let implements Expression {\n    type: Type;\n    bindings: Array<[string, Expression]>;\n    result: Expression;\n\n    constructor(bindings: Array<[string, Expression]>, result: Expression) {\n        this.type = result.type;\n        this.bindings = [].concat(bindings);\n        this.result = result;\n    }\n\n    evaluate(ctx: EvaluationContext): any {\n        return this.result.evaluate(ctx);\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        for (const binding of this.bindings) {\n            fn(binding[1]);\n        }\n        fn(this.result);\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Let {\n        if (args.length < 4)\n            return context.error(`Expected at least 3 arguments, but found ${args.length - 1} instead.`);\n\n        const bindings: Array<[string, Expression]> = [];\n        for (let i = 1; i < args.length - 1; i += 2) {\n            const name = args[i];\n\n            if (typeof name !== 'string') {\n                return context.error(`Expected string, but found ${typeof name} instead.`, i);\n            }\n\n            if (/[^a-zA-Z0-9_]/.test(name)) {\n                return context.error(`Variable names must contain only alphanumeric characters or '_'.`, i);\n            }\n\n            const value = context.parse(args[i + 1], i + 1);\n            if (!value) return null;\n\n            bindings.push([name, value]);\n        }\n\n        const result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n        if (!result) return null;\n\n        return new Let(bindings, result);\n    }\n\n    outputDefined(): boolean {\n        return this.result.outputDefined();\n    }\n\n    serialize(): SerializedExpression {\n        const serialized = [\"let\"];\n        for (const [name, expr] of this.bindings) {\n            serialized.push(name, expr.serialize());\n        }\n        serialized.push(this.result.serialize());\n        return serialized;\n    }\n}\n\nexport default Let;\n","// @flow\n\nimport {array, ValueType, NumberType} from '../types.js';\n\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type, ArrayType} from '../types.js';\nimport type {Value} from '../values.js';\n\nclass At implements Expression {\n    type: Type;\n    index: Expression;\n    input: Expression;\n\n    constructor(type: Type, index: Expression, input: Expression) {\n        this.type = type;\n        this.index = index;\n        this.input = input;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?At {\n        if (args.length !== 3)\n            return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n\n        const index = context.parse(args[1], 1, NumberType);\n        const input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n\n        if (!index || !input) return null;\n\n        const t: ArrayType = (input.type: any);\n        return new At(t.itemType, index, input);\n    }\n\n    evaluate(ctx: EvaluationContext): Value {\n        const index = ((this.index.evaluate(ctx): any): number);\n        const array = ((this.input.evaluate(ctx): any): Array<Value>);\n\n        if (index < 0) {\n            throw new RuntimeError(`Array index out of bounds: ${index} < 0.`);\n        }\n\n        if (index >= array.length) {\n            throw new RuntimeError(`Array index out of bounds: ${index} > ${array.length - 1}.`);\n        }\n\n        if (index !== Math.floor(index)) {\n            throw new RuntimeError(`Array index must be an integer, but found ${index} instead.`);\n        }\n\n        return array[index];\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.index);\n        fn(this.input);\n    }\n\n    outputDefined(): boolean {\n        return false;\n    }\n\n    serialize(): SerializedExpression {\n        return [\"at\", this.index.serialize(), this.input.serialize()];\n    }\n}\n\nexport default At;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass In implements Expression {\n    type: Type;\n    needle: Expression;\n    haystack: Expression;\n\n    constructor(needle: Expression, haystack: Expression) {\n        this.type = BooleanType;\n        this.needle = needle;\n        this.haystack = haystack;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?In {\n        if (args.length !== 3) {\n            return context.error(`Expected 2 arguments, but found ${args.length - 1} instead.`);\n        }\n\n        const needle = context.parse(args[1], 1, ValueType);\n\n        const haystack = context.parse(args[2], 2, ValueType);\n\n        if (!needle || !haystack) return null;\n\n        if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n            return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString(needle.type)} instead`);\n        }\n\n        return new In(needle, haystack);\n    }\n\n    evaluate(ctx: EvaluationContext): boolean {\n        const needle = (this.needle.evaluate(ctx): any);\n        const haystack = (this.haystack.evaluate(ctx): any);\n\n        if (haystack == null) return false;\n\n        if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n            throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${toString(typeOf(needle))} instead.`);\n        }\n\n        if (!isValidNativeType(haystack, ['string', 'array'])) {\n            throw new RuntimeError(`Expected second argument to be of type array or string, but found ${toString(typeOf(haystack))} instead.`);\n        }\n\n        return haystack.indexOf(needle) >= 0;\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.needle);\n        fn(this.haystack);\n    }\n\n    outputDefined(): boolean {\n        return true;\n    }\n\n    serialize(): SerializedExpression {\n        return [\"in\", this.needle.serialize(), this.haystack.serialize()];\n    }\n}\n\nexport default In;\n","// @flow\n\nimport {BooleanType, StringType, ValueType, NullType, toString, NumberType, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass IndexOf implements Expression {\n    type: Type;\n    needle: Expression;\n    haystack: Expression;\n    fromIndex: ?Expression;\n\n    constructor(needle: Expression, haystack: Expression, fromIndex?: Expression) {\n        this.type = NumberType;\n        this.needle = needle;\n        this.haystack = haystack;\n        this.fromIndex = fromIndex;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?IndexOf {\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\n        const needle = context.parse(args[1], 1, ValueType);\n\n        const haystack = context.parse(args[2], 2, ValueType);\n\n        if (!needle || !haystack) return null;\n        if (!isValidType(needle.type, [BooleanType, StringType, NumberType, NullType, ValueType])) {\n            return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${toString(needle.type)} instead`);\n        }\n\n        if (args.length === 4) {\n            const fromIndex = context.parse(args[3], 3, NumberType);\n            if (!fromIndex) return null;\n            return new IndexOf(needle, haystack, fromIndex);\n        } else {\n            return new IndexOf(needle, haystack);\n        }\n    }\n\n    evaluate(ctx: EvaluationContext): any {\n        const needle = (this.needle.evaluate(ctx): any);\n        const haystack = (this.haystack.evaluate(ctx): any);\n\n        if (!isValidNativeType(needle, ['boolean', 'string', 'number', 'null'])) {\n            throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${toString(typeOf(needle))} instead.`);\n        }\n\n        if (!isValidNativeType(haystack, ['string', 'array'])) {\n            throw new RuntimeError(`Expected second argument to be of type array or string, but found ${toString(typeOf(haystack))} instead.`);\n        }\n\n        if (this.fromIndex) {\n            const fromIndex = (this.fromIndex.evaluate(ctx): number);\n            return haystack.indexOf(needle, fromIndex);\n        }\n\n        return haystack.indexOf(needle);\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.needle);\n        fn(this.haystack);\n        if (this.fromIndex) {\n            fn(this.fromIndex);\n        }\n    }\n\n    outputDefined(): boolean {\n        return false;\n    }\n\n    serialize(): SerializedExpression {\n        if (this.fromIndex != null && this.fromIndex !== undefined) {\n            const fromIndex = this.fromIndex.serialize();\n            return [\"index-of\", this.needle.serialize(), this.haystack.serialize(), fromIndex];\n        }\n        return [\"index-of\", this.needle.serialize(), this.haystack.serialize()];\n    }\n}\n\nexport default IndexOf;\n","// @flow\n\nimport assert from 'assert';\n\nimport {typeOf} from '../values.js';\nimport {ValueType, type Type} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\n\n// Map input label values to output expression index\ntype Cases = {[number | string]: number};\n\nclass Match implements Expression {\n    type: Type;\n    inputType: Type;\n\n    input: Expression;\n    cases: Cases;\n    outputs: Array<Expression>;\n    otherwise: Expression;\n\n    constructor(inputType: Type, outputType: Type, input: Expression, cases: Cases, outputs: Array<Expression>, otherwise: Expression) {\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    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Match {\n        if (args.length < 5)\n            return context.error(`Expected at least 4 arguments, but found only ${args.length - 1}.`);\n        if (args.length % 2 !== 1)\n            return context.error(`Expected an even number of arguments.`);\n\n        let inputType;\n        let outputType;\n        if (context.expectedType && context.expectedType.kind !== 'value') {\n            outputType = context.expectedType;\n        }\n        const cases = {};\n        const outputs = [];\n        for (let i = 2; i < args.length - 1; i += 2) {\n            let labels = args[i];\n            const value = args[i + 1];\n\n            if (!Array.isArray(labels)) {\n                labels = [labels];\n            }\n\n            const labelContext = context.concat(i);\n            if (labels.length === 0) {\n                return labelContext.error('Expected at least one branch label.');\n            }\n\n            for (const label of labels) {\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\n                } else if (typeof label === 'number' && Math.floor(label) !== label) {\n                    return labelContext.error(`Numeric branch labels must be integer values.`);\n\n                } else if (!inputType) {\n                    inputType = typeOf(label);\n                } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n                    return null;\n                }\n\n                if (typeof cases[String(label)] !== 'undefined') {\n                    return labelContext.error('Branch labels must be unique.');\n                }\n\n                cases[String(label)] = outputs.length;\n            }\n\n            const result = context.parse(value, i, outputType);\n            if (!result) return null;\n            outputType = outputType || result.type;\n            outputs.push(result);\n        }\n\n        const input = context.parse(args[1], 1, ValueType);\n        if (!input) return null;\n\n        const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n        if (!otherwise) return null;\n\n        assert(inputType && outputType);\n\n        if (input.type.kind !== 'value' && context.concat(1).checkSubtype((inputType: any), input.type)) {\n            return null;\n        }\n\n        return new Match((inputType: any), (outputType: any), input, cases, outputs, otherwise);\n    }\n\n    evaluate(ctx: EvaluationContext): any {\n        const input = (this.input.evaluate(ctx): any);\n        const output = (typeOf(input) === this.inputType && this.outputs[this.cases[input]]) || this.otherwise;\n        return output.evaluate(ctx);\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.input);\n        this.outputs.forEach(fn);\n        fn(this.otherwise);\n    }\n\n    outputDefined(): boolean {\n        return this.outputs.every(out => out.outputDefined()) && this.otherwise.outputDefined();\n    }\n\n    serialize(): SerializedExpression {\n        const serialized = [\"match\", this.input.serialize()];\n\n        // Sort so serialization has an arbitrary defined order, even though\n        // branch order doesn't affect evaluation\n        const sortedLabels = Object.keys(this.cases).sort();\n\n        // Group branches by unique match expression to support condensed\n        // serializations of the form [case1, case2, ...] -> matchExpression\n        const groupedByOutput: Array<[number, Array<number | string>]> = [];\n        const outputLookup: {[index: number]: number} = {}; // lookup index into groupedByOutput for a given output expression\n        for (const label of sortedLabels) {\n            const outputIndex = outputLookup[this.cases[label]];\n            if (outputIndex === undefined) {\n                // First time seeing this output, add it to the end of the grouped list\n                outputLookup[this.cases[label]] = groupedByOutput.length;\n                groupedByOutput.push([this.cases[label], [label]]);\n            } else {\n                // We've seen this expression before, add the label to that output's group\n                groupedByOutput[outputIndex][1].push(label);\n            }\n        }\n\n        const coerceLabel = (label) => this.inputType.kind === 'number' ? Number(label) : label;\n\n        for (const [outputIndex, labels] of groupedByOutput) {\n            if (labels.length === 1) {\n                // Only a single label matches this output expression\n                serialized.push(coerceLabel(labels[0]));\n            } else {\n                // Array of literal labels pointing to this output expression\n                serialized.push(labels.map(coerceLabel));\n            }\n            serialized.push(this.outputs[outputIndex].serialize());\n        }\n        serialized.push(this.otherwise.serialize());\n        return serialized;\n    }\n}\n\nexport default Match;\n","// @flow\n\nimport assert from 'assert';\n\nimport {BooleanType} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\ntype Branches = Array<[Expression, Expression]>;\n\nclass Case implements Expression {\n    type: Type;\n\n    branches: Branches;\n    otherwise: Expression;\n\n    constructor(type: Type, branches: Branches, otherwise: Expression) {\n        this.type = type;\n        this.branches = branches;\n        this.otherwise = otherwise;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Case {\n        if (args.length < 4)\n            return context.error(`Expected at least 3 arguments, but found only ${args.length - 1}.`);\n        if (args.length % 2 !== 0)\n            return context.error(`Expected an odd number of arguments.`);\n\n        let outputType: ?Type;\n        if (context.expectedType && context.expectedType.kind !== 'value') {\n            outputType = context.expectedType;\n        }\n\n        const branches = [];\n        for (let i = 1; i < args.length - 1; i += 2) {\n            const test = context.parse(args[i], i, BooleanType);\n            if (!test) return null;\n\n            const result = context.parse(args[i + 1], i + 1, outputType);\n            if (!result) return null;\n\n            branches.push([test, result]);\n\n            outputType = outputType || result.type;\n        }\n\n        const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n        if (!otherwise) return null;\n\n        assert(outputType);\n        return new Case((outputType: any), branches, otherwise);\n    }\n\n    evaluate(ctx: EvaluationContext): any {\n        for (const [test, expression] of this.branches) {\n            if (test.evaluate(ctx)) {\n                return expression.evaluate(ctx);\n            }\n        }\n        return this.otherwise.evaluate(ctx);\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        for (const [test, expression] of this.branches) {\n            fn(test);\n            fn(expression);\n        }\n        fn(this.otherwise);\n    }\n\n    outputDefined(): boolean {\n        return this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined();\n    }\n\n    serialize(): SerializedExpression {\n        const serialized = [\"case\"];\n        this.eachChild(child => { serialized.push(child.serialize()); });\n        return serialized;\n    }\n}\n\nexport default Case;\n","// @flow\n\nimport {ValueType, NumberType, StringType, array, toString, isValidType, isValidNativeType} from '../types.js';\nimport RuntimeError from '../runtime_error.js';\nimport {typeOf} from '../values.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Slice implements Expression {\n    type: Type;\n    input: Expression;\n    beginIndex: Expression;\n    endIndex: ?Expression;\n\n    constructor(type: Type, input: Expression, beginIndex: Expression, endIndex?: Expression) {\n        this.type = type;\n        this.input = input;\n        this.beginIndex = beginIndex;\n        this.endIndex = endIndex;\n\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Slice {\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\n        const input = context.parse(args[1], 1, ValueType);\n        const beginIndex = context.parse(args[2], 2, NumberType);\n\n        if (!input || !beginIndex) return null;\n\n        if (!isValidType(input.type, [array(ValueType), StringType, ValueType])) {\n            return context.error(`Expected first argument to be of type array or string, but found ${toString(input.type)} instead`);\n        }\n\n        if (args.length === 4) {\n            const endIndex = context.parse(args[3], 3, NumberType);\n            if (!endIndex) return null;\n            return new Slice(input.type, input, beginIndex, endIndex);\n        } else {\n            return new Slice(input.type, input, beginIndex);\n        }\n    }\n\n    evaluate(ctx: EvaluationContext): any {\n        const input = (this.input.evaluate(ctx): any);\n        const beginIndex = (this.beginIndex.evaluate(ctx): number);\n\n        if (!isValidNativeType(input, ['string', 'array'])) {\n            throw new RuntimeError(`Expected first argument to be of type array or string, but found ${toString(typeOf(input))} instead.`);\n        }\n\n        if (this.endIndex) {\n            const endIndex = (this.endIndex.evaluate(ctx): number);\n            return input.slice(beginIndex, endIndex);\n        }\n\n        return input.slice(beginIndex);\n    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.input);\n        fn(this.beginIndex);\n        if (this.endIndex) {\n            fn(this.endIndex);\n        }\n    }\n\n    outputDefined(): boolean {\n        return false;\n    }\n\n    serialize(): SerializedExpression {\n        if (this.endIndex != null && this.endIndex !== undefined) {\n            const endIndex = this.endIndex.serialize();\n            return [\"slice\", this.input.serialize(), this.beginIndex.serialize(), endIndex];\n        }\n        return [\"slice\", this.input.serialize(), this.beginIndex.serialize()];\n    }\n}\n\nexport default Slice;\n","// @flow\n\nimport {toString, ValueType, BooleanType, CollatorType} from '../types.js';\nimport Assertion from './assertion.js';\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression, ExpressionRegistration} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ntype ComparisonOperator = '==' | '!=' | '<' | '>' | '<=' | '>=' ;\n\nfunction isComparableType(op: ComparisonOperator, type: Type) {\n    if (op === '==' || op === '!=') {\n        // equality operator\n        return type.kind === 'boolean' ||\n            type.kind === 'string' ||\n            type.kind === 'number' ||\n            type.kind === 'null' ||\n            type.kind === 'value';\n    } else {\n        // ordering operator\n        return type.kind === 'string' ||\n            type.kind === 'number' ||\n            type.kind === 'value';\n    }\n}\n\nfunction eq(ctx: EvaluationContext, a: any, b: any): boolean { return a === b; }\nfunction neq(ctx: EvaluationContext, a: any, b: any): boolean { return a !== b; }\nfunction lt(ctx: EvaluationContext, a: any, b: any): boolean { return a < b; }\nfunction gt(ctx: EvaluationContext, a: any, b: any): boolean { return a > b; }\nfunction lteq(ctx: EvaluationContext, a: any, b: any): boolean { return a <= b; }\nfunction gteq(ctx: EvaluationContext, a: any, b: any): boolean { return a >= b; }\n\nfunction eqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) === 0; }\nfunction neqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return !eqCollate(ctx, a, b, c); }\nfunction ltCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) < 0; }\nfunction gtCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) > 0; }\nfunction lteqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) <= 0; }\nfunction gteqCollate(ctx: EvaluationContext, a: any, b: any, c: any): boolean { return c.compare(a, b) >= 0; }\n\n/**\n * Special form for comparison operators, implementing the signatures:\n * - (T, T, ?Collator) => boolean\n * - (T, value, ?Collator) => boolean\n * - (value, T, ?Collator) => boolean\n *\n * For inequalities, T must be either value, string, or number. For ==/!=, it\n * can also be boolean or null.\n *\n * Equality semantics are equivalent to Javascript's strict equality (===/!==)\n * -- i.e., when the arguments' types don't match, == evaluates to false, != to\n * true.\n *\n * When types don't match in an ordering comparison, a runtime error is thrown.\n *\n * @private\n */\nfunction makeComparison(op: ComparisonOperator, compareBasic: (EvaluationContext, any, any) => boolean, compareWithCollator: (EvaluationContext, any, any, any) => boolean): ExpressionRegistration {\n    const isOrderComparison = op !== '==' && op !== '!=';\n\n    return class Comparison implements Expression {\n        type: Type;\n        lhs: Expression;\n        rhs: Expression;\n        collator: ?Expression;\n        hasUntypedArgument: boolean;\n\n        constructor(lhs: Expression, rhs: Expression, collator: ?Expression) {\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\n        static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n            if (args.length !== 3 && args.length !== 4)\n                return context.error(`Expected two or three arguments.`);\n\n            const op: ComparisonOperator = (args[0]: any);\n\n            let lhs = context.parse(args[1], 1, ValueType);\n            if (!lhs) return null;\n            if (!isComparableType(op, lhs.type)) {\n                return context.concat(1).error(`\"${op}\" comparisons are not supported for type '${toString(lhs.type)}'.`);\n            }\n            let rhs = context.parse(args[2], 2, ValueType);\n            if (!rhs) return null;\n            if (!isComparableType(op, rhs.type)) {\n                return context.concat(2).error(`\"${op}\" comparisons are not supported for type '${toString(rhs.type)}'.`);\n            }\n\n            if (\n                lhs.type.kind !== rhs.type.kind &&\n                lhs.type.kind !== 'value' &&\n                rhs.type.kind !== 'value'\n            ) {\n                return context.error(`Cannot compare types '${toString(lhs.type)}' and '${toString(rhs.type)}'.`);\n            }\n\n            if (isOrderComparison) {\n                // typing rules specific to less/greater than operators\n                if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n                    // (value, T)\n                    lhs = new Assertion(rhs.type, [lhs]);\n                } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n                    // (T, value)\n                    rhs = new Assertion(lhs.type, [rhs]);\n                }\n            }\n\n            let collator = null;\n            if (args.length === 4) {\n                if (\n                    lhs.type.kind !== 'string' &&\n                    rhs.type.kind !== 'string' &&\n                    lhs.type.kind !== 'value' &&\n                    rhs.type.kind !== 'value'\n                ) {\n                    return context.error(`Cannot use collator to compare non-string types.`);\n                }\n                collator = context.parse(args[3], 3, CollatorType);\n                if (!collator) return null;\n            }\n\n            return new Comparison(lhs, rhs, collator);\n        }\n\n        evaluate(ctx: EvaluationContext): boolean {\n            const lhs = this.lhs.evaluate(ctx);\n            const rhs = this.rhs.evaluate(ctx);\n\n            if (isOrderComparison && this.hasUntypedArgument) {\n                const lt = typeOf(lhs);\n                const rt = typeOf(rhs);\n                // check that type is string or number, and equal\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\n            if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n                const lt = typeOf(lhs);\n                const rt = typeOf(rhs);\n                if (lt.kind !== 'string' || rt.kind !== 'string') {\n                    return compareBasic(ctx, lhs, rhs);\n                }\n            }\n\n            return this.collator ?\n                compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) :\n                compareBasic(ctx, lhs, rhs);\n        }\n\n        eachChild(fn: (_: Expression) => void) {\n            fn(this.lhs);\n            fn(this.rhs);\n            if (this.collator) {\n                fn(this.collator);\n            }\n        }\n\n        outputDefined(): boolean {\n            return true;\n        }\n\n        serialize(): SerializedExpression {\n            const serialized = [op];\n            this.eachChild(child => { serialized.push(child.serialize()); });\n            return serialized;\n        }\n    };\n}\n\nexport const Equals: $Call<typeof makeComparison, '==', typeof eq, typeof eqCollate> = makeComparison('==', eq, eqCollate);\nexport const NotEquals: $Call<typeof makeComparison, '!=', typeof neq, typeof neqCollate> = makeComparison('!=', neq, neqCollate);\nexport const LessThan: $Call<typeof makeComparison, '<', typeof lt, typeof ltCollate> = makeComparison('<', lt, ltCollate);\nexport const GreaterThan: $Call<typeof makeComparison, '>', typeof gt, typeof gtCollate> = makeComparison('>', gt, gtCollate);\nexport const LessThanOrEqual: $Call<typeof makeComparison, '<=', typeof lteq, typeof lteqCollate> = makeComparison('<=', lteq, lteqCollate);\nexport const GreaterThanOrEqual: $Call<typeof makeComparison, '>=', typeof gteq, typeof gteqCollate> = makeComparison('>=', gteq, gteqCollate);\n","// @flow\n\nimport {StringType, NumberType} from '../types.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type {Type} from '../types.js';\n\ndeclare var Intl: {\n    NumberFormat: Class<Intl$NumberFormat>\n};\n\ndeclare class Intl$NumberFormat {\n    constructor (\n        locales?: string | string[],\n        options?: NumberFormatOptions\n    ): Intl$NumberFormat;\n\n    static (\n        locales?: string | string[],\n        options?: NumberFormatOptions\n    ): Intl$NumberFormat;\n\n    format(a: number): string;\n\n    resolvedOptions(): any;\n}\n\ntype NumberFormatOptions = {\n    style?: 'decimal' | 'currency' | 'percent';\n    currency?: null | string;\n    minimumFractionDigits?: null | string;\n    maximumFractionDigits?: null | string;\n};\n\nexport default class NumberFormat implements Expression {\n    type: Type;\n    number: Expression;\n    locale: Expression | null;   // BCP 47 language tag\n    currency: Expression | null; // ISO 4217 currency code, required if style=currency\n    minFractionDigits: Expression | null; // Default 0\n    maxFractionDigits: Expression | null; // Default 3\n\n    constructor(number: Expression,\n                locale: Expression | null,\n                currency: Expression | null,\n                minFractionDigits: Expression | null,\n                maxFractionDigits: Expression | null) {\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    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Expression {\n        if (args.length !== 3)\n            return context.error(`Expected two arguments.`);\n\n        const number = context.parse(args[1], 1, NumberType);\n        if (!number) return null;\n\n        const options = (args[2]: any);\n        if (typeof options !== \"object\" || Array.isArray(options))\n            return context.error(`NumberFormat options argument must be an object.`);\n\n        let locale = null;\n        if (options['locale']) {\n            locale = context.parse(options['locale'], 1, StringType);\n            if (!locale) return null;\n        }\n\n        let currency = null;\n        if (options['currency']) {\n            currency = context.parse(options['currency'], 1, StringType);\n            if (!currency) return null;\n        }\n\n        let minFractionDigits = null;\n        if (options['min-fraction-digits']) {\n            minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n            if (!minFractionDigits) return null;\n        }\n\n        let maxFractionDigits = null;\n        if (options['max-fraction-digits']) {\n            maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n            if (!maxFractionDigits) return null;\n        }\n\n        return new NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits);\n    }\n\n    evaluate(ctx: EvaluationContext): string {\n        return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [],\n            {\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    }\n\n    eachChild(fn: (_: Expression) => void) {\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.minFractionDigits);\n        }\n        if (this.maxFractionDigits) {\n            fn(this.maxFractionDigits);\n        }\n    }\n\n    outputDefined(): boolean {\n        return false;\n    }\n\n    serialize(): SerializedExpression {\n        const 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 [\"number-format\", this.number.serialize(), options];\n    }\n}\n","// @flow\n\nimport {NumberType, toString} from '../types.js';\n\nimport {typeOf} from '../values.js';\nimport RuntimeError from '../runtime_error.js';\n\nimport type {Expression, SerializedExpression} from '../expression.js';\nimport type ParsingContext from '../parsing_context.js';\nimport type EvaluationContext from '../evaluation_context.js';\nimport type {Type} from '../types.js';\n\nclass Length implements Expression {\n    type: Type;\n    input: Expression;\n\n    constructor(input: Expression) {\n        this.type = NumberType;\n        this.input = input;\n    }\n\n    static parse(args: $ReadOnlyArray<mixed>, context: ParsingContext): ?Length {\n        if (args.length !== 2)\n            return context.error(`Expected 1 argument, but found ${args.length - 1} instead.`);\n\n        const input = context.parse(args[1], 1);\n        if (!input) 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    }\n\n    evaluate(ctx: EvaluationContext): any | number {\n        const 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    }\n\n    eachChild(fn: (_: Expression) => void) {\n        fn(this.input);\n    }\n\n    outputDefined(): boolean {\n        return false;\n    }\n\n    serialize(): SerializedExpression {\n        const serialized = [\"length\"];\n        this.eachChild(child => { serialized.push(child.serialize()); });\n        return serialized;\n    }\n}\n\nexport default Length;\n","// @flow\n\nimport {\n    type Type,\n    NumberType,\n    StringType,\n    BooleanType,\n    ColorType,\n    ObjectType,\n    ValueType,\n    ErrorType,\n    CollatorType,\n    array,\n    toString as typeToString\n} from '../types.js';\n\nimport {typeOf, Color, validateRGBA, toString as valueToString} from '../values.js';\nimport CompoundExpression from '../compound_expression.js';\nimport RuntimeError from '../runtime_error.js';\nimport Let from './let.js';\nimport Var from './var.js';\nimport Literal from './literal.js';\nimport Assertion from './assertion.js';\nimport Coercion from './coercion.js';\nimport At from './at.js';\nimport In from './in.js';\nimport IndexOf from './index_of.js';\nimport Match from './match.js';\nimport Case from './case.js';\nimport Slice from './slice.js';\nimport Step from './step.js';\nimport Interpolate from './interpolate.js';\nimport Coalesce from './coalesce.js';\nimport {\n    Equals,\n    NotEquals,\n    LessThan,\n    GreaterThan,\n    LessThanOrEqual,\n    GreaterThanOrEqual\n} from './comparison.js';\nimport CollatorExpression from './collator.js';\nimport NumberFormat from './number_format.js';\nimport FormatExpression from './format.js';\nimport ImageExpression from './image.js';\nimport Length from './length.js';\nimport Within from './within.js';\n\nimport type {Varargs} from '../compound_expression.js';\nimport type {ExpressionRegistry} from '../expression.js';\n\nconst expressions: ExpressionRegistry = {\n    // special forms\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};\n\nfunction rgba(ctx, [r, g, b, a]) {\n    r = r.evaluate(ctx);\n    g = g.evaluate(ctx);\n    b = b.evaluate(ctx);\n    const alpha = a ? a.evaluate(ctx) : 1;\n    const error = validateRGBA(r, g, b, alpha);\n    if (error) throw new RuntimeError(error);\n    return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\n\nfunction has(key, obj) {\n    return key in obj;\n}\n\nfunction get(key, obj) {\n    const v = obj[key];\n    return typeof v === 'undefined' ? null : v;\n}\n\nfunction binarySearch(v, a, i, j) {\n    while (i <= j) {\n        const m = (i + j) >> 1;\n        if (a[m] === v)\n            return true;\n        if (a[m] > v)\n            j = m - 1;\n        else\n            i = m + 1;\n    }\n    return false;\n}\n\nfunction varargs(type: Type): Varargs {\n    return {type};\n}\n\nCompoundExpression.register(expressions, {\n    'error': [\n        ErrorType,\n        [StringType],\n        (ctx, [v]) => { throw new RuntimeError(v.evaluate(ctx)); }\n    ],\n    'typeof': [\n        StringType,\n        [ValueType],\n        (ctx, [v]) => typeToString(typeOf(v.evaluate(ctx)))\n    ],\n    'to-rgba': [\n        array(NumberType, 4),\n        [ColorType],\n        (ctx, [v]) => {\n            return v.evaluate(ctx).toArray();\n        }\n    ],\n    'rgb': [\n        ColorType,\n        [NumberType, NumberType, NumberType],\n        rgba\n    ],\n    'rgba': [\n        ColorType,\n        [NumberType, NumberType, NumberType, NumberType],\n        rgba\n    ],\n    'has': {\n        type: BooleanType,\n        overloads: [\n            [\n                [StringType],\n                (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())\n            ], [\n                [StringType, ObjectType],\n                (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))\n            ]\n        ]\n    },\n    'get': {\n        type: ValueType,\n        overloads: [\n            [\n                [StringType],\n                (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())\n            ], [\n                [StringType, ObjectType],\n                (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))\n            ]\n        ]\n    },\n    'feature-state': [\n        ValueType,\n        [StringType],\n        (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})\n    ],\n    'properties': [\n        ObjectType,\n        [],\n        (ctx) => ctx.properties()\n    ],\n    'geometry-type': [\n        StringType,\n        [],\n        (ctx) => ctx.geometryType()\n    ],\n    'id': [\n        ValueType,\n        [],\n        (ctx) => ctx.id()\n    ],\n    'zoom': [\n        NumberType,\n        [],\n        (ctx) => ctx.globals.zoom\n    ],\n    'pitch': [\n        NumberType,\n        [],\n        (ctx) => ctx.globals.pitch || 0\n    ],\n    'distance-from-center': [\n        NumberType,\n        [],\n        (ctx) => ctx.distanceFromCenter()\n    ],\n    'heatmap-density': [\n        NumberType,\n        [],\n        (ctx) => ctx.globals.heatmapDensity || 0\n    ],\n    'line-progress': [\n        NumberType,\n        [],\n        (ctx) => ctx.globals.lineProgress || 0\n    ],\n    'sky-radial-progress': [\n        NumberType,\n        [],\n        (ctx) => ctx.globals.skyRadialProgress || 0\n    ],\n    'accumulated': [\n        ValueType,\n        [],\n        (ctx) => ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated\n    ],\n    '+': [\n        NumberType,\n        varargs(NumberType),\n        (ctx, args) => {\n            let result = 0;\n            for (const arg of args) {\n                result += arg.evaluate(ctx);\n            }\n            return result;\n        }\n    ],\n    '*': [\n        NumberType,\n        varargs(NumberType),\n        (ctx, args) => {\n            let result = 1;\n            for (const arg of args) {\n                result *= arg.evaluate(ctx);\n            }\n            return result;\n        }\n    ],\n    '-': {\n        type: NumberType,\n        overloads: [\n            [\n                [NumberType, NumberType],\n                (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx)\n            ], [\n                [NumberType],\n                (ctx, [a]) => -a.evaluate(ctx)\n            ]\n        ]\n    },\n    '/': [\n        NumberType,\n        [NumberType, NumberType],\n        (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx)\n    ],\n    '%': [\n        NumberType,\n        [NumberType, NumberType],\n        (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx)\n    ],\n    'ln2': [\n        NumberType,\n        [],\n        () => Math.LN2\n    ],\n    'pi': [\n        NumberType,\n        [],\n        () => Math.PI\n    ],\n    'e': [\n        NumberType,\n        [],\n        () => Math.E\n    ],\n    '^': [\n        NumberType,\n        [NumberType, NumberType],\n        (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))\n    ],\n    'sqrt': [\n        NumberType,\n        [NumberType],\n        (ctx, [x]) => Math.sqrt(x.evaluate(ctx))\n    ],\n    'log10': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10\n    ],\n    'ln': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.log(n.evaluate(ctx))\n    ],\n    'log2': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2\n    ],\n    'sin': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.sin(n.evaluate(ctx))\n    ],\n    'cos': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.cos(n.evaluate(ctx))\n    ],\n    'tan': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.tan(n.evaluate(ctx))\n    ],\n    'asin': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.asin(n.evaluate(ctx))\n    ],\n    'acos': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.acos(n.evaluate(ctx))\n    ],\n    'atan': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.atan(n.evaluate(ctx))\n    ],\n    'min': [\n        NumberType,\n        varargs(NumberType),\n        (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))\n    ],\n    'max': [\n        NumberType,\n        varargs(NumberType),\n        (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))\n    ],\n    'abs': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.abs(n.evaluate(ctx))\n    ],\n    'round': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => {\n            const v = n.evaluate(ctx);\n            // Javascript's Math.round() rounds towards +Infinity for halfway\n            // values, even when they're negative. It's more common to round\n            // away from 0 (e.g., this is what python and C++ do)\n            return v < 0 ? -Math.round(-v) : Math.round(v);\n        }\n    ],\n    'floor': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.floor(n.evaluate(ctx))\n    ],\n    'ceil': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.ceil(n.evaluate(ctx))\n    ],\n    'filter-==': [\n        BooleanType,\n        [StringType, ValueType],\n        (ctx, [k, v]) => ctx.properties()[(k: any).value] === (v: any).value\n    ],\n    'filter-id-==': [\n        BooleanType,\n        [ValueType],\n        (ctx, [v]) => ctx.id() === (v: any).value\n    ],\n    'filter-type-==': [\n        BooleanType,\n        [StringType],\n        (ctx, [v]) => ctx.geometryType() === (v: any).value\n    ],\n    'filter-<': [\n        BooleanType,\n        [StringType, ValueType],\n        (ctx, [k, v]) => {\n            const a = ctx.properties()[(k: any).value];\n            const b = (v: any).value;\n            return typeof a === typeof b && a < b;\n        }\n    ],\n    'filter-id-<': [\n        BooleanType,\n        [ValueType],\n        (ctx, [v]) => {\n            const a = ctx.id();\n            const b = (v: any).value;\n            return typeof a === typeof b && a < b;\n        }\n    ],\n    'filter->': [\n        BooleanType,\n        [StringType, ValueType],\n        (ctx, [k, v]) => {\n            const a = ctx.properties()[(k: any).value];\n            const b = (v: any).value;\n            return typeof a === typeof b && a > b;\n        }\n    ],\n    'filter-id->': [\n        BooleanType,\n        [ValueType],\n        (ctx, [v]) => {\n            const a = ctx.id();\n            const b = (v: any).value;\n            return typeof a === typeof b && a > b;\n        }\n    ],\n    'filter-<=': [\n        BooleanType,\n        [StringType, ValueType],\n        (ctx, [k, v]) => {\n            const a = ctx.properties()[(k: any).value];\n            const b = (v: any).value;\n            return typeof a === typeof b && a <= b;\n        }\n    ],\n    'filter-id-<=': [\n        BooleanType,\n        [ValueType],\n        (ctx, [v]) => {\n            const a = ctx.id();\n            const b = (v: any).value;\n            return typeof a === typeof b && a <= b;\n        }\n    ],\n    'filter->=': [\n        BooleanType,\n        [StringType, ValueType],\n        (ctx, [k, v]) => {\n            const a = ctx.properties()[(k: any).value];\n            const b = (v: any).value;\n            return typeof a === typeof b && a >= b;\n        }\n    ],\n    'filter-id->=': [\n        BooleanType,\n        [ValueType],\n        (ctx, [v]) => {\n            const a = ctx.id();\n            const b = (v: any).value;\n            return typeof a === typeof b && a >= b;\n        }\n    ],\n    'filter-has': [\n        BooleanType,\n        [ValueType],\n        (ctx, [k]) => (k: any).value in ctx.properties()\n    ],\n    'filter-has-id': [\n        BooleanType,\n        [],\n        (ctx) => (ctx.id() !== null && ctx.id() !== undefined)\n    ],\n    'filter-type-in': [\n        BooleanType,\n        [array(StringType)],\n        (ctx, [v]) => (v: any).value.indexOf(ctx.geometryType()) >= 0\n    ],\n    'filter-id-in': [\n        BooleanType,\n        [array(ValueType)],\n        (ctx, [v]) => (v: any).value.indexOf(ctx.id()) >= 0\n    ],\n    'filter-in-small': [\n        BooleanType,\n        [StringType, array(ValueType)],\n        // assumes v is an array literal\n        (ctx, [k, v]) => (v: any).value.indexOf(ctx.properties()[(k: any).value]) >= 0\n    ],\n    'filter-in-large': [\n        BooleanType,\n        [StringType, array(ValueType)],\n        // assumes v is a array literal with values sorted in ascending order and of a single type\n        (ctx, [k, v]) => binarySearch(ctx.properties()[(k: any).value], (v: any).value, 0, (v: any).value.length - 1)\n    ],\n    'all': {\n        type: BooleanType,\n        overloads: [\n            [\n                [BooleanType, BooleanType],\n                (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)\n            ],\n            [\n                varargs(BooleanType),\n                (ctx, args) => {\n                    for (const arg of args) {\n                        if (!arg.evaluate(ctx))\n                            return false;\n                    }\n                    return true;\n                }\n            ]\n        ]\n    },\n    'any': {\n        type: BooleanType,\n        overloads: [\n            [\n                [BooleanType, BooleanType],\n                (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)\n            ],\n            [\n                varargs(BooleanType),\n                (ctx, args) => {\n                    for (const arg of args) {\n                        if (arg.evaluate(ctx))\n                            return true;\n                    }\n                    return false;\n                }\n            ]\n        ]\n    },\n    '!': [\n        BooleanType,\n        [BooleanType],\n        (ctx, [b]) => !b.evaluate(ctx)\n    ],\n    'is-supported-script': [\n        BooleanType,\n        [StringType],\n        // At parse time this will always return true, so we need to exclude this expression with isGlobalPropertyConstant\n        (ctx, [s]) => {\n            const 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        (ctx, [s]) => s.evaluate(ctx).toUpperCase()\n    ],\n    'downcase': [\n        StringType,\n        [StringType],\n        (ctx, [s]) => s.evaluate(ctx).toLowerCase()\n    ],\n    'concat': [\n        StringType,\n        varargs(ValueType),\n        (ctx, args) => args.map(arg => valueToString(arg.evaluate(ctx))).join('')\n    ],\n    'resolved-locale': [\n        StringType,\n        [CollatorType],\n        (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()\n    ]\n});\n\nexport default expressions;\n","// @flow\n\n/**\n * A type used for returning and propagating errors. The first element of the union\n * represents success and contains a value, and the second represents an error and\n * contains an error value.\n * @private\n */\nexport type Result<T, E> =\n    | {| result: 'success', value: T |}\n    | {| result: 'error', value: E |};\n\nexport function success<T, E>(value: T): Result<T, E> {\n    return {result: 'success', value};\n}\n\nexport function error<T, E>(value: E): Result<T, E> {\n    return {result: 'error', value};\n}\n","\nimport * as colorSpaces from '../util/color_spaces.js';\nimport Color from '../util/color.js';\nimport extend from '../util/extend.js';\nimport getType from '../util/get_type.js';\nimport * as interpolate from '../util/interpolate.js';\nimport Interpolate from '../expression/definitions/interpolate.js';\nimport Formatted from '../expression/types/formatted.js';\nimport ResolvedImage from '../expression/types/resolved_image.js';\nimport {supportsInterpolation} from '../util/properties.js';\nimport {findStopLessThanOrEqualTo} from '../expression/stops.js';\n\nexport function isFunction(value) {\n    return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction identityFunction(x) {\n    return x;\n}\n\nexport function createFunction(parameters, propertySpec) {\n    const isColor = propertySpec.type === 'color';\n    const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n    const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n    const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n    const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n\n    if (isColor) {\n        parameters = extend({}, parameters);\n\n        if (parameters.stops) {\n            parameters.stops = parameters.stops.map((stop) => {\n                return [stop[0], 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\n    if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) { // eslint-disable-line import/namespace\n        throw new Error(`Unknown color space: ${parameters.colorSpace}`);\n    }\n\n    let innerFun;\n    let hashedStops;\n    let 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\n        // For categorical functions, generate an Object as a hashmap of the stops for fast searching\n        hashedStops = Object.create(null);\n        for (const stop of parameters.stops) {\n            hashedStops[stop[0]] = stop[1];\n        }\n\n        // Infer key type based on first stop key-- used to encforce strict type checking later\n        categoricalKeyType = typeof parameters.stops[0][0];\n\n    } else if (type === 'identity') {\n        innerFun = evaluateIdentityFunction;\n    } else {\n        throw new Error(`Unknown function type \"${type}\"`);\n    }\n\n    if (zoomAndFeatureDependent) {\n        const featureFunctions = {};\n        const zoomStops = [];\n        for (let s = 0; s < parameters.stops.length; s++) {\n            const stop = parameters.stops[s];\n            const zoom = stop[0].zoom;\n            if (featureFunctions[zoom] === undefined) {\n                featureFunctions[zoom] = {\n                    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([stop[0].value, stop[1]]);\n        }\n\n        const featureFunctionStops = [];\n        for (const z of zoomStops) {\n            featureFunctionStops.push([featureFunctions[z].zoom, createFunction(featureFunctions[z], propertySpec)]);\n        }\n\n        const interpolationType = {name: 'linear'};\n        return {\n            kind: 'composite',\n            interpolationType,\n            interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n            zoomStops: featureFunctionStops.map(s => s[0]),\n            evaluate({zoom}, properties) {\n                return evaluateExponentialFunction({\n                    stops: featureFunctionStops,\n                    base: parameters.base\n                }, propertySpec, zoom).evaluate(zoom, properties);\n            }\n        };\n    } else if (zoomDependent) {\n        const interpolationType = type === 'exponential' ?\n            {name: 'exponential', base: parameters.base !== undefined ? parameters.base : 1} : null;\n        return {\n            kind: 'camera',\n            interpolationType,\n            interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n            zoomStops: parameters.stops.map(s => s[0]),\n            evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)\n        };\n    } else {\n        return {\n            kind: 'source',\n            evaluate(_, feature) {\n                const 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}\n\nfunction coalesce(a, b, c) {\n    if (a !== undefined) return a;\n    if (b !== undefined) return b;\n    if (c !== undefined) return c;\n}\n\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n    const evaluated = typeof input === keyType ? hashedStops[input] : undefined; // Enforce strict typing on input\n    return coalesce(evaluated, parameters.default, propertySpec.default);\n}\n\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n    // Edge cases\n    if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n    const n = parameters.stops.length;\n    if (n === 1) return parameters.stops[0][1];\n    if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n    if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n    const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n\n    return parameters.stops[index][1];\n}\n\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n    const base = parameters.base !== undefined ? parameters.base : 1;\n\n    // Edge cases\n    if (getType(input) !== 'number') return coalesce(parameters.default, propertySpec.default);\n    const n = parameters.stops.length;\n    if (n === 1) return parameters.stops[0][1];\n    if (input <= parameters.stops[0][0]) return parameters.stops[0][1];\n    if (input >= parameters.stops[n - 1][0]) return parameters.stops[n - 1][1];\n\n    const index = findStopLessThanOrEqualTo(parameters.stops.map((stop) => stop[0]), input);\n    const t = interpolationFactor(\n        input, base,\n        parameters.stops[index][0],\n        parameters.stops[index + 1][0]);\n\n    const outputLower = parameters.stops[index][1];\n    const outputUpper = parameters.stops[index + 1][1];\n    let interp = interpolate[propertySpec.type] || identityFunction; // eslint-disable-line import/namespace\n\n    if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n        const colorspace = colorSpaces[parameters.colorSpace]; // eslint-disable-line import/namespace\n        interp = (a, b) => colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n    }\n\n    if (typeof outputLower.evaluate === 'function') {\n        return {\n            evaluate(...args) {\n                const evaluatedLower = outputLower.evaluate.apply(undefined, args);\n                const evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n                // Special case for fill-outline-color, which has no spec default.\n                if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n                    return undefined;\n                }\n                return interp(evaluatedLower, evaluatedUpper, t);\n            }\n        };\n    }\n\n    return interp(outputLower, outputUpper, t);\n}\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}\n\n/**\n * Returns a ratio that can be used to interpolate between exponential function\n * stops.\n *\n * How it works:\n * Two consecutive stop values define a (scaled and shifted) exponential\n * function `f(x) = a * base^x + b`, where `base` is the user-specified base,\n * and `a` and `b` are constants affording sufficient degrees of freedom to fit\n * the function to the given stops.\n *\n * Here's a bit of algebra that lets us compute `f(x)` directly from the stop\n * values without explicitly solving for `a` and `b`:\n *\n * First stop value: `f(x0) = y0 = a * base^x0 + b`\n * Second stop value: `f(x1) = y1 = a * base^x1 + b`\n * => `y1 - y0 = a(base^x1 - base^x0)`\n * => `a = (y1 - y0)/(base^x1 - base^x0)`\n *\n * Desired value: `f(x) = y = a * base^x + b`\n * => `f(x) = y0 + a * (base^x - base^x0)`\n *\n * From the above, we can replace the `a` in `a * (base^x - base^x0)` and do a\n * little algebra:\n * ```\n * a * (base^x - base^x0) = (y1 - y0)/(base^x1 - base^x0) * (base^x - base^x0)\n *                     = (y1 - y0) * (base^x - base^x0) / (base^x1 - base^x0)\n * ```\n *\n * If we let `(base^x - base^x0) / (base^x1 base^x0)`, then we have\n * `f(x) = y0 + (y1 - y0) * ratio`.  In other words, `ratio` may be treated as\n * an interpolation factor between the two stops' output values.\n *\n * (Note: a slightly different form for `ratio`,\n * `(base^(x-x0) - 1) / (base^(x1-x0) - 1) `, is equivalent, but requires fewer\n * expensive `Math.pow()` operations.)\n *\n * @private\n */\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n    const difference = upperValue - lowerValue;\n    const progress = input - lowerValue;\n\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","// @flow\n\nimport assert from 'assert';\n\nimport extend from '../util/extend.js';\nimport ParsingError from './parsing_error.js';\nimport ParsingContext from './parsing_context.js';\nimport EvaluationContext from './evaluation_context.js';\nimport CompoundExpression from './compound_expression.js';\nimport Step from './definitions/step.js';\nimport Interpolate from './definitions/interpolate.js';\nimport Coalesce from './definitions/coalesce.js';\nimport Let from './definitions/let.js';\nimport definitions from './definitions/index.js';\nimport * as isConstant from './is_constant.js';\nimport RuntimeError from './runtime_error.js';\nimport {success, error} from '../util/result.js';\nimport {supportsPropertyExpression, supportsZoomExpression, supportsInterpolation} from '../util/properties.js';\n\nimport type {Type, EvaluationKind} from './types.js';\nimport type {Value} from './values.js';\nimport type {Expression} from './expression.js';\nimport type {StylePropertySpecification} from '../style-spec.js';\nimport type {Result} from '../util/result.js';\nimport type {InterpolationType} from './definitions/interpolate.js';\nimport type {PropertyValueSpecification} from '../types.js';\nimport type {FormattedSection} from './types/formatted.js';\nimport type Point from '@mapbox/point-geometry';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type {FeatureDistanceData} from '../feature_filter/index.js';\n\nexport type Feature = {\n    +type: 1 | 2 | 3 | 'Unknown' | 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon',\n    +id?: number | null,\n    +properties: {[_: string]: any},\n    +patterns?: {[_: string]: {\"min\": string, \"mid\": string, \"max\": string}},\n    +geometry?: Array<Array<Point>>\n};\n\nexport type FeatureState = {[_: string]: any};\n\nexport type GlobalProperties = $ReadOnly<{\n    zoom: number,\n    pitch?: number,\n    heatmapDensity?: number,\n    lineProgress?: number,\n    skyRadialProgress?: number,\n    isSupportedScript?: (_: string) => boolean,\n    accumulated?: Value\n}>;\n\nexport class StyleExpression {\n    expression: Expression;\n\n    _evaluator: EvaluationContext;\n    _defaultValue: Value;\n    _warningHistory: {[key: string]: boolean};\n    _enumValues: ?{[_: string]: any};\n\n    constructor(expression: Expression, propertySpec: ?StylePropertySpecification) {\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    }\n\n    evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any {\n        this._evaluator.globals = globals;\n        this._evaluator.feature = feature;\n        this._evaluator.featureState = featureState;\n        this._evaluator.canonical = canonical || null;\n        this._evaluator.availableImages = availableImages || null;\n        this._evaluator.formattedSection = formattedSection;\n        this._evaluator.featureTileCoord = featureTileCoord || null;\n        this._evaluator.featureDistanceData = featureDistanceData || null;\n\n        return this.expression.evaluate(this._evaluator);\n    }\n\n    evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData): any {\n        this._evaluator.globals = globals;\n        this._evaluator.feature = feature || null;\n        this._evaluator.featureState = featureState || null;\n        this._evaluator.canonical = canonical || null;\n        this._evaluator.availableImages = availableImages || null;\n        this._evaluator.formattedSection = formattedSection || null;\n        this._evaluator.featureTileCoord = featureTileCoord || null;\n        this._evaluator.featureDistanceData = featureDistanceData || null;\n\n        try {\n            const val = this.expression.evaluate(this._evaluator);\n            // eslint-disable-next-line no-self-compare\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(v => JSON.stringify(v)).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    }\n}\n\nexport function isExpression(expression: mixed): boolean {\n    return Array.isArray(expression) && expression.length > 0 &&\n        typeof expression[0] === 'string' && expression[0] in definitions;\n}\n\n/**\n * Parse and typecheck the given style spec JSON expression.  If\n * options.defaultValue is provided, then the resulting StyleExpression's\n * `evaluate()` method will handle errors by logging a warning (once per\n * message) and returning the default value.  Otherwise, it will throw\n * evaluation errors.\n *\n * @private\n */\nexport function createExpression(expression: mixed, propertySpec: ?StylePropertySpecification): Result<StyleExpression, Array<ParsingError>> {\n    const parser = new ParsingContext(definitions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n\n    // For string-valued properties, coerce to string at the top level rather than asserting.\n    const parsed = parser.parse(expression, undefined, undefined, undefined,\n        propertySpec && propertySpec.type === 'string' ? {typeAnnotation: 'coerce'} : undefined);\n\n    if (!parsed) {\n        assert(parser.errors.length > 0);\n        return error(parser.errors);\n    }\n\n    return success(new StyleExpression(parsed, propertySpec));\n}\n\nexport class ZoomConstantExpression<Kind: EvaluationKind> {\n    kind: Kind;\n    isStateDependent: boolean;\n    _styleExpression: StyleExpression;\n\n    constructor(kind: Kind, expression: StyleExpression) {\n        this.kind = kind;\n        this._styleExpression = expression;\n        this.isStateDependent = kind !== ('constant': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n    }\n\n    evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any {\n        return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n    }\n\n    evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any {\n        return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n    }\n}\n\nexport class ZoomDependentExpression<Kind: EvaluationKind> {\n    kind: Kind;\n    zoomStops: Array<number>;\n    isStateDependent: boolean;\n\n    _styleExpression: StyleExpression;\n    interpolationType: ?InterpolationType;\n\n    constructor(kind: Kind, expression: StyleExpression, zoomStops: Array<number>, interpolationType?: InterpolationType) {\n        this.kind = kind;\n        this.zoomStops = zoomStops;\n        this._styleExpression = expression;\n        this.isStateDependent = kind !== ('camera': EvaluationKind) && !isConstant.isStateConstant(expression.expression);\n        this.interpolationType = interpolationType;\n    }\n\n    evaluateWithoutErrorHandling(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any {\n        return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n    }\n\n    evaluate(globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection): any {\n        return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n    }\n\n    interpolationFactor(input: number, lower: number, upper: number): number {\n        if (this.interpolationType) {\n            return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n        } else {\n            return 0;\n        }\n    }\n}\n\nexport type ConstantExpression = {\n    kind: 'constant',\n    +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>) => any,\n}\n\nexport type SourceExpression = {\n    kind: 'source',\n    isStateDependent: boolean,\n    +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection) => any,\n};\n\nexport type CameraExpression = {\n    kind: 'camera',\n    +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>) => any,\n    +interpolationFactor: (input: number, lower: number, upper: number) => number,\n    zoomStops: Array<number>,\n    interpolationType: ?InterpolationType\n};\n\nexport type CompositeExpression = {\n    kind: 'composite',\n    isStateDependent: boolean,\n    +evaluate: (globals: GlobalProperties, feature?: Feature, featureState?: FeatureState, canonical?: CanonicalTileID, availableImages?: Array<string>, formattedSection?: FormattedSection) => any,\n    +interpolationFactor: (input: number, lower: number, upper: number) => number,\n    zoomStops: Array<number>,\n    interpolationType: ?InterpolationType\n};\n\nexport type StylePropertyExpression =\n    | ConstantExpression\n    | SourceExpression\n    | CameraExpression\n    | CompositeExpression;\n\nexport function createPropertyExpression(expression: mixed, propertySpec: StylePropertySpecification): Result<StylePropertyExpression, Array<ParsingError>> {\n    expression = createExpression(expression, propertySpec);\n    if (expression.result === 'error') {\n        return expression;\n    }\n\n    const parsed = expression.value.expression;\n\n    const isFeatureConstant = isConstant.isFeatureConstant(parsed);\n    if (!isFeatureConstant && !supportsPropertyExpression(propertySpec)) {\n        return error([new ParsingError('', 'data expressions not supported')]);\n    }\n\n    const isZoomConstant = isConstant.isGlobalPropertyConstant(parsed, ['zoom', 'pitch', 'distance-from-center']);\n    if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n        return error([new ParsingError('', 'zoom expressions not supported')]);\n    }\n\n    const 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 (zoomCurve 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\n    if (!zoomCurve) {\n        return success(isFeatureConstant ?\n            (new ZoomConstantExpression('constant', expression.value): ConstantExpression) :\n            (new ZoomConstantExpression('source', expression.value): SourceExpression));\n    }\n\n    const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n\n    return success(isFeatureConstant ?\n        (new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType): CameraExpression) :\n        (new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType): CompositeExpression));\n}\n\nimport {isFunction, createFunction} from '../function/index.js';\nimport {Color} from './values.js';\n\n// serialization wrapper for old-style stop functions normalized to the\n// expression interface\nexport class StylePropertyFunction<T> {\n    _parameters: PropertyValueSpecification<T>;\n    _specification: StylePropertySpecification;\n\n    kind: EvaluationKind;\n    evaluate: (globals: GlobalProperties, feature?: Feature) => any;\n    interpolationFactor: ?(input: number, lower: number, upper: number) => number;\n    zoomStops: ?Array<number>;\n\n    constructor(parameters: PropertyValueSpecification<T>, specification: StylePropertySpecification) {\n        this._parameters = parameters;\n        this._specification = specification;\n        extend(this, createFunction(this._parameters, this._specification));\n    }\n\n    static deserialize(serialized: {_parameters: PropertyValueSpecification<T>, _specification: StylePropertySpecification}): StylePropertyFunction<T> {\n        return new StylePropertyFunction(serialized._parameters, serialized._specification);\n    }\n\n    static serialize(input: StylePropertyFunction<T>): {_parameters: PropertyValueSpecification<T>, _specification: StylePropertySpecification} {\n        return {\n            _parameters: input._parameters,\n            _specification: input._specification\n        };\n    }\n}\n\nexport function normalizePropertyExpression<T>(value: PropertyValueSpecification<T>, specification: StylePropertySpecification): StylePropertyExpression {\n    if (isFunction(value)) {\n        return (new StylePropertyFunction(value, specification): any);\n\n    } else if (isExpression(value)) {\n        const expression = createPropertyExpression(value, specification);\n        if (expression.result === 'error') {\n            // this should have been caught in validation\n            throw new Error(expression.value.map(err => `${err.key}: ${err.message}`).join(', '));\n        }\n        return expression.value;\n\n    } else {\n        let constant: any = value;\n        if (typeof value === 'string' && specification.type === 'color') {\n            constant = Color.parse(value);\n        }\n        return {\n            kind: 'constant',\n            evaluate: () => constant\n        };\n    }\n}\n\n// Zoom-dependent expressions may only use [\"zoom\"] as the input to a top-level \"step\" or \"interpolate\"\n// expression (collectively referred to as a \"curve\"). The curve may be wrapped in one or more \"let\" or\n// \"coalesce\" expressions.\nfunction findZoomCurve(expression: Expression): Step | Interpolate | ParsingError | null {\n    let result = null;\n    if (expression instanceof Let) {\n        result = findZoomCurve(expression.result);\n\n    } else if (expression instanceof Coalesce) {\n        for (const arg of expression.args) {\n            result = findZoomCurve(arg);\n            if (result) {\n                break;\n            }\n        }\n\n    } else if ((expression instanceof Step || expression instanceof Interpolate) &&\n        expression.input instanceof CompoundExpression &&\n        expression.input.name === 'zoom') {\n\n        result = expression;\n    }\n\n    if (result instanceof ParsingError) {\n        return result;\n    }\n\n    expression.eachChild((child) => {\n        const 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\n    return result;\n}\n\nimport {ColorType, StringType, NumberType, BooleanType, ValueType, FormattedType, ResolvedImageType, array} from './types.js';\n\nfunction getExpectedType(spec: StylePropertySpecification): Type {\n    const types = {\n        color: ColorType,\n        string: StringType,\n        number: NumberType,\n        enum: StringType,\n        boolean: BooleanType,\n        formatted: FormattedType,\n        resolvedImage: ResolvedImageType\n    };\n\n    if (spec.type === 'array') {\n        return array(types[spec.value] || ValueType, spec.length);\n    }\n\n    return types[spec.type];\n}\n\nfunction getDefaultValue(spec: StylePropertySpecification): Value {\n    if (spec.type === 'color' && isFunction(spec.default)) {\n        // Special case for heatmap-color: it uses the 'default:' to define a\n        // default color ramp, but createExpression expects a simple value to fall\n        // back to in case of runtime errors\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","// @flow\n\nimport type {StylePropertySpecification} from '../style-spec.js';\n\nexport function supportsPropertyExpression(spec: StylePropertySpecification): boolean {\n    return spec['property-type'] === 'data-driven' || spec['property-type'] === 'cross-faded-data-driven';\n}\n\nexport function supportsZoomExpression(spec: StylePropertySpecification): boolean {\n    return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\n\nexport function supportsInterpolation(spec: StylePropertySpecification): boolean {\n    return !!spec.expression && spec.expression.interpolated;\n}\n","// @flow\n\n// Turn jsonlint-lines-primitives objects into primitive objects\nexport function unbundle(value: mixed): mixed {\n    if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n        return value.valueOf();\n    } else {\n        return value;\n    }\n}\n\nexport function deepUnbundle(value: mixed): mixed {\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        const unbundledValue: { [key: string]: mixed } = {};\n        for (const key in value) {\n            unbundledValue[key] = deepUnbundle(value[key]);\n        }\n        return unbundledValue;\n    }\n\n    return unbundle(value);\n}\n","{\n  \"$version\": 8,\n  \"$root\": {\n    \"version\": {\n      \"required\": true,\n      \"type\": \"enum\",\n      \"values\": [\n        8\n      ],\n      \"doc\": \"Style specification version number. Must be 8.\",\n      \"example\": 8\n    },\n    \"name\": {\n      \"type\": \"string\",\n      \"doc\": \"A human-readable name for the style.\",\n      \"example\": \"Bright\"\n    },\n    \"metadata\": {\n      \"type\": \"*\",\n      \"doc\": \"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n    },\n    \"center\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"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).\",\n      \"example\": [\n        -73.9749,\n        40.7736\n      ]\n    },\n    \"zoom\": {\n      \"type\": \"number\",\n      \"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).\",\n      \"example\": 12.5\n    },\n    \"bearing\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"period\": 360,\n      \"units\": \"degrees\",\n      \"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).\",\n      \"example\": 29\n    },\n    \"pitch\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"units\": \"degrees\",\n      \"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).\",\n      \"example\": 50\n    },\n    \"light\": {\n      \"type\": \"light\",\n      \"doc\": \"The global light source.\",\n      \"example\": {\n        \"anchor\": \"viewport\",\n        \"color\": \"white\",\n        \"intensity\": 0.4\n      }\n    },\n    \"terrain\": {\n      \"type\": \"terrain\",\n      \"doc\": \"A global modifier that elevates layers and markers based on a DEM data source.\"\n    },\n    \"fog\": {\n      \"type\": \"fog\",\n      \"doc\": \"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features.\"\n    },\n    \"sources\": {\n      \"required\": true,\n      \"type\": \"sources\",\n      \"doc\": \"Data source specifications.\",\n      \"example\": {\n        \"mapbox-streets\": {\n          \"type\": \"vector\",\n          \"url\": \"mapbox://mapbox.mapbox-streets-v6\"\n        }\n      }\n    },\n    \"sprite\": {\n      \"type\": \"string\",\n      \"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).\",\n      \"example\": \"mapbox://sprites/mapbox/bright-v8\"\n    },\n    \"glyphs\": {\n      \"type\": \"string\",\n      \"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).\",\n      \"example\": \"mapbox://fonts/mapbox/{fontstack}/{range}.pbf\"\n    },\n    \"transition\": {\n      \"type\": \"transition\",\n      \"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.\",\n      \"example\": {\n        \"duration\": 300,\n        \"delay\": 0\n      }\n    },\n    \"projection\": {\n      \"type\": \"projection\",\n      \"doc\": \"The projection the map should be rendered in. Supported projections are Albers, Equal Earth, Equirectangular (WGS84), Lambert conformal conic, Mercator, Natural Earth, and Winkel Tripel. Terrain, fog, sky and CustomLayerInterface are not supported for projections other than mercator.\",\n      \"example\": {\n        \"name\": \"albers\",\n        \"center\": [-154, 50],\n        \"parallels\": [55, 65]\n      }\n    },\n    \"layers\": {\n      \"required\": true,\n      \"type\": \"array\",\n      \"value\": \"layer\",\n      \"doc\": \"Layers will be drawn in the order of this array.\",\n      \"example\": [\n        {\n          \"id\": \"water\",\n          \"source\": \"mapbox-streets\",\n          \"source-layer\": \"water\",\n          \"type\": \"fill\",\n          \"paint\": {\n            \"fill-color\": \"#00ffff\"\n          }\n        }\n      ]\n    }\n  },\n  \"sources\": {\n    \"*\": {\n      \"type\": \"source\",\n      \"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.\"\n    }\n  },\n  \"source\": [\n    \"source_vector\",\n    \"source_raster\",\n    \"source_raster_dem\",\n    \"source_geojson\",\n    \"source_video\",\n    \"source_image\"\n  ],\n  \"source_vector\": {\n    \"type\": {\n      \"required\": true,\n      \"type\": \"enum\",\n      \"values\": {\n        \"vector\": {\n          \"doc\": \"A vector tile source.\"\n        }\n      },\n      \"doc\": \"The type of the source.\"\n    },\n    \"url\": {\n      \"type\": \"string\",\n      \"doc\": \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n    },\n    \"tiles\": {\n      \"type\": \"array\",\n      \"value\": \"string\",\n      \"doc\": \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n    },\n    \"bounds\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 4,\n      \"default\": [\n        -180,\n        -85.051129,\n        180,\n        85.051129\n      ],\n      \"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.\"\n    },\n    \"scheme\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"xyz\": {\n          \"doc\": \"Slippy map tilenames scheme.\"\n        },\n        \"tms\": {\n          \"doc\": \"OSGeo spec scheme.\"\n        }\n      },\n      \"default\": \"xyz\",\n      \"doc\": \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n    },\n    \"minzoom\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"doc\": \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n    },\n    \"maxzoom\": {\n      \"type\": \"number\",\n      \"default\": 22,\n      \"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.\"\n    },\n    \"attribution\": {\n      \"type\": \"string\",\n      \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n    },\n    \"promoteId\": {\n      \"type\": \"promoteId\",\n      \"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.\"\n    },\n    \"volatile\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"A setting to determine whether a source's tiles are cached locally.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"android\": \"9.3.0\",\n          \"ios\": \"5.10.0\"\n        }\n      }\n    },\n    \"*\": {\n      \"type\": \"*\",\n      \"doc\": \"Other keys to configure the data source.\"\n    }\n  },\n  \"source_raster\": {\n    \"type\": {\n      \"required\": true,\n      \"type\": \"enum\",\n      \"values\": {\n        \"raster\": {\n          \"doc\": \"A raster tile source.\"\n        }\n      },\n      \"doc\": \"The type of the source.\"\n    },\n    \"url\": {\n      \"type\": \"string\",\n      \"doc\": \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n    },\n    \"tiles\": {\n      \"type\": \"array\",\n      \"value\": \"string\",\n      \"doc\": \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n    },\n    \"bounds\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 4,\n      \"default\": [\n        -180,\n        -85.051129,\n        180,\n        85.051129\n      ],\n      \"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.\"\n    },\n    \"minzoom\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"doc\": \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n    },\n    \"maxzoom\": {\n      \"type\": \"number\",\n      \"default\": 22,\n      \"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.\"\n    },\n    \"tileSize\": {\n      \"type\": \"number\",\n      \"default\": 512,\n      \"units\": \"pixels\",\n      \"doc\": \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n    },\n    \"scheme\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"xyz\": {\n          \"doc\": \"Slippy map tilenames scheme.\"\n        },\n        \"tms\": {\n          \"doc\": \"OSGeo spec scheme.\"\n        }\n      },\n      \"default\": \"xyz\",\n      \"doc\": \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n    },\n    \"attribution\": {\n      \"type\": \"string\",\n      \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n    },\n    \"volatile\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"A setting to determine whether a source's tiles are cached locally.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"android\": \"9.3.0\",\n          \"ios\": \"5.10.0\"\n        }\n      }\n    },\n    \"*\": {\n      \"type\": \"*\",\n      \"doc\": \"Other keys to configure the data source.\"\n    }\n  },\n  \"source_raster_dem\": {\n    \"type\": {\n      \"required\": true,\n      \"type\": \"enum\",\n      \"values\": {\n        \"raster-dem\": {\n          \"doc\": \"A RGB-encoded raster DEM source\"\n        }\n      },\n      \"doc\": \"The type of the source.\"\n    },\n    \"url\": {\n      \"type\": \"string\",\n      \"doc\": \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n    },\n    \"tiles\": {\n      \"type\": \"array\",\n      \"value\": \"string\",\n      \"doc\": \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n    },\n    \"bounds\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 4,\n      \"default\": [\n        -180,\n        -85.051129,\n        180,\n        85.051129\n      ],\n      \"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.\"\n    },\n    \"minzoom\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"doc\": \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n    },\n    \"maxzoom\": {\n      \"type\": \"number\",\n      \"default\": 22,\n      \"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.\"\n    },\n    \"tileSize\": {\n      \"type\": \"number\",\n      \"default\": 512,\n      \"units\": \"pixels\",\n      \"doc\": \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n    },\n    \"attribution\": {\n      \"type\": \"string\",\n      \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n    },\n    \"encoding\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"terrarium\": {\n          \"doc\": \"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.\"\n        },\n        \"mapbox\": {\n          \"doc\": \"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.\"\n        }\n      },\n      \"default\": \"mapbox\",\n      \"doc\": \"The encoding used by this source. Mapbox Terrain RGB is used by default\"\n    },\n    \"volatile\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"A setting to determine whether a source's tiles are cached locally.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"android\": \"9.3.0\",\n          \"ios\": \"5.10.0\"\n        }\n      }\n    },\n    \"*\": {\n      \"type\": \"*\",\n      \"doc\": \"Other keys to configure the data source.\"\n    }\n  },\n  \"source_geojson\": {\n    \"type\": {\n      \"required\": true,\n      \"type\": \"enum\",\n      \"values\": {\n        \"geojson\": {\n          \"doc\": \"A GeoJSON data source.\"\n        }\n      },\n      \"doc\": \"The data type of the GeoJSON source.\"\n    },\n    \"data\": {\n      \"type\": \"*\",\n      \"doc\": \"A URL to a GeoJSON file, or inline GeoJSON.\"\n    },\n    \"maxzoom\": {\n      \"type\": \"number\",\n      \"default\": 18,\n      \"doc\": \"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).\"\n    },\n    \"attribution\": {\n      \"type\": \"string\",\n      \"doc\": \"Contains an attribution to be displayed when the map is shown to a user.\"\n    },\n    \"buffer\": {\n      \"type\": \"number\",\n      \"default\": 128,\n      \"maximum\": 512,\n      \"minimum\": 0,\n      \"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.\"\n    },\n    \"filter\": {\n      \"type\": \"*\",\n      \"doc\": \"An expression for filtering features prior to processing them for rendering.\"\n    },\n    \"tolerance\": {\n      \"type\": \"number\",\n      \"default\": 0.375,\n      \"doc\": \"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).\"\n    },\n    \"cluster\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"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\"\n    },\n    \"clusterRadius\": {\n      \"type\": \"number\",\n      \"default\": 50,\n      \"minimum\": 0,\n      \"doc\": \"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.\"\n    },\n    \"clusterMaxZoom\": {\n      \"type\": \"number\",\n      \"doc\": \"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). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15.\"\n    },\n    \"clusterMinPoints\": {\n      \"type\": \"number\",\n      \"doc\": \"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`.\"\n    },\n    \"clusterProperties\": {\n      \"type\": \"*\",\n      \"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\\\"]]}`\"\n    },\n    \"lineMetrics\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values.\"\n    },\n    \"generateId\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"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    },\n    \"promoteId\": {\n      \"type\": \"promoteId\",\n      \"doc\": \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`.\"\n    }\n  },\n  \"source_video\": {\n    \"type\": {\n      \"required\": true,\n      \"type\": \"enum\",\n      \"values\": {\n        \"video\": {\n          \"doc\": \"A video data source.\"\n        }\n      },\n      \"doc\": \"The data type of the video source.\"\n    },\n    \"urls\": {\n      \"required\": true,\n      \"type\": \"array\",\n      \"value\": \"string\",\n      \"doc\": \"URLs to video content in order of preferred format.\"\n    },\n    \"coordinates\": {\n      \"required\": true,\n      \"doc\": \"Corners of video specified in longitude, latitude pairs.\",\n      \"type\": \"array\",\n      \"length\": 4,\n      \"value\": {\n        \"type\": \"array\",\n        \"length\": 2,\n        \"value\": \"number\",\n        \"doc\": \"A single longitude, latitude pair.\"\n      }\n    }\n  },\n  \"source_image\": {\n    \"type\": {\n      \"required\": true,\n      \"type\": \"enum\",\n      \"values\": {\n        \"image\": {\n          \"doc\": \"An image data source.\"\n        }\n      },\n      \"doc\": \"The data type of the image source.\"\n    },\n    \"url\": {\n      \"required\": true,\n      \"type\": \"string\",\n      \"doc\": \"URL that points to an image.\"\n    },\n    \"coordinates\": {\n      \"required\": true,\n      \"doc\": \"Corners of image specified in longitude, latitude pairs.\",\n      \"type\": \"array\",\n      \"length\": 4,\n      \"value\": {\n        \"type\": \"array\",\n        \"length\": 2,\n        \"value\": \"number\",\n        \"doc\": \"A single longitude, latitude pair.\"\n      }\n    }\n  },\n  \"layer\": {\n    \"id\": {\n      \"type\": \"string\",\n      \"doc\": \"Unique layer name.\",\n      \"required\": true\n    },\n    \"type\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"fill\": {\n          \"doc\": \"A filled polygon with an optional stroked border.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"0.10.0\",\n              \"android\": \"2.0.1\",\n              \"ios\": \"2.0.0\",\n              \"macos\": \"0.1.0\"\n            }\n          }\n        },\n        \"line\": {\n          \"doc\": \"A stroked line.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"0.10.0\",\n              \"android\": \"2.0.1\",\n              \"ios\": \"2.0.0\",\n              \"macos\": \"0.1.0\"\n            }\n          }\n        },\n        \"symbol\": {\n          \"doc\": \"An icon or a text label.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"0.10.0\",\n              \"android\": \"2.0.1\",\n              \"ios\": \"2.0.0\",\n              \"macos\": \"0.1.0\"\n            }\n          }\n        },\n        \"circle\": {\n          \"doc\": \"A filled circle.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"0.10.0\",\n              \"android\": \"2.0.1\",\n              \"ios\": \"2.0.0\",\n              \"macos\": \"0.1.0\"\n            }\n          }\n        },\n        \"heatmap\": {\n          \"doc\": \"A heatmap.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"0.41.0\",\n              \"android\": \"6.0.0\",\n              \"ios\": \"4.0.0\",\n              \"macos\": \"0.7.0\"\n            }\n          }\n        },\n        \"fill-extrusion\": {\n          \"doc\": \"An extruded (3D) polygon.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"0.27.0\",\n              \"android\": \"5.1.0\",\n              \"ios\": \"3.6.0\",\n              \"macos\": \"0.5.0\"\n            }\n          }\n        },\n        \"raster\": {\n          \"doc\": \"Raster map textures such as satellite imagery.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"0.10.0\",\n              \"android\": \"2.0.1\",\n              \"ios\": \"2.0.0\",\n              \"macos\": \"0.1.0\"\n            }\n          }\n        },\n        \"hillshade\": {\n          \"doc\": \"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"0.43.0\",\n              \"android\": \"6.0.0\",\n              \"ios\": \"4.0.0\",\n              \"macos\": \"0.7.0\"\n            }\n          }\n        },\n        \"background\": {\n          \"doc\": \"The background color or pattern of the map.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"0.10.0\",\n              \"android\": \"2.0.1\",\n              \"ios\": \"2.0.0\",\n              \"macos\": \"0.1.0\"\n            }\n          }\n        },\n        \"sky\": {\n          \"doc\": \"A spherical dome around the map that is always rendered behind all other layers.\",\n          \"sdk-support\": {\n            \"basic functionality\": {\n              \"js\": \"2.0.0\",\n              \"ios\": \"10.0.0\",\n              \"android\": \"10.0.0\"\n            }\n          }\n        }\n      },\n      \"doc\": \"Rendering type of this layer.\",\n      \"required\": true\n    },\n    \"metadata\": {\n      \"type\": \"*\",\n      \"doc\": \"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n    },\n    \"source\": {\n      \"type\": \"string\",\n      \"doc\": \"Name of a source description to be used for this layer. Required for all layer types except `background`.\"\n    },\n    \"source-layer\": {\n      \"type\": \"string\",\n      \"doc\": \"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.\"\n    },\n    \"minzoom\": {\n      \"type\": \"number\",\n      \"minimum\": 0,\n      \"maximum\": 24,\n      \"doc\": \"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.\"\n    },\n    \"maxzoom\": {\n      \"type\": \"number\",\n      \"minimum\": 0,\n      \"maximum\": 24,\n      \"doc\": \"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.\"\n    },\n    \"filter\": {\n      \"type\": \"filter\",\n      \"doc\": \"An 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.  The `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions are supported only for filter expressions on the symbol layer.\"\n    },\n    \"layout\": {\n      \"type\": \"layout\",\n      \"doc\": \"Layout properties for the layer.\"\n    },\n    \"paint\": {\n      \"type\": \"paint\",\n      \"doc\": \"Default paint properties for this layer.\"\n    }\n  },\n  \"layout\": [\n    \"layout_fill\",\n    \"layout_line\",\n    \"layout_circle\",\n    \"layout_heatmap\",\n    \"layout_fill-extrusion\",\n    \"layout_symbol\",\n    \"layout_raster\",\n    \"layout_hillshade\",\n    \"layout_background\",\n    \"layout_sky\"\n  ],\n  \"layout_background\": {\n    \"visibility\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"visible\": {\n          \"doc\": \"The layer is shown.\"\n        },\n        \"none\": {\n          \"doc\": \"The layer is not shown.\"\n        }\n      },\n      \"default\": \"visible\",\n      \"doc\": \"Whether this layer is displayed.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"property-type\": \"constant\"\n    }\n  },\n  \"layout_sky\": {\n    \"visibility\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"visible\": {\n          \"doc\": \"The layer is shown.\"\n        },\n        \"none\": {\n          \"doc\": \"The layer is not shown.\"\n        }\n      },\n      \"default\": \"visible\",\n      \"doc\": \"Whether this layer is displayed.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      },\n      \"property-type\": \"constant\"\n    }\n  },\n  \"layout_fill\": {\n    \"fill-sort-key\": {\n      \"type\": \"number\",\n      \"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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"1.2.0\",\n          \"android\": \"9.1.0\",\n          \"ios\": \"5.8.0\",\n          \"macos\": \"0.15.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"1.2.0\",\n          \"android\": \"9.1.0\",\n          \"ios\": \"5.8.0\",\n          \"macos\": \"0.15.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"visibility\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"visible\": {\n          \"doc\": \"The layer is shown.\"\n        },\n        \"none\": {\n          \"doc\": \"The layer is not shown.\"\n        }\n      },\n      \"default\": \"visible\",\n      \"doc\": \"Whether this layer is displayed.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"property-type\": \"constant\"\n    }\n  },\n  \"layout_circle\": {\n    \"circle-sort-key\": {\n      \"type\": \"number\",\n      \"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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"1.2.0\",\n          \"android\": \"9.2.0\",\n          \"ios\": \"5.9.0\",\n          \"macos\": \"0.16.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"1.2.0\",\n          \"android\": \"9.2.0\",\n          \"ios\": \"5.9.0\",\n          \"macos\": \"0.16.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"visibility\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"visible\": {\n          \"doc\": \"The layer is shown.\"\n        },\n        \"none\": {\n          \"doc\": \"The layer is not shown.\"\n        }\n      },\n      \"default\": \"visible\",\n      \"doc\": \"Whether this layer is displayed.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"property-type\": \"constant\"\n    }\n  },\n  \"layout_heatmap\": {\n    \"visibility\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"visible\": {\n          \"doc\": \"The layer is shown.\"\n        },\n        \"none\": {\n          \"doc\": \"The layer is not shown.\"\n        }\n      },\n      \"default\": \"visible\",\n      \"doc\": \"Whether this layer is displayed.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.41.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"property-type\": \"constant\"\n    }\n  },\n  \"layout_fill-extrusion\": {\n    \"visibility\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"visible\": {\n          \"doc\": \"The layer is shown.\"\n        },\n        \"none\": {\n          \"doc\": \"The layer is not shown.\"\n        }\n      },\n      \"default\": \"visible\",\n      \"doc\": \"Whether this layer is displayed.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"property-type\": \"constant\"\n    }\n  },\n  \"layout_line\": {\n    \"line-cap\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"butt\": {\n          \"doc\": \"A cap with a squared-off end which is drawn to the exact endpoint of the line.\"\n        },\n        \"round\": {\n          \"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.\"\n        },\n        \"square\": {\n          \"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.\"\n        }\n      },\n      \"default\": \"butt\",\n      \"doc\": \"The display of line endings.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"2.3.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"line-join\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"bevel\": {\n          \"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.\"\n        },\n        \"round\": {\n          \"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.\"\n        },\n        \"miter\": {\n          \"doc\": \"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.\"\n        }\n      },\n      \"default\": \"miter\",\n      \"doc\": \"The display of lines when joining.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.40.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\",\n          \"macos\": \"0.6.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"line-miter-limit\": {\n      \"type\": \"number\",\n      \"default\": 2,\n      \"doc\": \"Used to automatically convert miter joins to bevel joins for sharp angles.\",\n      \"requires\": [\n        {\n          \"line-join\": \"miter\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"line-round-limit\": {\n      \"type\": \"number\",\n      \"default\": 1.05,\n      \"doc\": \"Used to automatically convert round joins to miter joins for shallow angles.\",\n      \"requires\": [\n        {\n          \"line-join\": \"round\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"line-sort-key\": {\n      \"type\": \"number\",\n      \"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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"1.2.0\",\n          \"android\": \"9.1.0\",\n          \"ios\": \"5.8.0\",\n          \"macos\": \"0.15.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"1.2.0\",\n          \"android\": \"9.1.0\",\n          \"ios\": \"5.8.0\",\n          \"macos\": \"0.15.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"visibility\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"visible\": {\n          \"doc\": \"The layer is shown.\"\n        },\n        \"none\": {\n          \"doc\": \"The layer is not shown.\"\n        }\n      },\n      \"default\": \"visible\",\n      \"doc\": \"Whether this layer is displayed.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"property-type\": \"constant\"\n    }\n  },\n  \"layout_symbol\": {\n    \"symbol-placement\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"point\": {\n          \"doc\": \"The label is placed at the point where the geometry is located.\"\n        },\n        \"line\": {\n          \"doc\": \"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.\"\n        },\n        \"line-center\": {\n          \"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.\"\n        }\n      },\n      \"default\": \"point\",\n      \"doc\": \"Label placement relative to its geometry.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"`line-center` value\": {\n          \"js\": \"0.47.0\",\n          \"android\": \"6.4.0\",\n          \"ios\": \"4.3.0\",\n          \"macos\": \"0.10.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"symbol-spacing\": {\n      \"type\": \"number\",\n      \"default\": 250,\n      \"minimum\": 1,\n      \"units\": \"pixels\",\n      \"doc\": \"Distance between two symbol anchors.\",\n      \"requires\": [\n        {\n          \"symbol-placement\": \"line\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"symbol-avoid-edges\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"symbol-sort-key\": {\n      \"type\": \"number\",\n      \"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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.53.0\",\n          \"android\": \"7.4.0\",\n          \"ios\": \"4.11.0\",\n          \"macos\": \"0.14.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.53.0\",\n          \"android\": \"7.4.0\",\n          \"ios\": \"4.11.0\",\n          \"macos\": \"0.14.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"symbol-z-order\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"auto\": {\n          \"doc\": \"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        },\n        \"viewport-y\": {\n          \"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`.\"\n        },\n        \"source\": {\n          \"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.\"\n        }\n      },\n      \"default\": \"auto\",\n      \"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`.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.49.0\",\n          \"android\": \"6.6.0\",\n          \"ios\": \"4.5.0\",\n          \"macos\": \"0.12.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-allow-overlap\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"If true, the icon will be visible even if it collides with other previously drawn symbols.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-ignore-placement\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"If true, other symbols can be visible even if they collide with the icon.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-optional\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.\",\n      \"requires\": [\n        \"icon-image\",\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-rotation-alignment\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"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.\"\n        },\n        \"viewport\": {\n          \"doc\": \"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n        },\n        \"auto\": {\n          \"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`.\"\n        }\n      },\n      \"default\": \"auto\",\n      \"doc\": \"In combination with `symbol-placement`, determines the rotation behavior of icons.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"`auto` value\": {\n          \"js\": \"0.25.0\",\n          \"android\": \"4.2.0\",\n          \"ios\": \"3.4.0\",\n          \"macos\": \"0.3.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-size\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"units\": \"factor of the original icon size\",\n      \"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.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.35.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"icon-text-fit\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"none\": {\n          \"doc\": \"The icon is displayed at its intrinsic aspect ratio.\"\n        },\n        \"width\": {\n          \"doc\": \"The icon is scaled in the x-dimension to fit the width of the text.\"\n        },\n        \"height\": {\n          \"doc\": \"The icon is scaled in the y-dimension to fit the height of the text.\"\n        },\n        \"both\": {\n          \"doc\": \"The icon is scaled in both x- and y-dimensions.\"\n        }\n      },\n      \"default\": \"none\",\n      \"doc\": \"Scales the icon to fit around the associated text.\",\n      \"requires\": [\n        \"icon-image\",\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.21.0\",\n          \"android\": \"4.2.0\",\n          \"ios\": \"3.4.0\",\n          \"macos\": \"0.2.1\"\n        },\n        \"stretchable icons\": {\n          \"js\": \"1.6.0\",\n          \"android\": \"9.2.0\",\n          \"ios\": \"5.8.0\",\n          \"macos\": \"0.15.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-text-fit-padding\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 4,\n      \"default\": [\n        0,\n        0,\n        0,\n        0\n      ],\n      \"units\": \"pixels\",\n      \"doc\": \"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.\",\n      \"requires\": [\n        \"icon-image\",\n        \"text-field\",\n        {\n          \"icon-text-fit\": [\n            \"both\",\n            \"width\",\n            \"height\"\n          ]\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.21.0\",\n          \"android\": \"4.2.0\",\n          \"ios\": \"3.4.0\",\n          \"macos\": \"0.2.1\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-image\": {\n      \"type\": \"resolvedImage\",\n      \"doc\": \"Name of image in sprite to use for drawing an image background.\",\n      \"tokens\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.35.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"icon-rotate\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"period\": 360,\n      \"units\": \"degrees\",\n      \"doc\": \"Rotates the icon clockwise.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.21.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"icon-padding\": {\n      \"type\": \"number\",\n      \"default\": 2,\n      \"minimum\": 0,\n      \"units\": \"pixels\",\n      \"doc\": \"Size of the additional area around the icon bounding box used for detecting symbol collisions.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-keep-upright\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"If true, the icon may be flipped to prevent it from being rendered upside-down.\",\n      \"requires\": [\n        \"icon-image\",\n        {\n          \"icon-rotation-alignment\": \"map\"\n        },\n        {\n          \"symbol-placement\": [\n            \"line\",\n            \"line-center\"\n          ]\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-offset\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 2,\n      \"default\": [\n        0,\n        0\n      ],\n      \"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.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"icon-anchor\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"center\": {\n          \"doc\": \"The center of the icon is placed closest to the anchor.\"\n        },\n        \"left\": {\n          \"doc\": \"The left side of the icon is placed closest to the anchor.\"\n        },\n        \"right\": {\n          \"doc\": \"The right side of the icon is placed closest to the anchor.\"\n        },\n        \"top\": {\n          \"doc\": \"The top of the icon is placed closest to the anchor.\"\n        },\n        \"bottom\": {\n          \"doc\": \"The bottom of the icon is placed closest to the anchor.\"\n        },\n        \"top-left\": {\n          \"doc\": \"The top left corner of the icon is placed closest to the anchor.\"\n        },\n        \"top-right\": {\n          \"doc\": \"The top right corner of the icon is placed closest to the anchor.\"\n        },\n        \"bottom-left\": {\n          \"doc\": \"The bottom left corner of the icon is placed closest to the anchor.\"\n        },\n        \"bottom-right\": {\n          \"doc\": \"The bottom right corner of the icon is placed closest to the anchor.\"\n        }\n      },\n      \"default\": \"center\",\n      \"doc\": \"Part of the icon placed closest to the anchor.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.40.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\",\n          \"macos\": \"0.6.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.40.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\",\n          \"macos\": \"0.6.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"icon-pitch-alignment\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"The icon is aligned to the plane of the map.\"\n        },\n        \"viewport\": {\n          \"doc\": \"The icon is aligned to the plane of the viewport.\"\n        },\n        \"auto\": {\n          \"doc\": \"Automatically matches the value of `icon-rotation-alignment`.\"\n        }\n      },\n      \"default\": \"auto\",\n      \"doc\": \"Orientation of icon when map is pitched.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.39.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\",\n          \"macos\": \"0.6.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-pitch-alignment\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"The text is aligned to the plane of the map.\"\n        },\n        \"viewport\": {\n          \"doc\": \"The text is aligned to the plane of the viewport.\"\n        },\n        \"auto\": {\n          \"doc\": \"Automatically matches the value of `text-rotation-alignment`.\"\n        }\n      },\n      \"default\": \"auto\",\n      \"doc\": \"Orientation of text when map is pitched.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.21.0\",\n          \"android\": \"4.2.0\",\n          \"ios\": \"3.4.0\",\n          \"macos\": \"0.2.1\"\n        },\n        \"`auto` value\": {\n          \"js\": \"0.25.0\",\n          \"android\": \"4.2.0\",\n          \"ios\": \"3.4.0\",\n          \"macos\": \"0.3.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-rotation-alignment\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"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.\"\n        },\n        \"viewport\": {\n          \"doc\": \"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n        },\n        \"auto\": {\n          \"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`.\"\n        }\n      },\n      \"default\": \"auto\",\n      \"doc\": \"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"`auto` value\": {\n          \"js\": \"0.25.0\",\n          \"android\": \"4.2.0\",\n          \"ios\": \"3.4.0\",\n          \"macos\": \"0.3.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-field\": {\n      \"type\": \"formatted\",\n      \"default\": \"\",\n      \"tokens\": true,\n      \"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. SDF images are not supported in formatted text and will be ignored.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-font\": {\n      \"type\": \"array\",\n      \"value\": \"string\",\n      \"default\": [\n        \"Open Sans Regular\",\n        \"Arial Unicode MS Regular\"\n      ],\n      \"doc\": \"Font stack to use for displaying text.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-size\": {\n      \"type\": \"number\",\n      \"default\": 16,\n      \"minimum\": 0,\n      \"units\": \"pixels\",\n      \"doc\": \"Font size.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.35.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-max-width\": {\n      \"type\": \"number\",\n      \"default\": 10,\n      \"minimum\": 0,\n      \"units\": \"ems\",\n      \"doc\": \"The maximum line width for text wrapping.\",\n      \"requires\": [\n        \"text-field\",\n        {\n          \"symbol-placement\": [\n            \"point\"\n          ]\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.40.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\",\n          \"macos\": \"0.6.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-line-height\": {\n      \"type\": \"number\",\n      \"default\": 1.2,\n      \"units\": \"ems\",\n      \"doc\": \"Text leading value for multi-line text.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"2.3.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-letter-spacing\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"units\": \"ems\",\n      \"doc\": \"Text tracking amount.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.40.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\",\n          \"macos\": \"0.6.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-justify\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"auto\": {\n          \"doc\": \"The text is aligned towards the anchor position.\"\n        },\n        \"left\": {\n          \"doc\": \"The text is aligned to the left.\"\n        },\n        \"center\": {\n          \"doc\": \"The text is centered.\"\n        },\n        \"right\": {\n          \"doc\": \"The text is aligned to the right.\"\n        }\n      },\n      \"default\": \"center\",\n      \"doc\": \"Text justification options.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.39.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\",\n          \"macos\": \"0.6.0\"\n        },\n        \"auto\": {\n          \"js\": \"0.54.0\",\n          \"android\": \"7.4.0\",\n          \"ios\": \"4.10.0\",\n          \"macos\": \"0.14.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-radial-offset\": {\n      \"type\": \"number\",\n      \"units\": \"ems\",\n      \"default\": 0,\n      \"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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.54.0\",\n          \"android\": \"7.4.0\",\n          \"ios\": \"4.10.0\",\n          \"macos\": \"0.14.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.54.0\",\n          \"android\": \"7.4.0\",\n          \"ios\": \"4.10.0\",\n          \"macos\": \"0.14.0\"\n        }\n      },\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"property-type\": \"data-driven\",\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      }\n    },\n    \"text-variable-anchor\": {\n      \"type\": \"array\",\n      \"value\": \"enum\",\n      \"values\": {\n        \"center\": {\n          \"doc\": \"The center of the text is placed closest to the anchor.\"\n        },\n        \"left\": {\n          \"doc\": \"The left side of the text is placed closest to the anchor.\"\n        },\n        \"right\": {\n          \"doc\": \"The right side of the text is placed closest to the anchor.\"\n        },\n        \"top\": {\n          \"doc\": \"The top of the text is placed closest to the anchor.\"\n        },\n        \"bottom\": {\n          \"doc\": \"The bottom of the text is placed closest to the anchor.\"\n        },\n        \"top-left\": {\n          \"doc\": \"The top left corner of the text is placed closest to the anchor.\"\n        },\n        \"top-right\": {\n          \"doc\": \"The top right corner of the text is placed closest to the anchor.\"\n        },\n        \"bottom-left\": {\n          \"doc\": \"The bottom left corner of the text is placed closest to the anchor.\"\n        },\n        \"bottom-right\": {\n          \"doc\": \"The bottom right corner of the text is placed closest to the anchor.\"\n        }\n      },\n      \"requires\": [\n        \"text-field\",\n        {\n          \"symbol-placement\": [\n            \"point\"\n          ]\n        }\n      ],\n      \"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`.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.54.0\",\n          \"android\": \"7.4.0\",\n          \"ios\": \"4.10.0\",\n          \"macos\": \"0.14.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-anchor\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"center\": {\n          \"doc\": \"The center of the text is placed closest to the anchor.\"\n        },\n        \"left\": {\n          \"doc\": \"The left side of the text is placed closest to the anchor.\"\n        },\n        \"right\": {\n          \"doc\": \"The right side of the text is placed closest to the anchor.\"\n        },\n        \"top\": {\n          \"doc\": \"The top of the text is placed closest to the anchor.\"\n        },\n        \"bottom\": {\n          \"doc\": \"The bottom of the text is placed closest to the anchor.\"\n        },\n        \"top-left\": {\n          \"doc\": \"The top left corner of the text is placed closest to the anchor.\"\n        },\n        \"top-right\": {\n          \"doc\": \"The top right corner of the text is placed closest to the anchor.\"\n        },\n        \"bottom-left\": {\n          \"doc\": \"The bottom left corner of the text is placed closest to the anchor.\"\n        },\n        \"bottom-right\": {\n          \"doc\": \"The bottom right corner of the text is placed closest to the anchor.\"\n        }\n      },\n      \"default\": \"center\",\n      \"doc\": \"Part of the text placed closest to the anchor.\",\n      \"requires\": [\n        \"text-field\",\n        {\n          \"!\": \"text-variable-anchor\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.39.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\",\n          \"macos\": \"0.6.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-max-angle\": {\n      \"type\": \"number\",\n      \"default\": 45,\n      \"units\": \"degrees\",\n      \"doc\": \"Maximum angle change between adjacent characters.\",\n      \"requires\": [\n        \"text-field\",\n        {\n          \"symbol-placement\": [\n            \"line\",\n            \"line-center\"\n          ]\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-writing-mode\": {\n      \"type\": \"array\",\n      \"value\": \"enum\",\n      \"values\": {\n        \"horizontal\": {\n          \"doc\": \"If a text's language supports horizontal writing mode, symbols would be laid out horizontally.\"\n        },\n        \"vertical\": {\n          \"doc\": \"If a text's language supports vertical writing mode, symbols would be laid out vertically.\"\n        }\n      },\n      \"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 orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. For symbol with point placement, the order of elements in an array define priority order for the placement of an orientation variant. For symbol with line placement, the default text writing mode is either ['horizontal', 'vertical'] or ['vertical', 'horizontal'], the order doesn't affect the placement.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"1.3.0\",\n          \"android\": \"8.3.0\",\n          \"ios\": \"5.3.0\",\n          \"macos\": \"0.15.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-rotate\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"period\": 360,\n      \"units\": \"degrees\",\n      \"doc\": \"Rotates the text clockwise.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.35.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-padding\": {\n      \"type\": \"number\",\n      \"default\": 2,\n      \"minimum\": 0,\n      \"units\": \"pixels\",\n      \"doc\": \"Size of the additional area around the text bounding box used for detecting symbol collisions.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-keep-upright\": {\n      \"type\": \"boolean\",\n      \"default\": true,\n      \"doc\": \"If true, the text may be flipped vertically to prevent it from being rendered upside-down.\",\n      \"requires\": [\n        \"text-field\",\n        {\n          \"text-rotation-alignment\": \"map\"\n        },\n        {\n          \"symbol-placement\": [\n            \"line\",\n            \"line-center\"\n          ]\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-transform\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"none\": {\n          \"doc\": \"The text is not altered.\"\n        },\n        \"uppercase\": {\n          \"doc\": \"Forces all letters to be displayed in uppercase.\"\n        },\n        \"lowercase\": {\n          \"doc\": \"Forces all letters to be displayed in lowercase.\"\n        }\n      },\n      \"default\": \"none\",\n      \"doc\": \"Specifies how to capitalize text, similar to the CSS `text-transform` property.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-offset\": {\n      \"type\": \"array\",\n      \"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.\",\n      \"value\": \"number\",\n      \"units\": \"ems\",\n      \"length\": 2,\n      \"default\": [\n        0,\n        0\n      ],\n      \"requires\": [\n        \"text-field\",\n        {\n          \"!\": \"text-radial-offset\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.35.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-allow-overlap\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"If true, the text will be visible even if it collides with other previously drawn symbols.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-ignore-placement\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"If true, other symbols can be visible even if they collide with the text.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-optional\": {\n      \"type\": \"boolean\",\n      \"default\": false,\n      \"doc\": \"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.\",\n      \"requires\": [\n        \"text-field\",\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"visibility\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"visible\": {\n          \"doc\": \"The layer is shown.\"\n        },\n        \"none\": {\n          \"doc\": \"The layer is not shown.\"\n        }\n      },\n      \"default\": \"visible\",\n      \"doc\": \"Whether this layer is displayed.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"property-type\": \"constant\"\n    }\n  },\n  \"layout_raster\": {\n    \"visibility\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"visible\": {\n          \"doc\": \"The layer is shown.\"\n        },\n        \"none\": {\n          \"doc\": \"The layer is not shown.\"\n        }\n      },\n      \"default\": \"visible\",\n      \"doc\": \"Whether this layer is displayed.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"property-type\": \"constant\"\n    }\n  },\n  \"layout_hillshade\": {\n    \"visibility\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"visible\": {\n          \"doc\": \"The layer is shown.\"\n        },\n        \"none\": {\n          \"doc\": \"The layer is not shown.\"\n        }\n      },\n      \"default\": \"visible\",\n      \"doc\": \"Whether this layer is displayed.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"property-type\": \"constant\"\n    }\n  },\n  \"filter\": {\n    \"type\": \"array\",\n    \"value\": \"*\",\n    \"doc\": \"A filter selects specific features from a layer.\"\n  },\n  \"filter_symbol\": {\n    \"type\": \"boolean\",\n    \"doc\": \"Expression which determines whether or not to display a symbol. Symbols support dynamic filtering, meaning this expression can use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n    \"default\": false,\n    \"transition\": false,\n    \"property-type\": \"data-driven\",\n    \"expression\": {\n      \"interpolated\": false,\n      \"parameters\": [\"zoom\", \"feature\", \"pitch\", \"distance-from-center\"]\n    }\n  },\n  \"filter_fill\": {\n    \"type\": \"boolean\",\n    \"doc\": \"Expression which determines whether or not to display a polygon. Fill layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n    \"default\": false,\n    \"transition\": false,\n    \"property-type\": \"data-driven\",\n    \"expression\": {\n      \"interpolated\": false,\n      \"parameters\": [\"zoom\", \"feature\"]\n    }\n  },\n  \"filter_line\": {\n    \"type\": \"boolean\",\n    \"doc\": \"Expression which determines whether or not to display a Polygon or LineString. Line layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n    \"default\": false,\n    \"transition\": false,\n    \"property-type\": \"data-driven\",\n    \"expression\": {\n      \"interpolated\": false,\n      \"parameters\": [\"zoom\", \"feature\"]\n    }\n  },\n  \"filter_circle\": {\n    \"type\": \"boolean\",\n    \"doc\": \"Expression which determines whether or not to display a circle. Circle layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n    \"default\": false,\n    \"transition\": false,\n    \"property-type\": \"data-driven\",\n    \"expression\": {\n      \"interpolated\": false,\n      \"parameters\": [\"zoom\", \"feature\"]\n    }\n  },\n  \"filter_fill-extrusion\": {\n    \"type\": \"boolean\",\n    \"doc\": \"Expression which determines whether or not to display a Polygon. Fill-extrusion layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n    \"default\": false,\n    \"transition\": false,\n    \"property-type\": \"data-driven\",\n    \"expression\": {\n      \"interpolated\": false,\n      \"parameters\": [\"zoom\", \"feature\"]\n    }\n  },\n  \"filter_heatmap\": {\n    \"type\": \"boolean\",\n    \"doc\": \"Expression used to determine whether a point is being displayed or not. Heatmap layer does NOT support dynamic filtering, meaning this expression can NOT use the `[\\\"pitch\\\"]` and `[\\\"distance-from-center\\\"]` expressions to reference the current state of the view.\",\n    \"default\": false,\n    \"transition\": false,\n    \"property-type\": \"data-driven\",\n    \"expression\": {\n      \"interpolated\": false,\n      \"parameters\": [\"zoom\", \"feature\"]\n    }\n  },\n  \"filter_operator\": {\n    \"type\": \"enum\",\n    \"values\": {\n      \"==\": {\n        \"doc\": \"`[\\\"==\\\", key, value]` equality: `feature[key] = value`\"\n      },\n      \"!=\": {\n        \"doc\": \"`[\\\"!=\\\", key, value]` inequality: `feature[key] ≠ value`\"\n      },\n      \">\": {\n        \"doc\": \"`[\\\">\\\", key, value]` greater than: `feature[key] > value`\"\n      },\n      \">=\": {\n        \"doc\": \"`[\\\">=\\\", key, value]` greater than or equal: `feature[key] ≥ value`\"\n      },\n      \"<\": {\n        \"doc\": \"`[\\\"<\\\", key, value]` less than: `feature[key] < value`\"\n      },\n      \"<=\": {\n        \"doc\": \"`[\\\"<=\\\", key, value]` less than or equal: `feature[key] ≤ value`\"\n      },\n      \"in\": {\n        \"doc\": \"`[\\\"in\\\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`\"\n      },\n      \"!in\": {\n        \"doc\": \"`[\\\"!in\\\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`\"\n      },\n      \"all\": {\n        \"doc\": \"`[\\\"all\\\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`\"\n      },\n      \"any\": {\n        \"doc\": \"`[\\\"any\\\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`\"\n      },\n      \"none\": {\n        \"doc\": \"`[\\\"none\\\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`\"\n      },\n      \"has\": {\n        \"doc\": \"`[\\\"has\\\", key]` `feature[key]` exists\"\n      },\n      \"!has\": {\n        \"doc\": \"`[\\\"!has\\\", key]` `feature[key]` does not exist\"\n      },\n      \"within\": {\n        \"doc\": \"`[\\\"within\\\", object]` feature geometry is within object geometry\"\n      }\n    },\n    \"doc\": \"The filter operator.\"\n  },\n  \"geometry_type\": {\n    \"type\": \"enum\",\n    \"values\": {\n      \"Point\": {\n        \"doc\": \"Filter to point geometries.\"\n      },\n      \"LineString\": {\n        \"doc\": \"Filter to line geometries.\"\n      },\n      \"Polygon\": {\n        \"doc\": \"Filter to polygon geometries.\"\n      }\n    },\n    \"doc\": \"The geometry type for the filter to select.\"\n  },\n  \"function\": {\n    \"expression\": {\n      \"type\": \"expression\",\n      \"doc\": \"An expression.\"\n    },\n    \"stops\": {\n      \"type\": \"array\",\n      \"doc\": \"An array of stops.\",\n      \"value\": \"function_stop\"\n    },\n    \"base\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"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.\"\n    },\n    \"property\": {\n      \"type\": \"string\",\n      \"doc\": \"The name of a feature property to use as the function input.\",\n      \"default\": \"$zoom\"\n    },\n    \"type\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"identity\": {\n          \"doc\": \"Return the input value as the output value.\"\n        },\n        \"exponential\": {\n          \"doc\": \"Generate an output by interpolating between stops just less than and just greater than the function input.\"\n        },\n        \"interval\": {\n          \"doc\": \"Return the output value of the stop just less than the function input.\"\n        },\n        \"categorical\": {\n          \"doc\": \"Return the output value of the stop equal to the function input.\"\n        }\n      },\n      \"doc\": \"The interpolation strategy to use in function evaluation.\",\n      \"default\": \"exponential\"\n    },\n    \"colorSpace\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"rgb\": {\n          \"doc\": \"Use the RGB color space to interpolate color values\"\n        },\n        \"lab\": {\n          \"doc\": \"Use the LAB color space to interpolate color values.\"\n        },\n        \"hcl\": {\n          \"doc\": \"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually.\"\n        }\n      },\n      \"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.\",\n      \"default\": \"rgb\"\n    },\n    \"default\": {\n      \"type\": \"*\",\n      \"required\": false,\n      \"doc\": \"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    }\n  },\n  \"function_stop\": {\n    \"type\": \"array\",\n    \"minimum\": 0,\n    \"maximum\": 24,\n    \"value\": [\n      \"number\",\n      \"color\"\n    ],\n    \"length\": 2,\n    \"doc\": \"Zoom level and value pair.\"\n  },\n  \"expression\": {\n    \"type\": \"array\",\n    \"value\": \"*\",\n    \"minimum\": 1,\n    \"doc\": \"An expression defines a function that can be used for data-driven style properties or feature filters.\"\n  },\n  \"expression_name\": {\n    \"doc\": \"\",\n    \"type\": \"enum\",\n    \"values\": {\n      \"let\": {\n        \"doc\": \"Binds expressions to named variables, which can then be referenced in the result expression using [\\\"var\\\", \\\"variable_name\\\"].\",\n        \"group\": \"Variable binding\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"var\": {\n        \"doc\": \"References variable bound using \\\"let\\\".\",\n        \"group\": \"Variable binding\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"literal\": {\n        \"doc\": \"Provides a literal array or object value.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"array\": {\n        \"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.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"at\": {\n        \"doc\": \"Retrieves an item from an array.\",\n        \"group\": \"Lookup\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"in\": {\n        \"doc\": \"Determines whether an item exists in an array or a substring exists in a string. In the specific case when the second and third arguments are string literals, you must wrap at least one of them in a [`literal`](#types-literal) expression to hint correct interpretation to the [type system](#type-system).\",\n        \"group\": \"Lookup\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"1.6.0\",\n            \"android\": \"9.1.0\",\n            \"ios\": \"5.8.0\",\n            \"macos\": \"0.15.0\"\n          }\n        }\n      },\n      \"index-of\": {\n        \"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.\",\n        \"group\": \"Lookup\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"1.10.0\"\n          }\n        }\n      },\n      \"slice\": {\n        \"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.\",\n        \"group\": \"Lookup\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"1.10.0\"\n          }\n        }\n      },\n      \"case\": {\n        \"doc\": \"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"match\": {\n        \"doc\": \"Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `[\\\"get\\\", \\\"building_type\\\"]`). Each label must be unique, and must be either:\\n - a single literal value; or\\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `[\\\"c\\\", \\\"b\\\"]`).\\n\\nThe input matches if any of the values in the array matches using strict equality, similar to the `\\\"in\\\"` operator.\\nIf the input type does not match the type of the labels, the result will be the fallback value.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"coalesce\": {\n        \"doc\": \"Evaluates each expression in turn until the first valid value is obtained. Invalid values are `null` and [`'image'`](#types-image) expressions that are unavailable in the style. If all values are invalid, `coalesce` returns the first value listed.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"step\": {\n        \"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.\",\n        \"group\": \"Ramps, scales, curves\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.42.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"interpolate\": {\n        \"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 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        \"group\": \"Ramps, scales, curves\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.42.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"interpolate-hcl\": {\n        \"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.\",\n        \"group\": \"Ramps, scales, curves\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.49.0\"\n          }\n        }\n      },\n      \"interpolate-lab\": {\n        \"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.\",\n        \"group\": \"Ramps, scales, curves\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.49.0\"\n          }\n        }\n      },\n      \"ln2\": {\n        \"doc\": \"Returns mathematical constant ln(2).\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"pi\": {\n        \"doc\": \"Returns the mathematical constant pi.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"e\": {\n        \"doc\": \"Returns the mathematical constant e.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"typeof\": {\n        \"doc\": \"Returns a string describing the type of the given value.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"string\": {\n        \"doc\": \"Asserts that the input value is a string. If multiple 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.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"number\": {\n        \"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.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"boolean\": {\n        \"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.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"object\": {\n        \"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.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"collator\": {\n        \"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.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.0\",\n            \"macos\": \"0.9.0\"\n          }\n        }\n      },\n      \"format\": {\n        \"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) 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-size` as specified by the root layout property.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.48.0\",\n            \"android\": \"6.7.0\",\n            \"ios\": \"4.6.0\",\n            \"macos\": \"0.12.0\"\n          },\n          \"text-font\": {\n            \"js\": \"0.48.0\",\n            \"android\": \"6.7.0\",\n            \"ios\": \"4.6.0\",\n            \"macos\": \"0.12.0\"\n          },\n          \"font-scale\": {\n            \"js\": \"0.48.0\",\n            \"android\": \"6.7.0\",\n            \"ios\": \"4.6.0\",\n            \"macos\": \"0.12.0\"\n          },\n          \"text-color\": {\n            \"js\": \"1.3.0\",\n            \"android\": \"7.3.0\",\n            \"ios\": \"4.10.0\",\n            \"macos\": \"0.14.0\"\n          },\n          \"image\": {\n            \"js\": \"1.6.0\",\n            \"android\": \"8.6.0\",\n            \"ios\": \"5.7.0\",\n            \"macos\": \"0.15.0\"\n          }\n        }\n      },\n      \"image\": {\n        \"doc\": \"Returns a [`ResolvedImage`](/mapbox-gl-js/style-spec/types/#resolvedimage) for use in [`icon-image`](/mapbox-gl-js/style-spec/layers/#layout-symbol-icon-image), `*-pattern` entries, and as a section in the [`'format'`](#types-format) expression. A [`'coalesce'`](#coalesce) expression containing `image` expressions will evaluate to the first listed image that 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        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"1.4.0\",\n            \"android\": \"8.6.0\",\n            \"ios\": \"5.7.0\",\n            \"macos\": \"0.15.0\"\n          }\n        }\n      },\n      \"number-format\": {\n        \"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.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.54.0\",\n            \"android\" : \"8.4.0\",\n            \"ios\": \"5.4.0\",\n            \"macos\": \"0.15.0\"\n          }\n        }\n      },\n      \"to-string\": {\n        \"doc\": \"Converts the input value to a string. If the input is `null`, the result is `\\\"\\\"`. If the input is a [`boolean`](#types-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`](#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. If the input is an [`'image'`](#types-image) expression, `'to-string'` returns the image name. 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.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"to-number\": {\n        \"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://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        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"to-boolean\": {\n        \"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`.\",\n        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"to-rgba\": {\n        \"doc\": \"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.\",\n        \"group\": \"Color\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"to-color\": {\n        \"doc\": \"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        \"group\": \"Types\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"rgb\": {\n        \"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.\",\n        \"group\": \"Color\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"rgba\": {\n        \"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.\",\n        \"group\": \"Color\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"get\": {\n        \"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.\",\n        \"group\": \"Lookup\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"has\": {\n        \"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.\",\n        \"group\": \"Lookup\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"length\": {\n        \"doc\": \"Returns the length of an array or string.\",\n        \"group\": \"Lookup\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"properties\": {\n        \"doc\": \"Returns the feature properties object.  Note that in some cases, it may be more efficient to use `[\\\"get\\\", \\\"property_name\\\"]` directly.\",\n        \"group\": \"Feature data\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"feature-state\": {\n        \"doc\": \"Retrieves a property value from the current feature's state. Returns `null` if the requested 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.\",\n        \"group\": \"Feature data\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.46.0\"\n          }\n        }\n      },\n      \"geometry-type\": {\n        \"doc\": \"Returns the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`. `Multi*` feature types are only returned in GeoJSON sources. When working with vector tile sources, use the singular forms.\",\n        \"group\": \"Feature data\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"id\": {\n        \"doc\": \"Returns the feature's id, if it has one.\",\n        \"group\": \"Feature data\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"zoom\": {\n        \"doc\": \"Returns 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        \"group\": \"Camera\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"pitch\": {\n        \"doc\": \"Returns the current pitch in degrees. `[\\\"pitch\\\"]` may only be used in the `filter` expression for a `symbol` layer.\",\n        \"group\": \"Camera\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"2.6.0\"\n          }\n        }\n      },\n      \"distance-from-center\": {\n        \"doc\": \"Returns the distance of a `symbol` instance from the center of the map. The distance is measured in pixels divided by the height of the map container. It measures 0 at the center, decreases towards the camera and increase away from the camera. For example, if the height of the map is 1000px, a value of -1 means 1000px away from the center towards the camera, and a value of 1 means a distance of 1000px away from the camera from the center. `[\\\"distance-from-center\\\"]` may only be used in the `filter` expression for a `symbol` layer.\",\n        \"group\": \"Camera\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"2.6.0\"\n          }\n        }\n      },\n      \"heatmap-density\": {\n        \"doc\": \"Returns 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        \"group\": \"Heatmap\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"line-progress\": {\n        \"doc\": \"Returns the progress along a gradient line. Can only be used in the `line-gradient` property.\",\n        \"group\": \"Feature data\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.6.0\",\n            \"macos\": \"0.12.0\"\n          }\n        }\n      },\n      \"sky-radial-progress\": {\n        \"doc\": \"Returns the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.\",\n        \"group\": \"sky\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"2.0.0\",\n            \"ios\": \"10.0.0\",\n            \"android\": \"10.0.0\"\n          }\n        }\n      },\n      \"accumulated\": {\n        \"doc\": \"Returns the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.\",\n        \"group\": \"Feature data\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.53.0\",\n            \"android\": \"8.4.0\",\n            \"ios\": \"5.5.0\",\n            \"macos\": \"0.15.0\"\n          }\n        }\n      },\n      \"+\": {\n        \"doc\": \"Returns the sum of the inputs.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"*\": {\n        \"doc\": \"Returns the product of the inputs.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"-\": {\n        \"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.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"/\": {\n        \"doc\": \"Returns the result of floating point division of the first input by the second.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"%\": {\n        \"doc\": \"Returns the remainder after integer division of the first input by the second.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"^\": {\n        \"doc\": \"Returns the result of raising the first input to the power specified by the second.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"sqrt\": {\n        \"doc\": \"Returns the square root of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.42.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"log10\": {\n        \"doc\": \"Returns the base-ten logarithm of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"ln\": {\n        \"doc\": \"Returns the natural logarithm of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"log2\": {\n        \"doc\": \"Returns the base-two logarithm of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"sin\": {\n        \"doc\": \"Returns the sine of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"cos\": {\n        \"doc\": \"Returns the cosine of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"tan\": {\n        \"doc\": \"Returns the tangent of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"asin\": {\n        \"doc\": \"Returns the arcsine of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"acos\": {\n        \"doc\": \"Returns the arccosine of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"atan\": {\n        \"doc\": \"Returns the arctangent of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"min\": {\n        \"doc\": \"Returns the minimum value of the inputs.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"max\": {\n        \"doc\": \"Returns the maximum value of the inputs.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"round\": {\n        \"doc\": \"Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `[\\\"round\\\", -1.5]` evaluates to -2.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"abs\": {\n        \"doc\": \"Returns the absolute value of the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"ceil\": {\n        \"doc\": \"Returns the smallest integer that is greater than or equal to the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"floor\": {\n        \"doc\": \"Returns the largest integer that is less than or equal to the input.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"distance\": {\n        \"doc\": \"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`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.\",\n        \"group\": \"Math\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"android\": \"9.2.0\",\n            \"ios\": \"5.9.0\",\n            \"macos\": \"0.16.0\"\n          }\n        }\n      },\n      \"==\": {\n        \"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.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.0\",\n            \"macos\": \"0.9.0\"\n          }\n        }\n      },\n      \"!=\": {\n        \"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.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.0\",\n            \"macos\": \"0.9.0\"\n          }\n        }\n      },\n      \">\": {\n        \"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.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.0\",\n            \"macos\": \"0.9.0\"\n          }\n        }\n      },\n      \"<\": {\n        \"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.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.0\",\n            \"macos\": \"0.9.0\"\n          }\n        }\n      },\n      \">=\": {\n        \"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. 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        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.0\",\n            \"macos\": \"0.9.0\"\n          }\n        }\n      },\n      \"<=\": {\n        \"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.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          },\n          \"collator\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.0\",\n            \"macos\": \"0.9.0\"\n          }\n        }\n      },\n      \"all\": {\n        \"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.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"any\": {\n        \"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.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"!\": {\n        \"doc\": \"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"within\": {\n        \"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.\",\n        \"group\": \"Decision\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"1.9.0\",\n            \"android\": \"9.1.0\",\n            \"ios\": \"5.8.0\",\n            \"macos\": \"0.15.0\"\n          }\n        }\n      },\n      \"is-supported-script\": {\n        \"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).\",\n        \"group\": \"String\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.6.0\"\n          }\n        }\n      },\n      \"upcase\": {\n        \"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.\",\n        \"group\": \"String\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"downcase\": {\n        \"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.\",\n        \"group\": \"String\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"concat\": {\n        \"doc\": \"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.\",\n        \"group\": \"String\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.41.0\",\n            \"android\": \"6.0.0\",\n            \"ios\": \"4.0.0\",\n            \"macos\": \"0.7.0\"\n          }\n        }\n      },\n      \"resolved-locale\": {\n        \"doc\": \"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        \"group\": \"String\",\n        \"sdk-support\": {\n          \"basic functionality\": {\n            \"js\": \"0.45.0\",\n            \"android\": \"6.5.0\",\n            \"ios\": \"4.2.0\",\n            \"macos\": \"0.9.0\"\n          }\n        }\n      }\n    }\n  },\n  \"fog\": {\n    \"range\": {\n      \"type\": \"array\",\n      \"default\": [\n        0.5,\n        10\n      ],\n      \"minimum\": -20,\n      \"maximum\": 20,\n      \"length\": 2,\n      \"value\": \"number\",\n      \"property-type\": \"data-constant\",\n      \"transition\": true,\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"doc\": \"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.\",\n      \"example\": [\n        0.5,\n        10\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.3.0\"\n        }\n      }\n    },\n    \"color\": {\n      \"type\": \"color\",\n      \"property-type\": \"data-constant\",\n      \"default\": \"#ffffff\",\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"transition\": true,\n      \"doc\": \"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.3.0\"\n        }\n      }\n    },\n    \"horizon-blend\": {\n      \"type\": \"number\",\n      \"property-type\": \"data-constant\",\n      \"default\": 0.1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"transition\": true,\n      \"doc\": \"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.3.0\"\n        }\n      }\n    }\n  },\n  \"light\": {\n    \"anchor\": {\n      \"type\": \"enum\",\n      \"default\": \"viewport\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"The position of the light source is aligned to the rotation of the map.\"\n        },\n        \"viewport\": {\n          \"doc\": \"The position of the light source is aligned to the rotation of the viewport.\"\n        }\n      },\n      \"property-type\": \"data-constant\",\n      \"transition\": false,\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"doc\": \"Whether extruded geometries are lit relative to the map or viewport.\",\n      \"example\": \"map\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      }\n    },\n    \"position\": {\n      \"type\": \"array\",\n      \"default\": [\n        1.15,\n        210,\n        30\n      ],\n      \"length\": 3,\n      \"value\": \"number\",\n      \"property-type\": \"data-constant\",\n      \"transition\": true,\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"doc\": \"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      \"example\": [\n        1.5,\n        90,\n        80\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      }\n    },\n    \"color\": {\n      \"type\": \"color\",\n      \"property-type\": \"data-constant\",\n      \"default\": \"#ffffff\",\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"transition\": true,\n      \"doc\": \"Color tint for lighting extruded geometries.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      }\n    },\n    \"intensity\": {\n      \"type\": \"number\",\n      \"property-type\": \"data-constant\",\n      \"default\": 0.5,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"transition\": true,\n      \"doc\": \"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      }\n    }\n  },\n  \"projection\": {\n    \"name\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"albers\": {\n          \"doc\": \"An Albers equal-area projection centered on the continental United States. You can configure the projection for a different region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region.\"\n        },\n        \"equalEarth\": {\n          \"doc\": \"An Equal Earth projection.\"\n        },\n        \"equirectangular\": {\n          \"doc\": \"An Equirectangular projection. This projection is very similar to the Plate Carrée projection.\"\n        },\n        \"lambertConformalConic\": {\n          \"doc\": \"A Lambert conformal conic projection. You can configure the projection for a region by setting `center` and `parallels` properties. You may want to set max bounds to constrain the map to the relevant region.\"\n        },\n        \"mercator\": {\n          \"doc\": \"The Mercator projection is the default projection.\"\n        },\n        \"naturalEarth\": {\n          \"doc\": \"A Natural Earth projection.\"\n        },\n        \"winkelTripel\": {\n          \"doc\": \"A Winkel Tripel projection.\"\n        }\n      },\n      \"default\": \"mercator\",\n      \"doc\": \"The name of the projection to be used for rendering the map.\",\n      \"required\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.6.0\"\n        }\n      }\n    },\n    \"center\": {\n      \"type\": \"array\",\n      \"length\": 2,\n      \"value\": \"number\",\n      \"property-type\": \"data-constant\",\n      \"transition\": false,\n      \"doc\": \"The reference longitude and latitude of the projection. `center` takes the form of [lng, lat]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic). All other projections are centered on [0, 0].\",\n      \"example\": [\n        -96,\n        37.5\n      ],\n      \"requires\": [\n        {\n          \"name\": [\n              \"albers\",\n              \"lambertConformalConic\"\n          ]\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.6.0\"\n        }\n      }\n    },\n    \"parallels\": {\n      \"type\": \"array\",\n      \"length\": 2,\n      \"value\": \"number\",\n      \"property-type\": \"data-constant\",\n      \"transition\": false,\n      \"doc\":  \"The standard parallels of the projection, denoting the desired latitude range with minimal distortion. `parallels` takes the form of [lat0, lat1]. This property is only configurable for conic projections (Albers and Lambert Conformal Conic).\",\n      \"example\": [\n        29.5,\n        45.5\n      ],\n      \"requires\": [\n        {\n          \"name\": [\n              \"albers\",\n              \"lambertConformalConic\"\n          ]\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.6.0\"\n        }\n      }\n    }\n  },\n  \"terrain\" : {\n    \"source\": {\n      \"type\": \"string\",\n      \"doc\": \"Name of a source of `raster_dem` type to be used for terrain elevation.\",\n      \"required\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      }\n    },\n    \"exaggeration\": {\n      \"type\": \"number\",\n      \"property-type\": \"data-constant\",\n      \"default\": 1.0,\n      \"minimum\": 0,\n      \"maximum\": 1000,\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"transition\": true,\n      \"doc\": \"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      }\n    }\n  },\n  \"paint\": [\n    \"paint_fill\",\n    \"paint_line\",\n    \"paint_circle\",\n    \"paint_heatmap\",\n    \"paint_fill-extrusion\",\n    \"paint_symbol\",\n    \"paint_raster\",\n    \"paint_hillshade\",\n    \"paint_background\",\n    \"paint_sky\"\n  ],\n  \"paint_fill\": {\n    \"fill-antialias\": {\n      \"type\": \"boolean\",\n      \"default\": true,\n      \"doc\": \"Whether or not the fill should be antialiased.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"fill-opacity\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"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.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.21.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"fill-color\": {\n      \"type\": \"color\",\n      \"default\": \"#000000\",\n      \"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.\",\n      \"transition\": true,\n      \"requires\": [\n        {\n          \"!\": \"fill-pattern\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.19.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"fill-outline-color\": {\n      \"type\": \"color\",\n      \"doc\": \"The outline color of the fill. Matches the value of `fill-color` if unspecified.\",\n      \"transition\": true,\n      \"requires\": [\n        {\n          \"!\": \"fill-pattern\"\n        },\n        {\n          \"fill-antialias\": true\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.19.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"fill-translate\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 2,\n      \"default\": [\n        0,\n        0\n      ],\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"fill-translate-anchor\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"The fill is translated relative to the map.\"\n        },\n        \"viewport\": {\n          \"doc\": \"The fill is translated relative to the viewport.\"\n        }\n      },\n      \"doc\": \"Controls the frame of reference for `fill-translate`.\",\n      \"default\": \"map\",\n      \"requires\": [\n        \"fill-translate\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"fill-pattern\": {\n      \"type\": \"resolvedImage\",\n      \"transition\": true,\n      \"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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.49.0\",\n          \"android\": \"6.5.0\",\n          \"macos\": \"0.11.0\",\n          \"ios\": \"4.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"cross-faded-data-driven\"\n    }\n  },\n  \"paint_fill-extrusion\": {\n    \"fill-extrusion-opacity\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"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.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"fill-extrusion-color\": {\n      \"type\": \"color\",\n      \"default\": \"#000000\",\n      \"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.\",\n      \"transition\": true,\n      \"requires\": [\n        {\n          \"!\": \"fill-extrusion-pattern\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"fill-extrusion-translate\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 2,\n      \"default\": [\n        0,\n        0\n      ],\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"fill-extrusion-translate-anchor\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"The fill extrusion is translated relative to the map.\"\n        },\n        \"viewport\": {\n          \"doc\": \"The fill extrusion is translated relative to the viewport.\"\n        }\n      },\n      \"doc\": \"Controls the frame of reference for `fill-extrusion-translate`.\",\n      \"default\": \"map\",\n      \"requires\": [\n        \"fill-extrusion-translate\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"fill-extrusion-pattern\": {\n      \"type\": \"resolvedImage\",\n      \"transition\": true,\n      \"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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.49.0\",\n          \"android\": \"6.5.0\",\n          \"macos\": \"0.11.0\",\n          \"ios\": \"4.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"cross-faded-data-driven\"\n    },\n    \"fill-extrusion-height\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"units\": \"meters\",\n      \"doc\": \"The height with which to extrude this layer.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"fill-extrusion-base\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"units\": \"meters\",\n      \"doc\": \"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.\",\n      \"transition\": true,\n      \"requires\": [\n        \"fill-extrusion-height\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.27.0\",\n          \"android\": \"5.1.0\",\n          \"ios\": \"3.6.0\",\n          \"macos\": \"0.5.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"fill-extrusion-vertical-gradient\": {\n      \"type\": \"boolean\",\n      \"default\": true,\n      \"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.\",\n      \"transition\": false,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.50.0\",\n          \"android\": \"7.0.0\",\n          \"ios\": \"4.7.0\",\n          \"macos\": \"0.13.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    }\n  },\n  \"paint_line\": {\n    \"line-opacity\": {\n      \"type\": \"number\",\n      \"doc\": \"The opacity at which the line will be drawn.\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"line-color\": {\n      \"type\": \"color\",\n      \"doc\": \"The color with which the line will be drawn.\",\n      \"default\": \"#000000\",\n      \"transition\": true,\n      \"requires\": [\n        {\n          \"!\": \"line-pattern\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.23.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"line-translate\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 2,\n      \"default\": [\n        0,\n        0\n      ],\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"line-translate-anchor\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"The line is translated relative to the map.\"\n        },\n        \"viewport\": {\n          \"doc\": \"The line is translated relative to the viewport.\"\n        }\n      },\n      \"doc\": \"Controls the frame of reference for `line-translate`.\",\n      \"default\": \"map\",\n      \"requires\": [\n        \"line-translate\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"line-width\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"Stroke thickness.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.39.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\",\n          \"macos\": \"0.6.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"line-gap-width\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"doc\": \"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.\",\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"line-offset\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"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.\",\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.12.1\",\n          \"android\": \"3.0.0\",\n          \"ios\": \"3.1.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"line-blur\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"Blur applied to the line, in pixels.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"line-dasharray\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"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.\",\n      \"minimum\": 0,\n      \"transition\": true,\n      \"units\": \"line widths\",\n      \"requires\": [\n        {\n          \"!\": \"line-pattern\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"2.3.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"cross-faded-data-driven\"\n    },\n    \"line-pattern\": {\n      \"type\": \"resolvedImage\",\n      \"transition\": true,\n      \"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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.49.0\",\n          \"android\": \"6.5.0\",\n          \"macos\": \"0.11.0\",\n          \"ios\": \"4.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\"\n        ]\n      },\n      \"property-type\": \"cross-faded-data-driven\"\n    },\n    \"line-gradient\": {\n      \"type\": \"color\",\n      \"doc\": \"Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\\\"lineMetrics\\\": true`.\",\n      \"transition\": false,\n      \"requires\": [\n        {\n          \"!\": \"line-pattern\"\n        },\n        {\n          \"source\": \"geojson\",\n          \"has\": {\n            \"lineMetrics\": true\n          }\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.45.0\",\n          \"android\": \"6.5.0\",\n          \"ios\": \"4.4.0\",\n          \"macos\": \"0.11.0\"\n        },\n        \"data-driven styling\": {}\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"line-progress\"\n        ]\n      },\n      \"property-type\": \"color-ramp\"\n    }\n  },\n  \"paint_circle\": {\n    \"circle-radius\": {\n      \"type\": \"number\",\n      \"default\": 5,\n      \"minimum\": 0,\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"Circle radius.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.18.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"circle-color\": {\n      \"type\": \"color\",\n      \"default\": \"#000000\",\n      \"doc\": \"The fill color of the circle.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.18.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"circle-blur\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"doc\": \"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.20.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"circle-opacity\": {\n      \"type\": \"number\",\n      \"doc\": \"The opacity at which the circle will be drawn.\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.20.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"circle-translate\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 2,\n      \"default\": [\n        0,\n        0\n      ],\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"circle-translate-anchor\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"The circle is translated relative to the map.\"\n        },\n        \"viewport\": {\n          \"doc\": \"The circle is translated relative to the viewport.\"\n        }\n      },\n      \"doc\": \"Controls the frame of reference for `circle-translate`.\",\n      \"default\": \"map\",\n      \"requires\": [\n        \"circle-translate\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"circle-pitch-scale\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"Circles are scaled according to their apparent distance to the camera.\"\n        },\n        \"viewport\": {\n          \"doc\": \"Circles are not scaled.\"\n        }\n      },\n      \"default\": \"map\",\n      \"doc\": \"Controls the scaling behavior of the circle when the map is pitched.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.21.0\",\n          \"android\": \"4.2.0\",\n          \"ios\": \"3.4.0\",\n          \"macos\": \"0.2.1\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"circle-pitch-alignment\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"The circle is aligned to the plane of the map.\"\n        },\n        \"viewport\": {\n          \"doc\": \"The circle is aligned to the plane of the viewport.\"\n        }\n      },\n      \"default\": \"viewport\",\n      \"doc\": \"Orientation of circle when map is pitched.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.39.0\",\n          \"android\": \"5.2.0\",\n          \"ios\": \"3.7.0\",\n          \"macos\": \"0.6.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"circle-stroke-width\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"circle-stroke-color\": {\n      \"type\": \"color\",\n      \"default\": \"#000000\",\n      \"doc\": \"The stroke color of the circle.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"circle-stroke-opacity\": {\n      \"type\": \"number\",\n      \"doc\": \"The opacity of the circle's stroke.\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.29.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    }\n  },\n  \"paint_heatmap\": {\n    \"heatmap-radius\": {\n      \"type\": \"number\",\n      \"default\": 30,\n      \"minimum\": 1,\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed. `queryRenderedFeatures` on heatmap layers will return points within this radius.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.41.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"heatmap-weight\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"transition\": false,\n      \"doc\": \"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      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.41.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.41.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"heatmap-intensity\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"transition\": true,\n      \"doc\": \"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.41.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"heatmap-color\": {\n      \"type\": \"color\",\n      \"default\": [\n        \"interpolate\",\n        [\n          \"linear\"\n        ],\n        [\n          \"heatmap-density\"\n        ],\n        0,\n        \"rgba(0, 0, 255, 0)\",\n        0.1,\n        \"royalblue\",\n        0.3,\n        \"cyan\",\n        0.5,\n        \"lime\",\n        0.7,\n        \"yellow\",\n        1,\n        \"red\"\n      ],\n      \"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.\",\n      \"transition\": false,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.41.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        },\n        \"data-driven styling\": {}\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"heatmap-density\"\n        ]\n      },\n      \"property-type\": \"color-ramp\"\n    },\n    \"heatmap-opacity\": {\n      \"type\": \"number\",\n      \"doc\": \"The global opacity at which the heatmap layer will be drawn.\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.41.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    }\n  },\n  \"paint_symbol\": {\n    \"icon-opacity\": {\n      \"doc\": \"The opacity at which the icon will be drawn.\",\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"icon-color\": {\n      \"type\": \"color\",\n      \"default\": \"#000000\",\n      \"transition\": true,\n      \"doc\": \"The color of the icon. This can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"icon-halo-color\": {\n      \"type\": \"color\",\n      \"default\": \"rgba(0, 0, 0, 0)\",\n      \"transition\": true,\n      \"doc\": \"The color of the icon's halo. Icon halos can only be used with [SDF icons](/help/troubleshooting/using-recolorable-images-in-mapbox-maps/).\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"icon-halo-width\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"Distance of halo to the icon outline.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"icon-halo-blur\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"Fade out the halo towards the outside.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"icon-translate\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 2,\n      \"default\": [\n        0,\n        0\n      ],\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"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.\",\n      \"requires\": [\n        \"icon-image\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"icon-translate-anchor\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"Icons are translated relative to the map.\"\n        },\n        \"viewport\": {\n          \"doc\": \"Icons are translated relative to the viewport.\"\n        }\n      },\n      \"doc\": \"Controls the frame of reference for `icon-translate`.\",\n      \"default\": \"map\",\n      \"requires\": [\n        \"icon-image\",\n        \"icon-translate\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-opacity\": {\n      \"type\": \"number\",\n      \"doc\": \"The opacity at which the text will be drawn.\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-color\": {\n      \"type\": \"color\",\n      \"doc\": \"The color with which the text will be drawn.\",\n      \"default\": \"#000000\",\n      \"transition\": true,\n      \"overridable\": true,\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-halo-color\": {\n      \"type\": \"color\",\n      \"default\": \"rgba(0, 0, 0, 0)\",\n      \"transition\": true,\n      \"doc\": \"The color of the text's halo, which helps it stand out from backgrounds.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-halo-width\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-halo-blur\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"doc\": \"The halo's fadeout distance towards the outside.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {\n          \"js\": \"0.33.0\",\n          \"android\": \"5.0.0\",\n          \"ios\": \"3.5.0\",\n          \"macos\": \"0.4.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\",\n          \"feature\",\n          \"feature-state\"\n        ]\n      },\n      \"property-type\": \"data-driven\"\n    },\n    \"text-translate\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 2,\n      \"default\": [\n        0,\n        0\n      ],\n      \"transition\": true,\n      \"units\": \"pixels\",\n      \"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.\",\n      \"requires\": [\n        \"text-field\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"text-translate-anchor\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"The text is translated relative to the map.\"\n        },\n        \"viewport\": {\n          \"doc\": \"The text is translated relative to the viewport.\"\n        }\n      },\n      \"doc\": \"Controls the frame of reference for `text-translate`.\",\n      \"default\": \"map\",\n      \"requires\": [\n        \"text-field\",\n        \"text-translate\"\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    }\n  },\n  \"paint_raster\": {\n    \"raster-opacity\": {\n      \"type\": \"number\",\n      \"doc\": \"The opacity at which the image will be drawn.\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"raster-hue-rotate\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"period\": 360,\n      \"transition\": true,\n      \"units\": \"degrees\",\n      \"doc\": \"Rotates hues around the color wheel.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"raster-brightness-min\": {\n      \"type\": \"number\",\n      \"doc\": \"Increase or reduce the brightness of the image. The value is the minimum brightness.\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"raster-brightness-max\": {\n      \"type\": \"number\",\n      \"doc\": \"Increase or reduce the brightness of the image. The value is the maximum brightness.\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"raster-saturation\": {\n      \"type\": \"number\",\n      \"doc\": \"Increase or reduce the saturation of the image.\",\n      \"default\": 0,\n      \"minimum\": -1,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"raster-contrast\": {\n      \"type\": \"number\",\n      \"doc\": \"Increase or reduce the contrast of the image.\",\n      \"default\": 0,\n      \"minimum\": -1,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"raster-resampling\": {\n      \"type\": \"enum\",\n      \"doc\": \"The resampling/interpolation method to use for overscaling, also known as texture magnification filter\",\n      \"values\": {\n        \"linear\": {\n          \"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\"\n        },\n        \"nearest\": {\n          \"doc\": \"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled\"\n        }\n      },\n      \"default\": \"linear\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.47.0\",\n          \"android\": \"6.3.0\",\n          \"ios\": \"4.2.0\",\n          \"macos\": \"0.9.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"raster-fade-duration\": {\n      \"type\": \"number\",\n      \"default\": 300,\n      \"minimum\": 0,\n      \"transition\": false,\n      \"units\": \"milliseconds\",\n      \"doc\": \"Fade duration when a new tile is added.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    }\n  },\n  \"paint_hillshade\": {\n    \"hillshade-illumination-direction\": {\n      \"type\": \"number\",\n      \"default\": 335,\n      \"minimum\": 0,\n      \"maximum\": 359,\n      \"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`.\",\n      \"transition\": false,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"hillshade-illumination-anchor\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"map\": {\n          \"doc\": \"The hillshade illumination is relative to the north direction.\"\n        },\n        \"viewport\": {\n          \"doc\": \"The hillshade illumination is relative to the top of the viewport.\"\n        }\n      },\n      \"default\": \"viewport\",\n      \"doc\": \"Direction of light source when map is rotated.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"hillshade-exaggeration\": {\n      \"type\": \"number\",\n      \"doc\": \"Intensity of the hillshade\",\n      \"default\": 0.5,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"hillshade-shadow-color\": {\n      \"type\": \"color\",\n      \"default\": \"#000000\",\n      \"doc\": \"The shading color of areas that face away from the light source.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"hillshade-highlight-color\": {\n      \"type\": \"color\",\n      \"default\": \"#FFFFFF\",\n      \"doc\": \"The shading color of areas that faces towards the light source.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"hillshade-accent-color\": {\n      \"type\": \"color\",\n      \"default\": \"#000000\",\n      \"doc\": \"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.43.0\",\n          \"android\": \"6.0.0\",\n          \"ios\": \"4.0.0\",\n          \"macos\": \"0.7.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    }\n  },\n  \"paint_background\": {\n    \"background-color\": {\n      \"type\": \"color\",\n      \"default\": \"#000000\",\n      \"doc\": \"The color with which the background will be drawn.\",\n      \"transition\": true,\n      \"requires\": [\n        {\n          \"!\": \"background-pattern\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"background-pattern\": {\n      \"type\": \"resolvedImage\",\n      \"transition\": true,\n      \"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.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        },\n        \"data-driven styling\": {}\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"cross-faded\"\n    },\n    \"background-opacity\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"doc\": \"The opacity at which the background will be drawn.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"0.10.0\",\n          \"android\": \"2.0.1\",\n          \"ios\": \"2.0.0\",\n          \"macos\": \"0.1.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    }\n  },\n  \"paint_sky\": {\n    \"sky-type\": {\n      \"type\": \"enum\",\n      \"values\": {\n        \"gradient\": {\n          \"doc\": \"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`.\"\n        },\n        \"atmosphere\": {\n          \"doc\": \"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`.\"\n        }\n      },\n      \"default\": \"atmosphere\",\n      \"doc\": \"The type of the sky\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"sky-atmosphere-sun\": {\n      \"type\": \"array\",\n      \"value\": \"number\",\n      \"length\": 2,\n      \"units\": \"degrees\",\n      \"minimum\": [0, 0],\n      \"maximum\": [360, 180],\n      \"transition\": false,\n      \"doc\": \"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      },\n      \"requires\": [\n        {\n          \"sky-type\": \"atmosphere\"\n        }\n      ],\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"sky-atmosphere-sun-intensity\": {\n      \"type\": \"number\",\n      \"requires\": [\n        {\n          \"sky-type\": \"atmosphere\"\n        }\n      ],\n      \"default\": 10,\n      \"minimum\": 0,\n      \"maximum\": 100,\n      \"transition\": false,\n      \"doc\": \"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"sky-gradient-center\": {\n      \"type\": \"array\",\n      \"requires\": [\n        {\n          \"sky-type\": \"gradient\"\n        }\n      ],\n      \"value\": \"number\",\n      \"default\": [\n        0,\n        0\n      ],\n      \"length\": 2,\n      \"units\": \"degrees\",\n      \"minimum\": [0, 0],\n      \"maximum\": [360, 180],\n      \"transition\": false,\n      \"doc\": \"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"sky-gradient-radius\": {\n      \"type\": \"number\",\n      \"requires\": [\n        {\n          \"sky-type\": \"gradient\"\n        }\n      ],\n      \"default\": 90,\n      \"minimum\": 0,\n      \"maximum\": 180,\n      \"transition\": false,\n      \"doc\": \"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.\",\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": false,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"sky-gradient\": {\n      \"type\": \"color\",\n      \"default\": [\n        \"interpolate\",\n        [\n          \"linear\"\n        ],\n        [\n          \"sky-radial-progress\"\n        ],\n        0.8,\n        \"#87ceeb\",\n        1,\n        \"white\"\n      ],\n      \"doc\": \"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.\",\n      \"transition\": false,\n      \"requires\": [\n        {\n          \"sky-type\": \"gradient\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        },\n        \"data-driven styling\": {}\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"sky-radial-progress\"\n        ]\n      },\n      \"property-type\": \"color-ramp\"\n    },\n    \"sky-atmosphere-halo-color\": {\n      \"type\": \"color\",\n      \"default\": \"white\",\n      \"doc\": \"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.\",\n      \"transition\": false,\n      \"requires\": [\n        {\n          \"sky-type\": \"atmosphere\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"sky-atmosphere-color\": {\n      \"type\": \"color\",\n      \"default\": \"white\",\n      \"doc\": \"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.\",\n      \"transition\": false,\n      \"requires\": [\n        {\n          \"sky-type\": \"atmosphere\"\n        }\n      ],\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      },\n      \"property-type\": \"data-constant\"\n    },\n    \"sky-opacity\": {\n      \"type\": \"number\",\n      \"default\": 1,\n      \"minimum\": 0,\n      \"maximum\": 1,\n      \"doc\": \"The opacity of the entire sky layer.\",\n      \"transition\": true,\n      \"sdk-support\": {\n        \"basic functionality\": {\n          \"js\": \"2.0.0\",\n          \"ios\": \"10.0.0\",\n          \"android\": \"10.0.0\"\n        }\n      },\n      \"expression\": {\n        \"interpolated\": true,\n        \"parameters\": [\n          \"zoom\"\n        ]\n      },\n      \"property-type\": \"data-constant\"\n    }\n  },\n  \"transition\": {\n    \"duration\": {\n      \"type\": \"number\",\n      \"default\": 300,\n      \"minimum\": 0,\n      \"units\": \"milliseconds\",\n      \"doc\": \"Time allotted for transitions to complete.\"\n    },\n    \"delay\": {\n      \"type\": \"number\",\n      \"default\": 0,\n      \"minimum\": 0,\n      \"units\": \"milliseconds\",\n      \"doc\": \"Length of time before a transition begins.\"\n    }\n  },\n  \"property-type\": {\n    \"data-driven\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property is interpolable and can be represented using a property expression.\"\n    },\n    \"cross-faded\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms.\"\n    },\n    \"cross-faded-data-driven\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression.\"\n    },\n    \"color-ramp\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation.\"\n    },\n    \"data-constant\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property is interpolable but cannot be represented using a property expression.\"\n    },\n    \"constant\": {\n      \"type\": \"property-type\",\n      \"doc\": \"Property is constant across all zoom levels and property values.\"\n    }\n  },\n  \"promoteId\": {\n    \"*\": {\n      \"type\": \"string\",\n      \"doc\": \"A name of a feature property to use as ID for feature state.\"\n    }\n  }\n}\n","// @flow\n\nimport {createExpression} from '../expression/index.js';\nimport {isFeatureConstant} from '../expression/is_constant.js';\nimport {deepUnbundle} from '../util/unbundle_jsonlint.js';\nimport latest from '../reference/latest.js';\nimport type {GlobalProperties, Feature} from '../expression/index.js';\nimport type {CanonicalTileID} from '../../source/tile_id.js';\nimport type Point from '@mapbox/point-geometry';\n\nexport type FeatureDistanceData = {bearing: [number, number], center: [number, number], scale: number};\nexport type FilterExpression = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData) => boolean;\nexport type FeatureFilter = {filter: FilterExpression, dynamicFilter?: FilterExpression, needGeometry: boolean, needFeature: boolean};\n\nexport default createFilter;\nexport {isExpressionFilter, isDynamicFilter, extractStaticFilter};\n\nfunction isExpressionFilter(filter: any): boolean {\n    if (filter === true || filter === false) {\n        return true;\n    }\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\n    case 'in':\n        return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n\n    case '!in':\n    case '!has':\n    case 'none':\n        return false;\n\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\n    case 'any':\n    case 'all':\n        for (const f of filter.slice(1)) {\n            if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n                return false;\n            }\n        }\n        return true;\n\n    default:\n        return true;\n    }\n}\n\n/**\n * Given a filter expressed as nested arrays, return a new function\n * that evaluates whether a given feature (with a .properties or .tags property)\n * passes its test.\n *\n * @private\n * @param {Array} filter mapbox gl filter\n * @param {string} layerType the type of the layer this filter will be applied to.\n * @returns {Function} filter-evaluating function\n */\nfunction createFilter(filter: any, layerType?: string = 'fill'): FeatureFilter {\n    if (filter === null || filter === undefined) {\n        return {filter: () => true, needGeometry: false, needFeature: false};\n    }\n\n    if (!isExpressionFilter(filter)) {\n        filter = convertFilter(filter);\n    }\n    const filterExp = ((filter: any): string[] | string | boolean);\n\n    let staticFilter = true;\n    try {\n        staticFilter = extractStaticFilter(filterExp);\n    } catch (e) {\n        console.warn(\n`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate.\nThis is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md\nand paste the contents of this message in the report.\nThank you!\nFilter Expression:\n${JSON.stringify(filterExp, null, 2)}\n        `);\n    }\n\n    // Compile the static component of the filter\n    const filterSpec = latest[`filter_${layerType}`];\n    const compiledStaticFilter = createExpression(staticFilter, filterSpec);\n\n    let filterFunc = null;\n    if (compiledStaticFilter.result === 'error') {\n        throw new Error(compiledStaticFilter.value.map(err => `${err.key}: ${err.message}`).join(', '));\n    } else {\n        filterFunc = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID) => compiledStaticFilter.value.evaluate(globalProperties, feature, {}, canonical);\n    }\n\n    // If the static component is not equal to the entire filter then we have a dynamic component\n    // Compile the dynamic component separately\n    let dynamicFilterFunc = null;\n    let needFeature = null;\n    if (staticFilter !== filterExp) {\n        const compiledDynamicFilter = createExpression(filterExp, filterSpec);\n\n        if (compiledDynamicFilter.result === 'error') {\n            throw new Error(compiledDynamicFilter.value.map(err => `${err.key}: ${err.message}`).join(', '));\n        } else {\n            dynamicFilterFunc = (globalProperties: GlobalProperties, feature: Feature, canonical?: CanonicalTileID, featureTileCoord?: Point, featureDistanceData?: FeatureDistanceData) => compiledDynamicFilter.value.evaluate(globalProperties, feature, {}, canonical, undefined, undefined, featureTileCoord, featureDistanceData);\n            needFeature = !isFeatureConstant(compiledDynamicFilter.value.expression);\n        }\n    }\n\n    filterFunc = ((filterFunc: any): FilterExpression);\n    const needGeometry = geometryNeeded(staticFilter);\n\n    return {\n        filter: filterFunc,\n        dynamicFilter: dynamicFilterFunc ? dynamicFilterFunc : undefined,\n        needGeometry,\n        needFeature: !!needFeature\n    };\n}\n\nfunction extractStaticFilter(filter: any): any {\n    if (!isDynamicFilter(filter)) {\n        return filter;\n    }\n\n    // Shallow copy so we can replace expressions in-place\n    let result = deepUnbundle(filter);\n\n    // 1. Union branches\n    unionDynamicBranches(result);\n\n    // 2. Collapse dynamic conditions to  `true`\n    result = collapseDynamicBooleanExpressions(result);\n\n    return result;\n}\n\nfunction collapseDynamicBooleanExpressions(expression: any): any {\n    if (!Array.isArray(expression)) {\n        return expression;\n    }\n\n    const collapsed = collapsedExpression(expression);\n    if (collapsed === true) {\n        return collapsed;\n    } else {\n        return collapsed.map((subExpression) => collapseDynamicBooleanExpressions(subExpression));\n    }\n}\n\n/**\n * Traverses the expression and replaces all instances of branching on a\n * `dynamic` conditional (such as `['pitch']` or `['distance-from-center']`)\n * into an `any` expression.\n * This ensures that all possible outcomes of a `dynamic` branch are considered\n * when evaluating the expression upfront during filtering.\n *\n * @param {Array<any>} filter the filter expression mutated in-place.\n */\nfunction unionDynamicBranches(filter: any) {\n    let isBranchingDynamically = false;\n    const branches = [];\n\n    if (filter[0] === 'case') {\n        for (let i = 1; i < filter.length - 1; i += 2) {\n            isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[i]);\n            branches.push(filter[i + 1]);\n        }\n\n        branches.push(filter[filter.length - 1]);\n    } else if (filter[0] === 'match') {\n        isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]);\n\n        for (let i = 2; i < filter.length - 1; i += 2) {\n            branches.push(filter[i + 1]);\n        }\n        branches.push(filter[filter.length - 1]);\n    } else if (filter[0] === 'step') {\n        isBranchingDynamically = isBranchingDynamically || isDynamicFilter(filter[1]);\n\n        for (let i = 1; i < filter.length - 1; i += 2) {\n            branches.push(filter[i + 1]);\n        }\n    }\n\n    if (isBranchingDynamically) {\n        filter.length = 0;\n        filter.push('any', ...branches);\n    }\n\n    // traverse and recurse into children\n    for (let i = 1; i < filter.length; i++) {\n        unionDynamicBranches(filter[i]);\n    }\n}\n\nfunction isDynamicFilter(filter: any): boolean {\n    // Base Cases\n    if (!Array.isArray(filter)) {\n        return false;\n    }\n    if (isRootExpressionDynamic(filter[0])) {\n        return true;\n    }\n\n    for (let i = 1; i < filter.length; i++) {\n        const child = filter[i];\n        if (isDynamicFilter(child)) {\n            return true;\n        }\n    }\n\n    return false;\n}\n\nfunction isRootExpressionDynamic(expression: string): boolean {\n    return expression === 'pitch' ||\n        expression === 'distance-from-center';\n}\n\nconst dynamicConditionExpressions = new Set([\n    'in',\n    '==',\n    '!=',\n    '>',\n    '>=',\n    '<',\n    '<=',\n    'to-boolean'\n]);\n\nfunction collapsedExpression(expression: any): any {\n    if (dynamicConditionExpressions.has(expression[0])) {\n\n        for (let i = 1; i < expression.length; i++) {\n            const param = expression[i];\n            if (isDynamicFilter(param)) {\n                return true;\n            }\n        }\n    }\n    return expression;\n}\n\n// Comparison function to sort numbers and strings\nfunction compare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\n\nfunction geometryNeeded(filter) {\n    if (!Array.isArray(filter)) return false;\n    if (filter[0] === 'within') return true;\n    for (let index = 1; index < filter.length; index++) {\n        if (geometryNeeded(filter[index])) return true;\n    }\n    return false;\n}\n\nfunction convertFilter(filter: ?Array<any>): mixed {\n    if (!filter) return true;\n    const op = filter[0];\n    if (filter.length <= 1) return (op !== 'any');\n    const converted =\n        op === '==' ? convertComparisonOp(filter[1], filter[2], '==') :\n        op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2], '==')) :\n        op === '<' ||\n        op === '>' ||\n        op === '<=' ||\n        op === '>=' ? convertComparisonOp(filter[1], filter[2], op) :\n        op === 'any' ? convertDisjunctionOp(filter.slice(1)) :\n        op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) :\n        op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) :\n        op === 'in' ? convertInOp(filter[1], filter.slice(2)) :\n        op === '!in' ? convertNegation(convertInOp(filter[1], filter.slice(2))) :\n        op === 'has' ? convertHasOp(filter[1]) :\n        op === '!has' ? convertNegation(convertHasOp(filter[1])) :\n        op === 'within' ? filter :\n        true;\n    return converted;\n}\n\nfunction convertComparisonOp(property: string, value: any, op: string) {\n    switch (property) {\n    case '$type':\n        return [`filter-type-${op}`, value];\n    case '$id':\n        return [`filter-id-${op}`, value];\n    default:\n        return [`filter-${op}`, property, value];\n    }\n}\n\nfunction convertDisjunctionOp(filters: Array<Array<any>>) {\n    return ['any'].concat(filters.map(convertFilter));\n}\n\nfunction convertInOp(property: string, values: Array<any>) {\n    if (values.length === 0) { return false; }\n    switch (property) {\n    case '$type':\n        return [`filter-type-in`, ['literal', values]];\n    case '$id':\n        return [`filter-id-in`, ['literal', values]];\n    default:\n        if (values.length > 200 && !values.some(v => typeof v !== typeof values[0])) {\n            return ['filter-in-large', property, ['literal', values.sort(compare)]];\n        } else {\n            return ['filter-in-small', property, ['literal', values]];\n        }\n    }\n}\n\nfunction convertHasOp(property: string) {\n    switch (property) {\n    case '$type':\n        return true;\n    case '$id':\n        return [`filter-has-id`];\n    default:\n        return [`filter-has`, property];\n    }\n}\n\nfunction convertNegation(filter: mixed) {\n    return ['!', filter];\n}\n","// @flow\nexport default ['type', 'source', 'source-layer', 'minzoom', 'maxzoom', 'filter', 'layout'];\n","// @flow\n\nimport refProperties from './util/ref_properties.js';\n\nimport type {LayerSpecification} from './types.js';\n\nfunction deref(layer: LayerSpecification, parent: LayerSpecification): LayerSpecification {\n    const result = {};\n\n    for (const k in layer) {\n        if (k !== 'ref') {\n            result[k] = layer[k];\n        }\n    }\n\n    refProperties.forEach((k) => {\n        if (k in parent) {\n            result[k] = (parent: any)[k];\n        }\n    });\n\n    return ((result: any): LayerSpecification);\n}\n\n/**\n * Given an array of layers, some of which may contain `ref` properties\n * whose value is the `id` of another property, return a new array where\n * such layers have been augmented with the 'type', 'source', etc. properties\n * from the parent layer, and the `ref` property has been removed.\n *\n * The input is not modified. The output may contain references to portions\n * of the input.\n *\n * @private\n * @param {Array<Layer>} layers\n * @returns {Array<Layer>}\n */\nexport default function derefLayers(layers: Array<LayerSpecification>): Array<LayerSpecification> {\n    layers = layers.slice();\n\n    const map = Object.create(null);\n    for (let i = 0; i < layers.length; i++) {\n        map[layers[i].id] = layers[i];\n    }\n\n    for (let i = 0; i < layers.length; i++) {\n        if ('ref' in layers[i]) {\n            layers[i] = deref(layers[i], map[(layers[i]: any).ref]);\n        }\n    }\n\n    return layers;\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 font = 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        var previousPart = parts.length > 1 ? parts[parts.length - 2].toLowerCase() : '';\n        if (maybeWeight == w || maybeWeight == w.replace('-', '') || previousPart + '-' + maybeWeight == w) {\n          weight = haveWeight ? weight : fontWeights[w];\n          parts.pop();\n          if (previousPart && w.startsWith(previousPart)) {\n            parts.pop();\n          }\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 Sans');\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","const mapboxBaseUrl = 'https://api.mapbox.com';\n\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  const startsWith = 'mapbox://';\n  if (url.indexOf(startsWith) !== 0) {\n    return '';\n  }\n  return url.slice(startsWith.length);\n}\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 * @param {string} styleUrl The style URL.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeSpriteUrl(url, token, styleUrl) {\n  const mapboxPath = getMapboxPath(url);\n  if (!mapboxPath) {\n    return decodeURI(new URL(url, styleUrl).href);\n  }\n  const startsWith = 'sprites/';\n  if (mapboxPath.indexOf(startsWith) !== 0) {\n    throw new Error(`unexpected sprites url: ${url}`);\n  }\n  const sprite = mapboxPath.slice(startsWith.length);\n\n  return `${mapboxBaseUrl}/styles/v1/${sprite}/sprite?access_token=${token}`;\n}\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  const mapboxPath = getMapboxPath(url);\n  if (!mapboxPath) {\n    return decodeURI(new URL(url, location.href).href);\n  }\n  const startsWith = 'styles/';\n  if (mapboxPath.indexOf(startsWith) !== 0) {\n    throw new Error(`unexpected style url: ${url}`);\n  }\n  const style = mapboxPath.slice(startsWith.length);\n\n  return `${mapboxBaseUrl}/styles/v1/${style}?&access_token=${token}`;\n}\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 * @param {string} tokenParam The access token key.\n * @param {string} styleUrl The style URL.\n * @return {string} A vector tile template.\n * @private\n */\nexport function normalizeSourceUrl(url, token, tokenParam, styleUrl) {\n  const urlObject = new URL(url, styleUrl);\n  const mapboxPath = getMapboxPath(url);\n  if (!mapboxPath) {\n    if (!token) {\n      return decodeURI(urlObject.href);\n    }\n    urlObject.searchParams.set(tokenParam, token);\n    return decodeURI(urlObject.href);\n  }\n  return `https://{a-d}.tiles.mapbox.com/v4/${mapboxPath}/{z}/{x}/{y}.vector.pbf?access_token=${token}`;\n}\n","import {assign} from 'ol/obj.js';\nimport {normalizeSourceUrl, normalizeStyleUrl} from './mapbox.js';\n\nexport function deg2rad(degrees) {\n  return (degrees * Math.PI) / 180;\n}\n\nexport const defaultResolutions = (function () {\n  const resolutions = [];\n  for (let res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n    resolutions.push(res);\n  }\n  return resolutions;\n})();\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  } else {\n    const canvas = document.createElement('canvas');\n    canvas.width = width;\n    canvas.height = height;\n    return canvas;\n  }\n}\n\nexport function getZoomForResolution(resolution, resolutions) {\n  let i = 0;\n  const ii = resolutions.length;\n  for (; i < ii; ++i) {\n    const candidate = resolutions[i];\n    if (candidate < resolution && i + 1 < ii) {\n      const zoomFactor = resolutions[i] / resolutions[i + 1];\n      return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n    }\n  }\n  return ii - 1;\n}\n\nconst pendingRequests = {};\n/**\n * @param {ResourceType} resourceType Type of resource to load.\n * @param {string} url Url of the resource.\n * @param {Options} [options={}] Options.\n * @return {Promise<Object|Response>} Promise that resolves with the loaded resource\n * or rejects with the Response object.\n * @private\n */\nexport function fetchResource(resourceType, url, options = {}) {\n  if (url in pendingRequests) {\n    return pendingRequests[url];\n  } else {\n    const request = options.transformRequest\n      ? options.transformRequest(url, resourceType) || new Request(url)\n      : new Request(url);\n    if (!request.headers.get('Accept')) {\n      request.headers.set('Accept', 'application/json');\n    }\n    const pendingRequest = fetch(request)\n      .then(function (response) {\n        delete pendingRequests[url];\n        return response.ok\n          ? response.json()\n          : Promise.reject(new Error('Error fetching source ' + url));\n      })\n      .catch(function (error) {\n        delete pendingRequests[url];\n        return Promise.reject(new Error('Error fetching source ' + url));\n      });\n    pendingRequests[url] = pendingRequest;\n    return pendingRequest;\n  }\n}\n\nexport function getGlStyle(glStyleOrUrl, options) {\n  if (typeof glStyleOrUrl === 'string') {\n    if (glStyleOrUrl.trim().startsWith('{')) {\n      try {\n        const glStyle = JSON.parse(glStyleOrUrl);\n        return Promise.resolve(glStyle);\n      } catch (error) {\n        return Promise.reject(error);\n      }\n    } else {\n      glStyleOrUrl = normalizeStyleUrl(glStyleOrUrl, options.accessToken);\n      return fetchResource('Style', glStyleOrUrl, options);\n    }\n  } else {\n    return Promise.resolve(glStyleOrUrl);\n  }\n}\n\nconst tilejsonCache = {};\n/**\n * @param {Object} glSource glStyle source object.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Object} TileJson\n */\nexport function getTileJson(glSource, styleUrl, options = {}) {\n  const cacheKey = [styleUrl, JSON.stringify(glSource)].toString();\n  let promise = tilejsonCache[cacheKey];\n  if (!promise || options.transformRequest) {\n    const url = glSource.url;\n    if (url) {\n      let normalizedSourceUrl = normalizeSourceUrl(\n        url,\n        options.accessToken,\n        options.accessTokenParam || 'access_token',\n        styleUrl || location.href\n      );\n      if (url.startsWith('mapbox://')) {\n        promise = Promise.resolve(\n          assign({}, glSource, {\n            url: undefined,\n            tiles: normalizedSourceUrl,\n          })\n        );\n      } else {\n        promise = fetchResource('Source', normalizedSourceUrl, options).then(\n          function (tileJson) {\n            for (let i = 0, ii = tileJson.tiles.length; i < ii; ++i) {\n              const tileUrl = tileJson.tiles[i];\n              if (options.transformRequest) {\n                const request = options.transformRequest(\n                  normalizedSourceUrl,\n                  'Source'\n                );\n                if (request) {\n                  normalizedSourceUrl = request.url;\n                }\n              }\n              let normalizedTileUrl = normalizeSourceUrl(\n                tileUrl,\n                options.accessToken,\n                options.accessTokenParam || 'access_token',\n                normalizedSourceUrl\n              );\n              if (options.transformRequest) {\n                const transformedRequest = options.transformRequest(\n                  normalizedTileUrl,\n                  'Tiles'\n                );\n                if (transformedRequest instanceof Request) {\n                  normalizedTileUrl = decodeURI(transformedRequest.url);\n                }\n              }\n              tileJson.tiles[i] = normalizedTileUrl;\n            }\n            return Promise.resolve(tileJson);\n          }\n        );\n      }\n    } else {\n      glSource = assign({}, glSource, {\n        tiles: glSource.tiles.map(function (tileUrl) {\n          return normalizeSourceUrl(\n            tileUrl,\n            options.accessToken,\n            options.accessTokenParam || 'access_token',\n            styleUrl || location.href\n          );\n        }),\n      });\n      promise = Promise.resolve(assign({}, glSource));\n    }\n    tilejsonCache[cacheKey] = promise;\n  }\n  return promise;\n}\n\n/**\n * @typedef {import(\"./apply.js\").Options} Options\n * @typedef {import('./apply.js').ResourceType} ResourceType\n * @private\n */\n","import mb2css from 'mapbox-to-css-font';\nimport {checkedFonts, registerFont} from 'ol/render/canvas.js';\nimport {createCanvas} from './util.js';\n\nconst hairSpacePool = Array(256).join('\\u200A');\nexport function applyLetterSpacing(text, letterSpacing) {\n  if (letterSpacing >= 0.05) {\n    let textWithLetterSpacing = '';\n    const lines = text.split('\\n');\n    const joinSpaceString = hairSpacePool.slice(\n      0,\n      Math.round(letterSpacing / 0.1)\n    );\n    for (let 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}\n\nlet measureContext;\nfunction getMeasureContext() {\n  if (!measureContext) {\n    measureContext = createCanvas(1, 1).getContext('2d');\n  }\n  return measureContext;\n}\n\nfunction measureText(text, letterSpacing) {\n  return (\n    getMeasureContext().measureText(text).width +\n    (text.length - 1) * letterSpacing\n  );\n}\n\nconst measureCache = {};\nexport function wrapText(text, font, em, letterSpacing) {\n  if (text.indexOf('\\n') !== -1) {\n    const hardLines = text.split('\\n');\n    const lines = [];\n    for (let 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  const key = em + ',' + font + ',' + text + ',' + letterSpacing;\n  let wrappedText = measureCache[key];\n  if (!wrappedText) {\n    const words = text.split(' ');\n    if (words.length > 1) {\n      const ctx = getMeasureContext();\n      ctx.font = font;\n      const oneEm = ctx.measureText('M').width;\n      const maxWidth = oneEm * em;\n      let line = '';\n      const lines = [];\n      // Pass 1 - wrap lines to not exceed maxWidth\n      for (let i = 0, ii = words.length; i < ii; ++i) {\n        const word = words[i];\n        const testLine = line + (line ? ' ' : '') + word;\n        if (measureText(testLine, letterSpacing) <= maxWidth) {\n          line = testLine;\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 (let i = 0, ii = lines.length; i < ii && ii > 1; ++i) {\n        const line = lines[i];\n        if (measureText(line, letterSpacing) < maxWidth * 0.35) {\n          const prevWidth =\n            i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n          const nextWidth =\n            i < ii - 1 ? measureText(lines[i + 1], letterSpacing) : Infinity;\n          lines.splice(i, 1);\n          ii -= 1;\n          if (prevWidth < nextWidth) {\n            lines[i - 1] += ' ' + line;\n            i -= 1;\n          } else {\n            lines[i] = line + ' ' + lines[i];\n          }\n        }\n      }\n      // Pass 3 - try to fill 80% of maxWidth for each line\n      for (let i = 0, ii = lines.length - 1; i < ii; ++i) {\n        const line = lines[i];\n        const next = lines[i + 1];\n        if (\n          measureText(line, letterSpacing) > maxWidth * 0.7 &&\n          measureText(next, letterSpacing) < maxWidth * 0.6\n        ) {\n          const lineWords = line.split(' ');\n          const 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    } else {\n      wrappedText = text;\n    }\n    wrappedText = applyLetterSpacing(wrappedText, letterSpacing);\n    measureCache[key] = wrappedText;\n  }\n  return wrappedText;\n}\n\nconst fontFamilyRegEx = /font-family: ?([^;]*);/;\nconst stripQuotesRegEx = /(\"|')/g;\nlet loadedFontFamilies;\nfunction hasFontFamily(family) {\n  if (!loadedFontFamilies) {\n    loadedFontFamilies = {};\n    const styleSheets = document.styleSheets;\n    for (let i = 0, ii = styleSheets.length; i < ii; ++i) {\n      const styleSheet = /** @type {CSSStyleSheet} */ (styleSheets[i]);\n      try {\n        const cssRules = styleSheet.rules || styleSheet.cssRules;\n        if (cssRules) {\n          for (let j = 0, jj = cssRules.length; j < jj; ++j) {\n            const cssRule = cssRules[j];\n            if (cssRule.type == 5) {\n              const match = cssRule.cssText.match(fontFamilyRegEx);\n              loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true;\n            }\n          }\n        }\n      } catch (e) {\n        // empty catch block\n      }\n    }\n  }\n  return family in loadedFontFamilies;\n}\n\nconst processedFontFamilies = {};\n\n/**\n * @param {Array} fonts Fonts.\n * @return {Array} Processed fonts.\n * @private\n */\nexport function getFonts(fonts) {\n  const fontsKey = fonts.toString();\n  if (fontsKey in processedFontFamilies) {\n    return processedFontFamilies[fontsKey];\n  }\n  const googleFontDescriptions = [];\n  for (let i = 0, ii = fonts.length; i < ii; ++i) {\n    fonts[i] = fonts[i].replace('Arial Unicode MS', 'Arial');\n    const font = fonts[i];\n    const cssFont = mb2css(font, 1);\n    registerFont(cssFont);\n    const parts = cssFont.split(' ');\n    googleFontDescriptions.push([\n      parts.slice(3).join(' ').replace(/\"/g, ''),\n      parts[1],\n      parts[0],\n    ]);\n  }\n  for (let i = 0, ii = googleFontDescriptions.length; i < ii; ++i) {\n    const googleFontDescription = googleFontDescriptions[i];\n    const family = googleFontDescription[0];\n    if (!hasFontFamily(family)) {\n      if (\n        checkedFonts.get(\n          `${googleFontDescription[2]}\\n${googleFontDescription[1]} \\n${family}`\n        ) !== 100\n      ) {\n        const fontUrl =\n          'https://fonts.googleapis.com/css?family=' +\n          family.replace(/ /g, '+') +\n          ':' +\n          googleFontDescription[1] +\n          googleFontDescription[2];\n        if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n          const markup = document.createElement('link');\n          markup.href = fontUrl;\n          markup.rel = 'stylesheet';\n          document.head.appendChild(markup);\n        }\n      }\n    }\n  }\n  processedFontFamilies[fontsKey] = fonts;\n  return fonts;\n}\n","/*\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*/\n\nimport Circle from 'ol/style/Circle.js';\nimport Fill from 'ol/style/Fill.js';\nimport Icon from 'ol/style/Icon.js';\nimport RenderFeature from 'ol/render/Feature.js';\nimport Stroke from 'ol/style/Stroke.js';\nimport Style from 'ol/style/Style.js';\nimport Text from 'ol/style/Text.js';\n\nimport Color from '@mapbox/mapbox-gl-style-spec/util/color.js';\nimport convertFunction from '@mapbox/mapbox-gl-style-spec/function/convert.js';\nimport createFilter from '@mapbox/mapbox-gl-style-spec/feature_filter/index.js';\nimport derefLayers from '@mapbox/mapbox-gl-style-spec/deref.js';\nimport mb2css from 'mapbox-to-css-font';\nimport spec from '@mapbox/mapbox-gl-style-spec/reference/v8.json';\nimport {applyLetterSpacing, wrapText} from './text.js';\nimport {\n  createCanvas,\n  defaultResolutions,\n  deg2rad,\n  getZoomForResolution,\n} from './util.js';\nimport {\n  createPropertyExpression,\n  isExpression,\n} from '@mapbox/mapbox-gl-style-spec/expression/index.js';\nimport {isFunction} from '@mapbox/mapbox-gl-style-spec/function/index.js';\n\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 */\n\nconst types = {\n  'Point': 1,\n  'MultiPoint': 1,\n  'LineString': 2,\n  'MultiLineString': 2,\n  'Polygon': 3,\n  'MultiPolygon': 3,\n};\nconst 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};\n\nconst expressionData = function (rawExpression, propertySpec) {\n  const compiledExpression = createPropertyExpression(\n    rawExpression,\n    propertySpec\n  );\n  if (compiledExpression.result === 'error') {\n    throw new Error(\n      compiledExpression.value\n        .map((err) => `${err.key}: ${err.message}`)\n        .join(', ')\n    );\n  }\n  return compiledExpression.value;\n};\n\nconst emptyObj = {};\nconst zoomObj = {zoom: 0};\nlet renderFeatureCoordinates, renderFeature;\n\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 * @param {Object} [functionCache] Function cache.\n * @param {Object} [featureState] Feature state.\n * @return {?} Value.\n */\nexport function getValue(\n  layer,\n  layoutOrPaint,\n  property,\n  zoom,\n  feature,\n  functionCache,\n  featureState\n) {\n  const layerId = layer.id;\n  if (!functionCache) {\n    functionCache = {};\n    console.warn('No functionCache provided to getValue()'); //eslint-disable-line no-console\n  }\n  if (!functionCache[layerId]) {\n    functionCache[layerId] = {};\n  }\n  const functions = functionCache[layerId];\n  if (!functions[property]) {\n    let value = (layer[layoutOrPaint] || emptyObj)[property];\n    const propertySpec = spec[`${layoutOrPaint}_${layer.type}`][property];\n    if (value === undefined) {\n      value = propertySpec.default;\n    }\n    let isExpr = isExpression(value);\n    if (!isExpr && isFunction(value)) {\n      value = convertFunction(value, propertySpec);\n      isExpr = true;\n    }\n    if (isExpr) {\n      const compiledExpression = expressionData(value, propertySpec);\n      functions[property] =\n        compiledExpression.evaluate.bind(compiledExpression);\n    } else {\n      if (propertySpec.type == 'color') {\n        value = Color.parse(value);\n      }\n      functions[property] = function () {\n        return value;\n      };\n    }\n  }\n  zoomObj.zoom = zoom;\n  return functions[property](zoomObj, feature, featureState);\n}\n\n/**\n * @private\n * @param {Object} layer Gl object layer.\n * @param {number} zoom Zoom.\n * @param {Object} feature Gl feature.\n * @param {Object} [functionCache] Function cache.\n * @return {\"declutter\"|\"obstacle\"|\"none\"} Value.\n */\nfunction getIconDeclutterMode(layer, zoom, feature, functionCache) {\n  const allowOverlap = getValue(\n    layer,\n    'layout',\n    'icon-allow-overlap',\n    zoom,\n    feature,\n    functionCache\n  );\n  if (!allowOverlap) {\n    return 'declutter';\n  }\n  const ignorePlacement = getValue(\n    layer,\n    'layout',\n    'icon-ignore-placement',\n    zoom,\n    feature,\n    functionCache\n  );\n  if (!ignorePlacement) {\n    return 'obstacle';\n  }\n  return 'none';\n}\n\n/**\n * @private\n * @param {string} layerId Layer id.\n * @param {?} filter Filter.\n * @param {Object} feature Feature.\n * @param {number} zoom Zoom.\n * @param {Object} [filterCache] Filter cache.\n * @return {boolean} Filter result.\n */\nfunction evaluateFilter(layerId, filter, feature, zoom, filterCache) {\n  if (!filterCache) {\n    console.warn('No filterCache provided to evaluateFilter()'); //eslint-disable-line no-console\n  }\n  if (!(layerId in filterCache)) {\n    filterCache[layerId] = createFilter(filter).filter;\n  }\n  zoomObj.zoom = zoom;\n  return filterCache[layerId](zoomObj, feature);\n}\n\nlet renderTransparentEnabled = false;\n\n/**\n * Configure whether features with a transparent style should be rendered. When\n * set to `true`, it will be possible to hit detect content that is not visible,\n * like transparent fills of polygons, using `ol/layer/Layer#getFeatures()` or\n * `ol/Map#getFeaturesAtPixel()`\n * @param {boolean} enabled Rendering of transparent elements is enabled.\n * Default is `false`.\n */\nexport function renderTransparent(enabled) {\n  renderTransparentEnabled = enabled;\n}\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 (!renderTransparentEnabled && (color.a === 0 || opacity === 0)) {\n      return undefined;\n    }\n    const a = color.a;\n    opacity = opacity === undefined ? 1 : opacity;\n    return a === 0\n      ? 'transparent'\n      : 'rgba(' +\n          Math.round((color.r * 255) / a) +\n          ',' +\n          Math.round((color.g * 255) / a) +\n          ',' +\n          Math.round((color.b * 255) / a) +\n          ',' +\n          a * opacity +\n          ')';\n  }\n  return color;\n}\n\nconst templateRegEx = /^([^]*)\\{(.*)\\}([^]*)$/;\n\n/**\n * @private\n * @param {string} text Text.\n * @param {Object} properties Properties.\n * @return {string} Text.\n */\nfunction fromTemplate(text, properties) {\n  let parts;\n  do {\n    parts = text.match(templateRegEx);\n    if (parts) {\n      const value = properties[parts[2]] || '';\n      text = parts[1] + value + parts[3];\n    }\n  } while (parts);\n  return text;\n}\n\nlet recordLayer = false;\n\n/**\n * Turns recording of the Mapbox Style's `layer` on and off. When turned on,\n * the layer that a rendered feature belongs to will be set as the feature's\n * `mapbox-layer` property.\n * @param {boolean} record Recording of the style layer is on.\n */\nexport function recordStyleLayer(record = false) {\n  recordLayer = record;\n}\n\n/**\n * Creates a style function from the `glStyle` object for all layers that use\n * the specified `source`, which 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 = 'anonymous';\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>} sourceOrLayers `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 style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {Array<number>} resolutions\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} spriteData 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 {string} spriteImageUrl Sprite image url for the sprite\n * specified in the Mapbox Style object's `sprite` property. Only required if a\n * `sprite` property is specified in the Mapbox Style object.\n * @param {function(Array<string>):Array<string>} getFonts 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 function stylefunction(\n  olLayer,\n  glStyle,\n  sourceOrLayers,\n  resolutions = defaultResolutions,\n  spriteData = undefined,\n  spriteImageUrl = undefined,\n  getFonts = undefined\n) {\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\n  let spriteImage, spriteImgSize;\n  if (spriteImageUrl) {\n    if (typeof Image !== 'undefined') {\n      const img = new Image();\n      img.crossOrigin = 'anonymous';\n      img.onload = function () {\n        spriteImage = img;\n        spriteImgSize = [img.width, img.height];\n        olLayer.changed();\n        img.onload = null;\n      };\n      img.src = spriteImageUrl;\n    } else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { //eslint-disable-line\n      const 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 (\n          event.data.action === 'imageLoaded' &&\n          event.data.src === spriteImageUrl\n        ) {\n          spriteImage = event.data.image;\n          spriteImgSize = [spriteImage.width, spriteImage.height];\n        }\n      });\n    }\n  }\n\n  const allLayers = derefLayers(glStyle.layers);\n\n  const layersBySourceLayer = {};\n  const mapboxLayers = [];\n\n  const iconImageCache = {};\n  const patternCache = {};\n  const functionCache = {};\n  const filterCache = {};\n\n  let mapboxSource;\n  for (let i = 0, ii = allLayers.length; i < ii; ++i) {\n    const layer = allLayers[i];\n    const layerId = layer.id;\n    if (\n      (typeof sourceOrLayers == 'string' && layer.source == sourceOrLayers) ||\n      sourceOrLayers.indexOf(layerId) !== -1\n    ) {\n      const sourceLayer = layer['source-layer'];\n      if (!mapboxSource) {\n        mapboxSource = layer.source;\n        const source = glStyle.sources[mapboxSource];\n        if (!source) {\n          throw new Error(`Source \"${mapboxSource}\" is not defined`);\n        }\n        const type = source.type;\n        if (type !== 'vector' && type !== 'geojson') {\n          throw new Error(\n            `Source \"${mapboxSource}\" is not of type \"vector\" or \"geojson\", but \"${type}\"`\n          );\n        }\n      } else if (layer.source !== mapboxSource) {\n        throw new Error(\n          `Layer \"${layerId}\" does not use source \"${mapboxSource}`\n        );\n      }\n      let layers = layersBySourceLayer[sourceLayer];\n      if (!layers) {\n        layers = [];\n        layersBySourceLayer[sourceLayer] = layers;\n      }\n      layers.push({\n        layer: layer,\n        index: i,\n      });\n      mapboxLayers.push(layerId);\n    }\n  }\n\n  const textHalo = new Stroke();\n  const textColor = new Fill();\n\n  const styles = [];\n\n  const styleFunction = function (feature, resolution) {\n    const properties = feature.getProperties();\n    const layers = layersBySourceLayer[properties.layer];\n    if (!layers) {\n      return;\n    }\n    let zoom = resolutions.indexOf(resolution);\n    if (zoom == -1) {\n      zoom = getZoomForResolution(resolution, resolutions);\n    }\n    const type = types[feature.getGeometry().getType()];\n    const f = {\n      properties: properties,\n      type: type,\n    };\n    const featureState = olLayer.get('mapbox-featurestate')[feature.getId()];\n    let stylesLength = -1;\n    let featureBelongsToLayer;\n    for (let i = 0, ii = layers.length; i < ii; ++i) {\n      const layerData = layers[i];\n      const layer = layerData.layer;\n      const layerId = layer.id;\n\n      const layout = layer.layout || emptyObj;\n      const paint = layer.paint || emptyObj;\n      if (\n        layout.visibility === 'none' ||\n        ('minzoom' in layer && zoom < layer.minzoom) ||\n        ('maxzoom' in layer && zoom >= layer.maxzoom)\n      ) {\n        continue;\n      }\n      const filter = layer.filter;\n      if (!filter || evaluateFilter(layerId, filter, f, zoom, filterCache)) {\n        featureBelongsToLayer = layer;\n        let color, opacity, fill, stroke, strokeColor, style;\n        const index = layerData.index;\n        if (\n          type == 3 &&\n          (layer.type == 'fill' || layer.type == 'fill-extrusion')\n        ) {\n          opacity = getValue(\n            layer,\n            'paint',\n            layer.type + '-opacity',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          if (layer.type + '-pattern' in paint) {\n            const fillIcon = getValue(\n              layer,\n              'paint',\n              layer.type + '-pattern',\n              zoom,\n              f,\n              functionCache,\n              featureState\n            );\n            if (fillIcon) {\n              const icon =\n                typeof fillIcon === 'string'\n                  ? fromTemplate(fillIcon, properties)\n                  : fillIcon.toString();\n              if (spriteImage && spriteData && spriteData[icon]) {\n                ++stylesLength;\n                style = styles[stylesLength];\n                if (\n                  !style ||\n                  !style.getFill() ||\n                  style.getStroke() ||\n                  style.getText()\n                ) {\n                  style = new Style({\n                    fill: new Fill(),\n                  });\n                  styles[stylesLength] = style;\n                }\n                fill = style.getFill();\n                style.setZIndex(index);\n                const icon_cache_key = icon + '.' + opacity;\n                let pattern = patternCache[icon_cache_key];\n                if (!pattern) {\n                  const spriteImageData = spriteData[icon];\n                  const canvas = createCanvas(\n                    spriteImageData.width,\n                    spriteImageData.height\n                  );\n                  const ctx = /** @type {CanvasRenderingContext2D} */ (\n                    canvas.getContext('2d')\n                  );\n                  ctx.globalAlpha = opacity;\n                  ctx.drawImage(\n                    spriteImage,\n                    spriteImageData.x,\n                    spriteImageData.y,\n                    spriteImageData.width,\n                    spriteImageData.height,\n                    0,\n                    0,\n                    spriteImageData.width,\n                    spriteImageData.height\n                  );\n                  pattern = ctx.createPattern(canvas, 'repeat');\n                  patternCache[icon_cache_key] = pattern;\n                }\n                fill.setColor(pattern);\n              }\n            }\n          } else {\n            color = colorWithOpacity(\n              getValue(\n                layer,\n                'paint',\n                layer.type + '-color',\n                zoom,\n                f,\n                functionCache,\n                featureState\n              ),\n              opacity\n            );\n            if (layer.type + '-outline-color' in paint) {\n              strokeColor = colorWithOpacity(\n                getValue(\n                  layer,\n                  'paint',\n                  layer.type + '-outline-color',\n                  zoom,\n                  f,\n                  functionCache,\n                  featureState\n                ),\n                opacity\n              );\n            }\n            if (!strokeColor) {\n              strokeColor = color;\n            }\n            if (color || strokeColor) {\n              ++stylesLength;\n              style = styles[stylesLength];\n              if (\n                !style ||\n                (color && !style.getFill()) ||\n                (!color && style.getFill()) ||\n                (strokeColor && !style.getStroke()) ||\n                (!strokeColor && style.getStroke()) ||\n                style.getText()\n              ) {\n                style = new Style({\n                  fill: color ? new Fill() : undefined,\n                  stroke: strokeColor ? new Stroke() : undefined,\n                });\n                styles[stylesLength] = style;\n              }\n              if (color) {\n                fill = style.getFill();\n                fill.setColor(color);\n              }\n              if (strokeColor) {\n                stroke = style.getStroke();\n                stroke.setColor(strokeColor);\n                stroke.setWidth(0.5);\n              }\n              style.setZIndex(index);\n            }\n          }\n        }\n        if (type != 1 && layer.type == 'line') {\n          color =\n            !('line-pattern' in paint) && 'line-color' in paint\n              ? colorWithOpacity(\n                  getValue(\n                    layer,\n                    'paint',\n                    'line-color',\n                    zoom,\n                    f,\n                    functionCache,\n                    featureState\n                  ),\n                  getValue(\n                    layer,\n                    'paint',\n                    'line-opacity',\n                    zoom,\n                    f,\n                    functionCache,\n                    featureState\n                  )\n                )\n              : undefined;\n          const width = getValue(\n            layer,\n            'paint',\n            'line-width',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          if (color && width > 0) {\n            ++stylesLength;\n            style = styles[stylesLength];\n            if (\n              !style ||\n              !style.getStroke() ||\n              style.getFill() ||\n              style.getText()\n            ) {\n              style = new Style({\n                stroke: new Stroke(),\n              });\n              styles[stylesLength] = style;\n            }\n            stroke = style.getStroke();\n            stroke.setLineCap(\n              getValue(\n                layer,\n                'layout',\n                'line-cap',\n                zoom,\n                f,\n                functionCache,\n                featureState\n              )\n            );\n            stroke.setLineJoin(\n              getValue(\n                layer,\n                'layout',\n                'line-join',\n                zoom,\n                f,\n                functionCache,\n                featureState\n              )\n            );\n            stroke.setMiterLimit(\n              getValue(\n                layer,\n                'layout',\n                'line-miter-limit',\n                zoom,\n                f,\n                functionCache,\n                featureState\n              )\n            );\n            stroke.setColor(color);\n            stroke.setWidth(width);\n            stroke.setLineDash(\n              paint['line-dasharray']\n                ? getValue(\n                    layer,\n                    'paint',\n                    'line-dasharray',\n                    zoom,\n                    f,\n                    functionCache,\n                    featureState\n                  ).map(function (x) {\n                    return x * width;\n                  })\n                : null\n            );\n            style.setZIndex(index);\n          }\n        }\n\n        let hasImage = false;\n        let text = null;\n        let placementAngle = 0;\n        let icon, iconImg, skipLabel;\n        if ((type == 1 || type == 2) && 'icon-image' in layout) {\n          const iconImage = getValue(\n            layer,\n            'layout',\n            'icon-image',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          if (iconImage) {\n            icon =\n              typeof iconImage === 'string'\n                ? fromTemplate(iconImage, properties)\n                : iconImage.toString();\n            let styleGeom = undefined;\n            if (spriteImage && spriteData && spriteData[icon]) {\n              const iconRotationAlignment = getValue(\n                layer,\n                'layout',\n                'icon-rotation-alignment',\n                zoom,\n                f,\n                functionCache,\n                featureState\n              );\n              if (type == 2) {\n                const geom = feature.getGeometry();\n                // ol package and ol-debug.js only\n                if (geom.getFlatMidpoint || geom.getFlatMidpoints) {\n                  const extent = geom.getExtent();\n                  const size = Math.sqrt(\n                    Math.max(\n                      Math.pow((extent[2] - extent[0]) / resolution, 2),\n                      Math.pow((extent[3] - extent[1]) / resolution, 2)\n                    )\n                  );\n                  if (size > 150) {\n                    //FIXME Do not hard-code a size of 150\n                    const midpoint =\n                      geom.getType() === 'MultiLineString'\n                        ? geom.getFlatMidpoints()\n                        : geom.getFlatMidpoint();\n                    if (!renderFeature) {\n                      renderFeatureCoordinates = [NaN, NaN];\n                      renderFeature = new RenderFeature(\n                        'Point',\n                        renderFeatureCoordinates,\n                        [],\n                        {},\n                        null\n                      );\n                    }\n                    styleGeom = renderFeature;\n                    renderFeatureCoordinates[0] = midpoint[0];\n                    renderFeatureCoordinates[1] = midpoint[1];\n                    const placement = getValue(\n                      layer,\n                      'layout',\n                      'symbol-placement',\n                      zoom,\n                      f,\n                      functionCache,\n                      featureState\n                    );\n                    if (\n                      placement === 'line' &&\n                      iconRotationAlignment === 'map'\n                    ) {\n                      const stride = geom.getStride();\n                      const coordinates = geom.getFlatCoordinates();\n                      for (\n                        let i = 0, ii = coordinates.length - stride;\n                        i < ii;\n                        i += stride\n                      ) {\n                        const x1 = coordinates[i];\n                        const y1 = coordinates[i + 1];\n                        const x2 = coordinates[i + stride];\n                        const y2 = coordinates[i + stride + 1];\n                        const minX = Math.min(x1, x2);\n                        const minY = Math.min(y1, y2);\n                        const maxX = Math.max(x1, x2);\n                        const maxY = Math.max(y1, y2);\n                        if (\n                          midpoint[0] >= minX &&\n                          midpoint[0] <= maxX &&\n                          midpoint[1] >= minY &&\n                          midpoint[1] <= maxY\n                        ) {\n                          placementAngle = Math.atan2(y1 - y2, x2 - x1);\n                          break;\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n              if (type !== 2 || styleGeom) {\n                const iconSize = getValue(\n                  layer,\n                  'layout',\n                  'icon-size',\n                  zoom,\n                  f,\n                  functionCache,\n                  featureState\n                );\n                const iconColor =\n                  paint['icon-color'] !== undefined\n                    ? getValue(\n                        layer,\n                        'paint',\n                        'icon-color',\n                        zoom,\n                        f,\n                        functionCache,\n                        featureState\n                      )\n                    : null;\n                if (!iconColor || iconColor.a !== 0) {\n                  let 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                    const spriteImageData = spriteData[icon];\n\n                    const declutterMode = getIconDeclutterMode(\n                      layer,\n                      zoom,\n                      f,\n                      functionCache\n                    );\n                    iconImg = new Icon({\n                      color: iconColor\n                        ? [\n                            iconColor.r * 255,\n                            iconColor.g * 255,\n                            iconColor.b * 255,\n                            iconColor.a,\n                          ]\n                        : undefined,\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                      displacement:\n                        'icon-offset' in layout\n                          ? getValue(\n                              layer,\n                              'layout',\n                              'icon-offset',\n                              zoom,\n                              f,\n                              functionCache,\n                              featureState\n                            ).map((v) => -v * spriteImageData.pixelRatio)\n                          : undefined,\n                      declutterMode: declutterMode,\n                    });\n                    iconImageCache[icon_cache_key] = iconImg;\n                  }\n                }\n                if (iconImg) {\n                  ++stylesLength;\n                  style = styles[stylesLength];\n                  if (\n                    !style ||\n                    !style.getImage() ||\n                    style.getFill() ||\n                    style.getStroke()\n                  ) {\n                    style = new Style();\n                    styles[stylesLength] = style;\n                  }\n                  style.setGeometry(styleGeom);\n                  iconImg.setRotation(\n                    placementAngle +\n                      deg2rad(\n                        getValue(\n                          layer,\n                          'layout',\n                          'icon-rotate',\n                          zoom,\n                          f,\n                          functionCache,\n                          featureState\n                        )\n                      )\n                  );\n                  iconImg.setOpacity(\n                    getValue(\n                      layer,\n                      'paint',\n                      'icon-opacity',\n                      zoom,\n                      f,\n                      functionCache,\n                      featureState\n                    )\n                  );\n                  iconImg.setAnchor(\n                    anchor[\n                      getValue(\n                        layer,\n                        'layout',\n                        'icon-anchor',\n                        zoom,\n                        f,\n                        functionCache,\n                        featureState\n                      )\n                    ]\n                  );\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\n        if (type == 1 && layer.type === 'circle') {\n          ++stylesLength;\n          style = styles[stylesLength];\n          if (\n            !style ||\n            !style.getImage() ||\n            style.getFill() ||\n            style.getStroke()\n          ) {\n            style = new Style();\n            styles[stylesLength] = style;\n          }\n          const circleRadius =\n            'circle-radius' in paint\n              ? getValue(\n                  layer,\n                  'paint',\n                  'circle-radius',\n                  zoom,\n                  f,\n                  functionCache,\n                  featureState\n                )\n              : 5;\n          const circleStrokeColor = colorWithOpacity(\n            getValue(\n              layer,\n              'paint',\n              'circle-stroke-color',\n              zoom,\n              f,\n              functionCache,\n              featureState\n            ),\n            getValue(\n              layer,\n              'paint',\n              'circle-stroke-opacity',\n              zoom,\n              f,\n              functionCache,\n              featureState\n            )\n          );\n          const circleColor = colorWithOpacity(\n            getValue(\n              layer,\n              'paint',\n              'circle-color',\n              zoom,\n              f,\n              functionCache,\n              featureState\n            ),\n            getValue(\n              layer,\n              'paint',\n              'circle-opacity',\n              zoom,\n              f,\n              functionCache,\n              featureState\n            )\n          );\n          const circleStrokeWidth = getValue(\n            layer,\n            'paint',\n            'circle-stroke-width',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          const cache_key =\n            circleRadius +\n            '.' +\n            circleStrokeColor +\n            '.' +\n            circleColor +\n            '.' +\n            circleStrokeWidth;\n          iconImg = iconImageCache[cache_key];\n          if (!iconImg) {\n            iconImg = new Circle({\n              radius: circleRadius,\n              stroke:\n                circleStrokeColor && circleStrokeWidth > 0\n                  ? new Stroke({\n                      width: circleStrokeWidth,\n                      color: circleStrokeColor,\n                    })\n                  : undefined,\n              fill: circleColor\n                ? new Fill({\n                    color: circleColor,\n                  })\n                : undefined,\n              declutterMode: 'none',\n            });\n            iconImageCache[cache_key] = iconImg;\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\n        let label, font, textLineHeight, textSize, letterSpacing, maxTextWidth;\n        if ('text-field' in layout) {\n          textSize = Math.round(\n            getValue(\n              layer,\n              'layout',\n              'text-size',\n              zoom,\n              f,\n              functionCache,\n              featureState\n            )\n          );\n          const fontArray = getValue(\n            layer,\n            'layout',\n            'text-font',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          textLineHeight = getValue(\n            layer,\n            'layout',\n            'text-line-height',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          font = mb2css(\n            getFonts ? getFonts(fontArray) : fontArray,\n            textSize,\n            textLineHeight\n          );\n          if (!font.includes('sans-serif')) {\n            font += ',sans-serif';\n          }\n          letterSpacing = getValue(\n            layer,\n            'layout',\n            'text-letter-spacing',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          maxTextWidth = getValue(\n            layer,\n            'layout',\n            'text-max-width',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          const textField = getValue(\n            layer,\n            'layout',\n            'text-field',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          if (typeof textField === 'object' && textField.sections) {\n            if (textField.sections.length === 1) {\n              label = textField.toString();\n            } else {\n              label = textField.sections.reduce((acc, chunk, i) => {\n                const fonts = chunk.fontStack\n                  ? chunk.fontStack.split(',')\n                  : fontArray;\n                const chunkFont = mb2css(\n                  getFonts ? getFonts(fonts) : fonts,\n                  textSize * (chunk.scale || 1),\n                  textLineHeight\n                );\n                let text = chunk.text;\n                if (text === '\\n') {\n                  acc.push('\\n', '');\n                  return acc;\n                }\n                if (type == 2) {\n                  acc.push(applyLetterSpacing(text, letterSpacing), chunkFont);\n                  return;\n                }\n                text = wrapText(\n                  text,\n                  chunkFont,\n                  maxTextWidth,\n                  letterSpacing\n                ).split('\\n');\n                for (let i = 0, ii = text.length; i < ii; ++i) {\n                  if (i > 0) {\n                    acc.push('\\n', '');\n                  }\n                  acc.push(text[i], chunkFont);\n                }\n                return acc;\n              }, []);\n            }\n          } else {\n            label = fromTemplate(textField, properties).trim();\n          }\n          opacity = getValue(\n            layer,\n            'paint',\n            'text-opacity',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n        }\n        if (label && opacity && !skipLabel) {\n          if (!hasImage) {\n            ++stylesLength;\n            style = styles[stylesLength];\n            if (\n              !style ||\n              !style.getText() ||\n              style.getFill() ||\n              style.getStroke()\n            ) {\n              style = new Style();\n              styles[stylesLength] = style;\n            }\n            style.setImage(undefined);\n            style.setGeometry(undefined);\n          }\n          if (!style.getText()) {\n            style.setText(\n              text ||\n                new Text({\n                  padding: [2, 2, 2, 2],\n                })\n            );\n          }\n          text = style.getText();\n          const textTransform = layout['text-transform'];\n          if (textTransform == 'uppercase') {\n            label = Array.isArray(label)\n              ? label.map((t, i) => (i % 2 ? t : t.toUpperCase()))\n              : label.toUpperCase();\n          } else if (textTransform == 'lowercase') {\n            label = Array.isArray(label)\n              ? label.map((t, i) => (i % 2 ? t : t.toLowerCase()))\n              : label.toLowerCase();\n          }\n          const wrappedLabel = Array.isArray(label)\n            ? label\n            : type == 2\n            ? applyLetterSpacing(label, letterSpacing)\n            : wrapText(label, font, maxTextWidth, letterSpacing);\n          text.setText(wrappedLabel);\n          text.setFont(font);\n          text.setRotation(\n            deg2rad(\n              getValue(\n                layer,\n                'layout',\n                'text-rotate',\n                zoom,\n                f,\n                functionCache,\n                featureState\n              )\n            )\n          );\n          const textAnchor = getValue(\n            layer,\n            'layout',\n            'text-anchor',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          const placement =\n            hasImage || type == 1\n              ? 'point'\n              : getValue(\n                  layer,\n                  'layout',\n                  'symbol-placement',\n                  zoom,\n                  f,\n                  functionCache,\n                  featureState\n                );\n          text.setPlacement(placement);\n          text.setOverflow(placement === 'point');\n          let textHaloWidth = getValue(\n            layer,\n            'paint',\n            'text-halo-width',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          const textOffset = getValue(\n            layer,\n            'layout',\n            'text-offset',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          const textTranslate = getValue(\n            layer,\n            'paint',\n            'text-translate',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          // Text offset has to take halo width and line height into account\n          let vOffset = 0;\n          let hOffset = 0;\n          if (placement == 'point') {\n            let textAlign = 'center';\n            if (textAnchor.indexOf('left') !== -1) {\n              textAlign = 'left';\n              hOffset = textHaloWidth;\n            } else if (textAnchor.indexOf('right') !== -1) {\n              textAlign = 'right';\n              hOffset = -textHaloWidth;\n            }\n            text.setTextAlign(textAlign);\n            const textRotationAlignment = getValue(\n              layer,\n              'layout',\n              'text-rotation-alignment',\n              zoom,\n              f,\n              functionCache,\n              featureState\n            );\n            text.setRotateWithView(textRotationAlignment == 'map');\n          } else {\n            text.setMaxAngle(\n              (deg2rad(\n                getValue(\n                  layer,\n                  'layout',\n                  'text-max-angle',\n                  zoom,\n                  f,\n                  functionCache,\n                  featureState\n                )\n              ) *\n                label.length) /\n                wrappedLabel.length\n            );\n            text.setTextAlign();\n            text.setRotateWithView(false);\n          }\n          let textBaseline = 'middle';\n          if (textAnchor.indexOf('bottom') == 0) {\n            textBaseline = 'bottom';\n            vOffset = -textHaloWidth - 0.5 * (textLineHeight - 1) * textSize;\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(\n            textOffset[0] * textSize + hOffset + textTranslate[0]\n          );\n          text.setOffsetY(\n            textOffset[1] * textSize + vOffset + textTranslate[1]\n          );\n          textColor.setColor(\n            colorWithOpacity(\n              getValue(\n                layer,\n                'paint',\n                'text-color',\n                zoom,\n                f,\n                functionCache,\n                featureState\n              ),\n              opacity\n            )\n          );\n          text.setFill(textColor);\n          const haloColor = colorWithOpacity(\n            getValue(\n              layer,\n              'paint',\n              'text-halo-color',\n              zoom,\n              f,\n              functionCache,\n              featureState\n            ),\n            opacity\n          );\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            const halfTextSize = 0.5 * textSize;\n            textHalo.setWidth(\n              textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize\n            );\n            text.setStroke(textHalo);\n          } else {\n            text.setStroke(undefined);\n          }\n          const textPadding = getValue(\n            layer,\n            'layout',\n            'text-padding',\n            zoom,\n            f,\n            functionCache,\n            featureState\n          );\n          const padding = text.getPadding();\n          if (textPadding !== padding[0]) {\n            padding[0] = textPadding;\n            padding[1] = textPadding;\n            padding[2] = textPadding;\n            padding[3] = textPadding;\n          }\n          style.setZIndex(index);\n        }\n      }\n    }\n\n    if (stylesLength > -1) {\n      styles.length = stylesLength + 1;\n      if (recordLayer) {\n        if (typeof feature.set === 'function') {\n          // ol/Feature\n          feature.set('mapbox-layer', featureBelongsToLayer);\n        } else {\n          // ol/render/Feature\n          feature.getProperties()['mapbox-layer'] = featureBelongsToLayer;\n        }\n      }\n      return styles;\n    }\n  };\n\n  olLayer.setStyle(styleFunction);\n  olLayer.set('mapbox-source', mapboxSource);\n  olLayer.set('mapbox-layers', mapboxLayers);\n  olLayer.set('mapbox-featurestate', {});\n  return styleFunction;\n}\n\nexport {\n  colorWithOpacity as _colorWithOpacity,\n  evaluateFilter as _evaluateFilter,\n  fromTemplate as _fromTemplate,\n  getValue as _getValue,\n};\n","/*\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*/\n\nimport Color from '@mapbox/mapbox-gl-style-spec/util/color.js';\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport MVT from 'ol/format/MVT.js';\nimport Map from 'ol/Map.js';\nimport TileGrid from 'ol/tilegrid/TileGrid.js';\nimport TileJSON from 'ol/source/TileJSON.js';\nimport TileLayer from 'ol/layer/Tile.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport VectorTileSource, {defaultLoadFunction} from 'ol/source/VectorTile.js';\nimport View from 'ol/View.js';\nimport {\n  _colorWithOpacity,\n  stylefunction as applyStyleFunction,\n  getValue,\n} from './stylefunction.js';\nimport {assign} from 'ol/obj.js';\nimport {createXYZ} from 'ol/tilegrid.js';\nimport {\n  defaultResolutions,\n  fetchResource,\n  getGlStyle,\n  getTileJson,\n} from './util.js';\nimport {equivalent, fromLonLat, getUserProjection} from 'ol/proj.js';\nimport {getFonts} from './text.js';\nimport {\n  normalizeSourceUrl,\n  normalizeSpriteUrl,\n  normalizeStyleUrl,\n} from './mapbox.js';\n\n/**\n * @typedef {Object} FeatureIdentifier\n * @property {string|number} id The feature id.\n * @property {string} source The source id.\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [accessToken] Access token for 'mapbox://' urls.\n * @property {function(string, ResourceType): (Request|void)} [transformRequest]\n * Function for controlling how `ol-mapbox-style` fetches resources. Can be used for modifying\n * the url, adding headers or setting credentials options. Called with the url and the resource\n * type as arguments, this function is supposed to return a `Request` object. Without a return value,\n * the original request will not be modified. For `Tiles` and `GeoJSON` resources, only the `url` of\n * the returned request will be respected.\n * @property {Array<number>} [resolutions] Resolutions for mapping resolution to zoom level.\n * Only needed when working with non-standard tile grids or projections.\n * @property {string} [styleUrl] URL of the Mapbox GL style. Required for styles that were provided\n * as object, when they contain a relative sprite url, or sources referencing data by relative url.\n * @property {string} [accessTokenParam='access_token'] Access token param. For internal use.\n */\n\n/** @typedef {'Style'|'Source'|'Sprite'|'Tiles'|'GeoJSON'} ResourceType */\n/** @typedef {import(\"ol/layer/Layer\").default} Layer */\n/** @typedef {import(\"ol/source/Source\").default} Source */\n\n/**\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {Options} Completed options with accessToken and accessTokenParam.\n */\nfunction completeOptions(styleUrl, options) {\n  if (!options.accessToken) {\n    options = assign({}, options);\n    const searchParams = new URL(styleUrl).searchParams;\n    // The last search parameter is the access token\n    searchParams.forEach((value, key) => {\n      options.accessToken = value;\n      options.accessTokenParam = key;\n    });\n  }\n  return options;\n}\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`. If the layer does not have a source\n * yet, it will be created and populated from the information in the `glStyle`.\n *\n * **Example:**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * import {VectorTile} from 'ol/layer.js';\n *\n * const layer = new VectorTile({declutter: true});\n * applyStyle(layer, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN');\n * ```\n *\n * The style function will render all layers from the `glStyle` object that use the source\n * of the first layer, the specified `source`, or a subset of layers from the same source. The\n * source needs to be 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 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 * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer. When the layer has a source configured,\n * it will be modified to use the configuration from the glStyle's `source`. Options specified on the\n * layer's source will override those from the glStyle's `source`, except for `url`,\n * `tileUrlFunction` and `tileGrid` (exception: when the source projection is not `EPSG:3857`).\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array<string>} sourceOrLayers `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. When not provided or a falsey\n * value, all layers using the first source specified in the glStyle will be rendered.\n * @param {Options|string} optionsOrPath Options. Alternatively the path of the style file\n * (only required when a relative path is used for the `\"sprite\"` property of the style).\n * @param {Array<number>} resolutions Resolutions for mapping resolution to zoom level.\n * Only needed when working with non-standard tile grids or projections.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(\n  layer,\n  glStyle,\n  sourceOrLayers = '',\n  optionsOrPath = {},\n  resolutions = undefined\n) {\n  let styleUrl, sourceId;\n  /** @type {Options} */\n  let options;\n  if (typeof optionsOrPath === 'string') {\n    styleUrl = optionsOrPath;\n    options = {};\n  } else {\n    styleUrl = optionsOrPath.styleUrl;\n    options = optionsOrPath;\n  }\n  if (!resolutions) {\n    resolutions = options.resolutions;\n  }\n  if (\n    !styleUrl &&\n    typeof glStyle === 'string' &&\n    !glStyle.trim().startsWith('{')\n  ) {\n    styleUrl = glStyle;\n  }\n  if (styleUrl) {\n    styleUrl = styleUrl.startsWith('data:')\n      ? location.href\n      : normalizeStyleUrl(styleUrl, options.accessToken);\n    options = completeOptions(styleUrl, options);\n  }\n\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    getGlStyle(glStyle, options)\n      .then(function (glStyle) {\n        if (glStyle.version != 8) {\n          return reject(new Error('glStyle version 8 required.'));\n        }\n        if (\n          !(layer instanceof VectorLayer || layer instanceof VectorTileLayer)\n        ) {\n          return reject(\n            new Error('Can only apply to VectorLayer or VectorTileLayer')\n          );\n        }\n\n        const type = layer instanceof VectorTileLayer ? 'vector' : 'geojson';\n        if (!sourceOrLayers) {\n          sourceId = Object.keys(glStyle.sources).find(function (key) {\n            return glStyle.sources[key].type === type;\n          });\n          sourceOrLayers = sourceId;\n        } else if (Array.isArray(sourceOrLayers)) {\n          sourceId = glStyle.layers.find(function (layer) {\n            return layer.id === sourceOrLayers[0];\n          }).source;\n        } else {\n          sourceId = sourceOrLayers;\n        }\n        if (!sourceId) {\n          return reject(new Error(`No ${type} source found in the glStyle.`));\n        }\n\n        function assignSource() {\n          if (layer instanceof VectorTileLayer) {\n            return setupVectorSource(\n              glStyle.sources[sourceId],\n              styleUrl,\n              options\n            ).then(function (source) {\n              const targetSource = layer.getSource();\n              if (!targetSource) {\n                layer.setSource(source);\n              } else if (source !== targetSource) {\n                targetSource.setTileUrlFunction(source.getTileUrlFunction());\n                //@ts-ignore\n                if (!targetSource.format_) {\n                  //@ts-ignore\n                  targetSource.format_ = source.format_;\n                }\n                if (!targetSource.getAttributions()) {\n                  targetSource.setAttributions(source.getAttributions());\n                }\n                if (\n                  targetSource.getTileLoadFunction() === defaultLoadFunction\n                ) {\n                  targetSource.setTileLoadFunction(\n                    source.getTileLoadFunction()\n                  );\n                }\n                if (\n                  equivalent(\n                    targetSource.getProjection(),\n                    source.getProjection()\n                  )\n                ) {\n                  targetSource.tileGrid = source.getTileGrid();\n                }\n              }\n              if (\n                !isFinite(layer.getMaxResolution()) &&\n                !isFinite(layer.getMinZoom())\n              ) {\n                const tileGrid = layer.getSource().getTileGrid();\n                layer.setMaxResolution(\n                  tileGrid.getResolution(tileGrid.getMinZoom())\n                );\n              }\n            });\n          } else {\n            const glSource = glStyle.sources[sourceId];\n            let source = layer.getSource();\n            if (!source || source.get('mapbox-source') !== glSource) {\n              source = setupGeoJSONSource(glSource, styleUrl, options);\n            }\n            const targetSource = /** @type {VectorSource} */ (\n              layer.getSource()\n            );\n            if (!targetSource) {\n              layer.setSource(source);\n            } else if (source !== targetSource) {\n              if (!targetSource.getAttributions()) {\n                targetSource.setAttributions(source.getAttributions());\n              }\n              //@ts-ignore\n              if (!targetSource.format_) {\n                //@ts-ignore\n                targetSource.format_ = source.getFormat();\n              }\n              //@ts-ignore\n              targetSource.url_ = source.getUrl();\n            }\n            return Promise.resolve();\n          }\n        }\n\n        let spriteScale, spriteData, spriteImageUrl, style;\n        function onChange() {\n          if (!style && (!glStyle.sprite || spriteData)) {\n            style = applyStyleFunction(\n              layer,\n              glStyle,\n              sourceOrLayers,\n              resolutions,\n              spriteData,\n              spriteImageUrl,\n              getFonts\n            );\n            if (!layer.getStyle()) {\n              reject(new Error(`Nothing to show for source [${sourceId}]`));\n            } else {\n              assignSource().then(resolve).catch(reject);\n            }\n          } else if (style) {\n            layer.setStyle(style);\n            assignSource().then(resolve).catch(reject);\n          } else {\n            reject(new Error('Something went wrong trying to apply style.'));\n          }\n        }\n\n        if (glStyle.sprite) {\n          const sprite = new URL(\n            normalizeSpriteUrl(\n              glStyle.sprite,\n              options.accessToken,\n              styleUrl || location.href\n            )\n          );\n          spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n          const sizeFactor = spriteScale == 0.5 ? '@2x' : '';\n          let spriteUrl =\n            sprite.origin +\n            sprite.pathname +\n            sizeFactor +\n            '.json' +\n            sprite.search;\n\n          new Promise(function (resolve, reject) {\n            fetchResource('Sprite', spriteUrl, options)\n              .then(resolve)\n              .catch(function (error) {\n                spriteUrl =\n                  sprite.origin + sprite.pathname + '.json' + sprite.search;\n                fetchResource('Sprite', spriteUrl, options)\n                  .then(resolve)\n                  .catch(reject);\n              });\n          })\n            .then(function (spritesJson) {\n              if (spritesJson === undefined) {\n                reject(new Error('No sprites found.'));\n              }\n              spriteData = spritesJson;\n              spriteImageUrl =\n                sprite.origin +\n                sprite.pathname +\n                sizeFactor +\n                '.png' +\n                sprite.search;\n              onChange();\n            })\n            .catch(function (err) {\n              reject(\n                new Error(\n                  `Sprites cannot be loaded: ${spriteUrl}: ${err.message}`\n                )\n              );\n            });\n        } else {\n          onChange();\n        }\n      })\n      .catch(reject);\n  });\n}\n\nconst emptyObj = {};\n\nfunction setBackground(mapOrLayer, layer) {\n  const background = {\n    id: layer.id,\n    type: layer.type,\n  };\n  const functionCache = {};\n  function updateStyle(resolution) {\n    const layout = layer.layout || {};\n    const paint = layer.paint || {};\n    background['paint'] = paint;\n    const zoom =\n      typeof mapOrLayer.getSource === 'function'\n        ? mapOrLayer.getSource().getTileGrid().getZForResolution(resolution)\n        : mapOrLayer.getView().getZoom();\n    const element =\n      typeof mapOrLayer.getTargetElement === 'function'\n        ? mapOrLayer.getTargetElement()\n        : undefined;\n    let bg, opacity;\n    if (paint['background-color'] !== undefined) {\n      bg = getValue(\n        background,\n        'paint',\n        'background-color',\n        zoom,\n        emptyObj,\n        functionCache\n      );\n      if (element) {\n        element.style.background = Color.parse(bg).toString();\n      }\n    }\n    if (paint['background-opacity'] !== undefined) {\n      opacity = getValue(\n        background,\n        'paint',\n        'background-opacity',\n        zoom,\n        emptyObj,\n        functionCache\n      );\n      if (element) {\n        element.style.opacity = opacity;\n      }\n    }\n    if (layout.visibility == 'none') {\n      if (element) {\n        element.style.backgroundColor = '';\n        element.style.opacity = '';\n      }\n      return undefined;\n    }\n    return _colorWithOpacity(bg, opacity);\n  }\n  if (typeof mapOrLayer.getTargetElement === 'function') {\n    if (mapOrLayer.getTargetElement()) {\n      updateStyle();\n    }\n    mapOrLayer.on(['change:resolution', 'change:target'], updateStyle);\n  } else if (typeof mapOrLayer.setBackground === 'function') {\n    mapOrLayer.setBackground(updateStyle);\n  } else {\n    throw new Error('Unable to apply background.');\n  }\n}\n\nfunction setFirstBackground(mapOrLayer, glStyle) {\n  glStyle.layers.some(function (layer) {\n    if (layer.type === 'background') {\n      setBackground(mapOrLayer, layer);\n      return true;\n    }\n  });\n}\n\n/**\n * Applies properties of the Mapbox Style's first `background` layer to the\n * provided map or VectorTile layer.\n *\n * **Example:**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * import {Map} from 'ol';\n *\n * const map = new Map({target: 'map'});\n * applyBackground(map, 'https://api.maptiler.com/maps/basic/style.json?key=YOUR_OPENMAPTILES_TOKEN');\n * ```\n * @param {Map|VectorTileLayer} mapOrLayer OpenLayers Map or VectorTile layer.\n * @param {Object|string} glStyle Mapbox Style object or url.\n * @param {Options} options Options.\n * @return {Promise} Promise that resolves when the background is applied.\n */\nexport function applyBackground(mapOrLayer, glStyle, options = {}) {\n  if (typeof glStyle === 'object') {\n    setFirstBackground(mapOrLayer, glStyle);\n    return Promise.resolve();\n  }\n  return getGlStyle(glStyle, options).then(function (glStyle) {\n    setFirstBackground(mapOrLayer, glStyle);\n  });\n}\n\nfunction getSourceIdByRef(layers, ref) {\n  let sourceId;\n  layers.some(function (layer) {\n    if (layer.id == ref) {\n      sourceId = layer.source;\n      return true;\n    }\n  });\n  return sourceId;\n}\n\nfunction extentFromTileJSON(tileJSON) {\n  const bounds = tileJSON.bounds;\n  if (bounds) {\n    const ll = fromLonLat([bounds[0], bounds[1]]);\n    const tr = fromLonLat([bounds[2], bounds[3]]);\n    return [ll[0], ll[1], tr[0], tr[1]];\n  }\n}\n\n/**\n * Creates an OpenLayers VectorTile source for a gl source entry.\n * @param {Object} glSource \"source\" entry from a Mapbox Style object.\n * @param {string|undefined} styleUrl URL to use for the source. This is expected to be the complete http(s) url,\n * with access key applied.\n * @param {Options} options Options.\n * @return {Promise<import(\"ol/source/VectorTile\").default>} Promise resolving to a VectorTile source.\n * @private\n */\nexport function setupVectorSource(glSource, styleUrl, options) {\n  return new Promise(function (resolve, reject) {\n    getTileJson(glSource, styleUrl, options)\n      .then(function (tileJSON) {\n        const tileJSONSource = new TileJSON({tileJSON: tileJSON});\n        const tileJSONDoc = tileJSONSource.getTileJSON();\n        const tileGrid = tileJSONSource.getTileGrid();\n        const extent = extentFromTileJSON(tileJSONDoc);\n        const minZoom = tileJSONDoc.minzoom || 0;\n        const maxZoom = tileJSONDoc.maxzoom || 22;\n        const sourceOptions = {\n          attributions: tileJSONSource.getAttributions(),\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        };\n        if (Array.isArray(tileJSONDoc.tiles)) {\n          sourceOptions.urls = tileJSONDoc.tiles;\n        } else {\n          sourceOptions.url = tileJSONDoc.tiles;\n        }\n        if (tileJSON.olSourceOptions) {\n          Object.assign(sourceOptions, tileJSON.olSourceOptions);\n        }\n        resolve(new VectorTileSource(sourceOptions));\n      })\n      .catch(reject);\n  });\n}\n\nfunction setupVectorLayer(glSource, styleUrl, options) {\n  const layer = new VectorTileLayer({\n    declutter: true,\n    visible: false,\n  });\n  setupVectorSource(glSource, styleUrl, options)\n    .then(function (source) {\n      source.set('mapbox-source', glSource);\n      layer.setSource(source);\n    })\n    .catch(function (error) {\n      layer.setSource(undefined);\n    });\n  return layer;\n}\n\nfunction setupRasterLayer(glSource, styleUrl, options) {\n  const layer = new TileLayer();\n  getTileJson(glSource, styleUrl, options)\n    .then(function (tileJson) {\n      const source = new TileJSON({\n        transition: 0,\n        crossOrigin: 'anonymous',\n        tileJSON: tileJson,\n      });\n      const extent = extentFromTileJSON(tileJson);\n      const tileGrid = source.getTileGrid();\n      const tileSize = glSource.tileSize || tileJson.tileSize || 512;\n      const minZoom = tileJson.minzoom || 0;\n      const maxZoom = tileJson.maxzoom || 22;\n      //@ts-ignore\n      source.tileGrid = new TileGrid({\n        origin: tileGrid.getOrigin(0),\n        extent: extent || tileGrid.getExtent(),\n        minZoom: minZoom,\n        resolutions: createXYZ({\n          maxZoom: maxZoom,\n          tileSize: tileSize,\n        }).getResolutions(),\n        tileSize: tileSize,\n      });\n      const getTileUrl = source.getTileUrlFunction();\n      source.setTileUrlFunction(function (tileCoord, pixelRatio, projection) {\n        let src = getTileUrl(tileCoord, pixelRatio, projection);\n        if (src.indexOf('{bbox-epsg-3857}') != -1) {\n          const bbox = source.getTileGrid().getTileCoordExtent(tileCoord);\n          src = src.replace('{bbox-epsg-3857}', bbox.toString());\n        }\n        return src;\n      });\n      source.set('mapbox-source', glSource);\n      layer.setSource(source);\n    })\n    .catch(function (error) {\n      layer.setSource(undefined);\n    });\n  return layer;\n}\n\nconst geoJsonFormat = new GeoJSON();\n/**\n * @param {Object} glSource glStyle source.\n * @param {string} styleUrl Style URL.\n * @param {Options} options Options.\n * @return {VectorSource} Configured vector source.\n */\nfunction setupGeoJSONSource(glSource, styleUrl, options) {\n  const data = glSource.data;\n  const sourceOptions = {};\n  if (typeof data == 'string') {\n    let geoJsonUrl = normalizeSourceUrl(\n      data,\n      options.accessToken,\n      options.accessTokenParam || 'access_token',\n      styleUrl || location.href\n    );\n    if (options.transformRequest) {\n      const transformed = options.transformRequest(geoJsonUrl, 'GeoJSON');\n      if (transformed instanceof Request) {\n        geoJsonUrl = encodeURI(transformed.url);\n      }\n    }\n    sourceOptions.url = geoJsonUrl;\n  } else {\n    sourceOptions.features = geoJsonFormat.readFeatures(data, {\n      featureProjection: getUserProjection() || 'EPSG:3857',\n    });\n  }\n  const source = new VectorSource(\n    assign(\n      {\n        attributions: glSource.attribution,\n        format: geoJsonFormat,\n      },\n      sourceOptions\n    )\n  );\n  source.set('mapbox-source', glSource);\n  return source;\n}\n\nfunction setupGeoJSONLayer(glSource, styleUrl, options) {\n  return new VectorLayer({\n    declutter: true,\n    source: setupGeoJSONSource(glSource, styleUrl, options),\n    visible: false,\n  });\n}\n\nfunction updateRasterLayerProperties(glLayer, layer, view, functionCache) {\n  const zoom = view.getZoom();\n  const opacity = getValue(\n    glLayer,\n    'paint',\n    'raster-opacity',\n    zoom,\n    emptyObj,\n    functionCache\n  );\n  layer.setOpacity(opacity);\n}\n\nfunction processStyle(glStyle, map, styleUrl, options) {\n  const promises = [];\n  let view = map.getView();\n  if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n    view = new View(\n      assign(view.getProperties(), {\n        maxResolution: defaultResolutions[0],\n      })\n    );\n    map.setView(view);\n  }\n\n  if ('center' in glStyle && !view.getCenter()) {\n    view.setCenter(fromLonLat(glStyle.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\n  const glLayers = glStyle.layers;\n  let layerIds = [];\n\n  let glLayer, glSource, glSourceId, id, layer;\n  for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n    glLayer = glLayers[i];\n    const type = glLayer.type;\n    if (type == 'heatmap' || type == 'hillshade') {\n      //FIXME Unsupported layer type\n      throw new Error(`${type} layers are not supported`);\n    } else if (type == 'background') {\n      setBackground(map, glLayer);\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(\n            finalizeLayer(layer, layerIds, glStyle, styleUrl, map, options)\n          );\n          layerIds = [];\n        }\n        glSource = glStyle.sources[id];\n        if (glSource.type == 'vector') {\n          layer = setupVectorLayer(glSource, styleUrl, options);\n        } else if (glSource.type == 'raster') {\n          layer = setupRasterLayer(glSource, styleUrl, options);\n          layer.setVisible(\n            glLayer.layout ? glLayer.layout.visibility !== 'none' : true\n          );\n          const functionCache = {};\n          view.on(\n            'change:resolution',\n            updateRasterLayerProperties.bind(\n              this,\n              glLayer,\n              layer,\n              view,\n              functionCache\n            )\n          );\n          updateRasterLayerProperties(glLayer, layer, view, functionCache);\n        } else if (glSource.type == 'geojson') {\n          layer = setupGeoJSONLayer(glSource, styleUrl, options);\n        }\n        glSourceId = id;\n        if (layer) {\n          layer.set('mapbox-source', glSourceId);\n        }\n      }\n      layerIds.push(glLayer.id);\n    }\n  }\n  promises.push(\n    finalizeLayer(layer, layerIds, glStyle, styleUrl, map, options)\n  );\n  map.set('mapbox-style', glStyle);\n  return Promise.all(promises);\n}\n\n/**\n * Loads and applies a Mapbox Style object into an OpenLayers Map. This includes\n * the map background, the layers, the center and the zoom.\n *\n * **Example:**\n * ```js\n * import apply from 'ol-mapbox-style';\n *\n * apply('map', 'mapbox://styles/mapbox/bright-v9', {accessToken: 'YOUR_MAPBOX_TOKEN'});\n * ```\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 {Map|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 is the `styleUrl`\n * shown in Mapbox Studio's \"share\" panel. In addition, the `accessToken` option\n * (see below) must be set.\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 * @param {Options} options Options.\n * @return {Promise<Map>} 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 function apply(map, style, options = {}) {\n  let promise;\n\n  if (typeof map === 'string' || map instanceof HTMLElement) {\n    map = new Map({\n      target: map,\n    });\n  }\n\n  if (typeof style === 'string') {\n    const styleUrl = style.startsWith('data:')\n      ? location.href\n      : normalizeStyleUrl(style, options.accessToken);\n    options = completeOptions(styleUrl, options);\n\n    promise = new Promise(function (resolve, reject) {\n      getGlStyle(style, options)\n        .then(function (glStyle) {\n          processStyle(glStyle, map, styleUrl, options)\n            .then(function () {\n              resolve(map);\n            })\n            .catch(reject);\n        })\n        .catch(function (err) {\n          reject(new Error(`Could not load ${style}: ${err.message}`));\n        });\n    });\n  } else {\n    promise = new Promise(function (resolve, reject) {\n      processStyle(\n        style,\n        map,\n        !options.styleUrl || options.styleUrl.startsWith('data:')\n          ? location.href\n          : normalizeStyleUrl(options.styleUrl, options.accessToken),\n        options\n      )\n        .then(function () {\n          resolve(map);\n        })\n        .catch(reject);\n    });\n  }\n\n  return promise;\n}\n\n/**\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} styleUrl The original style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {Map} map OpenLayers Map.\n * @param {Options} options Options.\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 * @private\n */\nfunction finalizeLayer(layer, layerIds, glStyle, styleUrl, map, options = {}) {\n  let minZoom = 24;\n  let maxZoom = 0;\n  const glLayers = glStyle.layers;\n  for (let i = 0, ii = glLayers.length; i < ii; ++i) {\n    const 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    const setStyle = function () {\n      const source = layer.getSource();\n      if (!source || source.getState() === 'error') {\n        reject(\n          new Error(\n            'Error accessing data for source ' + layer.get('mapbox-source')\n          )\n        );\n        return;\n      }\n      if ('getTileGrid' in source) {\n        const tileGrid =\n          /** @type {import(\"ol/source/Tile.js\").default|import(\"ol/source/VectorTile.js\").default} */ (\n            source\n          ).getTileGrid();\n        if (tileGrid) {\n          const sourceMinZoom = tileGrid.getMinZoom();\n          if (minZoom > 0 || sourceMinZoom > 0) {\n            layer.setMaxResolution(\n              Math.min(\n                defaultResolutions[minZoom],\n                tileGrid.getResolution(sourceMinZoom)\n              ) + 1e-9\n            );\n          }\n          if (maxZoom < 24) {\n            layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9);\n          }\n        }\n      }\n      if (\n        source instanceof VectorSource ||\n        source instanceof VectorTileSource\n      ) {\n        applyStyle(\n          /** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */ (\n            layer\n          ),\n          glStyle,\n          layerIds,\n          assign({styleUrl: styleUrl}, options)\n        )\n          .then(function () {\n            layer.setVisible(true);\n            resolve();\n          })\n          .catch(reject);\n      } else {\n        resolve();\n      }\n    };\n\n    layer.set('mapbox-layers', layerIds);\n    if (map.getLayers().getArray().indexOf(layer) === -1) {\n      map.addLayer(layer);\n    }\n\n    if (layer.getSource()) {\n      setStyle();\n    } else {\n      layer.once('change:source', setStyle);\n    }\n  });\n}\n\n/**\n * Get the OpenLayers layer instance that 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 {Map} map OpenLayers Map.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nexport function getLayer(map, layerId) {\n  const layers = map.getLayers().getArray();\n  for (let i = 0, ii = layers.length; i < ii; ++i) {\n    const mapboxLayers = layers[i].get('mapbox-layers');\n    if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n      return /** @type {Layer} */ (layers[i]);\n    }\n  }\n}\n\n/**\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {Map} 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  const result = [];\n  const layers = map.getAllLayers();\n  for (let 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/**\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {Map} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nexport function getSource(map, sourceId) {\n  const layers = map.getLayers().getArray();\n  for (let i = 0, ii = layers.length; i < ii; ++i) {\n    const source = /** @type {Layer} */ (layers[i]).getSource();\n    if (layers[i].get('mapbox-source') === sourceId) {\n      return source;\n    }\n  }\n}\n\n/**\n * Sets or removes a feature state. The feature state is taken into account for styling,\n * just like the feature's properties, and can be used e.g. to conditionally render selected\n * features differently.\n *\n * The feature state will be stored on the OpenLayers layer matching the feature identifier, in the\n * `mapbox-featurestate` property.\n * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer OpenLayers Map or layer to set the feature\n * state on.\n * @param {FeatureIdentifier} feature Feature identifier.\n * @param {Object|null} state Feature state. Set to `null` to remove the feature state.\n */\nexport function setFeatureState(mapOrLayer, feature, state) {\n  const layers =\n    'getLayers' in mapOrLayer\n      ? getLayers(mapOrLayer, feature.source)\n      : [mapOrLayer];\n  for (let i = 0, ii = layers.length; i < ii; ++i) {\n    const featureState = layers[i].get('mapbox-featurestate');\n    if (featureState) {\n      if (state) {\n        featureState[feature.id] = state;\n      } else {\n        delete featureState[feature.id];\n      }\n      layers[i].changed();\n    } else {\n      throw new Error(`Map or layer for source \"${feature.source}\" not found.`);\n    }\n  }\n}\n\n/**\n * Sets or removes a feature state. The feature state is taken into account for styling,\n * just like the feature's properties, and can be used e.g. to conditionally render selected\n * features differently.\n * @param {Map|VectorLayer|VectorTileLayer} mapOrLayer Map or layer to set the feature state on.\n * @param {FeatureIdentifier} feature Feature identifier.\n * @return {Object|null} Feature state or `null` when no feature state is set for the given\n * feature identifier.\n */\nexport function getFeatureState(mapOrLayer, feature) {\n  const layers =\n    'getLayers' in mapOrLayer\n      ? getLayers(mapOrLayer, feature.source)\n      : [mapOrLayer];\n  for (let i = 0, ii = layers.length; i < ii; ++i) {\n    const featureState = layers[i].get('mapbox-featurestate');\n    if (featureState && featureState[feature.id]) {\n      return featureState[feature.id];\n    }\n  }\n  return null;\n}\n\nexport {finalizeLayer as _finalizeLayer};\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"import $ol$AssertionError from './ol/AssertionError.js';\nimport {CollectionEvent as _ol_Collection$CollectionEvent} from './ol/Collection.js';\nimport $ol$Collection from './ol/Collection.js';\nimport $ol$DataTile from './ol/DataTile.js';\nimport $ol$Disposable from './ol/Disposable.js';\nimport $ol$Feature from './ol/Feature.js';\nimport {createStyleFunction as _ol_Feature$createStyleFunction} from './ol/Feature.js';\nimport $ol$Geolocation from './ol/Geolocation.js';\nimport $ol$Image from './ol/Image.js';\nimport {listenImage as _ol_Image$listenImage} from './ol/Image.js';\nimport $ol$ImageBase from './ol/ImageBase.js';\nimport $ol$ImageCanvas from './ol/ImageCanvas.js';\nimport $ol$ImageTile from './ol/ImageTile.js';\nimport $ol$Kinetic from './ol/Kinetic.js';\nimport $ol$Map from './ol/Map.js';\nimport $ol$MapBrowserEvent from './ol/MapBrowserEvent.js';\nimport $ol$MapBrowserEventHandler from './ol/MapBrowserEventHandler.js';\nimport $ol$MapEvent from './ol/MapEvent.js';\nimport {ObjectEvent as _ol_Object$ObjectEvent} from './ol/Object.js';\nimport $ol$Object from './ol/Object.js';\nimport $ol$Observable from './ol/Observable.js';\nimport {unByKey as _ol_Observable$unByKey} from './ol/Observable.js';\nimport $ol$Overlay from './ol/Overlay.js';\nimport $ol$PluggableMap from './ol/PluggableMap.js';\nimport $ol$Tile from './ol/Tile.js';\nimport $ol$TileCache from './ol/TileCache.js';\nimport $ol$TileQueue from './ol/TileQueue.js';\nimport {getTilePriority as _ol_TileQueue$getTilePriority} from './ol/TileQueue.js';\nimport $ol$TileRange from './ol/TileRange.js';\nimport {createOrUpdate as _ol_TileRange$createOrUpdate} from './ol/TileRange.js';\nimport $ol$VectorRenderTile from './ol/VectorRenderTile.js';\nimport $ol$VectorTile from './ol/VectorTile.js';\nimport $ol$View from './ol/View.js';\nimport {createCenterConstraint as _ol_View$createCenterConstraint} from './ol/View.js';\nimport {createResolutionConstraint as _ol_View$createResolutionConstraint} from './ol/View.js';\nimport {createRotationConstraint as _ol_View$createRotationConstraint} from './ol/View.js';\nimport {isNoopAnimation as _ol_View$isNoopAnimation} from './ol/View.js';\nimport {binarySearch as _ol_array$binarySearch} from './ol/array.js';\nimport {numberSafeCompareFunction as _ol_array$numberSafeCompareFunction} from './ol/array.js';\nimport {includes as _ol_array$includes} from './ol/array.js';\nimport {linearFindNearest as _ol_array$linearFindNearest} from './ol/array.js';\nimport {reverseSubArray as _ol_array$reverseSubArray} from './ol/array.js';\nimport {extend as _ol_array$extend} from './ol/array.js';\nimport {remove as _ol_array$remove} from './ol/array.js';\nimport {find as _ol_array$find} from './ol/array.js';\nimport {equals as _ol_array$equals} from './ol/array.js';\nimport {stableSort as _ol_array$stableSort} from './ol/array.js';\nimport {findIndex as _ol_array$findIndex} from './ol/array.js';\nimport {isSorted as _ol_array$isSorted} from './ol/array.js';\nimport {assert as _ol_asserts$assert} from './ol/asserts.js';\nimport {createExtent as _ol_centerconstraint$createExtent} from './ol/centerconstraint.js';\nimport {none as _ol_centerconstraint$none} from './ol/centerconstraint.js';\nimport {asString as _ol_color$asString} from './ol/color.js';\nimport {fromString as _ol_color$fromString} from './ol/color.js';\nimport {asArray as _ol_color$asArray} from './ol/color.js';\nimport {normalize as _ol_color$normalize} from './ol/color.js';\nimport {toString as _ol_color$toString} from './ol/color.js';\nimport {isStringColor as _ol_color$isStringColor} from './ol/color.js';\nimport {asColorLike as _ol_colorlike$asColorLike} from './ol/colorlike.js';\nimport {defaults as _ol_control$defaults} from './ol/control.js';\nimport {add as _ol_coordinate$add} from './ol/coordinate.js';\nimport {closestOnCircle as _ol_coordinate$closestOnCircle} from './ol/coordinate.js';\nimport {closestOnSegment as _ol_coordinate$closestOnSegment} from './ol/coordinate.js';\nimport {createStringXY as _ol_coordinate$createStringXY} from './ol/coordinate.js';\nimport {degreesToStringHDMS as _ol_coordinate$degreesToStringHDMS} from './ol/coordinate.js';\nimport {format as _ol_coordinate$format} from './ol/coordinate.js';\nimport {equals as _ol_coordinate$equals} from './ol/coordinate.js';\nimport {rotate as _ol_coordinate$rotate} from './ol/coordinate.js';\nimport {scale as _ol_coordinate$scale} from './ol/coordinate.js';\nimport {squaredDistance as _ol_coordinate$squaredDistance} from './ol/coordinate.js';\nimport {distance as _ol_coordinate$distance} from './ol/coordinate.js';\nimport {squaredDistanceToSegment as _ol_coordinate$squaredDistanceToSegment} from './ol/coordinate.js';\nimport {toStringHDMS as _ol_coordinate$toStringHDMS} from './ol/coordinate.js';\nimport {toStringXY as _ol_coordinate$toStringXY} from './ol/coordinate.js';\nimport {wrapX as _ol_coordinate$wrapX} from './ol/coordinate.js';\nimport {getWorldsAway as _ol_coordinate$getWorldsAway} from './ol/coordinate.js';\nimport {CLASS_HIDDEN as _ol_css$CLASS_HIDDEN} from './ol/css.js';\nimport {CLASS_SELECTABLE as _ol_css$CLASS_SELECTABLE} from './ol/css.js';\nimport {CLASS_UNSELECTABLE as _ol_css$CLASS_UNSELECTABLE} from './ol/css.js';\nimport {CLASS_UNSUPPORTED as _ol_css$CLASS_UNSUPPORTED} from './ol/css.js';\nimport {CLASS_CONTROL as _ol_css$CLASS_CONTROL} from './ol/css.js';\nimport {CLASS_COLLAPSED as _ol_css$CLASS_COLLAPSED} from './ol/css.js';\nimport {getFontParameters as _ol_css$getFontParameters} from './ol/css.js';\nimport {createCanvasContext2D as _ol_dom$createCanvasContext2D} from './ol/dom.js';\nimport {releaseCanvas as _ol_dom$releaseCanvas} from './ol/dom.js';\nimport {outerWidth as _ol_dom$outerWidth} from './ol/dom.js';\nimport {outerHeight as _ol_dom$outerHeight} from './ol/dom.js';\nimport {replaceNode as _ol_dom$replaceNode} from './ol/dom.js';\nimport {removeNode as _ol_dom$removeNode} from './ol/dom.js';\nimport {removeChildren as _ol_dom$removeChildren} from './ol/dom.js';\nimport {replaceChildren as _ol_dom$replaceChildren} from './ol/dom.js';\nimport {easeIn as _ol_easing$easeIn} from './ol/easing.js';\nimport {easeOut as _ol_easing$easeOut} from './ol/easing.js';\nimport {inAndOut as _ol_easing$inAndOut} from './ol/easing.js';\nimport {linear as _ol_easing$linear} from './ol/easing.js';\nimport {upAndDown as _ol_easing$upAndDown} from './ol/easing.js';\nimport {listen as _ol_events$listen} from './ol/events.js';\nimport {listenOnce as _ol_events$listenOnce} from './ol/events.js';\nimport {unlistenByKey as _ol_events$unlistenByKey} from './ol/events.js';\nimport {boundingExtent as _ol_extent$boundingExtent} from './ol/extent.js';\nimport {buffer as _ol_extent$buffer} from './ol/extent.js';\nimport {clone as _ol_extent$clone} from './ol/extent.js';\nimport {closestSquaredDistanceXY as _ol_extent$closestSquaredDistanceXY} from './ol/extent.js';\nimport {containsCoordinate as _ol_extent$containsCoordinate} from './ol/extent.js';\nimport {containsExtent as _ol_extent$containsExtent} from './ol/extent.js';\nimport {containsXY as _ol_extent$containsXY} from './ol/extent.js';\nimport {coordinateRelationship as _ol_extent$coordinateRelationship} from './ol/extent.js';\nimport {createEmpty as _ol_extent$createEmpty} from './ol/extent.js';\nimport {createOrUpdate as _ol_extent$createOrUpdate} from './ol/extent.js';\nimport {createOrUpdateEmpty as _ol_extent$createOrUpdateEmpty} from './ol/extent.js';\nimport {createOrUpdateFromCoordinate as _ol_extent$createOrUpdateFromCoordinate} from './ol/extent.js';\nimport {createOrUpdateFromCoordinates as _ol_extent$createOrUpdateFromCoordinates} from './ol/extent.js';\nimport {createOrUpdateFromFlatCoordinates as _ol_extent$createOrUpdateFromFlatCoordinates} from './ol/extent.js';\nimport {createOrUpdateFromRings as _ol_extent$createOrUpdateFromRings} from './ol/extent.js';\nimport {equals as _ol_extent$equals} from './ol/extent.js';\nimport {approximatelyEquals as _ol_extent$approximatelyEquals} from './ol/extent.js';\nimport {extend as _ol_extent$extend} from './ol/extent.js';\nimport {extendCoordinate as _ol_extent$extendCoordinate} from './ol/extent.js';\nimport {extendCoordinates as _ol_extent$extendCoordinates} from './ol/extent.js';\nimport {extendFlatCoordinates as _ol_extent$extendFlatCoordinates} from './ol/extent.js';\nimport {extendRings as _ol_extent$extendRings} from './ol/extent.js';\nimport {extendXY as _ol_extent$extendXY} from './ol/extent.js';\nimport {forEachCorner as _ol_extent$forEachCorner} from './ol/extent.js';\nimport {getArea as _ol_extent$getArea} from './ol/extent.js';\nimport {getBottomLeft as _ol_extent$getBottomLeft} from './ol/extent.js';\nimport {getBottomRight as _ol_extent$getBottomRight} from './ol/extent.js';\nimport {getCenter as _ol_extent$getCenter} from './ol/extent.js';\nimport {getCorner as _ol_extent$getCorner} from './ol/extent.js';\nimport {getEnlargedArea as _ol_extent$getEnlargedArea} from './ol/extent.js';\nimport {getForViewAndSize as _ol_extent$getForViewAndSize} from './ol/extent.js';\nimport {getRotatedViewport as _ol_extent$getRotatedViewport} from './ol/extent.js';\nimport {getHeight as _ol_extent$getHeight} from './ol/extent.js';\nimport {getIntersectionArea as _ol_extent$getIntersectionArea} from './ol/extent.js';\nimport {getIntersection as _ol_extent$getIntersection} from './ol/extent.js';\nimport {getMargin as _ol_extent$getMargin} from './ol/extent.js';\nimport {getSize as _ol_extent$getSize} from './ol/extent.js';\nimport {getTopLeft as _ol_extent$getTopLeft} from './ol/extent.js';\nimport {getTopRight as _ol_extent$getTopRight} from './ol/extent.js';\nimport {getWidth as _ol_extent$getWidth} from './ol/extent.js';\nimport {intersects as _ol_extent$intersects} from './ol/extent.js';\nimport {isEmpty as _ol_extent$isEmpty} from './ol/extent.js';\nimport {returnOrUpdate as _ol_extent$returnOrUpdate} from './ol/extent.js';\nimport {scaleFromCenter as _ol_extent$scaleFromCenter} from './ol/extent.js';\nimport {intersectsSegment as _ol_extent$intersectsSegment} from './ol/extent.js';\nimport {applyTransform as _ol_extent$applyTransform} from './ol/extent.js';\nimport {wrapX as _ol_extent$wrapX} from './ol/extent.js';\nimport {wrapAndSliceX as _ol_extent$wrapAndSliceX} from './ol/extent.js';\nimport {loadFeaturesXhr as _ol_featureloader$loadFeaturesXhr} from './ol/featureloader.js';\nimport {xhr as _ol_featureloader$xhr} from './ol/featureloader.js';\nimport {setWithCredentials as _ol_featureloader$setWithCredentials} from './ol/featureloader.js';\nimport {TRUE as _ol_functions$TRUE} from './ol/functions.js';\nimport {FALSE as _ol_functions$FALSE} from './ol/functions.js';\nimport {VOID as _ol_functions$VOID} from './ol/functions.js';\nimport {memoizeOne as _ol_functions$memoizeOne} from './ol/functions.js';\nimport {toPromise as _ol_functions$toPromise} from './ol/functions.js';\nimport {FIREFOX as _ol_has$FIREFOX} from './ol/has.js';\nimport {SAFARI as _ol_has$SAFARI} from './ol/has.js';\nimport {SAFARI_BUG_237906 as _ol_has$SAFARI_BUG_237906} from './ol/has.js';\nimport {WEBKIT as _ol_has$WEBKIT} from './ol/has.js';\nimport {MAC as _ol_has$MAC} from './ol/has.js';\nimport {DEVICE_PIXEL_RATIO as _ol_has$DEVICE_PIXEL_RATIO} from './ol/has.js';\nimport {WORKER_OFFSCREEN_CANVAS as _ol_has$WORKER_OFFSCREEN_CANVAS} from './ol/has.js';\nimport {IMAGE_DECODE as _ol_has$IMAGE_DECODE} from './ol/has.js';\nimport {PASSIVE_EVENT_LISTENERS as _ol_has$PASSIVE_EVENT_LISTENERS} from './ol/has.js';\nimport {defaults as _ol_interaction$defaults} from './ol/interaction.js';\nimport {all as _ol_loadingstrategy$all} from './ol/loadingstrategy.js';\nimport {bbox as _ol_loadingstrategy$bbox} from './ol/loadingstrategy.js';\nimport {tile as _ol_loadingstrategy$tile} from './ol/loadingstrategy.js';\nimport {clamp as _ol_math$clamp} from './ol/math.js';\nimport {cosh as _ol_math$cosh} from './ol/math.js';\nimport {log2 as _ol_math$log2} from './ol/math.js';\nimport {squaredSegmentDistance as _ol_math$squaredSegmentDistance} from './ol/math.js';\nimport {squaredDistance as _ol_math$squaredDistance} from './ol/math.js';\nimport {solveLinearSystem as _ol_math$solveLinearSystem} from './ol/math.js';\nimport {toDegrees as _ol_math$toDegrees} from './ol/math.js';\nimport {toRadians as _ol_math$toRadians} from './ol/math.js';\nimport {modulo as _ol_math$modulo} from './ol/math.js';\nimport {lerp as _ol_math$lerp} from './ol/math.js';\nimport {toFixed as _ol_math$toFixed} from './ol/math.js';\nimport {round as _ol_math$round} from './ol/math.js';\nimport {floor as _ol_math$floor} from './ol/math.js';\nimport {ceil as _ol_math$ceil} from './ol/math.js';\nimport {jsonp as _ol_net$jsonp} from './ol/net.js';\nimport {ResponseError as _ol_net$ResponseError} from './ol/net.js';\nimport {ClientError as _ol_net$ClientError} from './ol/net.js';\nimport {getJSON as _ol_net$getJSON} from './ol/net.js';\nimport {resolveUrl as _ol_net$resolveUrl} from './ol/net.js';\nimport {overrideXHR as _ol_net$overrideXHR} from './ol/net.js';\nimport {restoreXHR as _ol_net$restoreXHR} from './ol/net.js';\nimport {assign as _ol_obj$assign} from './ol/obj.js';\nimport {clear as _ol_obj$clear} from './ol/obj.js';\nimport {getValues as _ol_obj$getValues} from './ol/obj.js';\nimport {isEmpty as _ol_obj$isEmpty} from './ol/obj.js';\nimport {disableCoordinateWarning as _ol_proj$disableCoordinateWarning} from './ol/proj.js';\nimport {cloneTransform as _ol_proj$cloneTransform} from './ol/proj.js';\nimport {identityTransform as _ol_proj$identityTransform} from './ol/proj.js';\nimport {addProjection as _ol_proj$addProjection} from './ol/proj.js';\nimport {addProjections as _ol_proj$addProjections} from './ol/proj.js';\nimport {get as _ol_proj$get} from './ol/proj.js';\nimport {getPointResolution as _ol_proj$getPointResolution} from './ol/proj.js';\nimport {addEquivalentProjections as _ol_proj$addEquivalentProjections} from './ol/proj.js';\nimport {addEquivalentTransforms as _ol_proj$addEquivalentTransforms} from './ol/proj.js';\nimport {clearAllProjections as _ol_proj$clearAllProjections} from './ol/proj.js';\nimport {createProjection as _ol_proj$createProjection} from './ol/proj.js';\nimport {createTransformFromCoordinateTransform as _ol_proj$createTransformFromCoordinateTransform} from './ol/proj.js';\nimport {addCoordinateTransforms as _ol_proj$addCoordinateTransforms} from './ol/proj.js';\nimport {fromLonLat as _ol_proj$fromLonLat} from './ol/proj.js';\nimport {toLonLat as _ol_proj$toLonLat} from './ol/proj.js';\nimport {equivalent as _ol_proj$equivalent} from './ol/proj.js';\nimport {getTransformFromProjections as _ol_proj$getTransformFromProjections} from './ol/proj.js';\nimport {getTransform as _ol_proj$getTransform} from './ol/proj.js';\nimport {transform as _ol_proj$transform} from './ol/proj.js';\nimport {transformExtent as _ol_proj$transformExtent} from './ol/proj.js';\nimport {transformWithProjections as _ol_proj$transformWithProjections} from './ol/proj.js';\nimport {setUserProjection as _ol_proj$setUserProjection} from './ol/proj.js';\nimport {clearUserProjection as _ol_proj$clearUserProjection} from './ol/proj.js';\nimport {getUserProjection as _ol_proj$getUserProjection} from './ol/proj.js';\nimport {useGeographic as _ol_proj$useGeographic} from './ol/proj.js';\nimport {toUserCoordinate as _ol_proj$toUserCoordinate} from './ol/proj.js';\nimport {fromUserCoordinate as _ol_proj$fromUserCoordinate} from './ol/proj.js';\nimport {toUserExtent as _ol_proj$toUserExtent} from './ol/proj.js';\nimport {fromUserExtent as _ol_proj$fromUserExtent} from './ol/proj.js';\nimport {toUserResolution as _ol_proj$toUserResolution} from './ol/proj.js';\nimport {fromUserResolution as _ol_proj$fromUserResolution} from './ol/proj.js';\nimport {createSafeCoordinateTransform as _ol_proj$createSafeCoordinateTransform} from './ol/proj.js';\nimport {addCommon as _ol_proj$addCommon} from './ol/proj.js';\nimport {toContext as _ol_render$toContext} from './ol/render.js';\nimport {getVectorContext as _ol_render$getVectorContext} from './ol/render.js';\nimport {getRenderPixel as _ol_render$getRenderPixel} from './ol/render.js';\nimport {canvasPool as _ol_reproj$canvasPool} from './ol/reproj.js';\nimport {calculateSourceResolution as _ol_reproj$calculateSourceResolution} from './ol/reproj.js';\nimport {calculateSourceExtentResolution as _ol_reproj$calculateSourceExtentResolution} from './ol/reproj.js';\nimport {render as _ol_reproj$render} from './ol/reproj.js';\nimport {createSnapToResolutions as _ol_resolutionconstraint$createSnapToResolutions} from './ol/resolutionconstraint.js';\nimport {createSnapToPower as _ol_resolutionconstraint$createSnapToPower} from './ol/resolutionconstraint.js';\nimport {createMinMaxResolution as _ol_resolutionconstraint$createMinMaxResolution} from './ol/resolutionconstraint.js';\nimport {disable as _ol_rotationconstraint$disable} from './ol/rotationconstraint.js';\nimport {none as _ol_rotationconstraint$none} from './ol/rotationconstraint.js';\nimport {createSnapToN as _ol_rotationconstraint$createSnapToN} from './ol/rotationconstraint.js';\nimport {createSnapToZero as _ol_rotationconstraint$createSnapToZero} from './ol/rotationconstraint.js';\nimport {buffer as _ol_size$buffer} from './ol/size.js';\nimport {hasArea as _ol_size$hasArea} from './ol/size.js';\nimport {scale as _ol_size$scale} from './ol/size.js';\nimport {toSize as _ol_size$toSize} from './ol/size.js';\nimport {sourcesFromTileGrid as _ol_source$sourcesFromTileGrid} from './ol/source.js';\nimport {DEFAULT_RADIUS as _ol_sphere$DEFAULT_RADIUS} from './ol/sphere.js';\nimport {getDistance as _ol_sphere$getDistance} from './ol/sphere.js';\nimport {getLength as _ol_sphere$getLength} from './ol/sphere.js';\nimport {getArea as _ol_sphere$getArea} from './ol/sphere.js';\nimport {offset as _ol_sphere$offset} from './ol/sphere.js';\nimport {padNumber as _ol_string$padNumber} from './ol/string.js';\nimport {compareVersions as _ol_string$compareVersions} from './ol/string.js';\nimport {createOrUpdate as _ol_tilecoord$createOrUpdate} from './ol/tilecoord.js';\nimport {getKeyZXY as _ol_tilecoord$getKeyZXY} from './ol/tilecoord.js';\nimport {getKey as _ol_tilecoord$getKey} from './ol/tilecoord.js';\nimport {getCacheKeyForTileKey as _ol_tilecoord$getCacheKeyForTileKey} from './ol/tilecoord.js';\nimport {fromKey as _ol_tilecoord$fromKey} from './ol/tilecoord.js';\nimport {hash as _ol_tilecoord$hash} from './ol/tilecoord.js';\nimport {withinExtentAndZ as _ol_tilecoord$withinExtentAndZ} from './ol/tilecoord.js';\nimport {getForProjection as _ol_tilegrid$getForProjection} from './ol/tilegrid.js';\nimport {wrapX as _ol_tilegrid$wrapX} from './ol/tilegrid.js';\nimport {createForExtent as _ol_tilegrid$createForExtent} from './ol/tilegrid.js';\nimport {createXYZ as _ol_tilegrid$createXYZ} from './ol/tilegrid.js';\nimport {createForProjection as _ol_tilegrid$createForProjection} from './ol/tilegrid.js';\nimport {extentFromProjection as _ol_tilegrid$extentFromProjection} from './ol/tilegrid.js';\nimport {createFromTemplate as _ol_tileurlfunction$createFromTemplate} from './ol/tileurlfunction.js';\nimport {createFromTemplates as _ol_tileurlfunction$createFromTemplates} from './ol/tileurlfunction.js';\nimport {createFromTileUrlFunctions as _ol_tileurlfunction$createFromTileUrlFunctions} from './ol/tileurlfunction.js';\nimport {nullTileUrlFunction as _ol_tileurlfunction$nullTileUrlFunction} from './ol/tileurlfunction.js';\nimport {expandUrl as _ol_tileurlfunction$expandUrl} from './ol/tileurlfunction.js';\nimport {create as _ol_transform$create} from './ol/transform.js';\nimport {reset as _ol_transform$reset} from './ol/transform.js';\nimport {multiply as _ol_transform$multiply} from './ol/transform.js';\nimport {set as _ol_transform$set} from './ol/transform.js';\nimport {setFromArray as _ol_transform$setFromArray} from './ol/transform.js';\nimport {apply as _ol_transform$apply} from './ol/transform.js';\nimport {rotate as _ol_transform$rotate} from './ol/transform.js';\nimport {scale as _ol_transform$scale} from './ol/transform.js';\nimport {makeScale as _ol_transform$makeScale} from './ol/transform.js';\nimport {translate as _ol_transform$translate} from './ol/transform.js';\nimport {compose as _ol_transform$compose} from './ol/transform.js';\nimport {composeCssTransform as _ol_transform$composeCssTransform} from './ol/transform.js';\nimport {invert as _ol_transform$invert} from './ol/transform.js';\nimport {makeInverse as _ol_transform$makeInverse} from './ol/transform.js';\nimport {determinant as _ol_transform$determinant} from './ol/transform.js';\nimport {toString as _ol_transform$toString} from './ol/transform.js';\nimport {appendParams as _ol_uri$appendParams} from './ol/uri.js';\nimport {abstract as _ol_util$abstract} from './ol/util.js';\nimport {getUid as _ol_util$getUid} from './ol/util.js';\nimport {VERSION as _ol_util$VERSION} from './ol/util.js';\nimport {ARRAY_BUFFER as _ol_webgl$ARRAY_BUFFER} from './ol/webgl.js';\nimport {ELEMENT_ARRAY_BUFFER as _ol_webgl$ELEMENT_ARRAY_BUFFER} from './ol/webgl.js';\nimport {STREAM_DRAW as _ol_webgl$STREAM_DRAW} from './ol/webgl.js';\nimport {STATIC_DRAW as _ol_webgl$STATIC_DRAW} from './ol/webgl.js';\nimport {DYNAMIC_DRAW as _ol_webgl$DYNAMIC_DRAW} from './ol/webgl.js';\nimport {UNSIGNED_BYTE as _ol_webgl$UNSIGNED_BYTE} from './ol/webgl.js';\nimport {UNSIGNED_SHORT as _ol_webgl$UNSIGNED_SHORT} from './ol/webgl.js';\nimport {UNSIGNED_INT as _ol_webgl$UNSIGNED_INT} from './ol/webgl.js';\nimport {FLOAT as _ol_webgl$FLOAT} from './ol/webgl.js';\nimport {getContext as _ol_webgl$getContext} from './ol/webgl.js';\nimport {getSupportedExtensions as _ol_webgl$getSupportedExtensions} from './ol/webgl.js';\nimport {XML_SCHEMA_INSTANCE_URI as _ol_xml$XML_SCHEMA_INSTANCE_URI} from './ol/xml.js';\nimport {createElementNS as _ol_xml$createElementNS} from './ol/xml.js';\nimport {getAllTextContent as _ol_xml$getAllTextContent} from './ol/xml.js';\nimport {getAllTextContent_ as _ol_xml$getAllTextContent_} from './ol/xml.js';\nimport {isDocument as _ol_xml$isDocument} from './ol/xml.js';\nimport {getAttributeNS as _ol_xml$getAttributeNS} from './ol/xml.js';\nimport {parse as _ol_xml$parse} from './ol/xml.js';\nimport {makeArrayExtender as _ol_xml$makeArrayExtender} from './ol/xml.js';\nimport {makeArrayPusher as _ol_xml$makeArrayPusher} from './ol/xml.js';\nimport {makeReplacer as _ol_xml$makeReplacer} from './ol/xml.js';\nimport {makeObjectPropertyPusher as _ol_xml$makeObjectPropertyPusher} from './ol/xml.js';\nimport {makeObjectPropertySetter as _ol_xml$makeObjectPropertySetter} from './ol/xml.js';\nimport {makeChildAppender as _ol_xml$makeChildAppender} from './ol/xml.js';\nimport {makeArraySerializer as _ol_xml$makeArraySerializer} from './ol/xml.js';\nimport {makeSimpleNodeFactory as _ol_xml$makeSimpleNodeFactory} from './ol/xml.js';\nimport {OBJECT_PROPERTY_NODE_FACTORY as _ol_xml$OBJECT_PROPERTY_NODE_FACTORY} from './ol/xml.js';\nimport {makeSequence as _ol_xml$makeSequence} from './ol/xml.js';\nimport {makeStructureNS as _ol_xml$makeStructureNS} from './ol/xml.js';\nimport {parseNode as _ol_xml$parseNode} from './ol/xml.js';\nimport {pushParseAndPop as _ol_xml$pushParseAndPop} from './ol/xml.js';\nimport {serialize as _ol_xml$serialize} from './ol/xml.js';\nimport {pushSerializeAndPop as _ol_xml$pushSerializeAndPop} from './ol/xml.js';\nimport {registerXMLSerializer as _ol_xml$registerXMLSerializer} from './ol/xml.js';\nimport {getXMLSerializer as _ol_xml$getXMLSerializer} from './ol/xml.js';\nimport {registerDocument as _ol_xml$registerDocument} from './ol/xml.js';\nimport {getDocument as _ol_xml$getDocument} from './ol/xml.js';\nimport $ol$webgl$Buffer from './ol/webgl/Buffer.js';\nimport {getArrayClassForType as _ol_webgl_Buffer$getArrayClassForType} from './ol/webgl/Buffer.js';\nimport $ol$webgl$Helper from './ol/webgl/Helper.js';\nimport {computeAttributesStride as _ol_webgl_Helper$computeAttributesStride} from './ol/webgl/Helper.js';\nimport $ol$webgl$PaletteTexture from './ol/webgl/PaletteTexture.js';\nimport $ol$webgl$PostProcessingPass from './ol/webgl/PostProcessingPass.js';\nimport $ol$webgl$RenderTarget from './ol/webgl/RenderTarget.js';\nimport {ShaderBuilder as _ol_webgl_ShaderBuilder$ShaderBuilder} from './ol/webgl/ShaderBuilder.js';\nimport {parseLiteralStyle as _ol_webgl_ShaderBuilder$parseLiteralStyle} from './ol/webgl/ShaderBuilder.js';\nimport $ol$webgl$TileTexture from './ol/webgl/TileTexture.js';\nimport {create as _ol_vec_mat4$create} from './ol/vec/mat4.js';\nimport {fromTransform as _ol_vec_mat4$fromTransform} from './ol/vec/mat4.js';\nimport $ol$tilegrid$TileGrid from './ol/tilegrid/TileGrid.js';\nimport $ol$tilegrid$WMTS from './ol/tilegrid/WMTS.js';\nimport {createFromCapabilitiesMatrixSet as _ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet} from './ol/tilegrid/WMTS.js';\nimport {DEFAULT_MAX_ZOOM as _ol_tilegrid_common$DEFAULT_MAX_ZOOM} from './ol/tilegrid/common.js';\nimport {DEFAULT_TILE_SIZE as _ol_tilegrid_common$DEFAULT_TILE_SIZE} from './ol/tilegrid/common.js';\nimport $ol$style$Circle from './ol/style/Circle.js';\nimport $ol$style$Fill from './ol/style/Fill.js';\nimport $ol$style$Icon from './ol/style/Icon.js';\nimport $ol$style$IconImage from './ol/style/IconImage.js';\nimport {get as _ol_style_IconImage$get} from './ol/style/IconImage.js';\nimport $ol$style$IconImageCache from './ol/style/IconImageCache.js';\nimport {shared as _ol_style_IconImageCache$shared} from './ol/style/IconImageCache.js';\nimport $ol$style$Image from './ol/style/Image.js';\nimport $ol$style$RegularShape from './ol/style/RegularShape.js';\nimport $ol$style$Stroke from './ol/style/Stroke.js';\nimport $ol$style$Style from './ol/style/Style.js';\nimport {toFunction as _ol_style_Style$toFunction} from './ol/style/Style.js';\nimport {createDefaultStyle as _ol_style_Style$createDefaultStyle} from './ol/style/Style.js';\nimport {createEditingStyle as _ol_style_Style$createEditingStyle} from './ol/style/Style.js';\nimport $ol$style$Text from './ol/style/Text.js';\nimport {Operators as _ol_style_expressions$Operators} from './ol/style/expressions.js';\nimport {getValueType as _ol_style_expressions$getValueType} from './ol/style/expressions.js';\nimport {isTypeUnique as _ol_style_expressions$isTypeUnique} from './ol/style/expressions.js';\nimport {numberToGlsl as _ol_style_expressions$numberToGlsl} from './ol/style/expressions.js';\nimport {arrayToGlsl as _ol_style_expressions$arrayToGlsl} from './ol/style/expressions.js';\nimport {colorToGlsl as _ol_style_expressions$colorToGlsl} from './ol/style/expressions.js';\nimport {getStringNumberEquivalent as _ol_style_expressions$getStringNumberEquivalent} from './ol/style/expressions.js';\nimport {stringToGlsl as _ol_style_expressions$stringToGlsl} from './ol/style/expressions.js';\nimport {expressionToGlsl as _ol_style_expressions$expressionToGlsl} from './ol/style/expressions.js';\nimport {uniformNameForVariable as _ol_style_expressions$uniformNameForVariable} from './ol/style/expressions.js';\nimport {PALETTE_TEXTURE_ARRAY as _ol_style_expressions$PALETTE_TEXTURE_ARRAY} from './ol/style/expressions.js';\nimport $ol$structs$LRUCache from './ol/structs/LRUCache.js';\nimport $ol$structs$LinkedList from './ol/structs/LinkedList.js';\nimport {DROP as _ol_structs_PriorityQueue$DROP} from './ol/structs/PriorityQueue.js';\nimport $ol$structs$PriorityQueue from './ol/structs/PriorityQueue.js';\nimport $ol$structs$RBush from './ol/structs/RBush.js';\nimport {quadKey as _ol_source_BingMaps$quadKey} from './ol/source/BingMaps.js';\nimport $ol$source$BingMaps from './ol/source/BingMaps.js';\nimport $ol$source$CartoDB from './ol/source/CartoDB.js';\nimport $ol$source$Cluster from './ol/source/Cluster.js';\nimport $ol$source$DataTile from './ol/source/DataTile.js';\nimport $ol$source$GeoTIFF from './ol/source/GeoTIFF.js';\nimport $ol$source$IIIF from './ol/source/IIIF.js';\nimport {ImageSourceEvent as _ol_source_Image$ImageSourceEvent} from './ol/source/Image.js';\nimport $ol$source$Image from './ol/source/Image.js';\nimport {defaultImageLoadFunction as _ol_source_Image$defaultImageLoadFunction} from './ol/source/Image.js';\nimport $ol$source$ImageArcGISRest from './ol/source/ImageArcGISRest.js';\nimport $ol$source$ImageCanvas from './ol/source/ImageCanvas.js';\nimport $ol$source$ImageMapGuide from './ol/source/ImageMapGuide.js';\nimport $ol$source$ImageStatic from './ol/source/ImageStatic.js';\nimport $ol$source$ImageWMS from './ol/source/ImageWMS.js';\nimport $ol$source$OGCMapTile from './ol/source/OGCMapTile.js';\nimport $ol$source$OGCVectorTile from './ol/source/OGCVectorTile.js';\nimport {ATTRIBUTION as _ol_source_OSM$ATTRIBUTION} from './ol/source/OSM.js';\nimport $ol$source$OSM from './ol/source/OSM.js';\nimport {newImageData as _ol_source_Raster$newImageData} from './ol/source/Raster.js';\nimport {Processor as _ol_source_Raster$Processor} from './ol/source/Raster.js';\nimport {RasterSourceEvent as _ol_source_Raster$RasterSourceEvent} from './ol/source/Raster.js';\nimport $ol$source$Raster from './ol/source/Raster.js';\nimport $ol$source$Source from './ol/source/Source.js';\nimport $ol$source$Stamen from './ol/source/Stamen.js';\nimport $ol$source$Tile from './ol/source/Tile.js';\nimport {TileSourceEvent as _ol_source_Tile$TileSourceEvent} from './ol/source/Tile.js';\nimport $ol$source$TileArcGISRest from './ol/source/TileArcGISRest.js';\nimport $ol$source$TileDebug from './ol/source/TileDebug.js';\nimport $ol$source$TileImage from './ol/source/TileImage.js';\nimport $ol$source$TileJSON from './ol/source/TileJSON.js';\nimport $ol$source$TileWMS from './ol/source/TileWMS.js';\nimport {CustomTile as _ol_source_UTFGrid$CustomTile} from './ol/source/UTFGrid.js';\nimport $ol$source$UTFGrid from './ol/source/UTFGrid.js';\nimport $ol$source$UrlTile from './ol/source/UrlTile.js';\nimport {VectorSourceEvent as _ol_source_Vector$VectorSourceEvent} from './ol/source/Vector.js';\nimport $ol$source$Vector from './ol/source/Vector.js';\nimport $ol$source$VectorTile from './ol/source/VectorTile.js';\nimport {defaultLoadFunction as _ol_source_VectorTile$defaultLoadFunction} from './ol/source/VectorTile.js';\nimport $ol$source$WMTS from './ol/source/WMTS.js';\nimport {optionsFromCapabilities as _ol_source_WMTS$optionsFromCapabilities} from './ol/source/WMTS.js';\nimport $ol$source$XYZ from './ol/source/XYZ.js';\nimport {CustomTile as _ol_source_Zoomify$CustomTile} from './ol/source/Zoomify.js';\nimport $ol$source$Zoomify from './ol/source/Zoomify.js';\nimport {DEFAULT_WMS_VERSION as _ol_source_common$DEFAULT_WMS_VERSION} from './ol/source/common.js';\nimport {getMapTileUrlTemplate as _ol_source_ogcTileUtil$getMapTileUrlTemplate} from './ol/source/ogcTileUtil.js';\nimport {getVectorTileUrlTemplate as _ol_source_ogcTileUtil$getVectorTileUrlTemplate} from './ol/source/ogcTileUtil.js';\nimport {getTileSetInfo as _ol_source_ogcTileUtil$getTileSetInfo} from './ol/source/ogcTileUtil.js';\nimport {DEFAULT_VERSION as _ol_source_wms$DEFAULT_VERSION} from './ol/source/wms.js';\nimport $ol$reproj$Image from './ol/reproj/Image.js';\nimport $ol$reproj$Tile from './ol/reproj/Tile.js';\nimport $ol$reproj$Triangulation from './ol/reproj/Triangulation.js';\nimport {ERROR_THRESHOLD as _ol_reproj_common$ERROR_THRESHOLD} from './ol/reproj/common.js';\nimport {ENABLE_RASTER_REPROJECTION as _ol_reproj_common$ENABLE_RASTER_REPROJECTION} from './ol/reproj/common.js';\nimport $ol$renderer$Composite from './ol/renderer/Composite.js';\nimport $ol$renderer$Layer from './ol/renderer/Layer.js';\nimport $ol$renderer$Map from './ol/renderer/Map.js';\nimport {defaultOrder as _ol_renderer_vector$defaultOrder} from './ol/renderer/vector.js';\nimport {getSquaredTolerance as _ol_renderer_vector$getSquaredTolerance} from './ol/renderer/vector.js';\nimport {getTolerance as _ol_renderer_vector$getTolerance} from './ol/renderer/vector.js';\nimport {renderFeature as _ol_renderer_vector$renderFeature} from './ol/renderer/vector.js';\nimport $ol$renderer$webgl$Layer from './ol/renderer/webgl/Layer.js';\nimport {writePointFeatureToBuffers as _ol_renderer_webgl_Layer$writePointFeatureToBuffers} from './ol/renderer/webgl/Layer.js';\nimport {getBlankImageData as _ol_renderer_webgl_Layer$getBlankImageData} from './ol/renderer/webgl/Layer.js';\nimport {colorEncodeId as _ol_renderer_webgl_Layer$colorEncodeId} from './ol/renderer/webgl/Layer.js';\nimport {colorDecodeId as _ol_renderer_webgl_Layer$colorDecodeId} from './ol/renderer/webgl/Layer.js';\nimport $ol$renderer$webgl$PointsLayer from './ol/renderer/webgl/PointsLayer.js';\nimport {Uniforms as _ol_renderer_webgl_TileLayer$Uniforms} from './ol/renderer/webgl/TileLayer.js';\nimport {Attributes as _ol_renderer_webgl_TileLayer$Attributes} from './ol/renderer/webgl/TileLayer.js';\nimport $ol$renderer$webgl$TileLayer from './ol/renderer/webgl/TileLayer.js';\nimport $ol$renderer$canvas$ImageLayer from './ol/renderer/canvas/ImageLayer.js';\nimport {canvasPool as _ol_renderer_canvas_Layer$canvasPool} from './ol/renderer/canvas/Layer.js';\nimport $ol$renderer$canvas$Layer from './ol/renderer/canvas/Layer.js';\nimport $ol$renderer$canvas$TileLayer from './ol/renderer/canvas/TileLayer.js';\nimport $ol$renderer$canvas$VectorImageLayer from './ol/renderer/canvas/VectorImageLayer.js';\nimport $ol$renderer$canvas$VectorLayer from './ol/renderer/canvas/VectorLayer.js';\nimport $ol$renderer$canvas$VectorTileLayer from './ol/renderer/canvas/VectorTileLayer.js';\nimport {IMAGE_SMOOTHING_DISABLED as _ol_renderer_canvas_common$IMAGE_SMOOTHING_DISABLED} from './ol/renderer/canvas/common.js';\nimport {IMAGE_SMOOTHING_ENABLED as _ol_renderer_canvas_common$IMAGE_SMOOTHING_ENABLED} from './ol/renderer/canvas/common.js';\nimport $ol$render$Box from './ol/render/Box.js';\nimport $ol$render$Event from './ol/render/Event.js';\nimport $ol$render$Feature from './ol/render/Feature.js';\nimport {toGeometry as _ol_render_Feature$toGeometry} from './ol/render/Feature.js';\nimport {toFeature as _ol_render_Feature$toFeature} from './ol/render/Feature.js';\nimport $ol$render$VectorContext from './ol/render/VectorContext.js';\nimport {defaultFont as _ol_render_canvas$defaultFont} from './ol/render/canvas.js';\nimport {defaultFillStyle as _ol_render_canvas$defaultFillStyle} from './ol/render/canvas.js';\nimport {defaultLineCap as _ol_render_canvas$defaultLineCap} from './ol/render/canvas.js';\nimport {defaultLineDash as _ol_render_canvas$defaultLineDash} from './ol/render/canvas.js';\nimport {defaultLineDashOffset as _ol_render_canvas$defaultLineDashOffset} from './ol/render/canvas.js';\nimport {defaultLineJoin as _ol_render_canvas$defaultLineJoin} from './ol/render/canvas.js';\nimport {defaultMiterLimit as _ol_render_canvas$defaultMiterLimit} from './ol/render/canvas.js';\nimport {defaultStrokeStyle as _ol_render_canvas$defaultStrokeStyle} from './ol/render/canvas.js';\nimport {defaultTextAlign as _ol_render_canvas$defaultTextAlign} from './ol/render/canvas.js';\nimport {defaultTextBaseline as _ol_render_canvas$defaultTextBaseline} from './ol/render/canvas.js';\nimport {defaultPadding as _ol_render_canvas$defaultPadding} from './ol/render/canvas.js';\nimport {defaultLineWidth as _ol_render_canvas$defaultLineWidth} from './ol/render/canvas.js';\nimport {checkedFonts as _ol_render_canvas$checkedFonts} from './ol/render/canvas.js';\nimport {labelCache as _ol_render_canvas$labelCache} from './ol/render/canvas.js';\nimport {textHeights as _ol_render_canvas$textHeights} from './ol/render/canvas.js';\nimport {registerFont as _ol_render_canvas$registerFont} from './ol/render/canvas.js';\nimport {measureTextHeight as _ol_render_canvas$measureTextHeight} from './ol/render/canvas.js';\nimport {measureTextWidth as _ol_render_canvas$measureTextWidth} from './ol/render/canvas.js';\nimport {measureAndCacheTextWidth as _ol_render_canvas$measureAndCacheTextWidth} from './ol/render/canvas.js';\nimport {getTextDimensions as _ol_render_canvas$getTextDimensions} from './ol/render/canvas.js';\nimport {rotateAtOffset as _ol_render_canvas$rotateAtOffset} from './ol/render/canvas.js';\nimport {drawImageOrLabel as _ol_render_canvas$drawImageOrLabel} from './ol/render/canvas.js';\nimport $ol$render$canvas$Builder from './ol/render/canvas/Builder.js';\nimport $ol$render$canvas$BuilderGroup from './ol/render/canvas/BuilderGroup.js';\nimport $ol$render$canvas$Executor from './ol/render/canvas/Executor.js';\nimport $ol$render$canvas$ExecutorGroup from './ol/render/canvas/ExecutorGroup.js';\nimport {getPixelIndexArray as _ol_render_canvas_ExecutorGroup$getPixelIndexArray} from './ol/render/canvas/ExecutorGroup.js';\nimport $ol$render$canvas$ImageBuilder from './ol/render/canvas/ImageBuilder.js';\nimport $ol$render$canvas$Immediate from './ol/render/canvas/Immediate.js';\nimport {fillInstruction as _ol_render_canvas_Instruction$fillInstruction} from './ol/render/canvas/Instruction.js';\nimport {strokeInstruction as _ol_render_canvas_Instruction$strokeInstruction} from './ol/render/canvas/Instruction.js';\nimport {beginPathInstruction as _ol_render_canvas_Instruction$beginPathInstruction} from './ol/render/canvas/Instruction.js';\nimport {closePathInstruction as _ol_render_canvas_Instruction$closePathInstruction} from './ol/render/canvas/Instruction.js';\nimport $ol$render$canvas$LineStringBuilder from './ol/render/canvas/LineStringBuilder.js';\nimport $ol$render$canvas$PolygonBuilder from './ol/render/canvas/PolygonBuilder.js';\nimport $ol$render$canvas$TextBuilder from './ol/render/canvas/TextBuilder.js';\nimport {HIT_DETECT_RESOLUTION as _ol_render_canvas_hitdetect$HIT_DETECT_RESOLUTION} from './ol/render/canvas/hitdetect.js';\nimport {createHitDetectionImageData as _ol_render_canvas_hitdetect$createHitDetectionImageData} from './ol/render/canvas/hitdetect.js';\nimport {hitDetect as _ol_render_canvas_hitdetect$hitDetect} from './ol/render/canvas/hitdetect.js';\nimport $ol$proj$Projection from './ol/proj/Projection.js';\nimport {fromCode as _ol_proj_Units$fromCode} from './ol/proj/Units.js';\nimport {METERS_PER_UNIT as _ol_proj_Units$METERS_PER_UNIT} from './ol/proj/Units.js';\nimport {RADIUS as _ol_proj_epsg3857$RADIUS} from './ol/proj/epsg3857.js';\nimport {HALF_SIZE as _ol_proj_epsg3857$HALF_SIZE} from './ol/proj/epsg3857.js';\nimport {EXTENT as _ol_proj_epsg3857$EXTENT} from './ol/proj/epsg3857.js';\nimport {WORLD_EXTENT as _ol_proj_epsg3857$WORLD_EXTENT} from './ol/proj/epsg3857.js';\nimport {MAX_SAFE_Y as _ol_proj_epsg3857$MAX_SAFE_Y} from './ol/proj/epsg3857.js';\nimport {PROJECTIONS as _ol_proj_epsg3857$PROJECTIONS} from './ol/proj/epsg3857.js';\nimport {fromEPSG4326 as _ol_proj_epsg3857$fromEPSG4326} from './ol/proj/epsg3857.js';\nimport {toEPSG4326 as _ol_proj_epsg3857$toEPSG4326} from './ol/proj/epsg3857.js';\nimport {RADIUS as _ol_proj_epsg4326$RADIUS} from './ol/proj/epsg4326.js';\nimport {EXTENT as _ol_proj_epsg4326$EXTENT} from './ol/proj/epsg4326.js';\nimport {METERS_PER_UNIT as _ol_proj_epsg4326$METERS_PER_UNIT} from './ol/proj/epsg4326.js';\nimport {PROJECTIONS as _ol_proj_epsg4326$PROJECTIONS} from './ol/proj/epsg4326.js';\nimport {register as _ol_proj_proj4$register} from './ol/proj/proj4.js';\nimport {clear as _ol_proj_projections$clear} from './ol/proj/projections.js';\nimport {get as _ol_proj_projections$get} from './ol/proj/projections.js';\nimport {add as _ol_proj_projections$add} from './ol/proj/projections.js';\nimport {clear as _ol_proj_transforms$clear} from './ol/proj/transforms.js';\nimport {add as _ol_proj_transforms$add} from './ol/proj/transforms.js';\nimport {remove as _ol_proj_transforms$remove} from './ol/proj/transforms.js';\nimport {get as _ol_proj_transforms$get} from './ol/proj/transforms.js';\nimport $ol$layer$Base from './ol/layer/Base.js';\nimport $ol$layer$BaseImage from './ol/layer/BaseImage.js';\nimport $ol$layer$BaseTile from './ol/layer/BaseTile.js';\nimport $ol$layer$BaseVector from './ol/layer/BaseVector.js';\nimport $ol$layer$Graticule from './ol/layer/Graticule.js';\nimport {GroupEvent as _ol_layer_Group$GroupEvent} from './ol/layer/Group.js';\nimport $ol$layer$Group from './ol/layer/Group.js';\nimport $ol$layer$Heatmap from './ol/layer/Heatmap.js';\nimport $ol$layer$Image from './ol/layer/Image.js';\nimport $ol$layer$Layer from './ol/layer/Layer.js';\nimport {inView as _ol_layer_Layer$inView} from './ol/layer/Layer.js';\nimport $ol$layer$MapboxVector from './ol/layer/MapboxVector.js';\nimport $ol$layer$Tile from './ol/layer/Tile.js';\nimport $ol$layer$Vector from './ol/layer/Vector.js';\nimport $ol$layer$VectorImage from './ol/layer/VectorImage.js';\nimport $ol$layer$VectorTile from './ol/layer/VectorTile.js';\nimport $ol$layer$WebGLPoints from './ol/layer/WebGLPoints.js';\nimport $ol$layer$WebGLTile from './ol/layer/WebGLTile.js';\nimport $ol$interaction$DoubleClickZoom from './ol/interaction/DoubleClickZoom.js';\nimport {DragAndDropEvent as _ol_interaction_DragAndDrop$DragAndDropEvent} from './ol/interaction/DragAndDrop.js';\nimport $ol$interaction$DragAndDrop from './ol/interaction/DragAndDrop.js';\nimport {DragBoxEvent as _ol_interaction_DragBox$DragBoxEvent} from './ol/interaction/DragBox.js';\nimport $ol$interaction$DragBox from './ol/interaction/DragBox.js';\nimport $ol$interaction$DragPan from './ol/interaction/DragPan.js';\nimport $ol$interaction$DragRotate from './ol/interaction/DragRotate.js';\nimport $ol$interaction$DragRotateAndZoom from './ol/interaction/DragRotateAndZoom.js';\nimport $ol$interaction$DragZoom from './ol/interaction/DragZoom.js';\nimport {DrawEvent as _ol_interaction_Draw$DrawEvent} from './ol/interaction/Draw.js';\nimport $ol$interaction$Draw from './ol/interaction/Draw.js';\nimport {createRegularPolygon as _ol_interaction_Draw$createRegularPolygon} from './ol/interaction/Draw.js';\nimport {createBox as _ol_interaction_Draw$createBox} from './ol/interaction/Draw.js';\nimport {ExtentEvent as _ol_interaction_Extent$ExtentEvent} from './ol/interaction/Extent.js';\nimport $ol$interaction$Extent from './ol/interaction/Extent.js';\nimport $ol$interaction$Interaction from './ol/interaction/Interaction.js';\nimport {pan as _ol_interaction_Interaction$pan} from './ol/interaction/Interaction.js';\nimport {zoomByDelta as _ol_interaction_Interaction$zoomByDelta} from './ol/interaction/Interaction.js';\nimport $ol$interaction$KeyboardPan from './ol/interaction/KeyboardPan.js';\nimport $ol$interaction$KeyboardZoom from './ol/interaction/KeyboardZoom.js';\nimport $ol$interaction$Link from './ol/interaction/Link.js';\nimport {ModifyEvent as _ol_interaction_Modify$ModifyEvent} from './ol/interaction/Modify.js';\nimport $ol$interaction$Modify from './ol/interaction/Modify.js';\nimport $ol$interaction$MouseWheelZoom from './ol/interaction/MouseWheelZoom.js';\nimport $ol$interaction$PinchRotate from './ol/interaction/PinchRotate.js';\nimport $ol$interaction$PinchZoom from './ol/interaction/PinchZoom.js';\nimport $ol$interaction$Pointer from './ol/interaction/Pointer.js';\nimport {centroid as _ol_interaction_Pointer$centroid} from './ol/interaction/Pointer.js';\nimport {SelectEvent as _ol_interaction_Select$SelectEvent} from './ol/interaction/Select.js';\nimport $ol$interaction$Select from './ol/interaction/Select.js';\nimport $ol$interaction$Snap from './ol/interaction/Snap.js';\nimport {TranslateEvent as _ol_interaction_Translate$TranslateEvent} from './ol/interaction/Translate.js';\nimport $ol$interaction$Translate from './ol/interaction/Translate.js';\nimport $ol$geom$Circle from './ol/geom/Circle.js';\nimport $ol$geom$Geometry from './ol/geom/Geometry.js';\nimport $ol$geom$GeometryCollection from './ol/geom/GeometryCollection.js';\nimport $ol$geom$LineString from './ol/geom/LineString.js';\nimport $ol$geom$LinearRing from './ol/geom/LinearRing.js';\nimport $ol$geom$MultiLineString from './ol/geom/MultiLineString.js';\nimport $ol$geom$MultiPoint from './ol/geom/MultiPoint.js';\nimport $ol$geom$MultiPolygon from './ol/geom/MultiPolygon.js';\nimport $ol$geom$Point from './ol/geom/Point.js';\nimport $ol$geom$Polygon from './ol/geom/Polygon.js';\nimport {circular as _ol_geom_Polygon$circular} from './ol/geom/Polygon.js';\nimport {fromExtent as _ol_geom_Polygon$fromExtent} from './ol/geom/Polygon.js';\nimport {fromCircle as _ol_geom_Polygon$fromCircle} from './ol/geom/Polygon.js';\nimport {makeRegular as _ol_geom_Polygon$makeRegular} from './ol/geom/Polygon.js';\nimport $ol$geom$SimpleGeometry from './ol/geom/SimpleGeometry.js';\nimport {getStrideForLayout as _ol_geom_SimpleGeometry$getStrideForLayout} from './ol/geom/SimpleGeometry.js';\nimport {transformGeom2D as _ol_geom_SimpleGeometry$transformGeom2D} from './ol/geom/SimpleGeometry.js';\nimport {linearRing as _ol_geom_flat_area$linearRing} from './ol/geom/flat/area.js';\nimport {linearRings as _ol_geom_flat_area$linearRings} from './ol/geom/flat/area.js';\nimport {linearRingss as _ol_geom_flat_area$linearRingss} from './ol/geom/flat/area.js';\nimport {linearRingss as _ol_geom_flat_center$linearRingss} from './ol/geom/flat/center.js';\nimport {maxSquaredDelta as _ol_geom_flat_closest$maxSquaredDelta} from './ol/geom/flat/closest.js';\nimport {arrayMaxSquaredDelta as _ol_geom_flat_closest$arrayMaxSquaredDelta} from './ol/geom/flat/closest.js';\nimport {multiArrayMaxSquaredDelta as _ol_geom_flat_closest$multiArrayMaxSquaredDelta} from './ol/geom/flat/closest.js';\nimport {assignClosestPoint as _ol_geom_flat_closest$assignClosestPoint} from './ol/geom/flat/closest.js';\nimport {assignClosestArrayPoint as _ol_geom_flat_closest$assignClosestArrayPoint} from './ol/geom/flat/closest.js';\nimport {assignClosestMultiArrayPoint as _ol_geom_flat_closest$assignClosestMultiArrayPoint} from './ol/geom/flat/closest.js';\nimport {linearRingContainsExtent as _ol_geom_flat_contains$linearRingContainsExtent} from './ol/geom/flat/contains.js';\nimport {linearRingContainsXY as _ol_geom_flat_contains$linearRingContainsXY} from './ol/geom/flat/contains.js';\nimport {linearRingsContainsXY as _ol_geom_flat_contains$linearRingsContainsXY} from './ol/geom/flat/contains.js';\nimport {linearRingssContainsXY as _ol_geom_flat_contains$linearRingssContainsXY} from './ol/geom/flat/contains.js';\nimport {deflateCoordinate as _ol_geom_flat_deflate$deflateCoordinate} from './ol/geom/flat/deflate.js';\nimport {deflateCoordinates as _ol_geom_flat_deflate$deflateCoordinates} from './ol/geom/flat/deflate.js';\nimport {deflateCoordinatesArray as _ol_geom_flat_deflate$deflateCoordinatesArray} from './ol/geom/flat/deflate.js';\nimport {deflateMultiCoordinatesArray as _ol_geom_flat_deflate$deflateMultiCoordinatesArray} from './ol/geom/flat/deflate.js';\nimport {flipXY as _ol_geom_flat_flip$flipXY} from './ol/geom/flat/flip.js';\nimport {greatCircleArc as _ol_geom_flat_geodesic$greatCircleArc} from './ol/geom/flat/geodesic.js';\nimport {meridian as _ol_geom_flat_geodesic$meridian} from './ol/geom/flat/geodesic.js';\nimport {parallel as _ol_geom_flat_geodesic$parallel} from './ol/geom/flat/geodesic.js';\nimport {inflateCoordinates as _ol_geom_flat_inflate$inflateCoordinates} from './ol/geom/flat/inflate.js';\nimport {inflateCoordinatesArray as _ol_geom_flat_inflate$inflateCoordinatesArray} from './ol/geom/flat/inflate.js';\nimport {inflateMultiCoordinatesArray as _ol_geom_flat_inflate$inflateMultiCoordinatesArray} from './ol/geom/flat/inflate.js';\nimport {getInteriorPointOfArray as _ol_geom_flat_interiorpoint$getInteriorPointOfArray} from './ol/geom/flat/interiorpoint.js';\nimport {getInteriorPointsOfMultiArray as _ol_geom_flat_interiorpoint$getInteriorPointsOfMultiArray} from './ol/geom/flat/interiorpoint.js';\nimport {interpolatePoint as _ol_geom_flat_interpolate$interpolatePoint} from './ol/geom/flat/interpolate.js';\nimport {lineStringCoordinateAtM as _ol_geom_flat_interpolate$lineStringCoordinateAtM} from './ol/geom/flat/interpolate.js';\nimport {lineStringsCoordinateAtM as _ol_geom_flat_interpolate$lineStringsCoordinateAtM} from './ol/geom/flat/interpolate.js';\nimport {intersectsLineString as _ol_geom_flat_intersectsextent$intersectsLineString} from './ol/geom/flat/intersectsextent.js';\nimport {intersectsLineStringArray as _ol_geom_flat_intersectsextent$intersectsLineStringArray} from './ol/geom/flat/intersectsextent.js';\nimport {intersectsLinearRing as _ol_geom_flat_intersectsextent$intersectsLinearRing} from './ol/geom/flat/intersectsextent.js';\nimport {intersectsLinearRingArray as _ol_geom_flat_intersectsextent$intersectsLinearRingArray} from './ol/geom/flat/intersectsextent.js';\nimport {intersectsLinearRingMultiArray as _ol_geom_flat_intersectsextent$intersectsLinearRingMultiArray} from './ol/geom/flat/intersectsextent.js';\nimport {lineStringLength as _ol_geom_flat_length$lineStringLength} from './ol/geom/flat/length.js';\nimport {linearRingLength as _ol_geom_flat_length$linearRingLength} from './ol/geom/flat/length.js';\nimport {linearRingIsClockwise as _ol_geom_flat_orient$linearRingIsClockwise} from './ol/geom/flat/orient.js';\nimport {linearRingsAreOriented as _ol_geom_flat_orient$linearRingsAreOriented} from './ol/geom/flat/orient.js';\nimport {linearRingssAreOriented as _ol_geom_flat_orient$linearRingssAreOriented} from './ol/geom/flat/orient.js';\nimport {orientLinearRings as _ol_geom_flat_orient$orientLinearRings} from './ol/geom/flat/orient.js';\nimport {orientLinearRingsArray as _ol_geom_flat_orient$orientLinearRingsArray} from './ol/geom/flat/orient.js';\nimport {inflateEnds as _ol_geom_flat_orient$inflateEnds} from './ol/geom/flat/orient.js';\nimport {coordinates as _ol_geom_flat_reverse$coordinates} from './ol/geom/flat/reverse.js';\nimport {forEach as _ol_geom_flat_segments$forEach} from './ol/geom/flat/segments.js';\nimport {simplifyLineString as _ol_geom_flat_simplify$simplifyLineString} from './ol/geom/flat/simplify.js';\nimport {douglasPeucker as _ol_geom_flat_simplify$douglasPeucker} from './ol/geom/flat/simplify.js';\nimport {douglasPeuckerArray as _ol_geom_flat_simplify$douglasPeuckerArray} from './ol/geom/flat/simplify.js';\nimport {douglasPeuckerMultiArray as _ol_geom_flat_simplify$douglasPeuckerMultiArray} from './ol/geom/flat/simplify.js';\nimport {radialDistance as _ol_geom_flat_simplify$radialDistance} from './ol/geom/flat/simplify.js';\nimport {snap as _ol_geom_flat_simplify$snap} from './ol/geom/flat/simplify.js';\nimport {quantize as _ol_geom_flat_simplify$quantize} from './ol/geom/flat/simplify.js';\nimport {quantizeArray as _ol_geom_flat_simplify$quantizeArray} from './ol/geom/flat/simplify.js';\nimport {quantizeMultiArray as _ol_geom_flat_simplify$quantizeMultiArray} from './ol/geom/flat/simplify.js';\nimport {matchingChunk as _ol_geom_flat_straightchunk$matchingChunk} from './ol/geom/flat/straightchunk.js';\nimport {drawTextOnPath as _ol_geom_flat_textpath$drawTextOnPath} from './ol/geom/flat/textpath.js';\nimport {lineStringIsClosed as _ol_geom_flat_topology$lineStringIsClosed} from './ol/geom/flat/topology.js';\nimport {transform2D as _ol_geom_flat_transform$transform2D} from './ol/geom/flat/transform.js';\nimport {rotate as _ol_geom_flat_transform$rotate} from './ol/geom/flat/transform.js';\nimport {scale as _ol_geom_flat_transform$scale} from './ol/geom/flat/transform.js';\nimport {translate as _ol_geom_flat_transform$translate} from './ol/geom/flat/transform.js';\nimport $ol$format$EsriJSON from './ol/format/EsriJSON.js';\nimport $ol$format$Feature from './ol/format/Feature.js';\nimport {transformGeometryWithOptions as _ol_format_Feature$transformGeometryWithOptions} from './ol/format/Feature.js';\nimport {transformExtentWithOptions as _ol_format_Feature$transformExtentWithOptions} from './ol/format/Feature.js';\nimport $ol$format$GML from './ol/format/GML.js';\nimport $ol$format$GML2 from './ol/format/GML2.js';\nimport $ol$format$GML3 from './ol/format/GML3.js';\nimport $ol$format$GML32 from './ol/format/GML32.js';\nimport {GMLNS as _ol_format_GMLBase$GMLNS} from './ol/format/GMLBase.js';\nimport $ol$format$GMLBase from './ol/format/GMLBase.js';\nimport $ol$format$GPX from './ol/format/GPX.js';\nimport $ol$format$GeoJSON from './ol/format/GeoJSON.js';\nimport $ol$format$IGC from './ol/format/IGC.js';\nimport $ol$format$IIIFInfo from './ol/format/IIIFInfo.js';\nimport $ol$format$JSONFeature from './ol/format/JSONFeature.js';\nimport {getDefaultFillStyle as _ol_format_KML$getDefaultFillStyle} from './ol/format/KML.js';\nimport {getDefaultImageStyle as _ol_format_KML$getDefaultImageStyle} from './ol/format/KML.js';\nimport {getDefaultStrokeStyle as _ol_format_KML$getDefaultStrokeStyle} from './ol/format/KML.js';\nimport {getDefaultTextStyle as _ol_format_KML$getDefaultTextStyle} from './ol/format/KML.js';\nimport {getDefaultStyle as _ol_format_KML$getDefaultStyle} from './ol/format/KML.js';\nimport {getDefaultStyleArray as _ol_format_KML$getDefaultStyleArray} from './ol/format/KML.js';\nimport $ol$format$KML from './ol/format/KML.js';\nimport {readFlatCoordinates as _ol_format_KML$readFlatCoordinates} from './ol/format/KML.js';\nimport $ol$format$MVT from './ol/format/MVT.js';\nimport $ol$format$OSMXML from './ol/format/OSMXML.js';\nimport $ol$format$OWS from './ol/format/OWS.js';\nimport $ol$format$Polyline from './ol/format/Polyline.js';\nimport {encodeDeltas as _ol_format_Polyline$encodeDeltas} from './ol/format/Polyline.js';\nimport {decodeDeltas as _ol_format_Polyline$decodeDeltas} from './ol/format/Polyline.js';\nimport {encodeFloats as _ol_format_Polyline$encodeFloats} from './ol/format/Polyline.js';\nimport {decodeFloats as _ol_format_Polyline$decodeFloats} from './ol/format/Polyline.js';\nimport {encodeSignedIntegers as _ol_format_Polyline$encodeSignedIntegers} from './ol/format/Polyline.js';\nimport {decodeSignedIntegers as _ol_format_Polyline$decodeSignedIntegers} from './ol/format/Polyline.js';\nimport {encodeUnsignedIntegers as _ol_format_Polyline$encodeUnsignedIntegers} from './ol/format/Polyline.js';\nimport {decodeUnsignedIntegers as _ol_format_Polyline$decodeUnsignedIntegers} from './ol/format/Polyline.js';\nimport {encodeUnsignedInteger as _ol_format_Polyline$encodeUnsignedInteger} from './ol/format/Polyline.js';\nimport $ol$format$TextFeature from './ol/format/TextFeature.js';\nimport $ol$format$TopoJSON from './ol/format/TopoJSON.js';\nimport $ol$format$WFS from './ol/format/WFS.js';\nimport {writeFilter as _ol_format_WFS$writeFilter} from './ol/format/WFS.js';\nimport $ol$format$WKB from './ol/format/WKB.js';\nimport $ol$format$WKT from './ol/format/WKT.js';\nimport $ol$format$WMSCapabilities from './ol/format/WMSCapabilities.js';\nimport $ol$format$WMSGetFeatureInfo from './ol/format/WMSGetFeatureInfo.js';\nimport $ol$format$WMTSCapabilities from './ol/format/WMTSCapabilities.js';\nimport $ol$format$XML from './ol/format/XML.js';\nimport $ol$format$XMLFeature from './ol/format/XMLFeature.js';\nimport {and as _ol_format_filter$and} from './ol/format/filter.js';\nimport {or as _ol_format_filter$or} from './ol/format/filter.js';\nimport {not as _ol_format_filter$not} from './ol/format/filter.js';\nimport {bbox as _ol_format_filter$bbox} from './ol/format/filter.js';\nimport {contains as _ol_format_filter$contains} from './ol/format/filter.js';\nimport {intersects as _ol_format_filter$intersects} from './ol/format/filter.js';\nimport {disjoint as _ol_format_filter$disjoint} from './ol/format/filter.js';\nimport {within as _ol_format_filter$within} from './ol/format/filter.js';\nimport {dwithin as _ol_format_filter$dwithin} from './ol/format/filter.js';\nimport {equalTo as _ol_format_filter$equalTo} from './ol/format/filter.js';\nimport {notEqualTo as _ol_format_filter$notEqualTo} from './ol/format/filter.js';\nimport {lessThan as _ol_format_filter$lessThan} from './ol/format/filter.js';\nimport {lessThanOrEqualTo as _ol_format_filter$lessThanOrEqualTo} from './ol/format/filter.js';\nimport {greaterThan as _ol_format_filter$greaterThan} from './ol/format/filter.js';\nimport {greaterThanOrEqualTo as _ol_format_filter$greaterThanOrEqualTo} from './ol/format/filter.js';\nimport {isNull as _ol_format_filter$isNull} from './ol/format/filter.js';\nimport {between as _ol_format_filter$between} from './ol/format/filter.js';\nimport {like as _ol_format_filter$like} from './ol/format/filter.js';\nimport {during as _ol_format_filter$during} from './ol/format/filter.js';\nimport {resourceId as _ol_format_filter$resourceId} from './ol/format/filter.js';\nimport {readHref as _ol_format_xlink$readHref} from './ol/format/xlink.js';\nimport {readBoolean as _ol_format_xsd$readBoolean} from './ol/format/xsd.js';\nimport {readBooleanString as _ol_format_xsd$readBooleanString} from './ol/format/xsd.js';\nimport {readDateTime as _ol_format_xsd$readDateTime} from './ol/format/xsd.js';\nimport {readDecimal as _ol_format_xsd$readDecimal} from './ol/format/xsd.js';\nimport {readDecimalString as _ol_format_xsd$readDecimalString} from './ol/format/xsd.js';\nimport {readPositiveInteger as _ol_format_xsd$readPositiveInteger} from './ol/format/xsd.js';\nimport {readNonNegativeIntegerString as _ol_format_xsd$readNonNegativeIntegerString} from './ol/format/xsd.js';\nimport {readString as _ol_format_xsd$readString} from './ol/format/xsd.js';\nimport {writeBooleanTextNode as _ol_format_xsd$writeBooleanTextNode} from './ol/format/xsd.js';\nimport {writeCDATASection as _ol_format_xsd$writeCDATASection} from './ol/format/xsd.js';\nimport {writeDateTimeTextNode as _ol_format_xsd$writeDateTimeTextNode} from './ol/format/xsd.js';\nimport {writeDecimalTextNode as _ol_format_xsd$writeDecimalTextNode} from './ol/format/xsd.js';\nimport {writeNonNegativeIntegerTextNode as _ol_format_xsd$writeNonNegativeIntegerTextNode} from './ol/format/xsd.js';\nimport {writeStringTextNode as _ol_format_xsd$writeStringTextNode} from './ol/format/xsd.js';\nimport $ol$format$filter$And from './ol/format/filter/And.js';\nimport $ol$format$filter$Bbox from './ol/format/filter/Bbox.js';\nimport $ol$format$filter$Comparison from './ol/format/filter/Comparison.js';\nimport $ol$format$filter$ComparisonBinary from './ol/format/filter/ComparisonBinary.js';\nimport $ol$format$filter$Contains from './ol/format/filter/Contains.js';\nimport $ol$format$filter$DWithin from './ol/format/filter/DWithin.js';\nimport $ol$format$filter$Disjoint from './ol/format/filter/Disjoint.js';\nimport $ol$format$filter$During from './ol/format/filter/During.js';\nimport $ol$format$filter$EqualTo from './ol/format/filter/EqualTo.js';\nimport $ol$format$filter$Filter from './ol/format/filter/Filter.js';\nimport $ol$format$filter$GreaterThan from './ol/format/filter/GreaterThan.js';\nimport $ol$format$filter$GreaterThanOrEqualTo from './ol/format/filter/GreaterThanOrEqualTo.js';\nimport $ol$format$filter$Intersects from './ol/format/filter/Intersects.js';\nimport $ol$format$filter$IsBetween from './ol/format/filter/IsBetween.js';\nimport $ol$format$filter$IsLike from './ol/format/filter/IsLike.js';\nimport $ol$format$filter$IsNull from './ol/format/filter/IsNull.js';\nimport $ol$format$filter$LessThan from './ol/format/filter/LessThan.js';\nimport $ol$format$filter$LessThanOrEqualTo from './ol/format/filter/LessThanOrEqualTo.js';\nimport $ol$format$filter$LogicalNary from './ol/format/filter/LogicalNary.js';\nimport $ol$format$filter$Not from './ol/format/filter/Not.js';\nimport $ol$format$filter$NotEqualTo from './ol/format/filter/NotEqualTo.js';\nimport $ol$format$filter$Or from './ol/format/filter/Or.js';\nimport $ol$format$filter$ResourceId from './ol/format/filter/ResourceId.js';\nimport $ol$format$filter$Spatial from './ol/format/filter/Spatial.js';\nimport $ol$format$filter$Within from './ol/format/filter/Within.js';\nimport $ol$events$Event from './ol/events/Event.js';\nimport {stopPropagation as _ol_events_Event$stopPropagation} from './ol/events/Event.js';\nimport {preventDefault as _ol_events_Event$preventDefault} from './ol/events/Event.js';\nimport $ol$events$Target from './ol/events/Target.js';\nimport {all as _ol_events_condition$all} from './ol/events/condition.js';\nimport {altKeyOnly as _ol_events_condition$altKeyOnly} from './ol/events/condition.js';\nimport {altShiftKeysOnly as _ol_events_condition$altShiftKeysOnly} from './ol/events/condition.js';\nimport {focus as _ol_events_condition$focus} from './ol/events/condition.js';\nimport {focusWithTabindex as _ol_events_condition$focusWithTabindex} from './ol/events/condition.js';\nimport {always as _ol_events_condition$always} from './ol/events/condition.js';\nimport {click as _ol_events_condition$click} from './ol/events/condition.js';\nimport {mouseActionButton as _ol_events_condition$mouseActionButton} from './ol/events/condition.js';\nimport {never as _ol_events_condition$never} from './ol/events/condition.js';\nimport {pointerMove as _ol_events_condition$pointerMove} from './ol/events/condition.js';\nimport {singleClick as _ol_events_condition$singleClick} from './ol/events/condition.js';\nimport {doubleClick as _ol_events_condition$doubleClick} from './ol/events/condition.js';\nimport {noModifierKeys as _ol_events_condition$noModifierKeys} from './ol/events/condition.js';\nimport {platformModifierKeyOnly as _ol_events_condition$platformModifierKeyOnly} from './ol/events/condition.js';\nimport {shiftKeyOnly as _ol_events_condition$shiftKeyOnly} from './ol/events/condition.js';\nimport {targetNotEditable as _ol_events_condition$targetNotEditable} from './ol/events/condition.js';\nimport {mouseOnly as _ol_events_condition$mouseOnly} from './ol/events/condition.js';\nimport {touchOnly as _ol_events_condition$touchOnly} from './ol/events/condition.js';\nimport {penOnly as _ol_events_condition$penOnly} from './ol/events/condition.js';\nimport {primaryAction as _ol_events_condition$primaryAction} from './ol/events/condition.js';\nimport $ol$control$Attribution from './ol/control/Attribution.js';\nimport $ol$control$Control from './ol/control/Control.js';\nimport $ol$control$FullScreen from './ol/control/FullScreen.js';\nimport $ol$control$MousePosition from './ol/control/MousePosition.js';\nimport $ol$control$OverviewMap from './ol/control/OverviewMap.js';\nimport $ol$control$Rotate from './ol/control/Rotate.js';\nimport $ol$control$ScaleLine from './ol/control/ScaleLine.js';\nimport $ol$control$Zoom from './ol/control/Zoom.js';\nimport $ol$control$ZoomSlider from './ol/control/ZoomSlider.js';\nimport $ol$control$ZoomToExtent from './ol/control/ZoomToExtent.js';\n\nvar ol = {};\nol.AssertionError = $ol$AssertionError;\nol.Collection = $ol$Collection;\nol.Collection.CollectionEvent = _ol_Collection$CollectionEvent;\nol.DataTile = $ol$DataTile;\nol.Disposable = $ol$Disposable;\nol.Feature = $ol$Feature;\nol.Feature.createStyleFunction = _ol_Feature$createStyleFunction;\nol.Geolocation = $ol$Geolocation;\nol.Image = $ol$Image;\nol.Image.listenImage = _ol_Image$listenImage;\nol.ImageBase = $ol$ImageBase;\nol.ImageCanvas = $ol$ImageCanvas;\nol.ImageTile = $ol$ImageTile;\nol.Kinetic = $ol$Kinetic;\nol.Map = $ol$Map;\nol.MapBrowserEvent = $ol$MapBrowserEvent;\nol.MapBrowserEventHandler = $ol$MapBrowserEventHandler;\nol.MapEvent = $ol$MapEvent;\nol.Object = $ol$Object;\nol.Object.ObjectEvent = _ol_Object$ObjectEvent;\nol.Observable = $ol$Observable;\nol.Observable.unByKey = _ol_Observable$unByKey;\nol.Overlay = $ol$Overlay;\nol.PluggableMap = $ol$PluggableMap;\nol.Tile = $ol$Tile;\nol.TileCache = $ol$TileCache;\nol.TileQueue = $ol$TileQueue;\nol.TileQueue.getTilePriority = _ol_TileQueue$getTilePriority;\nol.TileRange = $ol$TileRange;\nol.TileRange.createOrUpdate = _ol_TileRange$createOrUpdate;\nol.VectorRenderTile = $ol$VectorRenderTile;\nol.VectorTile = $ol$VectorTile;\nol.View = $ol$View;\nol.View.createCenterConstraint = _ol_View$createCenterConstraint;\nol.View.createResolutionConstraint = _ol_View$createResolutionConstraint;\nol.View.createRotationConstraint = _ol_View$createRotationConstraint;\nol.View.isNoopAnimation = _ol_View$isNoopAnimation;\nol.array = {};\nol.array.binarySearch = _ol_array$binarySearch;\nol.array.equals = _ol_array$equals;\nol.array.extend = _ol_array$extend;\nol.array.find = _ol_array$find;\nol.array.findIndex = _ol_array$findIndex;\nol.array.includes = _ol_array$includes;\nol.array.isSorted = _ol_array$isSorted;\nol.array.linearFindNearest = _ol_array$linearFindNearest;\nol.array.numberSafeCompareFunction = _ol_array$numberSafeCompareFunction;\nol.array.remove = _ol_array$remove;\nol.array.reverseSubArray = _ol_array$reverseSubArray;\nol.array.stableSort = _ol_array$stableSort;\nol.asserts = {};\nol.asserts.assert = _ol_asserts$assert;\nol.centerconstraint = {};\nol.centerconstraint.createExtent = _ol_centerconstraint$createExtent;\nol.centerconstraint.none = _ol_centerconstraint$none;\nol.color = {};\nol.color.asArray = _ol_color$asArray;\nol.color.asString = _ol_color$asString;\nol.color.fromString = _ol_color$fromString;\nol.color.isStringColor = _ol_color$isStringColor;\nol.color.normalize = _ol_color$normalize;\nol.color.toString = _ol_color$toString;\nol.colorlike = {};\nol.colorlike.asColorLike = _ol_colorlike$asColorLike;\nol.control = {};\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 = {};\nol.coordinate.add = _ol_coordinate$add;\nol.coordinate.closestOnCircle = _ol_coordinate$closestOnCircle;\nol.coordinate.closestOnSegment = _ol_coordinate$closestOnSegment;\nol.coordinate.createStringXY = _ol_coordinate$createStringXY;\nol.coordinate.degreesToStringHDMS = _ol_coordinate$degreesToStringHDMS;\nol.coordinate.distance = _ol_coordinate$distance;\nol.coordinate.equals = _ol_coordinate$equals;\nol.coordinate.format = _ol_coordinate$format;\nol.coordinate.getWorldsAway = _ol_coordinate$getWorldsAway;\nol.coordinate.rotate = _ol_coordinate$rotate;\nol.coordinate.scale = _ol_coordinate$scale;\nol.coordinate.squaredDistance = _ol_coordinate$squaredDistance;\nol.coordinate.squaredDistanceToSegment = _ol_coordinate$squaredDistanceToSegment;\nol.coordinate.toStringHDMS = _ol_coordinate$toStringHDMS;\nol.coordinate.toStringXY = _ol_coordinate$toStringXY;\nol.coordinate.wrapX = _ol_coordinate$wrapX;\nol.css = {};\nol.css.CLASS_COLLAPSED = _ol_css$CLASS_COLLAPSED;\nol.css.CLASS_CONTROL = _ol_css$CLASS_CONTROL;\nol.css.CLASS_HIDDEN = _ol_css$CLASS_HIDDEN;\nol.css.CLASS_SELECTABLE = _ol_css$CLASS_SELECTABLE;\nol.css.CLASS_UNSELECTABLE = _ol_css$CLASS_UNSELECTABLE;\nol.css.CLASS_UNSUPPORTED = _ol_css$CLASS_UNSUPPORTED;\nol.css.getFontParameters = _ol_css$getFontParameters;\nol.dom = {};\nol.dom.createCanvasContext2D = _ol_dom$createCanvasContext2D;\nol.dom.outerHeight = _ol_dom$outerHeight;\nol.dom.outerWidth = _ol_dom$outerWidth;\nol.dom.releaseCanvas = _ol_dom$releaseCanvas;\nol.dom.removeChildren = _ol_dom$removeChildren;\nol.dom.removeNode = _ol_dom$removeNode;\nol.dom.replaceChildren = _ol_dom$replaceChildren;\nol.dom.replaceNode = _ol_dom$replaceNode;\nol.easing = {};\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 = {};\nol.events.Event = $ol$events$Event;\nol.events.Event.preventDefault = _ol_events_Event$preventDefault;\nol.events.Event.stopPropagation = _ol_events_Event$stopPropagation;\nol.events.Target = $ol$events$Target;\nol.events.condition = {};\nol.events.condition.all = _ol_events_condition$all;\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.focusWithTabindex = _ol_events_condition$focusWithTabindex;\nol.events.condition.mouseActionButton = _ol_events_condition$mouseActionButton;\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$platformModifierKeyOnly;\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.events.listen = _ol_events$listen;\nol.events.listenOnce = _ol_events$listenOnce;\nol.events.unlistenByKey = _ol_events$unlistenByKey;\nol.extent = {};\nol.extent.applyTransform = _ol_extent$applyTransform;\nol.extent.approximatelyEquals = _ol_extent$approximatelyEquals;\nol.extent.boundingExtent = _ol_extent$boundingExtent;\nol.extent.buffer = _ol_extent$buffer;\nol.extent.clone = _ol_extent$clone;\nol.extent.closestSquaredDistanceXY = _ol_extent$closestSquaredDistanceXY;\nol.extent.containsCoordinate = _ol_extent$containsCoordinate;\nol.extent.containsExtent = _ol_extent$containsExtent;\nol.extent.containsXY = _ol_extent$containsXY;\nol.extent.coordinateRelationship = _ol_extent$coordinateRelationship;\nol.extent.createEmpty = _ol_extent$createEmpty;\nol.extent.createOrUpdate = _ol_extent$createOrUpdate;\nol.extent.createOrUpdateEmpty = _ol_extent$createOrUpdateEmpty;\nol.extent.createOrUpdateFromCoordinate = _ol_extent$createOrUpdateFromCoordinate;\nol.extent.createOrUpdateFromCoordinates = _ol_extent$createOrUpdateFromCoordinates;\nol.extent.createOrUpdateFromFlatCoordinates = _ol_extent$createOrUpdateFromFlatCoordinates;\nol.extent.createOrUpdateFromRings = _ol_extent$createOrUpdateFromRings;\nol.extent.equals = _ol_extent$equals;\nol.extent.extend = _ol_extent$extend;\nol.extent.extendCoordinate = _ol_extent$extendCoordinate;\nol.extent.extendCoordinates = _ol_extent$extendCoordinates;\nol.extent.extendFlatCoordinates = _ol_extent$extendFlatCoordinates;\nol.extent.extendRings = _ol_extent$extendRings;\nol.extent.extendXY = _ol_extent$extendXY;\nol.extent.forEachCorner = _ol_extent$forEachCorner;\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.getCorner = _ol_extent$getCorner;\nol.extent.getEnlargedArea = _ol_extent$getEnlargedArea;\nol.extent.getForViewAndSize = _ol_extent$getForViewAndSize;\nol.extent.getHeight = _ol_extent$getHeight;\nol.extent.getIntersection = _ol_extent$getIntersection;\nol.extent.getIntersectionArea = _ol_extent$getIntersectionArea;\nol.extent.getMargin = _ol_extent$getMargin;\nol.extent.getRotatedViewport = _ol_extent$getRotatedViewport;\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.intersectsSegment = _ol_extent$intersectsSegment;\nol.extent.isEmpty = _ol_extent$isEmpty;\nol.extent.returnOrUpdate = _ol_extent$returnOrUpdate;\nol.extent.scaleFromCenter = _ol_extent$scaleFromCenter;\nol.extent.wrapAndSliceX = _ol_extent$wrapAndSliceX;\nol.extent.wrapX = _ol_extent$wrapX;\nol.featureloader = {};\nol.featureloader.loadFeaturesXhr = _ol_featureloader$loadFeaturesXhr;\nol.featureloader.setWithCredentials = _ol_featureloader$setWithCredentials;\nol.featureloader.xhr = _ol_featureloader$xhr;\nol.format = {};\nol.format.EsriJSON = $ol$format$EsriJSON;\nol.format.Feature = $ol$format$Feature;\nol.format.Feature.transformExtentWithOptions = _ol_format_Feature$transformExtentWithOptions;\nol.format.Feature.transformGeometryWithOptions = _ol_format_Feature$transformGeometryWithOptions;\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.GMLBase = $ol$format$GMLBase;\nol.format.GMLBase.GMLNS = _ol_format_GMLBase$GMLNS;\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.JSONFeature = $ol$format$JSONFeature;\nol.format.KML = $ol$format$KML;\nol.format.KML.getDefaultFillStyle = _ol_format_KML$getDefaultFillStyle;\nol.format.KML.getDefaultImageStyle = _ol_format_KML$getDefaultImageStyle;\nol.format.KML.getDefaultStrokeStyle = _ol_format_KML$getDefaultStrokeStyle;\nol.format.KML.getDefaultStyle = _ol_format_KML$getDefaultStyle;\nol.format.KML.getDefaultStyleArray = _ol_format_KML$getDefaultStyleArray;\nol.format.KML.getDefaultTextStyle = _ol_format_KML$getDefaultTextStyle;\nol.format.KML.readFlatCoordinates = _ol_format_KML$readFlatCoordinates;\nol.format.MVT = $ol$format$MVT;\nol.format.OSMXML = $ol$format$OSMXML;\nol.format.OWS = $ol$format$OWS;\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.decodeSignedIntegers = _ol_format_Polyline$decodeSignedIntegers;\nol.format.Polyline.decodeUnsignedIntegers = _ol_format_Polyline$decodeUnsignedIntegers;\nol.format.Polyline.encodeDeltas = _ol_format_Polyline$encodeDeltas;\nol.format.Polyline.encodeFloats = _ol_format_Polyline$encodeFloats;\nol.format.Polyline.encodeSignedIntegers = _ol_format_Polyline$encodeSignedIntegers;\nol.format.Polyline.encodeUnsignedInteger = _ol_format_Polyline$encodeUnsignedInteger;\nol.format.Polyline.encodeUnsignedIntegers = _ol_format_Polyline$encodeUnsignedIntegers;\nol.format.TextFeature = $ol$format$TextFeature;\nol.format.TopoJSON = $ol$format$TopoJSON;\nol.format.WFS = $ol$format$WFS;\nol.format.WFS.writeFilter = _ol_format_WFS$writeFilter;\nol.format.WKB = $ol$format$WKB;\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.XML = $ol$format$XML;\nol.format.XMLFeature = $ol$format$XMLFeature;\nol.format.filter = {};\nol.format.filter.And = $ol$format$filter$And;\nol.format.filter.Bbox = $ol$format$filter$Bbox;\nol.format.filter.Comparison = $ol$format$filter$Comparison;\nol.format.filter.ComparisonBinary = $ol$format$filter$ComparisonBinary;\nol.format.filter.Contains = $ol$format$filter$Contains;\nol.format.filter.DWithin = $ol$format$filter$DWithin;\nol.format.filter.Disjoint = $ol$format$filter$Disjoint;\nol.format.filter.During = $ol$format$filter$During;\nol.format.filter.EqualTo = $ol$format$filter$EqualTo;\nol.format.filter.Filter = $ol$format$filter$Filter;\nol.format.filter.GreaterThan = $ol$format$filter$GreaterThan;\nol.format.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.LogicalNary = $ol$format$filter$LogicalNary;\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.ResourceId = $ol$format$filter$ResourceId;\nol.format.filter.Spatial = $ol$format$filter$Spatial;\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.disjoint = _ol_format_filter$disjoint;\nol.format.filter.during = _ol_format_filter$during;\nol.format.filter.dwithin = _ol_format_filter$dwithin;\nol.format.filter.equalTo = _ol_format_filter$equalTo;\nol.format.filter.greaterThan = _ol_format_filter$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.resourceId = _ol_format_filter$resourceId;\nol.format.filter.within = _ol_format_filter$within;\nol.format.xlink = {};\nol.format.xlink.readHref = _ol_format_xlink$readHref;\nol.format.xsd = {};\nol.format.xsd.readBoolean = _ol_format_xsd$readBoolean;\nol.format.xsd.readBooleanString = _ol_format_xsd$readBooleanString;\nol.format.xsd.readDateTime = _ol_format_xsd$readDateTime;\nol.format.xsd.readDecimal = _ol_format_xsd$readDecimal;\nol.format.xsd.readDecimalString = _ol_format_xsd$readDecimalString;\nol.format.xsd.readNonNegativeIntegerString = _ol_format_xsd$readNonNegativeIntegerString;\nol.format.xsd.readPositiveInteger = _ol_format_xsd$readPositiveInteger;\nol.format.xsd.readString = _ol_format_xsd$readString;\nol.format.xsd.writeBooleanTextNode = _ol_format_xsd$writeBooleanTextNode;\nol.format.xsd.writeCDATASection = _ol_format_xsd$writeCDATASection;\nol.format.xsd.writeDateTimeTextNode = _ol_format_xsd$writeDateTimeTextNode;\nol.format.xsd.writeDecimalTextNode = _ol_format_xsd$writeDecimalTextNode;\nol.format.xsd.writeNonNegativeIntegerTextNode = _ol_format_xsd$writeNonNegativeIntegerTextNode;\nol.format.xsd.writeStringTextNode = _ol_format_xsd$writeStringTextNode;\nol.functions = {};\nol.functions.FALSE = _ol_functions$FALSE;\nol.functions.TRUE = _ol_functions$TRUE;\nol.functions.VOID = _ol_functions$VOID;\nol.functions.memoizeOne = _ol_functions$memoizeOne;\nol.functions.toPromise = _ol_functions$toPromise;\nol.geom = {};\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;\nol.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.Polygon.makeRegular = _ol_geom_Polygon$makeRegular;\nol.geom.SimpleGeometry = $ol$geom$SimpleGeometry;\nol.geom.SimpleGeometry.getStrideForLayout = _ol_geom_SimpleGeometry$getStrideForLayout;\nol.geom.SimpleGeometry.transformGeom2D = _ol_geom_SimpleGeometry$transformGeom2D;\nol.geom.flat = {};\nol.geom.flat.area = {};\nol.geom.flat.area.linearRing = _ol_geom_flat_area$linearRing;\nol.geom.flat.area.linearRings = _ol_geom_flat_area$linearRings;\nol.geom.flat.area.linearRingss = _ol_geom_flat_area$linearRingss;\nol.geom.flat.center = {};\nol.geom.flat.center.linearRingss = _ol_geom_flat_center$linearRingss;\nol.geom.flat.closest = {};\nol.geom.flat.closest.arrayMaxSquaredDelta = _ol_geom_flat_closest$arrayMaxSquaredDelta;\nol.geom.flat.closest.assignClosestArrayPoint = _ol_geom_flat_closest$assignClosestArrayPoint;\nol.geom.flat.closest.assignClosestMultiArrayPoint = _ol_geom_flat_closest$assignClosestMultiArrayPoint;\nol.geom.flat.closest.assignClosestPoint = _ol_geom_flat_closest$assignClosestPoint;\nol.geom.flat.closest.maxSquaredDelta = _ol_geom_flat_closest$maxSquaredDelta;\nol.geom.flat.closest.multiArrayMaxSquaredDelta = _ol_geom_flat_closest$multiArrayMaxSquaredDelta;\nol.geom.flat.contains = {};\nol.geom.flat.contains.linearRingContainsExtent = _ol_geom_flat_contains$linearRingContainsExtent;\nol.geom.flat.contains.linearRingContainsXY = _ol_geom_flat_contains$linearRingContainsXY;\nol.geom.flat.contains.linearRingsContainsXY = _ol_geom_flat_contains$linearRingsContainsXY;\nol.geom.flat.contains.linearRingssContainsXY = _ol_geom_flat_contains$linearRingssContainsXY;\nol.geom.flat.deflate = {};\nol.geom.flat.deflate.deflateCoordinate = _ol_geom_flat_deflate$deflateCoordinate;\nol.geom.flat.deflate.deflateCoordinates = _ol_geom_flat_deflate$deflateCoordinates;\nol.geom.flat.deflate.deflateCoordinatesArray = _ol_geom_flat_deflate$deflateCoordinatesArray;\nol.geom.flat.deflate.deflateMultiCoordinatesArray = _ol_geom_flat_deflate$deflateMultiCoordinatesArray;\nol.geom.flat.flip = {};\nol.geom.flat.flip.flipXY = _ol_geom_flat_flip$flipXY;\nol.geom.flat.geodesic = {};\nol.geom.flat.geodesic.greatCircleArc = _ol_geom_flat_geodesic$greatCircleArc;\nol.geom.flat.geodesic.meridian = _ol_geom_flat_geodesic$meridian;\nol.geom.flat.geodesic.parallel = _ol_geom_flat_geodesic$parallel;\nol.geom.flat.inflate = {};\nol.geom.flat.inflate.inflateCoordinates = _ol_geom_flat_inflate$inflateCoordinates;\nol.geom.flat.inflate.inflateCoordinatesArray = _ol_geom_flat_inflate$inflateCoordinatesArray;\nol.geom.flat.inflate.inflateMultiCoordinatesArray = _ol_geom_flat_inflate$inflateMultiCoordinatesArray;\nol.geom.flat.interiorpoint = {};\nol.geom.flat.interiorpoint.getInteriorPointOfArray = _ol_geom_flat_interiorpoint$getInteriorPointOfArray;\nol.geom.flat.interiorpoint.getInteriorPointsOfMultiArray = _ol_geom_flat_interiorpoint$getInteriorPointsOfMultiArray;\nol.geom.flat.interpolate = {};\nol.geom.flat.interpolate.interpolatePoint = _ol_geom_flat_interpolate$interpolatePoint;\nol.geom.flat.interpolate.lineStringCoordinateAtM = _ol_geom_flat_interpolate$lineStringCoordinateAtM;\nol.geom.flat.interpolate.lineStringsCoordinateAtM = _ol_geom_flat_interpolate$lineStringsCoordinateAtM;\nol.geom.flat.intersectsextent = {};\nol.geom.flat.intersectsextent.intersectsLineString = _ol_geom_flat_intersectsextent$intersectsLineString;\nol.geom.flat.intersectsextent.intersectsLineStringArray = _ol_geom_flat_intersectsextent$intersectsLineStringArray;\nol.geom.flat.intersectsextent.intersectsLinearRing = _ol_geom_flat_intersectsextent$intersectsLinearRing;\nol.geom.flat.intersectsextent.intersectsLinearRingArray = _ol_geom_flat_intersectsextent$intersectsLinearRingArray;\nol.geom.flat.intersectsextent.intersectsLinearRingMultiArray = _ol_geom_flat_intersectsextent$intersectsLinearRingMultiArray;\nol.geom.flat.length = {};\nol.geom.flat.length.lineStringLength = _ol_geom_flat_length$lineStringLength;\nol.geom.flat.length.linearRingLength = _ol_geom_flat_length$linearRingLength;\nol.geom.flat.orient = {};\nol.geom.flat.orient.inflateEnds = _ol_geom_flat_orient$inflateEnds;\nol.geom.flat.orient.linearRingIsClockwise = _ol_geom_flat_orient$linearRingIsClockwise;\nol.geom.flat.orient.linearRingsAreOriented = _ol_geom_flat_orient$linearRingsAreOriented;\nol.geom.flat.orient.linearRingssAreOriented = _ol_geom_flat_orient$linearRingssAreOriented;\nol.geom.flat.orient.orientLinearRings = _ol_geom_flat_orient$orientLinearRings;\nol.geom.flat.orient.orientLinearRingsArray = _ol_geom_flat_orient$orientLinearRingsArray;\nol.geom.flat.reverse = {};\nol.geom.flat.reverse.coordinates = _ol_geom_flat_reverse$coordinates;\nol.geom.flat.segments = {};\nol.geom.flat.segments.forEach = _ol_geom_flat_segments$forEach;\nol.geom.flat.simplify = {};\nol.geom.flat.simplify.douglasPeucker = _ol_geom_flat_simplify$douglasPeucker;\nol.geom.flat.simplify.douglasPeuckerArray = _ol_geom_flat_simplify$douglasPeuckerArray;\nol.geom.flat.simplify.douglasPeuckerMultiArray = _ol_geom_flat_simplify$douglasPeuckerMultiArray;\nol.geom.flat.simplify.quantize = _ol_geom_flat_simplify$quantize;\nol.geom.flat.simplify.quantizeArray = _ol_geom_flat_simplify$quantizeArray;\nol.geom.flat.simplify.quantizeMultiArray = _ol_geom_flat_simplify$quantizeMultiArray;\nol.geom.flat.simplify.radialDistance = _ol_geom_flat_simplify$radialDistance;\nol.geom.flat.simplify.simplifyLineString = _ol_geom_flat_simplify$simplifyLineString;\nol.geom.flat.simplify.snap = _ol_geom_flat_simplify$snap;\nol.geom.flat.straightchunk = {};\nol.geom.flat.straightchunk.matchingChunk = _ol_geom_flat_straightchunk$matchingChunk;\nol.geom.flat.textpath = {};\nol.geom.flat.textpath.drawTextOnPath = _ol_geom_flat_textpath$drawTextOnPath;\nol.geom.flat.topology = {};\nol.geom.flat.topology.lineStringIsClosed = _ol_geom_flat_topology$lineStringIsClosed;\nol.geom.flat.transform = {};\nol.geom.flat.transform.rotate = _ol_geom_flat_transform$rotate;\nol.geom.flat.transform.scale = _ol_geom_flat_transform$scale;\nol.geom.flat.transform.transform2D = _ol_geom_flat_transform$transform2D;\nol.geom.flat.transform.translate = _ol_geom_flat_transform$translate;\nol.has = {};\nol.has.DEVICE_PIXEL_RATIO = _ol_has$DEVICE_PIXEL_RATIO;\nol.has.FIREFOX = _ol_has$FIREFOX;\nol.has.IMAGE_DECODE = _ol_has$IMAGE_DECODE;\nol.has.MAC = _ol_has$MAC;\nol.has.PASSIVE_EVENT_LISTENERS = _ol_has$PASSIVE_EVENT_LISTENERS;\nol.has.SAFARI = _ol_has$SAFARI;\nol.has.SAFARI_BUG_237906 = _ol_has$SAFARI_BUG_237906;\nol.has.WEBKIT = _ol_has$WEBKIT;\nol.has.WORKER_OFFSCREEN_CANVAS = _ol_has$WORKER_OFFSCREEN_CANVAS;\nol.interaction = {};\nol.interaction.DoubleClickZoom = $ol$interaction$DoubleClickZoom;\nol.interaction.DragAndDrop = $ol$interaction$DragAndDrop;\nol.interaction.DragAndDrop.DragAndDropEvent = _ol_interaction_DragAndDrop$DragAndDropEvent;\nol.interaction.DragBox = $ol$interaction$DragBox;\nol.interaction.DragBox.DragBoxEvent = _ol_interaction_DragBox$DragBoxEvent;\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.DrawEvent = _ol_interaction_Draw$DrawEvent;\nol.interaction.Draw.createBox = _ol_interaction_Draw$createBox;\nol.interaction.Draw.createRegularPolygon = _ol_interaction_Draw$createRegularPolygon;\nol.interaction.Extent = $ol$interaction$Extent;\nol.interaction.Extent.ExtentEvent = _ol_interaction_Extent$ExtentEvent;\nol.interaction.Interaction = $ol$interaction$Interaction;\nol.interaction.Interaction.pan = _ol_interaction_Interaction$pan;\nol.interaction.Interaction.zoomByDelta = _ol_interaction_Interaction$zoomByDelta;\nol.interaction.KeyboardPan = $ol$interaction$KeyboardPan;\nol.interaction.KeyboardZoom = $ol$interaction$KeyboardZoom;\nol.interaction.Link = $ol$interaction$Link;\nol.interaction.Modify = $ol$interaction$Modify;\nol.interaction.Modify.ModifyEvent = _ol_interaction_Modify$ModifyEvent;\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.Pointer.centroid = _ol_interaction_Pointer$centroid;\nol.interaction.Select = $ol$interaction$Select;\nol.interaction.Select.SelectEvent = _ol_interaction_Select$SelectEvent;\nol.interaction.Snap = $ol$interaction$Snap;\nol.interaction.Translate = $ol$interaction$Translate;\nol.interaction.Translate.TranslateEvent = _ol_interaction_Translate$TranslateEvent;\nol.interaction.defaults = _ol_interaction$defaults;\nol.layer = {};\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.Group.GroupEvent = _ol_layer_Group$GroupEvent;\nol.layer.Heatmap = $ol$layer$Heatmap;\nol.layer.Image = $ol$layer$Image;\nol.layer.Layer = $ol$layer$Layer;\nol.layer.Layer.inView = _ol_layer_Layer$inView;\nol.layer.MapboxVector = $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.layer.WebGLPoints = $ol$layer$WebGLPoints;\nol.layer.WebGLTile = $ol$layer$WebGLTile;\nol.loadingstrategy = {};\nol.loadingstrategy.all = _ol_loadingstrategy$all;\nol.loadingstrategy.bbox = _ol_loadingstrategy$bbox;\nol.loadingstrategy.tile = _ol_loadingstrategy$tile;\nol.math = {};\nol.math.ceil = _ol_math$ceil;\nol.math.clamp = _ol_math$clamp;\nol.math.cosh = _ol_math$cosh;\nol.math.floor = _ol_math$floor;\nol.math.lerp = _ol_math$lerp;\nol.math.log2 = _ol_math$log2;\nol.math.modulo = _ol_math$modulo;\nol.math.round = _ol_math$round;\nol.math.solveLinearSystem = _ol_math$solveLinearSystem;\nol.math.squaredDistance = _ol_math$squaredDistance;\nol.math.squaredSegmentDistance = _ol_math$squaredSegmentDistance;\nol.math.toDegrees = _ol_math$toDegrees;\nol.math.toFixed = _ol_math$toFixed;\nol.math.toRadians = _ol_math$toRadians;\nol.net = {};\nol.net.ClientError = _ol_net$ClientError;\nol.net.ResponseError = _ol_net$ResponseError;\nol.net.getJSON = _ol_net$getJSON;\nol.net.jsonp = _ol_net$jsonp;\nol.net.overrideXHR = _ol_net$overrideXHR;\nol.net.resolveUrl = _ol_net$resolveUrl;\nol.net.restoreXHR = _ol_net$restoreXHR;\nol.obj = {};\nol.obj.assign = _ol_obj$assign;\nol.obj.clear = _ol_obj$clear;\nol.obj.getValues = _ol_obj$getValues;\nol.obj.isEmpty = _ol_obj$isEmpty;\nol.proj = {};\nol.proj.Projection = $ol$proj$Projection;\nol.proj.Units = {};\nol.proj.Units.METERS_PER_UNIT = _ol_proj_Units$METERS_PER_UNIT;\nol.proj.Units.fromCode = _ol_proj_Units$fromCode;\nol.proj.addCommon = _ol_proj$addCommon;\nol.proj.addCoordinateTransforms = _ol_proj$addCoordinateTransforms;\nol.proj.addEquivalentProjections = _ol_proj$addEquivalentProjections;\nol.proj.addEquivalentTransforms = _ol_proj$addEquivalentTransforms;\nol.proj.addProjection = _ol_proj$addProjection;\nol.proj.addProjections = _ol_proj$addProjections;\nol.proj.clearAllProjections = _ol_proj$clearAllProjections;\nol.proj.clearUserProjection = _ol_proj$clearUserProjection;\nol.proj.cloneTransform = _ol_proj$cloneTransform;\nol.proj.createProjection = _ol_proj$createProjection;\nol.proj.createSafeCoordinateTransform = _ol_proj$createSafeCoordinateTransform;\nol.proj.createTransformFromCoordinateTransform = _ol_proj$createTransformFromCoordinateTransform;\nol.proj.disableCoordinateWarning = _ol_proj$disableCoordinateWarning;\nol.proj.epsg3857 = {};\nol.proj.epsg3857.EXTENT = _ol_proj_epsg3857$EXTENT;\nol.proj.epsg3857.HALF_SIZE = _ol_proj_epsg3857$HALF_SIZE;\nol.proj.epsg3857.MAX_SAFE_Y = _ol_proj_epsg3857$MAX_SAFE_Y;\nol.proj.epsg3857.PROJECTIONS = _ol_proj_epsg3857$PROJECTIONS;\nol.proj.epsg3857.RADIUS = _ol_proj_epsg3857$RADIUS;\nol.proj.epsg3857.WORLD_EXTENT = _ol_proj_epsg3857$WORLD_EXTENT;\nol.proj.epsg3857.fromEPSG4326 = _ol_proj_epsg3857$fromEPSG4326;\nol.proj.epsg3857.toEPSG4326 = _ol_proj_epsg3857$toEPSG4326;\nol.proj.epsg4326 = {};\nol.proj.epsg4326.EXTENT = _ol_proj_epsg4326$EXTENT;\nol.proj.epsg4326.METERS_PER_UNIT = _ol_proj_epsg4326$METERS_PER_UNIT;\nol.proj.epsg4326.PROJECTIONS = _ol_proj_epsg4326$PROJECTIONS;\nol.proj.epsg4326.RADIUS = _ol_proj_epsg4326$RADIUS;\nol.proj.equivalent = _ol_proj$equivalent;\nol.proj.fromLonLat = _ol_proj$fromLonLat;\nol.proj.fromUserCoordinate = _ol_proj$fromUserCoordinate;\nol.proj.fromUserExtent = _ol_proj$fromUserExtent;\nol.proj.fromUserResolution = _ol_proj$fromUserResolution;\nol.proj.get = _ol_proj$get;\nol.proj.getPointResolution = _ol_proj$getPointResolution;\nol.proj.getTransform = _ol_proj$getTransform;\nol.proj.getTransformFromProjections = _ol_proj$getTransformFromProjections;\nol.proj.getUserProjection = _ol_proj$getUserProjection;\nol.proj.identityTransform = _ol_proj$identityTransform;\nol.proj.proj4 = {};\nol.proj.proj4.register = _ol_proj_proj4$register;\nol.proj.projections = {};\nol.proj.projections.add = _ol_proj_projections$add;\nol.proj.projections.clear = _ol_proj_projections$clear;\nol.proj.projections.get = _ol_proj_projections$get;\nol.proj.setUserProjection = _ol_proj$setUserProjection;\nol.proj.toLonLat = _ol_proj$toLonLat;\nol.proj.toUserCoordinate = _ol_proj$toUserCoordinate;\nol.proj.toUserExtent = _ol_proj$toUserExtent;\nol.proj.toUserResolution = _ol_proj$toUserResolution;\nol.proj.transform = _ol_proj$transform;\nol.proj.transformExtent = _ol_proj$transformExtent;\nol.proj.transformWithProjections = _ol_proj$transformWithProjections;\nol.proj.transforms = {};\nol.proj.transforms.add = _ol_proj_transforms$add;\nol.proj.transforms.clear = _ol_proj_transforms$clear;\nol.proj.transforms.get = _ol_proj_transforms$get;\nol.proj.transforms.remove = _ol_proj_transforms$remove;\nol.proj.useGeographic = _ol_proj$useGeographic;\nol.render = {};\nol.render.Box = $ol$render$Box;\nol.render.Event = $ol$render$Event;\nol.render.Feature = $ol$render$Feature;\nol.render.Feature.toFeature = _ol_render_Feature$toFeature;\nol.render.Feature.toGeometry = _ol_render_Feature$toGeometry;\nol.render.VectorContext = $ol$render$VectorContext;\nol.render.canvas = {};\nol.render.canvas.Builder = $ol$render$canvas$Builder;\nol.render.canvas.BuilderGroup = $ol$render$canvas$BuilderGroup;\nol.render.canvas.Executor = $ol$render$canvas$Executor;\nol.render.canvas.ExecutorGroup = $ol$render$canvas$ExecutorGroup;\nol.render.canvas.ExecutorGroup.getPixelIndexArray = _ol_render_canvas_ExecutorGroup$getPixelIndexArray;\nol.render.canvas.ImageBuilder = $ol$render$canvas$ImageBuilder;\nol.render.canvas.Immediate = $ol$render$canvas$Immediate;\nol.render.canvas.Instruction = {};\nol.render.canvas.Instruction.beginPathInstruction = _ol_render_canvas_Instruction$beginPathInstruction;\nol.render.canvas.Instruction.closePathInstruction = _ol_render_canvas_Instruction$closePathInstruction;\nol.render.canvas.Instruction.fillInstruction = _ol_render_canvas_Instruction$fillInstruction;\nol.render.canvas.Instruction.strokeInstruction = _ol_render_canvas_Instruction$strokeInstruction;\nol.render.canvas.LineStringBuilder = $ol$render$canvas$LineStringBuilder;\nol.render.canvas.PolygonBuilder = $ol$render$canvas$PolygonBuilder;\nol.render.canvas.TextBuilder = $ol$render$canvas$TextBuilder;\nol.render.canvas.checkedFonts = _ol_render_canvas$checkedFonts;\nol.render.canvas.defaultFillStyle = _ol_render_canvas$defaultFillStyle;\nol.render.canvas.defaultFont = _ol_render_canvas$defaultFont;\nol.render.canvas.defaultLineCap = _ol_render_canvas$defaultLineCap;\nol.render.canvas.defaultLineDash = _ol_render_canvas$defaultLineDash;\nol.render.canvas.defaultLineDashOffset = _ol_render_canvas$defaultLineDashOffset;\nol.render.canvas.defaultLineJoin = _ol_render_canvas$defaultLineJoin;\nol.render.canvas.defaultLineWidth = _ol_render_canvas$defaultLineWidth;\nol.render.canvas.defaultMiterLimit = _ol_render_canvas$defaultMiterLimit;\nol.render.canvas.defaultPadding = _ol_render_canvas$defaultPadding;\nol.render.canvas.defaultStrokeStyle = _ol_render_canvas$defaultStrokeStyle;\nol.render.canvas.defaultTextAlign = _ol_render_canvas$defaultTextAlign;\nol.render.canvas.defaultTextBaseline = _ol_render_canvas$defaultTextBaseline;\nol.render.canvas.drawImageOrLabel = _ol_render_canvas$drawImageOrLabel;\nol.render.canvas.getTextDimensions = _ol_render_canvas$getTextDimensions;\nol.render.canvas.hitdetect = {};\nol.render.canvas.hitdetect.HIT_DETECT_RESOLUTION = _ol_render_canvas_hitdetect$HIT_DETECT_RESOLUTION;\nol.render.canvas.hitdetect.createHitDetectionImageData = _ol_render_canvas_hitdetect$createHitDetectionImageData;\nol.render.canvas.hitdetect.hitDetect = _ol_render_canvas_hitdetect$hitDetect;\nol.render.canvas.labelCache = _ol_render_canvas$labelCache;\nol.render.canvas.measureAndCacheTextWidth = _ol_render_canvas$measureAndCacheTextWidth;\nol.render.canvas.measureTextHeight = _ol_render_canvas$measureTextHeight;\nol.render.canvas.measureTextWidth = _ol_render_canvas$measureTextWidth;\nol.render.canvas.registerFont = _ol_render_canvas$registerFont;\nol.render.canvas.rotateAtOffset = _ol_render_canvas$rotateAtOffset;\nol.render.canvas.textHeights = _ol_render_canvas$textHeights;\nol.render.getRenderPixel = _ol_render$getRenderPixel;\nol.render.getVectorContext = _ol_render$getVectorContext;\nol.render.toContext = _ol_render$toContext;\nol.renderer = {};\nol.renderer.Composite = $ol$renderer$Composite;\nol.renderer.Layer = $ol$renderer$Layer;\nol.renderer.Map = $ol$renderer$Map;\nol.renderer.canvas = {};\nol.renderer.canvas.ImageLayer = $ol$renderer$canvas$ImageLayer;\nol.renderer.canvas.Layer = $ol$renderer$canvas$Layer;\nol.renderer.canvas.Layer.canvasPool = _ol_renderer_canvas_Layer$canvasPool;\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.canvas.common = {};\nol.renderer.canvas.common.IMAGE_SMOOTHING_DISABLED = _ol_renderer_canvas_common$IMAGE_SMOOTHING_DISABLED;\nol.renderer.canvas.common.IMAGE_SMOOTHING_ENABLED = _ol_renderer_canvas_common$IMAGE_SMOOTHING_ENABLED;\nol.renderer.vector = {};\nol.renderer.vector.defaultOrder = _ol_renderer_vector$defaultOrder;\nol.renderer.vector.getSquaredTolerance = _ol_renderer_vector$getSquaredTolerance;\nol.renderer.vector.getTolerance = _ol_renderer_vector$getTolerance;\nol.renderer.vector.renderFeature = _ol_renderer_vector$renderFeature;\nol.renderer.webgl = {};\nol.renderer.webgl.Layer = $ol$renderer$webgl$Layer;\nol.renderer.webgl.Layer.colorDecodeId = _ol_renderer_webgl_Layer$colorDecodeId;\nol.renderer.webgl.Layer.colorEncodeId = _ol_renderer_webgl_Layer$colorEncodeId;\nol.renderer.webgl.Layer.getBlankImageData = _ol_renderer_webgl_Layer$getBlankImageData;\nol.renderer.webgl.Layer.writePointFeatureToBuffers = _ol_renderer_webgl_Layer$writePointFeatureToBuffers;\nol.renderer.webgl.PointsLayer = $ol$renderer$webgl$PointsLayer;\nol.renderer.webgl.TileLayer = $ol$renderer$webgl$TileLayer;\nol.renderer.webgl.TileLayer.Attributes = _ol_renderer_webgl_TileLayer$Attributes;\nol.renderer.webgl.TileLayer.Uniforms = _ol_renderer_webgl_TileLayer$Uniforms;\nol.reproj = {};\nol.reproj.Image = $ol$reproj$Image;\nol.reproj.Tile = $ol$reproj$Tile;\nol.reproj.Triangulation = $ol$reproj$Triangulation;\nol.reproj.calculateSourceExtentResolution = _ol_reproj$calculateSourceExtentResolution;\nol.reproj.calculateSourceResolution = _ol_reproj$calculateSourceResolution;\nol.reproj.canvasPool = _ol_reproj$canvasPool;\nol.reproj.common = {};\nol.reproj.common.ENABLE_RASTER_REPROJECTION = _ol_reproj_common$ENABLE_RASTER_REPROJECTION;\nol.reproj.common.ERROR_THRESHOLD = _ol_reproj_common$ERROR_THRESHOLD;\nol.reproj.render = _ol_reproj$render;\nol.resolutionconstraint = {};\nol.resolutionconstraint.createMinMaxResolution = _ol_resolutionconstraint$createMinMaxResolution;\nol.resolutionconstraint.createSnapToPower = _ol_resolutionconstraint$createSnapToPower;\nol.resolutionconstraint.createSnapToResolutions = _ol_resolutionconstraint$createSnapToResolutions;\nol.rotationconstraint = {};\nol.rotationconstraint.createSnapToN = _ol_rotationconstraint$createSnapToN;\nol.rotationconstraint.createSnapToZero = _ol_rotationconstraint$createSnapToZero;\nol.rotationconstraint.disable = _ol_rotationconstraint$disable;\nol.rotationconstraint.none = _ol_rotationconstraint$none;\nol.size = {};\nol.size.buffer = _ol_size$buffer;\nol.size.hasArea = _ol_size$hasArea;\nol.size.scale = _ol_size$scale;\nol.size.toSize = _ol_size$toSize;\nol.source = {};\nol.source.BingMaps = $ol$source$BingMaps;\nol.source.BingMaps.quadKey = _ol_source_BingMaps$quadKey;\nol.source.CartoDB = $ol$source$CartoDB;\nol.source.Cluster = $ol$source$Cluster;\nol.source.DataTile = $ol$source$DataTile;\nol.source.GeoTIFF = $ol$source$GeoTIFF;\nol.source.IIIF = $ol$source$IIIF;\nol.source.Image = $ol$source$Image;\nol.source.Image.ImageSourceEvent = _ol_source_Image$ImageSourceEvent;\nol.source.Image.defaultImageLoadFunction = _ol_source_Image$defaultImageLoadFunction;\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.OGCMapTile = $ol$source$OGCMapTile;\nol.source.OGCVectorTile = $ol$source$OGCVectorTile;\nol.source.OSM = $ol$source$OSM;\nol.source.OSM.ATTRIBUTION = _ol_source_OSM$ATTRIBUTION;\nol.source.Raster = $ol$source$Raster;\nol.source.Raster.Processor = _ol_source_Raster$Processor;\nol.source.Raster.RasterSourceEvent = _ol_source_Raster$RasterSourceEvent;\nol.source.Raster.newImageData = _ol_source_Raster$newImageData;\nol.source.Source = $ol$source$Source;\nol.source.Stamen = $ol$source$Stamen;\nol.source.Tile = $ol$source$Tile;\nol.source.Tile.TileSourceEvent = _ol_source_Tile$TileSourceEvent;\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.UTFGrid.CustomTile = _ol_source_UTFGrid$CustomTile;\nol.source.UrlTile = $ol$source$UrlTile;\nol.source.Vector = $ol$source$Vector;\nol.source.Vector.VectorSourceEvent = _ol_source_Vector$VectorSourceEvent;\nol.source.VectorTile = $ol$source$VectorTile;\nol.source.VectorTile.defaultLoadFunction = _ol_source_VectorTile$defaultLoadFunction;\nol.source.WMTS = $ol$source$WMTS;\nol.source.WMTS.optionsFromCapabilities = _ol_source_WMTS$optionsFromCapabilities;\nol.source.XYZ = $ol$source$XYZ;\nol.source.Zoomify = $ol$source$Zoomify;\nol.source.Zoomify.CustomTile = _ol_source_Zoomify$CustomTile;\nol.source.common = {};\nol.source.common.DEFAULT_WMS_VERSION = _ol_source_common$DEFAULT_WMS_VERSION;\nol.source.ogcTileUtil = {};\nol.source.ogcTileUtil.getMapTileUrlTemplate = _ol_source_ogcTileUtil$getMapTileUrlTemplate;\nol.source.ogcTileUtil.getTileSetInfo = _ol_source_ogcTileUtil$getTileSetInfo;\nol.source.ogcTileUtil.getVectorTileUrlTemplate = _ol_source_ogcTileUtil$getVectorTileUrlTemplate;\nol.source.sourcesFromTileGrid = _ol_source$sourcesFromTileGrid;\nol.source.wms = {};\nol.source.wms.DEFAULT_VERSION = _ol_source_wms$DEFAULT_VERSION;\nol.sphere = {};\nol.sphere.DEFAULT_RADIUS = _ol_sphere$DEFAULT_RADIUS;\nol.sphere.getArea = _ol_sphere$getArea;\nol.sphere.getDistance = _ol_sphere$getDistance;\nol.sphere.getLength = _ol_sphere$getLength;\nol.sphere.offset = _ol_sphere$offset;\nol.string = {};\nol.string.compareVersions = _ol_string$compareVersions;\nol.string.padNumber = _ol_string$padNumber;\nol.structs = {};\nol.structs.LRUCache = $ol$structs$LRUCache;\nol.structs.LinkedList = $ol$structs$LinkedList;\nol.structs.PriorityQueue = $ol$structs$PriorityQueue;\nol.structs.PriorityQueue.DROP = _ol_structs_PriorityQueue$DROP;\nol.structs.RBush = $ol$structs$RBush;\nol.style = {};\nol.style.Circle = $ol$style$Circle;\nol.style.Fill = $ol$style$Fill;\nol.style.Icon = $ol$style$Icon;\nol.style.IconImage = $ol$style$IconImage;\nol.style.IconImage.get = _ol_style_IconImage$get;\nol.style.IconImageCache = $ol$style$IconImageCache;\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.Style.createDefaultStyle = _ol_style_Style$createDefaultStyle;\nol.style.Style.createEditingStyle = _ol_style_Style$createEditingStyle;\nol.style.Style.toFunction = _ol_style_Style$toFunction;\nol.style.Text = $ol$style$Text;\nol.style.expressions = {};\nol.style.expressions.Operators = _ol_style_expressions$Operators;\nol.style.expressions.PALETTE_TEXTURE_ARRAY = _ol_style_expressions$PALETTE_TEXTURE_ARRAY;\nol.style.expressions.arrayToGlsl = _ol_style_expressions$arrayToGlsl;\nol.style.expressions.colorToGlsl = _ol_style_expressions$colorToGlsl;\nol.style.expressions.expressionToGlsl = _ol_style_expressions$expressionToGlsl;\nol.style.expressions.getStringNumberEquivalent = _ol_style_expressions$getStringNumberEquivalent;\nol.style.expressions.getValueType = _ol_style_expressions$getValueType;\nol.style.expressions.isTypeUnique = _ol_style_expressions$isTypeUnique;\nol.style.expressions.numberToGlsl = _ol_style_expressions$numberToGlsl;\nol.style.expressions.stringToGlsl = _ol_style_expressions$stringToGlsl;\nol.style.expressions.uniformNameForVariable = _ol_style_expressions$uniformNameForVariable;\nol.tilecoord = {};\nol.tilecoord.createOrUpdate = _ol_tilecoord$createOrUpdate;\nol.tilecoord.fromKey = _ol_tilecoord$fromKey;\nol.tilecoord.getCacheKeyForTileKey = _ol_tilecoord$getCacheKeyForTileKey;\nol.tilecoord.getKey = _ol_tilecoord$getKey;\nol.tilecoord.getKeyZXY = _ol_tilecoord$getKeyZXY;\nol.tilecoord.hash = _ol_tilecoord$hash;\nol.tilecoord.withinExtentAndZ = _ol_tilecoord$withinExtentAndZ;\nol.tilegrid = {};\nol.tilegrid.TileGrid = $ol$tilegrid$TileGrid;\nol.tilegrid.WMTS = $ol$tilegrid$WMTS;\nol.tilegrid.WMTS.createFromCapabilitiesMatrixSet = _ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet;\nol.tilegrid.common = {};\nol.tilegrid.common.DEFAULT_MAX_ZOOM = _ol_tilegrid_common$DEFAULT_MAX_ZOOM;\nol.tilegrid.common.DEFAULT_TILE_SIZE = _ol_tilegrid_common$DEFAULT_TILE_SIZE;\nol.tilegrid.createForExtent = _ol_tilegrid$createForExtent;\nol.tilegrid.createForProjection = _ol_tilegrid$createForProjection;\nol.tilegrid.createXYZ = _ol_tilegrid$createXYZ;\nol.tilegrid.extentFromProjection = _ol_tilegrid$extentFromProjection;\nol.tilegrid.getForProjection = _ol_tilegrid$getForProjection;\nol.tilegrid.wrapX = _ol_tilegrid$wrapX;\nol.tileurlfunction = {};\nol.tileurlfunction.createFromTemplate = _ol_tileurlfunction$createFromTemplate;\nol.tileurlfunction.createFromTemplates = _ol_tileurlfunction$createFromTemplates;\nol.tileurlfunction.createFromTileUrlFunctions = _ol_tileurlfunction$createFromTileUrlFunctions;\nol.tileurlfunction.expandUrl = _ol_tileurlfunction$expandUrl;\nol.tileurlfunction.nullTileUrlFunction = _ol_tileurlfunction$nullTileUrlFunction;\nol.transform = {};\nol.transform.apply = _ol_transform$apply;\nol.transform.compose = _ol_transform$compose;\nol.transform.composeCssTransform = _ol_transform$composeCssTransform;\nol.transform.create = _ol_transform$create;\nol.transform.determinant = _ol_transform$determinant;\nol.transform.invert = _ol_transform$invert;\nol.transform.makeInverse = _ol_transform$makeInverse;\nol.transform.makeScale = _ol_transform$makeScale;\nol.transform.multiply = _ol_transform$multiply;\nol.transform.reset = _ol_transform$reset;\nol.transform.rotate = _ol_transform$rotate;\nol.transform.scale = _ol_transform$scale;\nol.transform.set = _ol_transform$set;\nol.transform.setFromArray = _ol_transform$setFromArray;\nol.transform.toString = _ol_transform$toString;\nol.transform.translate = _ol_transform$translate;\nol.uri = {};\nol.uri.appendParams = _ol_uri$appendParams;\nol.util = {};\nol.util.VERSION = _ol_util$VERSION;\nol.util.abstract = _ol_util$abstract;\nol.util.getUid = _ol_util$getUid;\nol.vec = {};\nol.vec.mat4 = {};\nol.vec.mat4.create = _ol_vec_mat4$create;\nol.vec.mat4.fromTransform = _ol_vec_mat4$fromTransform;\nol.webgl = {};\nol.webgl.ARRAY_BUFFER = _ol_webgl$ARRAY_BUFFER;\nol.webgl.Buffer = $ol$webgl$Buffer;\nol.webgl.Buffer.getArrayClassForType = _ol_webgl_Buffer$getArrayClassForType;\nol.webgl.DYNAMIC_DRAW = _ol_webgl$DYNAMIC_DRAW;\nol.webgl.ELEMENT_ARRAY_BUFFER = _ol_webgl$ELEMENT_ARRAY_BUFFER;\nol.webgl.FLOAT = _ol_webgl$FLOAT;\nol.webgl.Helper = $ol$webgl$Helper;\nol.webgl.Helper.computeAttributesStride = _ol_webgl_Helper$computeAttributesStride;\nol.webgl.PaletteTexture = $ol$webgl$PaletteTexture;\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.webgl.ShaderBuilder = {};\nol.webgl.ShaderBuilder.ShaderBuilder = _ol_webgl_ShaderBuilder$ShaderBuilder;\nol.webgl.ShaderBuilder.parseLiteralStyle = _ol_webgl_ShaderBuilder$parseLiteralStyle;\nol.webgl.TileTexture = $ol$webgl$TileTexture;\nol.webgl.UNSIGNED_BYTE = _ol_webgl$UNSIGNED_BYTE;\nol.webgl.UNSIGNED_INT = _ol_webgl$UNSIGNED_INT;\nol.webgl.UNSIGNED_SHORT = _ol_webgl$UNSIGNED_SHORT;\nol.webgl.getContext = _ol_webgl$getContext;\nol.webgl.getSupportedExtensions = _ol_webgl$getSupportedExtensions;\nol.xml = {};\nol.xml.OBJECT_PROPERTY_NODE_FACTORY = _ol_xml$OBJECT_PROPERTY_NODE_FACTORY;\nol.xml.XML_SCHEMA_INSTANCE_URI = _ol_xml$XML_SCHEMA_INSTANCE_URI;\nol.xml.createElementNS = _ol_xml$createElementNS;\nol.xml.getAllTextContent = _ol_xml$getAllTextContent;\nol.xml.getAllTextContent_ = _ol_xml$getAllTextContent_;\nol.xml.getAttributeNS = _ol_xml$getAttributeNS;\nol.xml.getDocument = _ol_xml$getDocument;\nol.xml.getXMLSerializer = _ol_xml$getXMLSerializer;\nol.xml.isDocument = _ol_xml$isDocument;\nol.xml.makeArrayExtender = _ol_xml$makeArrayExtender;\nol.xml.makeArrayPusher = _ol_xml$makeArrayPusher;\nol.xml.makeArraySerializer = _ol_xml$makeArraySerializer;\nol.xml.makeChildAppender = _ol_xml$makeChildAppender;\nol.xml.makeObjectPropertyPusher = _ol_xml$makeObjectPropertyPusher;\nol.xml.makeObjectPropertySetter = _ol_xml$makeObjectPropertySetter;\nol.xml.makeReplacer = _ol_xml$makeReplacer;\nol.xml.makeSequence = _ol_xml$makeSequence;\nol.xml.makeSimpleNodeFactory = _ol_xml$makeSimpleNodeFactory;\nol.xml.makeStructureNS = _ol_xml$makeStructureNS;\nol.xml.parse = _ol_xml$parse;\nol.xml.parseNode = _ol_xml$parseNode;\nol.xml.pushParseAndPop = _ol_xml$pushParseAndPop;\nol.xml.pushSerializeAndPop = _ol_xml$pushSerializeAndPop;\nol.xml.registerDocument = _ol_xml$registerDocument;\nol.xml.registerXMLSerializer = _ol_xml$registerXMLSerializer;\nol.xml.serialize = _ol_xml$serialize;\n\nexport default ol;",null,null,null,"export const fieldTagNames = {\n  // TIFF Baseline\n  0x013B: 'Artist',\n  0x0102: 'BitsPerSample',\n  0x0109: 'CellLength',\n  0x0108: 'CellWidth',\n  0x0140: 'ColorMap',\n  0x0103: 'Compression',\n  0x8298: 'Copyright',\n  0x0132: 'DateTime',\n  0x0152: 'ExtraSamples',\n  0x010A: 'FillOrder',\n  0x0121: 'FreeByteCounts',\n  0x0120: 'FreeOffsets',\n  0x0123: 'GrayResponseCurve',\n  0x0122: 'GrayResponseUnit',\n  0x013C: 'HostComputer',\n  0x010E: 'ImageDescription',\n  0x0101: 'ImageLength',\n  0x0100: 'ImageWidth',\n  0x010F: 'Make',\n  0x0119: 'MaxSampleValue',\n  0x0118: 'MinSampleValue',\n  0x0110: 'Model',\n  0x00FE: 'NewSubfileType',\n  0x0112: 'Orientation',\n  0x0106: 'PhotometricInterpretation',\n  0x011C: 'PlanarConfiguration',\n  0x0128: 'ResolutionUnit',\n  0x0116: 'RowsPerStrip',\n  0x0115: 'SamplesPerPixel',\n  0x0131: 'Software',\n  0x0117: 'StripByteCounts',\n  0x0111: 'StripOffsets',\n  0x00FF: 'SubfileType',\n  0x0107: 'Threshholding',\n  0x011A: 'XResolution',\n  0x011B: 'YResolution',\n\n  // TIFF Extended\n  0x0146: 'BadFaxLines',\n  0x0147: 'CleanFaxData',\n  0x0157: 'ClipPath',\n  0x0148: 'ConsecutiveBadFaxLines',\n  0x01B1: 'Decode',\n  0x01B2: 'DefaultImageColor',\n  0x010D: 'DocumentName',\n  0x0150: 'DotRange',\n  0x0141: 'HalftoneHints',\n  0x015A: 'Indexed',\n  0x015B: 'JPEGTables',\n  0x011D: 'PageName',\n  0x0129: 'PageNumber',\n  0x013D: 'Predictor',\n  0x013F: 'PrimaryChromaticities',\n  0x0214: 'ReferenceBlackWhite',\n  0x0153: 'SampleFormat',\n  0x0154: 'SMinSampleValue',\n  0x0155: 'SMaxSampleValue',\n  0x022F: 'StripRowCounts',\n  0x014A: 'SubIFDs',\n  0x0124: 'T4Options',\n  0x0125: 'T6Options',\n  0x0145: 'TileByteCounts',\n  0x0143: 'TileLength',\n  0x0144: 'TileOffsets',\n  0x0142: 'TileWidth',\n  0x012D: 'TransferFunction',\n  0x013E: 'WhitePoint',\n  0x0158: 'XClipPathUnits',\n  0x011E: 'XPosition',\n  0x0211: 'YCbCrCoefficients',\n  0x0213: 'YCbCrPositioning',\n  0x0212: 'YCbCrSubSampling',\n  0x0159: 'YClipPathUnits',\n  0x011F: 'YPosition',\n\n  // EXIF\n  0x9202: 'ApertureValue',\n  0xA001: 'ColorSpace',\n  0x9004: 'DateTimeDigitized',\n  0x9003: 'DateTimeOriginal',\n  0x8769: 'Exif IFD',\n  0x9000: 'ExifVersion',\n  0x829A: 'ExposureTime',\n  0xA300: 'FileSource',\n  0x9209: 'Flash',\n  0xA000: 'FlashpixVersion',\n  0x829D: 'FNumber',\n  0xA420: 'ImageUniqueID',\n  0x9208: 'LightSource',\n  0x927C: 'MakerNote',\n  0x9201: 'ShutterSpeedValue',\n  0x9286: 'UserComment',\n\n  // IPTC\n  0x83BB: 'IPTC',\n\n  // ICC\n  0x8773: 'ICC Profile',\n\n  // XMP\n  0x02BC: 'XMP',\n\n  // GDAL\n  0xA480: 'GDAL_METADATA',\n  0xA481: 'GDAL_NODATA',\n\n  // Photoshop\n  0x8649: 'Photoshop',\n\n  // GeoTiff\n  0x830E: 'ModelPixelScale',\n  0x8482: 'ModelTiepoint',\n  0x85D8: 'ModelTransformation',\n  0x87AF: 'GeoKeyDirectory',\n  0x87B0: 'GeoDoubleParams',\n  0x87B1: 'GeoAsciiParams',\n\n  // LERC\n  0xC5F2: 'LercParameters',\n};\n\nexport const fieldTags = {};\nfor (const key in fieldTagNames) {\n  if (fieldTagNames.hasOwnProperty(key)) {\n    fieldTags[fieldTagNames[key]] = parseInt(key, 10);\n  }\n}\n\nexport const fieldTagTypes = {\n  256: 'SHORT',\n  257: 'SHORT',\n  258: 'SHORT',\n  259: 'SHORT',\n  262: 'SHORT',\n  273: 'LONG',\n  274: 'SHORT',\n  277: 'SHORT',\n  278: 'LONG',\n  279: 'LONG',\n  282: 'RATIONAL',\n  283: 'RATIONAL',\n  284: 'SHORT',\n  286: 'SHORT',\n  287: 'RATIONAL',\n  296: 'SHORT',\n  297: 'SHORT',\n  305: 'ASCII',\n  306: 'ASCII',\n  338: 'SHORT',\n  339: 'SHORT',\n  513: 'LONG',\n  514: 'LONG',\n  1024: 'SHORT',\n  1025: 'SHORT',\n  2048: 'SHORT',\n  2049: 'ASCII',\n  3072: 'SHORT',\n  3073: 'ASCII',\n  33550: 'DOUBLE',\n  33922: 'DOUBLE',\n  34665: 'LONG',\n  34735: 'SHORT',\n  34737: 'ASCII',\n  42113: 'ASCII',\n};\n\nexport const arrayFields = [\n  fieldTags.BitsPerSample,\n  fieldTags.ExtraSamples,\n  fieldTags.SampleFormat,\n  fieldTags.StripByteCounts,\n  fieldTags.StripOffsets,\n  fieldTags.StripRowCounts,\n  fieldTags.TileByteCounts,\n  fieldTags.TileOffsets,\n  fieldTags.SubIFDs,\n];\n\nexport const fieldTypeNames = {\n  0x0001: 'BYTE',\n  0x0002: 'ASCII',\n  0x0003: 'SHORT',\n  0x0004: 'LONG',\n  0x0005: 'RATIONAL',\n  0x0006: 'SBYTE',\n  0x0007: 'UNDEFINED',\n  0x0008: 'SSHORT',\n  0x0009: 'SLONG',\n  0x000A: 'SRATIONAL',\n  0x000B: 'FLOAT',\n  0x000C: 'DOUBLE',\n  // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html\n  0x000D: 'IFD',\n  // introduced by BigTIFF\n  0x0010: 'LONG8',\n  0x0011: 'SLONG8',\n  0x0012: 'IFD8',\n};\n\nexport const fieldTypes = {};\nfor (const key in fieldTypeNames) {\n  if (fieldTypeNames.hasOwnProperty(key)) {\n    fieldTypes[fieldTypeNames[key]] = parseInt(key, 10);\n  }\n}\n\nexport const photometricInterpretations = {\n  WhiteIsZero: 0,\n  BlackIsZero: 1,\n  RGB: 2,\n  Palette: 3,\n  TransparencyMask: 4,\n  CMYK: 5,\n  YCbCr: 6,\n\n  CIELab: 8,\n  ICCLab: 9,\n};\n\nexport const ExtraSamplesValues = {\n  Unspecified: 0,\n  Assocalpha: 1,\n  Unassalpha: 2,\n};\n\nexport const LercParameters = {\n  Version: 0,\n  AddCompression: 1,\n};\n\nexport const LercAddCompression = {\n  None: 0,\n  Deflate: 1,\n};\n\nexport const geoKeyNames = {\n  1024: 'GTModelTypeGeoKey',\n  1025: 'GTRasterTypeGeoKey',\n  1026: 'GTCitationGeoKey',\n  2048: 'GeographicTypeGeoKey',\n  2049: 'GeogCitationGeoKey',\n  2050: 'GeogGeodeticDatumGeoKey',\n  2051: 'GeogPrimeMeridianGeoKey',\n  2052: 'GeogLinearUnitsGeoKey',\n  2053: 'GeogLinearUnitSizeGeoKey',\n  2054: 'GeogAngularUnitsGeoKey',\n  2055: 'GeogAngularUnitSizeGeoKey',\n  2056: 'GeogEllipsoidGeoKey',\n  2057: 'GeogSemiMajorAxisGeoKey',\n  2058: 'GeogSemiMinorAxisGeoKey',\n  2059: 'GeogInvFlatteningGeoKey',\n  2060: 'GeogAzimuthUnitsGeoKey',\n  2061: 'GeogPrimeMeridianLongGeoKey',\n  2062: 'GeogTOWGS84GeoKey',\n  3072: 'ProjectedCSTypeGeoKey',\n  3073: 'PCSCitationGeoKey',\n  3074: 'ProjectionGeoKey',\n  3075: 'ProjCoordTransGeoKey',\n  3076: 'ProjLinearUnitsGeoKey',\n  3077: 'ProjLinearUnitSizeGeoKey',\n  3078: 'ProjStdParallel1GeoKey',\n  3079: 'ProjStdParallel2GeoKey',\n  3080: 'ProjNatOriginLongGeoKey',\n  3081: 'ProjNatOriginLatGeoKey',\n  3082: 'ProjFalseEastingGeoKey',\n  3083: 'ProjFalseNorthingGeoKey',\n  3084: 'ProjFalseOriginLongGeoKey',\n  3085: 'ProjFalseOriginLatGeoKey',\n  3086: 'ProjFalseOriginEastingGeoKey',\n  3087: 'ProjFalseOriginNorthingGeoKey',\n  3088: 'ProjCenterLongGeoKey',\n  3089: 'ProjCenterLatGeoKey',\n  3090: 'ProjCenterEastingGeoKey',\n  3091: 'ProjCenterNorthingGeoKey',\n  3092: 'ProjScaleAtNatOriginGeoKey',\n  3093: 'ProjScaleAtCenterGeoKey',\n  3094: 'ProjAzimuthAngleGeoKey',\n  3095: 'ProjStraightVertPoleLongGeoKey',\n  3096: 'ProjRectifiedGridAngleGeoKey',\n  4096: 'VerticalCSTypeGeoKey',\n  4097: 'VerticalCitationGeoKey',\n  4098: 'VerticalDatumGeoKey',\n  4099: 'VerticalUnitsGeoKey',\n};\n\nexport const geoKeys = {};\nfor (const key in geoKeyNames) {\n  if (geoKeyNames.hasOwnProperty(key)) {\n    geoKeys[geoKeyNames[key]] = parseInt(key, 10);\n  }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".ol.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkol\"] = self[\"webpackChunkol\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\n__webpack_require__(760);\nvar __webpack_exports__ = __webpack_require__(429);\n"],"names":["root","factory","exports","module","define","amd","self","inProgress","read","buffer","offset","isLE","mLen","nBytes","e","m","eLen","eMax","eBias","nBits","i","d","s","NaN","Infinity","Math","pow","write","value","c","rt","abs","isNaN","floor","log","LN2","Yallist","require","MAX","Symbol","LENGTH","LENGTH_CALCULATOR","ALLOW_STALE","MAX_AGE","DISPOSE","NO_DISPOSE_ON_SET","LRU_LIST","CACHE","UPDATE_AGE_ON_GET","naiveLength","get","key","doUse","node","hit","isStale","del","now","Date","unshiftNode","maxAge","diff","trim","walker","tail","prev","length","delete","removeNode","Entry","constructor","this","forEachStep","fn","thisp","undefined","call","options","max","TypeError","lc","stale","dispose","noDisposeOnSet","updateAgeOnGet","reset","mL","allowStale","mA","lC","forEach","rforEach","head","next","keys","toArray","map","k","values","Map","dump","v","filter","h","dumpLru","set","len","has","item","unshift","peek","pop","load","arr","l","expiresAt","prune","Pbf","ieee754","buf","ArrayBuffer","isView","Uint8Array","pos","type","Varint","Fixed64","Bytes","Fixed32","SHIFT_LEFT_32","SHIFT_RIGHT_32","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","val","readInt32","prototype","destroy","readFields","readField","result","end","tag","skip","readMessage","readFixed32","readSFixed32","readFixed64","readSFixed64","readFloat","readDouble","b","p","Error","readVarintRemainder","readVarint64","readSVarint","num","readBoolean","Boolean","readString","decode","subarray","readUtf8TextDecoder","str","b1","b2","b3","b0","bytesPerSequence","String","fromCharCode","readUtf8","readBytes","readPackedVarint","push","readPackedSVarint","readPackedBoolean","readPackedFloat","readPackedDouble","readPackedFixed32","readPackedSFixed32","readPackedFixed64","readPackedSFixed64","writeTag","min","finish","writeBigVarintLow","lsb","writeBigVarintHigh","writeBigVarint","writeString","lead","charCodeAt","writeUtf8","writeBytes","writeRawMessage","obj","writeMessage","writeBytesField","writeFixed32Field","writeSFixed32Field","writeFixed64Field","writeSFixed64Field","writeVarintField","writeSVarintField","writeStringField","writeFloatField","writeDoubleField","writeBooleanField","t","r","a","n","o","f","exp","u","sqrt","x","_maxEntries","_minEntries","ceil","clear","indexOf","children","minX","minY","maxX","maxY","leaf","height","all","_all","data","search","toBBox","collides","insert","_build","slice","_splitRoot","_insert","remove","splice","_condense","compareMinX","compareMinY","toJSON","fromJSON","apply","_chooseSubtree","_split","_adjustParentBBoxes","_chooseSplitAxis","_chooseSplitIndex","M","_allDistMargin","sort","runtime","Op","Object","hasOwn","hasOwnProperty","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","done","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","invoke","resolve","reject","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","info","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","object","reverse","skipTempReset","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","indexOfMatch","xml","tagName","debug","startIndex","console","start","afterStart","relativeEnd","selfClosing","outer","inner","lastIndexOf","findTagByName","tags","attributeName","pattern","match","RegExp","exec","index","list","arguments","inserted","Node","pushNode","res","shift","forEachReverse","getReverse","mapReverse","reduce","initial","acc","reduceReverse","Array","toArrayReverse","from","to","ret","sliceReverse","deleteCount","er","abstract","uidCounter_","getUid","ol_uid","VERSION","code","message","_super","_this","__extends","stopPropagation","evt","propagationStopped","defaultPrevented","target","BaseEvent","disposed","Disposable","disposeInternal","binarySearch","haystack","needle","opt_comparator","mid","cmp","comparator","numberSafeCompareFunction","found","includes","linearFindNearest","direction","reverseSubArray","begin","tmp","extend","extension","isArray","find","func","equals","arr1","arr2","len1","findIndex","every","el","idx","isSorted","opt_func","opt_strict","compare","currentVal","TRUE","FALSE","VOID","memoizeOne","lastResult","lastArgs","lastThis","called","nextArgs","arrayEquals","toPromise","getter","promiseGetter","assign","var_sources","output","ii","source","property","getValues","isEmpty","opt_target","eventTarget_","pendingRemovals_","dispatching_","listeners_","Target","listener","listeners","listenersForType","event","isString","Event","propagate","dispatching","pendingRemovals","handleEvent","pr","removeEventListener","opt_type","listen","opt_this","opt_once","bind","originalListener_1","eventsKey","addEventListener","listenOnce","unlistenByKey","on","onInternal","once","onceInternal","un","unInternal","revision_","Observable","dispatchEvent","EventType","ol_key","unByKey","EventTarget","oldValue","opt_values","values_","setProperties","BaseObject","eventType","hasListener","ObjectEvent","ObjectEventType","opt_silent","notify","Property","opt_element","opt_index","element","opt_array","opt_options","unique_","unique","array_","assertUnique_","updateLength_","Collection","getLength","array","elem","CollectionEvent","CollectionEventType","removeAt","insertAt","j","opt_except","AssertionError","easeIn","easeOut","inAndOut","linear","tileCoord","interimTile","transition_","transition","transitionStarts_","interpolate","Tile","tile","getState","TileState","changed","id","time","delta","loader_","loader","data_","error_","size_","size","DataTile","catch","assert","assertion","errorCode","createStyleFunction","styles_1","getZIndex","opt_geometryOrProperties","id_","geometryName_","style_","styleFunction_","geometryChangeKey_","addChangeListener","handleGeometryChanged_","getSimplifiedGeometry","geometry","setGeometry","properties","Feature","clone","hasProperties","getProperties","setGeometryName","getGeometryName","getGeometry","style","getStyle","setStyle","handleGeometryChange_","opt_style","removeChangeListener","Units","RADIANS","DEGREES","FEET","METERS","PIXELS","TILE_PIXELS","USFEET","unitByCode","fromCode","METERS_PER_UNIT","PI","transformStringDiv","ua","navigator","userAgent","toLowerCase","FIREFOX","SAFARI","SAFARI_BUG_237906","WEBKIT","MAC","DEVICE_PIXEL_RATIO","devicePixelRatio","WORKER_OFFSCREEN_CANVAS","WorkerGlobalScope","OffscreenCanvas","IMAGE_DECODE","Image","PASSIVE_EVENT_LISTENERS","passive","window","tmp_","transform","multiply","transform1","transform2","a1","c1","d1","e1","f1","a2","c2","d2","e2","f2","setFromArray","coordinate","y","rotate","angle","cos","sin","scale","makeScale","translate","dx","dy","compose","dx1","dy1","sx","sy","dx2","dy2","makeInverse","det","determinant","mat","toString","transformString","join","document","createElement","boundingExtent","coordinates","extent","createEmpty","extendCoordinate","opt_extent","closestSquaredDistanceXY","containsCoordinate","containsXY","containsExtent","extent1","extent2","coordinateRelationship","relationship","Relationship","createOrUpdate","createOrUpdateEmpty","createOrUpdateFromCoordinate","createOrUpdateFromFlatCoordinates","flatCoordinates","stride","extendFlatCoordinates","approximatelyEquals","tolerance","extendCoordinates","extendXY","extendRings","rings","forEachCorner","callback","getBottomLeft","getBottomRight","getTopRight","getTopLeft","getArea","area","getWidth","getHeight","getCenter","getCorner","corner","getForViewAndSize","center","resolution","rotation","getRotatedViewport","x0","y0","x1","y1","x2","y2","x3","y3","cosRotation","sinRotation","xCos","xSin","yCos","ySin","getIntersection","intersection","intersects","returnOrUpdate","scaleFromCenter","deltaX","deltaY","intersectsSegment","startRel","endRel","startX","startY","endX","endY","slope","applyTransform","transformFn","opt_stops","width","xs","ys","_boundingExtentXYs","wrapX","projection","projectionExtent","getExtent","canWrapX","worldWidth","wrapAndSliceX","isFinite","code_","units_","units","extent_","worldExtent_","worldExtent","axisOrientation_","axisOrientation","global_","global","canWrapX_","getPointResolutionFunc_","getPointResolution","defaultTileGrid_","metersPerUnit_","metersPerUnit","Projection","tileGrid","clamp","cosh","log2","LOG2E","squaredSegmentDistance","squaredDistance","solveLinearSystem","maxRow","maxEl","absValue","coef","toDegrees","angleInRadians","toRadians","angleInDegrees","modulo","lerp","toFixed","decimals","factor","round","RADIUS","HALF_SIZE","EXTENT","WORLD_EXTENT","MAX_SAFE_Y","tan","point","PROJECTIONS","EPSG3857Projection","fromEPSG4326","input","opt_output","opt_dimension","dimension","toEPSG4326","atan","opt_axisOrientation","EPSG4326Projection","cache","replace","add","transforms","destination","sourceCode","getCode","destinationCode","padNumber","number","opt_precision","numberString","decimal","compareVersions","v1","v2","s1","split","s2","n1","parseInt","n2","closestOnCircle","circle","getRadius","closestOnSegment","segment","along","degreesToStringHDMS","hemispheres","degrees","opt_fractionDigits","normalizedDegrees","dflPrecision","precision","deg","sec","format","template","coordinate1","coordinate2","cosAngle","sinAngle","coord1","coord2","distance","squaredDistanceToSegment","toStringXY","worldsAway","getWorldsAway","opt_sourceExtentWidth","sourceExtentWidth","DEFAULT_RADIUS","getDistance","opt_radius","radius","lat1","lat2","deltaLatBy2","deltaLonBy2","atan2","getLengthInternal","getAreaInternal","bearing","lon1","dByR","lat","asin","showCoordinateWarning","disableCoordinateWarning","opt_disable","cloneTransform","identityTransform","addProjection","addProj","addTransformFunc","addProjections","projections","projectionLike","getProj","opt_units","pointResolution","getPointResolutionFunc","getUnits","getMetersPerUnit","toEPSG4326_1","getTransformFromProjections","vertices","addEquivalentProjections","addEquivalentTransforms","projections1","projections2","forwardTransform","inverseTransform","projection1","projection2","createProjection","defaultCode","createTransformFromCoordinateTransform","coordTransform","pointLength","jj","addCoordinateTransforms","forward","inverse","sourceProj","destProj","fromLonLat","opt_projection","equivalent","equalUnits","sourceProjection","destinationProjection","transformFunc","getTransformFunc","getTransform","transformExtent","userProjection","setUserProjection","getUserProjection","toUserCoordinate","fromUserCoordinate","destProjection","warn","toUserExtent","fromUserExtent","toUserResolution","sourceUnits","userUnits","fromUserResolution","createSafeCoordinateTransform","coord","transformed","sourceExtent","addCommon","EPSG3857_PROJECTIONS","EPSG4326_PROJECTIONS","transform2D","opt_dest","dest","anchor","anchorX","anchorY","tmpTransform","extentRevision_","simplifiedGeometryMaxMinSquaredTolerance","simplifiedGeometryRevision","simplifyTransformedInternal","revision","squaredTolerance","opt_transform","Geometry","getRevision","closestPoint","minSquaredDistance","getClosestPoint","opt_closestPoint","closestPointXY","computeExtent","opt_sy","opt_anchor","getProjection","inCoordinates","outCoordinates","pixelExtent","projectedExtent","getWorldExtent","composeTransform","getStrideForLayout","layout","GeometryLayout","transformGeom2D","simpleGeometry","getFlatCoordinates","getStride","SimpleGeometry","simplifiedGeometry","getSimplifiedGeometryInternal","opt_layout","nesting","getLayoutForStride","assignClosest","offset1","offset2","maxSquaredDelta","squaredDelta","squaredDx","arrayMaxSquaredDelta","ends","multiArrayMaxSquaredDelta","endss","assignClosestPoint","maxDelta","isRing","opt_tmpPoint","tmpPoint","assignClosestArrayPoint","assignClosestMultiArrayPoint","deflateCoordinate","deflateCoordinates","deflateCoordinatesArray","coordinatess","opt_ends","deflateMultiCoordinatesArray","coordinatesss","opt_endss","douglasPeucker","simplifiedFlatCoordinates","simplifiedOffset","markers","stack","last","first","maxSquaredDistance","squaredDistance_1","douglasPeuckerArray","simplifiedEnds","radialDistance","snap","quantize","quantizeArray","quantizeMultiArray","simplifiedEndss","inflateCoordinates","opt_coordinates","inflateCoordinatesArray","opt_coordinatess","inflateMultiCoordinatesArray","opt_coordinatesss","linearRing","twiceArea","linearRings","linearRingss","maxDelta_","maxDeltaRevision_","setCoordinates","setFlatCoordinates","LinearRing","linearRingArea","setLayout","Point","applyProperties","linearRingContainsExtent","linearRingContainsXY","wn","linearRingsContainsXY","linearRingssContainsXY","getInteriorPointOfArray","flatCenters","flatCentersOffset","intersections","rr","pointX","maxSegmentLength","segmentLength","getInteriorPointsOfMultiArray","interiorPoints","intersectsLineString","coordinatesExtent","forEachSegment","point1","point2","intersectsLineStringArray","intersectsLinearRing","intersectsLinearRingArray","intersectsLinearRingMultiArray","linearRingIsClockwise","edge","linearRingsAreOriented","opt_right","right","isClockwise","linearRingssAreOriented","orientLinearRings","reverseCoordinates","orientLinearRingsArray","inflateEnds","prevEndIndex","ends_","flatInteriorPointRevision_","flatInteriorPoint_","orientedRevision_","orientedFlatCoordinates_","Polygon","polygon","getOrientedFlatCoordinates","linearRingsArea","flatCenter","getFlatInteriorPoint","circular","opt_n","opt_sphereRadius","sphereOffset","fromExtent","fromCircle","opt_sides","opt_angle","sides","getLayout","arrayLength","makeRegular","startAngle","position_","transform_","watchId_","handleProjectionChanged_","handleTrackingChanged_","setProjection","trackingOptions","setTrackingOptions","setTracking","tracking","Geolocation","getTracking","geolocation","watchPosition","positionChange_","positionError_","getTrackingOptions","clearWatch","position","coords","accuracy","altitude","altitudeAccuracy","heading","longitude","latitude","projectedPosition","speed","circularPolygon","GeolocationError","pixelRatio","pixelRatio_","ImageBase","listenImage","image","loadHandler","errorHandler","img","listening","decoding","loaded","listenerKeys","src","crossOrigin","imageLoadFunction","ImageState","src_","image_","unlisten_","imageLoadFunction_","ImageWrapper","unlistenImage_","handleImageLoad_","handleImageError_","canvas","opt_loader","canvas_","ImageCanvas","handleLoad_","createCanvasContext2D","opt_width","opt_height","opt_canvasPool","opt_Context2DSettings","getContext","releaseCanvas","clearRect","outerWidth","offsetWidth","getComputedStyle","marginLeft","marginRight","outerHeight","offsetHeight","marginTop","marginBottom","replaceNode","newNode","oldNode","parent","parentNode","replaceChild","removeChild","removeChildren","lastChild","replaceChildren","oldChildren","childNodes","oldChild","newChild","insertBefore","appendChild","tileLoadFunction","crossOrigin_","tileLoadFunction_","ImageTile","ctx","fillStyle","fillRect","naturalWidth","naturalHeight","decay","minVelocity","delay","decay_","minVelocity_","delay_","points_","angle_","initialVelocity_","Kinetic","lastIndex","firstIndex","duration","HEX_COLOR_RE_","NAMED_COLOR_RE_","asString","color","fromNamed","body","rgb","fromString","cacheSize","g","hasAlpha","substr","normalize","Number","fromStringInternal_","asArray","isStringColor","test","cache_","cacheSize_","maxCacheSize_","IconImageCache","canExpireCache","iconImage","getKey","maxCacheSize","expire","shared","background_","background","LayerProperty","opacity","visible","zIndex","maxResolution","minResolution","minZoom","maxZoom","className_","className","state_","BaseLayer","opt_managed","layer","managed","getOpacity","getVisible","getMaxResolution","getMinResolution","getMinZoom","getMaxZoom","opt_states","opt_background","zindex","inView","layerState","viewState","zoom","baseOptions","mapPrecomposeKey_","mapRenderKey_","sourceChangeKey_","renderer_","rendered","render","setMap","handleSourcePropertyChange_","setSource","Layer","states","getLayerState","getSource","handleSourceChange_","pixel","getFeatures","getData","frameState","layerRenderer","getRenderer","prepareFrame","renderFrame","unrender","RenderEventType","layerStatesArray","some","arrayLayerState","createRenderer","expireIconCache","iconImageCache","map_","MapRenderer","coordinateToPixelTransform","pixelToCoordinateTransform","hitTolerance","checkWrapped","thisArg","layerFilter","thisArg2","forEachFeatureAtCoordinate","feature","translatedCoordinate","offsets","layerStates","numLayers","matches","tmpCoord","hasRenderer","getWrapX","callback_1","order","distanceSq","postRenderFunctions","opt_inversePixelTransform","opt_frameState","opt_context","inversePixelTransform","CLASS_HIDDEN","CLASS_SELECTABLE","CLASS_UNSELECTABLE","CLASS_UNSUPPORTED","CLASS_CONTROL","CLASS_COLLAPSED","fontRegEx","fontRegExMatchIndex","getFontParameters","fontSpec","lineHeight","weight","variant","families","family","defaultFont","defaultFillStyle","defaultLineCap","defaultLineDash","defaultLineJoin","defaultMiterLimit","defaultStrokeStyle","defaultTextAlign","defaultTextBaseline","defaultPadding","checkedFonts","labelCache","setSize","measureFont","measureElement","measureContext","textHeights","registerFont","interval","referenceWidth","referenceFonts","text","isAvailable","fontStyle","fontWeight","fontFamily","available","referenceFont","measureTextWidth","check","fonts","getKeys","font","clearInterval","setInterval","measureTextHeight","metrics","measureText","actualBoundingBoxAscent","actualBoundingBoxDescent","innerHTML","minHeight","maxHeight","padding","border","display","left","measureAndCacheTextWidth","curr","getTextDimensions","baseStyle","chunks","widths","heights","lineWidths","lineWidth","currentWidth","currentHeight","drawImageOrLabel","labelOrImage","originX","originY","w","save","globalAlpha","setTransform","contextInstructions","label","executeLabelInstructions","drawImage","restore","fontChangeListenerKey_","redrawText","element_","container","getViewport","firstChild","children_","renderedVisible_","CompositeMapRenderer","getMap","event_1","RenderEvent","calculateMatrices2D","dispatchRenderEvent","declutterLayers","previousElement","layerIndex","sourceState","getSourceState","renderDeclutter","scheduleExpireIconCache","getDataAtPixel","layers","layersListenerKeys_","listenerKeys_","handleLayersChanged_","getArray","setLayers","LayerGroup","getLayers","handleLayersAdd_","handleLayersRemove_","layersArray","registerLayerListeners_","GroupEvent","handleLayerChange_","handleLayerGroupAdd_","handleLayerGroupRemove_","collectionEvent","collection","currentLayers","getLayersArray","getLayerStatesArray","ownLayerState","defaultZIndex","originalEvent","opt_dragging","opt_activePointers","pixel_","coordinate_","dragging","activePointers","MapBrowserEvent","getEventPixel","getCoordinateFromPixel","preventDefault","MapEvent","SINGLECLICK","CLICK","DBLCLICK","POINTERDRAG","POINTERMOVE","POINTERDOWN","POINTERUP","POINTEROVER","POINTEROUT","POINTERENTER","POINTERLEAVE","POINTERCANCEL","moveTolerance","clickTimeoutId_","emulateClicks_","dragging_","dragListenerKeys_","moveTolerance_","down_","activePointers_","trackedTouches_","pointerdownListenerKey_","PointerEventType","handlePointerDown_","originalPointerMoveEvent_","relayedListenerKey_","relayMoveEvent_","boundHandleTouchMove_","handleTouchMove_","MapBrowserEventHandler","pointerEvent","newEvent","MapBrowserEventType","clearTimeout","setTimeout","pointerId","updateActivePointers_","isMouseActionButton_","emulateClick_","button","doc","getOwnerDocument","handlePointerMove_","handlePointerUp_","getRootNode","isMoving_","cancelable","clientX","clientY","DROP","priorityFunction","keyFunction","priorityFunction_","keyFunction_","elements_","priorities_","queuedElements_","PriorityQueue","elements","priorities","siftUp_","elementKey","priority","siftDown_","isKeyQueued","count","lIndex","getLeftChildIndex_","rIndex","getRightChildIndex_","smallerChildIndex","parentIndex","getParentIndex_","heapify_","tilePriorityFunction","tileChangeCallback","boundHandleTileChange_","handleTileChange","tileChangeCallback_","tilesLoading_","tilesLoadingKeys_","TileQueue","added","enqueue","tileKey","maxTotalLoading","maxNewLoads","newLoads","getCount","dequeue","getTilePriority","tileSourceKey","tileCenter","tileResolution","wantedTiles","CENTER","RESOLUTION","ROTATION","DEFAULT_TILE_SIZE","createExtent","onlyCenter","smooth","opt_isMoving","opt_centerShift","viewWidth","viewHeight","shiftX","shiftY","ratio","none","getViewportClampedResolution","maxExtent","viewportSize","showFullExtent","xResolution","yResolution","getSmoothClampedResolution","createSnapToResolutions","resolutions","opt_smooth","opt_maxExtent","opt_showFullExtent","cappedMaxRes","capped","z","createSnapToPower","power","opt_minResolution","minZoomLevel","cappedZoomLevel","zoomLevel","createMinMaxResolution","disable","createSnapToN","theta","createSnapToZero","opt_tolerance","animationCallback","returnValue","createCenterConstraint","smoothExtentConstraint","constrainOnlyCenter","multiWorld","isGlobal","centerNone","createResolutionConstraint","resolutionConstraint","zoomFactor","smoothResolutionConstraint","projExtent","constrainResolution","defaultMaxResolution","defaultMinResolution","defaultMaxZoom","constraint","createRotationConstraint","enableRotation","constrainRotation","rotationNone","isNoopAnimation","animation","sourceCenter","targetCenter","coordinatesEqual","sourceResolution","targetResolution","sourceRotation","targetRotation","calculateCenterOn","rotX","rotY","hints_","animations_","updateAnimationKey_","projection_","viewportSize_","targetCenter_","targetResolution_","targetRotation_","nextCenter_","nextResolution_","nextRotation_","cancelAnchor_","applyOptions_","View","ViewProperty","resolutionConstraintInfo","maxResolution_","minResolution_","zoomFactor_","resolutions_","padding_","minZoom_","centerConstraint","rotationConstraint","constraints_","setRotation","setCenterInternal","setResolution","setZoom","oldPadding","newPadding","getResolution","offsetX","offsetY","newOptions","getZoom","getCenterInternal","getRotation","var_args","isDef","getAnimating","resolveConstraints","args","animateInternal","animationCount","series","easing","getResolutionForZoom","setHint","ViewHint","updateAnimations_","cancelAnimationFrame","more","seriesComplete","elapsed","fraction","progress","getViewportSize_","constrainedResolution","calculateCenterZoom","applyTargetState_","constrainedRotation","calculateCenterRotate","requestAnimationFrame","currentCenter","rotateCoordinate","addCoordinate","currentResolution","opt_rotation","opt_size","opt_hints","calculateExtentInternal","getViewportSizeMinusPadding_","getZoomForResolution","getUpdatedOptions_","enabled","getResolutionForExtentInternal","opt_power","getConstrainedResolution","logPower","reducedSize","nextCenter","nextResolution","nextRotation","nearest","baseLevel","geometryOrExtent","polygonFromExtent","getType","fitInternal","minRotX","minRotY","maxRotX","maxRotY","rotatedExtent","rotatedExtentForGeometry","centerRot","centerX","centerY","getConstrainedCenter","centerOnInternal","centerShift","shiftedCenter","deltaCoordinates","setCenter","adjustResolutionInternal","isMoving","getInteracting","newResolution","adjustResolution","adjustRotationInternal","newRotation","hint","opt_doNotCancelAnims","opt_forceMoving","newCenter","calculateCenterShift","cancelAnimations","opt_duration","opt_resolutionDirection","endInteractionInternal","opt_targetResolution","targetZoom","opt_direction","targetRes","hasArea","toSize","removeLayerMapProperty","setMapInternal","setLayerMapProperty","optionsInternal","keyboardEventTarget","getElementById","controls","interactions","overlays","layerGroup","MapProperty","view","createOptionsInternal","renderComplete_","loaded_","boundHandleBrowserEvent_","handleBrowserEvent","maxTilesLoading_","maxTilesLoading","postRenderTimeoutHandle_","animationDelayKey_","animationDelay_","renderFrame_","coordinateToPixelTransform_","pixelToCoordinateTransform_","frameIndex_","frameState_","previousExtent_","viewPropertyListenerKey_","viewChangeListenerKey_","layerGroupPropertyListenerKeys_","viewport_","overflow","overlayContainer_","pointerEvents","overlayContainerStopEvent_","mapBrowserEventHandler_","keyboardEventTarget_","targetChangeHandlerKeys_","overlays_","overlayIdIndex_","postRenderFunctions_","tileQueue_","handleTileChange_","handleLayerGroupChanged_","handleViewChanged_","handleSizeChanged_","handleTargetChanged_","viewOptions","setView","addOverlayInternal_","getId","control","interaction","PluggableMap","getControls","getInteractions","getLayerGroup","overlay","getOverlays","setTarget","getCoordinateFromPixelInternal","features","forEachFeatureAtPixel","addLayersFrom","forEachLayerAtPixel","hasFeatureAtCoordinate","viewportPosition","getBoundingClientRect","eventPosition","changedTouches","top","getTarget","getView","group","renderer","ready","loading","viewCoordinate","getPixelFromCoordinateInternal","targetElement","getTargetElement","ownerDocument","browserEvent","mapBrowserEvent","handleMapBrowserEvent","rootNode","contains","documentElement","interactionsArray","getActive","tileQueue","hints","viewHints","lowOnFrameBudget","getTilesLoading","reprioritize","loadMoreTiles","animate","MapEventType","defaultView","updateSize","updateViewportSize_","handleViewPropertyChanged_","handleLayerAdd_","handleLayerRemove_","handleFontsChanged","getSize","previousFrameState","getHints","declutterTree","usedTiles","mapId","renderTargets","nextExtent","getLoadingOrNotReady","handlePostRender","oldLayerGroup","computedStyle","parseFloat","getClientRects","setViewportSize","target_","Control","getOverlayContainerStopEvent","mapEvent","ulElement_","collapsed_","collapsed","userCollapsed_","overrideCollapsible_","collapsible","collapsible_","tipLabel","expandClassName","collapseLabel","collapseClassName","collapseLabel_","textContent","label_","activeLabel","toggleButton_","setAttribute","title","handleClick_","cssClasses","renderedAttributions_","Attribution","lookup","visibleAttributions","attributionGetter","getAttributions","attributions","getAttributionsCollapsible","setCollapsible","collectSourceAttributions_","handleToggle_","classList","toggle","updateElement_","compassClassName","callResetNorth_","resetNorth","duration_","autoHide_","autoHide","rotation_","Rotate","resetNorth_","zoomInClassName","zoomOutClassName","zoomInLabel","zoomOutLabel","zoomInTipLabel","zoomOutTipLabel","inElement","createTextNode","outElement","Zoom","zoomByDelta_","currentZoom","newZoom","getConstrainedZoom","defaults","zoomOptions","rotateOptions","attribution","attributionOptions","pan","zoomByDelta","setActive","Interaction","InteractionProperty","active","delta_","DoubleClickZoom","stopEvent","shiftKey","centroid","handleDownEvent","handleDragEvent","handleMoveEvent","handleUpEvent","stopDown","handlingDownUpSequence","targetPointers","PointerInteraction","updateTrackedPointers_","handledUp","handled","conditions","pass","altKeyOnly","altKey","metaKey","ctrlKey","altShiftKeysOnly","focus","activeElement","focusWithTabindex","hasAttribute","always","mouseActionButton","never","singleClick","noModifierKeys","shiftKeyOnly","targetNotEditable","isContentEditable","mouseOnly","pointerType","primaryAction","isPrimary","kinetic_","kinetic","lastCentroid","lastPointersCount_","panning_","condition","condition_","onFocusOnly","noKinetic_","DragPan","beginInteraction","centroidFromPointers","update","scaleCoordinate","adjustCenterInternal","getAngle","centerpx","endInteraction","lastAngle_","DragRotate","getConstraints","geometry_","startPixel_","endPixel_","RenderBox","startPixel","endPixel","px","getOverlayContainer","createOrUpdateGeometry","render_","DragBoxEventType","box_","minArea_","minArea","onBoxEnd","boxEndCondition_","boxEndCondition","defaultBoxEndCondition","DragBox","setPixels","DragBoxEvent","completeBox","out_","out","DragZoom","defaultCondition_","pixelDelta_","pixelDelta","KeyboardPan","keyEvent","keyCode","KeyCode","mapUnitsDelta","KeyboardZoom","charCode","Mode","totalDelta_","lastDelta_","timeout_","timeout","useAnchor_","useAnchor","constrainResolution_","lastAnchor_","startTime_","timeoutId_","mode_","trackpadEventGap_","trackpadTimeoutId_","deltaPerZoom_","MouseWheelZoom","wheelEvent","deltaMode","WheelEvent","DOM_DELTA_PIXEL","DOM_DELTA_LINE","getConstrainResolution","endInteraction_","adjustZoom","timeLeft","handleWheelZoom_","pointerOptions","anchor_","rotating_","rotationDelta_","threshold_","threshold","PinchRotate","rotationDelta","touch0","touch1","lastDistance_","lastScaleDelta_","PinchZoom","scaleDelta","altShiftDragRotate","doubleClickZoom","zoomDelta","zoomDuration","dragPan","pinchRotate","pinchZoom","keyboard","mouseWheelZoom","shiftDragZoom","defaultControls","defaultInteractions","insertFirst","autoPan","autoPanAnimation","margin","autoPanMargin","mapPostrenderListenerKey","handleElementChanged","handleMapChanged","handleOffsetChanged","handlePositionChanged","handlePositioningChanged","setElement","setOffset","setPositioning","positioning","setPosition","Overlay","getElement","updatePixelPosition","performAutoPan","panIntoView","opt_panIntoViewOptions","mapRect","getRect","overlayRect","panIntoViewOptions","myMargin","offsetLeft","offsetRight","offsetTop","offsetBottom","centerPx","newCenterPx","panOptions","box","pageXOffset","pageYOffset","getPosition","isRendered","getPixelFromCoordinate","mapSize","updateRenderedPosition","setVisible","getOffset","getPositioning","posX","posY","concat","msTransform","opt_highWaterMark","highWaterMark","count_","entries_","oldest_","newest_","LRUCache","keep","value_","key_","newer","older","containsKey","opt_tileCoord","getKeyZXY","getCacheKeyForTileKey","substring","fromKey","hash","withinExtentAndZ","tileRange","getFullTileRange","TileCache","peekLast","release","peekFirstKey","TileRange","canvasPool","urlTileCoord","getSourceTiles","context_","executorGroups","declutterExecutorGroups","loadingSourceTiles","hitDetectionImageData","replayState_","sourceTiles","errorTileKeys","wantedResolution","wrappedTileCoord","VectorRenderTile","hasContext","dirty","renderedRenderOrder","renderedResolution","renderedRevision","renderedTileResolution","renderedTileRevision","renderedTileZ","format_","features_","url_","VectorTile","setState","dataProjection","setFeatures","asColorLike","withCredentials","loadFeaturesXhr","url","success","failure","xhr","XMLHttpRequest","open","responseType","onload","status","responseText","responseXML","DOMParser","parseFromString","response","readFeatures","featureProjection","readProjection","onerror","send","addFeatures","jsonp","opt_errback","opt_callbackParam","script","cleanup","timer","originalXHR","client","getJSON","JSON","parse","ResponseError","ClientError","setRequestHeader","resolveUrl","base","URL","href","VectorContext","hitDetectionRenderer","circleGeometry","geometryCollectionGeometry","lineStringGeometry","multiLineStringGeometry","multiPointGeometry","multiPolygonGeometry","pointGeometry","polygonGeometry","strokeStyle","imageStyle","opt_declutterImageWithText","textStyle","viewRotation","opt_squaredTolerance","opt_userTransform","viewRotation_","squaredTolerance_","userTransform_","contextFillState_","contextStrokeState_","contextTextState_","fillState_","strokeState_","imageAnchorX_","imageAnchorY_","imageHeight_","imageOpacity_","imageOriginX_","imageOriginY_","imageRotateWithView_","imageRotation_","imageScale_","imageWidth_","text_","textOffsetX_","textOffsetY_","textRotateWithView_","textRotation_","textScale_","textFillState_","textStrokeState_","textState_","pixelCoordinates_","tmpLocalTransform_","CanvasImmediateRenderer","pixelCoordinates","localTransform","alpha","setContextFillState_","setContextStrokeState_","setContextTextState_","strokeText","fillText","close","moveTo","lineTo","closePath","moveToLineTo_","beginPath","arc","fill","stroke","drawText_","setFillStrokeStyle","getFill","getStroke","setImageStyle","getImage","setTextStyle","getText","drawPoint","drawLineString","drawPolygon","drawMultiPoint","drawMultiLineString","drawMultiPolygon","drawGeometryCollection","drawCircle","getGeometryFunction","drawGeometry","geometries","getGeometriesArray","simplifyTransformed","drawImages_","flatMidpoint","getFlatMidpoint","geometryExtent","getEnds","flatMidpoints","getFlatMidpoints","drawRings_","flatInteriorPoint","getEndss","flatInteriorPoints","getFlatInteriorPoints","fillState","contextFillState","strokeState","contextStrokeState","lineCap","setLineDash","lineDash","lineDashOffset","lineJoin","miterLimit","textState","contextTextState","textAlign","textBaseline","fillStyleColor","getColor","strokeStyleColor","strokeStyleLineCap","getLineCap","strokeStyleLineDash","getLineDash","strokeStyleLineDashOffset","getLineDashOffset","strokeStyleLineJoin","getLineJoin","strokeStyleWidth","strokeStyleMiterLimit","getMiterLimit","imageSize","imageAnchor","getAnchor","imageOrigin","getOrigin","getRotateWithView","getScaleArray","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","opt_declutterBuilderGroup","declutterImageWithText","getImageState","imageBuilderGroup","declutterMode","getDeclutterMode","imageReplay_1","getBuilder","imageReplay","textBuilderGroup","textReplay","drawText","lineStringReplay","polygonReplay","imageReplay_2","replayGroup","geometryRenderer","circleReplay","defaultOrder","feature1","feature2","getSquaredTolerance","getTolerance","renderFeature","imageState","unlistenImageChange","listenImageChange","renderGeometry","renderFeatureInternal","drawCustom","getHitDetectionRenderer","getGeometries","getVectorContext","CanvasRenderingContext2D","userTransform","canvasPixelRatio","multiplyTransform","brokenDiagonalRendering_","IMAGE_SMOOTHING_DISABLED","imageSmoothingEnabled","msImageSmoothingEnabled","IMAGE_SMOOTHING_ENABLED","drawTestTriangle","u1","u2","clip","verifyBrokenDiagonalRendering","calculateSourceResolution","targetProj","targetMetersPerUnit","sourceMetersPerUnit","compensationFactor","calculateSourceExtentResolution","targetExtent","triangulation","sources","gutter","opt_renderEdges","opt_interpolate","pixelRound","globalCompositeOperation","sourceDataExtent","canvasWidthInUnits","canvasHeightInUnits","stitchContext","stitchScale","xPos","yPos","srcWidth","srcHeight","targetTopLeft","getTriangles","triangle","u0","v0","sourceNumericalShiftX","sourceNumericalShiftY","affineCoefs","getImageData","isBrokenDiagonalRendering","ud","vd","step","steps","tmpTileCoord","origins","origin_","origin","origins_","tileSizes_","tileSizes","tileSize_","tileSize","fullTileRanges_","tmpSize_","tmpExtent_","sizes","restrictedTileRange","getTileRangeForExtentAndZ","calculateTileRanges_","TileGrid","opt_tileRange","tileCoordExtent","getTileCoordExtent","createOrUpdateTileRange","tileCoordZ","tileCoordX","tileCoordY","getTileSize","getTileCoordForXYAndZ_","getTileCoordForXYAndResolution_","reverseIntersectionPolicy","getZForResolution","createOrUpdateTileCoord","viewport","fullTileRanges","getForProjection","getDefaultTileGrid","createForProjection","setDefaultTileGrid","getTileCoordCenter","extentFromProjection","getTileCoordForCoordAndZ","createForExtent","opt_maxZoom","opt_tileSize","opt_corner","resolutionsFromExtent","createXYZ","xyzOptions","gridOptions","opt_maxResolution","half","createFromTemplate","zRegEx","xRegEx","yRegEx","dashYRegEx","range","createFromTemplates","templates","tileUrlFunctions","createFromTileUrlFunctions","tileCoordHash","nullTileUrlFunction","expandUrl","urls","startCharCode","stopCharCode","stop_1","appendParams","uri","params","keyParams","encodeURIComponent","qs","supportedExtensions","ARRAY_BUFFER","ELEMENT_ARRAY_BUFFER","STATIC_DRAW","DYNAMIC_DRAW","FLOAT","CONTEXT_IDS","opt_attributes","attributes","preserveDrawingBuffer","antialias","XML_SCHEMA_INSTANCE_URI","createElementNS","namespaceURI","qualifiedName","getDocument","getAllTextContent","normalizeWhitespace","getAllTextContent_","accumulator","nodeType","CDATA_SECTION_NODE","TEXT_NODE","nodeValue","nextSibling","isDocument","getAttributeNS","makeArrayExtender","valueReader","objectStack","makeArrayPusher","makeReplacer","makeObjectPropertyPusher","opt_property","localName","makeObjectPropertySetter","makeChildAppender","nodeWriter","makeArraySerializer","serializersNS","nodeFactory","serializers","makeSimpleNodeFactory","serialize","opt_nodeName","opt_namespaceURI","fixedNodeName","nodeName","OBJECT_PROPERTY_NODE_FACTORY","makeSequence","orderedKeys","sequence","makeStructureNS","namespaceURIs","structure","opt_structureNS","structureNS","parseNode","parsersNS","firstElementChild","nextElementSibling","parsers","parser","pushParseAndPop","opt_keys","pushSerializeAndPop","xmlSerializer_","getXMLSerializer","XMLSerializer","document_","implementation","createDocument","BufferUsage","getArrayClassForType","Float32Array","Uint32Array","opt_usage","usage","WebGLArrayBuffer","arrayClass","gl_","webGlContext","gl","scaleRatio_","scaleRatio","renderTargetTexture_","createTexture","renderTargetTextureSize_","frameBuffer_","createFramebuffer","vertexShader","createShader","VERTEX_SHADER","shaderSource","compileShader","fragmentShader","FRAGMENT_SHADER","renderTargetProgram_","createProgram","attachShader","linkProgram","renderTargetVerticesBuffer_","createBuffer","bindBuffer","bufferData","renderTargetAttribLocation_","getAttribLocation","renderTargetUniformLocation_","getUniformLocation","renderTargetOpacityLocation_","renderTargetTextureLocation_","uniforms_","uniforms","location","WebGLPostProcessingPass","getGL","textureSize","drawingBufferWidth","drawingBufferHeight","bindFramebuffer","FRAMEBUFFER","getFrameBuffer","internalFormat","RGBA","UNSIGNED_BYTE","bindTexture","TEXTURE_2D","texImage2D","texParameteri","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","framebufferTexture2D","COLOR_ATTACHMENT0","nextPass","preCompose","postCompose","activeTexture","TEXTURE0","canvasId","getContextAttributes","clearColor","COLOR_BUFFER_BIT","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","useProgram","enableVertexAttribArray","vertexAttribPointer","uniform2f","uniform1i","uniform1f","applyUniforms","drawArrays","TRIANGLES","textureSlot","uniform","HTMLCanvasElement","ImageData","texture","uniform3f","uniform4f","fromTransform","mat4","DefaultUniform","AttributeType","UNSIGNED_SHORT","UNSIGNED_INT","canvasCache","getSharedCanvasCacheKey","uniqueCanvasCacheKeyCount","computeAttributesStride","attr","getByteSizeFromType","BYTES_PER_ELEMENT","Uint16Array","boundHandleWebGLContextLost_","handleWebGLContextLost","boundHandleWebGLContextRestored_","handleWebGLContextRestored","canvasCacheKey_","canvasCacheKey","cacheItem","users","getCanvas","bufferCache_","extensionCache_","currentProgram_","ContextEventType","offsetRotateMatrix_","offsetScaleMatrix_","tmpMat4_","uniformLocations_","attribLocations_","setUniforms","postProcessPasses_","postProcesses","shaderCompileErrors_","WebGLHelper","name_1","getExtension","bufferKey","bufferCache","webGlBuffer","getUsage","bufferCacheEntry","isContextLost","deleteBuffer","loseContext","opt_disableAlphaBlend","init","ZERO","applyFrameState","renderTarget","getFramebuffer","getTexture","elementType","numItems","offsetInBytes","drawElements","offsetScaleMatrix","resetTransform","scaleTransform","offsetRotateMatrix","rotateTransform","setUniformMatrixValue","setUniformFloatValue","HTMLImageElement","prevValue","program","shader","fragmentShaderSource","vertexShaderSource","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","deleteShader","getProgramParameter","LINK_STATUS","uniform4fv","uniformMatrix4fv","attribName","getAttributeLocation","enableAttributeArray_","opt_data","opt_texture","texture_","PaletteTexture","NEAREST","TEXTURE_MAG_FILTER","tmpArray4","helper","helper_","framebuffer_","dataCacheDirty_","updateSize_","WebGLRenderTarget","readPixels","readAll","ENABLE_RASTER_REPROJECTION","maxSourceExtent","errorThreshold","opt_destinationResolution","sourceProj_","targetProj_","transformInvCache","transformInv","transformInv_","maxSourceExtent_","errorThresholdSquared_","triangles_","wrapsXInSource_","canWrapXInSource_","sourceWorldWidth_","targetWorldWidth_","destinationTopLeft","destinationTopRight","destinationBottomRight","destinationBottomLeft","sourceTopLeft","sourceTopRight","sourceBottomRight","sourceBottomLeft","maxSubdivision","addQuad_","leftBound_1","newTriangle","Triangulation","aSrc","bSrc","cSrc","dSrc","sourceQuadExtent","sourceCoverageX","sourceWorldWidth","wrapsX","needsSubdivision","isNotFinite","centerSrc","bc","bcSrc","da","daSrc","ab","abSrc","cd","cdSrc","addTriangle_","sourceTileGrid","targetTileGrid","getTileFunction","opt_errorThreshold","renderEdges_","gutter_","sourceTileGrid_","targetTileGrid_","wrappedTileCoord_","sourceTiles_","sourcesListenerKeys_","sourceZ_","maxTargetExtent","limitedTargetExtent","sourceProjExtent","errorThresholdInPixels","triangulation_","calculateSourceExtent","sourceRange","srcX","srcY","ReprojTile","renderReprojected","leftToLoad_1","sourceListenKey_1","unlistenSources_","reproject_","bindAndConfigure","resampleFilter","uploadDataTexture","bandCount","textureType","canInterpolate","bytesPerRow","byteLength","unpackAlignment","LUMINANCE","LUMINANCE_ALPHA","RGB","oldUnpackAlignment","getParameter","UNPACK_ALIGNMENT","pixelStorei","pixelContext","textures","renderSize_","grid","fromArray","flushBufferData","setTile","TileTexture","uploadTile_","uploadImageTexture","sourceTileSize","pixelSize","isFloat","pixelCount","DataType","bytesPerElement","textureCount","textureDataArrays","textureIndex","dataIndex","rowOffset","colCount","rowIndex","colIndex","dataValue","pixelIndex","bandIndex","textureData","deleteTexture","renderCol","renderRow","renderWidth","renderHeight","sourceSize","sourceWidthWithoutGutter_1","sourceHeightWithoutGutter_1","sourceWidth_1","sourceHeight_1","sourceCol_1","sourceRow_1","data_1","DataView","bytesPerPixel","offset_1","sourceWidthWithoutGutter","sourceHeightWithoutGutter","sourceCol","sourceRow","boundHandleImageChange_","handleImageChange_","layer_","declutterExecutorGroup","LayerRenderer","tiles","loadedTileCallback","forEachLoadedTile","renderIfReadyAndVisible","getLayer","WebGLWorkerMessageType","inversePixelTransform_","pixelContext_","postProcesses_","removeHelper","dispatchPreComposeEvent","dispatchPostComposeEvent","WebGLLayerRenderer","event_2","getRenderSource","incrementGroup","groupNumber","layerClassName","getClassName","canvasCacheKeyMatches","afterHelperCreated","prepareFrameInternal","event_3","dispatchRenderEvent_","renderPixel","layerExtent","pixelCanvas","tmpArray_","bufferPositions_","vertexPosition","indexPosition","writePointVertex","colorEncodeId","radix","divide","colorDecodeId","mult","Uniforms","TILE_TEXTURE_ARRAY","TILE_TRANSFORM","TRANSITION_ALPHA","DEPTH","TEXTURE_PIXEL_WIDTH","TEXTURE_PIXEL_HEIGHT","TEXTURE_RESOLUTION","TEXTURE_ORIGIN_X","TEXTURE_ORIGIN_Y","RENDER_EXTENT","ZOOM","Attributes","TEXTURE_COORD","attributeDescriptions","empty","depthForZ","addTileTextureToLookup","tileTexturesByZ","tileTexture","getRenderExtent","gridExtent","getTileGridForProjection","getCacheKey","getTileCoordKey","tileLayer","renderComplete","tileTransform_","tempMat4_","tempTileRange_","tempTileCoord_","createTileCoord","tempSize_","program_","vertexShader_","fragmentShader_","indices_","tileTextureCache_","paletteTextures_","paletteTextures","WebGLTileLayerRenderer","getProgram","tileState","useInterimTilesOnError","getUseInterimTilesOnError","initialZ","tileSource","getGutterForProjection","tileTextureCache","minZ","getPreload","cacheKey","getTile","isDrawableTile_","getInterimTile","tileQueueKey","preRender","zDirection","targetZ","enqueueTiles","alphaLookup","uid","blend","tileTextures","getAlpha","endTransition","tileCoordKey","findAltTiles_","parentZ","prepareDraw","zs","tileZ","tileOrigin","tileWidthWithGutter","tileHeightWithGutter","aspectRatio","centerI","centerJ","tileScale","depth","tileTextures_1","tileCenterI","tileCenterJ","translateTransform","mat4FromTransform","enableAttributes","textureProperty","uniformName","paletteIndex","paletteTexture","gutterExtent","setUniformFloatVec4","finalizeDraw","expireCache","postRender","getSources","col","row","getPixelData","altZ","getTileRangeForTileCoordAndZ","covered","deleteProgram","ValueTypes","Operators","getValueType","stringify","valueArr","operator","getReturnType","isTypeUnique","valueType","numberToGlsl","arrayToGlsl","colorToGlsl","getStringNumberEquivalent","string","stringLiteralsMap","stringToGlsl","expressionToGlsl","typeHint","toGlsl","assertNumber","assertNumbers","assertString","assertBoolean","assertArgsCount","assertArgsMinCount","assertArgsMaxCount","assertArgsEven","assertUniqueInferredType","types","uniformNameForVariable","variableName","inFragmentShader","variables","PALETTE_TEXTURE_ARRAY","colors","numColors","palette","candidate","length_1","paletteName","GET_BAND_VALUE_FUNC","getEqualOperator","getDecisionOperator","band","functions","ifBlocks","colorIndex","textureName","bandExpression","xOffsetExpression","yOffsetExpression","parsedArgs","opt_typeHint","interpolation","outputType","exponent","stop1","output1","stop2","output2","fallback","assertArgsOdd","varyings","sizeExpression","rotationExpression","offsetExpression","colorExpression","texCoordExpression","discardExpression","rotateWithView","ShaderBuilder","expression","forHitDetection","offsetMatrix","attribute","varying","hitDetectionBypass","parseLiteralStyle","symbStyle","symbol","texCoord","textureCoord","vertContext","parsedSize","parsedOffset","parsedTexCoord","parsedRotation","fragContext","parsedColor","parsedOpacity","opacityFilter","visibleSize","symbolType","st","builder","setSizeExpression","setRotationExpression","setSymbolOffsetExpression","setTextureCoordinateExpression","setSymbolRotateWithView","setColorExpression","parsedFilter","setFragmentDiscardExpression","varName","addUniform","getColorExpression","attrName","addVarying","addAttribute","props","matrixIds_","matrixIds","WMTSTileGrid","createFromCapabilitiesMatrixSet","matrixSet","opt_matrixLimits","matrixLimits","switchOriginXY","getAxisOrientation","elt","elt_ml","tileWidth","tileHeight","opacity_","rotateWithView_","scale_","scaleArray_","displacement_","displacement","declutterMode_","ImageStyle","getScale","getDisplacement","hitDetectionCanvas_","fill_","points","radius_","radius1","radius2_","radius2","stroke_","renderOptions_","RegularShape","getPoints","getRadius2","setOpacity","createHitDetectionCanvas_","renderOptions","draw_","strokeWidth","r1","r2","miterRatio","bevelAdd","aa","dd","innerMiterRatio","innerLength","calculateLineJoinSize_","maxRadius","createRenderOptions","createPath_","drawHitDetectionCanvas_","angle0","radiusC","CircleStyle","color_","Fill","taintedTestContext","hitDetectionImage_","imageState_","tainted_","IconImage","dispatchChangeEvent_","replaceColor_","isTainted_","imgData","putImageData","normalizedAnchor_","anchorOrigin_","anchorOrigin","IconOrigin","anchorXUnits_","anchorXUnits","IconAnchorUnits","anchorYUnits_","anchorYUnits","imgSize_","imgSize","iconImage_","getIconImage","offset_","offsetOrigin_","offsetOrigin","Icon","getSrc","getPixelRatio","getHitDetectionImage","iconImageSize","lineCap_","lineDash_","lineDashOffset_","lineJoin_","miterLimit_","width_","Stroke","geometryFunction_","defaultGeometryFunction","hitDetectionRenderer_","zIndex_","Style","toFunction","styleFunction","defaultStyles","createDefaultStyle","createEditingStyle","styles","white","blue","font_","textAlign_","justify_","justify","textBaseline_","maxAngle_","maxAngle","placement_","placement","TextPlacement","overflow_","offsetX_","offsetY_","backgroundFill_","backgroundFill","backgroundStroke_","backgroundStroke","Text","getPlacement","getMaxAngle","getOverflow","getJustify","getBackgroundFill","getBackgroundStroke","getPadding","opt_circular","first_","last_","head_","circular_","length_","LinkedList","opt_maxEntries","rbush_","RBush_","items_","RBush","extents","items","bbox","forEach_","getAll","getInExtent","rbush","adaptAttributions","attributionLike","attributions_","attributionsCollapsible_","attributionsCollapsible","wrapX_","interpolate_","viewResolver","viewRejector","viewPromise_","Source","opaque_","opaque","tilePixelRatio_","tilePixelRatio","tileCache","tmpSize","tileOptions","TileSource","getTileCacheForProjection","getResolutions","getTilePixelRatio","scaleSize","refresh","tileCount","generateTileUrlFunction_","tileUrlFunction","UrlTile","setUrls","setUrl","tileLoadingKeys_","TileEventType","TileSourceEvent","pruneExceptNewestZ","setKey","setTileUrlFunction","defaultTileLoadFunction","imageTile","imageSmoothing","tileClass","tileCacheForProjection","tileGridForProjection","reprojectionErrorThreshold_","reprojectionErrorThreshold","renderReprojectionEdges_","TileImage","usedTileCache","getGutter","getInterpolate","getOpaque","thisProj","projKey","getTileCoordForTileUrlFunction","tileUrl","newTile","getTileInternal","refreshInterimChain","createTile_","tilegrid","proj","quadKey","digits","mask","hidpi","hidpi_","culture_","culture","maxZoom_","apiKey_","imagerySet_","imagerySet","requestJSONP","handleImageryMetadataResponse","BingMaps","statusCode","statusDescription","authenticationResultCode","resourceSets","resources","resource","zoomMax","imageWidth","imageHeight","zoomMin","imageUrlSubdomains","subdomain","quadKeyTileCoord","imageUrl","imageryProviders","transform_1","setAttributions","getTileGrid","imageryProvider","intersecting","coverageAreas","coverageArea","XYZ","account_","account","mapId_","config_","config","templateCache_","initializeMap_","CartoDB","paramHash","applyTemplate_","mapUrl","handleInitResponse_","handleInitError_","tilesUrl","cdn_url","https","layergroupid","opt_feature","opt_features","overlaps_","overlaps","strategy_","strategy","allStrategy","useSpatialIndex","featuresRtree_","loadedExtentsRtree_","loadingExtentsCount_","nullGeometryFeatures_","idIndex_","uidIndex_","featureChangeKeys_","featuresCollection_","addFeaturesInternal","bindFeaturesCollection_","VectorSource","addFeatureInternal","featureKey","addToIndex_","setupChangeEvents_","VectorSourceEvent","VectorEventType","handleFeatureChange_","valid","newFeatures","geometryFeatures","length_2","length_3","modifyingCollection","addFeature","removeFeature","opt_fast","featureId","removeAndIgnoreReturn","removeFeatureInternal","clearEvent","forEachFeatureInExtent","intersectsCoordinate","forEachInExtent","intersectsExtent","forEachFeatureAtCoordinateDirect","anExtent","opt_filter","closestFeature","previousMinSquaredDistance","minDistance","sid","removeFromIdIndex_","loadedExtentsRtree","extentsToLoad","extentToLoad","this_1","featureChangeKeys","removed","setLoader","interpolationRatio","geometryFunction","createCustomCluster_","createCluster","boundRefresh_","updateDistance","Cluster","loadFeatures","cluster","mapDistance","clustered","getCoordinates","neighbors","getFeaturesInExtent","neighbor","geometry_1","searchCenter","renderTileSize","DataTileSource","sourceLoader","floatView","uint32View","baseTable","shiftTable","mantissaTable","exponentTable","offsetTable","convertToNumber","float16bits","TypedArrayPrototype","Reflect","getTypedArrayPrototypeSybolToStringTag","getOwnPropertyDescriptor","isTypedArray","isDataView","getFloat16","dataView","byteOffset","opts","getUint16","registry","addDecoder","cases","importFn","getDecoder","fileDirectory","Compression","copyNewSize","samplesPerPixel","resampleNearest","valueArrays","inWidth","inHeight","outWidth","outHeight","relX","relY","newArray","cy","cx","resampleBilinear","rawY","yl","yh","rawX","tx","xl","xh","ll","hl","lh","hh","resampleNearestInterleaved","valueArray","samples","resampleBilinearInterleaved","sum","arrayForType","bitsPerSample","Int8Array","Int16Array","Int32Array","Float64Array","default","geoKeys","littleEndian","isTiled","StripOffsets","planarConfiguration","PlanarConfiguration","getFileDirectory","getGeoKeys","ImageWidth","ImageLength","getSamplesPerPixel","SamplesPerPixel","getTileWidth","TileWidth","getTileHeight","TileLength","RowsPerStrip","getBlockWidth","getBlockHeight","getBytesPerPixel","bytes","BitsPerSample","getSampleByteSize","RangeError","getReaderForSample","sampleIndex","SampleFormat","getUint8","getUint32","getInt8","getInt16","getInt32","getFloat32","getFloat64","getSampleFormat","getBitsPerSample","getArrayForSample","sample","poolOrDecoder","signal","numTilesPerRow","numTilesPerCol","byteCount","TileOffsets","TileByteCounts","StripByteCounts","fetch","request","sampleFormat","needsNormalization","inBuffer","samplesToTransfer","outArray","bitMask","repeat","pixelBitSkip","bitsPerLine","lineBitOffset","pixelBitOffset","bitOffset","outIndex","innerBitOffset","raw","normalizeArray","imageWindow","interleave","resampleMethod","minXTile","maxXTile","minYTile","maxYTile","windowWidth","srcSampleOffsets","sampleReaders","promises","yTile","xTile","si","promise","getTileOrStrip","blockHeight","firstLine","firstCol","lastLine","lastCol","reader","ymax","xmax","pixelOffset","windowCoordinate","resampled","resampleInterleaved","resample","wnd","pool","fillValue","numPixels","_readRaster","enableAlpha","pi","PhotometricInterpretation","photometricInterpretations","ExtraSamples","ExtraSamplesValues","readRasters","subOptions","raster","rgbRaster","fromWhiteIsZero","fromBlackIsZero","colorMap","greenOffset","blueOffset","mapIndex","fromPalette","ColorMap","cmykRaster","fromCMYK","yCbCrRaster","Uint8ClampedArray","cb","cr","fromYCbCr","cieLabRaster","fromCIELab","red","green","getTiePoints","ModelTiepoint","tiePoints","getGDALMetadata","metadata","GDAL_METADATA","findTagsByName","getAttribute","getGDALNoData","GDAL_NODATA","modelTransformation","ModelTransformation","referenceImage","modelPixelScale","ModelPixelScale","refResX","refResY","refResZ","pixelIsArea","GTRasterTypeGeoKey","getBoundingBox","DataView64","arrayBuffer","_dataView","getUint64","combined","isSafeInteger","getInt64","isNegative","carrying","byte","DataSlice","sliceOffset","bigTiff","_sliceOffset","_littleEndian","_bigTiff","covers","sliceTop","readUint8","readInt8","readUint16","readInt16","readUint32","readFloat32","readFloat64","readUint64","readInt64","readOffset","CRLFCRLF","itemsToObject","fromEntries","parseHeaders","line","kv","parseContentRange","rawContentRange","total","BaseSource","slices","fetchSlice","zip","A","B","AbortError","super","captureStackTrace","CustomAggregateError","errors","AggregateError","Block","BlockGroup","blockIds","BlockedSource","blockSize","blockCache","blockRequests","blockIdsToFetch","Set","fileSize","cachedBlocks","missingBlockIds","current","blockId","milliseconds","wait","fetchBlocks","block","cachedBlock","results","allSettled","retriedBlockRequests","rejected","reason","aborted","requiredBlocks","readSliceData","groups","groupBlocks","groupRequests","groupIndex","blockRequest","blockOffset","sortedBlockIds","lastBlockId","blocks","blockIdLow","blockIdHigh","sliceData","sliceView","topDelta","usedBlockLength","blockInnerOffset","rangeInnerOffset","blockView","BaseResponse","getHeader","headerName","BaseClient","headers","credentials","FetchResponse","FetchClient","XHRResponse","getResponseHeader","XHRClient","constructRequest","entries","onabort","abort","HttpResponse","dataPromise","HttpClient","parsedUrl","urlMod","httpApi","protocol","http","resolveData","chunk","Buffer","RemoteSource","maxRanges","allowFullFile","_fileSize","fetchSlices","Range","ok","rawContentType","rawParams","param","parseContentType","byteRanges","responseArrayBuffer","boundary","decoder","startBoundary","endBoundary","startsWith","innerText","endOfHeaders","startOfData","parseByteRanges","others","maybeWrapInBlockedSource","makeFetchSource","blockOptions","makeXHRSource","makeHttpSource","makeRemoteSource","forceXHR","clientOptions","FileReaderSource","file","blob","FileReader","readAsArrayBuffer","getFieldTypeLength","fieldType","fieldTypes","dataSlice","readMethod","fieldTypeLength","ImageFileDirectory","geoKeyDirectory","nextIFDByteOffset","GeoTIFFImageIndexError","GeoTIFFBase","resX","resY","firstImage","usedImage","imageCount","getImageCount","imgBBox","oX","oY","rX","rY","usedBBox","allImages","SubfileType","subfileType","NewSubfileType","newSubfileType","imgResX","imgResY","imageResX","imageResY","GeoTIFF","firstIFDOffset","ifdRequests","ghostValues","fallbackSize","entrySize","offsetSize","getSlice","numDirEntries","byteSize","entryCount","fieldTag","typeCount","fieldValues","valueOffset","actualOffset","arrayFields","fieldTagNames","rawGeoKeyDirectory","GeoKeyDirectory","geoKeyNames","parseGeoKeyDirectory","parseFileDirectoryAt","requestIFD","previousIfd","ifd","GeoTIFFImage","hasNext","detectionString","heuristicAreaSize","metadataSize","fullString","headerData","BOM","magicNumber","MultiGeoTIFF","mainFile","overviewFiles","imageFiles","fileDirectoriesPerFile","fileDirectoriesPerFileParsing","requests","parseFileDirectoriesPerFile","visited","relativeIndex","imageFile","imageCounts","ifds","fromBlob","fromSource","defaultPoolSize","hardwareConcurrency","workerPool","createWorker","workers","_awaitingDecoder","messageId","worker","idle","random","onMessage","decoded","postMessage","terminate","STATISTICS_MAXIMUM","STATISTICS_MINIMUM","_","ImageHeight","ProjectedCSTypeGeoKey","getCachedProjection","unitsFromCode","ProjLinearUnitsGeoKey","GeographicTypeGeoKey","GeogAngularUnitsGeoKey","getImagesForTIFF","tiff","getImagesForSource","tiffFromBlob","overviews","mainUrl","overviewUrls","tiffFromUrls","tiffFromUrl","assertEqual","expected","got","rejector","getMinForDataType","getMaxForDataType","sourceInfo_","numSources","sourceOptions_","sourceOptions","sourceImagery_","resolutionFactors_","samplesPerPixel_","nodataValues_","metadata_","normalize_","addAlpha_","readMethod_","convertToRGB","configure_","GeoTIFFSource","commonRenderTileSizes","commonSourceTileSizes","nodataValues","sourceCount","sourceIndex","images","sourceOrigin","sourceTileSizes","renderTileSizes","sourceResolutions","imageIndex","nodataValue","wantedSamples","bands","level","imageResolutions","resolutionFactor_1","scaledSourceResolutions","sourceImagery","firstSource","nodata","additionalBands","setTileSizes","loadTile_","addAlpha","sourceInfo","resolutionFactor","this_2","pixelBounds","bandNumber","Pool","dataLength","sourceSamples","transparent","gain","bias","stats","sourceValue","nodataIsNaN","TierSizeCalculation","zoomifyImage_","CustomTile","tierSizeCalculation","tierSizeInTiles","tileSizeForTierSizeCalculation","tileCountUpToTier","tileIndex","localContext_1","ZoomifyTileClass","testTileUrl","getTileCoordForCoordAndResolution","Versions","IIIF_PROFILE_VALUES","supports","formats","qualities","COMPLIANCE_VERSION1","COMPLIANCE_VERSION2","COMPLIANCE_VERSION3","versionFunctions","iiifInfo","levelProfile","getComplianceLevelSupportedFeatures","imageInfo","scale_factors","tile_width","tile_height","additionalProfile","profile","profileSupports","profileFormats","profileQualities","scaleFactors","extraFormats","__spreadArray","preferredFormat","preferredFormats","extraFeatures","extraQualities","setImageInfo","IIIFInfo","getComplianceLevelEntryFromProfile","identifier","version","getImageApiVersion","complianceLevel","getComplianceLevelFromProfile","opt_preferredOptions","imageOptions","quality","formatPercentage","percentage","toLocaleString","maximumFractionDigits","baseUrl","supportsListedSizes","supportsListedTiles","isInteger","supportsArbitraryTiling","maxScaleFactor","ignoredSizesIndex","IiifTileClass","regionParam","sizeParam","tileX","tileY","regionX","regionY","regionW","regionH","sizeW","sizeH","regionWidth","regionHeight","getImageFunction","sourceImage","sourcePixelRatio","targetExtent_","sourceImage_","sourcePixelRatio_","sourceListenerKey_","ReprojImage","unlistenSource_","ImageSourceEventType","defaultImageLoadFunction","reprojectedImage_","reprojectedRevision_","ImageSource","getImageInternal","ImageSourceEvent","params_","imageSize_","renderedRevision_","ratio_","ImageArcGISRest","findNearestResolution","halfWidth","halfHeight","imageResolution","getRequestUrl_","handleImageChange","srid","modifiedUrl","canvasFunction_","canvasFunction","ImageCanvasSource","canvasElement","displayDpi_","displayDpi","useOverlay_","useOverlay","ImageMapGuide","getUrl","dpi","mcsW","mcsH","devW","devH","mpp","baseParams","imageExtent_","imageExtent","Static","extentWidth","extentHeight","targetWidth","targetHeight","setImage","DEFAULT_VERSION","GETFEATUREINFO_IMAGE_SIZE","v13_","updateV13_","serverType_","serverType","ImageWMS","projectionObj","sourceProjectionObj","LAYERS","mpu","viewExtent","requestExtent","knownMapMediaTypes","knownVectorMediaTypes","getMapTileUrlTemplate","links","mediaType","tileUrlTemplate","fallbackUrlTemplate","link","rel","getVectorTileUrlTemplate","supportedMediaTypes","hrefLookup","supportedMediaType","parseTileMatrixSet","tileMatrixSet","tileMatrixSetLimits","crs","backwards","matrices","tileMatrices","matrixLookup","matrix","limitLookup","limit","tileMatrix","origin_1","pointOfOrigin","cellSize","matrixWidth","matrixHeight","tileMapWidth","minTileCol","maxTileCol","tileMapHeight","cornerOfOrigin","minTileRow","maxTileRow","intersectExtents","urlTemplate","urlFunction","upsideDown","localContext","tileCol","tileRow","getTileSetInfo","tileSet","dataType","tileMatrixSetLink","tileMatrixSetDefinition","parseTileSetMetadata","handleTileSetInfo_","handleError_","OGCMapTile","tileSetInfo","defaultLoadFunction","sourceTileCache","tileGrids_","sourceTile","tileFeatures","usedSourceTiles","bufferExtent","sourceTileGrid_1","sourceZ","forEachTileCoord","sourceTileCoord","sourceTileState","listenChange_1","sourceTileKey","coordKey","tileExtent","sourceTileGrid_2","DEFAULT_MAX_ZOOM","updateCacheSize","getFormat","onLoad","onError","OGCVectorTile","ATTRIBUTION","tempTransform","pixelTransform","containerReused","CanvasLayerRenderer","getBackground","opt_backgroundColor","backgroundColor","transformOrigin","topLeft","topRight","bottomRight","bottomLeft","inverted","imageLayer","CanvasImageLayerRenderer","viewResolution","imageSource","renderedExtent","loadImage","imageMapWidth","imageMapHeight","imagePixelRatio","viewCenter","canvasTransform","toTransformString","useContainer","clipped","clipUnrotated","dw","dh","previousAlpha","ImageLayer","BaseImageLayer","preload","setPreload","setUseInterimTilesOnError","BaseTileLayer","TileProperty","extentChanged","renderedExtent_","renderedPixelRatio","renderedProjection","renderedTiles","newTiles_","tmpExtent","tmpTileRange_","CanvasTileLayerRenderer","isDrawableTile","sourceRevision","canvasExtent","tilesToDrawByZ","findLoadedTiles","createLoadedTileFinder","tmpTileRange","tileCoordIntersectsViewport","inTransition","childTileRange","getTileCoordChildTileRange","forEachTileCoordParentTileRange","canvasScale","clips","clipZs","currentClip","currentZ","currentTilePixelSize","getTilePixelSize","currentScale","dx_1","dy_1","originTileCoord","originTileExtent","tileGutter","tilesToDraw","xIndex","nextX","yIndex","nextY","contextSaved","i_1","drawTileImage","updateUsedTiles","manageTilePyramid","scheduleExpireCache","getTileImage","alphaChanged","postRenderFunction","opt_tileCallback","useTile","TileLayer","hasImageData","newImageData","imageData","createImageData","createMinion","operation","workerHasImageData","newWorkerImageData","buffers","meta","imageOps","numBuffers","numBytes","arrays","pixels","lines","lib","Worker","Blob","createObjectURL","threads","_imageOps","_onWorkerMessage","minion","terminated","createFauxWorker","_workers","_queue","_maxQueueLength","queue","_running","_dataLookup","_job","Processor","inputs","_enqueue","_dispatch","job","_resolveJob","RasterEventType","RasterOperationType","processor_","operationType_","operationType","threads_","layers_","createLayer","createLayers","requestedFrameState_","renderedImageCanvas_","iMax","sourceOrLayer","sourceAttribution","setOperation","RasterSource","opt_lib","allSourcesReady_","updateFrameState_","processSources_","imageDatas","RasterSourceEvent","process","onWorkerComplete_","sharedContext","layerOrSource","ATTRIBUTIONS","OSM_ATTRIBUTION","LayerConfig","ProviderConfig","provider","providerConfig","layerConfig","getKeyForParams_","TileArcGISRest","getTileCoord","strokeRect","tileJSON_","handleTileJSONResponse","handleTileJSONError","onXHRLoad_","onXHRError_","tileJSON","TileJSON","epsg4326Projection","attributionExtent_1","TileWMS","bufferSize","preemptive","preemptive_","grid_","keys_","jsonp_","xRelative","yRelative","opt_request","loadInternal_","json","tileUrlFunction_","template_","UTFGrid","forDataAtCoordinate","grids","requestEncoding","version_","dimensions_","dimensions","matrixSet_","requestEncoding_","getKeyForDimensions_","createFromWMTSTemplate","WMTS","getMatrixId","renderBuffer","updateWhileAnimating","updateWhileInteracting","declutter_","declutter","renderBuffer_","updateWhileAnimating_","updateWhileInteracting_","BaseVectorLayer","renderOrder","toStyleFunction","projectionMatrixTransform","sourceRevision_","verticesBuffer_","hitVerticesBuffer_","indicesBuffer_","hitDetectionEnabled_","hitFragmentShader","hitVertexShader","hitVertexShader_","hitFragmentShader_","hitProgram_","customAttributes","hitDetectionAttributes","currentTransform_","renderTransform_","invertRenderTransform_","renderInstructions_","hitRenderInstructions_","hitRenderTarget_","generateBuffersRun_","worker_","createWebGLWorker","received","projectionTransform","hitDetection","fromArrayBuffer","vertexBuffer","indexBuffer","makeInverseTransform","renderInstructions","generateBuffersRun","featureCache_","featureCount_","sourceListenKeys_","handleSourceFeatureAdded_","handleSourceFeatureChanged_","handleSourceFeatureDelete_","handleSourceFeatureClear_","forEachFeature","WebGLPointsLayerRenderer","endWorld","startWorld","world","renderCount","makeProjectionTransform","renderHitDetection","clearCachedData","vectorSource","viewNotMoving","sourceChanged","BaseVector","getRenderBuffer","rebuildBuffers_","featureCache","totalInstructionsCount","totalHitInstructionsCount","hitColor","tmpCoords","tmpColor","renderIndex","hitIndex","featureUid","customAttributesCount","hitMessage","readPixel","getFeatureByUid","prepareDrawToRenderTarget","Instruction","BEGIN_GEOMETRY","BEGIN_PATH","CIRCLE","CLOSE_PATH","CUSTOM","DRAW_CHARS","DRAW_IMAGE","END_GEOMETRY","FILL","MOVE_TO_LINE_TO","SET_FILL_STYLE","SET_STROKE_STYLE","STROKE","fillInstruction","strokeInstruction","beginPathInstruction","closePathInstruction","maxLineWidth","beginGeometryInstruction1_","beginGeometryInstruction2_","bufferedMaxExtent_","instructions","tmpCoordinate_","hitDetectionInstructions","CanvasBuilder","dashArray","dash","getBufferedMaxExtent","myEnd","closed","skipFirst","lastRel","nextRel","lastXCoord","lastYCoord","nextCoord","skipped","builderEnds","builderEnd","appendFlatLineCoordinates","beginGeometry","builderEndss","builderBegin","myEnds","drawCustomCoordinates_","CanvasInstruction","appendFlatPointCoordinates","endGeometry","instruction","createStroke","applyPixelRatio","createFill","currentFillStyle","applyStroke","currentStrokeStyle","currentLineCap","currentLineDash","currentLineDashOffset","currentLineJoin","currentLineWidth","currentMiterLimit","endGeometryInstruction","imagePixelRatio_","anchorX_","anchorY_","height_","originX_","originY_","declutterImageWithText_","CanvasImageBuilder","myBegin","reverseHitDetectionInstructions","opt_sharedData","CanvasLineStringBuilder","moveToLineToInstruction","updateStrokeStyle","drawFlatCoordinates_","lastStroke","CanvasPolygonBuilder","numEnds","setFillStrokeStyles_","circleInstruction","drawFlatCoordinatess_","updateFillStyle","matchingChunk","m12","m23","x12","y12","x23","y23","chunkStart","chunkEnd","chunkM","acos","TEXT_ALIGN","labels_","fillStates","strokeStates","textStates","textKey_","fillKey_","strokeKey_","CanvasTextBuilder","geometryType","geometryWidths","beg_1","saveTextStates_","p0","p1","p2","p3","pixelRatio_1","flatOffset","flatEnd","oo","drawChars_","strokeKey","textKey","fillKey","baseline","BATCH_CONSTRUCTORS","PolygonBuilder","Builder","ImageBuilder","LineStringBuilder","TextBuilder","tolerance_","maxExtent_","resolution_","buildersByZIndex_","BuilderGroup","builderInstructions","zKey","builders","builderKey","builderInstruction","builderType","zIndexKey","replays","replay","Constructor","drawTextOnPath","startM","segmentM","advance","beginX","beginY","startOffset","startLength","endM","flat","previousAngle","singleSegment","iStart","charLength","chars","lineStringLength","p4","getDeclutterBox","replayImageOrLabelArgs","declutterBox","rtlRegEx","horizontalTextAlign","align","createTextChunks","alignFill_","coordinateCache_","renderedTransform_","widths_","Executor","textIsArray","OffscreenCanvasRenderingContext2D","previousFont","leftRight","strokeInstructions","fillInstructions","lineOffset","widthHeightIndex","lineWidthIndex","text_1","fillStrokeArgs","setStrokeStyle_","sheetWidth","sheetHeight","snapToPixel","fillStroke","boxW","boxH","boxX","boxY","drawImageX","drawImageY","drawImageW","drawImageH","contextScale","imageOrLabel","strokePadding","replayTextBackground_","repeatSize","createLabel","opt_featureCallback","opt_hitExtent","opt_declutterTree","transformSetFromArray","prevX","prevY","roundX","roundY","currentGeometry","pendingFill","pendingStroke","lastFillInstruction","lastStrokeInstruction","coordinateCache","viewRotationFromTransform","batchSize","labelWithAnchor","drawLabelWithPointPlacement_","widthIndex","calculateImageOrLabelDimensions_","imageArgs","imageDeclutterBox","replayImageOrLabel_","measurePixelRatio","pixelRatioScale","cachedWidths","pathLength","textLength","parts","drawChars","cc","part","ii_1","execute_","ORDER","allInstructions","opt_renderBuffer","executorsByZIndex_","hitDetectionContext_","hitDetectionTransform_","createExecutors_","ExecutorGroup","flatClipCoords","getClipCoords","executors","instructionByZindex","candidates","declutteredFeatures","contextSize","newContext","hitExtent","indexes","getPixelIndexArray","featureCallback","result_1","executor","executeHitDetection","opt_builderTypes","builderTypes","execute","circlePixelIndexArrayCache","maxDistanceSq","distances","HIT_DETECT_RESOLUTION","createHitDetectionImageData","featureCount","indexFactor","featuresByZIndex","featureStyleFunction","getStyleFunction","originalStyle","setColor","setText","getImageSize","imgContext","byGeometryType","zIndexKeys","geomAndStyle","kk","hitDetect","resultFeatures","vectorLayer","boundHandleStyleImageChange_","handleStyleImageChange_","animatingOrInteracting_","hitDetectionImageData_","renderedFeatures_","renderedResolution_","wrappedRenderedExtent_","renderedRotation_","renderedCenter_","renderedProjection_","renderedRenderOrder_","replayGroup_","replayGroupChanged","clipping","compositionContext_","CanvasVectorLayerRenderer","executorGroup","getRenderTransform","compositionContext","setupCompositionContext_","renderWorlds","releaseCompositionContext_","transformToString","animating","interacting","getUpdateWhileAnimating","getUpdateWhileInteracting","frameStateExtent","vectorLayerRevision","vectorLayerRenderBuffer","vectorLayerRenderOrder","getRenderOrder","defaultRenderOrder","loadExtents","wrapCoordinateX","loadExtent","wrapExtentX","declutterBuilderGroup","CanvasBuilderGroup","getRenderTolerance","getDeclutter","userExtent_1","getSquaredRenderTolerance","userExtent","replayGroupInstructions","getOverlaps","vectorRenderer_","layerImageRatio_","getImageRatio","coordinateToVectorPixelTransform_","renderedPixelToCoordinateTransform_","CanvasVectorImageLayerRenderer","vectorPixel","vectorRenderer","imageLayerState","imageFrameState_1","emptyImage_1","image_1","IMAGE_REPLAYS","VECTOR_REPLAYS","renderedLayerRevision_","tmpTransform_","CanvasVectorTileLayerRenderer","updateExecutorGroup_","tileImageNeedsRender_","hifi","prepareTile","getRenderMode","VectorTileRenderType","renderTileImage_","layerRevision","builderState","getReplayState","layerUid","tt","sourceTileExtent","sharedExtent","builderExtent","bufferedExtent","executorGroupInstructions","replayExtent","renderingReplayGroup","CanvasExecutorGroup","extent_1","tilePixel","getTileRenderTransform","worldOffset","renderMode","replayTypes","hasExecutors","replayState","renderPixelRatio","renderScale","pixelScale","MultiPoint","multiPoint","interpolatePoint","cumulativeLengths","lineStringCoordinateAtM","extrapolate","lo","hi","m0","lineStringsCoordinateAtM","flatMidpoint_","flatMidpointRevision_","LineString","lineString","opt_extrapolate","getCoordinateAt","lineStrings","MultiLineString","multiLineString","midpoints","endss_","flatInteriorPointsRevision_","flatInteriorPoints_","polygons","MultiPolygon","newEndss","multiPolygon","linearRingssArea","linearRingssCenter","prevEnds","lastEnds","type_","flatCoordinates_","flatMidpoints_","properties_","RenderFeature","midpoint","toGeometry","VectorLayer","geoM","fracA","fracB","fracM","geoA","geoB","geoStack","fractionStack","fractions","maxIterations","meridian","lon","frac","parallel","lon2","DEFAULT_STROKE_STYLE","INTERVALS","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_","lineStyle_","loadedExtent_","setRenderOrder","Graticule","realWorldExtent","removeLoadedExtent","renderExtent","equivalentProjection","updateProjectionInfo_","createGraticule_","featuresColl","getFeaturesCollection","poolIndex","minLat","maxLat","getMeridian_","geom","minLon","maxLon","getParallel_","rotationCenter","rotationExtent","unrotatedWidth","unrotatedHeight","labelsAtStart","vectorContext","textPoint","getMeridianPoint_","drawFeature","getParallelPoint_","getInterval_","validCenterP","centerLonLat","cnt","centerLon","centerLat","validExtentP","validExtent","addMeridian_","addParallel_","clampedLat","bottom","clampedBottom","clampedTop","clampedLeft","clampedRight","toLonLatTransform","split_1","lonLatCoordinates","worldExtentP","DEFAULT_GRADIENT","gradient","blur","gradient_","handleGradientChanged_","setGradient","setBlur","setRadius","weightFunction_","Heatmap","createLinearGradient","addColorStop","createGradient","getGradient","u_size","u_blurSlope","u_gradientTexture","u_opacity","defaultFeatureProjection","FeatureFormat","setWorldExtent","adaptOptions","transformGeometryWithOptions","power_1","transformExtentWithOptions","layersPBFReader","layerPBFReader","featurePBFReader","readRawFeature","featureClass_","featureClass","geometryName","layerName_","layerName","idProperty_","idProperty","MVT","cmd","coordsLen","currentEnd","cmdLen","rawFeature","readRawGeometry_","getGeometryType","setId","PBF","pbfLayers","pbfLayer","setExtent","createFeature_","renderMode_","setBackground","VectorTileLayer","cloneGeometries","clonedGeometries","opt_geometries","geometries_","changeEventsKeys_","listenGeometriesChange_","GeometryCollection","geometryCollection","setGeometries","geometriesArray","getGeometriesArrayRecursive","simplifiedGeometries","simplified","simplifiedGeometryCollection","setGeometriesArray","unlistenGeometriesChange_","getObject","JSONFeature","readFeatureFromObject","getReadOptions","readFeaturesFromObject","readGeometryFromObject","readProjectionFromObject","writeFeatureObject","writeFeaturesObject","writeGeometryObject","readGeometry","readPointGeometry","readLineStringGeometry","readPolygonGeometry","readMultiPointGeometry","readMultiLineStringGeometry","readMultiPolygonGeometry","readGeometryCollectionGeometry","writeGeometry","geoJSON","writePointGeometry","writeLineStringGeometry","rightHanded","writePolygonGeometry","writeMultiPointGeometry","writeMultiLineStringGeometry","writeMultiPolygonGeometry","writeGeometryCollectionGeometry","extractGeometryName_","extractGeometryName","GeoJSON","geoJSONFeature","geoJSONFeatures","objects","kCSSColorTable","clamp_css_byte","clamp_css_float","parse_css_int","parse_css_float","css_hue_to_rgb","m1","m2","css_str","iv","op","ep","fname","Color","convertLiteral","convertFunction","parameters","propertySpec","let","stops","const","convertIdentityFunction","zoomAndFeatureDependent","featureDependent","zoomDependent","tokens","convertTokenString","featureFunctionParameters","featureFunctionStops","zoomStops","getFunctionType","getInterpolateOperator","appendStopPair","convertPropertyFunction","fixupDegenerateStepCurve","convertZoomAndPropertyFunction","isStep","convertZoomFunction","colorSpace","getFallback","defaultValue","curve","interpolated","re","literal","rgba","parseCSSColor","black","ParsingError","Scope","bindings","NullType","kind","NumberType","StringType","BooleanType","ColorType","ObjectType","ValueType","CollatorType","FormattedType","ResolvedImageType","itemType","N","valueMemberTypes","checkSubtype","memberType","isValidType","provided","allowedTypes","isValidNativeType","Collator","caseSensitive","diacriticSensitive","locale","sensitivity","collator","Intl","lhs","rhs","resolvedLocale","resolvedOptions","FormattedSection","fontStack","textColor","Formatted","sections","unformatted","section","serialized","ResolvedImage","validateRGBA","isValue","mixed","typeOf","Literal","expectedType","evaluate","eachChild","outputDefined","RuntimeError","boolean","Assertion","parsed","FormatExpression","firstArg","nextTokenMayBeObject","lastExpression","content","evaluatedContent","ImageExpression","evaluatedImageName","availableImages","Coercion","parseColor","valueToString","child","geometryTypes","EvaluationContext","globals","featureState","formattedSection","_parseColorCache","canonical","featureTileCoord","featureDistanceData","canonicalID","distanceFromCenter","dX","dY","cached","CompoundExpression","_evaluate","definition","definitions","availableOverloads","overloads","signature","signatureContext","ParsingContext","path","scope","argParseFailed","signatures","stringifySignature","actualTypes","register","CollatorExpression","updateBBox","boxWithinBox","bbox1","bbox2","getTileCoordinates","lng","tilesAtZoom","onBoundary","rayIntersect","pointWithinPolygon","inside","ring","len2","pointWithinPolygons","twoSided","q1","q2","det1","det2","lineIntersectPolygon","vectorP","vectorQ","lineStringWithinPolygon","lineStringWithinPolygons","getTilePolygon","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","getTilePoints","pointBBox","shifts","tilePoints","getTileLines","lineBBox","tileLines","tileLine","resetBBox","Within","geojson","isFeatureConstant","isStateConstant","isGlobalPropertyConstant","tilePolygon","tilePolygons","pointsWithinPolygons","linesWithinPolygons","Var","boundExpression","isConstant","isTypeAnnotation","childrenConstant","findStopLessThanOrEqualTo","currentValue","nextValue","lowerIndex","upperIndex","currentIndex","expr","_parse","annotate","typeAnnotation","Expr","actual","ec","Step","labels","outputs","labelKey","valueKey","stopCount","UnitBezier","p1x","p1y","p2x","p2y","bx","ax","by","ay","sampleCurveX","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","t0","t1","t2","solve","Xn","Zn","deg2rad","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","labToRgb","labColor","interpolateHue","lab","interpolateNumber","hcl","hclColor","Interpolate","exponentialInterpolation","lowerValue","upperValue","difference","interpolationFactor","lower","upper","controlPoints","rest","outputLower","outputUpper","Coalesce","needsAnnotation","argCount","Let","binding","At","In","IndexOf","fromIndex","Match","inputType","otherwise","labelContext","MAX_SAFE_INTEGER","groupedByOutput","outputLookup","sortedLabels","outputIndex","coerceLabel","Case","branches","Slice","beginIndex","endIndex","isComparableType","eqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","hasUntypedArgument","Comparison","lt","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","NumberFormat","currency","minFractionDigits","maxFractionDigits","minimumFractionDigits","Length","expressions","varargs","isFunction","ref","typeToString","pitch","heatmapDensity","lineProgress","skyRadialProgress","accumulated","E","LN10","isSupportedScript","toUpperCase","StyleExpression","_warningHistory","_evaluator","_defaultValue","spec","getDefaultValue","_enumValues","createExpression","enum","formatted","resolvedImage","getExpectedType","evaluateWithoutErrorHandling","ZoomConstantExpression","_styleExpression","isStateDependent","ZoomDependentExpression","interpolationType","createPropertyExpression","supportsPropertyExpression","isZoomConstant","supportsZoomExpression","zoomCurve","findZoomCurve","supportsInterpolation","childResult","deepUnbundle","unbundledValue","valueOf","unbundle","isExpressionFilter","createFilter","layerType","needGeometry","needFeature","convertFilter","filterExp","staticFilter","isDynamicFilter","unionDynamicBranches","collapseDynamicBooleanExpressions","extractStaticFilter","filterSpec","latest","compiledStaticFilter","filterFunc","globalProperties","dynamicFilterFunc","compiledDynamicFilter","dynamicFilter","geometryNeeded","dynamicConditionExpressions","collapsedExpression","subExpression","isBranchingDynamically","filters","convertComparisonOp","convertNegation","convertInOp","convertHasOp","deref","refProperties","fontWeights","thin","hairline","light","book","regular","normal","plain","roman","standard","medium","bold","heavy","fat","poster","sp","italicRE","fontCache","cssData","fontFamilies","maybeWeight","previousPart","mapboxBaseUrl","getMapboxPath","normalizeStyleUrl","token","mapboxPath","decodeURI","normalizeSourceUrl","tokenParam","styleUrl","urlObject","searchParams","defaultResolutions","createCanvas","pendingRequests","fetchResource","resourceType","transformRequest","Request","pendingRequest","getGlStyle","glStyleOrUrl","accessToken","glStyle","tilejsonCache","getTileJson","glSource","normalizedSourceUrl","accessTokenParam","tileJson","normalizedTileUrl","transformedRequest","hairSpacePool","applyLetterSpacing","letterSpacing","textWithLetterSpacing","joinSpaceString","getMeasureContext","measureCache","wrapText","em","hardLines","wrappedText","words","maxWidth","word","testLine","prevWidth","nextWidth","lineWords","lastWord","loadedFontFamilies","fontFamilyRegEx","stripQuotesRegEx","hasFontFamily","styleSheets","styleSheet","cssRules","rules","cssRule","cssText","processedFontFamilies","getFonts","fontsKey","googleFontDescriptions","cssFont","mb2css","googleFontDescription","fontUrl","querySelector","markup","renderFeatureCoordinates","emptyObj","zoomObj","getValue","layoutOrPaint","functionCache","layerId","isExpr","compiledExpression","rawExpression","expressionData","getIconDeclutterMode","evaluateFilter","filterCache","renderTransparentEnabled","colorWithOpacity","templateRegEx","fromTemplate","recordLayer","stylefunction","olLayer","sourceOrLayers","spriteData","spriteImageUrl","spriteImage","spriteImgSize","action","mapboxSource","allLayers","derefLayers","layersBySourceLayer","mapboxLayers","patternCache","sourceLayer","textHalo","featureBelongsToLayer","stylesLength","layerData","paint","visibility","minzoom","maxzoom","strokeColor","fillIcon","icon","setZIndex","icon_cache_key","spriteImageData","createPattern","setWidth","setLineCap","setLineJoin","setMiterLimit","hasImage","placementAngle","iconImg","skipLabel","styleGeom","iconRotationAlignment","iconSize","iconColor","setAnchor","circleRadius","circleStrokeColor","circleColor","circleStrokeWidth","cache_key","Circle","textLineHeight","textSize","maxTextWidth","fontArray","textField","chunkFont","textTransform","wrappedLabel","setFont","textAnchor","setPlacement","setOverflow","textHaloWidth","textOffset","textTranslate","vOffset","hOffset","setTextAlign","textRotationAlignment","setRotateWithView","setMaxAngle","setTextBaseline","setOffsetX","setOffsetY","setFill","haloColor","halfTextSize","setStroke","textPadding","completeOptions","applyStyle","optionsOrPath","sourceId","assignSource","setupVectorSource","targetSource","getTileUrlFunction","getTileLoadFunction","setTileLoadFunction","setMaxResolution","setupGeoJSONSource","onChange","sprite","applyStyleFunction","normalizeSpriteUrl","sizeFactor","spriteUrl","pathname","spritesJson","mapOrLayer","updateStyle","bg","_colorWithOpacity","setFirstBackground","extentFromTileJSON","bounds","tr","tileJSONSource","tileJSONDoc","getTileJSON","olSourceOptions","VectorTileSource","geoJsonFormat","geoJsonUrl","encodeURI","ErrorEvent","applyBackground","imageRatio","imageRatio_","VectorImageLayer","parseResult_","styleVariables_","hitDetectionDisabled_","disableHitDetection","WebGLPointsLayer","getSymbolVertexShader","getSymbolFragmentShader","parseStyle","pipeline","contrast","exposure","saturation","gamma","brightness","numVariables","uniformDeclarations","functionDefintions","sources_","renderedSource_","handleSourceUpdate_","WebGLTileLayer","parsedStyle","getSourceBandCount_","onChange_1","renderSources","altSources","DragAndDropEventType","readAsBuffer_","formats_","formatConstructors","dropListenKeys_","source_","DragAndDrop","tryReadFeatures_","DragAndDropEvent","dropArea","handleDrop","handleStop","registerListeners_","unregisterListeners_","files","dataTransfer","handleResult_","readAsText","dropEffect","lastMagnitude_","DragRotateAndZoom","magnitude","angleDelta","setCenterAndRadius","getRadiusSquared_","DrawEventType","shouldHandle_","downPx_","downTimeout_","lastDragTime_","pointerType_","freehand_","snapTolerance_","snapTolerance","getMode","stopClick_","stopClick","minPoints_","minPoints","maxPoints_","maxPoints","finishCondition_","finishCondition","geometryLayout_","geometryLayout","Constructor_1","mode_1","squaredLength","squaredCoordinateDistance","dragVertexDelay_","dragVertexDelay","finishCoordinate_","sketchFeature_","sketchPoint_","sketchCoords_","sketchLine_","sketchLineCoords_","squaredClickTolerance_","clickTolerance","overlay_","freehandCondition_","freehand","freehandCondition","updateState_","Draw","move","addToDrawing_","getPointerCount","startDrawing_","startingToDraw","finishDrawing","atFinish_","abortDrawing","downPx","clickPx","modifyDrawing_","createOrUpdateSketchPoint_","at","potentiallyDone","potentiallyFinishCoordinates","mode","sketchCoords","finishCoordinate","finishPixel","updateSketchFeatures_","getLinearRing","sketchLineGeom","DrawEvent","createOrUpdateCustomSketchLine_","sketchFeature","abortDrawing_","newDrawing","ending","sketchFeatures","overlaySource","ExtentEventType","getDefaultPointerStyleFunction","getPointHandler","fixedPoint","getEdgeHandler","fixedP1","fixedP2","pointerHandler_","pixelTolerance_","pixelTolerance","snappedToVertex_","extentFeature_","vertexFeature_","extentOverlay_","boxStyle","vertexOverlay_","pointerStyle","Extent","pixelCoordinate","getExtentInternal","segments","getSegments","closestSegment","vertex","vertexPixel","coordinateDistance","pixel1","pixel2","squaredDist1","squaredDist2","dist","snapToVertex_","createOrUpdatePointerFeature_","extentFeature","vertexFeature","getOpposingPoint","x_","y_","createOrUpdateExtentFeature_","ExtentEvent","readNumber","writeNumber","to5","differentNumber","animationOptions","prefix","animationOptions_","replace_","prefix_","initial_","Link","getParamName_","oldMap","updateUrl_","handleChangeLayerGroup_","delete_","history","replaceState","updateView","viewProperties","get_","getAllLayers","layersParam","visibilities","set_","pushState","tempExtent","tempSegment","ModifyEventType","compareIndexes","projectedDistanceToSegmentDataSquared","pointCoordinates","segmentData","distanceToCenterSquared","distanceToCircumference","closestOnSegmentData","boundHandleFeatureChange_","defaultDeleteCondition_","deleteCondition_","deleteCondition","insertVertexCondition_","insertVertexCondition","vertexSegments_","lastPixel_","ignoreNextSingleClick_","featuresBeingModified_","rBush_","changingFeature_","dragSegments_","SEGMENT_WRITERS_","writePointGeometry_","writeLineStringGeometry_","writePolygonGeometry_","writeMultiPointGeometry_","writeMultiLineStringGeometry_","writeMultiPolygonGeometry_","writeCircleGeometry_","writeGeometryCollectionGeometry_","hitDetection_","handleSourceAdd_","handleSourceRemove_","addFeature_","handleFeatureAdd_","handleFeatureRemove_","lastPointerEvent_","snapToPointer_","snapToPointer","Modify","writer","handlePointerAtPixel_","ss","ModifyEvent","removeFeatureSegmentData_","rBush","nodesToRemove","nodeToRemove","removeFeature_","centerSegmentData","circumferenceSegmentData","featureSegments","removePoint","willModifyFeatures_","dragSegment","setGeometryCoordinates_","createOrUpdateVertexFeature_","insertVertices","vertexExtent","segmentDataMatches","componentSegments","segmentDataMatch","insertVertex_","opt_coordinate","nodes","hitPointGeometry","vertexSegments","geometryUid","rTree","updateSegmentIndices_","newSegmentData","newSegmentData2","removeVertex_","component","newIndex","dragSegments","segmentsByFeature","deleted","SelectEventType","selected","deselected","originalFeatureStyles","boundAddFeature_","boundRemoveFeature_","addCondition_","addCondition","removeCondition_","removeCondition","toggleCondition_","toggleCondition","multi_","multi","filter_","hitTolerance_","layers_1","layerFilter_","featureLayerAssociation_","Select","restorePreviousStyle_","applySelectedStyle_","hasFeature","addFeatureLayerAssociation_","removeFeatureLayerAssociation_","SelectEvent","getFeatureFromEvent","vertex_","edge_","featuresListenerKeys_","featureChangeListenerKeys_","indexedFeaturesExtents_","pendingFeatures_","GEOMETRY_SEGMENTERS_","segmentPointGeometry_","segmentLineStringGeometry_","segmentPolygonGeometry_","segmentMultiPointGeometry_","segmentMultiLineStringGeometry_","segmentMultiPolygonGeometry_","segmentGeometryCollectionGeometry_","segmentCircleGeometry_","Snap","opt_listen","feature_uid","segmenter","segmentsData","snapTo","updateFeature_","featuresToUpdate","opt_unlisten","unregister","nodesToRemove_1","currentMap","getFeatures_","forEachFeatureRemove_","forEachFeatureAdd_","segmentsLength","closestVertex","projectedCoordinate","squaredPixelTolerance","getResult","tempVertexCoord","segmentStart","segmentEnd","TranslateEventType","startCoordinate","lastCoordinate_","startCoordinate_","lastFeature_","handleActiveChanged_","Translate","featuresAtPixel_","TranslateEvent","newCoordinate","deltaX_1","deltaY_1","flipXY","opt_destOffset","destOffset","GEOMETRY_READERS","getGeometryLayout","paths","GEOMETRY_WRITERS","esriJSON","hasZM","getHasZM","hasZ","hasM","esriJSONPolygon","flatRing","outerRings","holes","hole","matched","outerRing","convertRings","_a","_b","geometryReader","geometryWriter","EsriJSON","opt_idField","esriJSONFeature","esriJSONFeatures","objectIdFieldName","wkid","XMLFeature","readFeatureFromDocument","readFeatureFromNode","readFeaturesFromDocument","readFeaturesFromNode","ELEMENT_NODE","readGeometryFromDocument","readGeometryFromNode","readProjectionFromDocument","readProjectionFromNode","writeFeatureNode","serializeToString","writeFeaturesNode","writeGeometryNode","GMLNS","ONLY_WHITESPACE_RE","featureType","featureNS","srsName","schemaLocation","FEATURE_COLLECTION_PARSERS","namespace","readFeaturesInternal","GMLBase","ft","ns","featureTypes","readFeatureElement","GEOMETRY_PARSERS","readGeometryOrExtent","asFeature","readExtentElement","readGeometryElement","readFeatureElementInternal","_content_","fid","readFlatCoordinatesFromNode","MULTIPOINT_PARSERS","MULTILINESTRING_PARSERS","MULTIPOLYGON_PARSERS","POINTMEMBER_PARSERS","LINESTRINGMEMBER_PARSERS","POLYGONMEMBER_PARSERS","GEOMETRY_FLAT_COORDINATES_PARSERS","flatLinearRings","FLAT_LINEAR_RINGS_PARSERS","pointMemberParser","lineStringMemberParser","polygonMemberParser","readLineString","readPolygon","RING_PARSERS","readFlatLinearRing","readBooleanString","readDateTime","dateTime","readDecimal","readDecimalString","readPositiveInteger","readNonNegativeIntegerString","writeBooleanTextNode","bool","writeStringTextNode","writeCDATASection","createCDATASection","writeDateTimeTextNode","date","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","writeDecimalTextNode","toPrecision","writeNonNegativeIntegerTextNode","nonNegativeInteger","MULTIGEOMETRY_TO_MEMBER_NODENAME","GML2","containerSrs","coordsGroups","BOX_PARSERS_","flatLinearRing","multiSurface","surface","multiCurve","writeGeometryElement","createCoordinatesNode_","writeCoordinates_","writeCurveSegments_","GEOMETRY_NODE_FACTORY_","writeCurveOrLineString","getLineStrings","LINESTRINGORCURVEMEMBER_SERIALIZERS","MULTIGEOMETRY_MEMBER_NODE_FACTORY_","GEOMETRY_SERIALIZERS","getCoords_","getLinearRings","RING_SERIALIZERS","RING_NODE_FACTORY_","patches","writeSurfacePatches_","exteriorWritten","writeSurfaceOrPolygon","writeLinearRing","opt_srsName","opt_hasZ","POINTMEMBER_SERIALIZERS","writePoint","getPolygons","SURFACEORPOLYGONMEMBER_SERIALIZERS","ENVELOPE_SERIALIZERS","readFlatCoordinates","innerBoundaryIsParser","outerBoundaryIsParser","readBox","writeMultiCurveOrLineString","writeMultiPoint","writeMultiSurfaceOrPolygon","writeEnvelope","writeLineStringOrCurveMember","writeRing","writePointMember","writeSurfaceOrPolygonMember","surface_","curve_","multiCurve_","multiSurface_","GML3","MULTICURVE_PARSERS","MULTISURFACE_PARSERS","CURVEMEMBER_PARSERS","SURFACEMEMBER_PARSERS","PATCHES_PARSERS","SEGMENTS_PARSERS","SURFACE_PARSERS","CURVE_PARSERS","ENVELOPE_PARSERS","contextDimension","dim","srsDimension","writePos_","posList","writePosList_","writeFeatureElement","setAttributeNS","writeFeatureMembers_","readFlatPos","readFlatPosList","interiorParser","exteriorParser","readSurface","readMultiSurface","readCurve","readMultiCurve","readEnvelope","curveMemberParser","surfaceMemberParser","readPatch","readSegment","readPolygonPatch","readLineStringSegment","readFlatCurveRing","writeFeatures","GML","GML32","NAMESPACE_URIS","FEATURE_READER","readRte","readTrk","readWpt","GPX_PARSERS","LINK_PARSERS","GPX_SERIALIZERS","RTE_SEQUENCE","RTE_SERIALIZERS","TRK_SEQUENCE","TRK_SERIALIZERS","writeWptType","readExtensions_","readExtensions","GPX","extensionsNode","featureReader","handleReadExtensions_","gpx","GPX_NODE_FACTORY","RTE_PARSERS","parseLink","parseExtensions","RTEPT_PARSERS","rteValues","layoutOptions","appendCoordinate","TRK_PARSERS","TRKSEG_PARSERS","TRKPT_PARSERS","trkValues","WPT_PARSERS","LINK_SEQUENCE","LINK_SERIALIZERS","writeLink","RTEPT_TYPE_SEQUENCE","TRKSEG_SERIALIZERS","TRKSEG_NODE_FACTORY","WPT_TYPE_SEQUENCE","WPT_TYPE_SERIALIZERS","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","TextFeature","readFeatureFromText","readFeaturesFromText","readGeometryFromText","readProjectionFromText","writeFeatureText","writeFeaturesText","writeGeometryText","IGCZ","B_RECORD_RE","H_RECORD_RE","HFDTE_RECORD_RE","NEWLINE_RE","altitudeMode_","altitudeMode","IGC","year","month","day","lastDateTime","hour","minute","second","UTC","GX_NAMESPACE_URIS","ICON_ANCHOR_UNITS_MAP","PLACEMARK_PARSERS","extendedDataParser","regionParser","readMultiGeometry","readLinearRing","readPoint","readStyle","styleMapValue","readStyleMapValue","placemarkObject","readStyleURL","GX_MULTITRACK_GEOMETRY_PARSERS","readGxTrack","NETWORK_LINK_PARSERS","readURI","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","scaleForSize","defaultIconUrlFunction","defaultStyle_","defaultStyle","extractStyles_","extractStyles","writeStyles_","writeStyles","sharedStyles_","showPointNames_","showPointNames","iconUrlFunction_","iconUrlFunction","KML","readDocumentOrFolder_","readPlacemark_","readSharedStyle_","readSharedStyleMap_","sharedStyles","drawName","multiGeometryPoints","featureStyle","findStyle","nameStyle","foundStyle","imageScale","setScale","createNameStyleFunction","createFeatureStyleFunction","styleUri","baseURI","fs","readNameFromDocument","readNameFromNode","name_2","networkLinks","readNetworkLinksFromDocument","readNetworkLinksFromNode","regions","readRegionFromDocument","readRegionFromNode","kml","xmlnsUri","styleValue","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","innerBoundaryFlatLinearRings","INNER_BOUNDARY_IS_PARSERS","OUTER_BOUNDARY_IS_PARSERS","STYLE_PARSERS","styleObject","IconObject","drawIcon","hotSpot","imageStyle_1","imageScale_1","listener_1","imageSize_1","resizeScale","outline","hasExtrude","hasTessellate","hasAltitudeMode","extrudes","tessellates","altitudeModes","DATA_PARSERS","EXTENDED_DATA_PARSERS","featureObject","SCHEMA_DATA_PARSERS","writeColorTextNode","abgr","hex","EXTENDEDDATA_NODE_SERIALIZERS","pair","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","NODE_PARSERS","ways","OSMXML","XML","readFromDocument","readFromNode","readHref","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","HTTP_PARSERS","REQUEST_METHOD_PARSERS","OPERATION_PARSERS","SERVICE_CONTACT_PARSERS","encodeDeltas","numbers","opt_factor","lastNumbers","encodeFloats","decodeDeltas","encoded","decodeFloats","encodeSignedIntegers","decodeSignedIntegers","encodeUnsignedIntegers","decodeUnsignedIntegers","encodeUnsignedInteger","factor_","Polyline","TopoJSON","topoJSONTopology","arcs","transformArc","transformArcs","topoJSONFeatures","objectName","readFeaturesFromGeometryCollection","readFeatureFromGeometry","transformVertex","concatenateArcs","polyArray","ringCoords","indices","tagName_","Filter","LogicalNary","Spatial","unit","propertyName","opt_matchCase","matchCase","ComparisonBinary","lowerBoundary","upperBoundary","opt_wildCard","opt_singleChar","opt_escapeChar","wildCard","singleChar","escapeChar","rid","and","And","Bbox","TRANSACTION_SUMMARY_PARSERS","TRANSACTION_RESPONSE_PARSERS","readTransactionSummary","readInsertResults","QUERY_SERIALIZERS","TRANSACTION_SERIALIZERS","writeFeature","writeUpdate","writeDelete","writeProperty","writeNative","FEATURE_PREFIX","XMLNS","OGCNS","WFSNS","FESNS","SCHEMA_LOCATIONS","GML_FORMATS","featureType_","featureNS_","gmlFormat_","gmlFormat","schemaLocation_","WFS","readTransactionResponseFromDocument","readTransactionResponseFromNode","readFeatureCollectionMetadataFromDocument","readFeatureCollectionMetadataFromNode","outputFormat","maxFeatures","resultType","viewParams","featurePrefix","propertyNames","combineBboxAndFilter","writeGetFeature","completeFilter","bboxFilter","bboxFilterFn","andFilterFn","inserts","updates","deletes","baseObj","gmlOptions","gmlVersion","createTransactionRequest","serializeTransactionRequest","nativeElements","OGC_FID_PARSERS","fidParser","INSERT_RESULTS_PARSERS","writeOgcFidFilter","getTypeName","typeName","nativeElement","vendorId","safeToIgnore","GETFEATURE_SERIALIZERS","writeQuery","writeDuringFilter","writeLogicalFilter","writeNotFilter","writeBboxFilter","writeSpatialFilter","writeDWithinFilter","writeComparisonFilter","writeIsNullFilter","writeIsBetweenFilter","writeIsLikeFilter","typeNameAttr","getFilterNS","writeFilterCondition","getTagName","writePropertyName","writeExpression","timePeriod","writeTimeInstant","writeLiteral","timeInstant","timePosition","WKBGeometryType","view_","pos_","initialized_","isLittleEndian_","hasZ_","hasM_","srid_","layout_","WkbReader","isLittleEndian","numPoints","numRings","expectedTypeId","wkbType","wkbTypeThousandth","hasSRID","typeId","readMultiPoint","readMultiLineString","readMultiPolygon","readGeometryCollection","readWkbPayload","readWkbHeader","readWkbCollection","readWkbBlock","isEWKB_","ewkb","writeQueue_","nodata_","X","Y","Z","WkbWriter","coordsObj","axis","_i","writeUint32","writeLineString","writeUint8","writeWkbHeader","geoms","findMinimumLayout","wkblut","geomType","writeMultiLineString","writeMultiPolygon","writeGeometryCollection","setUint8","setUint32","setFloat64","getDataView","decodeHexString","splitCollection","viewCache_","hex_","littleEndian_","ewkb_","nodataZ_","nodataZ","nodataM_","nodataM","WKB","getSrid","getBuffer","encodeHexString","GeometryConstructor","EMPTY","TokenType","wktTypeLookup","wkt","index_","Lexer","opt_decimal","nextChar_","isNumeric_","readNumber_","isAlpha_","readText_","isWhiteSpace_","nextToken","scientificNotation","lexer","lexer_","token_","Parser","isMatch","isTokenType","consume_","parseGeometry_","dimToken","dimInfo","formatErrorMessage_","parsePoint_","parsePointList_","parseLineStringTextList_","parsePointTextList_","parsePolygonTextList_","parsePointText_","parseLineStringText_","parsePolygonText_","parseGeometryLayout_","isEmptyGeometry_","parseGeometryCollectionText_","parseMultiPointText_","parseMultiLineStringText_","parseMultiPolygonText_","splitCollection_","WKT","parse_","encode","encodePointGeometry","encodeLineStringGeometry","encodePolygonGeometry","GeometryEncoder","components","enc","geometryEncoder","wktType","encodeGeometryLayout","SERVICE_PARSERS","CAPABILITY_PARSERS","REQUEST_PARSERS","EXCEPTION_PARSERS","layerObject","LAYER_PARSERS","readLayer","WMSCapabilities","wmsCapabilityObject","readKeywordList","CONTACT_INFORMATION_PARSERS","CONTACT_PERSON_PARSERS","CONTACT_ADDRESS_PARSERS","geographicBoundingBox","EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS","westBoundLongitude","southBoundLatitude","eastBoundLongitude","northBoundLatitude","ATTRIBUTION_PARSERS","authorityObject","readFormatOnlineresource","metadataObject","readSizedFormatOnlineresource","readOperationType","OPERATIONTYPE_PARSERS","DCPTYPE_PARSERS","FORMAT_ONLINERESOURCE_PARSERS","KEYWORDLIST_PARSERS","parentLayerObject","queryable","cascaded","noSubsets","fixedWidth","fixedHeight","childValue","parentValue","formatOnlineresource","WMSGetFeatureInfo","layerElement","layerFeatures","gmlFeatures","readFeatures_","OWS_NAMESPACE_URIS","CONTENTS_PARSERS","owsParser_","WMTSCapabilities","WMTSCapabilityObject","TMS_PARSERS","isDefault","TMS_LINKS_PARSERS","DIMENSION_PARSERS","readBoundingBox","legend","TMS_LIMITS_LIST_PARSERS","TMS_LIMITS_PARSERS","WGS84_BBOX_READERS","readCoordinates","TM_PARSERS","events","FullScreenEventType","isFullScreenSupported","requestFullscreen","fullscreenEnabled","isFullScreen","fullscreenElement","requestFullScreen","isInFullscreen_","boundHandleMapTargetChange_","handleMapTargetChange_","cssClassName_","documentListeners_","activeClassName_","activeClassName","inactiveClassName_","inactiveClassName","labelNode_","labelActive","labelActiveNode_","button_","setClassName_","FullScreen","handleFullScreen_","exitFullscreen","exitFullScreen","requestFullScreenWithKeys","wasInFullscreen","fullscreen","_c","_d","handleFullScreenChange_","PROJECTION","COORDINATE_FORMAT","coordinateFormat","setCoordinateFormat","renderOnMouseOut","placeholder","undefinedHTML","placeholder_","renderOnMouseOut_","renderedHTML_","mapProjection_","MousePosition","updateHTML_","handleMouseMove","handleMouseOut","html","getCoordinateFormat","MAX_RATIO","MIN_RATIO","ControlledMap","boundHandleRotationChanged_","handleRotationChanged_","viewExtent_","ovmapDiv_","ovmap_","ovmap","addLayer","boxSizing","boxOverlay_","addOverlay","overlayBox","mousePosition","getEventCoordinateInternal","endMoving","OverviewMap","oldView","unbindView_","handleMapPropertyChange_","bindView_","resetExtent_","updateBoxAfterOvmapIsRendered_","newView","equalsExtent","ovmapSize","ovextent","topLeftPixel","bottomRightPixel","boxWidth","boxHeight","ovmapWidth","ovmapHeight","recenter_","ovview","ovresolution","ovmapPostrenderKey_","updateBox_","validateExtent_","UNITS_PROP","LEADING_DIGITS","DEFAULT_DPI","bar","innerElement_","viewState_","minWidth_","minWidth","maxWidth_","renderedWidth_","handleUnitsChanged_","setUnits","scaleBar_","scaleBarSteps_","scaleBarText_","dpi_","ScaleLine","pointResolutionUnits","ProjUnits","nominalCount","suffix","metersPerDegree","decimalCount","previousCount","previousWidth","previousDecimalCount","createScaleBar","mapScale","getScaleForResolution","scaleSteps","stepWidth","createMarker","createStepText","isLast","lengthString","Direction","currentResolution_","direction_","heightLimit_","widthLimit_","startX_","startY_","thumbSize_","sliderInitialized_","thumbElement","containerElement","handleDraggerStart_","handleDraggerDrag_","handleDraggerEnd_","handleContainerClick_","ZoomSlider","containerWidth","containerHeight","containerStyle","thumb","thumbStyle","thumbWidth","thumbHeight","relativePosition","getRelativePosition_","getResolutionForPosition_","drag","getPositionForResolution_","getResolutionForValueFunction","getValueForResolutionFunction","initSlider_","setThumbPosition_","ZoomToExtent","handleZoomToExtent","ol","$ol$AssertionError","$ol$Collection","_ol_Collection$CollectionEvent","$ol$DataTile","$ol$Disposable","$ol$Feature","_ol_Feature$createStyleFunction","$ol$Geolocation","$ol$Image","_ol_Image$listenImage","$ol$ImageBase","$ol$ImageCanvas","$ol$ImageTile","$ol$Kinetic","$ol$Map","$ol$MapBrowserEvent","$ol$MapBrowserEventHandler","$ol$MapEvent","$ol$Object","_ol_Object$ObjectEvent","$ol$Observable","_ol_Observable$unByKey","$ol$Overlay","$ol$PluggableMap","$ol$Tile","$ol$TileCache","$ol$TileQueue","_ol_TileQueue$getTilePriority","$ol$TileRange","_ol_TileRange$createOrUpdate","$ol$VectorRenderTile","$ol$VectorTile","$ol$View","_ol_View$createCenterConstraint","_ol_View$createResolutionConstraint","_ol_View$createRotationConstraint","_ol_View$isNoopAnimation","_ol_array$binarySearch","_ol_array$equals","_ol_array$extend","_ol_array$find","_ol_array$findIndex","_ol_array$includes","_ol_array$isSorted","_ol_array$linearFindNearest","_ol_array$numberSafeCompareFunction","_ol_array$reverseSubArray","stableSort","compareFnc","asserts","_ol_asserts$assert","centerconstraint","_ol_centerconstraint$createExtent","_ol_centerconstraint$none","_ol_color$asArray","_ol_color$asString","_ol_color$fromString","_ol_color$isStringColor","_ol_color$normalize","_ol_color$toString","colorlike","_ol_colorlike$asColorLike","$ol$control$Attribution","$ol$control$Control","$ol$control$FullScreen","$ol$control$MousePosition","$ol$control$OverviewMap","$ol$control$Rotate","$ol$control$ScaleLine","$ol$control$Zoom","$ol$control$ZoomSlider","$ol$control$ZoomToExtent","_ol_control$defaults","_ol_coordinate$add","_ol_coordinate$closestOnCircle","_ol_coordinate$closestOnSegment","createStringXY","_ol_coordinate$degreesToStringHDMS","_ol_coordinate$distance","_ol_coordinate$equals","_ol_coordinate$format","_ol_coordinate$getWorldsAway","_ol_coordinate$rotate","_ol_coordinate$scale","_ol_coordinate$squaredDistance","_ol_coordinate$squaredDistanceToSegment","toStringHDMS","_ol_coordinate$toStringXY","_ol_coordinate$wrapX","css","_ol_css$CLASS_COLLAPSED","_ol_css$CLASS_CONTROL","_ol_css$CLASS_HIDDEN","_ol_css$CLASS_SELECTABLE","_ol_css$CLASS_UNSELECTABLE","_ol_css$CLASS_UNSUPPORTED","_ol_css$getFontParameters","dom","_ol_dom$createCanvasContext2D","_ol_dom$outerHeight","_ol_dom$outerWidth","_ol_dom$releaseCanvas","_ol_dom$removeChildren","_ol_dom$removeNode","_ol_dom$replaceChildren","_ol_dom$replaceNode","_ol_easing$easeIn","_ol_easing$easeOut","_ol_easing$inAndOut","_ol_easing$linear","upAndDown","$ol$events$Event","_ol_events_Event$stopPropagation","$ol$events$Target","_ol_events_condition$all","_ol_events_condition$altKeyOnly","_ol_events_condition$altShiftKeysOnly","_ol_events_condition$always","click","doubleClick","_ol_events_condition$focus","_ol_events_condition$focusWithTabindex","_ol_events_condition$mouseActionButton","_ol_events_condition$mouseOnly","_ol_events_condition$never","_ol_events_condition$noModifierKeys","penOnly","pointerEvt","platformModifierKeyOnly","pointerMove","_ol_events_condition$primaryAction","_ol_events_condition$shiftKeyOnly","_ol_events_condition$singleClick","_ol_events_condition$targetNotEditable","touchOnly","_ol_events$listen","_ol_events$listenOnce","_ol_events$unlistenByKey","_ol_extent$applyTransform","_ol_extent$approximatelyEquals","_ol_extent$boundingExtent","_ol_extent$buffer","_ol_extent$clone","_ol_extent$closestSquaredDistanceXY","_ol_extent$containsCoordinate","_ol_extent$containsExtent","_ol_extent$containsXY","_ol_extent$coordinateRelationship","_ol_extent$createEmpty","_ol_extent$createOrUpdate","_ol_extent$createOrUpdateEmpty","_ol_extent$createOrUpdateFromCoordinate","createOrUpdateFromCoordinates","_ol_extent$createOrUpdateFromFlatCoordinates","createOrUpdateFromRings","_ol_extent$equals","_ol_extent$extend","_ol_extent$extendCoordinate","_ol_extent$extendCoordinates","_ol_extent$extendFlatCoordinates","_ol_extent$extendRings","_ol_extent$extendXY","_ol_extent$forEachCorner","_ol_extent$getArea","_ol_extent$getBottomLeft","_ol_extent$getBottomRight","_ol_extent$getCenter","_ol_extent$getCorner","getEnlargedArea","_ol_extent$getForViewAndSize","_ol_extent$getHeight","_ol_extent$getIntersection","getIntersectionArea","getMargin","_ol_extent$getRotatedViewport","_ol_extent$getTopLeft","_ol_extent$getTopRight","_ol_extent$getWidth","_ol_extent$intersects","_ol_extent$intersectsSegment","_ol_extent$isEmpty","_ol_extent$returnOrUpdate","_ol_extent$scaleFromCenter","_ol_extent$wrapAndSliceX","_ol_extent$wrapX","featureloader","_ol_featureloader$loadFeaturesXhr","setWithCredentials","xhrWithCredentials","_ol_featureloader$xhr","$ol$format$EsriJSON","$ol$format$Feature","_ol_format_Feature$transformExtentWithOptions","_ol_format_Feature$transformGeometryWithOptions","$ol$format$GML","$ol$format$GML2","$ol$format$GML3","$ol$format$GML32","$ol$format$GMLBase","_ol_format_GMLBase$GMLNS","$ol$format$GPX","$ol$format$GeoJSON","$ol$format$IGC","$ol$format$IIIFInfo","$ol$format$JSONFeature","$ol$format$KML","getDefaultFillStyle","getDefaultImageStyle","getDefaultStrokeStyle","getDefaultStyle","getDefaultStyleArray","getDefaultTextStyle","_ol_format_KML$readFlatCoordinates","$ol$format$MVT","$ol$format$OSMXML","$ol$format$OWS","$ol$format$Polyline","_ol_format_Polyline$decodeDeltas","_ol_format_Polyline$decodeFloats","_ol_format_Polyline$decodeSignedIntegers","_ol_format_Polyline$decodeUnsignedIntegers","_ol_format_Polyline$encodeDeltas","_ol_format_Polyline$encodeFloats","_ol_format_Polyline$encodeSignedIntegers","_ol_format_Polyline$encodeUnsignedInteger","_ol_format_Polyline$encodeUnsignedIntegers","$ol$format$TextFeature","$ol$format$TopoJSON","$ol$format$WFS","writeFilter","opt_version","$ol$format$WKB","$ol$format$WKT","$ol$format$WMSCapabilities","$ol$format$WMSGetFeatureInfo","$ol$format$WMTSCapabilities","$ol$format$XML","$ol$format$XMLFeature","$ol$format$filter$And","$ol$format$filter$Bbox","$ol$format$filter$Comparison","$ol$format$filter$ComparisonBinary","Contains","$ol$format$filter$Contains","DWithin","$ol$format$filter$DWithin","Disjoint","$ol$format$filter$Disjoint","During","$ol$format$filter$During","EqualTo","$ol$format$filter$EqualTo","$ol$format$filter$Filter","$ol$format$filter$GreaterThan","GreaterThanOrEqualTo","$ol$format$filter$GreaterThanOrEqualTo","Intersects","$ol$format$filter$Intersects","IsBetween","$ol$format$filter$IsBetween","IsLike","$ol$format$filter$IsLike","IsNull","$ol$format$filter$IsNull","$ol$format$filter$LessThan","LessThanOrEqualTo","$ol$format$filter$LessThanOrEqualTo","$ol$format$filter$LogicalNary","Not","$ol$format$filter$Not","NotEqualTo","$ol$format$filter$NotEqualTo","Or","$ol$format$filter$Or","ResourceId","$ol$format$filter$ResourceId","$ol$format$filter$Spatial","$ol$format$filter$Within","_ol_format_filter$and","_ol_format_filter$bbox","between","disjoint","during","dwithin","equalTo","greaterThan","greaterThanOrEqualTo","isNull","lessThan","lessThanOrEqualTo","like","not","notEqualTo","or","resourceId","within","xlink","_ol_format_xlink$readHref","xsd","_ol_format_xsd$readBoolean","_ol_format_xsd$readBooleanString","_ol_format_xsd$readDateTime","_ol_format_xsd$readDecimal","_ol_format_xsd$readDecimalString","_ol_format_xsd$readNonNegativeIntegerString","_ol_format_xsd$readPositiveInteger","_ol_format_xsd$readString","_ol_format_xsd$writeBooleanTextNode","_ol_format_xsd$writeCDATASection","_ol_format_xsd$writeDateTimeTextNode","_ol_format_xsd$writeDecimalTextNode","_ol_format_xsd$writeNonNegativeIntegerTextNode","_ol_format_xsd$writeStringTextNode","_ol_functions$FALSE","_ol_functions$TRUE","_ol_functions$VOID","_ol_functions$memoizeOne","_ol_functions$toPromise","$ol$geom$Circle","$ol$geom$Geometry","$ol$geom$GeometryCollection","$ol$geom$LineString","$ol$geom$LinearRing","$ol$geom$MultiLineString","$ol$geom$MultiPoint","$ol$geom$MultiPolygon","$ol$geom$Point","$ol$geom$Polygon","_ol_geom_Polygon$circular","_ol_geom_Polygon$fromCircle","_ol_geom_Polygon$fromExtent","_ol_geom_Polygon$makeRegular","$ol$geom$SimpleGeometry","_ol_geom_SimpleGeometry$getStrideForLayout","_ol_geom_SimpleGeometry$transformGeom2D","_ol_geom_flat_area$linearRing","_ol_geom_flat_area$linearRings","_ol_geom_flat_area$linearRingss","_ol_geom_flat_center$linearRingss","closest","_ol_geom_flat_closest$arrayMaxSquaredDelta","_ol_geom_flat_closest$assignClosestArrayPoint","_ol_geom_flat_closest$assignClosestMultiArrayPoint","_ol_geom_flat_closest$assignClosestPoint","_ol_geom_flat_closest$maxSquaredDelta","_ol_geom_flat_closest$multiArrayMaxSquaredDelta","_ol_geom_flat_contains$linearRingContainsExtent","_ol_geom_flat_contains$linearRingContainsXY","_ol_geom_flat_contains$linearRingsContainsXY","_ol_geom_flat_contains$linearRingssContainsXY","deflate","_ol_geom_flat_deflate$deflateCoordinate","_ol_geom_flat_deflate$deflateCoordinates","_ol_geom_flat_deflate$deflateCoordinatesArray","_ol_geom_flat_deflate$deflateMultiCoordinatesArray","flip","_ol_geom_flat_flip$flipXY","geodesic","greatCircleArc","geoProjection","cosLat1","sinLat1","cosLat2","sinLat2","cosDeltaLon","sinDeltaLon","D","cosD","sinD","_ol_geom_flat_geodesic$meridian","_ol_geom_flat_geodesic$parallel","inflate","_ol_geom_flat_inflate$inflateCoordinates","_ol_geom_flat_inflate$inflateCoordinatesArray","_ol_geom_flat_inflate$inflateMultiCoordinatesArray","interiorpoint","_ol_geom_flat_interiorpoint$getInteriorPointOfArray","_ol_geom_flat_interiorpoint$getInteriorPointsOfMultiArray","_ol_geom_flat_interpolate$interpolatePoint","_ol_geom_flat_interpolate$lineStringCoordinateAtM","_ol_geom_flat_interpolate$lineStringsCoordinateAtM","intersectsextent","_ol_geom_flat_intersectsextent$intersectsLineString","_ol_geom_flat_intersectsextent$intersectsLineStringArray","_ol_geom_flat_intersectsextent$intersectsLinearRing","_ol_geom_flat_intersectsextent$intersectsLinearRingArray","_ol_geom_flat_intersectsextent$intersectsLinearRingMultiArray","_ol_geom_flat_length$lineStringLength","linearRingLength","perimeter","orient","_ol_geom_flat_orient$inflateEnds","_ol_geom_flat_orient$linearRingIsClockwise","_ol_geom_flat_orient$linearRingsAreOriented","_ol_geom_flat_orient$linearRingssAreOriented","_ol_geom_flat_orient$orientLinearRings","_ol_geom_flat_orient$orientLinearRingsArray","_ol_geom_flat_reverse$coordinates","_ol_geom_flat_segments$forEach","simplify","_ol_geom_flat_simplify$douglasPeucker","_ol_geom_flat_simplify$douglasPeuckerArray","douglasPeuckerMultiArray","_ol_geom_flat_simplify$quantize","_ol_geom_flat_simplify$quantizeArray","_ol_geom_flat_simplify$quantizeMultiArray","_ol_geom_flat_simplify$radialDistance","simplifyLineString","highQuality","opt_simplifiedFlatCoordinates","_ol_geom_flat_simplify$snap","straightchunk","_ol_geom_flat_straightchunk$matchingChunk","textpath","_ol_geom_flat_textpath$drawTextOnPath","topology","lineStringIsClosed","lastCoord","_ol_geom_flat_transform$rotate","_ol_geom_flat_transform$scale","_ol_geom_flat_transform$transform2D","_ol_geom_flat_transform$translate","_ol_has$DEVICE_PIXEL_RATIO","_ol_has$FIREFOX","_ol_has$IMAGE_DECODE","_ol_has$MAC","_ol_has$PASSIVE_EVENT_LISTENERS","_ol_has$SAFARI","_ol_has$SAFARI_BUG_237906","_ol_has$WEBKIT","_ol_has$WORKER_OFFSCREEN_CANVAS","$ol$interaction$DoubleClickZoom","$ol$interaction$DragAndDrop","_ol_interaction_DragAndDrop$DragAndDropEvent","$ol$interaction$DragBox","_ol_interaction_DragBox$DragBoxEvent","$ol$interaction$DragPan","$ol$interaction$DragRotate","$ol$interaction$DragRotateAndZoom","$ol$interaction$DragZoom","$ol$interaction$Draw","_ol_interaction_Draw$DrawEvent","createBox","opt_geometry","boxCoordinates","createRegularPolygon","$ol$interaction$Extent","_ol_interaction_Extent$ExtentEvent","$ol$interaction$Interaction","_ol_interaction_Interaction$pan","_ol_interaction_Interaction$zoomByDelta","$ol$interaction$KeyboardPan","$ol$interaction$KeyboardZoom","$ol$interaction$Link","$ol$interaction$Modify","_ol_interaction_Modify$ModifyEvent","$ol$interaction$MouseWheelZoom","$ol$interaction$PinchRotate","$ol$interaction$PinchZoom","Pointer","$ol$interaction$Pointer","_ol_interaction_Pointer$centroid","$ol$interaction$Select","_ol_interaction_Select$SelectEvent","$ol$interaction$Snap","$ol$interaction$Translate","_ol_interaction_Translate$TranslateEvent","_ol_interaction$defaults","Base","$ol$layer$Base","BaseImage","$ol$layer$BaseImage","BaseTile","$ol$layer$BaseTile","$ol$layer$BaseVector","$ol$layer$Graticule","Group","$ol$layer$Group","_ol_layer_Group$GroupEvent","$ol$layer$Heatmap","$ol$layer$Image","$ol$layer$Layer","_ol_layer_Layer$inView","MapboxVector","$ol$layer$MapboxVector","$ol$layer$Tile","Vector","$ol$layer$Vector","VectorImage","$ol$layer$VectorImage","$ol$layer$VectorTile","WebGLPoints","$ol$layer$WebGLPoints","WebGLTile","$ol$layer$WebGLTile","loadingstrategy","_ol_loadingstrategy$all","math","_ol_math$ceil","_ol_math$clamp","_ol_math$cosh","_ol_math$floor","_ol_math$lerp","_ol_math$log2","_ol_math$modulo","_ol_math$round","_ol_math$solveLinearSystem","_ol_math$squaredDistance","_ol_math$squaredSegmentDistance","_ol_math$toDegrees","_ol_math$toFixed","_ol_math$toRadians","net","_ol_net$ClientError","_ol_net$ResponseError","_ol_net$getJSON","_ol_net$jsonp","overrideXHR","_ol_net$resolveUrl","restoreXHR","_ol_obj$assign","_ol_obj$clear","_ol_obj$getValues","_ol_obj$isEmpty","$ol$proj$Projection","_ol_proj_Units$METERS_PER_UNIT","_ol_proj_Units$fromCode","_ol_proj$addCommon","_ol_proj$addCoordinateTransforms","_ol_proj$addEquivalentProjections","_ol_proj$addEquivalentTransforms","_ol_proj$addProjection","_ol_proj$addProjections","clearAllProjections","clearProj","clearTransformFuncs","clearUserProjection","_ol_proj$cloneTransform","_ol_proj$createProjection","_ol_proj$createSafeCoordinateTransform","_ol_proj$createTransformFromCoordinateTransform","_ol_proj$disableCoordinateWarning","epsg3857","_ol_proj_epsg3857$EXTENT","_ol_proj_epsg3857$HALF_SIZE","_ol_proj_epsg3857$MAX_SAFE_Y","_ol_proj_epsg3857$PROJECTIONS","_ol_proj_epsg3857$RADIUS","_ol_proj_epsg3857$WORLD_EXTENT","_ol_proj_epsg3857$fromEPSG4326","_ol_proj_epsg3857$toEPSG4326","epsg4326","_ol_proj_epsg4326$EXTENT","_ol_proj_epsg4326$METERS_PER_UNIT","_ol_proj_epsg4326$PROJECTIONS","_ol_proj_epsg4326$RADIUS","_ol_proj$equivalent","_ol_proj$fromLonLat","_ol_proj$fromUserCoordinate","_ol_proj$fromUserExtent","_ol_proj$fromUserResolution","_ol_proj$get","_ol_proj$getPointResolution","_ol_proj$getTransform","_ol_proj$getTransformFromProjections","_ol_proj$getUserProjection","_ol_proj$identityTransform","proj4","projCodes","defs","def","projName","to_meter","code1","proj1","code2","proj2","_ol_proj_projections$add","_ol_proj_projections$clear","_ol_proj_projections$get","_ol_proj$setUserProjection","toLonLat","lonLat","_ol_proj$toUserCoordinate","_ol_proj$toUserExtent","_ol_proj$toUserResolution","_ol_proj$transform","_ol_proj$transformExtent","transformWithProjections","_ol_proj_transforms$add","_ol_proj_transforms$clear","_ol_proj_transforms$get","useGeographic","Box","$ol$render$Box","$ol$render$Event","$ol$render$Feature","toFeature","opt_geometryName","_ol_render_Feature$toGeometry","$ol$render$VectorContext","$ol$render$canvas$Builder","$ol$render$canvas$BuilderGroup","$ol$render$canvas$Executor","$ol$render$canvas$ExecutorGroup","_ol_render_canvas_ExecutorGroup$getPixelIndexArray","$ol$render$canvas$ImageBuilder","Immediate","$ol$render$canvas$Immediate","_ol_render_canvas_Instruction$beginPathInstruction","_ol_render_canvas_Instruction$closePathInstruction","_ol_render_canvas_Instruction$fillInstruction","_ol_render_canvas_Instruction$strokeInstruction","$ol$render$canvas$LineStringBuilder","$ol$render$canvas$PolygonBuilder","$ol$render$canvas$TextBuilder","_ol_render_canvas$checkedFonts","_ol_render_canvas$defaultFillStyle","_ol_render_canvas$defaultFont","_ol_render_canvas$defaultLineCap","_ol_render_canvas$defaultLineDash","defaultLineDashOffset","_ol_render_canvas$defaultLineJoin","defaultLineWidth","_ol_render_canvas$defaultMiterLimit","_ol_render_canvas$defaultPadding","_ol_render_canvas$defaultStrokeStyle","_ol_render_canvas$defaultTextAlign","_ol_render_canvas$defaultTextBaseline","_ol_render_canvas$drawImageOrLabel","_ol_render_canvas$getTextDimensions","hitdetect","_ol_render_canvas_hitdetect$HIT_DETECT_RESOLUTION","_ol_render_canvas_hitdetect$createHitDetectionImageData","_ol_render_canvas_hitdetect$hitDetect","_ol_render_canvas$labelCache","_ol_render_canvas$measureAndCacheTextWidth","_ol_render_canvas$measureTextHeight","_ol_render_canvas$measureTextWidth","_ol_render_canvas$registerFont","rotateAtOffset","_ol_render_canvas$textHeights","getRenderPixel","_ol_render$getVectorContext","toContext","Composite","$ol$renderer$Composite","$ol$renderer$Layer","$ol$renderer$Map","$ol$renderer$canvas$ImageLayer","$ol$renderer$canvas$Layer","_ol_renderer_canvas_Layer$canvasPool","$ol$renderer$canvas$TileLayer","$ol$renderer$canvas$VectorImageLayer","$ol$renderer$canvas$VectorLayer","$ol$renderer$canvas$VectorTileLayer","common","_ol_renderer_canvas_common$IMAGE_SMOOTHING_DISABLED","_ol_renderer_canvas_common$IMAGE_SMOOTHING_ENABLED","vector","_ol_renderer_vector$defaultOrder","_ol_renderer_vector$getSquaredTolerance","_ol_renderer_vector$getTolerance","_ol_renderer_vector$renderFeature","webgl","$ol$renderer$webgl$Layer","_ol_renderer_webgl_Layer$colorDecodeId","_ol_renderer_webgl_Layer$colorEncodeId","getBlankImageData","writePointFeatureToBuffers","elementIndex","bufferPositions","customAttrs","vPos","iPos","baseIndex","PointsLayer","$ol$renderer$webgl$PointsLayer","$ol$renderer$webgl$TileLayer","_ol_renderer_webgl_TileLayer$Attributes","_ol_renderer_webgl_TileLayer$Uniforms","reproj","$ol$reproj$Image","$ol$reproj$Tile","$ol$reproj$Triangulation","_ol_reproj$calculateSourceExtentResolution","_ol_reproj$calculateSourceResolution","_ol_reproj$canvasPool","_ol_reproj_common$ENABLE_RASTER_REPROJECTION","ERROR_THRESHOLD","_ol_reproj$render","resolutionconstraint","_ol_resolutionconstraint$createMinMaxResolution","_ol_resolutionconstraint$createSnapToPower","_ol_resolutionconstraint$createSnapToResolutions","rotationconstraint","_ol_rotationconstraint$createSnapToN","_ol_rotationconstraint$createSnapToZero","_ol_rotationconstraint$disable","_ol_rotationconstraint$none","_ol_size$buffer","_ol_size$hasArea","_ol_size$scale","_ol_size$toSize","$ol$source$BingMaps","_ol_source_BingMaps$quadKey","$ol$source$CartoDB","$ol$source$Cluster","$ol$source$DataTile","$ol$source$GeoTIFF","IIIF","$ol$source$IIIF","$ol$source$Image","_ol_source_Image$ImageSourceEvent","_ol_source_Image$defaultImageLoadFunction","$ol$source$ImageArcGISRest","$ol$source$ImageCanvas","$ol$source$ImageMapGuide","ImageStatic","$ol$source$ImageStatic","$ol$source$ImageWMS","$ol$source$OGCMapTile","$ol$source$OGCVectorTile","OSM","$ol$source$OSM","_ol_source_OSM$ATTRIBUTION","Raster","$ol$source$Raster","_ol_source_Raster$Processor","_ol_source_Raster$RasterSourceEvent","_ol_source_Raster$newImageData","$ol$source$Source","Stamen","$ol$source$Stamen","$ol$source$Tile","_ol_source_Tile$TileSourceEvent","$ol$source$TileArcGISRest","TileDebug","$ol$source$TileDebug","$ol$source$TileImage","$ol$source$TileJSON","$ol$source$TileWMS","$ol$source$UTFGrid","_ol_source_UTFGrid$CustomTile","$ol$source$UrlTile","$ol$source$Vector","_ol_source_Vector$VectorSourceEvent","$ol$source$VectorTile","_ol_source_VectorTile$defaultLoadFunction","$ol$source$WMTS","optionsFromCapabilities","wmtsCap","tileMatrixSets","supportedCRS","matrixSetObj","projConfig","switchXY","TileMatrix","selectedMatrixLimit","MinTileCol","MinTileRow","MaxTileCol","MatrixWidth","MaxTileRow","MatrixHeight","tileMatrixValue","Identifier","ScaleDenominator","TopLeftCorner","tileSpanX","tileSpanY","TileHeight","matrixSetExtent","wgs84BoundingBox","wgs84ProjectionExtent","wgs84MatrixSetExtent","gets","encodings","$ol$source$XYZ","Zoomify","$ol$source$Zoomify","_ol_source_Zoomify$CustomTile","DEFAULT_WMS_VERSION","ogcTileUtil","_ol_source_ogcTileUtil$getMapTileUrlTemplate","_ol_source_ogcTileUtil$getTileSetInfo","_ol_source_ogcTileUtil$getVectorTileUrlTemplate","sourcesFromTileGrid","sourceCache","tileGridExtent","wantedSources","wms","_ol_source_wms$DEFAULT_VERSION","sphere","_ol_sphere$DEFAULT_RADIUS","_ol_sphere$getDistance","_ol_sphere$offset","_ol_string$compareVersions","_ol_string$padNumber","structs","$ol$structs$LRUCache","$ol$structs$LinkedList","$ol$structs$PriorityQueue","_ol_structs_PriorityQueue$DROP","$ol$structs$RBush","$ol$style$Circle","$ol$style$Fill","$ol$style$Icon","$ol$style$IconImage","_ol_style_IconImage$get","$ol$style$IconImageCache","_ol_style_IconImageCache$shared","$ol$style$Image","$ol$style$RegularShape","$ol$style$Stroke","$ol$style$Style","_ol_style_Style$createDefaultStyle","_ol_style_Style$createEditingStyle","_ol_style_Style$toFunction","$ol$style$Text","_ol_style_expressions$Operators","_ol_style_expressions$PALETTE_TEXTURE_ARRAY","_ol_style_expressions$arrayToGlsl","_ol_style_expressions$colorToGlsl","_ol_style_expressions$expressionToGlsl","_ol_style_expressions$getStringNumberEquivalent","_ol_style_expressions$getValueType","_ol_style_expressions$isTypeUnique","_ol_style_expressions$numberToGlsl","_ol_style_expressions$stringToGlsl","_ol_style_expressions$uniformNameForVariable","tilecoord","_ol_tilecoord$createOrUpdate","_ol_tilecoord$fromKey","_ol_tilecoord$getCacheKeyForTileKey","_ol_tilecoord$getKey","_ol_tilecoord$getKeyZXY","_ol_tilecoord$hash","_ol_tilecoord$withinExtentAndZ","$ol$tilegrid$TileGrid","$ol$tilegrid$WMTS","_ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet","_ol_tilegrid_common$DEFAULT_TILE_SIZE","_ol_tilegrid$createForExtent","_ol_tilegrid$createForProjection","_ol_tilegrid$createXYZ","_ol_tilegrid$extentFromProjection","_ol_tilegrid$getForProjection","_ol_tilegrid$wrapX","tileurlfunction","_ol_tileurlfunction$createFromTemplate","_ol_tileurlfunction$createFromTemplates","_ol_tileurlfunction$createFromTileUrlFunctions","_ol_tileurlfunction$expandUrl","_ol_tileurlfunction$nullTileUrlFunction","_ol_transform$apply","_ol_transform$compose","composeCssTransform","_ol_transform$create","_ol_transform$determinant","invert","_ol_transform$makeInverse","_ol_transform$makeScale","_ol_transform$multiply","_ol_transform$reset","_ol_transform$rotate","_ol_transform$scale","_ol_transform$set","_ol_transform$setFromArray","_ol_transform$toString","_ol_transform$translate","_ol_uri$appendParams","util","_ol_util$VERSION","_ol_util$abstract","_ol_util$getUid","vec","_ol_vec_mat4$create","_ol_vec_mat4$fromTransform","_ol_webgl$ARRAY_BUFFER","$ol$webgl$Buffer","_ol_webgl_Buffer$getArrayClassForType","_ol_webgl$DYNAMIC_DRAW","_ol_webgl$ELEMENT_ARRAY_BUFFER","_ol_webgl$FLOAT","Helper","$ol$webgl$Helper","_ol_webgl_Helper$computeAttributesStride","$ol$webgl$PaletteTexture","PostProcessingPass","$ol$webgl$PostProcessingPass","RenderTarget","$ol$webgl$RenderTarget","_ol_webgl$STATIC_DRAW","STREAM_DRAW","_ol_webgl_ShaderBuilder$ShaderBuilder","_ol_webgl_ShaderBuilder$parseLiteralStyle","$ol$webgl$TileTexture","_ol_webgl$getContext","getSupportedExtensions","_ol_xml$OBJECT_PROPERTY_NODE_FACTORY","_ol_xml$XML_SCHEMA_INSTANCE_URI","_ol_xml$createElementNS","_ol_xml$getAllTextContent","_ol_xml$getAllTextContent_","_ol_xml$getAttributeNS","_ol_xml$getDocument","_ol_xml$getXMLSerializer","_ol_xml$isDocument","_ol_xml$makeArrayExtender","_ol_xml$makeArrayPusher","_ol_xml$makeArraySerializer","_ol_xml$makeChildAppender","_ol_xml$makeObjectPropertyPusher","_ol_xml$makeObjectPropertySetter","_ol_xml$makeReplacer","_ol_xml$makeSequence","_ol_xml$makeSimpleNodeFactory","_ol_xml$makeStructureNS","_ol_xml$parse","_ol_xml$parseNode","_ol_xml$pushParseAndPop","_ol_xml$pushSerializeAndPop","registerDocument","registerXMLSerializer","xmlSerializer","_ol_xml$serialize","fieldTags","StripRowCounts","SubIFDs","fieldTypeNames","WhiteIsZero","BlackIsZero","Palette","TransparencyMask","CMYK","YCbCr","CIELab","ICCLab","Unspecified","Assocalpha","Unassalpha","LercParameters","Version","AddCompression","LercAddCompression","None","Deflate","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","chunkId","prop","needAttach","scripts","getElementsByTagName","charset","nc","onScriptComplete","doneFns","scriptUrl","importScripts","currentScript","installedChunks","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
diff --git a/VIPSWeb/static/js/frontpageMap.js b/VIPSWeb/static/js/frontpageMap.js
index d3a1dbe733e81feec5c74a9c78dd2bb39bf9d30e..87adaa4992c6d64e6b2c3630dad66aa7185324e0 100755
--- a/VIPSWeb/static/js/frontpageMap.js
+++ b/VIPSWeb/static/js/frontpageMap.js
@@ -85,12 +85,8 @@ function initFrontpageMap(lonLat, zoomLevel, mapAttribution)
 	// ---------- Background layer is OpenStreetMap --------------
 	var backgroundLayer = new ol.layer.Tile({
 	   	 	source: new ol.source.OSM({
-	   	 					attributions: [
-                               new ol.Attribution({
-                                 html: mapAttribution
-                               })
-                             ]
-                       })
+				attributions: [mapAttribution]
+				})
 	    });
 	// Bing Maps example
 	/*var backgroundLayer = new ol.layer.Tile({
@@ -126,17 +122,14 @@ function initFrontpageMap(lonLat, zoomLevel, mapAttribution)
 			target: 'map',
 			layers: [backgroundLayer, forecastLayer, observationLayer],
 			overlays: [popOverlay],
-			renderer: 'canvas'
+			renderer: 'canvas',
+			view: new ol.View({
+				center: ol.proj.fromLonLat(lonLat, 'EPSG:3857'),
+				zoom:zoomLevel,
+				maxZoom: getSelectedMapLayer() == FORECAST_LAYER ? maxMapZoomForForecasts : maxMapZoomForObservations
+			})
 	});
 
-	// Setting zoom and center for the map (need to do this after creating map. so that we can transform our
-	// center to correct map projection)
-	var view = new ol.View({
-		center: ol.proj.transform(lonLat, 'EPSG:4326', map.getView().getProjection().getCode()),
-		zoom:zoomLevel,
-		maxZoom: getSelectedMapLayer() == FORECAST_LAYER ? maxMapZoomForForecasts : maxMapZoomForObservations 
-	});
-	
 	// Getting data and rendering the selected layer
 	selectMapLayer(getSelectedMapLayer());
 	/*if(getSelectedMapLayer() == FORECAST_LAYER)
@@ -148,8 +141,6 @@ function initFrontpageMap(lonLat, zoomLevel, mapAttribution)
 		initObservationLayer();
 	}*/
 	
-	map.setView(view);
-	
 	// Attempting to adjust map to small screen
 	if(map.getSize()[0] < 500)
 	{
@@ -161,19 +152,19 @@ function initFrontpageMap(lonLat, zoomLevel, mapAttribution)
 	
 	// On mouseover, display name of POI in tooltip
     // TODO: Does this work? Doesn't seem so
-	map.on('mousemove', function(evt) {
+	map.on('mousemove', (evt) => {
 		  var pixel = map.getEventPixel(evt.originalEvent);
 		  displayFeatureName(pixel);
 		});
 	
 	// On click, display forecasts in popup
-	map.on('singleclick', function(evt) {
+	map.on('singleclick', (evt) => {
 		var pixel = map.getEventPixel(evt.originalEvent);
 		var coordinate = map.getEventCoordinate(evt.originalEvent);
 		  displayFeatureDetails(pixel, coordinate);
 		});
 	
-	map.on('moveend', function(evt) {
+	map.on('moveend', (evt) => {
 		updateForecastSummaries();
 		// Store map settings
 		var centerCoordinate = ol.proj.transform(map.getView().getCenter(), map.getView().getProjection().getCode(),'EPSG:4326');
diff --git a/VIPSWeb/static/js/weatherStationSelectorMap.js b/VIPSWeb/static/js/weatherStationSelectorMap.js
index 70f10538d65302f70c40605efadc86ddbad2704b..e101aa14bebb5328dde2293ff9d774f941bb5ee1 100755
--- a/VIPSWeb/static/js/weatherStationSelectorMap.js
+++ b/VIPSWeb/static/js/weatherStationSelectorMap.js
@@ -43,11 +43,7 @@ function initMap(center, zoomLevel, attribution, organizationId, weatherStationF
     // Background layer is OpenStreetMap
     var backgroundLayer = new ol.layer.Tile({
                     source: new ol.source.OSM({
-                        attributions: [
-                            new ol.Attribution({
-                              html: attribution
-                            })
-                          ]
+                        attributions: [attribution]
                     })
     });
     
@@ -70,24 +66,16 @@ function initMap(center, zoomLevel, attribution, organizationId, weatherStationF
                     target: 'weatherStationSelectionMap',
                     layers: [backgroundLayer,weatherStationLayer],
                     overlays: [popOverlay],
-                    renderer: 'canvas'
-    });
-    
-    var centerPosition = ol.proj.transform(center, 'EPSG:4326', map.getView().getProjection().getCode());
-
-    // Setting zoom and center for the map (need to do this after creating map. so that we kan transform our
-    // center to correct map projection)
-    var view = new ol.View({
-            center: centerPosition,
-            zoom:zoomLevel
+                    renderer: 'canvas',
+                    view: new ol.View({
+                        center: ol.proj.fromLonLat(center, 'EPSG:3857'),
+                        zoom: zoomLevel
+                    })
     });
-    map.setView(view);
     
     // Using Bootstrap's popover plugin. See http://getbootstrap.com/javascript/#popovers
     var poiDetails = $("#popover");
-    
-    
-    
+
     // Displays popup with forecasts for a given station
     // (if there is a station where the click event is fired)
     var displayFeatureDetails = function(pixel, coordinate) {
@@ -127,7 +115,7 @@ function initMap(center, zoomLevel, attribution, organizationId, weatherStationF
     
 
     // On click, display forecasts in popup
-    map.on('singleclick', function(evt) {
+    map.on('singleclick', (evt) => {
             var pixel = map.getEventPixel(evt.originalEvent);
               displayFeatureDetails(pixel);
             });
diff --git a/applefruitmoth/static/applefruitmoth/js/map.js b/applefruitmoth/static/applefruitmoth/js/map.js
index 159a556163751e2d32e610fe0f28f7d4a0c85a44..623525317a407fe2b2141e3602f92fbf02026864 100755
--- a/applefruitmoth/static/applefruitmoth/js/map.js
+++ b/applefruitmoth/static/applefruitmoth/js/map.js
@@ -23,13 +23,9 @@ var initMap = function(container, mapAttribution)
 {
 	// Creating background layer, Open Street Map is default
 	var backgroundLayer = new ol.layer.Tile({
-   	 	source: new ol.source.OSM({
-   	 					attributions: [
-                           new ol.Attribution({
-                             html: mapAttribution
-                           })
-                         ]
-                   })
+		source: new ol.source.OSM({
+			attributions: [mapAttribution]
+		})
     });
 	
 	forecastLayer = new ol.layer.Vector({
@@ -49,17 +45,13 @@ var initMap = function(container, mapAttribution)
 			target: container,
 			layers: [backgroundLayer, forecastLayer],
 			overlays: [popOverlay],
-			renderer: 'canvas'
-	});
-	
-	// Setting zoom and center for the map (need to do this after creating map. so that we can transform our
-	// center to correct map projection)
-	var view = new ol.View({
-		center: ol.proj.transform([9,61], 'EPSG:4326', map.getView().getProjection().getCode()),
-		zoom: 6
+			renderer: 'canvas',
+            view: new ol.View({
+                center: ol.proj.fromLonLat([9,61], 'EPSG:3857'),
+                zoom: 6
+            })
 	});
-	map.setView(view);
-	
+
 	// Using Bootstrap's popover plugin. See http://getbootstrap.com/javascript/#popovers
 	var poiDetails = $("#popover");
 	
@@ -96,13 +88,13 @@ var initMap = function(container, mapAttribution)
 	      }
 	 };
 	// On click, display forecasts in popup
-		map.on('singleclick', function(evt) {
-			var pixel = map.getEventPixel(evt.originalEvent);
-			  displayFeatureDetails(pixel);
-			});
+	map.on('singleclick', (evt) => {
+		let pixel = map.getEventPixel(evt.originalEvent);
+		displayFeatureDetails(pixel);
+	});
 }
 
 function generatePopupContents(warningStatus, description)
 {
 	return "<img src='" + settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/public/images/station_icon_status_" + warningStatus + ".png'/> " + description;
-}
\ No newline at end of file
+}
diff --git a/ipmd/static/ipmd/js/ipmdlib.js b/ipmd/static/ipmd/js/ipmdlib.js
index 146bd61bee0b0c4742f7dc83659e8f30b0f3261e..7f45505aaad502acb692352abf09c47f3735d3f3 100644
--- a/ipmd/static/ipmd/js/ipmdlib.js
+++ b/ipmd/static/ipmd/js/ipmdlib.js
@@ -670,21 +670,16 @@ async function initDataSourceMap(containerId, geoJson, countryCodeList, featureC
     map = new ol.Map({
             target: containerId,
             layers: [backgroundLayer],
-            renderer: 'canvas'
+            renderer: 'canvas',
+            view: new ol.View({
+                center: ol.proj.fromLonLat([10,65], 'EPSG:3857'),
+                zoom: 7
+            })
     });
 
-
     // Adding it to list of maps, for bookkeeping
     maps[containerId] = map;
 
-    // Setting zoom and center for the map (need to do this after creating map. so that we can transform our
-	// center to correct map projection)
-	var view = new ol.View({
-		center: ol.proj.transform([10,65], 'EPSG:4326', map.getView().getProjection().getCode()),
-		zoom: 7
-	});
-	map.setView(view);
-	
     // Read the datasource's geoJson features
     let drawnFeatures = undefined;
     let features = new ol.Collection();
@@ -753,7 +748,7 @@ async function initDataSourceMap(containerId, geoJson, countryCodeList, featureC
     
         // We add this in order to detect if multiple features were clicked on, since the selectInteraction
         // does not catch that
-        map.on('singleclick', function(evt) {
+        map.on('singleclick', (evt) => {
             var pixel = map.getEventPixel(evt.originalEvent);
             var coordinate = map.getEventCoordinate(evt.originalEvent);
             handleMapClicked(map, featureOverlay, pixel, coordinate, featureClickedCallback);
@@ -1240,4 +1235,4 @@ const weatherParameterList = [
         "unit": "W/sqm",
         "aggregationType": "SUM"
     }
-];
\ No newline at end of file
+];
diff --git a/observations/static/observations/js/observationList.js b/observations/static/observations/js/observationList.js
index 5917232d795c357dc613dcb007f09cbe3066e26d..429409c94105f7afb0eab0a316c320b025f09d4a 100644
--- a/observations/static/observations/js/observationList.js
+++ b/observations/static/observations/js/observationList.js
@@ -74,11 +74,7 @@ var initMap = function(
     // Background layer is OpenStreetMap
     var backgroundLayer = new ol.layer.Tile({
                     source: new ol.source.OSM({
-                        attributions: [
-                            new ol.Attribution({
-                              html: settings.MAP_ATTRIBUTION
-                            })
-                          ]
+                        attributions: [settings.MAP_ATTRIBUTION]
                     })
     });
     
@@ -101,7 +97,12 @@ var initMap = function(
                     target: 'observationMap',
                     layers: [backgroundLayer, observationLayer],
                     overlays: [popOverlay],
-                    renderer: 'canvas'
+                    renderer: 'canvas',
+                    view: new ol.View({
+                        center: ol.proj.fromLonLat(center, 'EPSG:3857'),
+                        zoom:zoomLevel,
+                        maxZoom:7
+                    })
     });
     
     // For some reason, we have to wait with selecting the layer until after the map has
@@ -110,16 +111,6 @@ var initMap = function(
     // Using Bootstrap's popover plugin. See http://getbootstrap.com/javascript/#popovers
     poiDetails = $("#popover");
     
-    // Setting zoom and center for the map (need to do this after creating map. so that we kan transform our
-    // center to correct map projection)
-    var centerPosition = ol.proj.transform(center, 'EPSG:4326', map.getView().getProjection().getCode());
-    var view = new ol.View({
-            center: centerPosition,
-            zoom:zoomLevel,
-            maxZoom:7
-    });
-    map.setView(view);
-    
     // Need to build the query string
     var params = [];
 
@@ -169,7 +160,7 @@ var initMap = function(
 
     // Clicking on a part of the map with one or more features will result in
     // the observation features being displayed
-    map.on('singleclick', function(evt) {
+    map.on('singleclick', (evt) => {
     	var pixel = map.getEventPixel(evt.originalEvent);
 		var coordinate = map.getEventCoordinate(evt.originalEvent);
 		displayFeatureDetails(pixel, coordinate);
@@ -727,4 +718,4 @@ function togglePlay(theButton){
         intervalId = null;
         theButton.innerHTML = '<i class="fa fa-play" aria-hidden="true"></i>';
     }
-}
\ No newline at end of file
+}
diff --git a/observations/static/observations/js/observationViewMap.js b/observations/static/observations/js/observationViewMap.js
index 2e129dc0d6cbe35e87548a0e4e5c85fe3e3229d4..fe70805861d48c29b7c50ec2587710b4954c37d5 100755
--- a/observations/static/observations/js/observationViewMap.js
+++ b/observations/static/observations/js/observationViewMap.js
@@ -27,11 +27,7 @@ var initMap = function(geoJSON, poi, container, mapAttribution)
 {
 	var backgroundLayer = new ol.layer.Tile({
    	 	source: new ol.source.OSM({
-   	 					attributions: [
-                           new ol.Attribution({
-                             html: mapAttribution
-                           })
-                         ]
+   	 					attributions: [mapAttribution]
                    })
     });
 	
@@ -39,22 +35,16 @@ var initMap = function(geoJSON, poi, container, mapAttribution)
 	map = new ol.Map({
 			target: container,
 			layers: [backgroundLayer],
-			renderer: 'canvas'
+			renderer: 'canvas',
+            view: new ol.View({
+                center: ol.proj.fromLonLat([10,65], 'EPSG:3857'),
+				zoom: 7,
+				maxZoom: 7
+            })
 	});
 	
-	// Setting zoom and center for the map (need to do this after creating map. so that we can transform our
-	// center to correct map projection)
-	var view = new ol.View({
-		center: ol.proj.transform([10,65], 'EPSG:4326', map.getView().getProjection().getCode()),
-		zoom: 7,
-		maxZoom: 7
-	});
-	map.setView(view);
-	
 	var features = new ol.Collection();
-	
-	
-	
+
 	if(geoJSON != null)
 	{
 		var featureOverlay = new ol.layer.Vector({
@@ -131,4 +121,4 @@ var initMap = function(geoJSON, poi, container, mapAttribution)
 		    
 		    map.addOverlay(stationMarker);
 	}
-}
\ No newline at end of file
+}
diff --git a/observations/templates/observations/index.html b/observations/templates/observations/index.html
index 1fd0c2bfd03976adb6b3e9b681871fbd48c4204c..fb7e1690c577ce5f7fd8cff0c3449c64b15f66b3 100644
--- a/observations/templates/observations/index.html
+++ b/observations/templates/observations/index.html
@@ -25,7 +25,7 @@
 {% block title%}{% trans "Observations" %}{%endblock%}
 {% block content %}
 <h1>{% trans "Observations" %}</h1>
-<div id="observationMap" class="map" style="position:relative;">
+<div id="observationMap" class="map" style="position:relative; height: 570px;">
 	<div id="popover"></div>
 	<div class="form-group" id="progressBar">
 	    <label for="dayInPeriod">{% trans "Current date"%}: <span id="dayInPeriodDate">{{to|safe}}</span></label><br/>
@@ -134,7 +134,7 @@
 {% endblock %}
 {% block customJS %}
 <script type="text/javascript" src="{% url "javascript-catalog" %}"></script>
-<script type="text/javascript" src="{% static "js/3rdparty/ol-debug.js" %}"></script>
+<script type="text/javascript" src="{% static "js/3rdparty/ol.js" %}"></script>
 <script type="text/javascript" src="{% static "js/3rdparty/moment.min.js" %}"></script>
 <script type="text/javascript" src="{% static "js/3rdparty/chosen.jquery.min.js" %}"></script>
 <script type="text/javascript" src="{% static "js/util.js" %}"></script>
diff --git a/spatial/static/spatial/js/gridmap.js b/spatial/static/spatial/js/gridmap.js
index 8763e8273d4e71bc064dee3e7c21bcbb15a32a4b..02be4484c29cf88285f5611fc33106dc8ef640d8 100644
--- a/spatial/static/spatial/js/gridmap.js
+++ b/spatial/static/spatial/js/gridmap.js
@@ -169,13 +169,10 @@ function getLayersForCurrentTimestamp()
  */
 async function initGridMap(inputModelId, wmsURL, mapAttribution) {
     modelId = inputModelId;
-    var backgroundLayer = new ol.layer.Tile({
+    console.info("Init grid map " + inputModelId)
+    let backgroundLayer = new ol.layer.Tile({
 		source: new ol.source.OSM({
-			attributions: [
-				new ol.Attribution({
-					html: mapAttribution
-				})
-			]
+            attributions: [mapAttribution]
 		})
 	});
 
@@ -326,19 +323,11 @@ async function initGridMap(inputModelId, wmsURL, mapAttribution) {
 	map = new ol.Map({
 		target: "mapContainer",
 		layers: [backgroundLayer].concat(layers),
-		renderer: 'canvas'
+		renderer: 'canvas',
+        view: new ol.View({
+        })
 	});
 
-
-	// Setting zoom and center for the map (need to do this after creating map. so that we can transform our
-	// center to correct map projection)
-	var view = new ol.View({
-		//center: ol.proj.transform(lonLat, 'EPSG:4326', map.getView().getProjection().getCode()),
-		//zoom: 5,
-		//maxMapZoom: 10,
-	});
-	map.setView(view);
-
     // If today is outside of the date range, use the most recent timestamp
     if(wmsServiceSuccess && isDataReturned)
     {
@@ -386,10 +375,12 @@ async function initGridMap(inputModelId, wmsURL, mapAttribution) {
         });
         map.addOverlay(popup);
 
-        map.on('singleclick', displayQueryResult);
+        map.on('singleclick', (evt) => {
+            displayQueryResult(evt);
+        });
 
         // Store user's zoom/pan preferences for the next browser session
-        map.on('moveend', function(evt) {
+        map.on('moveend', (evt) => {
             // Store map settings
             var centerCoordinate = ol.proj.transform(map.getView().getCenter(), map.getView().getProjection().getCode(),'EPSG:4326');
             var settings = {
@@ -455,7 +446,7 @@ async function displayQueryResult(evt)
     {
         let currentLayer = layersForCurrentTimestamp[i];
         let coordinate = proj4(map.getView().getProjection().getCode(), currentLayer.getSource().getProjection().getCode(), evt.coordinate)
-        const url = currentLayer.getSource().getGetFeatureInfoUrl(
+        const url = currentLayer.getSource().getFeatureInfoUrl(
             coordinate,
             map.getView().getResolution(),
             currentWMSLayer.CRS[0],
@@ -557,4 +548,4 @@ function moveDateSlider(step)
     newValue = newValue > max ? max : newValue < min ? min : newValue;
     slider.value=newValue;
     slider.onchange();
-}
\ No newline at end of file
+}
diff --git a/spatial/static/spatial/js/spatialMap.js b/spatial/static/spatial/js/spatialMap.js
index b4aa7e7a00994baeb1a88009fb4b21dafd24a9d7..6a44aa4adc24bec6278a984f454fbcce1c5f7606 100644
--- a/spatial/static/spatial/js/spatialMap.js
+++ b/spatial/static/spatial/js/spatialMap.js
@@ -53,11 +53,7 @@ function initSpatialMap(lonLat, zoomLevel, mapAttribution, mapId) {
 	// ---------- Background layer is OpenStreetMap --------------
 	var backgroundLayer = new ol.layer.Tile({
 		source: new ol.source.OSM({
-			attributions: [
-				new ol.Attribution({
-					html: mapAttribution
-				})
-			]
+			attributions: [mapAttribution]
 		})
 	});
 
@@ -86,23 +82,18 @@ function initSpatialMap(lonLat, zoomLevel, mapAttribution, mapId) {
 	map = new ol.Map({
 		target: mapId,
 		layers: [backgroundLayer, carrotLayer],
-		renderer: 'canvas'
-	});
-
-
-	// Setting zoom and center for the map (need to do this after creating map. so that we can transform our
-	// center to correct map projection)
-	var view = new ol.View({
-		center: ol.proj.transform(lonLat, 'EPSG:4326', map.getView().getProjection().getCode()),
-		zoom: zoomLevel,
-		maxMapZoom: maxMapZoom,
+		renderer: 'canvas',
+		view: new ol.View({
+			center: ol.proj.fromLonLat(lonLat, 'EPSG:3857'),
+			zoom: zoomLevel,
+			maxZoom: maxMapZoom,
+		})
 	});
-	map.setView(view);
 
-	map.on('singleclick', function (evt) {
+	map.on('singleclick', (evt) => {
 		const coordinate = proj4('EPSG:3857', 'EPSG:25833', evt.coordinate)
 
-		const url = carrotLayerSource.getGetFeatureInfoUrl(
+		const url = carrotLayerSource.getFeatureInfoUrl(
 			coordinate,
 			view.getResolution(),
 			'EPSG:25833',
diff --git a/spatial/templates/spatial/gridmap.html b/spatial/templates/spatial/gridmap.html
index 6ebd8a89b704a0e957e3c84f606ea3a4041c17ce..fc929189d7b844d599570c72d034170210b67281 100644
--- a/spatial/templates/spatial/gridmap.html
+++ b/spatial/templates/spatial/gridmap.html
@@ -22,9 +22,9 @@
 <script type="text/javascript" src="{% static "spatial/js/gridmap.js" %}"></script>
 <script type="text/javascript">
 	$(document).ready(function() {
-		var longitude = {{settings.MAP_CENTER_LONGITUDE|unlocalize}};
-		var latitude = {{settings.MAP_CENTER_LATITUDE|unlocalize}};
-		var zoomLevel = {{settings.MAP_ZOOMLEVEL}};
+		const longitude = {{settings.MAP_CENTER_LONGITUDE|unlocalize}};
+		const latitude = {{settings.MAP_CENTER_LATITUDE|unlocalize}};
+		const zoomLevel = {{settings.MAP_ZOOMLEVEL}};
 		initGridMap("{{model_id}}","{{url}}", "{{settings.MAP_ATTRIBUTION|safe}}");
 	});
 </script>
@@ -54,4 +54,4 @@
 		<div id="modelAbstractBody"></div>
 	</div>
        
-{% endblock %}
\ No newline at end of file
+{% endblock %}