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yqD,GAEnC,OADAjmD,KACO8B,GAAUtG,EAAY,iBAAgChb,IAAnBylE,EAA+BA,EAAiB,YAC9F,EgJ5Uc,IAAK,mBAAiB,IAElC1iE,OAAQ,CACNumE,IAAG,UAAU,IAEfn+D,MAAO,CACLwuC,OAAM,QAAM,UAAQ,SAAO,QAAM,IAEnC84B,QAAO,OHyDT,GGzDc,KAAM,G","sources":["webpack://ol/webpack/universalModuleDefinition","webpack://ol/./node_modules/rbush/rbush.min.js","webpack://ol/webpack/bootstrap","webpack://ol/webpack/runtime/define property getters","webpack://ol/webpack/runtime/hasOwnProperty shorthand","webpack://ol/./node_modules/ol/events/Event.js","webpack://ol/./node_modules/ol/ObjectEventType.js","webpack://ol/./node_modules/ol/Disposable.js","webpack://ol/./node_modules/ol/array.js","webpack://ol/./node_modules/ol/functions.js","webpack://ol/./node_modules/ol/obj.js","webpack://ol/./node_modules/ol/events/Target.js","webpack://ol/./node_modules/ol/events/EventType.js","webpack://ol/./node_modules/ol/events.js","webpack://ol/./node_modules/ol/Observable.js","webpack://ol/./node_modules/ol/util.js","webpack://ol/./node_modules/ol/Object.js","webpack://ol/./node_modules/ol/MapEventType.js","webpack://ol/./node_modules/ol/has.js","webpack://ol/./node_modules/ol/dom.js","webpack://ol/./node_modules/ol/control/Control.js","webpack://ol/./node_modules/ol/css.js","webpack://ol/./node_modules/ol/layer/Property.js","webpack://ol/./node_modules/ol/AssertionError.js","webpack://ol/./node_modules/ol/asserts.js","webpack://ol/./node_modules/ol/math.js","webpack://ol/./node_modules/ol/layer/Base.js","webpack://ol/./node_modules/ol/render/EventType.js","webpack://ol/./node_modules/ol/layer/Layer.js","webpack://ol/./node_modules/ol/control/Attribution.js","webpack://ol/./node_modules/ol/pointer/EventType.js","webpack://ol/./node_modules/ol/proj/Units.js","webpack://ol/./node_modules/ol/proj/Projection.js","webpack://ol/./node_modules/ol/proj/epsg3857.js","webpack://ol/./node_modules/ol/proj/epsg4326.js","webpack://ol/./node_modules/ol/proj/projections.js","webpack://ol/./node_modules/ol/proj/transforms.js","webpack://ol/./node_modules/ol/extent.js","webpack://ol/./node_modules/ol/extent/Relationship.js","webpack://ol/./node_modules/ol/coordinate.js","webpack://ol/./node_modules/ol/sphere.js","webpack://ol/./node_modules/ol/proj.js","webpack://ol/./node_modules/ol/control/MousePosition.js","webpack://ol/./node_modules/ol/easing.js","webpack://ol/./node_modules/ol/control/Zoom.js","webpack://ol/./node_modules/ol/transform.js","webpack://ol/./node_modules/ol/geom/GeometryLayout.js","webpack://ol/./node_modules/ol/geom/flat/transform.js","webpack://ol/./node_modules/ol/geom/Geometry.js","webpack://ol/./node_modules/ol/geom/SimpleGeometry.js","webpack://ol/./node_modules/ol/geom/flat/closest.js","webpack://ol/./node_modules/ol/geom/flat/deflate.js","webpack://ol/./node_modules/ol/geom/flat/simplify.js","webpack://ol/./node_modules/ol/geom/flat/segments.js","webpack://ol/./node_modules/ol/geom/flat/inflate.js","webpack://ol/./node_modules/ol/geom/flat/interpolate.js","webpack://ol/./node_modules/ol/geom/flat/contains.js","webpack://ol/./node_modules/ol/geom/flat/intersectsextent.js","webpack://ol/./node_modules/ol/geom/flat/length.js","webpack://ol/./node_modules/ol/geom/LineString.js","webpack://ol/./node_modules/ol/geom/flat/area.js","webpack://ol/./node_modules/ol/geom/LinearRing.js","webpack://ol/./node_modules/ol/geom/MultiLineString.js","webpack://ol/./node_modules/ol/geom/Point.js","webpack://ol/./node_modules/ol/geom/MultiPoint.js","webpack://ol/./node_modules/ol/geom/flat/interiorpoint.js","webpack://ol/./node_modules/ol/geom/flat/reverse.js","webpack://ol/./node_modules/ol/geom/flat/orient.js","webpack://ol/./node_modules/ol/geom/Polygon.js","webpack://ol/./node_modules/ol/geom/MultiPolygon.js","webpack://ol/./node_modules/ol/geom/flat/center.js","webpack://ol/./node_modules/ol/layer/TileProperty.js","webpack://ol/./node_modules/ol/layer/BaseTile.js","webpack://ol/./node_modules/ol/renderer/Layer.js","webpack://ol/./node_modules/ol/ImageState.js","webpack://ol/./node_modules/ol/render/Event.js","webpack://ol/./node_modules/ol/color.js","webpack://ol/./node_modules/ol/renderer/canvas/Layer.js","webpack://ol/./node_modules/ol/Tile.js","webpack://ol/./node_modules/ol/TileState.js","webpack://ol/./node_modules/ol/ImageBase.js","webpack://ol/./node_modules/ol/Image.js","webpack://ol/./node_modules/ol/reproj.js","webpack://ol/./node_modules/ol/ImageTile.js","webpack://ol/./node_modules/ol/reproj/Triangulation.js","webpack://ol/./node_modules/ol/renderer/canvas/common.js","webpack://ol/./node_modules/ol/reproj/Tile.js","webpack://ol/./node_modules/ol/reproj/common.js","webpack://ol/./node_modules/ol/TileRange.js","webpack://ol/./node_modules/ol/size.js","webpack://ol/./node_modules/ol/renderer/canvas/TileLayer.js","webpack://ol/./node_modules/ol/layer/Tile.js","webpack://ol/./node_modules/ol/style/Image.js","webpack://ol/./node_modules/ol/colorlike.js","webpack://ol/./node_modules/ol/render/canvas.js","webpack://ol/./node_modules/ol/style/RegularShape.js","webpack://ol/./node_modules/ol/style/Circle.js","webpack://ol/./node_modules/ol/style/Fill.js","webpack://ol/./node_modules/ol/style/Stroke.js","webpack://ol/./node_modules/ol/style/Style.js","webpack://ol/./node_modules/ol/layer/BaseVector.js","webpack://ol/./node_modules/ol/render/canvas/Instruction.js","webpack://ol/./node_modules/ol/render/VectorContext.js","webpack://ol/./node_modules/ol/render/canvas/Builder.js","webpack://ol/./node_modules/ol/render/canvas/ImageBuilder.js","webpack://ol/./node_modules/ol/render/canvas/LineStringBuilder.js","webpack://ol/./node_modules/ol/render/canvas/PolygonBuilder.js","webpack://ol/./node_modules/ol/geom/flat/straightchunk.js","webpack://ol/./node_modules/ol/render/canvas/TextBuilder.js","webpack://ol/./node_modules/ol/style/TextPlacement.js","webpack://ol/./node_modules/ol/render/canvas/BuilderGroup.js","webpack://ol/./node_modules/ol/geom/flat/textpath.js","webpack://ol/./node_modules/ol/render/canvas/Executor.js","webpack://ol/./node_modules/ol/render/canvas/ExecutorGroup.js","webpack://ol/./node_modules/ol/render/canvas/Immediate.js","webpack://ol/./node_modules/ol/style/IconAnchorUnits.js","webpack://ol/./node_modules/ol/style/IconOrigin.js","webpack://ol/./node_modules/ol/style/IconImageCache.js","webpack://ol/./node_modules/ol/style/IconImage.js","webpack://ol/./node_modules/ol/style/Icon.js","webpack://ol/./node_modules/ol/render/canvas/hitdetect.js","webpack://ol/./node_modules/ol/renderer/vector.js","webpack://ol/./node_modules/ol/renderer/canvas/VectorLayer.js","webpack://ol/./node_modules/ol/ViewHint.js","webpack://ol/./node_modules/ol/layer/Vector.js","webpack://ol/./node_modules/ol/structs/LRUCache.js","webpack://ol/./node_modules/ol/tilecoord.js","webpack://ol/./node_modules/ol/TileCache.js","webpack://ol/./node_modules/ol/source/Source.js","webpack://ol/./node_modules/ol/tilegrid/TileGrid.js","webpack://ol/./node_modules/ol/tilegrid/common.js","webpack://ol/./node_modules/ol/tilegrid.js","webpack://ol/./node_modules/ol/source/Tile.js","webpack://ol/./node_modules/ol/tileurlfunction.js","webpack://ol/./node_modules/ol/source/UrlTile.js","webpack://ol/./node_modules/ol/source/TileEventType.js","webpack://ol/./node_modules/ol/source/TileImage.js","webpack://ol/./node_modules/ol/source/XYZ.js","webpack://ol/./node_modules/ol/source/OSM.js","webpack://ol/./node_modules/ol/CollectionEventType.js","webpack://ol/./node_modules/ol/Collection.js","webpack://ol/./node_modules/ol/structs/RBush.js","webpack://ol/./node_modules/ol/source/VectorEventType.js","webpack://ol/./node_modules/ol/loadingstrategy.js","webpack://ol/./node_modules/ol/featureloader.js","webpack://ol/./node_modules/ol/source/Vector.js","webpack://ol/./node_modules/ol/style/Text.js","webpack://ol/./node_modules/ol/Feature.js","webpack://ol/./node_modules/ol/renderer/Map.js","webpack://ol/./node_modules/ol/renderer/Composite.js","webpack://ol/./node_modules/ol/layer/Group.js","webpack://ol/./node_modules/ol/MapEvent.js","webpack://ol/./node_modules/ol/MapBrowserEvent.js","webpack://ol/./node_modules/ol/MapBrowserEventType.js","webpack://ol/./node_modules/ol/MapBrowserEventHandler.js","webpack://ol/./node_modules/ol/MapProperty.js","webpack://ol/./node_modules/ol/structs/PriorityQueue.js","webpack://ol/./node_modules/ol/TileQueue.js","webpack://ol/./node_modules/ol/ViewProperty.js","webpack://ol/./node_modules/ol/centerconstraint.js","webpack://ol/./node_modules/ol/resolutionconstraint.js","webpack://ol/./node_modules/ol/rotationconstraint.js","webpack://ol/./node_modules/ol/View.js","webpack://ol/./node_modules/ol/PluggableMap.js","webpack://ol/./node_modules/ol/control/Rotate.js","webpack://ol/./node_modules/ol/interaction/Property.js","webpack://ol/./node_modules/ol/interaction/Interaction.js","webpack://ol/./node_modules/ol/interaction/DoubleClickZoom.js","webpack://ol/./node_modules/ol/interaction/Pointer.js","webpack://ol/./node_modules/ol/events/condition.js","webpack://ol/./node_modules/ol/interaction/DragPan.js","webpack://ol/./node_modules/ol/interaction/DragRotate.js","webpack://ol/./node_modules/ol/render/Box.js","webpack://ol/./node_modules/ol/interaction/DragBox.js","webpack://ol/./node_modules/ol/interaction/DragZoom.js","webpack://ol/./node_modules/ol/interaction/KeyboardPan.js","webpack://ol/./node_modules/ol/events/KeyCode.js","webpack://ol/./node_modules/ol/interaction/KeyboardZoom.js","webpack://ol/./node_modules/ol/Kinetic.js","webpack://ol/./node_modules/ol/interaction/MouseWheelZoom.js","webpack://ol/./node_modules/ol/interaction/PinchRotate.js","webpack://ol/./node_modules/ol/interaction/PinchZoom.js","webpack://ol/./node_modules/ol/Map.js","webpack://ol/./node_modules/ol/control.js","webpack://ol/./node_modules/ol/interaction.js","webpack://ol/./js/src/ol.mjs"],"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 ","!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);d0;)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 ti?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=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=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=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","// 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","// 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__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","/**\n * @module ol/events/Event\n */\n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target~Target}.\n */\nvar BaseEvent = /** @class */ (function () {\n /**\n * @param {string} type Type.\n */\n function BaseEvent(type) {\n /**\n * @type {boolean}\n */\n this.propagationStopped;\n /**\n * @type {boolean}\n */\n this.defaultPrevented;\n /**\n * The event type.\n * @type {string}\n * @api\n */\n this.type = type;\n /**\n * The event target.\n * @type {Object}\n * @api\n */\n this.target = null;\n }\n /**\n * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events\n * will be fired.\n * @api\n */\n BaseEvent.prototype.preventDefault = function () {\n this.defaultPrevented = true;\n };\n /**\n * Stop event propagation.\n * @api\n */\n BaseEvent.prototype.stopPropagation = function () {\n this.propagationStopped = true;\n };\n return BaseEvent;\n}());\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n evt.stopPropagation();\n}\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n evt.preventDefault();\n}\nexport default BaseEvent;\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/ObjectEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a property is changed.\n * @event module:ol/Object.ObjectEvent#propertychange\n * @api\n */\n PROPERTYCHANGE: 'propertychange',\n};\n/**\n * @typedef {'propertychange'} Types\n */\n//# sourceMappingURL=ObjectEventType.js.map","/**\n * @module ol/Disposable\n */\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nvar Disposable = /** @class */ (function () {\n function Disposable() {\n /**\n * The object has already been disposed.\n * @type {boolean}\n * @protected\n */\n this.disposed = false;\n }\n /**\n * Clean up.\n */\n Disposable.prototype.dispose = function () {\n if (!this.disposed) {\n this.disposed = true;\n this.disposeInternal();\n }\n };\n /**\n * Extension point for disposable objects.\n * @protected\n */\n Disposable.prototype.disposeInternal = function () { };\n return Disposable;\n}());\nexport default Disposable;\n//# sourceMappingURL=Disposable.js.map","/**\n * @module ol/array\n */\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @param {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function} [opt_comparator] Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, opt_comparator) {\n var mid, cmp;\n var comparator = opt_comparator || numberSafeCompareFunction;\n var low = 0;\n var high = haystack.length;\n var found = false;\n while (low < high) {\n /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n * to double (which gives the wrong results). */\n mid = low + ((high - low) >> 1);\n cmp = +comparator(haystack[mid], needle);\n if (cmp < 0.0) {\n /* Too low. */\n low = mid + 1;\n }\n else {\n /* Key found or too high */\n high = mid;\n found = !cmp;\n }\n }\n /* Key not found. */\n return found ? low : ~low;\n}\n/**\n * Compare function for array sort that is safe for numbers.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n * argument is less than, equal to, or greater than the second.\n */\nexport function numberSafeCompareFunction(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n}\n/**\n * Whether the array contains the given object.\n * @param {Array<*>} arr The array to test for the presence of the element.\n * @param {*} obj The object for which to test.\n * @return {boolean} The object is in the array.\n */\nexport function includes(arr, obj) {\n return arr.indexOf(obj) >= 0;\n}\n/**\n * {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function\n * of this type to determine which nearest resolution to use.\n *\n * This function takes a `{number}` representing a value between two array entries,\n * a `{number}` representing the value of the nearest higher entry and\n * a `{number}` representing the value of the nearest lower entry\n * as arguments and returns a `{number}`. If a negative number or zero is returned\n * the lower value will be used, if a positive number is returned the higher value\n * will be used.\n * @typedef {function(number, number, number): number} NearestDirectionFunction\n * @api\n */\n/**\n * @param {Array} arr Array in descending order.\n * @param {number} target Target.\n * @param {number|NearestDirectionFunction} direction\n * 0 means return the nearest,\n * > 0 means return the largest nearest,\n * < 0 means return the smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n var n = arr.length;\n if (arr[0] <= target) {\n return 0;\n }\n else if (target <= arr[n - 1]) {\n return n - 1;\n }\n else {\n var i = void 0;\n if (direction > 0) {\n for (i = 1; i < n; ++i) {\n if (arr[i] < target) {\n return i - 1;\n }\n }\n }\n else if (direction < 0) {\n for (i = 1; i < n; ++i) {\n if (arr[i] <= target) {\n return i;\n }\n }\n }\n else {\n for (i = 1; i < n; ++i) {\n if (arr[i] == target) {\n return i;\n }\n else if (arr[i] < target) {\n if (typeof direction === 'function') {\n if (direction(target, arr[i - 1], arr[i]) > 0) {\n return i - 1;\n }\n else {\n return i;\n }\n }\n else if (arr[i - 1] - target < target - arr[i]) {\n return i - 1;\n }\n else {\n return i;\n }\n }\n }\n }\n return n - 1;\n }\n}\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nexport function reverseSubArray(arr, begin, end) {\n while (begin < end) {\n var tmp = arr[begin];\n arr[begin] = arr[end];\n arr[end] = tmp;\n ++begin;\n --end;\n }\n}\n/**\n * @param {Array} arr The array to modify.\n * @param {!Array|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n var extension = Array.isArray(data) ? data : [data];\n var length = extension.length;\n for (var i = 0; i < length; i++) {\n arr[arr.length] = extension[i];\n }\n}\n/**\n * @param {Array} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexport function remove(arr, obj) {\n var i = arr.indexOf(obj);\n var found = i > -1;\n if (found) {\n arr.splice(i, 1);\n }\n return found;\n}\n/**\n * @param {Array} arr The array to search in.\n * @param {function(VALUE, number, ?) : boolean} func The function to compare.\n * @template VALUE\n * @return {VALUE|null} The element found or null.\n */\nexport function find(arr, func) {\n var length = arr.length >>> 0;\n var value;\n for (var i = 0; i < length; i++) {\n value = arr[i];\n if (func(value, i, arr)) {\n return value;\n }\n }\n return null;\n}\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nexport function equals(arr1, arr2) {\n var len1 = arr1.length;\n if (len1 !== arr2.length) {\n return false;\n }\n for (var i = 0; i < len1; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Sort the passed array such that the relative order of equal elements is preserved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nexport function stableSort(arr, compareFnc) {\n var length = arr.length;\n var tmp = Array(arr.length);\n var i;\n for (i = 0; i < length; i++) {\n tmp[i] = { index: i, value: arr[i] };\n }\n tmp.sort(function (a, b) {\n return compareFnc(a.value, b.value) || a.index - b.index;\n });\n for (i = 0; i < arr.length; i++) {\n arr[i] = tmp[i].value;\n }\n}\n/**\n * @param {Array<*>} arr The array to search in.\n * @param {Function} func Comparison function.\n * @return {number} Return index.\n */\nexport function findIndex(arr, func) {\n var index;\n var found = !arr.every(function (el, idx) {\n index = idx;\n return !func(el, idx, arr);\n });\n return found ? index : -1;\n}\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function} [opt_func] Comparison function.\n * @param {boolean} [opt_strict] Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, opt_func, opt_strict) {\n var compare = opt_func || numberSafeCompareFunction;\n return arr.every(function (currentVal, index) {\n if (index === 0) {\n return true;\n }\n var res = compare(arr[index - 1], currentVal);\n return !(res > 0 || (opt_strict && res === 0));\n });\n}\n//# sourceMappingURL=array.js.map","/**\n * @module ol/functions\n */\nimport { equals as arrayEquals } from './array.js';\n/**\n * Always returns true.\n * @return {boolean} true.\n */\nexport function TRUE() {\n return true;\n}\n/**\n * Always returns false.\n * @return {boolean} false.\n */\nexport function FALSE() {\n return false;\n}\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nexport function VOID() { }\n/**\n * Wrap a function in another function that remembers the last return. If the\n * returned function is called twice in a row with the same arguments and the same\n * this object, it will return the value from the first call in the second call.\n *\n * @param {function(...any): ReturnType} fn The function to memoize.\n * @return {function(...any): ReturnType} The memoized function.\n * @template ReturnType\n */\nexport function memoizeOne(fn) {\n var called = false;\n /** @type {ReturnType} */\n var lastResult;\n /** @type {Array} */\n var lastArgs;\n var lastThis;\n return function () {\n var nextArgs = Array.prototype.slice.call(arguments);\n if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {\n called = true;\n lastThis = this;\n lastArgs = nextArgs;\n lastResult = fn.apply(this, arguments);\n }\n return lastResult;\n };\n}\n/**\n * @template T\n * @param {function(): (T | Promise)} getter A function that returns a value or a promise for a value.\n * @return {Promise} A promise for the value.\n */\nexport function toPromise(getter) {\n function promiseGetter() {\n var value;\n try {\n value = getter();\n }\n catch (err) {\n return Promise.reject(err);\n }\n if (value instanceof Promise) {\n return value;\n }\n return Promise.resolve(value);\n }\n return promiseGetter();\n}\n//# sourceMappingURL=functions.js.map","/**\n * @module ol/obj\n */\n/**\n * Polyfill for Object.assign(). Assigns enumerable and own properties from\n * one or more source objects to a target object.\n * See https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign.\n *\n * @param {!Object} target The target object.\n * @param {...Object} var_sources The source object(s).\n * @return {!Object} The modified target object.\n */\nexport var assign = typeof Object.assign === 'function'\n ? Object.assign\n : function (target, var_sources) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n var output = Object(target);\n for (var i = 1, ii = arguments.length; i < ii; ++i) {\n var source = arguments[i];\n if (source !== undefined && source !== null) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n output[key] = source[key];\n }\n }\n }\n }\n return output;\n };\n/**\n * Removes all properties from an object.\n * @param {Object} object The object to clear.\n */\nexport function clear(object) {\n for (var property in object) {\n delete object[property];\n }\n}\n/**\n * Polyfill for Object.values(). Get an array of property values from an object.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values\n *\n * @param {!Object} object The object from which to get the values.\n * @return {!Array} The property values.\n * @template K,V\n */\nexport var getValues = typeof Object.values === 'function'\n ? Object.values\n : function (object) {\n var values = [];\n for (var property in object) {\n values.push(object[property]);\n }\n return values;\n };\n/**\n * Determine if an object has any properties.\n * @param {Object} object The object to check.\n * @return {boolean} The object is empty.\n */\nexport function isEmpty(object) {\n var property;\n for (property in object) {\n return false;\n }\n return !property;\n}\n//# sourceMappingURL=obj.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport Event from './Event.js';\nimport { VOID } from '../functions.js';\nimport { clear } from '../obj.js';\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n/**\n * @classdesc\n * A simplified implementation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n * `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n * There is no event target hierarchy. When a listener calls\n * `stopPropagation` or `preventDefault` on an event object, it means that no\n * more listeners after this one will be called. Same as when the listener\n * returns false.\n */\nvar Target = /** @class */ (function (_super) {\n __extends(Target, _super);\n /**\n * @param {*} [opt_target] Default event target for dispatched events.\n */\n function Target(opt_target) {\n var _this = _super.call(this) || this;\n /**\n * @private\n * @type {*}\n */\n _this.eventTarget_ = opt_target;\n /**\n * @private\n * @type {Object}\n */\n _this.pendingRemovals_ = null;\n /**\n * @private\n * @type {Object}\n */\n _this.dispatching_ = null;\n /**\n * @private\n * @type {Object>}\n */\n _this.listeners_ = null;\n return _this;\n }\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n Target.prototype.addEventListener = function (type, listener) {\n if (!type || !listener) {\n return;\n }\n var listeners = this.listeners_ || (this.listeners_ = {});\n var listenersForType = listeners[type] || (listeners[type] = []);\n if (listenersForType.indexOf(listener) === -1) {\n listenersForType.push(listener);\n }\n };\n /**\n * Dispatches an event and calls all listeners listening for events\n * of this type. The event parameter can either be a string or an\n * Object with a `type` property.\n *\n * @param {import(\"./Event.js\").default|string} event Event object.\n * @return {boolean|undefined} `false` if anyone called preventDefault on the\n * event object or if any of the listeners returned false.\n * @api\n */\n Target.prototype.dispatchEvent = function (event) {\n var isString = typeof event === 'string';\n var type = isString ? event : event.type;\n var listeners = this.listeners_ && this.listeners_[type];\n if (!listeners) {\n return;\n }\n var evt = isString ? new Event(event) : /** @type {Event} */ (event);\n if (!evt.target) {\n evt.target = this.eventTarget_ || this;\n }\n var dispatching = this.dispatching_ || (this.dispatching_ = {});\n var pendingRemovals = this.pendingRemovals_ || (this.pendingRemovals_ = {});\n if (!(type in dispatching)) {\n dispatching[type] = 0;\n pendingRemovals[type] = 0;\n }\n ++dispatching[type];\n var propagate;\n for (var i = 0, ii = listeners.length; i < ii; ++i) {\n if ('handleEvent' in listeners[i]) {\n propagate = /** @type {import(\"../events.js\").ListenerObject} */ (listeners[i]).handleEvent(evt);\n }\n else {\n propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (listeners[i]).call(this, evt);\n }\n if (propagate === false || evt.propagationStopped) {\n propagate = false;\n break;\n }\n }\n if (--dispatching[type] === 0) {\n var pr = pendingRemovals[type];\n delete pendingRemovals[type];\n while (pr--) {\n this.removeEventListener(type, VOID);\n }\n delete dispatching[type];\n }\n return propagate;\n };\n /**\n * Clean up.\n */\n Target.prototype.disposeInternal = function () {\n this.listeners_ && clear(this.listeners_);\n };\n /**\n * Get the listeners for a specified event type. Listeners are returned in the\n * order that they will be called in.\n *\n * @param {string} type Type.\n * @return {Array|undefined} Listeners.\n */\n Target.prototype.getListeners = function (type) {\n return (this.listeners_ && this.listeners_[type]) || undefined;\n };\n /**\n * @param {string} [opt_type] Type. If not provided,\n * `true` will be returned if this event target has any listeners.\n * @return {boolean} Has listeners.\n */\n Target.prototype.hasListener = function (opt_type) {\n if (!this.listeners_) {\n return false;\n }\n return opt_type\n ? opt_type in this.listeners_\n : Object.keys(this.listeners_).length > 0;\n };\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").Listener} listener Listener.\n */\n Target.prototype.removeEventListener = function (type, listener) {\n var listeners = this.listeners_ && this.listeners_[type];\n if (listeners) {\n var index = listeners.indexOf(listener);\n if (index !== -1) {\n if (this.pendingRemovals_ && type in this.pendingRemovals_) {\n // make listener a no-op, and remove later in #dispatchEvent()\n listeners[index] = VOID;\n ++this.pendingRemovals_[type];\n }\n else {\n listeners.splice(index, 1);\n if (listeners.length === 0) {\n delete this.listeners_[type];\n }\n }\n }\n }\n };\n return Target;\n}(Disposable));\nexport default Target;\n//# sourceMappingURL=Target.js.map","/**\n * @module ol/events/EventType\n */\n/**\n * @enum {string}\n * @const\n */\nexport default {\n /**\n * Generic change event. Triggered when the revision counter is increased.\n * @event module:ol/events/Event~BaseEvent#change\n * @api\n */\n CHANGE: 'change',\n /**\n * Generic error event. Triggered when an error occurs.\n * @event module:ol/events/Event~BaseEvent#error\n * @api\n */\n ERROR: 'error',\n BLUR: 'blur',\n CLEAR: 'clear',\n CONTEXTMENU: 'contextmenu',\n CLICK: 'click',\n DBLCLICK: 'dblclick',\n DRAGENTER: 'dragenter',\n DRAGOVER: 'dragover',\n DROP: 'drop',\n FOCUS: 'focus',\n KEYDOWN: 'keydown',\n KEYPRESS: 'keypress',\n LOAD: 'load',\n RESIZE: 'resize',\n TOUCHMOVE: 'touchmove',\n WHEEL: 'wheel',\n};\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/events\n */\nimport { clear } from './obj.js';\n/**\n * Key to use with {@link module:ol/Observable.unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener Listener.\n * @property {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @property {string} type Type.\n * @api\n */\n/**\n * Listener function. This function is called with an event object as argument.\n * When the function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent HandleEvent listener function.\n */\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\n/**\n * Registers an event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events.unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [opt_this] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @param {boolean} [opt_once] If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nexport function listen(target, type, listener, opt_this, opt_once) {\n if (opt_this && opt_this !== target) {\n listener = listener.bind(opt_this);\n }\n if (opt_once) {\n var originalListener_1 = listener;\n listener = function () {\n target.removeEventListener(type, listener);\n originalListener_1.apply(this, arguments);\n };\n }\n var eventsKey = {\n target: target,\n type: type,\n listener: listener,\n };\n target.addEventListener(type, listener);\n return eventsKey;\n}\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events.unlistenByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events.listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [opt_this] Object referenced by the `this` keyword in the\n * listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nexport function listenOnce(target, type, listener, opt_this) {\n return listen(target, type, listener, opt_this, true);\n}\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events.listen} or {@link module:ol/events.listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nexport function unlistenByKey(key) {\n if (key && key.target) {\n key.target.removeEventListener(key.type, key.listener);\n clear(key);\n }\n}\n//# sourceMappingURL=events.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/Observable\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport { listen, listenOnce, unlistenByKey } from './events.js';\n/***\n * @template {string} Type\n * @template {Event|import(\"./events/Event.js\").default} EventClass\n * @template Return\n * @typedef {(type: Type, listener: (event: EventClass) => ?) => Return} OnSignature\n */\n/***\n * @template {string} Type\n * @template Return\n * @typedef {(type: Type[], listener: (event: Event|import(\"./events/Event\").default) => ?) => Return extends void ? void : Return[]} CombinedOnSignature\n */\n/**\n * @typedef {'change'|'error'} EventTypes\n */\n/***\n * @template Return\n * @typedef {OnSignature & CombinedOnSignature} ObservableOnSignature\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fires import(\"./events/Event.js\").default\n * @api\n */\nvar Observable = /** @class */ (function (_super) {\n __extends(Observable, _super);\n function Observable() {\n var _this = _super.call(this) || this;\n _this.on =\n /** @type {ObservableOnSignature} */ (_this.onInternal);\n _this.once =\n /** @type {ObservableOnSignature} */ (_this.onceInternal);\n _this.un = /** @type {ObservableOnSignature} */ (_this.unInternal);\n /**\n * @private\n * @type {number}\n */\n _this.revision_ = 0;\n return _this;\n }\n /**\n * Increases the revision counter and dispatches a 'change' event.\n * @api\n */\n Observable.prototype.changed = function () {\n ++this.revision_;\n this.dispatchEvent(EventType.CHANGE);\n };\n /**\n * Get the version number for this object. Each time the object is modified,\n * its version number will be incremented.\n * @return {number} Revision.\n * @api\n */\n Observable.prototype.getRevision = function () {\n return this.revision_;\n };\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n Observable.prototype.onInternal = function (type, listener) {\n if (Array.isArray(type)) {\n var len = type.length;\n var keys = new Array(len);\n for (var i = 0; i < len; ++i) {\n keys[i] = listen(this, type[i], listener);\n }\n return keys;\n }\n else {\n return listen(this, /** @type {string} */ (type), listener);\n }\n };\n /**\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @return {import(\"./events.js\").EventsKey|Array} Event key.\n * @protected\n */\n Observable.prototype.onceInternal = function (type, listener) {\n var key;\n if (Array.isArray(type)) {\n var len = type.length;\n key = new Array(len);\n for (var i = 0; i < len; ++i) {\n key[i] = listenOnce(this, type[i], listener);\n }\n }\n else {\n key = listenOnce(this, /** @type {string} */ (type), listener);\n }\n /** @type {Object} */ (listener).ol_key = key;\n return key;\n };\n /**\n * Unlisten for a certain type of event.\n * @param {string|Array} type Type.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener Listener.\n * @protected\n */\n Observable.prototype.unInternal = function (type, listener) {\n var key = /** @type {Object} */ (listener).ol_key;\n if (key) {\n unByKey(key);\n }\n else if (Array.isArray(type)) {\n for (var i = 0, ii = type.length; i < ii; ++i) {\n this.removeEventListener(type[i], listener);\n }\n }\n else {\n this.removeEventListener(type, listener);\n }\n };\n return Observable;\n}(EventTarget));\n/**\n * Listen for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\nObservable.prototype.on;\n/**\n * Listen once for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array} Unique key for the listener. If\n * called with an array of event types as the first argument, the return\n * will be an array of keys.\n * @api\n */\nObservable.prototype.once;\n/**\n * Unlisten for a certain type of event.\n * @function\n * @param {string|Array} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @api\n */\nObservable.prototype.un;\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array} key The key returned by `on()`\n * or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n if (Array.isArray(key)) {\n for (var i = 0, ii = key.length; i < ii; ++i) {\n unlistenByKey(key[i]);\n }\n }\n else {\n unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n }\n}\nexport default Observable;\n//# sourceMappingURL=Observable.js.map","/**\n * @module ol/util\n */\n/**\n * @return {?} Any return.\n */\nexport function abstract() {\n return /** @type {?} */ ((function () {\n throw new Error('Unimplemented abstract method.');\n })());\n}\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nvar uidCounter_ = 0;\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @api\n */\nexport function getUid(obj) {\n return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport var VERSION = '6.15.1';\n//# sourceMappingURL=util.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/Object\n */\nimport Event from './events/Event.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport { assign, isEmpty } from './obj.js';\nimport { getUid } from './util.js';\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nvar ObjectEvent = /** @class */ (function (_super) {\n __extends(ObjectEvent, _super);\n /**\n * @param {string} type The event type.\n * @param {string} key The property name.\n * @param {*} oldValue The old value for `key`.\n */\n function ObjectEvent(type, key, oldValue) {\n var _this = _super.call(this, type) || this;\n /**\n * The name of the property whose value is changing.\n * @type {string}\n * @api\n */\n _this.key = key;\n /**\n * The old value. To get the new value use `e.target.get(e.key)` where\n * `e` is the event object.\n * @type {*}\n * @api\n */\n _this.oldValue = oldValue;\n return _this;\n }\n return ObjectEvent;\n}(Event));\nexport { ObjectEvent };\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature &\n * import(\"./Observable\").OnSignature &\n * import(\"./Observable\").CombinedOnSignature} ObjectOnSignature\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable~Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.\n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed with `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties are separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @api\n */\nvar BaseObject = /** @class */ (function (_super) {\n __extends(BaseObject, _super);\n /**\n * @param {Object} [opt_values] An object with key-value pairs.\n */\n function BaseObject(opt_values) {\n var _this = _super.call(this) || this;\n /***\n * @type {ObjectOnSignature}\n */\n _this.on;\n /***\n * @type {ObjectOnSignature}\n */\n _this.once;\n /***\n * @type {ObjectOnSignature}\n */\n _this.un;\n // Call {@link module:ol/util.getUid} to ensure that the order of objects' ids is\n // the same as the order in which they were created. This also helps to\n // ensure that object properties are always added in the same order, which\n // helps many JavaScript engines generate faster code.\n getUid(_this);\n /**\n * @private\n * @type {Object}\n */\n _this.values_ = null;\n if (opt_values !== undefined) {\n _this.setProperties(opt_values);\n }\n return _this;\n }\n /**\n * Gets a value.\n * @param {string} key Key name.\n * @return {*} Value.\n * @api\n */\n BaseObject.prototype.get = function (key) {\n var value;\n if (this.values_ && this.values_.hasOwnProperty(key)) {\n value = this.values_[key];\n }\n return value;\n };\n /**\n * Get a list of object property names.\n * @return {Array} List of property names.\n * @api\n */\n BaseObject.prototype.getKeys = function () {\n return (this.values_ && Object.keys(this.values_)) || [];\n };\n /**\n * Get an object of all property names and values.\n * @return {Object} Object.\n * @api\n */\n BaseObject.prototype.getProperties = function () {\n return (this.values_ && assign({}, this.values_)) || {};\n };\n /**\n * @return {boolean} The object has properties.\n */\n BaseObject.prototype.hasProperties = function () {\n return !!this.values_;\n };\n /**\n * @param {string} key Key name.\n * @param {*} oldValue Old value.\n */\n BaseObject.prototype.notify = function (key, oldValue) {\n var eventType;\n eventType = \"change:\".concat(key);\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n eventType = ObjectEventType.PROPERTYCHANGE;\n if (this.hasListener(eventType)) {\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n }\n };\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n BaseObject.prototype.addChangeListener = function (key, listener) {\n this.addEventListener(\"change:\".concat(key), listener);\n };\n /**\n * @param {string} key Key name.\n * @param {import(\"./events.js\").Listener} listener Listener.\n */\n BaseObject.prototype.removeChangeListener = function (key, listener) {\n this.removeEventListener(\"change:\".concat(key), listener);\n };\n /**\n * Sets a value.\n * @param {string} key Key name.\n * @param {*} value Value.\n * @param {boolean} [opt_silent] Update without triggering an event.\n * @api\n */\n BaseObject.prototype.set = function (key, value, opt_silent) {\n var values = this.values_ || (this.values_ = {});\n if (opt_silent) {\n values[key] = value;\n }\n else {\n var oldValue = values[key];\n values[key] = value;\n if (oldValue !== value) {\n this.notify(key, oldValue);\n }\n }\n };\n /**\n * Sets a collection of key-value pairs. Note that this changes any existing\n * properties and adds new ones (it does not remove any existing properties).\n * @param {Object} values Values.\n * @param {boolean} [opt_silent] Update without triggering an event.\n * @api\n */\n BaseObject.prototype.setProperties = function (values, opt_silent) {\n for (var key in values) {\n this.set(key, values[key], opt_silent);\n }\n };\n /**\n * Apply any properties from another object without triggering events.\n * @param {BaseObject} source The source object.\n * @protected\n */\n BaseObject.prototype.applyProperties = function (source) {\n if (!source.values_) {\n return;\n }\n assign(this.values_ || (this.values_ = {}), source.values_);\n };\n /**\n * Unsets a property.\n * @param {string} key Key name.\n * @param {boolean} [opt_silent] Unset without triggering an event.\n * @api\n */\n BaseObject.prototype.unset = function (key, opt_silent) {\n if (this.values_ && key in this.values_) {\n var oldValue = this.values_[key];\n delete this.values_[key];\n if (isEmpty(this.values_)) {\n this.values_ = null;\n }\n if (!opt_silent) {\n this.notify(key, oldValue);\n }\n }\n };\n return BaseObject;\n}(Observable));\nexport default BaseObject;\n//# sourceMappingURL=Object.js.map","/**\n * @module ol/MapEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered after a map frame is rendered.\n * @event module:ol/MapEvent~MapEvent#postrender\n * @api\n */\n POSTRENDER: 'postrender',\n /**\n * Triggered when the map starts moving.\n * @event module:ol/MapEvent~MapEvent#movestart\n * @api\n */\n MOVESTART: 'movestart',\n /**\n * Triggered after the map is moved.\n * @event module:ol/MapEvent~MapEvent#moveend\n * @api\n */\n MOVEEND: 'moveend',\n /**\n * Triggered when loading of additional map data (tiles, images, features) starts.\n * @event module:ol/MapEvent~MapEvent#loadstart\n * @api\n */\n LOADSTART: 'loadstart',\n /**\n * Triggered when loading of additional map data has completed.\n * @event module:ol/MapEvent~MapEvent#loadend\n * @api\n */\n LOADEND: 'loadend',\n};\n/***\n * @typedef {'postrender'|'movestart'|'moveend'|'loadstart'|'loadend'} Types\n */\n//# sourceMappingURL=MapEventType.js.map","/**\n * @module ol/has\n */\nvar ua = typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n ? navigator.userAgent.toLowerCase()\n : '';\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport var FIREFOX = ua.indexOf('firefox') !== -1;\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport var SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;\n/**\n * https://bugs.webkit.org/show_bug.cgi?id=237906\n * @type {boolean}\n */\nexport var SAFARI_BUG_237906 = SAFARI &&\n !!(ua.indexOf('version/15.4') >= 0 ||\n ua.match(/cpu (os|iphone os) 15_4 like mac os x/));\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport var WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1;\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport var MAC = ua.indexOf('macintosh') !== -1;\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport var DEVICE_PIXEL_RATIO = typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport var WORKER_OFFSCREEN_CANVAS = typeof WorkerGlobalScope !== 'undefined' &&\n typeof OffscreenCanvas !== 'undefined' &&\n self instanceof WorkerGlobalScope; //eslint-disable-line\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nexport var IMAGE_DECODE = typeof Image !== 'undefined' && Image.prototype.decode;\n/**\n * @type {boolean}\n */\nexport var PASSIVE_EVENT_LISTENERS = (function () {\n var passive = false;\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passive = true;\n },\n });\n window.addEventListener('_', null, options);\n window.removeEventListener('_', null, options);\n }\n catch (error) {\n // passive not supported\n }\n return passive;\n})();\n//# sourceMappingURL=has.js.map","import { WORKER_OFFSCREEN_CANVAS } from './has.js';\n/**\n * @module ol/dom\n */\n//FIXME Move this function to the canvas module\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number} [opt_width] Canvas width.\n * @param {number} [opt_height] Canvas height.\n * @param {Array} [opt_canvasPool] Canvas pool to take existing canvas from.\n * @param {CanvasRenderingContext2DSettings} [opt_Context2DSettings] CanvasRenderingContext2DSettings\n * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(opt_width, opt_height, opt_canvasPool, opt_Context2DSettings) {\n /** @type {HTMLCanvasElement|OffscreenCanvas} */\n var canvas;\n if (opt_canvasPool && opt_canvasPool.length) {\n canvas = opt_canvasPool.shift();\n }\n else if (WORKER_OFFSCREEN_CANVAS) {\n canvas = new OffscreenCanvas(opt_width || 300, opt_height || 300);\n }\n else {\n canvas = document.createElement('canvas');\n }\n if (opt_width) {\n canvas.width = opt_width;\n }\n if (opt_height) {\n canvas.height = opt_height;\n }\n //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n return /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d', opt_Context2DSettings));\n}\n/**\n * Releases canvas memory to avoid exceeding memory limits in Safari.\n * See https://pqina.nl/blog/total-canvas-memory-use-exceeds-the-maximum-limit/\n * @param {CanvasRenderingContext2D} context Context.\n */\nexport function releaseCanvas(context) {\n var canvas = context.canvas;\n canvas.width = 1;\n canvas.height = 1;\n context.clearRect(0, 0, 1, 1);\n}\n/**\n * Get the current computed width for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerWidth(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The width.\n */\nexport function outerWidth(element) {\n var width = element.offsetWidth;\n var style = getComputedStyle(element);\n width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n return width;\n}\n/**\n * Get the current computed height for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerHeight(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The height.\n */\nexport function outerHeight(element) {\n var height = element.offsetHeight;\n var style = getComputedStyle(element);\n height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n return height;\n}\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nexport function replaceNode(newNode, oldNode) {\n var parent = oldNode.parentNode;\n if (parent) {\n parent.replaceChild(newNode, oldNode);\n }\n}\n/**\n * @param {Node} node The node to remove.\n * @return {Node|null} The node that was removed or null.\n */\nexport function removeNode(node) {\n return node && node.parentNode ? node.parentNode.removeChild(node) : null;\n}\n/**\n * @param {Node} node The node to remove the children from.\n */\nexport function removeChildren(node) {\n while (node.lastChild) {\n node.removeChild(node.lastChild);\n }\n}\n/**\n * Transform the children of a parent node so they match the\n * provided list of children. This function aims to efficiently\n * remove, add, and reorder child nodes while maintaining a simple\n * implementation (it is not guaranteed to minimize DOM operations).\n * @param {Node} node The parent node whose children need reworking.\n * @param {Array} children The desired children.\n */\nexport function replaceChildren(node, children) {\n var oldChildren = node.childNodes;\n for (var i = 0; true; ++i) {\n var oldChild = oldChildren[i];\n var newChild = children[i];\n // check if our work is done\n if (!oldChild && !newChild) {\n break;\n }\n // check if children match\n if (oldChild === newChild) {\n continue;\n }\n // check if a new child needs to be added\n if (!oldChild) {\n node.appendChild(newChild);\n continue;\n }\n // check if an old child needs to be removed\n if (!newChild) {\n node.removeChild(oldChild);\n --i;\n continue;\n }\n // reorder\n node.insertBefore(newChild, oldChild);\n }\n}\n//# sourceMappingURL=dom.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/control/Control\n */\nimport BaseObject from '../Object.js';\nimport MapEventType from '../MapEventType.js';\nimport { VOID } from '../functions.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { removeNode } from '../dom.js';\n/**\n * @typedef {Object} Options\n * @property {HTMLElement} [element] The element is the control's\n * container element. This only needs to be specified if you're developing\n * a custom control.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want\n * the control to be rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A control is a visible widget with a DOM element in a fixed position on the\n * screen. They can involve user input (buttons), or be informational only;\n * the position is determined using CSS. By default these are placed in the\n * container with CSS class name `ol-overlaycontainer-stopevent`, but can use\n * any outside DOM element.\n *\n * This is the base class for controls. You can use it for simple custom\n * controls by creating the element with listeners, creating an instance:\n * ```js\n * var myControl = new Control({element: myElement});\n * ```\n * and then adding this to the map.\n *\n * The main advantage of having this as a control rather than a simple separate\n * DOM element is that preventing propagation is handled for you. Controls\n * will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.\n *\n * You can also extend this base for your own control class. See\n * examples/custom-controls for an example of how to do this.\n *\n * @api\n */\nvar Control = /** @class */ (function (_super) {\n __extends(Control, _super);\n /**\n * @param {Options} options Control options.\n */\n function Control(options) {\n var _this = _super.call(this) || this;\n var element = options.element;\n if (element && !options.target && !element.style.pointerEvents) {\n element.style.pointerEvents = 'auto';\n }\n /**\n * @protected\n * @type {HTMLElement}\n */\n _this.element = element ? element : null;\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.target_ = null;\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default|null}\n */\n _this.map_ = null;\n /**\n * @protected\n * @type {!Array}\n */\n _this.listenerKeys = [];\n if (options.render) {\n _this.render = options.render;\n }\n if (options.target) {\n _this.setTarget(options.target);\n }\n return _this;\n }\n /**\n * Clean up.\n */\n Control.prototype.disposeInternal = function () {\n removeNode(this.element);\n _super.prototype.disposeInternal.call(this);\n };\n /**\n * Get the map associated with this control.\n * @return {import(\"../PluggableMap.js\").default|null} Map.\n * @api\n */\n Control.prototype.getMap = function () {\n return this.map_;\n };\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default|null} map Map.\n * @api\n */\n Control.prototype.setMap = function (map) {\n if (this.map_) {\n removeNode(this.element);\n }\n for (var i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n unlistenByKey(this.listenerKeys[i]);\n }\n this.listenerKeys.length = 0;\n this.map_ = map;\n if (map) {\n var target = this.target_\n ? this.target_\n : map.getOverlayContainerStopEvent();\n target.appendChild(this.element);\n if (this.render !== VOID) {\n this.listenerKeys.push(listen(map, MapEventType.POSTRENDER, this.render, this));\n }\n map.render();\n }\n };\n /**\n * Renders the control.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @api\n */\n Control.prototype.render = function (mapEvent) { };\n /**\n * This function is used to set a target element for the control. It has no\n * effect if it is called after the control has been added to the map (i.e.\n * after `setMap` is called on the control). If no `target` is set in the\n * options passed to the control constructor and if `setTarget` is not called\n * then the control is added to the map's overlay container.\n * @param {HTMLElement|string} target Target.\n * @api\n */\n Control.prototype.setTarget = function (target) {\n this.target_ =\n typeof target === 'string' ? document.getElementById(target) : target;\n };\n return Control;\n}(BaseObject));\nexport default Control;\n//# sourceMappingURL=Control.js.map","/**\n * @module ol/css\n */\n/**\n * @typedef {Object} FontParameters\n * @property {string} style Style.\n * @property {string} variant Variant.\n * @property {string} weight Weight.\n * @property {string} size Size.\n * @property {string} lineHeight LineHeight.\n * @property {string} family Family.\n * @property {Array} families Families.\n */\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_HIDDEN = 'ol-hidden';\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_SELECTABLE = 'ol-selectable';\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSELECTABLE = 'ol-unselectable';\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSUPPORTED = 'ol-unsupported';\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_CONTROL = 'ol-control';\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_COLLAPSED = 'ol-collapsed';\n/**\n * From https://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nvar fontRegEx = new RegExp([\n '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)',\n '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',\n '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z]+?)\\\\s*$',\n].join(''), 'i');\nvar fontRegExMatchIndex = [\n 'style',\n 'variant',\n 'weight',\n 'size',\n 'lineHeight',\n 'family',\n];\n/**\n * Get the list of font families from a font spec. Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters|null} The font parameters (or null if the input spec is invalid).\n */\nexport var getFontParameters = function (fontSpec) {\n var match = fontSpec.match(fontRegEx);\n if (!match) {\n return null;\n }\n var style = /** @type {FontParameters} */ ({\n lineHeight: 'normal',\n size: '1.2em',\n style: 'normal',\n weight: 'normal',\n variant: 'normal',\n });\n for (var i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n var value = match[i + 1];\n if (value !== undefined) {\n style[fontRegExMatchIndex[i]] = value;\n }\n }\n style.families = style.family.split(/,\\s?/);\n return style;\n};\n//# sourceMappingURL=css.js.map","/**\n * @module ol/layer/Property\n */\n/**\n * @enum {string}\n */\nexport default {\n OPACITY: 'opacity',\n VISIBLE: 'visible',\n EXTENT: 'extent',\n Z_INDEX: 'zIndex',\n MAX_RESOLUTION: 'maxResolution',\n MIN_RESOLUTION: 'minResolution',\n MAX_ZOOM: 'maxZoom',\n MIN_ZOOM: 'minZoom',\n SOURCE: 'source',\n MAP: 'map',\n};\n//# sourceMappingURL=Property.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/AssertionError\n */\nimport { VERSION } from './util.js';\n/**\n * Error object thrown when an assertion failed. This is an ECMA-262 Error,\n * extended with a `code` property.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error.\n */\nvar AssertionError = /** @class */ (function (_super) {\n __extends(AssertionError, _super);\n /**\n * @param {number} code Error code.\n */\n function AssertionError(code) {\n var _this = this;\n var path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0];\n var message = 'Assertion failed. See https://openlayers.org/en/' +\n path +\n '/doc/errors/#' +\n code +\n ' for details.';\n _this = _super.call(this, message) || this;\n /**\n * Error code. The meaning of the code can be found on\n * https://openlayers.org/en/latest/doc/errors/ (replace `latest` with\n * the version found in the OpenLayers script's header comment if a version\n * other than the latest is used).\n * @type {number}\n * @api\n */\n _this.code = code;\n /**\n * @type {string}\n */\n _this.name = 'AssertionError';\n // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40\n _this.message = message;\n return _this;\n }\n return AssertionError;\n}(Error));\nexport default AssertionError;\n//# sourceMappingURL=AssertionError.js.map","/**\n * @module ol/asserts\n */\nimport AssertionError from './AssertionError.js';\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {number} errorCode Error code.\n */\nexport function assert(assertion, errorCode) {\n if (!assertion) {\n throw new AssertionError(errorCode);\n }\n}\n//# sourceMappingURL=asserts.js.map","/**\n * @module ol/math\n */\n/**\n * Takes a number and clamps it to within the provided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n * number within the bounds.\n */\nexport function clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}\n/**\n * Return the hyperbolic cosine of a given number. The method will use the\n * native `Math.cosh` function if it is available, otherwise the hyperbolic\n * cosine will be calculated via the reference implementation of the Mozilla\n * developer network.\n *\n * @param {number} x X.\n * @return {number} Hyperbolic cosine of x.\n */\nexport var cosh = (function () {\n // Wrapped in a iife, to save the overhead of checking for the native\n // implementation on every invocation.\n var cosh;\n if ('cosh' in Math) {\n // The environment supports the native Math.cosh function, use it…\n cosh = Math.cosh;\n }\n else {\n // … else, use the reference implementation of MDN:\n cosh = function (x) {\n var y = /** @type {Math} */ (Math).exp(x);\n return (y + 1 / y) / 2;\n };\n }\n return cosh;\n})();\n/**\n * Return the base 2 logarithm of a given number. The method will use the\n * native `Math.log2` function if it is available, otherwise the base 2\n * logarithm will be calculated via the reference implementation of the\n * Mozilla developer network.\n *\n * @param {number} x X.\n * @return {number} Base 2 logarithm of x.\n */\nexport var log2 = (function () {\n // Wrapped in a iife, to save the overhead of checking for the native\n // implementation on every invocation.\n var log2;\n if ('log2' in Math) {\n // The environment supports the native Math.log2 function, use it…\n log2 = Math.log2;\n }\n else {\n // … else, use the reference implementation of MDN:\n log2 = function (x) {\n return Math.log(x) * Math.LOG2E;\n };\n }\n return log2;\n})();\n/**\n * Returns the square of the closest distance between the point (x, y) and the\n * line segment (x1, y1) to (x2, y2).\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredSegmentDistance(x, y, x1, y1, x2, y2) {\n var dx = x2 - x1;\n var dy = y2 - y1;\n if (dx !== 0 || dy !== 0) {\n var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n x1 = x2;\n y1 = y2;\n }\n else if (t > 0) {\n x1 += dx * t;\n y1 += dy * t;\n }\n }\n return squaredDistance(x, y, x1, y1);\n}\n/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredDistance(x1, y1, x2, y2) {\n var dx = x2 - x1;\n var dy = y2 - y1;\n return dx * dx + dy * dy;\n}\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array>} mat Augmented matrix (n x n + 1 column)\n * in row-major order.\n * @return {Array} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n var n = mat.length;\n for (var i = 0; i < n; i++) {\n // Find max in the i-th column (ignoring i - 1 first rows)\n var maxRow = i;\n var maxEl = Math.abs(mat[i][i]);\n for (var r = i + 1; r < n; r++) {\n var absValue = Math.abs(mat[r][i]);\n if (absValue > maxEl) {\n maxEl = absValue;\n maxRow = r;\n }\n }\n if (maxEl === 0) {\n return null; // matrix is singular\n }\n // Swap max row with i-th (current) row\n var tmp = mat[maxRow];\n mat[maxRow] = mat[i];\n mat[i] = tmp;\n // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n for (var j = i + 1; j < n; j++) {\n var coef = -mat[j][i] / mat[i][i];\n for (var k = i; k < n + 1; k++) {\n if (i == k) {\n mat[j][k] = 0;\n }\n else {\n mat[j][k] += coef * mat[i][k];\n }\n }\n }\n }\n // Solve Ax=b for upper triangular matrix A (mat)\n var x = new Array(n);\n for (var l = n - 1; l >= 0; l--) {\n x[l] = mat[l][n] / mat[l][l];\n for (var m = l - 1; m >= 0; m--) {\n mat[m][n] -= mat[m][l] * x[l];\n }\n }\n return x;\n}\n/**\n * Converts radians to to degrees.\n *\n * @param {number} angleInRadians Angle in radians.\n * @return {number} Angle in degrees.\n */\nexport function toDegrees(angleInRadians) {\n return (angleInRadians * 180) / Math.PI;\n}\n/**\n * Converts degrees to radians.\n *\n * @param {number} angleInDegrees Angle in degrees.\n * @return {number} Angle in radians.\n */\nexport function toRadians(angleInDegrees) {\n return (angleInDegrees * Math.PI) / 180;\n}\n/**\n * Returns the modulo of a / b, depending on the sign of b.\n *\n * @param {number} a Dividend.\n * @param {number} b Divisor.\n * @return {number} Modulo.\n */\nexport function modulo(a, b) {\n var r = a % b;\n return r * b < 0 ? r + b : r;\n}\n/**\n * Calculates the linearly interpolated value of x between a and b.\n *\n * @param {number} a Number\n * @param {number} b Number\n * @param {number} x Value to be interpolated.\n * @return {number} Interpolated value.\n */\nexport function lerp(a, b, x) {\n return a + x * (b - a);\n}\n/**\n * Returns a number with a limited number of decimal digits.\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The input number with a limited number of decimal digits.\n */\nexport function toFixed(n, decimals) {\n var factor = Math.pow(10, decimals);\n return Math.round(n * factor) / factor;\n}\n/**\n * Rounds a number to the nearest integer value considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The nearest integer.\n */\nexport function round(n, decimals) {\n return Math.round(toFixed(n, decimals));\n}\n/**\n * Rounds a number to the next smaller integer considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The next smaller integer.\n */\nexport function floor(n, decimals) {\n return Math.floor(toFixed(n, decimals));\n}\n/**\n * Rounds a number to the next bigger integer considering only the given number\n * of decimal digits (with rounding on the final digit).\n * @param {number} n The input number.\n * @param {number} decimals The maximum number of decimal digits.\n * @return {number} The next bigger integer.\n */\nexport function ceil(n, decimals) {\n return Math.ceil(toFixed(n, decimals));\n}\n//# sourceMappingURL=math.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/layer/Base\n */\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport { abstract } from '../util.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { clamp } from '../math.js';\n/**\n * A css color, or a function called with a view resolution returning a css color.\n *\n * @typedef {string|function(number):string} BackgroundColor\n * @api\n */\n/**\n * @typedef {import(\"../ObjectEventType\").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|\n * 'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes\n */\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} BaseLayerOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base~BaseLayer} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nvar BaseLayer = /** @class */ (function (_super) {\n __extends(BaseLayer, _super);\n /**\n * @param {Options} options Layer options.\n */\n function BaseLayer(options) {\n var _this = _super.call(this) || this;\n /***\n * @type {BaseLayerOnSignature}\n */\n _this.on;\n /***\n * @type {BaseLayerOnSignature}\n */\n _this.once;\n /***\n * @type {BaseLayerOnSignature}\n */\n _this.un;\n /**\n * @type {BackgroundColor|false}\n * @private\n */\n _this.background_ = options.background;\n /**\n * @type {Object}\n */\n var properties = assign({}, options);\n if (typeof options.properties === 'object') {\n delete properties.properties;\n assign(properties, options.properties);\n }\n properties[LayerProperty.OPACITY] =\n options.opacity !== undefined ? options.opacity : 1;\n assert(typeof properties[LayerProperty.OPACITY] === 'number', 64); // Layer opacity must be a number\n properties[LayerProperty.VISIBLE] =\n options.visible !== undefined ? options.visible : true;\n properties[LayerProperty.Z_INDEX] = options.zIndex;\n properties[LayerProperty.MAX_RESOLUTION] =\n options.maxResolution !== undefined ? options.maxResolution : Infinity;\n properties[LayerProperty.MIN_RESOLUTION] =\n options.minResolution !== undefined ? options.minResolution : 0;\n properties[LayerProperty.MIN_ZOOM] =\n options.minZoom !== undefined ? options.minZoom : -Infinity;\n properties[LayerProperty.MAX_ZOOM] =\n options.maxZoom !== undefined ? options.maxZoom : Infinity;\n /**\n * @type {string}\n * @private\n */\n _this.className_ =\n properties.className !== undefined ? properties.className : 'ol-layer';\n delete properties.className;\n _this.setProperties(properties);\n /**\n * @type {import(\"./Layer.js\").State}\n * @private\n */\n _this.state_ = null;\n return _this;\n }\n /**\n * Get the background for this layer.\n * @return {BackgroundColor|false} Layer background.\n */\n BaseLayer.prototype.getBackground = function () {\n return this.background_;\n };\n /**\n * @return {string} CSS class name.\n */\n BaseLayer.prototype.getClassName = function () {\n return this.className_;\n };\n /**\n * This method is not meant to be called by layers or layer renderers because the state\n * is incorrect if the layer is included in a layer group.\n *\n * @param {boolean} [opt_managed] Layer is managed.\n * @return {import(\"./Layer.js\").State} Layer state.\n */\n BaseLayer.prototype.getLayerState = function (opt_managed) {\n /** @type {import(\"./Layer.js\").State} */\n var state = this.state_ ||\n /** @type {?} */ ({\n layer: this,\n managed: opt_managed === undefined ? true : opt_managed,\n });\n var zIndex = this.getZIndex();\n state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n state.visible = this.getVisible();\n state.extent = this.getExtent();\n state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex;\n state.maxResolution = this.getMaxResolution();\n state.minResolution = Math.max(this.getMinResolution(), 0);\n state.minZoom = this.getMinZoom();\n state.maxZoom = this.getMaxZoom();\n this.state_ = state;\n return state;\n };\n /**\n * @abstract\n * @param {Array} [opt_array] Array of layers (to be\n * modified in place).\n * @return {Array} Array of layers.\n */\n BaseLayer.prototype.getLayersArray = function (opt_array) {\n return abstract();\n };\n /**\n * @abstract\n * @param {Array} [opt_states] Optional list of layer\n * states (to be modified in place).\n * @return {Array} List of layer states.\n */\n BaseLayer.prototype.getLayerStatesArray = function (opt_states) {\n return abstract();\n };\n /**\n * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n * will be visible regardless of extent.\n * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n * @observable\n * @api\n */\n BaseLayer.prototype.getExtent = function () {\n return /** @type {import(\"../extent.js\").Extent|undefined} */ (this.get(LayerProperty.EXTENT));\n };\n /**\n * Return the maximum resolution of the layer.\n * @return {number} The maximum resolution of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.getMaxResolution = function () {\n return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n };\n /**\n * Return the minimum resolution of the layer.\n * @return {number} The minimum resolution of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.getMinResolution = function () {\n return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n };\n /**\n * Return the minimum zoom level of the layer.\n * @return {number} The minimum zoom level of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.getMinZoom = function () {\n return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));\n };\n /**\n * Return the maximum zoom level of the layer.\n * @return {number} The maximum zoom level of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.getMaxZoom = function () {\n return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));\n };\n /**\n * Return the opacity of the layer (between 0 and 1).\n * @return {number} The opacity of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.getOpacity = function () {\n return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n };\n /**\n * @abstract\n * @return {import(\"../source/Source.js\").State} Source state.\n */\n BaseLayer.prototype.getSourceState = function () {\n return abstract();\n };\n /**\n * Return the visibility of the layer (`true` or `false`).\n * @return {boolean} The visibility of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.getVisible = function () {\n return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n };\n /**\n * Return the Z-index of the layer, which is used to order layers before\n * rendering. The default Z-index is 0.\n * @return {number} The Z-index of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.getZIndex = function () {\n return /** @type {number} */ (this.get(LayerProperty.Z_INDEX));\n };\n /**\n * Sets the background color.\n * @param {BackgroundColor} [opt_background] Background color.\n */\n BaseLayer.prototype.setBackground = function (opt_background) {\n this.background_ = opt_background;\n this.changed();\n };\n /**\n * Set the extent at which the layer is visible. If `undefined`, the layer\n * will be visible at all extents.\n * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.setExtent = function (extent) {\n this.set(LayerProperty.EXTENT, extent);\n };\n /**\n * Set the maximum resolution at which the layer is visible.\n * @param {number} maxResolution The maximum resolution of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.setMaxResolution = function (maxResolution) {\n this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n };\n /**\n * Set the minimum resolution at which the layer is visible.\n * @param {number} minResolution The minimum resolution of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.setMinResolution = function (minResolution) {\n this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n };\n /**\n * Set the maximum zoom (exclusive) at which the layer is visible.\n * Note that the zoom levels for layer visibility are based on the\n * view zoom level, which may be different from a tile source zoom level.\n * @param {number} maxZoom The maximum zoom of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.setMaxZoom = function (maxZoom) {\n this.set(LayerProperty.MAX_ZOOM, maxZoom);\n };\n /**\n * Set the minimum zoom (inclusive) at which the layer is visible.\n * Note that the zoom levels for layer visibility are based on the\n * view zoom level, which may be different from a tile source zoom level.\n * @param {number} minZoom The minimum zoom of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.setMinZoom = function (minZoom) {\n this.set(LayerProperty.MIN_ZOOM, minZoom);\n };\n /**\n * Set the opacity of the layer, allowed values range from 0 to 1.\n * @param {number} opacity The opacity of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.setOpacity = function (opacity) {\n assert(typeof opacity === 'number', 64); // Layer opacity must be a number\n this.set(LayerProperty.OPACITY, opacity);\n };\n /**\n * Set the visibility of the layer (`true` or `false`).\n * @param {boolean} visible The visibility of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.setVisible = function (visible) {\n this.set(LayerProperty.VISIBLE, visible);\n };\n /**\n * Set Z-index of the layer, which is used to order layers before rendering.\n * The default Z-index is 0.\n * @param {number} zindex The z-index of the layer.\n * @observable\n * @api\n */\n BaseLayer.prototype.setZIndex = function (zindex) {\n this.set(LayerProperty.Z_INDEX, zindex);\n };\n /**\n * Clean up.\n */\n BaseLayer.prototype.disposeInternal = function () {\n if (this.state_) {\n this.state_.layer = null;\n this.state_ = null;\n }\n _super.prototype.disposeInternal.call(this);\n };\n return BaseLayer;\n}(BaseObject));\nexport default BaseLayer;\n//# sourceMappingURL=Base.js.map","/**\n * @module ol/render/EventType\n */\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered before a layer is rendered.\n * @event module:ol/render/Event~RenderEvent#prerender\n * @api\n */\n PRERENDER: 'prerender',\n /**\n * Triggered after a layer is rendered.\n * @event module:ol/render/Event~RenderEvent#postrender\n * @api\n */\n POSTRENDER: 'postrender',\n /**\n * Triggered before layers are composed. When dispatched by the map, the event object will not have\n * a `context` set. When dispatched by a layer, the event object will have a `context` set. Only\n * WebGL layers currently dispatch this event.\n * @event module:ol/render/Event~RenderEvent#precompose\n * @api\n */\n PRECOMPOSE: 'precompose',\n /**\n * Triggered after layers are composed. When dispatched by the map, the event object will not have\n * a `context` set. When dispatched by a layer, the event object will have a `context` set. Only\n * WebGL layers currently dispatch this event.\n * @event module:ol/render/Event~RenderEvent#postcompose\n * @api\n */\n POSTCOMPOSE: 'postcompose',\n /**\n * Triggered when rendering is complete, i.e. all sources and tiles have\n * finished loading for the current viewport, and all tiles are faded in.\n * The event object will not have a `context` set.\n * @event module:ol/render/Event~RenderEvent#rendercomplete\n * @api\n */\n RENDERCOMPLETE: 'rendercomplete',\n};\n/**\n * @typedef {'postrender'|'precompose'|'postcompose'|'rendercomplete'} MapRenderEventTypes\n */\n/**\n * @typedef {'postrender'|'prerender'} LayerRenderEventTypes\n */\n//# sourceMappingURL=EventType.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/layer/Layer\n */\nimport BaseLayer from './Base.js';\nimport EventType from '../events/EventType.js';\nimport LayerProperty from './Property.js';\nimport RenderEventType from '../render/EventType.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {function(import(\"../PluggableMap.js\").FrameState):HTMLElement} RenderFunction\n */\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} LayerOnSignature\n */\n/**\n * @template {import(\"../source/Source.js\").default} [SourceType=import(\"../source/Source.js\").default]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {SourceType} [source] Source for this layer. If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer~Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../PluggableMap.js\").default|null} [map] Map.\n * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an\n * HTML element. Will overwrite the default rendering for the layer.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @typedef {Object} State\n * @property {import(\"./Layer.js\").default} layer Layer.\n * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.\n * @property {boolean} visible Visible.\n * @property {boolean} managed Managed.\n * @property {import(\"../extent.js\").Extent} [extent] Extent.\n * @property {number} zIndex ZIndex.\n * @property {number} maxResolution Maximum resolution.\n * @property {number} minResolution Minimum resolution.\n * @property {number} minZoom Minimum zoom.\n * @property {number} maxZoom Maximum zoom.\n */\n/**\n * @classdesc\n * Base class from which all layer types are derived. This should only be instantiated\n * in the case where a custom layer is added to the map with a custom `render` function.\n * Such a function can be specified in the `options` object, and is expected to return an HTML element.\n *\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespective of the source of that data.\n *\n * Layers are usually added to a map with {@link import(\"../PluggableMap.js\").default#addLayer map.addLayer()}. Components\n * like {@link module:ol/interaction/Draw~Draw} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * {@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n *\n * Please note that for performance reasons several layers might get rendered to\n * the same HTML element, which will cause {@link import(\"../PluggableMap.js\").default#forEachLayerAtPixel map.forEachLayerAtPixel()} to\n * give false positives. To avoid this, apply different `className` properties to the\n * layers at creation time.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n *\n * @template {import(\"../source/Source.js\").default} [SourceType=import(\"../source/Source.js\").default]\n * @template {import(\"../renderer/Layer.js\").default} [RendererType=import(\"../renderer/Layer.js\").default]\n * @api\n */\nvar Layer = /** @class */ (function (_super) {\n __extends(Layer, _super);\n /**\n * @param {Options} options Layer options.\n */\n function Layer(options) {\n var _this = this;\n var baseOptions = assign({}, options);\n delete baseOptions.source;\n _this = _super.call(this, baseOptions) || this;\n /***\n * @type {LayerOnSignature}\n */\n _this.on;\n /***\n * @type {LayerOnSignature}\n */\n _this.once;\n /***\n * @type {LayerOnSignature}\n */\n _this.un;\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n _this.mapPrecomposeKey_ = null;\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n _this.mapRenderKey_ = null;\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n _this.sourceChangeKey_ = null;\n /**\n * @private\n * @type {RendererType}\n */\n _this.renderer_ = null;\n /**\n * @protected\n * @type {boolean}\n */\n _this.rendered = false;\n // Overwrite default render method with a custom one\n if (options.render) {\n _this.render = options.render;\n }\n if (options.map) {\n _this.setMap(options.map);\n }\n _this.addChangeListener(LayerProperty.SOURCE, _this.handleSourcePropertyChange_);\n var source = options.source\n ? /** @type {SourceType} */ (options.source)\n : null;\n _this.setSource(source);\n return _this;\n }\n /**\n * @param {Array} [opt_array] Array of layers (to be modified in place).\n * @return {Array} Array of layers.\n */\n Layer.prototype.getLayersArray = function (opt_array) {\n var array = opt_array ? opt_array : [];\n array.push(this);\n return array;\n };\n /**\n * @param {Array} [opt_states] Optional list of layer states (to be modified in place).\n * @return {Array} List of layer states.\n */\n Layer.prototype.getLayerStatesArray = function (opt_states) {\n var states = opt_states ? opt_states : [];\n states.push(this.getLayerState());\n return states;\n };\n /**\n * Get the layer source.\n * @return {SourceType|null} The layer source (or `null` if not yet set).\n * @observable\n * @api\n */\n Layer.prototype.getSource = function () {\n return /** @type {SourceType} */ (this.get(LayerProperty.SOURCE)) || null;\n };\n /**\n * @return {SourceType|null} The source being rendered.\n */\n Layer.prototype.getRenderSource = function () {\n return this.getSource();\n };\n /**\n * @return {import(\"../source/Source.js\").State} Source state.\n */\n Layer.prototype.getSourceState = function () {\n var source = this.getSource();\n return !source ? 'undefined' : source.getState();\n };\n /**\n * @private\n */\n Layer.prototype.handleSourceChange_ = function () {\n this.changed();\n };\n /**\n * @private\n */\n Layer.prototype.handleSourcePropertyChange_ = function () {\n if (this.sourceChangeKey_) {\n unlistenByKey(this.sourceChangeKey_);\n this.sourceChangeKey_ = null;\n }\n var source = this.getSource();\n if (source) {\n this.sourceChangeKey_ = listen(source, EventType.CHANGE, this.handleSourceChange_, this);\n }\n this.changed();\n };\n /**\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Promise>} Promise that resolves with\n * an array of features.\n */\n Layer.prototype.getFeatures = function (pixel) {\n if (!this.renderer_) {\n return new Promise(function (resolve) { return resolve([]); });\n }\n return this.renderer_.getFeatures(pixel);\n };\n /**\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n */\n Layer.prototype.getData = function (pixel) {\n if (!this.renderer_ || !this.rendered) {\n return null;\n }\n return this.renderer_.getData(pixel);\n };\n /**\n * In charge to manage the rendering of the layer. One layer type is\n * bounded with one layer renderer.\n * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {HTMLElement} target Target which the renderer may (but need not) use\n * for rendering its content.\n * @return {HTMLElement} The rendered element.\n */\n Layer.prototype.render = function (frameState, target) {\n var layerRenderer = this.getRenderer();\n if (layerRenderer.prepareFrame(frameState)) {\n this.rendered = true;\n return layerRenderer.renderFrame(frameState, target);\n }\n };\n /**\n * Called when a layer is not visible during a map render.\n */\n Layer.prototype.unrender = function () {\n this.rendered = false;\n };\n /**\n * For use inside the library only.\n * @param {import(\"../PluggableMap.js\").default|null} map Map.\n */\n Layer.prototype.setMapInternal = function (map) {\n if (!map) {\n this.unrender();\n }\n this.set(LayerProperty.MAP, map);\n };\n /**\n * For use inside the library only.\n * @return {import(\"../PluggableMap.js\").default|null} Map.\n */\n Layer.prototype.getMapInternal = function () {\n return this.get(LayerProperty.MAP);\n };\n /**\n * Sets the layer to be rendered on top of other layers on a map. The map will\n * not manage this layer in its layers collection, and the callback in\n * {@link module:ol/Map~Map#forEachLayerAtPixel} will receive `null` as layer. This\n * is useful for temporary layers. To remove an unmanaged layer from the map,\n * use `#setMap(null)`.\n *\n * To add the layer to a map and have it managed by the map, use\n * {@link module:ol/Map~Map#addLayer} instead.\n * @param {import(\"../PluggableMap.js\").default|null} map Map.\n * @api\n */\n Layer.prototype.setMap = function (map) {\n if (this.mapPrecomposeKey_) {\n unlistenByKey(this.mapPrecomposeKey_);\n this.mapPrecomposeKey_ = null;\n }\n if (!map) {\n this.changed();\n }\n if (this.mapRenderKey_) {\n unlistenByKey(this.mapRenderKey_);\n this.mapRenderKey_ = null;\n }\n if (map) {\n this.mapPrecomposeKey_ = listen(map, RenderEventType.PRECOMPOSE, function (evt) {\n var renderEvent = \n /** @type {import(\"../render/Event.js\").default} */ (evt);\n var layerStatesArray = renderEvent.frameState.layerStatesArray;\n var layerState = this.getLayerState(false);\n // A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.\n assert(!layerStatesArray.some(function (arrayLayerState) {\n return arrayLayerState.layer === layerState.layer;\n }), 67);\n layerStatesArray.push(layerState);\n }, this);\n this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n this.changed();\n }\n };\n /**\n * Set the layer source.\n * @param {SourceType|null} source The layer source.\n * @observable\n * @api\n */\n Layer.prototype.setSource = function (source) {\n this.set(LayerProperty.SOURCE, source);\n };\n /**\n * Get the renderer for this layer.\n * @return {RendererType|null} The layer renderer.\n */\n Layer.prototype.getRenderer = function () {\n if (!this.renderer_) {\n this.renderer_ = this.createRenderer();\n }\n return this.renderer_;\n };\n /**\n * @return {boolean} The layer has a renderer.\n */\n Layer.prototype.hasRenderer = function () {\n return !!this.renderer_;\n };\n /**\n * Create a renderer for this layer.\n * @return {RendererType} A layer renderer.\n * @protected\n */\n Layer.prototype.createRenderer = function () {\n return null;\n };\n /**\n * Clean up.\n */\n Layer.prototype.disposeInternal = function () {\n if (this.renderer_) {\n this.renderer_.dispose();\n delete this.renderer_;\n }\n this.setSource(null);\n _super.prototype.disposeInternal.call(this);\n };\n return Layer;\n}(BaseLayer));\n/**\n * Return `true` if the layer is visible and if the provided view state\n * has resolution and zoom levels that are in range of the layer's min/max.\n * @param {State} layerState Layer state.\n * @param {import(\"../View.js\").State} viewState View state.\n * @return {boolean} The layer is visible at the given view state.\n */\nexport function inView(layerState, viewState) {\n if (!layerState.visible) {\n return false;\n }\n var resolution = viewState.resolution;\n if (resolution < layerState.minResolution ||\n resolution >= layerState.maxResolution) {\n return false;\n }\n var zoom = viewState.zoom;\n return zoom > layerState.minZoom && zoom <= layerState.maxZoom;\n}\nexport default Layer;\n//# sourceMappingURL=Layer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/control/Attribution\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { equals } from '../array.js';\nimport { inView } from '../layer/Layer.js';\nimport { removeChildren, replaceNode } from '../dom.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-attribution'] CSS class name.\n * @property {HTMLElement|string} [target] Specify a target if you\n * want the control to be rendered outside of the map's\n * viewport.\n * @property {boolean} [collapsible] Specify if attributions can\n * be collapsed. If not specified, sources control this behavior with their\n * `attributionsCollapsible` setting.\n * @property {boolean} [collapsed=true] Specify if attributions should\n * be collapsed at startup.\n * @property {string} [tipLabel='Attributions'] Text label to use for the button tip.\n * @property {string|HTMLElement} [label='i'] Text label to use for the\n * collapsed attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [expandClassName=className + '-expand'] CSS class name for the\n * collapsed attributions button.\n * @property {string|HTMLElement} [collapseLabel='›'] Text label to use\n * for the expanded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [collapseClassName=className + '-collapse'] CSS class name for the\n * expanded attributions button.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n */\n/**\n * @classdesc\n * Control to show all the attributions associated with the layer sources\n * in the map. This control is one of the default controls included in maps.\n * By default it will show in the bottom right portion of the map, but this can\n * be changed by using a css selector for `.ol-attribution`.\n *\n * @api\n */\nvar Attribution = /** @class */ (function (_super) {\n __extends(Attribution, _super);\n /**\n * @param {Options} [opt_options] Attribution options.\n */\n function Attribution(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n _this = _super.call(this, {\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n }) || this;\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.ulElement_ = document.createElement('ul');\n /**\n * @private\n * @type {boolean}\n */\n _this.collapsed_ =\n options.collapsed !== undefined ? options.collapsed : true;\n /**\n * @private\n * @type {boolean}\n */\n _this.userCollapsed_ = _this.collapsed_;\n /**\n * @private\n * @type {boolean}\n */\n _this.overrideCollapsible_ = options.collapsible !== undefined;\n /**\n * @private\n * @type {boolean}\n */\n _this.collapsible_ =\n options.collapsible !== undefined ? options.collapsible : true;\n if (!_this.collapsible_) {\n _this.collapsed_ = false;\n }\n var className = options.className !== undefined ? options.className : 'ol-attribution';\n var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n var expandClassName = options.expandClassName !== undefined\n ? options.expandClassName\n : className + '-expand';\n var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u203A';\n var collapseClassName = options.collapseClassName !== undefined\n ? options.collapseClassName\n : className + '-collapse';\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.collapseLabel_ = document.createElement('span');\n _this.collapseLabel_.textContent = collapseLabel;\n _this.collapseLabel_.className = collapseClassName;\n }\n else {\n _this.collapseLabel_ = collapseLabel;\n }\n var label = options.label !== undefined ? options.label : 'i';\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.label_ = document.createElement('span');\n _this.label_.textContent = label;\n _this.label_.className = expandClassName;\n }\n else {\n _this.label_ = label;\n }\n var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_;\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.toggleButton_ = document.createElement('button');\n _this.toggleButton_.setAttribute('type', 'button');\n _this.toggleButton_.setAttribute('aria-expanded', String(!_this.collapsed_));\n _this.toggleButton_.title = tipLabel;\n _this.toggleButton_.appendChild(activeLabel);\n _this.toggleButton_.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n var cssClasses = className +\n ' ' +\n CLASS_UNSELECTABLE +\n ' ' +\n CLASS_CONTROL +\n (_this.collapsed_ && _this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n (_this.collapsible_ ? '' : ' ol-uncollapsible');\n var element = _this.element;\n element.className = cssClasses;\n element.appendChild(_this.toggleButton_);\n element.appendChild(_this.ulElement_);\n /**\n * A list of currently rendered resolutions.\n * @type {Array}\n * @private\n */\n _this.renderedAttributions_ = [];\n /**\n * @private\n * @type {boolean}\n */\n _this.renderedVisible_ = true;\n return _this;\n }\n /**\n * Collect a list of visible attributions and set the collapsible state.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {Array} Attributions.\n * @private\n */\n Attribution.prototype.collectSourceAttributions_ = function (frameState) {\n /**\n * Used to determine if an attribution already exists.\n * @type {!Object}\n */\n var lookup = {};\n /**\n * A list of visible attributions.\n * @type {Array}\n */\n var visibleAttributions = [];\n var collapsible = true;\n var layerStatesArray = frameState.layerStatesArray;\n for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n var layerState = layerStatesArray[i];\n if (!inView(layerState, frameState.viewState)) {\n continue;\n }\n var source = /** @type {import(\"../layer/Layer.js\").default} */ (layerState.layer).getSource();\n if (!source) {\n continue;\n }\n var attributionGetter = source.getAttributions();\n if (!attributionGetter) {\n continue;\n }\n var attributions = attributionGetter(frameState);\n if (!attributions) {\n continue;\n }\n collapsible =\n collapsible && source.getAttributionsCollapsible() !== false;\n if (Array.isArray(attributions)) {\n for (var j = 0, jj = attributions.length; j < jj; ++j) {\n if (!(attributions[j] in lookup)) {\n visibleAttributions.push(attributions[j]);\n lookup[attributions[j]] = true;\n }\n }\n }\n else {\n if (!(attributions in lookup)) {\n visibleAttributions.push(attributions);\n lookup[attributions] = true;\n }\n }\n }\n if (!this.overrideCollapsible_) {\n this.setCollapsible(collapsible);\n }\n return visibleAttributions;\n };\n /**\n * @private\n * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n Attribution.prototype.updateElement_ = function (frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n var attributions = this.collectSourceAttributions_(frameState);\n var visible = attributions.length > 0;\n if (this.renderedVisible_ != visible) {\n this.element.style.display = visible ? '' : 'none';\n this.renderedVisible_ = visible;\n }\n if (equals(attributions, this.renderedAttributions_)) {\n return;\n }\n removeChildren(this.ulElement_);\n // append the attributions\n for (var i = 0, ii = attributions.length; i < ii; ++i) {\n var element = document.createElement('li');\n element.innerHTML = attributions[i];\n this.ulElement_.appendChild(element);\n }\n this.renderedAttributions_ = attributions;\n };\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Attribution.prototype.handleClick_ = function (event) {\n event.preventDefault();\n this.handleToggle_();\n this.userCollapsed_ = this.collapsed_;\n };\n /**\n * @private\n */\n Attribution.prototype.handleToggle_ = function () {\n this.element.classList.toggle(CLASS_COLLAPSED);\n if (this.collapsed_) {\n replaceNode(this.collapseLabel_, this.label_);\n }\n else {\n replaceNode(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n };\n /**\n * Return `true` if the attribution is collapsible, `false` otherwise.\n * @return {boolean} True if the widget is collapsible.\n * @api\n */\n Attribution.prototype.getCollapsible = function () {\n return this.collapsible_;\n };\n /**\n * Set whether the attribution should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n Attribution.prototype.setCollapsible = function (collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (this.userCollapsed_) {\n this.handleToggle_();\n }\n };\n /**\n * Collapse or expand the attribution according to the passed parameter. Will\n * not do anything if the attribution isn't collapsible or if the current\n * collapsed state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n Attribution.prototype.setCollapsed = function (collapsed) {\n this.userCollapsed_ = collapsed;\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n };\n /**\n * Return `true` when the attribution is currently collapsed or `false`\n * otherwise.\n * @return {boolean} True if the widget is collapsed.\n * @api\n */\n Attribution.prototype.getCollapsed = function () {\n return this.collapsed_;\n };\n /**\n * Update the attribution element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n Attribution.prototype.render = function (mapEvent) {\n this.updateElement_(mapEvent.frameState);\n };\n return Attribution;\n}(Control));\nexport default Attribution;\n//# sourceMappingURL=Attribution.js.map","/**\n * @module ol/pointer/EventType\n */\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n POINTERMOVE: 'pointermove',\n POINTERDOWN: 'pointerdown',\n POINTERUP: 'pointerup',\n POINTEROVER: 'pointerover',\n POINTEROUT: 'pointerout',\n POINTERENTER: 'pointerenter',\n POINTERLEAVE: 'pointerleave',\n POINTERCANCEL: 'pointercancel',\n};\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/proj/Units\n */\n/**\n * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or\n * `'us-ft'`.\n * @enum {string}\n */\nvar Units = {\n /**\n * Radians\n * @api\n */\n RADIANS: 'radians',\n /**\n * Degrees\n * @api\n */\n DEGREES: 'degrees',\n /**\n * Feet\n * @api\n */\n FEET: 'ft',\n /**\n * Meters\n * @api\n */\n METERS: 'm',\n /**\n * Pixels\n * @api\n */\n PIXELS: 'pixels',\n /**\n * Tile Pixels\n * @api\n */\n TILE_PIXELS: 'tile-pixels',\n /**\n * US Feet\n * @api\n */\n USFEET: 'us-ft',\n};\n/**\n * See http://duff.ess.washington.edu/data/raster/drg/docs/geotiff.txt\n * @type {Object}\n */\nvar unitByCode = {\n '9001': Units.METERS,\n '9002': Units.FEET,\n '9003': Units.USFEET,\n '9101': Units.RADIANS,\n '9102': Units.DEGREES,\n};\n/**\n * @param {number} code Unit code.\n * @return {Units} Units.\n */\nexport function fromCode(code) {\n return unitByCode[code];\n}\n/**\n * Meters per unit lookup table.\n * @const\n * @type {Object}\n * @api\n */\nexport var METERS_PER_UNIT = {};\n// use the radius of the Normal sphere\nMETERS_PER_UNIT[Units.RADIANS] = 6370997 / (2 * Math.PI);\nMETERS_PER_UNIT[Units.DEGREES] = (2 * Math.PI * 6370997) / 360;\nMETERS_PER_UNIT[Units.FEET] = 0.3048;\nMETERS_PER_UNIT[Units.METERS] = 1;\nMETERS_PER_UNIT[Units.USFEET] = 1200 / 3937;\nexport default Units;\n//# sourceMappingURL=Units.js.map","/**\n * @module ol/proj/Projection\n */\nimport { METERS_PER_UNIT } from './Units.js';\n/**\n * @typedef {Object} Options\n * @property {string} code The SRS identifier code, e.g. `EPSG:4326`.\n * @property {import(\"./Units.js\").default|string} [units] Units. Required unless a\n * proj4 projection is defined for `code`.\n * @property {import(\"../extent.js\").Extent} [extent] The validity extent for the SRS.\n * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.\n * @property {boolean} [global=false] Whether the projection is valid for the whole globe.\n * @property {number} [metersPerUnit] The meters per unit for the SRS.\n * If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT}\n * lookup table.\n * @property {import(\"../extent.js\").Extent} [worldExtent] The world extent for the SRS.\n * @property {function(number, import(\"../coordinate.js\").Coordinate):number} [getPointResolution]\n * Function to determine resolution at a point. The function is called with a\n * `number` view resolution and a {@link module:ol/coordinate~Coordinate Coordinate} as arguments, and returns\n * the `number` resolution in projection units at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj.getPointResolution getPointResolution()} function will be used.\n */\n/**\n * @classdesc\n * Projection definition class. One of these is created for each projection\n * supported in the application and stored in the {@link module:ol/proj} namespace.\n * You can use these in applications, but this is not required, as API params\n * and options use {@link module:ol/proj~ProjectionLike} which means the simple string\n * code will suffice.\n *\n * You can use {@link module:ol/proj.get} to retrieve the object for a particular\n * projection.\n *\n * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together\n * with the following aliases:\n * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326,\n * urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84,\n * http://www.opengis.net/gml/srs/epsg.xml#4326,\n * urn:x-ogc:def:crs:EPSG:4326\n * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913,\n * urn:ogc:def:crs:EPSG:6.18:3:3857,\n * http://www.opengis.net/gml/srs/epsg.xml#3857\n *\n * If you use [proj4js](https://github.com/proj4js/proj4js), aliases can\n * be added using `proj4.defs()`. After all required projection definitions are\n * added, call the {@link module:ol/proj/proj4.register} function.\n *\n * @api\n */\nvar Projection = /** @class */ (function () {\n /**\n * @param {Options} options Projection options.\n */\n function Projection(options) {\n /**\n * @private\n * @type {string}\n */\n this.code_ = options.code;\n /**\n * Units of projected coordinates. When set to `TILE_PIXELS`, a\n * `this.extent_` and `this.worldExtent_` must be configured properly for each\n * tile.\n * @private\n * @type {import(\"./Units.js\").default}\n */\n this.units_ = /** @type {import(\"./Units.js\").default} */ (options.units);\n /**\n * Validity extent of the projection in projected coordinates. For projections\n * with `TILE_PIXELS` units, this is the extent of the tile in\n * tile pixel space.\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = options.extent !== undefined ? options.extent : null;\n /**\n * Extent of the world in EPSG:4326. For projections with\n * `TILE_PIXELS` units, this is the extent of the tile in\n * projected coordinate space.\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.worldExtent_ =\n options.worldExtent !== undefined ? options.worldExtent : null;\n /**\n * @private\n * @type {string}\n */\n this.axisOrientation_ =\n options.axisOrientation !== undefined ? options.axisOrientation : 'enu';\n /**\n * @private\n * @type {boolean}\n */\n this.global_ = options.global !== undefined ? options.global : false;\n /**\n * @private\n * @type {boolean}\n */\n this.canWrapX_ = !!(this.global_ && this.extent_);\n /**\n * @private\n * @type {function(number, import(\"../coordinate.js\").Coordinate):number|undefined}\n */\n this.getPointResolutionFunc_ = options.getPointResolution;\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.defaultTileGrid_ = null;\n /**\n * @private\n * @type {number|undefined}\n */\n this.metersPerUnit_ = options.metersPerUnit;\n }\n /**\n * @return {boolean} The projection is suitable for wrapping the x-axis\n */\n Projection.prototype.canWrapX = function () {\n return this.canWrapX_;\n };\n /**\n * Get the code for this projection, e.g. 'EPSG:4326'.\n * @return {string} Code.\n * @api\n */\n Projection.prototype.getCode = function () {\n return this.code_;\n };\n /**\n * Get the validity extent for this projection.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n Projection.prototype.getExtent = function () {\n return this.extent_;\n };\n /**\n * Get the units of this projection.\n * @return {import(\"./Units.js\").default} Units.\n * @api\n */\n Projection.prototype.getUnits = function () {\n return this.units_;\n };\n /**\n * Get the amount of meters per unit of this projection. If the projection is\n * not configured with `metersPerUnit` or a units identifier, the return is\n * `undefined`.\n * @return {number|undefined} Meters.\n * @api\n */\n Projection.prototype.getMetersPerUnit = function () {\n return this.metersPerUnit_ || METERS_PER_UNIT[this.units_];\n };\n /**\n * Get the world extent for this projection.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n Projection.prototype.getWorldExtent = function () {\n return this.worldExtent_;\n };\n /**\n * Get the axis orientation of this projection.\n * Example values are:\n * enu - the default easting, northing, elevation.\n * neu - northing, easting, up - useful for \"lat/long\" geographic coordinates,\n * or south orientated transverse mercator.\n * wnu - westing, northing, up - some planetary coordinate systems have\n * \"west positive\" coordinate systems\n * @return {string} Axis orientation.\n * @api\n */\n Projection.prototype.getAxisOrientation = function () {\n return this.axisOrientation_;\n };\n /**\n * Is this projection a global projection which spans the whole world?\n * @return {boolean} Whether the projection is global.\n * @api\n */\n Projection.prototype.isGlobal = function () {\n return this.global_;\n };\n /**\n * Set if the projection is a global projection which spans the whole world\n * @param {boolean} global Whether the projection is global.\n * @api\n */\n Projection.prototype.setGlobal = function (global) {\n this.global_ = global;\n this.canWrapX_ = !!(global && this.extent_);\n };\n /**\n * @return {import(\"../tilegrid/TileGrid.js\").default} The default tile grid.\n */\n Projection.prototype.getDefaultTileGrid = function () {\n return this.defaultTileGrid_;\n };\n /**\n * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n */\n Projection.prototype.setDefaultTileGrid = function (tileGrid) {\n this.defaultTileGrid_ = tileGrid;\n };\n /**\n * Set the validity extent for this projection.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n Projection.prototype.setExtent = function (extent) {\n this.extent_ = extent;\n this.canWrapX_ = !!(this.global_ && extent);\n };\n /**\n * Set the world extent for this projection.\n * @param {import(\"../extent.js\").Extent} worldExtent World extent\n * [minlon, minlat, maxlon, maxlat].\n * @api\n */\n Projection.prototype.setWorldExtent = function (worldExtent) {\n this.worldExtent_ = worldExtent;\n };\n /**\n * Set the getPointResolution function (see {@link module:ol/proj.getPointResolution}\n * for this projection.\n * @param {function(number, import(\"../coordinate.js\").Coordinate):number} func Function\n * @api\n */\n Projection.prototype.setGetPointResolution = function (func) {\n this.getPointResolutionFunc_ = func;\n };\n /**\n * Get the custom point resolution function for this projection (if set).\n * @return {function(number, import(\"../coordinate.js\").Coordinate):number|undefined} The custom point\n * resolution function (if set).\n */\n Projection.prototype.getPointResolutionFunc = function () {\n return this.getPointResolutionFunc_;\n };\n return Projection;\n}());\nexport default Projection;\n//# sourceMappingURL=Projection.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/proj/epsg3857\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\nimport { cosh } from '../math.js';\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n/**\n * @const\n * @type {number}\n */\nexport var HALF_SIZE = Math.PI * RADIUS;\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [-HALF_SIZE, -HALF_SIZE, HALF_SIZE, HALF_SIZE];\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var WORLD_EXTENT = [-180, -85, 180, 85];\n/**\n * Maximum safe value in y direction\n * @const\n * @type {number}\n */\nexport var MAX_SAFE_Y = RADIUS * Math.log(Math.tan(Math.PI / 2));\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nvar EPSG3857Projection = /** @class */ (function (_super) {\n __extends(EPSG3857Projection, _super);\n /**\n * @param {string} code Code.\n */\n function EPSG3857Projection(code) {\n return _super.call(this, {\n code: code,\n units: Units.METERS,\n extent: EXTENT,\n global: true,\n worldExtent: WORLD_EXTENT,\n getPointResolution: function (resolution, point) {\n return resolution / cosh(point[1] / RADIUS);\n },\n }) || this;\n }\n return EPSG3857Projection;\n}(Projection));\n/**\n * Projections equal to EPSG:3857.\n *\n * @const\n * @type {Array}\n */\nexport var PROJECTIONS = [\n new EPSG3857Projection('EPSG:3857'),\n new EPSG3857Projection('EPSG:102100'),\n new EPSG3857Projection('EPSG:102113'),\n new EPSG3857Projection('EPSG:900913'),\n new EPSG3857Projection('http://www.opengis.net/def/crs/EPSG/0/3857'),\n new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857'),\n];\n/**\n * Transformation from EPSG:4326 to EPSG:3857.\n *\n * @param {Array} input Input array of coordinate values.\n * @param {Array} [opt_output] Output array of coordinate values.\n * @param {number} [opt_dimension] Dimension (default is `2`).\n * @return {Array} Output array of coordinate values.\n */\nexport function fromEPSG4326(input, opt_output, opt_dimension) {\n var length = input.length;\n var dimension = opt_dimension > 1 ? opt_dimension : 2;\n var output = opt_output;\n if (output === undefined) {\n if (dimension > 2) {\n // preserve values beyond second dimension\n output = input.slice();\n }\n else {\n output = new Array(length);\n }\n }\n for (var i = 0; i < length; i += dimension) {\n output[i] = (HALF_SIZE * input[i]) / 180;\n var y = RADIUS * Math.log(Math.tan((Math.PI * (+input[i + 1] + 90)) / 360));\n if (y > MAX_SAFE_Y) {\n y = MAX_SAFE_Y;\n }\n else if (y < -MAX_SAFE_Y) {\n y = -MAX_SAFE_Y;\n }\n output[i + 1] = y;\n }\n return output;\n}\n/**\n * Transformation from EPSG:3857 to EPSG:4326.\n *\n * @param {Array} input Input array of coordinate values.\n * @param {Array} [opt_output] Output array of coordinate values.\n * @param {number} [opt_dimension] Dimension (default is `2`).\n * @return {Array} Output array of coordinate values.\n */\nexport function toEPSG4326(input, opt_output, opt_dimension) {\n var length = input.length;\n var dimension = opt_dimension > 1 ? opt_dimension : 2;\n var output = opt_output;\n if (output === undefined) {\n if (dimension > 2) {\n // preserve values beyond second dimension\n output = input.slice();\n }\n else {\n output = new Array(length);\n }\n }\n for (var i = 0; i < length; i += dimension) {\n output[i] = (180 * input[i]) / HALF_SIZE;\n output[i + 1] =\n (360 * Math.atan(Math.exp(input[i + 1] / RADIUS))) / Math.PI - 90;\n }\n return output;\n}\n//# sourceMappingURL=epsg3857.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n/**\n * Extent of the EPSG:4326 projection which is the whole world.\n *\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [-180, -90, 180, 90];\n/**\n * @const\n * @type {number}\n */\nexport var METERS_PER_UNIT = (Math.PI * RADIUS) / 180;\n/**\n * @classdesc\n * Projection object for WGS84 geographic coordinates (EPSG:4326).\n *\n * Note that OpenLayers does not strictly comply with the EPSG definition.\n * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).\n * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.\n */\nvar EPSG4326Projection = /** @class */ (function (_super) {\n __extends(EPSG4326Projection, _super);\n /**\n * @param {string} code Code.\n * @param {string} [opt_axisOrientation] Axis orientation.\n */\n function EPSG4326Projection(code, opt_axisOrientation) {\n return _super.call(this, {\n code: code,\n units: Units.DEGREES,\n extent: EXTENT,\n axisOrientation: opt_axisOrientation,\n global: true,\n metersPerUnit: METERS_PER_UNIT,\n worldExtent: EXTENT,\n }) || this;\n }\n return EPSG4326Projection;\n}(Projection));\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array}\n */\nexport var PROJECTIONS = [\n new EPSG4326Projection('CRS:84'),\n new EPSG4326Projection('EPSG:4326', 'neu'),\n new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n new EPSG4326Projection('http://www.opengis.net/def/crs/OGC/1.3/CRS84'),\n new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n new EPSG4326Projection('http://www.opengis.net/def/crs/EPSG/0/4326', 'neu'),\n];\n//# sourceMappingURL=epsg4326.js.map","/**\n * @module ol/proj/projections\n */\n/**\n * @type {Object}\n */\nvar cache = {};\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n cache = {};\n}\n/**\n * Get a cached projection by code.\n * @param {string} code The code for the projection.\n * @return {import(\"./Projection.js\").default} The projection (if cached).\n */\nexport function get(code) {\n return (cache[code] ||\n cache[code.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\\w+)$/, 'EPSG:$3')] ||\n null);\n}\n/**\n * Add a projection to the cache.\n * @param {string} code The projection code.\n * @param {import(\"./Projection.js\").default} projection The projection to cache.\n */\nexport function add(code, projection) {\n cache[code] = projection;\n}\n//# sourceMappingURL=projections.js.map","/**\n * @module ol/proj/transforms\n */\nimport { isEmpty } from '../obj.js';\n/**\n * @private\n * @type {!Object>}\n */\nvar transforms = {};\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n transforms = {};\n}\n/**\n * Registers a conversion function to convert coordinates from the source\n * projection to the destination projection.\n *\n * @param {import(\"./Projection.js\").default} source Source.\n * @param {import(\"./Projection.js\").default} destination Destination.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform.\n */\nexport function add(source, destination, transformFn) {\n var sourceCode = source.getCode();\n var destinationCode = destination.getCode();\n if (!(sourceCode in transforms)) {\n transforms[sourceCode] = {};\n }\n transforms[sourceCode][destinationCode] = transformFn;\n}\n/**\n * Unregisters the conversion function to convert coordinates from the source\n * projection to the destination projection. This method is used to clean up\n * cached transforms during testing.\n *\n * @param {import(\"./Projection.js\").default} source Source projection.\n * @param {import(\"./Projection.js\").default} destination Destination projection.\n * @return {import(\"../proj.js\").TransformFunction} transformFn The unregistered transform.\n */\nexport function remove(source, destination) {\n var sourceCode = source.getCode();\n var destinationCode = destination.getCode();\n var transform = transforms[sourceCode][destinationCode];\n delete transforms[sourceCode][destinationCode];\n if (isEmpty(transforms[sourceCode])) {\n delete transforms[sourceCode];\n }\n return transform;\n}\n/**\n * Get a transform given a source code and a destination code.\n * @param {string} sourceCode The code for the source projection.\n * @param {string} destinationCode The code for the destination projection.\n * @return {import(\"../proj.js\").TransformFunction|undefined} The transform function (if found).\n */\nexport function get(sourceCode, destinationCode) {\n var transform;\n if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n transform = transforms[sourceCode][destinationCode];\n }\n return transform;\n}\n//# sourceMappingURL=transforms.js.map","/**\n * @module ol/extent\n */\nimport Relationship from './extent/Relationship.js';\nimport { assert } from './asserts.js';\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array} Extent\n * @api\n */\n/**\n * Extent corner.\n * @typedef {'bottom-left' | 'bottom-right' | 'top-left' | 'top-right'} Corner\n */\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n var extent = createEmpty();\n for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n/**\n * @param {Array} xs Xs.\n * @param {Array} ys Ys.\n * @param {Extent} [opt_extent] Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, opt_extent) {\n var minX = Math.min.apply(null, xs);\n var minY = Math.min.apply(null, ys);\n var maxX = Math.max.apply(null, xs);\n var maxY = Math.max.apply(null, ys);\n return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n}\n/**\n * Return extent increased by the provided value.\n * @param {Extent} extent Extent.\n * @param {number} value The amount by which the extent should be buffered.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function buffer(extent, value, opt_extent) {\n if (opt_extent) {\n opt_extent[0] = extent[0] - value;\n opt_extent[1] = extent[1] - value;\n opt_extent[2] = extent[2] + value;\n opt_extent[3] = extent[3] + value;\n return opt_extent;\n }\n else {\n return [\n extent[0] - value,\n extent[1] - value,\n extent[2] + value,\n extent[3] + value,\n ];\n }\n}\n/**\n * Creates a clone of an extent.\n *\n * @param {Extent} extent Extent to clone.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} The clone.\n */\nexport function clone(extent, opt_extent) {\n if (opt_extent) {\n opt_extent[0] = extent[0];\n opt_extent[1] = extent[1];\n opt_extent[2] = extent[2];\n opt_extent[3] = extent[3];\n return opt_extent;\n }\n else {\n return extent.slice();\n }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nexport function closestSquaredDistanceXY(extent, x, y) {\n var dx, dy;\n if (x < extent[0]) {\n dx = extent[0] - x;\n }\n else if (extent[2] < x) {\n dx = x - extent[2];\n }\n else {\n dx = 0;\n }\n if (y < extent[1]) {\n dy = extent[1] - y;\n }\n else if (extent[3] < y) {\n dy = y - extent[3];\n }\n else {\n dy = 0;\n }\n return dx * dx + dy * dy;\n}\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} The coordinate is contained in the extent.\n * @api\n */\nexport function containsCoordinate(extent, coordinate) {\n return containsXY(extent, coordinate[0], coordinate[1]);\n}\n/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The second extent is contained by or on the edge of the\n * first.\n * @api\n */\nexport function containsExtent(extent1, extent2) {\n return (extent1[0] <= extent2[0] &&\n extent2[2] <= extent1[2] &&\n extent1[1] <= extent2[1] &&\n extent2[3] <= extent1[3]);\n}\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n * @return {boolean} The x, y values are contained in the extent.\n * @api\n */\nexport function containsXY(extent, x, y) {\n return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\n/**\n * Get the relationship between a coordinate and extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate The coordinate.\n * @return {import(\"./extent/Relationship.js\").default} The relationship (bitwise compare with\n * import(\"./extent/Relationship.js\").Relationship).\n */\nexport function coordinateRelationship(extent, coordinate) {\n var minX = extent[0];\n var minY = extent[1];\n var maxX = extent[2];\n var maxY = extent[3];\n var x = coordinate[0];\n var y = coordinate[1];\n var relationship = Relationship.UNKNOWN;\n if (x < minX) {\n relationship = relationship | Relationship.LEFT;\n }\n else if (x > maxX) {\n relationship = relationship | Relationship.RIGHT;\n }\n if (y < minY) {\n relationship = relationship | Relationship.BELOW;\n }\n else if (y > maxY) {\n relationship = relationship | Relationship.ABOVE;\n }\n if (relationship === Relationship.UNKNOWN) {\n relationship = Relationship.INTERSECTING;\n }\n return relationship;\n}\n/**\n * Create an empty extent.\n * @return {Extent} Empty extent.\n * @api\n */\nexport function createEmpty() {\n return [Infinity, Infinity, -Infinity, -Infinity];\n}\n/**\n * Create a new extent or update the provided extent.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {Extent} [opt_extent] Destination extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdate(minX, minY, maxX, maxY, opt_extent) {\n if (opt_extent) {\n opt_extent[0] = minX;\n opt_extent[1] = minY;\n opt_extent[2] = maxX;\n opt_extent[3] = maxY;\n return opt_extent;\n }\n else {\n return [minX, minY, maxX, maxY];\n }\n}\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateEmpty(opt_extent) {\n return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, opt_extent);\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinate(coordinate, opt_extent) {\n var x = coordinate[0];\n var y = coordinate[1];\n return createOrUpdate(x, y, x, y, opt_extent);\n}\n/**\n * @param {Array} coordinates Coordinates.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, opt_extent) {\n var extent = createOrUpdateEmpty(opt_extent);\n return extendCoordinates(extent, coordinates);\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(flatCoordinates, offset, end, stride, opt_extent) {\n var extent = createOrUpdateEmpty(opt_extent);\n return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n/**\n * @param {Array>} rings Rings.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, opt_extent) {\n var extent = createOrUpdateEmpty(opt_extent);\n return extendRings(extent, rings);\n}\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nexport function equals(extent1, extent2) {\n return (extent1[0] == extent2[0] &&\n extent1[2] == extent2[2] &&\n extent1[1] == extent2[1] &&\n extent1[3] == extent2[3]);\n}\n/**\n * Determine if two extents are approximately equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {number} tolerance Tolerance in extent coordinate units.\n * @return {boolean} The two extents differ by less than the tolerance.\n */\nexport function approximatelyEquals(extent1, extent2, tolerance) {\n return (Math.abs(extent1[0] - extent2[0]) < tolerance &&\n Math.abs(extent1[2] - extent2[2]) < tolerance &&\n Math.abs(extent1[1] - extent2[1]) < tolerance &&\n Math.abs(extent1[3] - extent2[3]) < tolerance);\n}\n/**\n * Modify an extent to include another extent.\n * @param {Extent} extent1 The extent to be modified.\n * @param {Extent} extent2 The extent that will be included in the first.\n * @return {Extent} A reference to the first (extended) extent.\n * @api\n */\nexport function extend(extent1, extent2) {\n if (extent2[0] < extent1[0]) {\n extent1[0] = extent2[0];\n }\n if (extent2[2] > extent1[2]) {\n extent1[2] = extent2[2];\n }\n if (extent2[1] < extent1[1]) {\n extent1[1] = extent2[1];\n }\n if (extent2[3] > extent1[3]) {\n extent1[3] = extent2[3];\n }\n return extent1;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n */\nexport function extendCoordinate(extent, coordinate) {\n if (coordinate[0] < extent[0]) {\n extent[0] = coordinate[0];\n }\n if (coordinate[0] > extent[2]) {\n extent[2] = coordinate[0];\n }\n if (coordinate[1] < extent[1]) {\n extent[1] = coordinate[1];\n }\n if (coordinate[1] > extent[3]) {\n extent[3] = coordinate[1];\n }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n extendCoordinate(extent, coordinates[i]);\n }\n return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(extent, flatCoordinates, offset, end, stride) {\n for (; offset < end; offset += stride) {\n extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n }\n return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n for (var i = 0, ii = rings.length; i < ii; ++i) {\n extendCoordinates(extent, rings[i]);\n }\n return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nexport function extendXY(extent, x, y) {\n extent[0] = Math.min(extent[0], x);\n extent[1] = Math.min(extent[1], y);\n extent[2] = Math.max(extent[2], x);\n extent[3] = Math.max(extent[3], y);\n}\n/**\n * This function calls `callback` for each corner of the extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise the function returns `false`.\n * @param {Extent} extent Extent.\n * @param {function(import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @return {S|boolean} Value.\n * @template S\n */\nexport function forEachCorner(extent, callback) {\n var val;\n val = callback(getBottomLeft(extent));\n if (val) {\n return val;\n }\n val = callback(getBottomRight(extent));\n if (val) {\n return val;\n }\n val = callback(getTopRight(extent));\n if (val) {\n return val;\n }\n val = callback(getTopLeft(extent));\n if (val) {\n return val;\n }\n return false;\n}\n/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nexport function getArea(extent) {\n var area = 0;\n if (!isEmpty(extent)) {\n area = getWidth(extent) * getHeight(extent);\n }\n return area;\n}\n/**\n * Get the bottom left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom left coordinate.\n * @api\n */\nexport function getBottomLeft(extent) {\n return [extent[0], extent[1]];\n}\n/**\n * Get the bottom right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom right coordinate.\n * @api\n */\nexport function getBottomRight(extent) {\n return [extent[2], extent[1]];\n}\n/**\n * Get the center coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Center.\n * @api\n */\nexport function getCenter(extent) {\n return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];\n}\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {Corner} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n var coordinate;\n if (corner === 'bottom-left') {\n coordinate = getBottomLeft(extent);\n }\n else if (corner === 'bottom-right') {\n coordinate = getBottomRight(extent);\n }\n else if (corner === 'top-left') {\n coordinate = getTopLeft(extent);\n }\n else if (corner === 'top-right') {\n coordinate = getTopRight(extent);\n }\n else {\n assert(false, 13); // Invalid corner\n }\n return coordinate;\n}\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nexport function getEnlargedArea(extent1, extent2) {\n var minX = Math.min(extent1[0], extent2[0]);\n var minY = Math.min(extent1[1], extent2[1]);\n var maxX = Math.max(extent1[2], extent2[2]);\n var maxY = Math.max(extent1[3], extent2[3]);\n return (maxX - minX) * (maxY - minY);\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @param {Extent} [opt_extent] Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(center, resolution, rotation, size, opt_extent) {\n var _a = getRotatedViewport(center, resolution, rotation, size), x0 = _a[0], y0 = _a[1], x1 = _a[2], y1 = _a[3], x2 = _a[4], y2 = _a[5], x3 = _a[6], y3 = _a[7];\n return createOrUpdate(Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3), Math.max(x0, x1, x2, x3), Math.max(y0, y1, y2, y3), opt_extent);\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @return {Array} Linear ring representing the viewport.\n */\nexport function getRotatedViewport(center, resolution, rotation, size) {\n var dx = (resolution * size[0]) / 2;\n var dy = (resolution * size[1]) / 2;\n var cosRotation = Math.cos(rotation);\n var sinRotation = Math.sin(rotation);\n var xCos = dx * cosRotation;\n var xSin = dx * sinRotation;\n var yCos = dy * cosRotation;\n var ySin = dy * sinRotation;\n var x = center[0];\n var y = center[1];\n return [\n x - xCos + ySin,\n y - xSin - yCos,\n x - xCos - ySin,\n y - xSin + yCos,\n x + xCos - ySin,\n y + xSin + yCos,\n x + xCos + ySin,\n y + xSin - yCos,\n x - xCos + ySin,\n y - xSin - yCos,\n ];\n}\n/**\n * Get the height of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Height.\n * @api\n */\nexport function getHeight(extent) {\n return extent[3] - extent[1];\n}\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n var intersection = getIntersection(extent1, extent2);\n return getArea(intersection);\n}\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent} [opt_extent] Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, opt_extent) {\n var intersection = opt_extent ? opt_extent : createEmpty();\n if (intersects(extent1, extent2)) {\n if (extent1[0] > extent2[0]) {\n intersection[0] = extent1[0];\n }\n else {\n intersection[0] = extent2[0];\n }\n if (extent1[1] > extent2[1]) {\n intersection[1] = extent1[1];\n }\n else {\n intersection[1] = extent2[1];\n }\n if (extent1[2] < extent2[2]) {\n intersection[2] = extent1[2];\n }\n else {\n intersection[2] = extent2[2];\n }\n if (extent1[3] < extent2[3]) {\n intersection[3] = extent1[3];\n }\n else {\n intersection[3] = extent2[3];\n }\n }\n else {\n createOrUpdateEmpty(intersection);\n }\n return intersection;\n}\n/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nexport function getMargin(extent) {\n return getWidth(extent) + getHeight(extent);\n}\n/**\n * Get the size (width, height) of an extent.\n * @param {Extent} extent The extent.\n * @return {import(\"./size.js\").Size} The extent size.\n * @api\n */\nexport function getSize(extent) {\n return [extent[2] - extent[0], extent[3] - extent[1]];\n}\n/**\n * Get the top left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top left coordinate.\n * @api\n */\nexport function getTopLeft(extent) {\n return [extent[0], extent[3]];\n}\n/**\n * Get the top right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top right coordinate.\n * @api\n */\nexport function getTopRight(extent) {\n return [extent[2], extent[3]];\n}\n/**\n * Get the width of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Width.\n * @api\n */\nexport function getWidth(extent) {\n return extent[2] - extent[0];\n}\n/**\n * Determine if one extent intersects another.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nexport function intersects(extent1, extent2) {\n return (extent1[0] <= extent2[2] &&\n extent1[2] >= extent2[0] &&\n extent1[1] <= extent2[3] &&\n extent1[3] >= extent2[1]);\n}\n/**\n * Determine if an extent is empty.\n * @param {Extent} extent Extent.\n * @return {boolean} Is empty.\n * @api\n */\nexport function isEmpty(extent) {\n return extent[2] < extent[0] || extent[3] < extent[1];\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function returnOrUpdate(extent, opt_extent) {\n if (opt_extent) {\n opt_extent[0] = extent[0];\n opt_extent[1] = extent[1];\n opt_extent[2] = extent[2];\n opt_extent[3] = extent[3];\n return opt_extent;\n }\n else {\n return extent;\n }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n var deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n var deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n extent[0] -= deltaX;\n extent[2] += deltaX;\n extent[1] -= deltaY;\n extent[3] += deltaY;\n}\n/**\n * Determine if the segment between two coordinates intersects (crosses,\n * touches, or is contained by) the provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nexport function intersectsSegment(extent, start, end) {\n var intersects = false;\n var startRel = coordinateRelationship(extent, start);\n var endRel = coordinateRelationship(extent, end);\n if (startRel === Relationship.INTERSECTING ||\n endRel === Relationship.INTERSECTING) {\n intersects = true;\n }\n else {\n var minX = extent[0];\n var minY = extent[1];\n var maxX = extent[2];\n var maxY = extent[3];\n var startX = start[0];\n var startY = start[1];\n var endX = end[0];\n var endY = end[1];\n var slope = (endY - startY) / (endX - startX);\n var x = void 0, y = void 0;\n if (!!(endRel & Relationship.ABOVE) && !(startRel & Relationship.ABOVE)) {\n // potentially intersects top\n x = endX - (endY - maxY) / slope;\n intersects = x >= minX && x <= maxX;\n }\n if (!intersects &&\n !!(endRel & Relationship.RIGHT) &&\n !(startRel & Relationship.RIGHT)) {\n // potentially intersects right\n y = endY - (endX - maxX) * slope;\n intersects = y >= minY && y <= maxY;\n }\n if (!intersects &&\n !!(endRel & Relationship.BELOW) &&\n !(startRel & Relationship.BELOW)) {\n // potentially intersects bottom\n x = endX - (endY - minY) / slope;\n intersects = x >= minX && x <= maxX;\n }\n if (!intersects &&\n !!(endRel & Relationship.LEFT) &&\n !(startRel & Relationship.LEFT)) {\n // potentially intersects left\n y = endY - (endX - minX) * slope;\n intersects = y >= minY && y <= maxY;\n }\n }\n return intersects;\n}\n/**\n * Apply a transform function to the extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./proj.js\").TransformFunction} transformFn Transform function.\n * Called with `[minX, minY, maxX, maxY]` extent coordinates.\n * @param {Extent} [opt_extent] Destination extent.\n * @param {number} [opt_stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, transformFn, opt_extent, opt_stops) {\n var coordinates = [];\n if (opt_stops > 1) {\n var width = extent[2] - extent[0];\n var height = extent[3] - extent[1];\n for (var i = 0; i < opt_stops; ++i) {\n coordinates.push(extent[0] + (width * i) / opt_stops, extent[1], extent[2], extent[1] + (height * i) / opt_stops, extent[2] - (width * i) / opt_stops, extent[3], extent[0], extent[3] - (height * i) / opt_stops);\n }\n }\n else {\n coordinates = [\n extent[0],\n extent[1],\n extent[2],\n extent[1],\n extent[2],\n extent[3],\n extent[0],\n extent[3],\n ];\n }\n transformFn(coordinates, coordinates, 2);\n var xs = [];\n var ys = [];\n for (var i = 0, l = coordinates.length; i < l; i += 2) {\n xs.push(coordinates[i]);\n ys.push(coordinates[i + 1]);\n }\n return _boundingExtentXYs(xs, ys, opt_extent);\n}\n/**\n * Modifies the provided extent in-place to be within the real world\n * extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Extent} The extent within the real world extent.\n */\nexport function wrapX(extent, projection) {\n var projectionExtent = projection.getExtent();\n var center = getCenter(extent);\n if (projection.canWrapX() &&\n (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])) {\n var worldWidth = getWidth(projectionExtent);\n var worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth);\n var offset = worldsAway * worldWidth;\n extent[0] -= offset;\n extent[2] -= offset;\n }\n return extent;\n}\n/**\n * Fits the extent to the real world\n *\n * If the extent does not cross the anti meridian, this will return the extent in an array\n * If the extent crosses the anti meridian, the extent will be sliced, so each part fits within the\n * real world\n *\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Array} The extent within the real world extent.\n */\nexport function wrapAndSliceX(extent, projection) {\n if (projection.canWrapX()) {\n var projectionExtent = projection.getExtent();\n if (!isFinite(extent[0]) || !isFinite(extent[2])) {\n return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n }\n wrapX(extent, projection);\n var worldWidth = getWidth(projectionExtent);\n if (getWidth(extent) > worldWidth) {\n // the extent wraps around on itself\n return [[projectionExtent[0], extent[1], projectionExtent[2], extent[3]]];\n }\n else if (extent[0] < projectionExtent[0]) {\n // the extent crosses the anti meridian, so it needs to be sliced\n return [\n [extent[0] + worldWidth, extent[1], projectionExtent[2], extent[3]],\n [projectionExtent[0], extent[1], extent[2], extent[3]],\n ];\n }\n else if (extent[2] > projectionExtent[2]) {\n // the extent crosses the anti meridian, so it needs to be sliced\n return [\n [extent[0], extent[1], projectionExtent[2], extent[3]],\n [projectionExtent[0], extent[1], extent[2] - worldWidth, extent[3]],\n ];\n }\n }\n return [extent];\n}\n//# sourceMappingURL=extent.js.map","/**\n * @module ol/extent/Relationship\n */\n/**\n * Relationship to an extent.\n * @enum {number}\n */\nexport default {\n UNKNOWN: 0,\n INTERSECTING: 1,\n ABOVE: 2,\n RIGHT: 4,\n BELOW: 8,\n LEFT: 16,\n};\n//# sourceMappingURL=Relationship.js.map","/**\n * @module ol/coordinate\n */\nimport { getWidth } from './extent.js';\nimport { modulo } from './math.js';\nimport { padNumber } from './string.js';\n/**\n * An array of numbers representing an xy coordinate. Example: `[16, 48]`.\n * @typedef {Array} Coordinate\n * @api\n */\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n/**\n * Add `delta` to `coordinate`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n * import {add} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * add(coord, [-2, 4]);\n * // coord is now [5.85, 51.983333]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {Coordinate} delta Delta.\n * @return {Coordinate} The input coordinate adjusted by\n * the given delta.\n * @api\n */\nexport function add(coordinate, delta) {\n coordinate[0] += +delta[0];\n coordinate[1] += +delta[1];\n return coordinate;\n}\n/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\nexport function closestOnCircle(coordinate, circle) {\n var r = circle.getRadius();\n var center = circle.getCenter();\n var x0 = center[0];\n var y0 = center[1];\n var x1 = coordinate[0];\n var y1 = coordinate[1];\n var dx = x1 - x0;\n var dy = y1 - y0;\n if (dx === 0 && dy === 0) {\n dx = 1;\n }\n var d = Math.sqrt(dx * dx + dy * dy);\n var x = x0 + (r * dx) / d;\n var y = y0 + (r * dy) / d;\n return [x, y];\n}\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nexport function closestOnSegment(coordinate, segment) {\n var x0 = coordinate[0];\n var y0 = coordinate[1];\n var start = segment[0];\n var end = segment[1];\n var x1 = start[0];\n var y1 = start[1];\n var x2 = end[0];\n var y2 = end[1];\n var dx = x2 - x1;\n var dy = y2 - y1;\n var along = dx === 0 && dy === 0\n ? 0\n : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0);\n var x, y;\n if (along <= 0) {\n x = x1;\n y = y1;\n }\n else if (along >= 1) {\n x = x2;\n y = y2;\n }\n else {\n x = x1 + along * dx;\n y = y1 + along * dy;\n }\n return [x, y];\n}\n/**\n * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be\n * used to format\n * a {Coordinate} to a string.\n *\n * Example without specifying the fractional digits:\n *\n * import {createStringXY} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var stringifyFunc = createStringXY();\n * var out = stringifyFunc(coord);\n * // out is now '8, 48'\n *\n * Example with explicitly specifying 2 fractional digits:\n *\n * import {createStringXY} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var stringifyFunc = createStringXY(2);\n * var out = stringifyFunc(coord);\n * // out is now '7.85, 47.98'\n *\n * @param {number} [opt_fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nexport function createStringXY(opt_fractionDigits) {\n return (\n /**\n * @param {Coordinate} coordinate Coordinate.\n * @return {string} String XY.\n */\n function (coordinate) {\n return toStringXY(coordinate, opt_fractionDigits);\n });\n}\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number} [opt_fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} String.\n */\nexport function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {\n var normalizedDegrees = modulo(degrees + 180, 360) - 180;\n var x = Math.abs(3600 * normalizedDegrees);\n var dflPrecision = opt_fractionDigits || 0;\n var precision = Math.pow(10, dflPrecision);\n var deg = Math.floor(x / 3600);\n var min = Math.floor((x - deg * 3600) / 60);\n var sec = x - deg * 3600 - min * 60;\n sec = Math.ceil(sec * precision) / precision;\n if (sec >= 60) {\n sec = 0;\n min += 1;\n }\n if (min >= 60) {\n min = 0;\n deg += 1;\n }\n return (deg +\n '\\u00b0 ' +\n padNumber(min, 2) +\n '\\u2032 ' +\n padNumber(sec, 2, dflPrecision) +\n '\\u2033' +\n (normalizedDegrees == 0\n ? ''\n : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0)));\n}\n/**\n * Transforms the given {@link module:ol/coordinate~Coordinate} to a string\n * using the given string template. The strings `{x}` and `{y}` in the template\n * will be replaced with the first and second coordinate values respectively.\n *\n * Example without specifying the fractional digits:\n *\n * import {format} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var template = 'Coordinate is ({x}|{y}).';\n * var out = format(coord, template);\n * // out is now 'Coordinate is (8|48).'\n *\n * Example explicitly specifying the fractional digits:\n *\n * import {format} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var template = 'Coordinate is ({x}|{y}).';\n * var out = format(coord, template, 2);\n * // out is now 'Coordinate is (7.85|47.98).'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {string} template A template string with `{x}` and `{y}` placeholders\n * that will be replaced by first and second coordinate values.\n * @param {number} [opt_fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nexport function format(coordinate, template, opt_fractionDigits) {\n if (coordinate) {\n return template\n .replace('{x}', coordinate[0].toFixed(opt_fractionDigits))\n .replace('{y}', coordinate[1].toFixed(opt_fractionDigits));\n }\n else {\n return '';\n }\n}\n/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nexport function equals(coordinate1, coordinate2) {\n var equals = true;\n for (var i = coordinate1.length - 1; i >= 0; --i) {\n if (coordinate1[i] != coordinate2[i]) {\n equals = false;\n break;\n }\n }\n return equals;\n}\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n * import {rotate} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var rotateRadians = Math.PI / 2; // 90 degrees\n * rotate(coord, rotateRadians);\n * // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} angle Angle in radian.\n * @return {Coordinate} Coordinate.\n * @api\n */\nexport function rotate(coordinate, angle) {\n var cosAngle = Math.cos(angle);\n var sinAngle = Math.sin(angle);\n var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n coordinate[0] = x;\n coordinate[1] = y;\n return coordinate;\n}\n/**\n * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n * import {scale as scaleCoordinate} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var scale = 1.2;\n * scaleCoordinate(coord, scale);\n * // coord is now [9.42, 57.5799996]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} scale Scale factor.\n * @return {Coordinate} Coordinate.\n */\nexport function scale(coordinate, scale) {\n coordinate[0] *= scale;\n coordinate[1] *= scale;\n return coordinate;\n}\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nexport function squaredDistance(coord1, coord2) {\n var dx = coord1[0] - coord2[0];\n var dy = coord1[1] - coord2[1];\n return dx * dx + dy * dy;\n}\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Distance between coord1 and coord2.\n */\nexport function distance(coord1, coord2) {\n return Math.sqrt(squaredDistance(coord1, coord2));\n}\n/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nexport function squaredDistanceToSegment(coordinate, segment) {\n return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n * import {toStringHDMS} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var out = toStringHDMS(coord);\n * // out is now '47° 58′ 60″ N 7° 50′ 60″ E'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n * import {toStringHDMS} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var out = toStringHDMS(coord, 1);\n * // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [opt_fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} Hemisphere, degrees, minutes and seconds.\n * @api\n */\nexport function toStringHDMS(coordinate, opt_fractionDigits) {\n if (coordinate) {\n return (degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) +\n ' ' +\n degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits));\n }\n else {\n return '';\n }\n}\n/**\n * Format a coordinate as a comma delimited string.\n *\n * Example without specifying fractional digits:\n *\n * import {toStringXY} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var out = toStringXY(coord);\n * // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n * import {toStringXY} from 'ol/coordinate';\n *\n * var coord = [7.85, 47.983333];\n * var out = toStringXY(coord, 1);\n * // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [opt_fractionDigits] The number of digits to include\n * after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nexport function toStringXY(coordinate, opt_fractionDigits) {\n return format(coordinate, '{x}, {y}', opt_fractionDigits);\n}\n/**\n * Modifies the provided coordinate in-place to be within the real world\n * extent. The lower projection extent boundary is inclusive, the upper one\n * exclusive.\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {Coordinate} The coordinate within the real world extent.\n */\nexport function wrapX(coordinate, projection) {\n if (projection.canWrapX()) {\n var worldWidth = getWidth(projection.getExtent());\n var worldsAway = getWorldsAway(coordinate, projection, worldWidth);\n if (worldsAway) {\n coordinate[0] -= worldsAway * worldWidth;\n }\n }\n return coordinate;\n}\n/**\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number} [opt_sourceExtentWidth] Width of the source extent.\n * @return {number} Offset in world widths.\n */\nexport function getWorldsAway(coordinate, projection, opt_sourceExtentWidth) {\n var projectionExtent = projection.getExtent();\n var worldsAway = 0;\n if (projection.canWrapX() &&\n (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])) {\n var sourceExtentWidth = opt_sourceExtentWidth || getWidth(projectionExtent);\n worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / sourceExtentWidth);\n }\n return worldsAway;\n}\n//# sourceMappingURL=coordinate.js.map","/**\n * @module ol/sphere\n */\nimport { toDegrees, toRadians } from './math.js';\n/**\n * Object literal with options for the {@link getLength} or {@link getArea}\n * functions.\n * @typedef {Object} SphereMetricOptions\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857']\n * Projection of the geometry. By default, the geometry is assumed to be in\n * Web Mercator.\n * @property {number} [radius=6371008.8] Sphere radius. By default, the\n * [mean Earth radius](https://en.wikipedia.org/wiki/Earth_radius#Mean_radius)\n * for the WGS84 ellipsoid is used.\n */\n/**\n * The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid.\n * https://en.wikipedia.org/wiki/Earth_radius#Mean_radius\n * @type {number}\n */\nexport var DEFAULT_RADIUS = 6371008.8;\n/**\n * Get the great circle distance (in meters) between two geographic coordinates.\n * @param {Array} c1 Starting coordinate.\n * @param {Array} c2 Ending coordinate.\n * @param {number} [opt_radius] The sphere radius to use. Defaults to the Earth's\n * mean radius using the WGS84 ellipsoid.\n * @return {number} The great circle distance between the points (in meters).\n * @api\n */\nexport function getDistance(c1, c2, opt_radius) {\n var radius = opt_radius || DEFAULT_RADIUS;\n var lat1 = toRadians(c1[1]);\n var lat2 = toRadians(c2[1]);\n var deltaLatBy2 = (lat2 - lat1) / 2;\n var deltaLonBy2 = toRadians(c2[0] - c1[0]) / 2;\n var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +\n Math.sin(deltaLonBy2) *\n Math.sin(deltaLonBy2) *\n Math.cos(lat1) *\n Math.cos(lat2);\n return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\n/**\n * Get the cumulative great circle length of linestring coordinates (geographic).\n * @param {Array} coordinates Linestring coordinates.\n * @param {number} radius The sphere radius to use.\n * @return {number} The length (in meters).\n */\nfunction getLengthInternal(coordinates, radius) {\n var length = 0;\n for (var i = 0, ii = coordinates.length; i < ii - 1; ++i) {\n length += getDistance(coordinates[i], coordinates[i + 1], radius);\n }\n return length;\n}\n/**\n * Get the spherical length of a geometry. This length is the sum of the\n * great circle distances between coordinates. For polygons, the length is\n * the sum of all rings. For points, the length is zero. For multi-part\n * geometries, the length is the sum of the length of each part.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions} [opt_options] Options for the\n * length calculation. By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical length (in meters).\n * @api\n */\nexport function getLength(geometry, opt_options) {\n var options = opt_options || {};\n var radius = options.radius || DEFAULT_RADIUS;\n var projection = options.projection || 'EPSG:3857';\n var type = geometry.getType();\n if (type !== 'GeometryCollection') {\n geometry = geometry.clone().transform(projection, 'EPSG:4326');\n }\n var length = 0;\n var coordinates, coords, i, ii, j, jj;\n switch (type) {\n case 'Point':\n case 'MultiPoint': {\n break;\n }\n case 'LineString':\n case 'LinearRing': {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n length = getLengthInternal(coordinates, radius);\n break;\n }\n case 'MultiLineString':\n case 'Polygon': {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n length += getLengthInternal(coordinates[i], radius);\n }\n break;\n }\n case 'MultiPolygon': {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n coords = coordinates[i];\n for (j = 0, jj = coords.length; j < jj; ++j) {\n length += getLengthInternal(coords[j], radius);\n }\n }\n break;\n }\n case 'GeometryCollection': {\n var geometries = \n /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n length += getLength(geometries[i], opt_options);\n }\n break;\n }\n default: {\n throw new Error('Unsupported geometry type: ' + type);\n }\n }\n return length;\n}\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array} coordinates List of coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */\nfunction getAreaInternal(coordinates, radius) {\n var area = 0;\n var len = coordinates.length;\n var x1 = coordinates[len - 1][0];\n var y1 = coordinates[len - 1][1];\n for (var i = 0; i < len; i++) {\n var x2 = coordinates[i][0];\n var y2 = coordinates[i][1];\n area +=\n toRadians(x2 - x1) *\n (2 + Math.sin(toRadians(y1)) + Math.sin(toRadians(y2)));\n x1 = x2;\n y1 = y2;\n }\n return (area * radius * radius) / 2.0;\n}\n/**\n * Get the spherical area of a geometry. This is the area (in meters) assuming\n * that polygon edges are segments of great circles on a sphere.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions} [opt_options] Options for the area\n * calculation. By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical area (in square meters).\n * @api\n */\nexport function getArea(geometry, opt_options) {\n var options = opt_options || {};\n var radius = options.radius || DEFAULT_RADIUS;\n var projection = options.projection || 'EPSG:3857';\n var type = geometry.getType();\n if (type !== 'GeometryCollection') {\n geometry = geometry.clone().transform(projection, 'EPSG:4326');\n }\n var area = 0;\n var coordinates, coords, i, ii, j, jj;\n switch (type) {\n case 'Point':\n case 'MultiPoint':\n case 'LineString':\n case 'MultiLineString':\n case 'LinearRing': {\n break;\n }\n case 'Polygon': {\n coordinates = /** @type {import(\"./geom/Polygon.js\").default} */ (geometry).getCoordinates();\n area = Math.abs(getAreaInternal(coordinates[0], radius));\n for (i = 1, ii = coordinates.length; i < ii; ++i) {\n area -= Math.abs(getAreaInternal(coordinates[i], radius));\n }\n break;\n }\n case 'MultiPolygon': {\n coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n for (i = 0, ii = coordinates.length; i < ii; ++i) {\n coords = coordinates[i];\n area += Math.abs(getAreaInternal(coords[0], radius));\n for (j = 1, jj = coords.length; j < jj; ++j) {\n area -= Math.abs(getAreaInternal(coords[j], radius));\n }\n }\n break;\n }\n case 'GeometryCollection': {\n var geometries = \n /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n area += getArea(geometries[i], opt_options);\n }\n break;\n }\n default: {\n throw new Error('Unsupported geometry type: ' + type);\n }\n }\n return area;\n}\n/**\n * Returns the coordinate at the given distance and bearing from `c1`.\n *\n * @param {import(\"./coordinate.js\").Coordinate} c1 The origin point (`[lon, lat]` in degrees).\n * @param {number} distance The great-circle distance between the origin\n * point and the target point.\n * @param {number} bearing The bearing (in radians).\n * @param {number} [opt_radius] The sphere radius to use. Defaults to the Earth's\n * mean radius using the WGS84 ellipsoid.\n * @return {import(\"./coordinate.js\").Coordinate} The target point.\n */\nexport function offset(c1, distance, bearing, opt_radius) {\n var radius = opt_radius || DEFAULT_RADIUS;\n var lat1 = toRadians(c1[1]);\n var lon1 = toRadians(c1[0]);\n var dByR = distance / radius;\n var lat = Math.asin(Math.sin(lat1) * Math.cos(dByR) +\n Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));\n var lon = lon1 +\n Math.atan2(Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1), Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat));\n return [toDegrees(lon), toDegrees(lat)];\n}\n//# sourceMappingURL=sphere.js.map","/**\n * @module ol/proj\n */\n/**\n * The ol/proj module stores:\n * * a list of {@link module:ol/proj/Projection~Projection}\n * objects, one for each projection supported by the application\n * * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large arrays of coordinates such as vector geometries.\n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom build to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://epsg.io/, and are a JS function, so can be loaded in a script\n * tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n * package. Existing transforms are not changed by this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not support projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj.addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection~Projection} object for the new projection and add it with\n * {@link module:ol/proj.addProjection}. You can then add the forward and inverse\n * functions with {@link module:ol/proj.addCoordinateTransforms}. See\n * examples/wms-custom-proj for an example of this.\n *\n * Note that if no transforms are needed and you only need to define the\n * projection, just add a {@link module:ol/proj/Projection~Projection} with\n * {@link module:ol/proj.addProjection}. See examples/wms-no-proj for an example of\n * this.\n */\nimport Projection from './proj/Projection.js';\nimport Units, { METERS_PER_UNIT } from './proj/Units.js';\nimport { PROJECTIONS as EPSG3857_PROJECTIONS, fromEPSG4326, toEPSG4326, } from './proj/epsg3857.js';\nimport { PROJECTIONS as EPSG4326_PROJECTIONS } from './proj/epsg4326.js';\nimport { add as addProj, clear as clearProj, get as getProj, } from './proj/projections.js';\nimport { add as addTransformFunc, clear as clearTransformFuncs, get as getTransformFunc, } from './proj/transforms.js';\nimport { applyTransform, getWidth } from './extent.js';\nimport { clamp, modulo } from './math.js';\nimport { equals, getWorldsAway } from './coordinate.js';\nimport { getDistance } from './sphere.js';\n/**\n * A projection as {@link module:ol/proj/Projection~Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */\n/**\n * A transform function accepts an array of input coordinate values, an optional\n * output array, and an optional dimension (default should be 2). The function\n * transforms the input coordinate values, populates the output array, and\n * returns the output array.\n *\n * @typedef {function(Array, Array=, number=): Array} TransformFunction\n * @api\n */\nexport { METERS_PER_UNIT };\nexport { Projection };\nvar showCoordinateWarning = true;\n/**\n * @param {boolean} [opt_disable = true] Disable console info about `useGeographic()`\n */\nexport function disableCoordinateWarning(opt_disable) {\n var hide = opt_disable === undefined ? true : opt_disable;\n showCoordinateWarning = !hide;\n}\n/**\n * @param {Array} input Input coordinate array.\n * @param {Array} [opt_output] Output array of coordinate values.\n * @param {number} [opt_dimension] Dimension.\n * @return {Array} Output coordinate array (new array, same coordinate\n * values).\n */\nexport function cloneTransform(input, opt_output, opt_dimension) {\n var output;\n if (opt_output !== undefined) {\n for (var i = 0, ii = input.length; i < ii; ++i) {\n opt_output[i] = input[i];\n }\n output = opt_output;\n }\n else {\n output = input.slice();\n }\n return output;\n}\n/**\n * @param {Array} input Input coordinate array.\n * @param {Array} [opt_output] Output array of coordinate values.\n * @param {number} [opt_dimension] Dimension.\n * @return {Array} Input coordinate array (same array as input).\n */\nexport function identityTransform(input, opt_output, opt_dimension) {\n if (opt_output !== undefined && input !== opt_output) {\n for (var i = 0, ii = input.length; i < ii; ++i) {\n opt_output[i] = input[i];\n }\n input = opt_output;\n }\n return input;\n}\n/**\n * Add a Projection object to the list of supported projections that can be\n * looked up by their code.\n *\n * @param {Projection} projection Projection instance.\n * @api\n */\nexport function addProjection(projection) {\n addProj(projection.getCode(), projection);\n addTransformFunc(projection, projection, cloneTransform);\n}\n/**\n * @param {Array} projections Projections.\n */\nexport function addProjections(projections) {\n projections.forEach(addProjection);\n}\n/**\n * Fetches a Projection object for the code specified.\n *\n * @param {ProjectionLike} projectionLike Either a code string which is\n * a combination of authority and identifier such as \"EPSG:4326\", or an\n * existing projection object, or undefined.\n * @return {Projection|null} Projection object, or null if not in list.\n * @api\n */\nexport function get(projectionLike) {\n return typeof projectionLike === 'string'\n ? getProj(/** @type {string} */ (projectionLike))\n : /** @type {Projection} */ (projectionLike) || null;\n}\n/**\n * Get the resolution of the point in degrees or distance units.\n * For projections with degrees as the unit this will simply return the\n * provided resolution. For other projections the point resolution is\n * by default estimated by transforming the `point` pixel to EPSG:4326,\n * measuring its width and height on the normal sphere,\n * and taking the average of the width and height.\n * A custom function can be provided for a specific projection, either\n * by setting the `getPointResolution` option in the\n * {@link module:ol/proj/Projection~Projection} constructor or by using\n * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing\n * projection object.\n * @param {ProjectionLike} projection The projection.\n * @param {number} resolution Nominal resolution in projection units.\n * @param {import(\"./coordinate.js\").Coordinate} point Point to find adjusted resolution at.\n * @param {import(\"./proj/Units.js\").default} [opt_units] Units to get the point resolution in.\n * Default is the projection's units.\n * @return {number} Point resolution.\n * @api\n */\nexport function getPointResolution(projection, resolution, point, opt_units) {\n projection = get(projection);\n var pointResolution;\n var getter = projection.getPointResolutionFunc();\n if (getter) {\n pointResolution = getter(resolution, point);\n if (opt_units && opt_units !== projection.getUnits()) {\n var metersPerUnit = projection.getMetersPerUnit();\n if (metersPerUnit) {\n pointResolution =\n (pointResolution * metersPerUnit) / METERS_PER_UNIT[opt_units];\n }\n }\n }\n else {\n var units = projection.getUnits();\n if ((units == Units.DEGREES && !opt_units) || opt_units == Units.DEGREES) {\n pointResolution = resolution;\n }\n else {\n // Estimate point resolution by transforming the center pixel to EPSG:4326,\n // measuring its width and height on the normal sphere, and taking the\n // average of the width and height.\n var toEPSG4326_1 = getTransformFromProjections(projection, get('EPSG:4326'));\n if (toEPSG4326_1 === identityTransform && units !== Units.DEGREES) {\n // no transform is available\n pointResolution = resolution * projection.getMetersPerUnit();\n }\n else {\n var vertices = [\n point[0] - resolution / 2,\n point[1],\n point[0] + resolution / 2,\n point[1],\n point[0],\n point[1] - resolution / 2,\n point[0],\n point[1] + resolution / 2,\n ];\n vertices = toEPSG4326_1(vertices, vertices, 2);\n var width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n var height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n pointResolution = (width + height) / 2;\n }\n var metersPerUnit = opt_units\n ? METERS_PER_UNIT[opt_units]\n : projection.getMetersPerUnit();\n if (metersPerUnit !== undefined) {\n pointResolution /= metersPerUnit;\n }\n }\n }\n return pointResolution;\n}\n/**\n * Registers transformation functions that don't alter coordinates. Those allow\n * to transform between projections with equal meaning.\n *\n * @param {Array} projections Projections.\n * @api\n */\nexport function addEquivalentProjections(projections) {\n addProjections(projections);\n projections.forEach(function (source) {\n projections.forEach(function (destination) {\n if (source !== destination) {\n addTransformFunc(source, destination, cloneTransform);\n }\n });\n });\n}\n/**\n * Registers transformation functions to convert coordinates in any projection\n * in projection1 to any projection in projection2.\n *\n * @param {Array} projections1 Projections with equal\n * meaning.\n * @param {Array} projections2 Projections with equal\n * meaning.\n * @param {TransformFunction} forwardTransform Transformation from any\n * projection in projection1 to any projection in projection2.\n * @param {TransformFunction} inverseTransform Transform from any projection\n * in projection2 to any projection in projection1..\n */\nexport function addEquivalentTransforms(projections1, projections2, forwardTransform, inverseTransform) {\n projections1.forEach(function (projection1) {\n projections2.forEach(function (projection2) {\n addTransformFunc(projection1, projection2, forwardTransform);\n addTransformFunc(projection2, projection1, inverseTransform);\n });\n });\n}\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n clearProj();\n clearTransformFuncs();\n}\n/**\n * @param {Projection|string|undefined} projection Projection.\n * @param {string} defaultCode Default code.\n * @return {Projection} Projection.\n */\nexport function createProjection(projection, defaultCode) {\n if (!projection) {\n return get(defaultCode);\n }\n else if (typeof projection === 'string') {\n return get(projection);\n }\n else {\n return /** @type {Projection} */ (projection);\n }\n}\n/**\n * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform\n * function.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} coordTransform Coordinate\n * transform.\n * @return {TransformFunction} Transform function.\n */\nexport function createTransformFromCoordinateTransform(coordTransform) {\n return (\n /**\n * @param {Array} input Input.\n * @param {Array} [opt_output] Output.\n * @param {number} [opt_dimension] Dimension.\n * @return {Array} Output.\n */\n function (input, opt_output, opt_dimension) {\n var length = input.length;\n var dimension = opt_dimension !== undefined ? opt_dimension : 2;\n var output = opt_output !== undefined ? opt_output : new Array(length);\n for (var i = 0; i < length; i += dimension) {\n var point = coordTransform(input.slice(i, i + dimension));\n var pointLength = point.length;\n for (var j = 0, jj = dimension; j < jj; ++j) {\n output[i + j] = j >= pointLength ? input[i + j] : point[j];\n }\n }\n return output;\n });\n}\n/**\n * Registers coordinate transform functions to convert coordinates between the\n * source projection and the destination projection.\n * The forward and inverse functions convert coordinate pairs; this function\n * converts these into the functions used internally which also handle\n * extents and coordinate arrays.\n *\n * @param {ProjectionLike} source Source projection.\n * @param {ProjectionLike} destination Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} forward The forward transform\n * function (that is, from the source projection to the destination\n * projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n * the transformed {@link module:ol/coordinate~Coordinate}.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} inverse The inverse transform\n * function (that is, from the destination projection to the source\n * projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n * the transformed {@link module:ol/coordinate~Coordinate}. If the transform function can only\n * transform less dimensions than the input coordinate, it is supposeed to return a coordinate\n * with only the length it can transform. The other dimensions will be taken unchanged from the\n * source.\n * @api\n */\nexport function addCoordinateTransforms(source, destination, forward, inverse) {\n var sourceProj = get(source);\n var destProj = get(destination);\n addTransformFunc(sourceProj, destProj, createTransformFromCoordinateTransform(forward));\n addTransformFunc(destProj, sourceProj, createTransformFromCoordinateTransform(inverse));\n}\n/**\n * Transforms a coordinate from longitude/latitude to a different projection.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate as longitude and latitude, i.e.\n * an array with longitude as 1st and latitude as 2nd element.\n * @param {ProjectionLike} [opt_projection] Target projection. The\n * default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate projected to the target projection.\n * @api\n */\nexport function fromLonLat(coordinate, opt_projection) {\n disableCoordinateWarning();\n return transform(coordinate, 'EPSG:4326', opt_projection !== undefined ? opt_projection : 'EPSG:3857');\n}\n/**\n * Transforms a coordinate to longitude/latitude.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Projected coordinate.\n * @param {ProjectionLike} [opt_projection] Projection of the coordinate.\n * The default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate as longitude and latitude, i.e. an array\n * with longitude as 1st and latitude as 2nd element.\n * @api\n */\nexport function toLonLat(coordinate, opt_projection) {\n var lonLat = transform(coordinate, opt_projection !== undefined ? opt_projection : 'EPSG:3857', 'EPSG:4326');\n var lon = lonLat[0];\n if (lon < -180 || lon > 180) {\n lonLat[0] = modulo(lon + 180, 360) - 180;\n }\n return lonLat;\n}\n/**\n * Checks if two projections are the same, that is every coordinate in one\n * projection does represent the same geographic point as the same coordinate in\n * the other projection.\n *\n * @param {Projection} projection1 Projection 1.\n * @param {Projection} projection2 Projection 2.\n * @return {boolean} Equivalent.\n * @api\n */\nexport function equivalent(projection1, projection2) {\n if (projection1 === projection2) {\n return true;\n }\n var equalUnits = projection1.getUnits() === projection2.getUnits();\n if (projection1.getCode() === projection2.getCode()) {\n return equalUnits;\n }\n else {\n var transformFunc = getTransformFromProjections(projection1, projection2);\n return transformFunc === cloneTransform && equalUnits;\n }\n}\n/**\n * Searches in the list of transform functions for the function for converting\n * coordinates from the source projection to the destination projection.\n *\n * @param {Projection} sourceProjection Source Projection object.\n * @param {Projection} destinationProjection Destination Projection\n * object.\n * @return {TransformFunction} Transform function.\n */\nexport function getTransformFromProjections(sourceProjection, destinationProjection) {\n var sourceCode = sourceProjection.getCode();\n var destinationCode = destinationProjection.getCode();\n var transformFunc = getTransformFunc(sourceCode, destinationCode);\n if (!transformFunc) {\n transformFunc = identityTransform;\n }\n return transformFunc;\n}\n/**\n * Given the projection-like objects, searches for a transformation\n * function to convert a coordinates array from the source projection to the\n * destination projection.\n *\n * @param {ProjectionLike} source Source.\n * @param {ProjectionLike} destination Destination.\n * @return {TransformFunction} Transform function.\n * @api\n */\nexport function getTransform(source, destination) {\n var sourceProjection = get(source);\n var destinationProjection = get(destination);\n return getTransformFromProjections(sourceProjection, destinationProjection);\n}\n/**\n * Transforms a coordinate from source projection to destination projection.\n * This returns a new coordinate (and does not modify the original).\n *\n * See {@link module:ol/proj.transformExtent} for extent transformation.\n * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its\n * subclasses for geometry transforms.\n *\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\nexport function transform(coordinate, source, destination) {\n var transformFunc = getTransform(source, destination);\n return transformFunc(coordinate, undefined, coordinate.length);\n}\n/**\n * Transforms an extent from source projection to destination projection. This\n * returns a new extent (and does not modify the original).\n *\n * @param {import(\"./extent.js\").Extent} extent The extent to transform.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @param {number} [opt_stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n */\nexport function transformExtent(extent, source, destination, opt_stops) {\n var transformFunc = getTransform(source, destination);\n return applyTransform(extent, transformFunc, undefined, opt_stops);\n}\n/**\n * Transforms the given point to the destination projection.\n *\n * @param {import(\"./coordinate.js\").Coordinate} point Point.\n * @param {Projection} sourceProjection Source projection.\n * @param {Projection} destinationProjection Destination projection.\n * @return {import(\"./coordinate.js\").Coordinate} Point.\n */\nexport function transformWithProjections(point, sourceProjection, destinationProjection) {\n var transformFunc = getTransformFromProjections(sourceProjection, destinationProjection);\n return transformFunc(point);\n}\n/**\n * @type {Projection|null}\n */\nvar userProjection = null;\n/**\n * Set the projection for coordinates supplied from and returned by API methods.\n * This includes all API methods except for those interacting with tile grids.\n * @param {ProjectionLike} projection The user projection.\n * @api\n */\nexport function setUserProjection(projection) {\n userProjection = get(projection);\n}\n/**\n * Clear the user projection if set.\n * @api\n */\nexport function clearUserProjection() {\n userProjection = null;\n}\n/**\n * Get the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API. Support for user\n * projections is not yet complete and should be considered experimental.\n * @return {Projection|null} The user projection (or null if not set).\n * @api\n */\nexport function getUserProjection() {\n return userProjection;\n}\n/**\n * Use geographic coordinates (WGS-84 datum) in API methods. This includes all API\n * methods except for those interacting with tile grids.\n * @api\n */\nexport function useGeographic() {\n setUserProjection('EPSG:4326');\n}\n/**\n * Return a coordinate transformed into the user projection. If no user projection\n * is set, the original coordinate is returned.\n * @param {Array} coordinate Input coordinate.\n * @param {ProjectionLike} sourceProjection The input coordinate projection.\n * @return {Array} The input coordinate in the user projection.\n */\nexport function toUserCoordinate(coordinate, sourceProjection) {\n if (!userProjection) {\n return coordinate;\n }\n return transform(coordinate, sourceProjection, userProjection);\n}\n/**\n * Return a coordinate transformed from the user projection. If no user projection\n * is set, the original coordinate is returned.\n * @param {Array} coordinate Input coordinate.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {Array} The input coordinate transformed.\n */\nexport function fromUserCoordinate(coordinate, destProjection) {\n if (!userProjection) {\n if (showCoordinateWarning &&\n !equals(coordinate, [0, 0]) &&\n coordinate[0] >= -180 &&\n coordinate[0] <= 180 &&\n coordinate[1] >= -90 &&\n coordinate[1] <= 90) {\n showCoordinateWarning = false;\n // eslint-disable-next-line no-console\n console.warn('Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.');\n }\n return coordinate;\n }\n return transform(coordinate, userProjection, destProjection);\n}\n/**\n * Return an extent transformed into the user projection. If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} sourceProjection The input extent projection.\n * @return {import(\"./extent.js\").Extent} The input extent in the user projection.\n */\nexport function toUserExtent(extent, sourceProjection) {\n if (!userProjection) {\n return extent;\n }\n return transformExtent(extent, sourceProjection, userProjection);\n}\n/**\n * Return an extent transformed from the user projection. If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {import(\"./extent.js\").Extent} The input extent transformed.\n */\nexport function fromUserExtent(extent, destProjection) {\n if (!userProjection) {\n return extent;\n }\n return transformExtent(extent, userProjection, destProjection);\n}\n/**\n * Return the resolution in user projection units per pixel. If no user projection\n * is set, or source or user projection are missing units, the original resolution\n * is returned.\n * @param {number} resolution Resolution in input projection units per pixel.\n * @param {ProjectionLike} sourceProjection The input projection.\n * @return {number} Resolution in user projection units per pixel.\n */\nexport function toUserResolution(resolution, sourceProjection) {\n if (!userProjection) {\n return resolution;\n }\n var sourceUnits = get(sourceProjection).getUnits();\n var userUnits = userProjection.getUnits();\n return sourceUnits && userUnits\n ? (resolution * METERS_PER_UNIT[sourceUnits]) / METERS_PER_UNIT[userUnits]\n : resolution;\n}\n/**\n * Return the resolution in user projection units per pixel. If no user projection\n * is set, or source or user projection are missing units, the original resolution\n * is returned.\n * @param {number} resolution Resolution in user projection units per pixel.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {number} Resolution in destination projection units per pixel.\n */\nexport function fromUserResolution(resolution, destProjection) {\n if (!userProjection) {\n return resolution;\n }\n var sourceUnits = get(destProjection).getUnits();\n var userUnits = userProjection.getUnits();\n return sourceUnits && userUnits\n ? (resolution * METERS_PER_UNIT[userUnits]) / METERS_PER_UNIT[sourceUnits]\n : resolution;\n}\n/**\n * Creates a safe coordinate transform function from a coordinate transform function.\n * \"Safe\" means that it can handle wrapping of x-coordinates for global projections,\n * and that coordinates exceeding the source projection validity extent's range will be\n * clamped to the validity range.\n * @param {Projection} sourceProj Source projection.\n * @param {Projection} destProj Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} transform Transform function (source to destiation).\n * @return {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} Safe transform function (source to destiation).\n */\nexport function createSafeCoordinateTransform(sourceProj, destProj, transform) {\n return function (coord) {\n var transformed, worldsAway;\n if (sourceProj.canWrapX()) {\n var sourceExtent = sourceProj.getExtent();\n var sourceExtentWidth = getWidth(sourceExtent);\n coord = coord.slice(0);\n worldsAway = getWorldsAway(coord, sourceProj, sourceExtentWidth);\n if (worldsAway) {\n // Move x to the real world\n coord[0] = coord[0] - worldsAway * sourceExtentWidth;\n }\n coord[0] = clamp(coord[0], sourceExtent[0], sourceExtent[2]);\n coord[1] = clamp(coord[1], sourceExtent[1], sourceExtent[3]);\n transformed = transform(coord);\n }\n else {\n transformed = transform(coord);\n }\n if (worldsAway && destProj.canWrapX()) {\n // Move transformed coordinate back to the offset world\n transformed[0] += worldsAway * getWidth(destProj.getExtent());\n }\n return transformed;\n };\n}\n/**\n * Add transforms to and from EPSG:4326 and EPSG:3857. This function is called\n * by when this module is executed and should only need to be called again after\n * `clearAllProjections()` is called (e.g. in tests).\n */\nexport function addCommon() {\n // Add transformations that don't alter coordinates to convert within set of\n // projections with equal meaning.\n addEquivalentProjections(EPSG3857_PROJECTIONS);\n addEquivalentProjections(EPSG4326_PROJECTIONS);\n // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n // coordinates and back.\n addEquivalentTransforms(EPSG4326_PROJECTIONS, EPSG3857_PROJECTIONS, fromEPSG4326, toEPSG4326);\n}\naddCommon();\n//# sourceMappingURL=proj.js.map","/**\n * @module ol/control/MousePosition\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Control from './Control.js';\nimport EventType from '../pointer/EventType.js';\nimport { get as getProjection, getTransformFromProjections, getUserProjection, identityTransform, } from '../proj.js';\nimport { listen } from '../events.js';\n/**\n * @type {string}\n */\nvar PROJECTION = 'projection';\n/**\n * @type {string}\n */\nvar COORDINATE_FORMAT = 'coordinateFormat';\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} MousePositionOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string|boolean} [placeholder] Markup to show when the mouse position is not\n * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space\n * is rendered when the mouse leaves the viewport. To render something else, provide a string\n * to be used as the text content (e.g. 'no position' or '' for an empty string). Set the placeholder\n * to `false` to retain the last position when the mouse leaves the viewport. In a future release, this\n * will be the default behavior.\n * @property {string} [undefinedHTML=' '] This option is deprecated. Use the `placeholder` option instead.\n */\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nvar MousePosition = /** @class */ (function (_super) {\n __extends(MousePosition, _super);\n /**\n * @param {Options} [opt_options] Mouse position options.\n */\n function MousePosition(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n var element = document.createElement('div');\n element.className =\n options.className !== undefined ? options.className : 'ol-mouse-position';\n _this = _super.call(this, {\n element: element,\n render: options.render,\n target: options.target,\n }) || this;\n /***\n * @type {MousePositionOnSignature}\n */\n _this.on;\n /***\n * @type {MousePositionOnSignature}\n */\n _this.once;\n /***\n * @type {MousePositionOnSignature}\n */\n _this.un;\n _this.addChangeListener(PROJECTION, _this.handleProjectionChanged_);\n if (options.coordinateFormat) {\n _this.setCoordinateFormat(options.coordinateFormat);\n }\n if (options.projection) {\n _this.setProjection(options.projection);\n }\n /**\n * Change this to `false` when removing the deprecated `undefinedHTML` option.\n * @type {boolean}\n */\n var renderOnMouseOut = true;\n /**\n * @type {string}\n */\n var placeholder = ' ';\n if ('undefinedHTML' in options) {\n // deprecated behavior\n if (options.undefinedHTML !== undefined) {\n placeholder = options.undefinedHTML;\n }\n renderOnMouseOut = !!placeholder;\n }\n else if ('placeholder' in options) {\n if (options.placeholder === false) {\n renderOnMouseOut = false;\n }\n else {\n placeholder = String(options.placeholder);\n }\n }\n /**\n * @private\n * @type {string}\n */\n _this.placeholder_ = placeholder;\n /**\n * @private\n * @type {boolean}\n */\n _this.renderOnMouseOut_ = renderOnMouseOut;\n /**\n * @private\n * @type {string}\n */\n _this.renderedHTML_ = element.innerHTML;\n /**\n * @private\n * @type {?import(\"../proj/Projection.js\").default}\n */\n _this.mapProjection_ = null;\n /**\n * @private\n * @type {?import(\"../proj.js\").TransformFunction}\n */\n _this.transform_ = null;\n return _this;\n }\n /**\n * @private\n */\n MousePosition.prototype.handleProjectionChanged_ = function () {\n this.transform_ = null;\n };\n /**\n * Return the coordinate format type used to render the current position or\n * undefined.\n * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.getCoordinateFormat = function () {\n return /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT));\n };\n /**\n * Return the projection that is used to report the mouse position.\n * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.getProjection = function () {\n return /** @type {import(\"../proj/Projection.js\").default|undefined} */ (this.get(PROJECTION));\n };\n /**\n * @param {MouseEvent} event Browser event.\n * @protected\n */\n MousePosition.prototype.handleMouseMove = function (event) {\n var map = this.getMap();\n this.updateHTML_(map.getEventPixel(event));\n };\n /**\n * @param {Event} event Browser event.\n * @protected\n */\n MousePosition.prototype.handleMouseOut = function (event) {\n this.updateHTML_(null);\n };\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default|null} map Map.\n * @api\n */\n MousePosition.prototype.setMap = function (map) {\n _super.prototype.setMap.call(this, map);\n if (map) {\n var viewport = map.getViewport();\n this.listenerKeys.push(listen(viewport, EventType.POINTERMOVE, this.handleMouseMove, this));\n if (this.renderOnMouseOut_) {\n this.listenerKeys.push(listen(viewport, EventType.POINTEROUT, this.handleMouseOut, this));\n }\n this.updateHTML_(null);\n }\n };\n /**\n * Set the coordinate format type used to render the current position.\n * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.setCoordinateFormat = function (format) {\n this.set(COORDINATE_FORMAT, format);\n };\n /**\n * Set the projection that is used to report the mouse position.\n * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.setProjection = function (projection) {\n this.set(PROJECTION, getProjection(projection));\n };\n /**\n * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n * @private\n */\n MousePosition.prototype.updateHTML_ = function (pixel) {\n var html = this.placeholder_;\n if (pixel && this.mapProjection_) {\n if (!this.transform_) {\n var projection = this.getProjection();\n if (projection) {\n this.transform_ = getTransformFromProjections(this.mapProjection_, projection);\n }\n else {\n this.transform_ = identityTransform;\n }\n }\n var map = this.getMap();\n var coordinate = map.getCoordinateFromPixelInternal(pixel);\n if (coordinate) {\n var userProjection = getUserProjection();\n if (userProjection) {\n this.transform_ = getTransformFromProjections(this.mapProjection_, userProjection);\n }\n this.transform_(coordinate, coordinate);\n var coordinateFormat = this.getCoordinateFormat();\n if (coordinateFormat) {\n html = coordinateFormat(coordinate);\n }\n else {\n html = coordinate.toString();\n }\n }\n }\n if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n this.element.innerHTML = html;\n this.renderedHTML_ = html;\n }\n };\n /**\n * Update the projection. Rendering of the coordinates is done in\n * `handleMouseMove` and `handleMouseUp`.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n MousePosition.prototype.render = function (mapEvent) {\n var frameState = mapEvent.frameState;\n if (!frameState) {\n this.mapProjection_ = null;\n }\n else {\n if (this.mapProjection_ != frameState.viewState.projection) {\n this.mapProjection_ = frameState.viewState.projection;\n this.transform_ = null;\n }\n }\n };\n return MousePosition;\n}(Control));\nexport default MousePosition;\n//# sourceMappingURL=MousePosition.js.map","/**\n * @module ol/easing\n */\n/**\n * Start slow and speed up.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeIn(t) {\n return Math.pow(t, 3);\n}\n/**\n * Start fast and slow down.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeOut(t) {\n return 1 - easeIn(1 - t);\n}\n/**\n * Start slow, speed up, and then slow down again.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function inAndOut(t) {\n return 3 * t * t - 2 * t * t * t;\n}\n/**\n * Maintain a constant speed over time.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function linear(t) {\n return t;\n}\n/**\n * Start slow, speed up, and at the very end slow down again. This has the\n * same general behavior as {@link module:ol/easing.inAndOut}, but the final\n * slowdown is delayed.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function upAndDown(t) {\n if (t < 0.5) {\n return inAndOut(2 * t);\n }\n else {\n return 1 - inAndOut(2 * (t - 0.5));\n }\n}\n//# sourceMappingURL=easing.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/control/Zoom\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { easeOut } from '../easing.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {string} [className='ol-zoom'] CSS class name.\n * @property {string} [zoomInClassName=className + '-in'] CSS class name for the zoom-in button.\n * @property {string} [zoomOutClassName=className + '-out'] CSS class name for the zoom-out button.\n * @property {string|HTMLElement} [zoomInLabel='+'] Text label to use for the zoom-in\n * button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [zoomOutLabel='–'] Text label to use for the zoom-out button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [zoomInTipLabel='Zoom in'] Text label to use for the button tip.\n * @property {string} [zoomOutTipLabel='Zoom out'] Text label to use for the button tip.\n * @property {number} [delta=1] The zoom delta applied on each click.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A control with 2 buttons, one for zoom in and one for zoom out.\n * This control is one of the default controls of a map. To style this control\n * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.\n *\n * @api\n */\nvar Zoom = /** @class */ (function (_super) {\n __extends(Zoom, _super);\n /**\n * @param {Options} [opt_options] Zoom options.\n */\n function Zoom(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n _this = _super.call(this, {\n element: document.createElement('div'),\n target: options.target,\n }) || this;\n var className = options.className !== undefined ? options.className : 'ol-zoom';\n var delta = options.delta !== undefined ? options.delta : 1;\n var zoomInClassName = options.zoomInClassName !== undefined\n ? options.zoomInClassName\n : className + '-in';\n var zoomOutClassName = options.zoomOutClassName !== undefined\n ? options.zoomOutClassName\n : className + '-out';\n var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2013';\n var zoomInTipLabel = options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n var zoomOutTipLabel = options.zoomOutTipLabel !== undefined\n ? options.zoomOutTipLabel\n : 'Zoom out';\n var inElement = document.createElement('button');\n inElement.className = zoomInClassName;\n inElement.setAttribute('type', 'button');\n inElement.title = zoomInTipLabel;\n inElement.appendChild(typeof zoomInLabel === 'string'\n ? document.createTextNode(zoomInLabel)\n : zoomInLabel);\n inElement.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this, delta), false);\n var outElement = document.createElement('button');\n outElement.className = zoomOutClassName;\n outElement.setAttribute('type', 'button');\n outElement.title = zoomOutTipLabel;\n outElement.appendChild(typeof zoomOutLabel === 'string'\n ? document.createTextNode(zoomOutLabel)\n : zoomOutLabel);\n outElement.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this, -delta), false);\n var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n var element = _this.element;\n element.className = cssClasses;\n element.appendChild(inElement);\n element.appendChild(outElement);\n /**\n * @type {number}\n * @private\n */\n _this.duration_ = options.duration !== undefined ? options.duration : 250;\n return _this;\n }\n /**\n * @param {number} delta Zoom delta.\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Zoom.prototype.handleClick_ = function (delta, event) {\n event.preventDefault();\n this.zoomByDelta_(delta);\n };\n /**\n * @param {number} delta Zoom delta.\n * @private\n */\n Zoom.prototype.zoomByDelta_ = function (delta) {\n var map = this.getMap();\n var view = map.getView();\n if (!view) {\n // the map does not have a view, so we can't act\n // upon it\n return;\n }\n var currentZoom = view.getZoom();\n if (currentZoom !== undefined) {\n var newZoom = view.getConstrainedZoom(currentZoom + delta);\n if (this.duration_ > 0) {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n zoom: newZoom,\n duration: this.duration_,\n easing: easeOut,\n });\n }\n else {\n view.setZoom(newZoom);\n }\n }\n };\n return Zoom;\n}(Control));\nexport default Zoom;\n//# sourceMappingURL=Zoom.js.map","/**\n * @module ol/transform\n */\nimport { WORKER_OFFSCREEN_CANVAS } from './has.js';\nimport { assert } from './asserts.js';\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array} Transform\n * @api\n */\n/**\n * Collection of affine 2d transformation functions. The functions work on an\n * array of 6 elements. The element order is compatible with the [SVGMatrix\n * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is\n * a subset (elements a to f) of a 3×3 matrix:\n * ```\n * [ a c e ]\n * [ b d f ]\n * [ 0 0 1 ]\n * ```\n */\n/**\n * @private\n * @type {Transform}\n */\nvar tmp_ = new Array(6);\n/**\n * Create an identity transform.\n * @return {!Transform} Identity transform.\n */\nexport function create() {\n return [1, 0, 0, 1, 0, 0];\n}\n/**\n * Resets the given transform to an identity transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Transform.\n */\nexport function reset(transform) {\n return set(transform, 1, 0, 0, 1, 0, 0);\n}\n/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n var a1 = transform1[0];\n var b1 = transform1[1];\n var c1 = transform1[2];\n var d1 = transform1[3];\n var e1 = transform1[4];\n var f1 = transform1[5];\n var a2 = transform2[0];\n var b2 = transform2[1];\n var c2 = transform2[2];\n var d2 = transform2[3];\n var e2 = transform2[4];\n var f2 = transform2[5];\n transform1[0] = a1 * a2 + c1 * b2;\n transform1[1] = b1 * a2 + d1 * b2;\n transform1[2] = a1 * c2 + c1 * d2;\n transform1[3] = b1 * c2 + d1 * d2;\n transform1[4] = a1 * e2 + c1 * f2 + e1;\n transform1[5] = b1 * e2 + d1 * f2 + f1;\n return transform1;\n}\n/**\n * Set the transform components a-f on a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} a The a component of the transform.\n * @param {number} b The b component of the transform.\n * @param {number} c The c component of the transform.\n * @param {number} d The d component of the transform.\n * @param {number} e The e component of the transform.\n * @param {number} f The f component of the transform.\n * @return {!Transform} Matrix with transform applied.\n */\nexport function set(transform, a, b, c, d, e, f) {\n transform[0] = a;\n transform[1] = b;\n transform[2] = c;\n transform[3] = d;\n transform[4] = e;\n transform[5] = f;\n return transform;\n}\n/**\n * Set transform on one matrix from another matrix.\n * @param {!Transform} transform1 Matrix to set transform to.\n * @param {!Transform} transform2 Matrix to set transform from.\n * @return {!Transform} transform1 with transform from transform2 applied.\n */\nexport function setFromArray(transform1, transform2) {\n transform1[0] = transform2[0];\n transform1[1] = transform2[1];\n transform1[2] = transform2[2];\n transform1[3] = transform2[3];\n transform1[4] = transform2[4];\n transform1[5] = transform2[5];\n return transform1;\n}\n/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, transformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n * chained together.\n */\nexport function apply(transform, coordinate) {\n var x = coordinate[0];\n var y = coordinate[1];\n coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n return coordinate;\n}\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n/**\n * Applies scale to a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scaled transform.\n */\nexport function scale(transform, x, y) {\n return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0));\n}\n/**\n * Creates a scale transform.\n * @param {!Transform} target Transform to overwrite.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scale transform.\n */\nexport function makeScale(target, x, y) {\n return set(target, x, 0, 0, y, 0, 0);\n}\n/**\n * Applies translation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} dx Translation x.\n * @param {number} dy Translation y.\n * @return {!Transform} The translated transform.\n */\nexport function translate(transform, dx, dy) {\n return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy));\n}\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modified in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n var sin = Math.sin(angle);\n var cos = Math.cos(angle);\n transform[0] = sx * cos;\n transform[1] = sy * sin;\n transform[2] = -sx * sin;\n transform[3] = sy * cos;\n transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n return transform;\n}\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative). The resulting transform\n * string can be applied as `transform` property of an HTMLElement's style.\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {string} The composite css transform.\n * @api\n */\nexport function composeCssTransform(dx1, dy1, sx, sy, angle, dx2, dy2) {\n return toString(compose(create(), dx1, dy1, sx, sy, angle, dx2, dy2));\n}\n/**\n * Invert the given transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (source) transform.\n */\nexport function invert(source) {\n return makeInverse(source, source);\n}\n/**\n * Invert the given transform.\n * @param {!Transform} target Transform to be set as the inverse of\n * the source transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (target) transform.\n */\nexport function makeInverse(target, source) {\n var det = determinant(source);\n assert(det !== 0, 32); // Transformation matrix cannot be inverted\n var a = source[0];\n var b = source[1];\n var c = source[2];\n var d = source[3];\n var e = source[4];\n var f = source[5];\n target[0] = d / det;\n target[1] = -b / det;\n target[2] = -c / det;\n target[3] = a / det;\n target[4] = (c * f - d * e) / det;\n target[5] = -(a * f - b * e) / det;\n return target;\n}\n/**\n * Returns the determinant of the given matrix.\n * @param {!Transform} mat Matrix.\n * @return {number} Determinant.\n */\nexport function determinant(mat) {\n return mat[0] * mat[3] - mat[1] * mat[2];\n}\n/**\n * @type {HTMLElement}\n * @private\n */\nvar transformStringDiv;\n/**\n * A rounded string version of the transform. This can be used\n * for CSS transforms.\n * @param {!Transform} mat Matrix.\n * @return {string} The transform as a string.\n */\nexport function toString(mat) {\n var transformString = 'matrix(' + mat.join(', ') + ')';\n if (WORKER_OFFSCREEN_CANVAS) {\n return transformString;\n }\n var node = transformStringDiv || (transformStringDiv = document.createElement('div'));\n node.style.transform = transformString;\n return node.style.transform;\n}\n//# sourceMappingURL=transform.js.map","/**\n * @module ol/geom/GeometryLayout\n */\n/**\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available. Supported values are `'XY'`,\n * `'XYZ'`, `'XYM'`, `'XYZM'`.\n * @enum {string}\n */\nexport default {\n XY: 'XY',\n XYZ: 'XYZ',\n XYM: 'XYM',\n XYZM: 'XYZM',\n};\n//# sourceMappingURL=GeometryLayout.js.map","/**\n * @module ol/geom/flat/transform\n */\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array} [opt_dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function transform2D(flatCoordinates, offset, end, stride, transform, opt_dest) {\n var dest = opt_dest ? opt_dest : [];\n var i = 0;\n for (var j = offset; j < end; j += stride) {\n var x = flatCoordinates[j];\n var y = flatCoordinates[j + 1];\n dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n }\n if (opt_dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array} anchor Rotation anchor point.\n * @param {Array} [opt_dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function rotate(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) {\n var dest = opt_dest ? opt_dest : [];\n var cos = Math.cos(angle);\n var sin = Math.sin(angle);\n var anchorX = anchor[0];\n var anchorY = anchor[1];\n var i = 0;\n for (var j = offset; j < end; j += stride) {\n var deltaX = flatCoordinates[j] - anchorX;\n var deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n for (var k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (opt_dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n/**\n * Scale the coordinates.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array} anchor Scale anchor point.\n * @param {Array} [opt_dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function scale(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) {\n var dest = opt_dest ? opt_dest : [];\n var anchorX = anchor[0];\n var anchorY = anchor[1];\n var i = 0;\n for (var j = offset; j < end; j += stride) {\n var deltaX = flatCoordinates[j] - anchorX;\n var deltaY = flatCoordinates[j + 1] - anchorY;\n dest[i++] = anchorX + sx * deltaX;\n dest[i++] = anchorY + sy * deltaY;\n for (var k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (opt_dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array} [opt_dest] Destination.\n * @return {Array} Transformed coordinates.\n */\nexport function translate(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {\n var dest = opt_dest ? opt_dest : [];\n var i = 0;\n for (var j = offset; j < end; j += stride) {\n dest[i++] = flatCoordinates[j] + deltaX;\n dest[i++] = flatCoordinates[j + 1] + deltaY;\n for (var k = j + 2; k < j + stride; ++k) {\n dest[i++] = flatCoordinates[k];\n }\n }\n if (opt_dest && dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n//# sourceMappingURL=transform.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.js';\nimport Units from '../proj/Units.js';\nimport { abstract } from '../util.js';\nimport { compose as composeTransform, create as createTransform, } from '../transform.js';\nimport { createEmpty, createOrUpdateEmpty, getHeight, returnOrUpdate, } from '../extent.js';\nimport { get as getProjection, getTransform } from '../proj.js';\nimport { memoizeOne } from '../functions.js';\nimport { transform2D } from './flat/transform.js';\n/**\n * @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle'} Type\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, or `'Circle'`.\n */\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nvar Geometry = /** @class */ (function (_super) {\n __extends(Geometry, _super);\n function Geometry() {\n var _this = _super.call(this) || this;\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n _this.extent_ = createEmpty();\n /**\n * @private\n * @type {number}\n */\n _this.extentRevision_ = -1;\n /**\n * @protected\n * @type {number}\n */\n _this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n /**\n * @protected\n * @type {number}\n */\n _this.simplifiedGeometryRevision = 0;\n /**\n * Get a transformed and simplified version of the geometry.\n * @abstract\n * @param {number} revision The geometry revision.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n _this.simplifyTransformedInternal = memoizeOne(function (revision, squaredTolerance, opt_transform) {\n if (!opt_transform) {\n return this.getSimplifiedGeometry(squaredTolerance);\n }\n var clone = this.clone();\n clone.applyTransform(opt_transform);\n return clone.getSimplifiedGeometry(squaredTolerance);\n });\n return _this;\n }\n /**\n * Get a transformed and simplified version of the geometry.\n * @abstract\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n * @return {Geometry} Simplified geometry.\n */\n Geometry.prototype.simplifyTransformed = function (squaredTolerance, opt_transform) {\n return this.simplifyTransformedInternal(this.getRevision(), squaredTolerance, opt_transform);\n };\n /**\n * Make a complete copy of the geometry.\n * @abstract\n * @return {!Geometry} Clone.\n */\n Geometry.prototype.clone = function () {\n return abstract();\n };\n /**\n * @abstract\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n Geometry.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n return abstract();\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n Geometry.prototype.containsXY = function (x, y) {\n var coord = this.getClosestPoint([x, y]);\n return coord[0] === x && coord[1] === y;\n };\n /**\n * Return the closest point of the geometry to the passed point as\n * {@link module:ol/coordinate~Coordinate coordinate}.\n * @param {import(\"../coordinate.js\").Coordinate} point Point.\n * @param {import(\"../coordinate.js\").Coordinate} [opt_closestPoint] Closest point.\n * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n * @api\n */\n Geometry.prototype.getClosestPoint = function (point, opt_closestPoint) {\n var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];\n this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n return closestPoint;\n };\n /**\n * Returns true if this geometry includes the specified coordinate. If the\n * coordinate is on the boundary of the geometry, returns false.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains coordinate.\n * @api\n */\n Geometry.prototype.intersectsCoordinate = function (coordinate) {\n return this.containsXY(coordinate[0], coordinate[1]);\n };\n /**\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n Geometry.prototype.computeExtent = function (extent) {\n return abstract();\n };\n /**\n * Get the extent of the geometry.\n * @param {import(\"../extent.js\").Extent} [opt_extent] Extent.\n * @return {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n Geometry.prototype.getExtent = function (opt_extent) {\n if (this.extentRevision_ != this.getRevision()) {\n var extent = this.computeExtent(this.extent_);\n if (isNaN(extent[0]) || isNaN(extent[1])) {\n createOrUpdateEmpty(extent);\n }\n this.extentRevision_ = this.getRevision();\n }\n return returnOrUpdate(this.extent_, opt_extent);\n };\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} angle Rotation angle in radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n Geometry.prototype.rotate = function (angle, anchor) {\n abstract();\n };\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @abstract\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [opt_anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n Geometry.prototype.scale = function (sx, opt_sy, opt_anchor) {\n abstract();\n };\n /**\n * Create a simplified version of this geometry. For linestrings, this uses\n * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)\n * algorithm. For polygons, a quantization-based\n * simplification is used to preserve topology.\n * @param {number} tolerance The tolerance distance for simplification.\n * @return {Geometry} A new, simplified version of the original geometry.\n * @api\n */\n Geometry.prototype.simplify = function (tolerance) {\n return this.getSimplifiedGeometry(tolerance * tolerance);\n };\n /**\n * Create a simplified version of this geometry using the Douglas Peucker\n * algorithm.\n * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n * @abstract\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Geometry} Simplified geometry.\n */\n Geometry.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n return abstract();\n };\n /**\n * Get the type of this geometry.\n * @abstract\n * @return {Type} Geometry type.\n */\n Geometry.prototype.getType = function () {\n return abstract();\n };\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @abstract\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n */\n Geometry.prototype.applyTransform = function (transformFn) {\n abstract();\n };\n /**\n * Test if the geometry and the passed extent intersect.\n * @abstract\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n */\n Geometry.prototype.intersectsExtent = function (extent) {\n return abstract();\n };\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @abstract\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n Geometry.prototype.translate = function (deltaX, deltaY) {\n abstract();\n };\n /**\n * Transform each coordinate of the geometry from one coordinate reference\n * system to another. The geometry is modified in place.\n * For example, a line will be transformed to a line and a circle to a circle.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Geometry} This geometry. Note that original geometry is\n * modified in place.\n * @api\n */\n Geometry.prototype.transform = function (source, destination) {\n /** @type {import(\"../proj/Projection.js\").default} */\n var sourceProj = getProjection(source);\n var transformFn = sourceProj.getUnits() == Units.TILE_PIXELS\n ? function (inCoordinates, outCoordinates, stride) {\n var pixelExtent = sourceProj.getExtent();\n var projectedExtent = sourceProj.getWorldExtent();\n var scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n composeTransform(tmpTransform, projectedExtent[0], projectedExtent[3], scale, -scale, 0, 0, 0);\n transform2D(inCoordinates, 0, inCoordinates.length, stride, tmpTransform, outCoordinates);\n return getTransform(sourceProj, destination)(inCoordinates, outCoordinates, stride);\n }\n : getTransform(sourceProj, destination);\n this.applyTransform(transformFn);\n return this;\n };\n return Geometry;\n}(BaseObject));\nexport default Geometry;\n//# sourceMappingURL=Geometry.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/geom/SimpleGeometry\n */\nimport Geometry from './Geometry.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport { abstract } from '../util.js';\nimport { createOrUpdateFromFlatCoordinates, getCenter } from '../extent.js';\nimport { rotate, scale, transform2D, translate } from './flat/transform.js';\n/**\n * @classdesc\n * Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nvar SimpleGeometry = /** @class */ (function (_super) {\n __extends(SimpleGeometry, _super);\n function SimpleGeometry() {\n var _this = _super.call(this) || this;\n /**\n * @protected\n * @type {import(\"./GeometryLayout.js\").default}\n */\n _this.layout = GeometryLayout.XY;\n /**\n * @protected\n * @type {number}\n */\n _this.stride = 2;\n /**\n * @protected\n * @type {Array}\n */\n _this.flatCoordinates = null;\n return _this;\n }\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n SimpleGeometry.prototype.computeExtent = function (extent) {\n return createOrUpdateFromFlatCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);\n };\n /**\n * @abstract\n * @return {Array<*> | null} Coordinates.\n */\n SimpleGeometry.prototype.getCoordinates = function () {\n return abstract();\n };\n /**\n * Return the first coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n * @api\n */\n SimpleGeometry.prototype.getFirstCoordinate = function () {\n return this.flatCoordinates.slice(0, this.stride);\n };\n /**\n * @return {Array} Flat coordinates.\n */\n SimpleGeometry.prototype.getFlatCoordinates = function () {\n return this.flatCoordinates;\n };\n /**\n * Return the last coordinate of the geometry.\n * @return {import(\"../coordinate.js\").Coordinate} Last point.\n * @api\n */\n SimpleGeometry.prototype.getLastCoordinate = function () {\n return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);\n };\n /**\n * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.\n * @return {import(\"./GeometryLayout.js\").default} Layout.\n * @api\n */\n SimpleGeometry.prototype.getLayout = function () {\n return this.layout;\n };\n /**\n * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n */\n SimpleGeometry.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n if (this.simplifiedGeometryRevision !== this.getRevision()) {\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n this.simplifiedGeometryRevision = this.getRevision();\n }\n // If squaredTolerance is negative or if we know that simplification will not\n // have any effect then just return this.\n if (squaredTolerance < 0 ||\n (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)) {\n return this;\n }\n var simplifiedGeometry = this.getSimplifiedGeometryInternal(squaredTolerance);\n var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n return simplifiedGeometry;\n }\n else {\n // Simplification did not actually remove any coordinates. We now know\n // that any calls to getSimplifiedGeometry with a squaredTolerance less\n // than or equal to the current squaredTolerance will also not have any\n // effect. This allows us to short circuit simplification (saving CPU\n // cycles) and prevents the cache of simplified geometries from filling\n // up with useless identical copies of this geometry (saving memory).\n this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n return this;\n }\n };\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n * @protected\n */\n SimpleGeometry.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n return this;\n };\n /**\n * @return {number} Stride.\n */\n SimpleGeometry.prototype.getStride = function () {\n return this.stride;\n };\n /**\n * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n * @param {Array} flatCoordinates Flat coordinates.\n */\n SimpleGeometry.prototype.setFlatCoordinates = function (layout, flatCoordinates) {\n this.stride = getStrideForLayout(layout);\n this.layout = layout;\n this.flatCoordinates = flatCoordinates;\n };\n /**\n * @abstract\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n */\n SimpleGeometry.prototype.setCoordinates = function (coordinates, opt_layout) {\n abstract();\n };\n /**\n * @param {import(\"./GeometryLayout.js\").default|undefined} layout Layout.\n * @param {Array<*>} coordinates Coordinates.\n * @param {number} nesting Nesting.\n * @protected\n */\n SimpleGeometry.prototype.setLayout = function (layout, coordinates, nesting) {\n /** @type {number} */\n var stride;\n if (layout) {\n stride = getStrideForLayout(layout);\n }\n else {\n for (var i = 0; i < nesting; ++i) {\n if (coordinates.length === 0) {\n this.layout = GeometryLayout.XY;\n this.stride = 2;\n return;\n }\n else {\n coordinates = /** @type {Array} */ (coordinates[0]);\n }\n }\n stride = coordinates.length;\n layout = getLayoutForStride(stride);\n }\n this.layout = layout;\n this.stride = stride;\n };\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n * Called with a flat array of geometry coordinates.\n * @api\n */\n SimpleGeometry.prototype.applyTransform = function (transformFn) {\n if (this.flatCoordinates) {\n transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n this.changed();\n }\n };\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in counter-clockwise radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n SimpleGeometry.prototype.rotate = function (angle, anchor) {\n var flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n var stride = this.getStride();\n rotate(flatCoordinates, 0, flatCoordinates.length, stride, angle, anchor, flatCoordinates);\n this.changed();\n }\n };\n /**\n * Scale the geometry (with an optional origin). This modifies the geometry\n * coordinates in place.\n * @param {number} sx The scaling factor in the x-direction.\n * @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).\n * @param {import(\"../coordinate.js\").Coordinate} [opt_anchor] The scale origin (defaults to the center\n * of the geometry extent).\n * @api\n */\n SimpleGeometry.prototype.scale = function (sx, opt_sy, opt_anchor) {\n var sy = opt_sy;\n if (sy === undefined) {\n sy = sx;\n }\n var anchor = opt_anchor;\n if (!anchor) {\n anchor = getCenter(this.getExtent());\n }\n var flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n var stride = this.getStride();\n scale(flatCoordinates, 0, flatCoordinates.length, stride, sx, sy, anchor, flatCoordinates);\n this.changed();\n }\n };\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n SimpleGeometry.prototype.translate = function (deltaX, deltaY) {\n var flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n var stride = this.getStride();\n translate(flatCoordinates, 0, flatCoordinates.length, stride, deltaX, deltaY, flatCoordinates);\n this.changed();\n }\n };\n return SimpleGeometry;\n}(Geometry));\n/**\n * @param {number} stride Stride.\n * @return {import(\"./GeometryLayout.js\").default} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n var layout;\n if (stride == 2) {\n layout = GeometryLayout.XY;\n }\n else if (stride == 3) {\n layout = GeometryLayout.XYZ;\n }\n else if (stride == 4) {\n layout = GeometryLayout.XYZM;\n }\n return /** @type {import(\"./GeometryLayout.js\").default} */ (layout);\n}\n/**\n * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n var stride;\n if (layout == GeometryLayout.XY) {\n stride = 2;\n }\n else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYM) {\n stride = 3;\n }\n else if (layout == GeometryLayout.XYZM) {\n stride = 4;\n }\n return /** @type {number} */ (stride);\n}\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array} [opt_dest] Destination.\n * @return {Array} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, opt_dest) {\n var flatCoordinates = simpleGeometry.getFlatCoordinates();\n if (!flatCoordinates) {\n return null;\n }\n else {\n var stride = simpleGeometry.getStride();\n return transform2D(flatCoordinates, 0, flatCoordinates.length, stride, transform, opt_dest);\n }\n}\nexport default SimpleGeometry;\n//# sourceMappingURL=SimpleGeometry.js.map","/**\n * @module ol/geom/flat/closest\n */\nimport { lerp, squaredDistance as squaredDx } from '../../math.js';\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y). Extra\n * dimensions are linearly interpolated.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n */\nfunction assignClosest(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {\n var x1 = flatCoordinates[offset1];\n var y1 = flatCoordinates[offset1 + 1];\n var dx = flatCoordinates[offset2] - x1;\n var dy = flatCoordinates[offset2 + 1] - y1;\n var offset;\n if (dx === 0 && dy === 0) {\n offset = offset1;\n }\n else {\n var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n offset = offset2;\n }\n else if (t > 0) {\n for (var i = 0; i < stride; ++i) {\n closestPoint[i] = lerp(flatCoordinates[offset1 + i], flatCoordinates[offset2 + i], t);\n }\n closestPoint.length = stride;\n return;\n }\n else {\n offset = offset1;\n }\n }\n for (var i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n}\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n var x1 = flatCoordinates[offset];\n var y1 = flatCoordinates[offset + 1];\n for (offset += stride; offset < end; offset += stride) {\n var x2 = flatCoordinates[offset];\n var y2 = flatCoordinates[offset + 1];\n var squaredDelta = squaredDx(x1, y1, x2, y2);\n if (squaredDelta > max) {\n max = squaredDelta;\n }\n x1 = x2;\n y1 = y2;\n }\n return max;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n offset = end;\n }\n return max;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(flatCoordinates, offset, endss, stride, max) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n offset = ends[ends.length - 1];\n }\n return max;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [opt_tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n if (offset == end) {\n return minSquaredDistance;\n }\n var i, squaredDistance;\n if (maxDelta === 0) {\n // All points are identical, so just test the first point.\n squaredDistance = squaredDx(x, y, flatCoordinates[offset], flatCoordinates[offset + 1]);\n if (squaredDistance < minSquaredDistance) {\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[offset + i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n }\n else {\n return minSquaredDistance;\n }\n }\n var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n var index = offset + stride;\n while (index < end) {\n assignClosest(flatCoordinates, index - stride, index, stride, x, y, tmpPoint);\n squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n index += stride;\n }\n else {\n // Skip ahead multiple points, because we know that all the skipped\n // points cannot be any closer than the closest point we have found so\n // far. We know this because we know how close the current point is, how\n // close the closest point we have found so far is, and the maximum\n // distance between consecutive points. For example, if we're currently\n // at distance 10, the best we've found so far is 3, and that the maximum\n // distance between consecutive points is 2, then we'll need to skip at\n // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of\n // finding a closer point. We use Math.max(..., 1) to ensure that we\n // always advance at least one point, to avoid an infinite loop.\n index +=\n stride *\n Math.max(((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n maxDelta) |\n 0, 1);\n }\n }\n if (isRing) {\n // Check the closing segment.\n assignClosest(flatCoordinates, end - stride, offset, stride, x, y, tmpPoint);\n squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (i = 0; i < stride; ++i) {\n closestPoint[i] = tmpPoint[i];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [opt_tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n minSquaredDistance = assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n offset = end;\n }\n return minSquaredDistance;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array} [opt_tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(flatCoordinates, offset, endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n minSquaredDistance = assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n offset = ends[ends.length - 1];\n }\n return minSquaredDistance;\n}\n//# sourceMappingURL=closest.js.map","/**\n * @module ol/geom/flat/deflate\n */\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n for (var i = 0, ii = coordinate.length; i < ii; ++i) {\n flatCoordinates[offset++] = coordinate[i];\n }\n return offset;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(flatCoordinates, offset, coordinates, stride) {\n for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n var coordinate = coordinates[i];\n for (var j = 0; j < stride; ++j) {\n flatCoordinates[offset++] = coordinate[j];\n }\n }\n return offset;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array} [opt_ends] Ends.\n * @return {Array} Ends.\n */\nexport function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, stride, opt_ends) {\n var ends = opt_ends ? opt_ends : [];\n var i = 0;\n for (var j = 0, jj = coordinatess.length; j < jj; ++j) {\n var end = deflateCoordinates(flatCoordinates, offset, coordinatess[j], stride);\n ends[i++] = end;\n offset = end;\n }\n ends.length = i;\n return ends;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array>} [opt_endss] Endss.\n * @return {Array>} Endss.\n */\nexport function deflateMultiCoordinatesArray(flatCoordinates, offset, coordinatesss, stride, opt_endss) {\n var endss = opt_endss ? opt_endss : [];\n var i = 0;\n for (var j = 0, jj = coordinatesss.length; j < jj; ++j) {\n var ends = deflateCoordinatesArray(flatCoordinates, offset, coordinatesss[j], stride, endss[i]);\n endss[i++] = ends;\n offset = ends[ends.length - 1];\n }\n endss.length = i;\n return endss;\n}\n//# sourceMappingURL=deflate.js.map","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n// 1. Redistributions of source code must retain the above copyright notice,\n// this list of conditions and the following disclaimer.\n//\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\nimport { squaredDistance, squaredSegmentDistance } from '../../math.js';\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array} [opt_simplifiedFlatCoordinates] Simplified flat\n * coordinates.\n * @return {Array} Simplified line string.\n */\nexport function simplifyLineString(flatCoordinates, offset, end, stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) {\n var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined\n ? opt_simplifiedFlatCoordinates\n : [];\n if (!highQuality) {\n end = radialDistance(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n flatCoordinates = simplifiedFlatCoordinates;\n offset = 0;\n stride = 2;\n }\n simplifiedFlatCoordinates.length = douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n return simplifiedFlatCoordinates;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n var n = (end - offset) / stride;\n if (n < 3) {\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n /** @type {Array} */\n var markers = new Array(n);\n markers[0] = 1;\n markers[n - 1] = 1;\n /** @type {Array} */\n var stack = [offset, end - stride];\n var index = 0;\n while (stack.length > 0) {\n var last = stack.pop();\n var first = stack.pop();\n var maxSquaredDistance = 0;\n var x1 = flatCoordinates[first];\n var y1 = flatCoordinates[first + 1];\n var x2 = flatCoordinates[last];\n var y2 = flatCoordinates[last + 1];\n for (var i = first + stride; i < last; i += stride) {\n var x = flatCoordinates[i];\n var y = flatCoordinates[i + 1];\n var squaredDistance_1 = squaredSegmentDistance(x, y, x1, y1, x2, y2);\n if (squaredDistance_1 > maxSquaredDistance) {\n index = i;\n maxSquaredDistance = squaredDistance_1;\n }\n }\n if (maxSquaredDistance > squaredTolerance) {\n markers[(index - offset) / stride] = 1;\n if (first + stride < index) {\n stack.push(first, index);\n }\n if (index + stride < last) {\n stack.push(index, last);\n }\n }\n }\n for (var i = 0; i < n; ++i) {\n if (markers[i]) {\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i * stride];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i * stride + 1];\n }\n }\n return simplifiedOffset;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n simplifiedOffset = douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset);\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(flatCoordinates, offset, endss, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n var simplifiedEnds = [];\n simplifiedOffset = douglasPeuckerArray(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n if (end <= offset + stride) {\n // zero or one point, no simplification possible, so copy and return\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + 1];\n }\n return simplifiedOffset;\n }\n var x1 = flatCoordinates[offset];\n var y1 = flatCoordinates[offset + 1];\n // copy first point\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n var x2 = x1;\n var y2 = y1;\n for (offset += stride; offset < end; offset += stride) {\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n // copy point at offset\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n }\n }\n if (x2 != x1 || y2 != y1) {\n // copy last point\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n }\n return simplifiedOffset;\n}\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nexport function snap(value, tolerance) {\n return tolerance * Math.round(value / tolerance);\n}\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded. This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string. This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons. This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n // do nothing if the line is empty\n if (offset == end) {\n return simplifiedOffset;\n }\n // snap the first coordinate (P1)\n var x1 = snap(flatCoordinates[offset], tolerance);\n var y1 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // add the first coordinate to the output\n simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n // find the next coordinate that does not snap to the same value as the first\n // coordinate (P2)\n var x2, y2;\n do {\n x2 = snap(flatCoordinates[offset], tolerance);\n y2 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n if (offset == end) {\n // all coordinates snap to the same value, the line collapses to a point\n // push the last snapped value anyway to ensure that the output contains\n // at least two points\n // FIXME should we really return at least two points anyway?\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n }\n } while (x2 == x1 && y2 == y1);\n while (offset < end) {\n // snap the next coordinate (P3)\n var x3 = snap(flatCoordinates[offset], tolerance);\n var y3 = snap(flatCoordinates[offset + 1], tolerance);\n offset += stride;\n // skip P3 if it is equal to P2\n if (x3 == x2 && y3 == y2) {\n continue;\n }\n // calculate the delta between P1 and P2\n var dx1 = x2 - x1;\n var dy1 = y2 - y1;\n // calculate the delta between P3 and P1\n var dx2 = x3 - x1;\n var dy2 = y3 - y1;\n // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n // P1 in the same direction then P2 is on the straight line between P1 and\n // P3\n if (dx1 * dy2 == dy1 * dx2 &&\n ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))) {\n // discard P2 and set P2 = P3\n x2 = x3;\n y2 = y3;\n continue;\n }\n // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n // between P3 and P1 or on the opposite half of the line to P2. add P2,\n // and continue with P1 = P2 and P2 = P3\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n x1 = x2;\n y1 = y2;\n x2 = x3;\n y2 = y3;\n }\n // add the last point (P2)\n simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n return simplifiedOffset;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n simplifiedOffset = quantize(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset);\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array} simplifiedFlatCoordinates Simplified flat\n * coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(flatCoordinates, offset, endss, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n var simplifiedEnds = [];\n simplifiedOffset = quantizeArray(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n//# sourceMappingURL=simplify.js.map","/**\n * @module ol/geom/flat/segments\n */\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n * called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback) {\n var ret;\n offset += stride;\n for (; offset < end; offset += stride) {\n ret = callback(flatCoordinates.slice(offset - stride, offset), flatCoordinates.slice(offset, offset + stride));\n if (ret) {\n return ret;\n }\n }\n return false;\n}\n//# sourceMappingURL=segments.js.map","/**\n * @module ol/geom/flat/inflate\n */\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array} [opt_coordinates] Coordinates.\n * @return {Array} Coordinates.\n */\nexport function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) {\n var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];\n var i = 0;\n for (var j = offset; j < end; j += stride) {\n coordinates[i++] = flatCoordinates.slice(j, j + stride);\n }\n coordinates.length = i;\n return coordinates;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array>} [opt_coordinatess] Coordinatess.\n * @return {Array>} Coordinatess.\n */\nexport function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) {\n var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];\n var i = 0;\n for (var j = 0, jj = ends.length; j < jj; ++j) {\n var end = ends[j];\n coordinatess[i++] = inflateCoordinates(flatCoordinates, offset, end, stride, coordinatess[i]);\n offset = end;\n }\n coordinatess.length = i;\n return coordinatess;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array>>} [opt_coordinatesss]\n * Coordinatesss.\n * @return {Array>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) {\n var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];\n var i = 0;\n for (var j = 0, jj = endss.length; j < jj; ++j) {\n var ends = endss[j];\n coordinatesss[i++] = inflateCoordinatesArray(flatCoordinates, offset, ends, stride, coordinatesss[i]);\n offset = ends[ends.length - 1];\n }\n coordinatesss.length = i;\n return coordinatesss;\n}\n//# sourceMappingURL=inflate.js.map","/**\n * @module ol/geom/flat/interpolate\n */\nimport { binarySearch } from '../../array.js';\nimport { lerp } from '../../math.js';\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array} [opt_dest] Destination.\n * @param {number} [opt_dimension] Destination dimension (default is `2`)\n * @return {Array} Destination.\n */\nexport function interpolatePoint(flatCoordinates, offset, end, stride, fraction, opt_dest, opt_dimension) {\n var o, t;\n var n = (end - offset) / stride;\n if (n === 1) {\n o = offset;\n }\n else if (n === 2) {\n o = offset;\n t = fraction;\n }\n else if (n !== 0) {\n var x1 = flatCoordinates[offset];\n var y1 = flatCoordinates[offset + 1];\n var length_1 = 0;\n var cumulativeLengths = [0];\n for (var i = offset + stride; i < end; i += stride) {\n var x2 = flatCoordinates[i];\n var y2 = flatCoordinates[i + 1];\n length_1 += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n cumulativeLengths.push(length_1);\n x1 = x2;\n y1 = y2;\n }\n var target = fraction * length_1;\n var index = binarySearch(cumulativeLengths, target);\n if (index < 0) {\n t =\n (target - cumulativeLengths[-index - 2]) /\n (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);\n o = offset + (-index - 2) * stride;\n }\n else {\n o = offset + index * stride;\n }\n }\n var dimension = opt_dimension > 1 ? opt_dimension : 2;\n var dest = opt_dest ? opt_dest : new Array(dimension);\n for (var i = 0; i < dimension; ++i) {\n dest[i] =\n o === undefined\n ? NaN\n : t === undefined\n ? flatCoordinates[o + i]\n : lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);\n }\n return dest;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nexport function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, extrapolate) {\n if (end == offset) {\n return null;\n }\n var coordinate;\n if (m < flatCoordinates[offset + stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(offset, offset + stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n else {\n return null;\n }\n }\n else if (flatCoordinates[end - 1] < m) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(end - stride, end);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n else {\n return null;\n }\n }\n // FIXME use O(1) search\n if (m == flatCoordinates[offset + stride - 1]) {\n return flatCoordinates.slice(offset, offset + stride);\n }\n var lo = offset / stride;\n var hi = end / stride;\n while (lo < hi) {\n var mid = (lo + hi) >> 1;\n if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n hi = mid;\n }\n else {\n lo = mid + 1;\n }\n }\n var m0 = flatCoordinates[lo * stride - 1];\n if (m == m0) {\n return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n }\n var m1 = flatCoordinates[(lo + 1) * stride - 1];\n var t = (m - m0) / (m1 - m0);\n coordinate = [];\n for (var i = 0; i < stride - 1; ++i) {\n coordinate.push(lerp(flatCoordinates[(lo - 1) * stride + i], flatCoordinates[lo * stride + i], t));\n }\n coordinate.push(m);\n return coordinate;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nexport function lineStringsCoordinateAtM(flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {\n if (interpolate) {\n return lineStringCoordinateAtM(flatCoordinates, offset, ends[ends.length - 1], stride, m, extrapolate);\n }\n var coordinate;\n if (m < flatCoordinates[stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(0, stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n else {\n return null;\n }\n }\n if (flatCoordinates[flatCoordinates.length - 1] < m) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n else {\n return null;\n }\n }\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n if (offset == end) {\n continue;\n }\n if (m < flatCoordinates[offset + stride - 1]) {\n return null;\n }\n else if (m <= flatCoordinates[end - 1]) {\n return lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, false);\n }\n offset = end;\n }\n return null;\n}\n//# sourceMappingURL=interpolate.js.map","/**\n * @module ol/geom/flat/contains\n */\nimport { forEachCorner } from '../../extent.js';\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) {\n var outside = forEachCorner(extent, \n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} Contains (x, y).\n */\n function (coordinate) {\n return !linearRingContainsXY(flatCoordinates, offset, end, stride, coordinate[0], coordinate[1]);\n });\n return !outside;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(flatCoordinates, offset, end, stride, x, y) {\n // https://geomalgorithms.com/a03-_inclusion.html\n // Copyright 2000 softSurfer, 2012 Dan Sunday\n // This code may be freely used and modified for any purpose\n // providing that this copyright notice is included with it.\n // SoftSurfer makes no warranty for this code, and cannot be held\n // liable for any real or imagined damage resulting from its use.\n // Users of this code must verify correctness for their application.\n var wn = 0;\n var x1 = flatCoordinates[end - stride];\n var y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n var x2 = flatCoordinates[offset];\n var y2 = flatCoordinates[offset + 1];\n if (y1 <= y) {\n if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n wn++;\n }\n }\n else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n wn--;\n }\n x1 = x2;\n y1 = y2;\n }\n return wn !== 0;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y) {\n if (ends.length === 0) {\n return false;\n }\n if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n return false;\n }\n for (var i = 1, ii = ends.length; i < ii; ++i) {\n if (linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)) {\n return false;\n }\n }\n return true;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(flatCoordinates, offset, endss, stride, x, y) {\n if (endss.length === 0) {\n return false;\n }\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n//# sourceMappingURL=contains.js.map","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport { containsExtent, createEmpty, extendFlatCoordinates, intersects, intersectsSegment, } from '../../extent.js';\nimport { forEach as forEachSegment } from './segments.js';\nimport { linearRingContainsExtent, linearRingContainsXY } from './contains.js';\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineString(flatCoordinates, offset, end, stride, extent) {\n var coordinatesExtent = extendFlatCoordinates(createEmpty(), flatCoordinates, offset, end, stride);\n if (!intersects(extent, coordinatesExtent)) {\n return false;\n }\n if (containsExtent(extent, coordinatesExtent)) {\n return true;\n }\n if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) {\n return true;\n }\n if (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) {\n return true;\n }\n return forEachSegment(flatCoordinates, offset, end, stride, \n /**\n * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n * @return {boolean} `true` if the segment and the extent intersect,\n * `false` otherwise.\n */\n function (point1, point2) {\n return intersectsSegment(extent, point1, point2);\n });\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(flatCoordinates, offset, ends, stride, extent) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n if (intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)) {\n return true;\n }\n offset = ends[i];\n }\n return false;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(flatCoordinates, offset, end, stride, extent) {\n if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n return true;\n }\n if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[1])) {\n return true;\n }\n if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[3])) {\n return true;\n }\n if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[1])) {\n return true;\n }\n if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[3])) {\n return true;\n }\n return false;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent) {\n if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n return false;\n }\n if (ends.length === 1) {\n return true;\n }\n for (var i = 1, ii = ends.length; i < ii; ++i) {\n if (linearRingContainsExtent(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n if (!intersectsLineString(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n return false;\n }\n }\n }\n return true;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingMultiArray(flatCoordinates, offset, endss, stride, extent) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n if (intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n//# sourceMappingURL=intersectsextent.js.map","/**\n * @module ol/geom/flat/length\n */\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n var x1 = flatCoordinates[offset];\n var y1 = flatCoordinates[offset + 1];\n var length = 0;\n for (var i = offset + stride; i < end; i += stride) {\n var x2 = flatCoordinates[i];\n var y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n x1 = x2;\n y1 = y2;\n }\n return length;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n var perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n var dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n var dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n//# sourceMappingURL=length.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/geom/LineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestPoint, maxSquaredDelta } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { douglasPeucker } from './flat/simplify.js';\nimport { extend } from '../array.js';\nimport { forEach as forEachSegment } from './flat/segments.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { interpolatePoint, lineStringCoordinateAtM } from './flat/interpolate.js';\nimport { intersectsLineString } from './flat/intersectsextent.js';\nimport { lineStringLength } from './flat/length.js';\n/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nvar LineString = /** @class */ (function (_super) {\n __extends(LineString, _super);\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n */\n function LineString(coordinates, opt_layout) {\n var _this = _super.call(this) || this;\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n _this.flatMidpoint_ = null;\n /**\n * @private\n * @type {number}\n */\n _this.flatMidpointRevision_ = -1;\n /**\n * @private\n * @type {number}\n */\n _this.maxDelta_ = -1;\n /**\n * @private\n * @type {number}\n */\n _this.maxDeltaRevision_ = -1;\n if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n _this.setFlatCoordinates(opt_layout, \n /** @type {Array} */ (coordinates));\n }\n else {\n _this.setCoordinates(\n /** @type {Array} */ (coordinates), opt_layout);\n }\n return _this;\n }\n /**\n * Append the passed coordinate to the coordinates of the linestring.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @api\n */\n LineString.prototype.appendCoordinate = function (coordinate) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = coordinate.slice();\n }\n else {\n extend(this.flatCoordinates, coordinate);\n }\n this.changed();\n };\n /**\n * Make a complete copy of the geometry.\n * @return {!LineString} Clone.\n * @api\n */\n LineString.prototype.clone = function () {\n var lineString = new LineString(this.flatCoordinates.slice(), this.layout);\n lineString.applyProperties(this);\n return lineString;\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n LineString.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(maxSquaredDelta(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\n };\n /**\n * Iterate over each segment, calling the provided callback.\n * If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n *\n * @param {function(this: S, import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): T} callback Function\n * called for each segment. The function will receive two arguments, the start and end coordinates of the segment.\n * @return {T|boolean} Value.\n * @template T,S\n * @api\n */\n LineString.prototype.forEachSegment = function (callback) {\n return forEachSegment(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, callback);\n };\n /**\n * Returns the coordinate at `m` using linear interpolation, or `null` if no\n * such coordinate exists.\n *\n * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n * M will return the first coordinate and Ms greater than the last M will\n * return the last coordinate.\n *\n * @param {number} m M.\n * @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.\n * @return {import(\"../coordinate.js\").Coordinate|null} Coordinate.\n * @api\n */\n LineString.prototype.getCoordinateAtM = function (m, opt_extrapolate) {\n if (this.layout != GeometryLayout.XYM &&\n this.layout != GeometryLayout.XYZM) {\n return null;\n }\n var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n return lineStringCoordinateAtM(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, m, extrapolate);\n };\n /**\n * Return the coordinates of the linestring.\n * @return {Array} Coordinates.\n * @api\n */\n LineString.prototype.getCoordinates = function () {\n return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n /**\n * Return the coordinate at the provided fraction along the linestring.\n * The `fraction` is a number between 0 and 1, where 0 is the start of the\n * linestring and 1 is the end.\n * @param {number} fraction Fraction.\n * @param {import(\"../coordinate.js\").Coordinate} [opt_dest] Optional coordinate whose values will\n * be modified. If not provided, a new coordinate will be returned.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinate of the interpolated point.\n * @api\n */\n LineString.prototype.getCoordinateAt = function (fraction, opt_dest) {\n return interpolatePoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, fraction, opt_dest, this.stride);\n };\n /**\n * Return the length of the linestring on projected plane.\n * @return {number} Length (on projected plane).\n * @api\n */\n LineString.prototype.getLength = function () {\n return lineStringLength(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n /**\n * @return {Array} Flat midpoint.\n */\n LineString.prototype.getFlatMidpoint = function () {\n if (this.flatMidpointRevision_ != this.getRevision()) {\n this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);\n this.flatMidpointRevision_ = this.getRevision();\n }\n return this.flatMidpoint_;\n };\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LineString} Simplified LineString.\n * @protected\n */\n LineString.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n return new LineString(simplifiedFlatCoordinates, GeometryLayout.XY);\n };\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n LineString.prototype.getType = function () {\n return 'LineString';\n };\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n LineString.prototype.intersectsExtent = function (extent) {\n return intersectsLineString(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);\n };\n /**\n * Set the coordinates of the linestring.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n * @api\n */\n LineString.prototype.setCoordinates = function (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n this.changed();\n };\n return LineString;\n}(SimpleGeometry));\nexport default LineString;\n//# sourceMappingURL=LineString.js.map","/**\n * @module ol/geom/flat/area\n */\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n var twiceArea = 0;\n var x1 = flatCoordinates[end - stride];\n var y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n var x2 = flatCoordinates[offset];\n var y2 = flatCoordinates[offset + 1];\n twiceArea += y1 * x2 - x1 * y2;\n x1 = x2;\n y1 = y2;\n }\n return twiceArea / 2;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n var area = 0;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n area += linearRing(flatCoordinates, offset, end, stride);\n offset = end;\n }\n return area;\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n var area = 0;\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n area += linearRings(flatCoordinates, offset, ends, stride);\n offset = ends[ends.length - 1];\n }\n return area;\n}\n//# sourceMappingURL=area.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/geom/LinearRing\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestPoint, maxSquaredDelta } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { douglasPeucker } from './flat/simplify.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { linearRing as linearRingArea } from './flat/area.js';\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nvar LinearRing = /** @class */ (function (_super) {\n __extends(LinearRing, _super);\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n */\n function LinearRing(coordinates, opt_layout) {\n var _this = _super.call(this) || this;\n /**\n * @private\n * @type {number}\n */\n _this.maxDelta_ = -1;\n /**\n * @private\n * @type {number}\n */\n _this.maxDeltaRevision_ = -1;\n if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n _this.setFlatCoordinates(opt_layout, \n /** @type {Array} */ (coordinates));\n }\n else {\n _this.setCoordinates(\n /** @type {Array} */ (coordinates), opt_layout);\n }\n return _this;\n }\n /**\n * Make a complete copy of the geometry.\n * @return {!LinearRing} Clone.\n * @api\n */\n LinearRing.prototype.clone = function () {\n return new LinearRing(this.flatCoordinates.slice(), this.layout);\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n LinearRing.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(maxSquaredDelta(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n };\n /**\n * Return the area of the linear ring on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n LinearRing.prototype.getArea = function () {\n return linearRingArea(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n /**\n * Return the coordinates of the linear ring.\n * @return {Array} Coordinates.\n * @api\n */\n LinearRing.prototype.getCoordinates = function () {\n return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LinearRing} Simplified LinearRing.\n * @protected\n */\n LinearRing.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n return new LinearRing(simplifiedFlatCoordinates, GeometryLayout.XY);\n };\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n LinearRing.prototype.getType = function () {\n return 'LinearRing';\n };\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n LinearRing.prototype.intersectsExtent = function (extent) {\n return false;\n };\n /**\n * Set the coordinates of the linear ring.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n * @api\n */\n LinearRing.prototype.setCoordinates = function (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n this.changed();\n };\n return LinearRing;\n}(SimpleGeometry));\nexport default LinearRing;\n//# sourceMappingURL=LinearRing.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/geom/MultiLineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport LineString from './LineString.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { arrayMaxSquaredDelta, assignClosestArrayPoint } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinatesArray } from './flat/deflate.js';\nimport { douglasPeuckerArray } from './flat/simplify.js';\nimport { extend } from '../array.js';\nimport { inflateCoordinatesArray } from './flat/inflate.js';\nimport { interpolatePoint, lineStringsCoordinateAtM, } from './flat/interpolate.js';\nimport { intersectsLineStringArray } from './flat/intersectsextent.js';\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nvar MultiLineString = /** @class */ (function (_super) {\n __extends(MultiLineString, _super);\n /**\n * @param {Array|LineString>|Array} coordinates\n * Coordinates or LineString geometries. (For internal use, flat coordinates in\n * combination with `opt_layout` and `opt_ends` are also accepted.)\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n * @param {Array} [opt_ends] Flat coordinate ends for internal use.\n */\n function MultiLineString(coordinates, opt_layout, opt_ends) {\n var _this = _super.call(this) || this;\n /**\n * @type {Array}\n * @private\n */\n _this.ends_ = [];\n /**\n * @private\n * @type {number}\n */\n _this.maxDelta_ = -1;\n /**\n * @private\n * @type {number}\n */\n _this.maxDeltaRevision_ = -1;\n if (Array.isArray(coordinates[0])) {\n _this.setCoordinates(\n /** @type {Array>} */ (coordinates), opt_layout);\n }\n else if (opt_layout !== undefined && opt_ends) {\n _this.setFlatCoordinates(opt_layout, \n /** @type {Array} */ (coordinates));\n _this.ends_ = opt_ends;\n }\n else {\n var layout = _this.getLayout();\n var lineStrings = /** @type {Array} */ (coordinates);\n var flatCoordinates = [];\n var ends = [];\n for (var i = 0, ii = lineStrings.length; i < ii; ++i) {\n var lineString = lineStrings[i];\n if (i === 0) {\n layout = lineString.getLayout();\n }\n extend(flatCoordinates, lineString.getFlatCoordinates());\n ends.push(flatCoordinates.length);\n }\n _this.setFlatCoordinates(layout, flatCoordinates);\n _this.ends_ = ends;\n }\n return _this;\n }\n /**\n * Append the passed linestring to the multilinestring.\n * @param {LineString} lineString LineString.\n * @api\n */\n MultiLineString.prototype.appendLineString = function (lineString) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = lineString.getFlatCoordinates().slice();\n }\n else {\n extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());\n }\n this.ends_.push(this.flatCoordinates.length);\n this.changed();\n };\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiLineString} Clone.\n * @api\n */\n MultiLineString.prototype.clone = function () {\n var multiLineString = new MultiLineString(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n multiLineString.applyProperties(this);\n return multiLineString;\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n MultiLineString.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates, 0, this.ends_, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestArrayPoint(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\n };\n /**\n * Returns the coordinate at `m` using linear interpolation, or `null` if no\n * such coordinate exists.\n *\n * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n * M will return the first coordinate and Ms greater than the last M will\n * return the last coordinate.\n *\n * `opt_interpolate` controls interpolation between consecutive LineStrings\n * within the MultiLineString. If `opt_interpolate` is `true` the coordinates\n * will be linearly interpolated between the last coordinate of one LineString\n * and the first coordinate of the next LineString. If `opt_interpolate` is\n * `false` then the function will return `null` for Ms falling between\n * LineStrings.\n *\n * @param {number} m M.\n * @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.\n * @param {boolean} [opt_interpolate] Interpolate. Default is `false`.\n * @return {import(\"../coordinate.js\").Coordinate|null} Coordinate.\n * @api\n */\n MultiLineString.prototype.getCoordinateAtM = function (m, opt_extrapolate, opt_interpolate) {\n if ((this.layout != GeometryLayout.XYM &&\n this.layout != GeometryLayout.XYZM) ||\n this.flatCoordinates.length === 0) {\n return null;\n }\n var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n var interpolate = opt_interpolate !== undefined ? opt_interpolate : false;\n return lineStringsCoordinateAtM(this.flatCoordinates, 0, this.ends_, this.stride, m, extrapolate, interpolate);\n };\n /**\n * Return the coordinates of the multilinestring.\n * @return {Array>} Coordinates.\n * @api\n */\n MultiLineString.prototype.getCoordinates = function () {\n return inflateCoordinatesArray(this.flatCoordinates, 0, this.ends_, this.stride);\n };\n /**\n * @return {Array} Ends.\n */\n MultiLineString.prototype.getEnds = function () {\n return this.ends_;\n };\n /**\n * Return the linestring at the specified index.\n * @param {number} index Index.\n * @return {LineString} LineString.\n * @api\n */\n MultiLineString.prototype.getLineString = function (index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LineString(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n };\n /**\n * Return the linestrings of this multilinestring.\n * @return {Array} LineStrings.\n * @api\n */\n MultiLineString.prototype.getLineStrings = function () {\n var flatCoordinates = this.flatCoordinates;\n var ends = this.ends_;\n var layout = this.layout;\n /** @type {Array} */\n var lineStrings = [];\n var offset = 0;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var lineString = new LineString(flatCoordinates.slice(offset, end), layout);\n lineStrings.push(lineString);\n offset = end;\n }\n return lineStrings;\n };\n /**\n * @return {Array} Flat midpoints.\n */\n MultiLineString.prototype.getFlatMidpoints = function () {\n var midpoints = [];\n var flatCoordinates = this.flatCoordinates;\n var offset = 0;\n var ends = this.ends_;\n var stride = this.stride;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var midpoint = interpolatePoint(flatCoordinates, offset, end, stride, 0.5);\n extend(midpoints, midpoint);\n offset = end;\n }\n return midpoints;\n };\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {MultiLineString} Simplified MultiLineString.\n * @protected\n */\n MultiLineString.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n var simplifiedEnds = [];\n simplifiedFlatCoordinates.length = douglasPeuckerArray(this.flatCoordinates, 0, this.ends_, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0, simplifiedEnds);\n return new MultiLineString(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n };\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n MultiLineString.prototype.getType = function () {\n return 'MultiLineString';\n };\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n MultiLineString.prototype.intersectsExtent = function (extent) {\n return intersectsLineStringArray(this.flatCoordinates, 0, this.ends_, this.stride, extent);\n };\n /**\n * Set the coordinates of the multilinestring.\n * @param {!Array>} coordinates Coordinates.\n * @param {GeometryLayout} [opt_layout] Layout.\n * @api\n */\n MultiLineString.prototype.setCoordinates = function (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n };\n return MultiLineString;\n}(SimpleGeometry));\nexport default MultiLineString;\n//# sourceMappingURL=MultiLineString.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/geom/Point\n */\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { containsXY, createOrUpdateFromCoordinate } from '../extent.js';\nimport { deflateCoordinate } from './flat/deflate.js';\nimport { squaredDistance as squaredDx } from '../math.js';\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nvar Point = /** @class */ (function (_super) {\n __extends(Point, _super);\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n */\n function Point(coordinates, opt_layout) {\n var _this = _super.call(this) || this;\n _this.setCoordinates(coordinates, opt_layout);\n return _this;\n }\n /**\n * Make a complete copy of the geometry.\n * @return {!Point} Clone.\n * @api\n */\n Point.prototype.clone = function () {\n var point = new Point(this.flatCoordinates.slice(), this.layout);\n point.applyProperties(this);\n return point;\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n Point.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n var flatCoordinates = this.flatCoordinates;\n var squaredDistance = squaredDx(x, y, flatCoordinates[0], flatCoordinates[1]);\n if (squaredDistance < minSquaredDistance) {\n var stride = this.stride;\n for (var i = 0; i < stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n closestPoint.length = stride;\n return squaredDistance;\n }\n else {\n return minSquaredDistance;\n }\n };\n /**\n * Return the coordinate of the point.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n * @api\n */\n Point.prototype.getCoordinates = function () {\n return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n };\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n Point.prototype.computeExtent = function (extent) {\n return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n };\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n Point.prototype.getType = function () {\n return 'Point';\n };\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n Point.prototype.intersectsExtent = function (extent) {\n return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n };\n /**\n * @param {!Array<*>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n * @api\n */\n Point.prototype.setCoordinates = function (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 0);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinate(this.flatCoordinates, 0, coordinates, this.stride);\n this.changed();\n };\n return Point;\n}(SimpleGeometry));\nexport default Point;\n//# sourceMappingURL=Point.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/geom/MultiPoint\n */\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { closestSquaredDistanceXY, containsXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { squaredDistance as squaredDx } from '../math.js';\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nvar MultiPoint = /** @class */ (function (_super) {\n __extends(MultiPoint, _super);\n /**\n * @param {Array|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n */\n function MultiPoint(coordinates, opt_layout) {\n var _this = _super.call(this) || this;\n if (opt_layout && !Array.isArray(coordinates[0])) {\n _this.setFlatCoordinates(opt_layout, \n /** @type {Array} */ (coordinates));\n }\n else {\n _this.setCoordinates(\n /** @type {Array} */ (coordinates), opt_layout);\n }\n return _this;\n }\n /**\n * Append the passed point to this multipoint.\n * @param {Point} point Point.\n * @api\n */\n MultiPoint.prototype.appendPoint = function (point) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = point.getFlatCoordinates().slice();\n }\n else {\n extend(this.flatCoordinates, point.getFlatCoordinates());\n }\n this.changed();\n };\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiPoint} Clone.\n * @api\n */\n MultiPoint.prototype.clone = function () {\n var multiPoint = new MultiPoint(this.flatCoordinates.slice(), this.layout);\n multiPoint.applyProperties(this);\n return multiPoint;\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n MultiPoint.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n var flatCoordinates = this.flatCoordinates;\n var stride = this.stride;\n for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n var squaredDistance = squaredDx(x, y, flatCoordinates[i], flatCoordinates[i + 1]);\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (var j = 0; j < stride; ++j) {\n closestPoint[j] = flatCoordinates[i + j];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n };\n /**\n * Return the coordinates of the multipoint.\n * @return {Array} Coordinates.\n * @api\n */\n MultiPoint.prototype.getCoordinates = function () {\n return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n /**\n * Return the point at the specified index.\n * @param {number} index Index.\n * @return {Point} Point.\n * @api\n */\n MultiPoint.prototype.getPoint = function (index) {\n var n = !this.flatCoordinates\n ? 0\n : this.flatCoordinates.length / this.stride;\n if (index < 0 || n <= index) {\n return null;\n }\n return new Point(this.flatCoordinates.slice(index * this.stride, (index + 1) * this.stride), this.layout);\n };\n /**\n * Return the points of this multipoint.\n * @return {Array} Points.\n * @api\n */\n MultiPoint.prototype.getPoints = function () {\n var flatCoordinates = this.flatCoordinates;\n var layout = this.layout;\n var stride = this.stride;\n /** @type {Array} */\n var points = [];\n for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n var point = new Point(flatCoordinates.slice(i, i + stride), layout);\n points.push(point);\n }\n return points;\n };\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n MultiPoint.prototype.getType = function () {\n return 'MultiPoint';\n };\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n MultiPoint.prototype.intersectsExtent = function (extent) {\n var flatCoordinates = this.flatCoordinates;\n var stride = this.stride;\n for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n var x = flatCoordinates[i];\n var y = flatCoordinates[i + 1];\n if (containsXY(extent, x, y)) {\n return true;\n }\n }\n return false;\n };\n /**\n * Set the coordinates of the multipoint.\n * @param {!Array} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n * @api\n */\n MultiPoint.prototype.setCoordinates = function (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n this.changed();\n };\n return MultiPoint;\n}(SimpleGeometry));\nexport default MultiPoint;\n//# sourceMappingURL=MultiPoint.js.map","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport { linearRingsContainsXY } from './contains.js';\nimport { numberSafeCompareFunction } from '../../array.js';\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array} [opt_dest] Destination.\n * @return {Array} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, flatCentersOffset, opt_dest) {\n var i, ii, x, x1, x2, y1, y2;\n var y = flatCenters[flatCentersOffset + 1];\n /** @type {Array} */\n var intersections = [];\n // Calculate intersections with the horizontal line\n for (var r = 0, rr = ends.length; r < rr; ++r) {\n var end = ends[r];\n x1 = flatCoordinates[end - stride];\n y1 = flatCoordinates[end - stride + 1];\n for (i = offset; i < end; i += stride) {\n x2 = flatCoordinates[i];\n y2 = flatCoordinates[i + 1];\n if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n intersections.push(x);\n }\n x1 = x2;\n y1 = y2;\n }\n }\n // Find the longest segment of the horizontal line that has its center point\n // inside the linear ring.\n var pointX = NaN;\n var maxSegmentLength = -Infinity;\n intersections.sort(numberSafeCompareFunction);\n x1 = intersections[0];\n for (i = 1, ii = intersections.length; i < ii; ++i) {\n x2 = intersections[i];\n var segmentLength = Math.abs(x2 - x1);\n if (segmentLength > maxSegmentLength) {\n x = (x1 + x2) / 2;\n if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n pointX = x;\n maxSegmentLength = segmentLength;\n }\n }\n x1 = x2;\n }\n if (isNaN(pointX)) {\n // There is no horizontal line that has its center point inside the linear\n // ring. Use the center of the the linear ring's extent.\n pointX = flatCenters[flatCentersOffset];\n }\n if (opt_dest) {\n opt_dest.push(pointX, y, maxSegmentLength);\n return opt_dest;\n }\n else {\n return [pointX, y, maxSegmentLength];\n }\n}\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array} flatCenters Flat centers.\n * @return {Array} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(flatCoordinates, offset, endss, stride, flatCenters) {\n var interiorPoints = [];\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n interiorPoints = getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, 2 * i, interiorPoints);\n offset = ends[ends.length - 1];\n }\n return interiorPoints;\n}\n//# sourceMappingURL=interiorpoint.js.map","/**\n * @module ol/geom/flat/reverse\n */\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n while (offset < end - stride) {\n for (var i = 0; i < stride; ++i) {\n var tmp = flatCoordinates[offset + i];\n flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n flatCoordinates[end - stride + i] = tmp;\n }\n offset += stride;\n end -= stride;\n }\n}\n//# sourceMappingURL=reverse.js.map","/**\n * @module ol/geom/flat/orient\n */\nimport { coordinates as reverseCoordinates } from './reverse.js';\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is clockwise when this function returns false.\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n // https://stackoverflow.com/q/1165647/clockwise-method#1165943\n // https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogrlinearring.cpp\n var edge = 0;\n var x1 = flatCoordinates[end - stride];\n var y1 = flatCoordinates[end - stride + 1];\n for (; offset < end; offset += stride) {\n var x2 = flatCoordinates[offset];\n var y2 = flatCoordinates[offset + 1];\n edge += (x2 - x1) * (y2 + y1);\n x1 = x2;\n y1 = y2;\n }\n return edge === 0 ? undefined : edge > 0;\n}\n/**\n * Determines if linear rings are oriented. By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [opt_right] Test for right-hand orientation\n * (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right) {\n var right = opt_right !== undefined ? opt_right : false;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride);\n if (i === 0) {\n if ((right && isClockwise) || (!right && !isClockwise)) {\n return false;\n }\n }\n else {\n if ((right && !isClockwise) || (!right && isClockwise)) {\n return false;\n }\n }\n offset = end;\n }\n return true;\n}\n/**\n * Determines if linear rings are oriented. By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [opt_right] Test for right-hand orientation\n * (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingssAreOriented(flatCoordinates, offset, endss, stride, opt_right) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right)) {\n return false;\n }\n if (ends.length) {\n offset = ends[ends.length - 1];\n }\n }\n return true;\n}\n/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean} [opt_right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRings(flatCoordinates, offset, ends, stride, opt_right) {\n var right = opt_right !== undefined ? opt_right : false;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride);\n var reverse = i === 0\n ? (right && isClockwise) || (!right && !isClockwise)\n : (right && !isClockwise) || (!right && isClockwise);\n if (reverse) {\n reverseCoordinates(flatCoordinates, offset, end, stride);\n }\n offset = end;\n }\n return offset;\n}\n/**\n * Orient coordinates in a flat array of linear rings. By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings). To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [opt_right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(flatCoordinates, offset, endss, stride, opt_right) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n offset = orientLinearRings(flatCoordinates, offset, endss[i], stride, opt_right);\n }\n return offset;\n}\n/**\n * Return a two-dimensional endss\n * @param {Array} flatCoordinates Flat coordinates\n * @param {Array} ends Linear ring end indexes\n * @return {Array>} Two dimensional endss array that can\n * be used to contruct a MultiPolygon\n */\nexport function inflateEnds(flatCoordinates, ends) {\n var endss = [];\n var offset = 0;\n var prevEndIndex = 0;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n // classifies an array of rings into polygons with outer rings and holes\n if (!linearRingIsClockwise(flatCoordinates, offset, end, 2)) {\n endss.push(ends.slice(prevEndIndex, i + 1));\n }\n else {\n if (endss.length === 0) {\n continue;\n }\n endss[endss.length - 1].push(ends[prevEndIndex]);\n }\n prevEndIndex = i + 1;\n offset = end;\n }\n return endss;\n}\n//# sourceMappingURL=orient.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/geom/Polygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport LinearRing from './LinearRing.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { arrayMaxSquaredDelta, assignClosestArrayPoint } from './flat/closest.js';\nimport { closestSquaredDistanceXY, getCenter } from '../extent.js';\nimport { deflateCoordinatesArray } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointOfArray } from './flat/interiorpoint.js';\nimport { inflateCoordinatesArray } from './flat/inflate.js';\nimport { intersectsLinearRingArray } from './flat/intersectsextent.js';\nimport { linearRingsAreOriented, orientLinearRings } from './flat/orient.js';\nimport { linearRings as linearRingsArea } from './flat/area.js';\nimport { linearRingsContainsXY } from './flat/contains.js';\nimport { modulo } from '../math.js';\nimport { quantizeArray } from './flat/simplify.js';\nimport { offset as sphereOffset } from '../sphere.js';\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nvar Polygon = /** @class */ (function (_super) {\n __extends(Polygon, _super);\n /**\n * @param {!Array>|!Array} coordinates\n * Array of linear rings that define the polygon. The first linear ring of the\n * array defines the outer-boundary or surface of the polygon. Each subsequent\n * linear ring defines a hole in the surface of the polygon. A linear ring is\n * an array of vertices' coordinates where the first coordinate and the last are\n * equivalent. (For internal use, flat coordinates in combination with\n * `opt_layout` and `opt_ends` are also accepted.)\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n * @param {Array} [opt_ends] Ends (for internal use with flat coordinates).\n */\n function Polygon(coordinates, opt_layout, opt_ends) {\n var _this = _super.call(this) || this;\n /**\n * @type {Array}\n * @private\n */\n _this.ends_ = [];\n /**\n * @private\n * @type {number}\n */\n _this.flatInteriorPointRevision_ = -1;\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n _this.flatInteriorPoint_ = null;\n /**\n * @private\n * @type {number}\n */\n _this.maxDelta_ = -1;\n /**\n * @private\n * @type {number}\n */\n _this.maxDeltaRevision_ = -1;\n /**\n * @private\n * @type {number}\n */\n _this.orientedRevision_ = -1;\n /**\n * @private\n * @type {Array}\n */\n _this.orientedFlatCoordinates_ = null;\n if (opt_layout !== undefined && opt_ends) {\n _this.setFlatCoordinates(opt_layout, \n /** @type {Array} */ (coordinates));\n _this.ends_ = opt_ends;\n }\n else {\n _this.setCoordinates(\n /** @type {Array>} */ (coordinates), opt_layout);\n }\n return _this;\n }\n /**\n * Append the passed linear ring to this polygon.\n * @param {LinearRing} linearRing Linear ring.\n * @api\n */\n Polygon.prototype.appendLinearRing = function (linearRing) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n }\n else {\n extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n }\n this.ends_.push(this.flatCoordinates.length);\n this.changed();\n };\n /**\n * Make a complete copy of the geometry.\n * @return {!Polygon} Clone.\n * @api\n */\n Polygon.prototype.clone = function () {\n var polygon = new Polygon(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n polygon.applyProperties(this);\n return polygon;\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n Polygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates, 0, this.ends_, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestArrayPoint(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n Polygon.prototype.containsXY = function (x, y) {\n return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);\n };\n /**\n * Return the area of the polygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n Polygon.prototype.getArea = function () {\n return linearRingsArea(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);\n };\n /**\n * Get the coordinate array for this geometry. This array has the structure\n * of a GeoJSON coordinate array for polygons.\n *\n * @param {boolean} [opt_right] Orient coordinates according to the right-hand\n * rule (counter-clockwise for exterior and clockwise for interior rings).\n * If `false`, coordinates will be oriented according to the left-hand rule\n * (clockwise for exterior and counter-clockwise for interior rings).\n * By default, coordinate orientation will depend on how the geometry was\n * constructed.\n * @return {Array>} Coordinates.\n * @api\n */\n Polygon.prototype.getCoordinates = function (opt_right) {\n var flatCoordinates;\n if (opt_right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, opt_right);\n }\n else {\n flatCoordinates = this.flatCoordinates;\n }\n return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);\n };\n /**\n * @return {Array} Ends.\n */\n Polygon.prototype.getEnds = function () {\n return this.ends_;\n };\n /**\n * @return {Array} Interior point.\n */\n Polygon.prototype.getFlatInteriorPoint = function () {\n if (this.flatInteriorPointRevision_ != this.getRevision()) {\n var flatCenter = getCenter(this.getExtent());\n this.flatInteriorPoint_ = getInteriorPointOfArray(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, flatCenter, 0);\n this.flatInteriorPointRevision_ = this.getRevision();\n }\n return this.flatInteriorPoint_;\n };\n /**\n * Return an interior point of the polygon.\n * @return {Point} Interior point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n * @api\n */\n Polygon.prototype.getInteriorPoint = function () {\n return new Point(this.getFlatInteriorPoint(), GeometryLayout.XYM);\n };\n /**\n * Return the number of rings of the polygon, this includes the exterior\n * ring and any interior rings.\n *\n * @return {number} Number of rings.\n * @api\n */\n Polygon.prototype.getLinearRingCount = function () {\n return this.ends_.length;\n };\n /**\n * Return the Nth linear ring of the polygon geometry. Return `null` if the\n * given index is out of range.\n * The exterior linear ring is available at index `0` and the interior rings\n * at index `1` and beyond.\n *\n * @param {number} index Index.\n * @return {LinearRing|null} Linear ring.\n * @api\n */\n Polygon.prototype.getLinearRing = function (index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LinearRing(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n };\n /**\n * Return the linear rings of the polygon.\n * @return {Array} Linear rings.\n * @api\n */\n Polygon.prototype.getLinearRings = function () {\n var layout = this.layout;\n var flatCoordinates = this.flatCoordinates;\n var ends = this.ends_;\n var linearRings = [];\n var offset = 0;\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var linearRing = new LinearRing(flatCoordinates.slice(offset, end), layout);\n linearRings.push(linearRing);\n offset = end;\n }\n return linearRings;\n };\n /**\n * @return {Array} Oriented flat coordinates.\n */\n Polygon.prototype.getOrientedFlatCoordinates = function () {\n if (this.orientedRevision_ != this.getRevision()) {\n var flatCoordinates = this.flatCoordinates;\n if (linearRingsAreOriented(flatCoordinates, 0, this.ends_, this.stride)) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n }\n else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length = orientLinearRings(this.orientedFlatCoordinates_, 0, this.ends_, this.stride);\n }\n this.orientedRevision_ = this.getRevision();\n }\n return this.orientedFlatCoordinates_;\n };\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Polygon} Simplified Polygon.\n * @protected\n */\n Polygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n var simplifiedEnds = [];\n simplifiedFlatCoordinates.length = quantizeArray(this.flatCoordinates, 0, this.ends_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEnds);\n return new Polygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n };\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n Polygon.prototype.getType = function () {\n return 'Polygon';\n };\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n Polygon.prototype.intersectsExtent = function (extent) {\n return intersectsLinearRingArray(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);\n };\n /**\n * Set the coordinates of the polygon.\n * @param {!Array>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n * @api\n */\n Polygon.prototype.setCoordinates = function (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n this.changed();\n };\n return Polygon;\n}(SimpleGeometry));\nexport default Polygon;\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n * the polygon vertices in meters.\n * @param {number} [opt_n] Optional number of vertices for the resulting\n * polygon. Default is `32`.\n * @param {number} [opt_sphereRadius] Optional radius for the sphere (defaults to\n * the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n */\nexport function circular(center, radius, opt_n, opt_sphereRadius) {\n var n = opt_n ? opt_n : 32;\n /** @type {Array} */\n var flatCoordinates = [];\n for (var i = 0; i < n; ++i) {\n extend(flatCoordinates, sphereOffset(center, radius, (2 * Math.PI * i) / n, opt_sphereRadius));\n }\n flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n return new Polygon(flatCoordinates, GeometryLayout.XY, [\n flatCoordinates.length,\n ]);\n}\n/**\n * Create a polygon from an extent. The layout used is `XY`.\n * @param {import(\"../extent.js\").Extent} extent The extent.\n * @return {Polygon} The polygon.\n * @api\n */\nexport function fromExtent(extent) {\n var minX = extent[0];\n var minY = extent[1];\n var maxX = extent[2];\n var maxY = extent[3];\n var flatCoordinates = [\n minX,\n minY,\n minX,\n maxY,\n maxX,\n maxY,\n maxX,\n minY,\n minX,\n minY,\n ];\n return new Polygon(flatCoordinates, GeometryLayout.XY, [\n flatCoordinates.length,\n ]);\n}\n/**\n * Create a regular polygon from a circle.\n * @param {import(\"./Circle.js\").default} circle Circle geometry.\n * @param {number} [opt_sides] Number of sides of the polygon. Default is 32.\n * @param {number} [opt_angle] Start angle for the first vertex of the polygon in\n * counter-clockwise radians. 0 means East. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, opt_sides, opt_angle) {\n var sides = opt_sides ? opt_sides : 32;\n var stride = circle.getStride();\n var layout = circle.getLayout();\n var center = circle.getCenter();\n var arrayLength = stride * (sides + 1);\n var flatCoordinates = new Array(arrayLength);\n for (var i = 0; i < arrayLength; i += stride) {\n flatCoordinates[i] = 0;\n flatCoordinates[i + 1] = 0;\n for (var j = 2; j < stride; j++) {\n flatCoordinates[i + j] = center[j];\n }\n }\n var ends = [flatCoordinates.length];\n var polygon = new Polygon(flatCoordinates, layout, ends);\n makeRegular(polygon, center, circle.getRadius(), opt_angle);\n return polygon;\n}\n/**\n * Modify the coordinates of a polygon to make it a regular polygon.\n * @param {Polygon} polygon Polygon geometry.\n * @param {import(\"../coordinate.js\").Coordinate} center Center of the regular polygon.\n * @param {number} radius Radius of the regular polygon.\n * @param {number} [opt_angle] Start angle for the first vertex of the polygon in\n * counter-clockwise radians. 0 means East. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, opt_angle) {\n var flatCoordinates = polygon.getFlatCoordinates();\n var stride = polygon.getStride();\n var sides = flatCoordinates.length / stride - 1;\n var startAngle = opt_angle ? opt_angle : 0;\n for (var i = 0; i <= sides; ++i) {\n var offset = i * stride;\n var angle = startAngle + (modulo(i, sides) * 2 * Math.PI) / sides;\n flatCoordinates[offset] = center[0] + radius * Math.cos(angle);\n flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);\n }\n polygon.changed();\n}\n//# sourceMappingURL=Polygon.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/geom/MultiPolygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport MultiPoint from './MultiPoint.js';\nimport Polygon from './Polygon.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestMultiArrayPoint, multiArrayMaxSquaredDelta, } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateMultiCoordinatesArray } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointsOfMultiArray } from './flat/interiorpoint.js';\nimport { inflateMultiCoordinatesArray } from './flat/inflate.js';\nimport { intersectsLinearRingMultiArray } from './flat/intersectsextent.js';\nimport { linearRingssAreOriented, orientLinearRingsArray, } from './flat/orient.js';\nimport { linearRingss as linearRingssArea } from './flat/area.js';\nimport { linearRingss as linearRingssCenter } from './flat/center.js';\nimport { linearRingssContainsXY } from './flat/contains.js';\nimport { quantizeMultiArray } from './flat/simplify.js';\n/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nvar MultiPolygon = /** @class */ (function (_super) {\n __extends(MultiPolygon, _super);\n /**\n * @param {Array>|Polygon>|Array} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n * @param {Array>} [opt_endss] Array of ends for internal use with flat coordinates.\n */\n function MultiPolygon(coordinates, opt_layout, opt_endss) {\n var _this = _super.call(this) || this;\n /**\n * @type {Array>}\n * @private\n */\n _this.endss_ = [];\n /**\n * @private\n * @type {number}\n */\n _this.flatInteriorPointsRevision_ = -1;\n /**\n * @private\n * @type {Array}\n */\n _this.flatInteriorPoints_ = null;\n /**\n * @private\n * @type {number}\n */\n _this.maxDelta_ = -1;\n /**\n * @private\n * @type {number}\n */\n _this.maxDeltaRevision_ = -1;\n /**\n * @private\n * @type {number}\n */\n _this.orientedRevision_ = -1;\n /**\n * @private\n * @type {Array}\n */\n _this.orientedFlatCoordinates_ = null;\n if (!opt_endss && !Array.isArray(coordinates[0])) {\n var layout = _this.getLayout();\n var polygons = /** @type {Array} */ (coordinates);\n var flatCoordinates = [];\n var endss = [];\n for (var i = 0, ii = polygons.length; i < ii; ++i) {\n var polygon = polygons[i];\n if (i === 0) {\n layout = polygon.getLayout();\n }\n var offset = flatCoordinates.length;\n var ends = polygon.getEnds();\n for (var j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] += offset;\n }\n extend(flatCoordinates, polygon.getFlatCoordinates());\n endss.push(ends);\n }\n opt_layout = layout;\n coordinates = flatCoordinates;\n opt_endss = endss;\n }\n if (opt_layout !== undefined && opt_endss) {\n _this.setFlatCoordinates(opt_layout, \n /** @type {Array} */ (coordinates));\n _this.endss_ = opt_endss;\n }\n else {\n _this.setCoordinates(\n /** @type {Array>>} */ (coordinates), opt_layout);\n }\n return _this;\n }\n /**\n * Append the passed polygon to this multipolygon.\n * @param {Polygon} polygon Polygon.\n * @api\n */\n MultiPolygon.prototype.appendPolygon = function (polygon) {\n /** @type {Array} */\n var ends;\n if (!this.flatCoordinates) {\n this.flatCoordinates = polygon.getFlatCoordinates().slice();\n ends = polygon.getEnds().slice();\n this.endss_.push();\n }\n else {\n var offset = this.flatCoordinates.length;\n extend(this.flatCoordinates, polygon.getFlatCoordinates());\n ends = polygon.getEnds().slice();\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] += offset;\n }\n }\n this.endss_.push(ends);\n this.changed();\n };\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiPolygon} Clone.\n * @api\n */\n MultiPolygon.prototype.clone = function () {\n var len = this.endss_.length;\n var newEndss = new Array(len);\n for (var i = 0; i < len; ++i) {\n newEndss[i] = this.endss_[i].slice();\n }\n var multiPolygon = new MultiPolygon(this.flatCoordinates.slice(), this.layout, newEndss);\n multiPolygon.applyProperties(this);\n return multiPolygon;\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n MultiPolygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(multiArrayMaxSquaredDelta(this.flatCoordinates, 0, this.endss_, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestMultiArrayPoint(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n MultiPolygon.prototype.containsXY = function (x, y) {\n return linearRingssContainsXY(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y);\n };\n /**\n * Return the area of the multipolygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n MultiPolygon.prototype.getArea = function () {\n return linearRingssArea(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride);\n };\n /**\n * Get the coordinate array for this geometry. This array has the structure\n * of a GeoJSON coordinate array for multi-polygons.\n *\n * @param {boolean} [opt_right] Orient coordinates according to the right-hand\n * rule (counter-clockwise for exterior and clockwise for interior rings).\n * If `false`, coordinates will be oriented according to the left-hand rule\n * (clockwise for exterior and counter-clockwise for interior rings).\n * By default, coordinate orientation will depend on how the geometry was\n * constructed.\n * @return {Array>>} Coordinates.\n * @api\n */\n MultiPolygon.prototype.getCoordinates = function (opt_right) {\n var flatCoordinates;\n if (opt_right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRingsArray(flatCoordinates, 0, this.endss_, this.stride, opt_right);\n }\n else {\n flatCoordinates = this.flatCoordinates;\n }\n return inflateMultiCoordinatesArray(flatCoordinates, 0, this.endss_, this.stride);\n };\n /**\n * @return {Array>} Endss.\n */\n MultiPolygon.prototype.getEndss = function () {\n return this.endss_;\n };\n /**\n * @return {Array} Flat interior points.\n */\n MultiPolygon.prototype.getFlatInteriorPoints = function () {\n if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n var flatCenters = linearRingssCenter(this.flatCoordinates, 0, this.endss_, this.stride);\n this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, flatCenters);\n this.flatInteriorPointsRevision_ = this.getRevision();\n }\n return this.flatInteriorPoints_;\n };\n /**\n * Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.\n * @return {MultiPoint} Interior points as XYM coordinates, where M is\n * the length of the horizontal intersection that the point belongs to.\n * @api\n */\n MultiPolygon.prototype.getInteriorPoints = function () {\n return new MultiPoint(this.getFlatInteriorPoints().slice(), GeometryLayout.XYM);\n };\n /**\n * @return {Array} Oriented flat coordinates.\n */\n MultiPolygon.prototype.getOrientedFlatCoordinates = function () {\n if (this.orientedRevision_ != this.getRevision()) {\n var flatCoordinates = this.flatCoordinates;\n if (linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n }\n else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length = orientLinearRingsArray(this.orientedFlatCoordinates_, 0, this.endss_, this.stride);\n }\n this.orientedRevision_ = this.getRevision();\n }\n return this.orientedFlatCoordinates_;\n };\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {MultiPolygon} Simplified MultiPolygon.\n * @protected\n */\n MultiPolygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n var simplifiedEndss = [];\n simplifiedFlatCoordinates.length = quantizeMultiArray(this.flatCoordinates, 0, this.endss_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEndss);\n return new MultiPolygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEndss);\n };\n /**\n * Return the polygon at the specified index.\n * @param {number} index Index.\n * @return {Polygon} Polygon.\n * @api\n */\n MultiPolygon.prototype.getPolygon = function (index) {\n if (index < 0 || this.endss_.length <= index) {\n return null;\n }\n var offset;\n if (index === 0) {\n offset = 0;\n }\n else {\n var prevEnds = this.endss_[index - 1];\n offset = prevEnds[prevEnds.length - 1];\n }\n var ends = this.endss_[index].slice();\n var end = ends[ends.length - 1];\n if (offset !== 0) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] -= offset;\n }\n }\n return new Polygon(this.flatCoordinates.slice(offset, end), this.layout, ends);\n };\n /**\n * Return the polygons of this multipolygon.\n * @return {Array} Polygons.\n * @api\n */\n MultiPolygon.prototype.getPolygons = function () {\n var layout = this.layout;\n var flatCoordinates = this.flatCoordinates;\n var endss = this.endss_;\n var polygons = [];\n var offset = 0;\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i].slice();\n var end = ends[ends.length - 1];\n if (offset !== 0) {\n for (var j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] -= offset;\n }\n }\n var polygon = new Polygon(flatCoordinates.slice(offset, end), layout, ends);\n polygons.push(polygon);\n offset = end;\n }\n return polygons;\n };\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n */\n MultiPolygon.prototype.getType = function () {\n return 'MultiPolygon';\n };\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n MultiPolygon.prototype.intersectsExtent = function (extent) {\n return intersectsLinearRingMultiArray(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, extent);\n };\n /**\n * Set the coordinates of the multipolygon.\n * @param {!Array>>} coordinates Coordinates.\n * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n * @api\n */\n MultiPolygon.prototype.setCoordinates = function (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 3);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n var endss = deflateMultiCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.endss_);\n if (endss.length === 0) {\n this.flatCoordinates.length = 0;\n }\n else {\n var lastEnds = endss[endss.length - 1];\n this.flatCoordinates.length =\n lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];\n }\n this.changed();\n };\n return MultiPolygon;\n}(SimpleGeometry));\nexport default MultiPolygon;\n//# sourceMappingURL=MultiPolygon.js.map","/**\n * @module ol/geom/flat/center\n */\nimport { createEmpty, createOrUpdateFromFlatCoordinates } from '../../extent.js';\n/**\n * @param {Array} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n var flatCenters = [];\n var extent = createEmpty();\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n var ends = endss[i];\n extent = createOrUpdateFromFlatCoordinates(flatCoordinates, offset, ends[0], stride);\n flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n offset = ends[ends.length - 1];\n }\n return flatCenters;\n}\n//# sourceMappingURL=center.js.map","/**\n * @module ol/layer/TileProperty\n */\n/**\n * @enum {string}\n */\nexport default {\n PRELOAD: 'preload',\n USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError',\n};\n//# sourceMappingURL=TileProperty.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/layer/BaseTile\n */\nimport Layer from './Layer.js';\nimport TileProperty from './TileProperty.js';\nimport { assign } from '../obj.js';\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").OnSignature &\n * import(\"../Observable\").CombinedOnSignature} BaseTileLayerOnSignature\n */\n/**\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {TileSourceType} [source] Source for this layer.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../PluggableMap.js\").default#addLayer map.addLayer()}.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n * @property {Object} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @template {import(\"../renderer/Layer.js\").default} RendererType\n * @extends {Layer}\n * @api\n */\nvar BaseTileLayer = /** @class */ (function (_super) {\n __extends(BaseTileLayer, _super);\n /**\n * @param {Options} [opt_options] Tile layer options.\n */\n function BaseTileLayer(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n var baseOptions = assign({}, options);\n delete baseOptions.preload;\n delete baseOptions.useInterimTilesOnError;\n _this = _super.call(this, baseOptions) || this;\n /***\n * @type {BaseTileLayerOnSignature}\n */\n _this.on;\n /***\n * @type {BaseTileLayerOnSignature}\n */\n _this.once;\n /***\n * @type {BaseTileLayerOnSignature}\n */\n _this.un;\n _this.setPreload(options.preload !== undefined ? options.preload : 0);\n _this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined\n ? options.useInterimTilesOnError\n : true);\n return _this;\n }\n /**\n * Return the level as number to which we will preload tiles up to.\n * @return {number} The level to preload tiles up to.\n * @observable\n * @api\n */\n BaseTileLayer.prototype.getPreload = function () {\n return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n };\n /**\n * Set the level as number to which we will preload tiles up to.\n * @param {number} preload The level to preload tiles up to.\n * @observable\n * @api\n */\n BaseTileLayer.prototype.setPreload = function (preload) {\n this.set(TileProperty.PRELOAD, preload);\n };\n /**\n * Whether we use interim tiles on error.\n * @return {boolean} Use interim tiles on error.\n * @observable\n * @api\n */\n BaseTileLayer.prototype.getUseInterimTilesOnError = function () {\n return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\n };\n /**\n * Set whether we use interim tiles on error.\n * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n * @observable\n * @api\n */\n BaseTileLayer.prototype.setUseInterimTilesOnError = function (useInterimTilesOnError) {\n this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n };\n /**\n * Get data for a pixel location. The return type depends on the source data. For image tiles,\n * a four element RGBA array will be returned. For data tiles, the array length will match the\n * number of bands in the dataset. For requests outside the layer extent, `null` will be returned.\n * Data for a image tiles can only be retrieved if the source's `crossOrigin` property is set.\n *\n * ```js\n * // display layer data on every pointer move\n * map.on('pointermove', (event) => {\n * console.log(layer.getData(event.pixel));\n * });\n * ```\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n * @api\n */\n BaseTileLayer.prototype.getData = function (pixel) {\n return _super.prototype.getData.call(this, pixel);\n };\n return BaseTileLayer;\n}(Layer));\nexport default BaseTileLayer;\n//# sourceMappingURL=BaseTile.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/renderer/Layer\n */\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport { abstract } from '../util.js';\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */\nvar LayerRenderer = /** @class */ (function (_super) {\n __extends(LayerRenderer, _super);\n /**\n * @param {LayerType} layer Layer.\n */\n function LayerRenderer(layer) {\n var _this = _super.call(this) || this;\n /**\n * The renderer is initialized and ready to render.\n * @type {boolean}\n */\n _this.ready = true;\n /** @private */\n _this.boundHandleImageChange_ = _this.handleImageChange_.bind(_this);\n /**\n * @protected\n * @type {LayerType}\n */\n _this.layer_ = layer;\n /**\n * @type {import(\"../render/canvas/ExecutorGroup\").default}\n */\n _this.declutterExecutorGroup = null;\n return _this;\n }\n /**\n * Asynchronous layer level hit detection.\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise>} Promise that resolves with\n * an array of features.\n */\n LayerRenderer.prototype.getFeatures = function (pixel) {\n return abstract();\n };\n /**\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n */\n LayerRenderer.prototype.getData = function (pixel) {\n return null;\n };\n /**\n * Determine whether render should be called.\n * @abstract\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n */\n LayerRenderer.prototype.prepareFrame = function (frameState) {\n return abstract();\n };\n /**\n * Render the layer.\n * @abstract\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {HTMLElement} target Target that may be used to render content to.\n * @return {HTMLElement} The rendered element.\n */\n LayerRenderer.prototype.renderFrame = function (frameState, target) {\n return abstract();\n };\n /**\n * @param {Object>} tiles Lookup of loaded tiles by zoom level.\n * @param {number} zoom Zoom level.\n * @param {import(\"../Tile.js\").default} tile Tile.\n * @return {boolean|void} If `false`, the tile will not be considered loaded.\n */\n LayerRenderer.prototype.loadedTileCallback = function (tiles, zoom, tile) {\n if (!tiles[zoom]) {\n tiles[zoom] = {};\n }\n tiles[zoom][tile.tileCoord.toString()] = tile;\n return undefined;\n };\n /**\n * Create a function that adds loaded tiles to the tile lookup.\n * @param {import(\"../source/Tile.js\").default} source Tile source.\n * @param {import(\"../proj/Projection.js\").default} projection Projection of the tiles.\n * @param {Object>} tiles Lookup of loaded tiles by zoom level.\n * @return {function(number, import(\"../TileRange.js\").default):boolean} A function that can be\n * called with a zoom level and a tile range to add loaded tiles to the lookup.\n * @protected\n */\n LayerRenderer.prototype.createLoadedTileFinder = function (source, projection, tiles) {\n return (\n /**\n * @param {number} zoom Zoom level.\n * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n * @return {boolean} The tile range is fully loaded.\n * @this {LayerRenderer}\n */\n function (zoom, tileRange) {\n var callback = this.loadedTileCallback.bind(this, tiles, zoom);\n return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n }.bind(this));\n };\n /**\n * @abstract\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"./vector.js\").FeatureCallback} callback Feature callback.\n * @param {Array>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n */\n LayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, matches) {\n return undefined;\n };\n /**\n * @abstract\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @return {Uint8ClampedArray|Uint8Array} The result. If there is no data at the pixel\n * location, null will be returned. If there is data, but pixel values cannot be\n * returned, and empty array will be returned.\n */\n LayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {\n return null;\n };\n /**\n * @return {LayerType} Layer.\n */\n LayerRenderer.prototype.getLayer = function () {\n return this.layer_;\n };\n /**\n * Perform action necessary to get the layer rendered after new fonts have loaded\n * @abstract\n */\n LayerRenderer.prototype.handleFontsChanged = function () { };\n /**\n * Handle changes in image state.\n * @param {import(\"../events/Event.js\").default} event Image change event.\n * @private\n */\n LayerRenderer.prototype.handleImageChange_ = function (event) {\n var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n if (image.getState() === ImageState.LOADED) {\n this.renderIfReadyAndVisible();\n }\n };\n /**\n * Load the image if not already loaded, and register the image change\n * listener if needed.\n * @param {import(\"../ImageBase.js\").default} image Image.\n * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n * @protected\n */\n LayerRenderer.prototype.loadImage = function (image) {\n var imageState = image.getState();\n if (imageState != ImageState.LOADED && imageState != ImageState.ERROR) {\n image.addEventListener(EventType.CHANGE, this.boundHandleImageChange_);\n }\n if (imageState == ImageState.IDLE) {\n image.load();\n imageState = image.getState();\n }\n return imageState == ImageState.LOADED;\n };\n /**\n * @protected\n */\n LayerRenderer.prototype.renderIfReadyAndVisible = function () {\n var layer = this.getLayer();\n if (layer && layer.getVisible() && layer.getSourceState() === 'ready') {\n layer.changed();\n }\n };\n /**\n * Clean up.\n */\n LayerRenderer.prototype.disposeInternal = function () {\n delete this.layer_;\n _super.prototype.disposeInternal.call(this);\n };\n return LayerRenderer;\n}(Observable));\nexport default LayerRenderer;\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/ImageState\n */\n/**\n * @enum {number}\n */\nexport default {\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n ERROR: 3,\n EMPTY: 4,\n};\n//# sourceMappingURL=ImageState.js.map","/**\n * @module ol/render/Event\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Event from '../events/Event.js';\nvar RenderEvent = /** @class */ (function (_super) {\n __extends(RenderEvent, _super);\n /**\n * @param {import(\"./EventType.js\").default} type Type.\n * @param {import(\"../transform.js\").Transform} [opt_inversePixelTransform] Transform for\n * CSS pixels to rendered pixels.\n * @param {import(\"../PluggableMap.js\").FrameState} [opt_frameState] Frame state.\n * @param {?(CanvasRenderingContext2D|WebGLRenderingContext)} [opt_context] Context.\n */\n function RenderEvent(type, opt_inversePixelTransform, opt_frameState, opt_context) {\n var _this = _super.call(this, type) || this;\n /**\n * Transform from CSS pixels (relative to the top-left corner of the map viewport)\n * to rendered pixels on this event's `context`. Only available when a Canvas renderer is used, null otherwise.\n * @type {import(\"../transform.js\").Transform|undefined}\n * @api\n */\n _this.inversePixelTransform = opt_inversePixelTransform;\n /**\n * An object representing the current render frame state.\n * @type {import(\"../PluggableMap.js\").FrameState|undefined}\n * @api\n */\n _this.frameState = opt_frameState;\n /**\n * Canvas context. Not available when the event is dispatched by the map. For Canvas 2D layers,\n * the context will be the 2D rendering context. For WebGL layers, the context will be the WebGL\n * context.\n * @type {CanvasRenderingContext2D|WebGLRenderingContext|undefined}\n * @api\n */\n _this.context = opt_context;\n return _this;\n }\n return RenderEvent;\n}(Event));\nexport default RenderEvent;\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/color\n */\nimport { assert } from './asserts.js';\nimport { clamp } from './math.js';\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array} Color\n * @api\n */\n/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\nvar HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n/**\n * Regular expression for matching potential named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\nvar NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\\(.*\\)$/i;\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nexport function asString(color) {\n if (typeof color === 'string') {\n return color;\n }\n else {\n return toString(color);\n }\n}\n/**\n * Return named color as an rgba string.\n * @param {string} color Named color.\n * @return {string} Rgb string.\n */\nfunction fromNamed(color) {\n var el = document.createElement('div');\n el.style.color = color;\n if (el.style.color !== '') {\n document.body.appendChild(el);\n var rgb = getComputedStyle(el).color;\n document.body.removeChild(el);\n return rgb;\n }\n else {\n return '';\n }\n}\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport var fromString = (function () {\n // We maintain a small cache of parsed strings. To provide cheap LRU-like\n // semantics, whenever the cache grows too large we simply delete an\n // arbitrary 25% of the entries.\n /**\n * @const\n * @type {number}\n */\n var MAX_CACHE_SIZE = 1024;\n /**\n * @type {Object}\n */\n var cache = {};\n /**\n * @type {number}\n */\n var cacheSize = 0;\n return (\n /**\n * @param {string} s String.\n * @return {Color} Color.\n */\n function (s) {\n var color;\n if (cache.hasOwnProperty(s)) {\n color = cache[s];\n }\n else {\n if (cacheSize >= MAX_CACHE_SIZE) {\n var i = 0;\n for (var key in cache) {\n if ((i++ & 3) === 0) {\n delete cache[key];\n --cacheSize;\n }\n }\n }\n color = fromStringInternal_(s);\n cache[s] = color;\n ++cacheSize;\n }\n return color;\n });\n})();\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nexport function asArray(color) {\n if (Array.isArray(color)) {\n return color;\n }\n else {\n return fromString(color);\n }\n}\n/**\n * @param {string} s String.\n * @private\n * @return {Color} Color.\n */\nfunction fromStringInternal_(s) {\n var r, g, b, a, color;\n if (NAMED_COLOR_RE_.exec(s)) {\n s = fromNamed(s);\n }\n if (HEX_COLOR_RE_.exec(s)) {\n // hex\n var n = s.length - 1; // number of hex digits\n var d = // number of digits per channel\n void 0; // number of digits per channel\n if (n <= 4) {\n d = 1;\n }\n else {\n d = 2;\n }\n var hasAlpha = n === 4 || n === 8;\n r = parseInt(s.substr(1 + 0 * d, d), 16);\n g = parseInt(s.substr(1 + 1 * d, d), 16);\n b = parseInt(s.substr(1 + 2 * d, d), 16);\n if (hasAlpha) {\n a = parseInt(s.substr(1 + 3 * d, d), 16);\n }\n else {\n a = 255;\n }\n if (d == 1) {\n r = (r << 4) + r;\n g = (g << 4) + g;\n b = (b << 4) + b;\n if (hasAlpha) {\n a = (a << 4) + a;\n }\n }\n color = [r, g, b, a / 255];\n }\n else if (s.indexOf('rgba(') == 0) {\n // rgba()\n color = s.slice(5, -1).split(',').map(Number);\n normalize(color);\n }\n else if (s.indexOf('rgb(') == 0) {\n // rgb()\n color = s.slice(4, -1).split(',').map(Number);\n color.push(1);\n normalize(color);\n }\n else {\n assert(false, 14); // Invalid color\n }\n return color;\n}\n/**\n * TODO this function is only used in the test, we probably shouldn't export it\n * @param {Color} color Color.\n * @return {Color} Clamped color.\n */\nexport function normalize(color) {\n color[0] = clamp((color[0] + 0.5) | 0, 0, 255);\n color[1] = clamp((color[1] + 0.5) | 0, 0, 255);\n color[2] = clamp((color[2] + 0.5) | 0, 0, 255);\n color[3] = clamp(color[3], 0, 1);\n return color;\n}\n/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nexport function toString(color) {\n var r = color[0];\n if (r != (r | 0)) {\n r = (r + 0.5) | 0;\n }\n var g = color[1];\n if (g != (g | 0)) {\n g = (g + 0.5) | 0;\n }\n var b = color[2];\n if (b != (b | 0)) {\n b = (b + 0.5) | 0;\n }\n var a = color[3] === undefined ? 1 : Math.round(color[3] * 100) / 100;\n return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n/**\n * @param {string} s String.\n * @return {boolean} Whether the string is actually a valid color\n */\nexport function isStringColor(s) {\n if (NAMED_COLOR_RE_.test(s)) {\n s = fromNamed(s);\n }\n return (HEX_COLOR_RE_.test(s) || s.indexOf('rgba(') === 0 || s.indexOf('rgb(') === 0);\n}\n//# sourceMappingURL=color.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/renderer/canvas/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport { apply as applyTransform, compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { asArray } from '../../color.js';\nimport { containsCoordinate, getBottomLeft, getBottomRight, getTopLeft, getTopRight, } from '../../extent.js';\nimport { createCanvasContext2D } from '../../dom.js';\nimport { equals } from '../../array.js';\n/**\n * @type {Array}\n */\nexport var canvasPool = [];\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar pixelContext = null;\nfunction createPixelContext() {\n var canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n pixelContext = canvas.getContext('2d');\n}\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer}\n */\nvar CanvasLayerRenderer = /** @class */ (function (_super) {\n __extends(CanvasLayerRenderer, _super);\n /**\n * @param {LayerType} layer Layer.\n */\n function CanvasLayerRenderer(layer) {\n var _this = _super.call(this, layer) || this;\n /**\n * @protected\n * @type {HTMLElement}\n */\n _this.container = null;\n /**\n * @protected\n * @type {number}\n */\n _this.renderedResolution;\n /**\n * A temporary transform. The values in this transform should only be used in a\n * function that sets the values.\n * @protected\n * @type {import(\"../../transform.js\").Transform}\n */\n _this.tempTransform = createTransform();\n /**\n * The transform for rendered pixels to viewport CSS pixels. This transform must\n * be set when rendering a frame and may be used by other functions after rendering.\n * @protected\n * @type {import(\"../../transform.js\").Transform}\n */\n _this.pixelTransform = createTransform();\n /**\n * The transform for viewport CSS pixels to rendered pixels. This transform must\n * be set when rendering a frame and may be used by other functions after rendering.\n * @protected\n * @type {import(\"../../transform.js\").Transform}\n */\n _this.inversePixelTransform = createTransform();\n /**\n * @type {CanvasRenderingContext2D}\n */\n _this.context = null;\n /**\n * @type {boolean}\n */\n _this.containerReused = false;\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n _this.pixelContext_ = null;\n /**\n * @protected\n * @type {import(\"../../PluggableMap.js\").FrameState|null}\n */\n _this.frameState = null;\n return _this;\n }\n /**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n * @param {number} col The column index.\n * @param {number} row The row index.\n * @return {Uint8ClampedArray|null} The image data.\n */\n CanvasLayerRenderer.prototype.getImageData = function (image, col, row) {\n if (!pixelContext) {\n createPixelContext();\n }\n pixelContext.clearRect(0, 0, 1, 1);\n var data;\n try {\n pixelContext.drawImage(image, col, row, 1, 1, 0, 0, 1, 1);\n data = pixelContext.getImageData(0, 0, 1, 1).data;\n }\n catch (err) {\n pixelContext = null;\n return null;\n }\n return data;\n };\n /**\n * @param {import('../../PluggableMap.js').FrameState} frameState Frame state.\n * @return {string} Background color.\n */\n CanvasLayerRenderer.prototype.getBackground = function (frameState) {\n var layer = this.getLayer();\n var background = layer.getBackground();\n if (typeof background === 'function') {\n background = background(frameState.viewState.resolution);\n }\n return background || undefined;\n };\n /**\n * Get a rendering container from an existing target, if compatible.\n * @param {HTMLElement} target Potential render target.\n * @param {string} transform CSS Transform.\n * @param {string} [opt_backgroundColor] Background color.\n */\n CanvasLayerRenderer.prototype.useContainer = function (target, transform, opt_backgroundColor) {\n var layerClassName = this.getLayer().getClassName();\n var container, context;\n if (target &&\n target.className === layerClassName &&\n (!opt_backgroundColor ||\n (target &&\n target.style.backgroundColor &&\n equals(asArray(target.style.backgroundColor), asArray(opt_backgroundColor))))) {\n var canvas = target.firstElementChild;\n if (canvas instanceof HTMLCanvasElement) {\n context = canvas.getContext('2d');\n }\n }\n if (context && context.canvas.style.transform === transform) {\n // Container of the previous layer renderer can be used.\n this.container = target;\n this.context = context;\n this.containerReused = true;\n }\n else if (this.containerReused) {\n // Previously reused container cannot be used any more.\n this.container = null;\n this.context = null;\n this.containerReused = false;\n }\n if (!this.container) {\n container = document.createElement('div');\n container.className = layerClassName;\n var style = container.style;\n style.position = 'absolute';\n style.width = '100%';\n style.height = '100%';\n context = createCanvasContext2D();\n var canvas = context.canvas;\n container.appendChild(canvas);\n style = canvas.style;\n style.position = 'absolute';\n style.left = '0';\n style.transformOrigin = 'top left';\n this.container = container;\n this.context = context;\n }\n if (!this.containerReused &&\n opt_backgroundColor &&\n !this.container.style.backgroundColor) {\n this.container.style.backgroundColor = opt_backgroundColor;\n }\n };\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n * @protected\n */\n CanvasLayerRenderer.prototype.clipUnrotated = function (context, frameState, extent) {\n var topLeft = getTopLeft(extent);\n var topRight = getTopRight(extent);\n var bottomRight = getBottomRight(extent);\n var bottomLeft = getBottomLeft(extent);\n applyTransform(frameState.coordinateToPixelTransform, topLeft);\n applyTransform(frameState.coordinateToPixelTransform, topRight);\n applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n var inverted = this.inversePixelTransform;\n applyTransform(inverted, topLeft);\n applyTransform(inverted, topRight);\n applyTransform(inverted, bottomRight);\n applyTransform(inverted, bottomLeft);\n context.save();\n context.beginPath();\n context.moveTo(Math.round(topLeft[0]), Math.round(topLeft[1]));\n context.lineTo(Math.round(topRight[0]), Math.round(topRight[1]));\n context.lineTo(Math.round(bottomRight[0]), Math.round(bottomRight[1]));\n context.lineTo(Math.round(bottomLeft[0]), Math.round(bottomLeft[1]));\n context.clip();\n };\n /**\n * @param {import(\"../../render/EventType.js\").default} type Event type.\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @private\n */\n CanvasLayerRenderer.prototype.dispatchRenderEvent_ = function (type, context, frameState) {\n var layer = this.getLayer();\n if (layer.hasListener(type)) {\n var event_1 = new RenderEvent(type, this.inversePixelTransform, frameState, context);\n layer.dispatchEvent(event_1);\n }\n };\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n CanvasLayerRenderer.prototype.preRender = function (context, frameState) {\n this.frameState = frameState;\n this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n };\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n CanvasLayerRenderer.prototype.postRender = function (context, frameState) {\n this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n };\n /**\n * Creates a transform for rendering to an element that will be rotated after rendering.\n * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} width Width of the rendered element (in pixels).\n * @param {number} height Height of the rendered element (in pixels).\n * @param {number} offsetX Offset on the x-axis in view coordinates.\n * @protected\n * @return {!import(\"../../transform.js\").Transform} Transform.\n */\n CanvasLayerRenderer.prototype.getRenderTransform = function (center, resolution, rotation, pixelRatio, width, height, offsetX) {\n var dx1 = width / 2;\n var dy1 = height / 2;\n var sx = pixelRatio / resolution;\n var sy = -sx;\n var dx2 = -center[0] + offsetX;\n var dy2 = -center[1];\n return composeTransform(this.tempTransform, dx1, dy1, sx, sy, -rotation, dx2, dy2);\n };\n /**\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState FrameState.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @return {Uint8ClampedArray|Uint8Array} The result. If there is no data at the pixel\n * location, null will be returned. If there is data, but pixel values cannot be\n * returned, and empty array will be returned.\n */\n CanvasLayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {\n var renderPixel = applyTransform(this.inversePixelTransform, pixel.slice());\n var context = this.context;\n var layer = this.getLayer();\n var layerExtent = layer.getExtent();\n if (layerExtent) {\n var renderCoordinate = applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n /** get only data inside of the layer extent */\n if (!containsCoordinate(layerExtent, renderCoordinate)) {\n return null;\n }\n }\n var x = Math.round(renderPixel[0]);\n var y = Math.round(renderPixel[1]);\n var pixelContext = this.pixelContext_;\n if (!pixelContext) {\n var pixelCanvas = document.createElement('canvas');\n pixelCanvas.width = 1;\n pixelCanvas.height = 1;\n pixelContext = pixelCanvas.getContext('2d');\n this.pixelContext_ = pixelContext;\n }\n pixelContext.clearRect(0, 0, 1, 1);\n var data;\n try {\n pixelContext.drawImage(context.canvas, x, y, 1, 1, 0, 0, 1, 1);\n data = pixelContext.getImageData(0, 0, 1, 1).data;\n }\n catch (err) {\n if (err.name === 'SecurityError') {\n // tainted canvas, we assume there is data at the given pixel (although there might not be)\n this.pixelContext_ = null;\n return new Uint8Array();\n }\n return data;\n }\n if (data[3] === 0) {\n return null;\n }\n return data;\n };\n /**\n * Clean up.\n */\n CanvasLayerRenderer.prototype.disposeInternal = function () {\n delete this.frameState;\n _super.prototype.disposeInternal.call(this);\n };\n return CanvasLayerRenderer;\n}(LayerRenderer));\nexport default CanvasLayerRenderer;\n//# sourceMappingURL=Layer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/Tile\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport TileState from './TileState.js';\nimport { abstract } from './util.js';\nimport { easeIn } from './easing.js';\n/**\n * A function that takes an {@link module:ol/Tile~Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n * tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState';\n *\n * source.setTileLoadFunction(function(tile, src) {\n * var xhr = new XMLHttpRequest();\n * xhr.responseType = 'blob';\n * xhr.addEventListener('loadend', function (evt) {\n * var data = this.response;\n * if (data !== undefined) {\n * tile.getImage().src = URL.createObjectURL(data);\n * } else {\n * tile.setState(TileState.ERROR);\n * }\n * });\n * xhr.addEventListener('error', function () {\n * tile.setState(TileState.ERROR);\n * });\n * xhr.open('GET', src);\n * xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n/**\n * {@link module:ol/source/Tile~TileSource} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes an {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection~Projection} for the projection as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n * import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n * @api\n */\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nvar Tile = /** @class */ (function (_super) {\n __extends(Tile, _super);\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {Options} [opt_options] Tile options.\n */\n function Tile(tileCoord, state, opt_options) {\n var _this = _super.call(this) || this;\n var options = opt_options ? opt_options : {};\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n _this.tileCoord = tileCoord;\n /**\n * @protected\n * @type {import(\"./TileState.js\").default}\n */\n _this.state = state;\n /**\n * An \"interim\" tile for this tile. The interim tile may be used while this\n * one is loading, for \"smooth\" transitions when changing params/dimensions\n * on the source.\n * @type {Tile}\n */\n _this.interimTile = null;\n /**\n * A key assigned to the tile. This is used by the tile source to determine\n * if this tile can effectively be used, or if a new tile should be created\n * and this one be used as an interim tile for this new tile.\n * @type {string}\n */\n _this.key = '';\n /**\n * The duration for the opacity transition.\n * @type {number}\n */\n _this.transition_ =\n options.transition === undefined ? 250 : options.transition;\n /**\n * Lookup of start times for rendering transitions. If the start time is\n * equal to -1, the transition is complete.\n * @type {Object}\n */\n _this.transitionStarts_ = {};\n /**\n * @type {boolean}\n */\n _this.interpolate = !!options.interpolate;\n return _this;\n }\n /**\n * @protected\n */\n Tile.prototype.changed = function () {\n this.dispatchEvent(EventType.CHANGE);\n };\n /**\n * Called by the tile cache when the tile is removed from the cache due to expiry\n */\n Tile.prototype.release = function () { };\n /**\n * @return {string} Key.\n */\n Tile.prototype.getKey = function () {\n return this.key + '/' + this.tileCoord;\n };\n /**\n * Get the interim tile most suitable for rendering using the chain of interim\n * tiles. This corresponds to the most recent tile that has been loaded, if no\n * such tile exists, the original tile is returned.\n * @return {!Tile} Best tile for rendering.\n */\n Tile.prototype.getInterimTile = function () {\n if (!this.interimTile) {\n //empty chain\n return this;\n }\n var tile = this.interimTile;\n // find the first loaded tile and return it. Since the chain is sorted in\n // decreasing order of creation time, there is no need to search the remainder\n // of the list (all those tiles correspond to older requests and will be\n // cleaned up by refreshInterimChain)\n do {\n if (tile.getState() == TileState.LOADED) {\n // Show tile immediately instead of fading it in after loading, because\n // the interim tile is in place already\n this.transition_ = 0;\n return tile;\n }\n tile = tile.interimTile;\n } while (tile);\n // we can not find a better tile\n return this;\n };\n /**\n * Goes through the chain of interim tiles and discards sections of the chain\n * that are no longer relevant.\n */\n Tile.prototype.refreshInterimChain = function () {\n if (!this.interimTile) {\n return;\n }\n var tile = this.interimTile;\n /**\n * @type {Tile}\n */\n var prev = this;\n do {\n if (tile.getState() == TileState.LOADED) {\n //we have a loaded tile, we can discard the rest of the list\n //we would could abort any LOADING tile request\n //older than this tile (i.e. any LOADING tile following this entry in the chain)\n tile.interimTile = null;\n break;\n }\n else if (tile.getState() == TileState.LOADING) {\n //keep this LOADING tile any loaded tiles later in the chain are\n //older than this tile, so we're still interested in the request\n prev = tile;\n }\n else if (tile.getState() == TileState.IDLE) {\n //the head of the list is the most current tile, we don't need\n //to start any other requests for this chain\n prev.interimTile = tile.interimTile;\n }\n else {\n prev = tile;\n }\n tile = prev.interimTile;\n } while (tile);\n };\n /**\n * Get the tile coordinate for this tile.\n * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n * @api\n */\n Tile.prototype.getTileCoord = function () {\n return this.tileCoord;\n };\n /**\n * @return {import(\"./TileState.js\").default} State.\n */\n Tile.prototype.getState = function () {\n return this.state;\n };\n /**\n * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n * the tile queue and will block other requests.\n * @param {import(\"./TileState.js\").default} state State.\n * @api\n */\n Tile.prototype.setState = function (state) {\n if (this.state !== TileState.ERROR && this.state > state) {\n throw new Error('Tile load sequence violation');\n }\n this.state = state;\n this.changed();\n };\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n * @abstract\n * @api\n */\n Tile.prototype.load = function () {\n abstract();\n };\n /**\n * Get the alpha value for rendering.\n * @param {string} id An id for the renderer.\n * @param {number} time The render frame time.\n * @return {number} A number between 0 and 1.\n */\n Tile.prototype.getAlpha = function (id, time) {\n if (!this.transition_) {\n return 1;\n }\n var start = this.transitionStarts_[id];\n if (!start) {\n start = time;\n this.transitionStarts_[id] = start;\n }\n else if (start === -1) {\n return 1;\n }\n var delta = time - start + 1000 / 60; // avoid rendering at 0\n if (delta >= this.transition_) {\n return 1;\n }\n return easeIn(delta / this.transition_);\n };\n /**\n * Determine if a tile is in an alpha transition. A tile is considered in\n * transition if tile.getAlpha() has not yet been called or has been called\n * and returned 1.\n * @param {string} id An id for the renderer.\n * @return {boolean} The tile is in transition.\n */\n Tile.prototype.inTransition = function (id) {\n if (!this.transition_) {\n return false;\n }\n return this.transitionStarts_[id] !== -1;\n };\n /**\n * Mark a transition as complete.\n * @param {string} id An id for the renderer.\n */\n Tile.prototype.endTransition = function (id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n };\n return Tile;\n}(EventTarget));\nexport default Tile;\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/TileState\n */\n/**\n * @enum {number}\n */\nexport default {\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n /**\n * Indicates that tile loading failed\n * @type {number}\n */\n ERROR: 3,\n EMPTY: 4,\n};\n//# sourceMappingURL=TileState.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/ImageBase\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport { abstract } from './util.js';\n/**\n * @abstract\n */\nvar ImageBase = /** @class */ (function (_super) {\n __extends(ImageBase, _super);\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number|undefined} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./ImageState.js\").default} state State.\n */\n function ImageBase(extent, resolution, pixelRatio, state) {\n var _this = _super.call(this) || this;\n /**\n * @protected\n * @type {import(\"./extent.js\").Extent}\n */\n _this.extent = extent;\n /**\n * @private\n * @type {number}\n */\n _this.pixelRatio_ = pixelRatio;\n /**\n * @protected\n * @type {number|undefined}\n */\n _this.resolution = resolution;\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n _this.state = state;\n return _this;\n }\n /**\n * @protected\n */\n ImageBase.prototype.changed = function () {\n this.dispatchEvent(EventType.CHANGE);\n };\n /**\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n ImageBase.prototype.getExtent = function () {\n return this.extent;\n };\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n */\n ImageBase.prototype.getImage = function () {\n return abstract();\n };\n /**\n * @return {number} PixelRatio.\n */\n ImageBase.prototype.getPixelRatio = function () {\n return this.pixelRatio_;\n };\n /**\n * @return {number} Resolution.\n */\n ImageBase.prototype.getResolution = function () {\n return /** @type {number} */ (this.resolution);\n };\n /**\n * @return {import(\"./ImageState.js\").default} State.\n */\n ImageBase.prototype.getState = function () {\n return this.state;\n };\n /**\n * Load not yet loaded URI.\n * @abstract\n */\n ImageBase.prototype.load = function () {\n abstract();\n };\n return ImageBase;\n}(EventTarget));\nexport default ImageBase;\n//# sourceMappingURL=ImageBase.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/Image\n */\nimport EventType from './events/EventType.js';\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\nimport { IMAGE_DECODE } from './has.js';\nimport { getHeight } from './extent.js';\nimport { listenOnce, unlistenByKey } from './events.js';\n/**\n * A function that takes an {@link module:ol/Image~ImageWrapper} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it so the\n * underlying image {@link module:ol/Image~ImageWrapper#getImage} is assigned the\n * content specified by the src. If not specified, the default is\n *\n * function(image, src) {\n * image.getImage().src = src;\n * }\n *\n * Providing a custom `imageLoadFunction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(ImageWrapper, string): void} LoadFunction\n * @api\n */\nvar ImageWrapper = /** @class */ (function (_super) {\n __extends(ImageWrapper, _super);\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number|undefined} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {string} src Image source URI.\n * @param {?string} crossOrigin Cross origin.\n * @param {LoadFunction} imageLoadFunction Image load function.\n */\n function ImageWrapper(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) {\n var _this = _super.call(this, extent, resolution, pixelRatio, ImageState.IDLE) || this;\n /**\n * @private\n * @type {string}\n */\n _this.src_ = src;\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n */\n _this.image_ = new Image();\n if (crossOrigin !== null) {\n _this.image_.crossOrigin = crossOrigin;\n }\n /**\n * @private\n * @type {?function():void}\n */\n _this.unlisten_ = null;\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n _this.state = ImageState.IDLE;\n /**\n * @private\n * @type {LoadFunction}\n */\n _this.imageLoadFunction_ = imageLoadFunction;\n return _this;\n }\n /**\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @api\n */\n ImageWrapper.prototype.getImage = function () {\n return this.image_;\n };\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n ImageWrapper.prototype.handleImageError_ = function () {\n this.state = ImageState.ERROR;\n this.unlistenImage_();\n this.changed();\n };\n /**\n * Tracks successful image load.\n *\n * @private\n */\n ImageWrapper.prototype.handleImageLoad_ = function () {\n if (this.resolution === undefined) {\n this.resolution = getHeight(this.extent) / this.image_.height;\n }\n this.state = ImageState.LOADED;\n this.unlistenImage_();\n this.changed();\n };\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n * @api\n */\n ImageWrapper.prototype.load = function () {\n if (this.state == ImageState.IDLE || this.state == ImageState.ERROR) {\n this.state = ImageState.LOADING;\n this.changed();\n this.imageLoadFunction_(this, this.src_);\n this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n }\n };\n /**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n */\n ImageWrapper.prototype.setImage = function (image) {\n this.image_ = image;\n this.resolution = getHeight(this.extent) / this.image_.height;\n };\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n ImageWrapper.prototype.unlistenImage_ = function () {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n };\n return ImageWrapper;\n}(ImageBase));\n/**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image element.\n * @param {function():any} loadHandler Load callback function.\n * @param {function():any} errorHandler Error callback function.\n * @return {function():void} Callback to stop listening.\n */\nexport function listenImage(image, loadHandler, errorHandler) {\n var img = /** @type {HTMLImageElement} */ (image);\n var listening = true;\n var decoding = false;\n var loaded = false;\n var listenerKeys = [\n listenOnce(img, EventType.LOAD, function () {\n loaded = true;\n if (!decoding) {\n loadHandler();\n }\n }),\n ];\n if (img.src && IMAGE_DECODE) {\n decoding = true;\n img\n .decode()\n .then(function () {\n if (listening) {\n loadHandler();\n }\n })\n .catch(function (error) {\n if (listening) {\n if (loaded) {\n loadHandler();\n }\n else {\n errorHandler();\n }\n }\n });\n }\n else {\n listenerKeys.push(listenOnce(img, EventType.ERROR, errorHandler));\n }\n return function unlisten() {\n listening = false;\n listenerKeys.forEach(unlistenByKey);\n };\n}\nexport default ImageWrapper;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/reproj\n */\nimport { IMAGE_SMOOTHING_DISABLED } from './renderer/canvas/common.js';\nimport { assign } from './obj.js';\nimport { containsCoordinate, createEmpty, extend, forEachCorner, getCenter, getHeight, getTopLeft, getWidth, } from './extent.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { getPointResolution, transform } from './proj.js';\nimport { solveLinearSystem } from './math.js';\nvar brokenDiagonalRendering_;\n/**\n * @type {Array}\n */\nexport var canvasPool = [];\n/**\n * This draws a small triangle into a canvas by setting the triangle as the clip region\n * and then drawing a (too large) rectangle\n *\n * @param {CanvasRenderingContext2D} ctx The context in which to draw the triangle\n * @param {number} u1 The x-coordinate of the second point. The first point is 0,0.\n * @param {number} v1 The y-coordinate of the second point.\n * @param {number} u2 The x-coordinate of the third point.\n * @param {number} v2 The y-coordinate of the third point.\n */\nfunction drawTestTriangle(ctx, u1, v1, u2, v2) {\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(u1, v1);\n ctx.lineTo(u2, v2);\n ctx.closePath();\n ctx.save();\n ctx.clip();\n ctx.fillRect(0, 0, Math.max(u1, u2) + 1, Math.max(v1, v2));\n ctx.restore();\n}\n/**\n * Given the data from getImageData, see if the right values appear at the provided offset.\n * Returns true if either the color or transparency is off\n *\n * @param {Uint8ClampedArray} data The data returned from getImageData\n * @param {number} offset The pixel offset from the start of data.\n * @return {boolean} true if the diagonal rendering is broken\n */\nfunction verifyBrokenDiagonalRendering(data, offset) {\n // the values ought to be close to the rgba(210, 0, 0, 0.75)\n return (Math.abs(data[offset * 4] - 210) > 2 ||\n Math.abs(data[offset * 4 + 3] - 0.75 * 255) > 2);\n}\n/**\n * Determines if the current browser configuration can render triangular clip regions correctly.\n * This value is cached so the function is only expensive the first time called.\n * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976\n * IE also doesn't. Chrome works, and everything seems to work on OSX and Android. This function caches the\n * result. I suppose that it is conceivably possible that a browser might flip modes while the app is\n * running, but lets hope not.\n *\n * @return {boolean} true if the Diagonal Rendering is broken.\n */\nfunction isBrokenDiagonalRendering() {\n if (brokenDiagonalRendering_ === undefined) {\n var ctx = document.createElement('canvas').getContext('2d');\n ctx.globalCompositeOperation = 'lighter';\n ctx.fillStyle = 'rgba(210, 0, 0, 0.75)';\n drawTestTriangle(ctx, 4, 5, 4, 0);\n drawTestTriangle(ctx, 4, 5, 0, 5);\n var data = ctx.getImageData(0, 0, 3, 3).data;\n brokenDiagonalRendering_ =\n verifyBrokenDiagonalRendering(data, 0) ||\n verifyBrokenDiagonalRendering(data, 4) ||\n verifyBrokenDiagonalRendering(data, 8);\n }\n return brokenDiagonalRendering_;\n}\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./coordinate.js\").Coordinate} targetCenter Target center.\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution) {\n var sourceCenter = transform(targetCenter, targetProj, sourceProj);\n // calculate the ideal resolution of the source data\n var sourceResolution = getPointResolution(targetProj, targetResolution, targetCenter);\n var targetMetersPerUnit = targetProj.getMetersPerUnit();\n if (targetMetersPerUnit !== undefined) {\n sourceResolution *= targetMetersPerUnit;\n }\n var sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n if (sourceMetersPerUnit !== undefined) {\n sourceResolution /= sourceMetersPerUnit;\n }\n // Based on the projection properties, the point resolution at the specified\n // coordinates may be slightly different. We need to reverse-compensate this\n // in order to achieve optimal results.\n var sourceExtent = sourceProj.getExtent();\n if (!sourceExtent || containsCoordinate(sourceExtent, sourceCenter)) {\n var compensationFactor = getPointResolution(sourceProj, sourceResolution, sourceCenter) /\n sourceResolution;\n if (isFinite(compensationFactor) && compensationFactor > 0) {\n sourceResolution /= compensationFactor;\n }\n }\n return sourceResolution;\n}\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceExtentResolution(sourceProj, targetProj, targetExtent, targetResolution) {\n var targetCenter = getCenter(targetExtent);\n var sourceResolution = calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution);\n if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n forEachCorner(targetExtent, function (corner) {\n sourceResolution = calculateSourceResolution(sourceProj, targetProj, corner, targetResolution);\n return isFinite(sourceResolution) && sourceResolution > 0;\n });\n }\n return sourceResolution;\n}\n/**\n * @typedef {Object} ImageExtent\n * @property {import(\"./extent.js\").Extent} extent Extent.\n * @property {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n */\n/**\n * Renders the source data into new canvas based on the triangulation.\n *\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} sourceResolution Source resolution.\n * @param {import(\"./extent.js\").Extent} sourceExtent Extent of the data source.\n * @param {number} targetResolution Target resolution.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent.\n * @param {import(\"./reproj/Triangulation.js\").default} triangulation Calculated triangulation.\n * @param {Array} sources Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {boolean} [opt_renderEdges] Render reprojection edges.\n * @param {boolean} [opt_interpolate] Use linear interpolation when resampling.\n * @return {HTMLCanvasElement} Canvas with reprojected data.\n */\nexport function render(width, height, pixelRatio, sourceResolution, sourceExtent, targetResolution, targetExtent, triangulation, sources, gutter, opt_renderEdges, opt_interpolate) {\n var context = createCanvasContext2D(Math.round(pixelRatio * width), Math.round(pixelRatio * height), canvasPool);\n if (!opt_interpolate) {\n assign(context, IMAGE_SMOOTHING_DISABLED);\n }\n if (sources.length === 0) {\n return context.canvas;\n }\n context.scale(pixelRatio, pixelRatio);\n function pixelRound(value) {\n return Math.round(value * pixelRatio) / pixelRatio;\n }\n context.globalCompositeOperation = 'lighter';\n var sourceDataExtent = createEmpty();\n sources.forEach(function (src, i, arr) {\n extend(sourceDataExtent, src.extent);\n });\n var canvasWidthInUnits = getWidth(sourceDataExtent);\n var canvasHeightInUnits = getHeight(sourceDataExtent);\n var stitchContext = createCanvasContext2D(Math.round((pixelRatio * canvasWidthInUnits) / sourceResolution), Math.round((pixelRatio * canvasHeightInUnits) / sourceResolution));\n if (!opt_interpolate) {\n assign(stitchContext, IMAGE_SMOOTHING_DISABLED);\n }\n var stitchScale = pixelRatio / sourceResolution;\n sources.forEach(function (src, i, arr) {\n var xPos = src.extent[0] - sourceDataExtent[0];\n var yPos = -(src.extent[3] - sourceDataExtent[3]);\n var srcWidth = getWidth(src.extent);\n var srcHeight = getHeight(src.extent);\n // This test should never fail -- but it does. Need to find a fix the upstream condition\n if (src.image.width > 0 && src.image.height > 0) {\n stitchContext.drawImage(src.image, gutter, gutter, src.image.width - 2 * gutter, src.image.height - 2 * gutter, xPos * stitchScale, yPos * stitchScale, srcWidth * stitchScale, srcHeight * stitchScale);\n }\n });\n var targetTopLeft = getTopLeft(targetExtent);\n triangulation.getTriangles().forEach(function (triangle, i, arr) {\n /* Calculate affine transform (src -> dst)\n * Resulting matrix can be used to transform coordinate\n * from `sourceProjection` to destination pixels.\n *\n * To optimize number of context calls and increase numerical stability,\n * we also do the following operations:\n * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)\n * here before solving the linear system so [ui, vi] are pixel coordinates.\n *\n * Src points: xi, yi\n * Dst points: ui, vi\n * Affine coefficients: aij\n *\n * | x0 y0 1 0 0 0 | |a00| |u0|\n * | x1 y1 1 0 0 0 | |a01| |u1|\n * | x2 y2 1 0 0 0 | x |a02| = |u2|\n * | 0 0 0 x0 y0 1 | |a10| |v0|\n * | 0 0 0 x1 y1 1 | |a11| |v1|\n * | 0 0 0 x2 y2 1 | |a12| |v2|\n */\n var source = triangle.source;\n var target = triangle.target;\n var x0 = source[0][0], y0 = source[0][1];\n var x1 = source[1][0], y1 = source[1][1];\n var x2 = source[2][0], y2 = source[2][1];\n // Make sure that everything is on pixel boundaries\n var u0 = pixelRound((target[0][0] - targetTopLeft[0]) / targetResolution);\n var v0 = pixelRound(-(target[0][1] - targetTopLeft[1]) / targetResolution);\n var u1 = pixelRound((target[1][0] - targetTopLeft[0]) / targetResolution);\n var v1 = pixelRound(-(target[1][1] - targetTopLeft[1]) / targetResolution);\n var u2 = pixelRound((target[2][0] - targetTopLeft[0]) / targetResolution);\n var v2 = pixelRound(-(target[2][1] - targetTopLeft[1]) / targetResolution);\n // Shift all the source points to improve numerical stability\n // of all the subsequent calculations. The [x0, y0] is used here.\n // This is also used to simplify the linear system.\n var sourceNumericalShiftX = x0;\n var sourceNumericalShiftY = y0;\n x0 = 0;\n y0 = 0;\n x1 -= sourceNumericalShiftX;\n y1 -= sourceNumericalShiftY;\n x2 -= sourceNumericalShiftX;\n y2 -= sourceNumericalShiftY;\n var augmentedMatrix = [\n [x1, y1, 0, 0, u1 - u0],\n [x2, y2, 0, 0, u2 - u0],\n [0, 0, x1, y1, v1 - v0],\n [0, 0, x2, y2, v2 - v0],\n ];\n var affineCoefs = solveLinearSystem(augmentedMatrix);\n if (!affineCoefs) {\n return;\n }\n context.save();\n context.beginPath();\n if (isBrokenDiagonalRendering() || !opt_interpolate) {\n // Make sure that all lines are horizontal or vertical\n context.moveTo(u1, v1);\n // This is the diagonal line. Do it in 4 steps\n var steps = 4;\n var ud = u0 - u1;\n var vd = v0 - v1;\n for (var step = 0; step < steps; step++) {\n // Go horizontally\n context.lineTo(u1 + pixelRound(((step + 1) * ud) / steps), v1 + pixelRound((step * vd) / (steps - 1)));\n // Go vertically\n if (step != steps - 1) {\n context.lineTo(u1 + pixelRound(((step + 1) * ud) / steps), v1 + pixelRound(((step + 1) * vd) / (steps - 1)));\n }\n }\n // We are almost at u0r, v0r\n context.lineTo(u2, v2);\n }\n else {\n context.moveTo(u1, v1);\n context.lineTo(u0, v0);\n context.lineTo(u2, v2);\n }\n context.clip();\n context.transform(affineCoefs[0], affineCoefs[2], affineCoefs[1], affineCoefs[3], u0, v0);\n context.translate(sourceDataExtent[0] - sourceNumericalShiftX, sourceDataExtent[3] - sourceNumericalShiftY);\n context.scale(sourceResolution / pixelRatio, -sourceResolution / pixelRatio);\n context.drawImage(stitchContext.canvas, 0, 0);\n context.restore();\n });\n if (opt_renderEdges) {\n context.save();\n context.globalCompositeOperation = 'source-over';\n context.strokeStyle = 'black';\n context.lineWidth = 1;\n triangulation.getTriangles().forEach(function (triangle, i, arr) {\n var target = triangle.target;\n var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n var v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n var v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n var v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n context.beginPath();\n context.moveTo(u1, v1);\n context.lineTo(u0, v0);\n context.lineTo(u2, v2);\n context.closePath();\n context.stroke();\n });\n context.restore();\n }\n return context.canvas;\n}\n//# sourceMappingURL=reproj.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/ImageTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { listenImage } from './Image.js';\nvar ImageTile = /** @class */ (function (_super) {\n __extends(ImageTile, _super);\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {string} src Image source URI.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options} [opt_options] Tile options.\n */\n function ImageTile(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n var _this = _super.call(this, tileCoord, state, opt_options) || this;\n /**\n * @private\n * @type {?string}\n */\n _this.crossOrigin_ = crossOrigin;\n /**\n * Image URI\n *\n * @private\n * @type {string}\n */\n _this.src_ = src;\n _this.key = src;\n /**\n * @private\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n _this.image_ = new Image();\n if (crossOrigin !== null) {\n _this.image_.crossOrigin = crossOrigin;\n }\n /**\n * @private\n * @type {?function():void}\n */\n _this.unlisten_ = null;\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n _this.tileLoadFunction_ = tileLoadFunction;\n return _this;\n }\n /**\n * Get the HTML image element for this tile (may be a Canvas, Image, or Video).\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @api\n */\n ImageTile.prototype.getImage = function () {\n return this.image_;\n };\n /**\n * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).\n * @param {HTMLCanvasElement|HTMLImageElement} element Element.\n */\n ImageTile.prototype.setImage = function (element) {\n this.image_ = element;\n this.state = TileState.LOADED;\n this.unlistenImage_();\n this.changed();\n };\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n ImageTile.prototype.handleImageError_ = function () {\n this.state = TileState.ERROR;\n this.unlistenImage_();\n this.image_ = getBlankImage();\n this.changed();\n };\n /**\n * Tracks successful image load.\n *\n * @private\n */\n ImageTile.prototype.handleImageLoad_ = function () {\n var image = /** @type {HTMLImageElement} */ (this.image_);\n if (image.naturalWidth && image.naturalHeight) {\n this.state = TileState.LOADED;\n }\n else {\n this.state = TileState.EMPTY;\n }\n this.unlistenImage_();\n this.changed();\n };\n /**\n * Load not yet loaded URI.\n * @api\n */\n ImageTile.prototype.load = function () {\n if (this.state == TileState.ERROR) {\n this.state = TileState.IDLE;\n this.image_ = new Image();\n if (this.crossOrigin_ !== null) {\n this.image_.crossOrigin = this.crossOrigin_;\n }\n }\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n this.tileLoadFunction_(this, this.src_);\n this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n }\n };\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n ImageTile.prototype.unlistenImage_ = function () {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n };\n return ImageTile;\n}(Tile));\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n var ctx = createCanvasContext2D(1, 1);\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return ctx.canvas;\n}\nexport default ImageTile;\n//# sourceMappingURL=ImageTile.js.map","/**\n * @module ol/reproj/Triangulation\n */\nimport { boundingExtent, createEmpty, extendCoordinate, getArea, getBottomLeft, getBottomRight, getTopLeft, getTopRight, getWidth, intersects, } from '../extent.js';\nimport { getTransform } from '../proj.js';\nimport { log2, modulo } from '../math.js';\n/**\n * Single triangle; consists of 3 source points and 3 target points.\n * @typedef {Object} Triangle\n * @property {Array} source Source.\n * @property {Array} target Target.\n */\n/**\n * Maximum number of subdivision steps during raster reprojection triangulation.\n * Prevents high memory usage and large number of proj4 calls (for certain\n * transformations and areas). At most `2*(2^this)` triangles are created for\n * each triangulated extent (tile/image).\n * @type {number}\n */\nvar MAX_SUBDIVISION = 10;\n/**\n * Maximum allowed size of triangle relative to world width. When transforming\n * corners of world extent between certain projections, the resulting\n * triangulation seems to have zero error and no subdivision is performed. If\n * the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.\n * @type {number}\n */\nvar MAX_TRIANGLE_WIDTH = 0.25;\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */\nvar Triangulation = /** @class */ (function () {\n /**\n * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"../extent.js\").Extent} targetExtent Target extent to triangulate.\n * @param {import(\"../extent.js\").Extent} maxSourceExtent Maximal source extent that can be used.\n * @param {number} errorThreshold Acceptable error (in source units).\n * @param {?number} opt_destinationResolution The (optional) resolution of the destination.\n */\n function Triangulation(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold, opt_destinationResolution) {\n /**\n * @type {import(\"../proj/Projection.js\").default}\n * @private\n */\n this.sourceProj_ = sourceProj;\n /**\n * @type {import(\"../proj/Projection.js\").default}\n * @private\n */\n this.targetProj_ = targetProj;\n /** @type {!Object} */\n var transformInvCache = {};\n var transformInv = getTransform(this.targetProj_, this.sourceProj_);\n /**\n * @param {import(\"../coordinate.js\").Coordinate} c A coordinate.\n * @return {import(\"../coordinate.js\").Coordinate} Transformed coordinate.\n * @private\n */\n this.transformInv_ = function (c) {\n var key = c[0] + '/' + c[1];\n if (!transformInvCache[key]) {\n transformInvCache[key] = transformInv(c);\n }\n return transformInvCache[key];\n };\n /**\n * @type {import(\"../extent.js\").Extent}\n * @private\n */\n this.maxSourceExtent_ = maxSourceExtent;\n /**\n * @type {number}\n * @private\n */\n this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n /**\n * @type {Array}\n * @private\n */\n this.triangles_ = [];\n /**\n * Indicates that the triangulation crosses edge of the source projection.\n * @type {boolean}\n * @private\n */\n this.wrapsXInSource_ = false;\n /**\n * @type {boolean}\n * @private\n */\n this.canWrapXInSource_ =\n this.sourceProj_.canWrapX() &&\n !!maxSourceExtent &&\n !!this.sourceProj_.getExtent() &&\n getWidth(maxSourceExtent) == getWidth(this.sourceProj_.getExtent());\n /**\n * @type {?number}\n * @private\n */\n this.sourceWorldWidth_ = this.sourceProj_.getExtent()\n ? getWidth(this.sourceProj_.getExtent())\n : null;\n /**\n * @type {?number}\n * @private\n */\n this.targetWorldWidth_ = this.targetProj_.getExtent()\n ? getWidth(this.targetProj_.getExtent())\n : null;\n var destinationTopLeft = getTopLeft(targetExtent);\n var destinationTopRight = getTopRight(targetExtent);\n var destinationBottomRight = getBottomRight(targetExtent);\n var destinationBottomLeft = getBottomLeft(targetExtent);\n var sourceTopLeft = this.transformInv_(destinationTopLeft);\n var sourceTopRight = this.transformInv_(destinationTopRight);\n var sourceBottomRight = this.transformInv_(destinationBottomRight);\n var sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n /*\n * The maxSubdivision controls how many splittings of the target area can\n * be done. The idea here is to do a linear mapping of the target areas\n * but the actual overal reprojection (can be) extremely non-linear. The\n * default value of MAX_SUBDIVISION was chosen based on mapping a 256x256\n * tile size. However this function is also called to remap canvas rendered\n * layers which can be much larger. This calculation increases the maxSubdivision\n * value by the right factor so that each 256x256 pixel area has\n * MAX_SUBDIVISION divisions.\n */\n var maxSubdivision = MAX_SUBDIVISION +\n (opt_destinationResolution\n ? Math.max(0, Math.ceil(log2(getArea(targetExtent) /\n (opt_destinationResolution *\n opt_destinationResolution *\n 256 *\n 256))))\n : 0);\n this.addQuad_(destinationTopLeft, destinationTopRight, destinationBottomRight, destinationBottomLeft, sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft, maxSubdivision);\n if (this.wrapsXInSource_) {\n var leftBound_1 = Infinity;\n this.triangles_.forEach(function (triangle, i, arr) {\n leftBound_1 = Math.min(leftBound_1, triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]);\n });\n // Shift triangles to be as close to `leftBound` as possible\n // (if the distance is more than `worldWidth / 2` it can be closer.\n this.triangles_.forEach(function (triangle) {\n if (Math.max(triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]) -\n leftBound_1 >\n this.sourceWorldWidth_ / 2) {\n var newTriangle = [\n [triangle.source[0][0], triangle.source[0][1]],\n [triangle.source[1][0], triangle.source[1][1]],\n [triangle.source[2][0], triangle.source[2][1]],\n ];\n if (newTriangle[0][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n newTriangle[0][0] -= this.sourceWorldWidth_;\n }\n if (newTriangle[1][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n newTriangle[1][0] -= this.sourceWorldWidth_;\n }\n if (newTriangle[2][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n newTriangle[2][0] -= this.sourceWorldWidth_;\n }\n // Rarely (if the extent contains both the dateline and prime meridian)\n // the shift can in turn break some triangles.\n // Detect this here and don't shift in such cases.\n var minX = Math.min(newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n var maxX = Math.max(newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n if (maxX - minX < this.sourceWorldWidth_ / 2) {\n triangle.source = newTriangle;\n }\n }\n }.bind(this));\n }\n transformInvCache = {};\n }\n /**\n * Adds triangle to the triangulation.\n * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n * @private\n */\n Triangulation.prototype.addTriangle_ = function (a, b, c, aSrc, bSrc, cSrc) {\n this.triangles_.push({\n source: [aSrc, bSrc, cSrc],\n target: [a, b, c],\n });\n };\n /**\n * Adds quad (points in clock-wise order) to the triangulation\n * (and reprojects the vertices) if valid.\n * Performs quad subdivision if needed to increase precision.\n *\n * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} d The target d coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} dSrc The source d coordinate.\n * @param {number} maxSubdivision Maximal allowed subdivision of the quad.\n * @private\n */\n Triangulation.prototype.addQuad_ = function (a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n var sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n var sourceCoverageX = this.sourceWorldWidth_\n ? getWidth(sourceQuadExtent) / this.sourceWorldWidth_\n : null;\n var sourceWorldWidth = /** @type {number} */ (this.sourceWorldWidth_);\n // when the quad is wrapped in the source projection\n // it covers most of the projection extent, but not fully\n var wrapsX = this.sourceProj_.canWrapX() &&\n sourceCoverageX > 0.5 &&\n sourceCoverageX < 1;\n var needsSubdivision = false;\n if (maxSubdivision > 0) {\n if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n var targetQuadExtent = boundingExtent([a, b, c, d]);\n var targetCoverageX = getWidth(targetQuadExtent) / this.targetWorldWidth_;\n needsSubdivision =\n targetCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n }\n if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {\n needsSubdivision =\n sourceCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n }\n }\n if (!needsSubdivision && this.maxSourceExtent_) {\n if (isFinite(sourceQuadExtent[0]) &&\n isFinite(sourceQuadExtent[1]) &&\n isFinite(sourceQuadExtent[2]) &&\n isFinite(sourceQuadExtent[3])) {\n if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n // whole quad outside source projection extent -> ignore\n return;\n }\n }\n }\n var isNotFinite = 0;\n if (!needsSubdivision) {\n if (!isFinite(aSrc[0]) ||\n !isFinite(aSrc[1]) ||\n !isFinite(bSrc[0]) ||\n !isFinite(bSrc[1]) ||\n !isFinite(cSrc[0]) ||\n !isFinite(cSrc[1]) ||\n !isFinite(dSrc[0]) ||\n !isFinite(dSrc[1])) {\n if (maxSubdivision > 0) {\n needsSubdivision = true;\n }\n else {\n // It might be the case that only 1 of the points is infinite. In this case\n // we can draw a single triangle with the other three points\n isNotFinite =\n (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ? 8 : 0) +\n (!isFinite(bSrc[0]) || !isFinite(bSrc[1]) ? 4 : 0) +\n (!isFinite(cSrc[0]) || !isFinite(cSrc[1]) ? 2 : 0) +\n (!isFinite(dSrc[0]) || !isFinite(dSrc[1]) ? 1 : 0);\n if (isNotFinite != 1 &&\n isNotFinite != 2 &&\n isNotFinite != 4 &&\n isNotFinite != 8) {\n return;\n }\n }\n }\n }\n if (maxSubdivision > 0) {\n if (!needsSubdivision) {\n var center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];\n var centerSrc = this.transformInv_(center);\n var dx = void 0;\n if (wrapsX) {\n var centerSrcEstimX = (modulo(aSrc[0], sourceWorldWidth) +\n modulo(cSrc[0], sourceWorldWidth)) /\n 2;\n dx = centerSrcEstimX - modulo(centerSrc[0], sourceWorldWidth);\n }\n else {\n dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n }\n var dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n var centerSrcErrorSquared = dx * dx + dy * dy;\n needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;\n }\n if (needsSubdivision) {\n if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {\n // split horizontally (top & bottom)\n var bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];\n var bcSrc = this.transformInv_(bc);\n var da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];\n var daSrc = this.transformInv_(da);\n this.addQuad_(a, b, bc, da, aSrc, bSrc, bcSrc, daSrc, maxSubdivision - 1);\n this.addQuad_(da, bc, c, d, daSrc, bcSrc, cSrc, dSrc, maxSubdivision - 1);\n }\n else {\n // split vertically (left & right)\n var ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];\n var abSrc = this.transformInv_(ab);\n var cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];\n var cdSrc = this.transformInv_(cd);\n this.addQuad_(a, ab, cd, d, aSrc, abSrc, cdSrc, dSrc, maxSubdivision - 1);\n this.addQuad_(ab, b, c, cd, abSrc, bSrc, cSrc, cdSrc, maxSubdivision - 1);\n }\n return;\n }\n }\n if (wrapsX) {\n if (!this.canWrapXInSource_) {\n return;\n }\n this.wrapsXInSource_ = true;\n }\n // Exactly zero or one of *Src is not finite\n // The triangles must have the diagonal line as the first side\n // This is to allow easy code in reproj.s to make it straight for broken\n // browsers that can't handle diagonal clipping\n if ((isNotFinite & 0xb) == 0) {\n this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n }\n if ((isNotFinite & 0xe) == 0) {\n this.addTriangle_(a, c, b, aSrc, cSrc, bSrc);\n }\n if (isNotFinite) {\n // Try the other two triangles\n if ((isNotFinite & 0xd) == 0) {\n this.addTriangle_(b, d, a, bSrc, dSrc, aSrc);\n }\n if ((isNotFinite & 0x7) == 0) {\n this.addTriangle_(b, d, c, bSrc, dSrc, cSrc);\n }\n }\n };\n /**\n * Calculates extent of the `source` coordinates from all the triangles.\n *\n * @return {import(\"../extent.js\").Extent} Calculated extent.\n */\n Triangulation.prototype.calculateSourceExtent = function () {\n var extent = createEmpty();\n this.triangles_.forEach(function (triangle, i, arr) {\n var src = triangle.source;\n extendCoordinate(extent, src[0]);\n extendCoordinate(extent, src[1]);\n extendCoordinate(extent, src[2]);\n });\n return extent;\n };\n /**\n * @return {Array} Array of the calculated triangles.\n */\n Triangulation.prototype.getTriangles = function () {\n return this.triangles_;\n };\n return Triangulation;\n}());\nexport default Triangulation;\n//# sourceMappingURL=Triangulation.js.map","/**\n * @module ol/renderer/canvas/common\n */\n/**\n * Context options to disable image smoothing.\n * @type {Object}\n */\nexport var IMAGE_SMOOTHING_DISABLED = {\n imageSmoothingEnabled: false,\n msImageSmoothingEnabled: false,\n};\n/**\n * Context options to enable image smoothing.\n * @type {Object}\n */\nexport var IMAGE_SMOOTHING_ENABLED = {\n imageSmoothingEnabled: true,\n msImageSmoothingEnabled: true,\n};\n//# sourceMappingURL=common.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/reproj/Tile\n */\nimport { ERROR_THRESHOLD } from './common.js';\nimport EventType from '../events/EventType.js';\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport Triangulation from './Triangulation.js';\nimport { calculateSourceExtentResolution, canvasPool, render as renderReprojected, } from '../reproj.js';\nimport { clamp } from '../math.js';\nimport { getArea, getIntersection } from '../extent.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { releaseCanvas } from '../dom.js';\n/**\n * @typedef {function(number, number, number, number) : import(\"../Tile.js\").default} FunctionType\n */\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nvar ReprojTile = /** @class */ (function (_super) {\n __extends(ReprojTile, _super);\n /**\n * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of the tile.\n * @param {import(\"../tilecoord.js\").TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} gutter Gutter of the source tiles.\n * @param {FunctionType} getTileFunction\n * Function returning source tiles (z, x, y, pixelRatio).\n * @param {number} [opt_errorThreshold] Acceptable reprojection error (in px).\n * @param {boolean} [opt_renderEdges] Render reprojection edges.\n * @param {boolean} [opt_interpolate] Use linear interpolation when resampling.\n */\n function ReprojTile(sourceProj, sourceTileGrid, targetProj, targetTileGrid, tileCoord, wrappedTileCoord, pixelRatio, gutter, getTileFunction, opt_errorThreshold, opt_renderEdges, opt_interpolate) {\n var _this = _super.call(this, tileCoord, TileState.IDLE, { interpolate: !!opt_interpolate }) || this;\n /**\n * @private\n * @type {boolean}\n */\n _this.renderEdges_ = opt_renderEdges !== undefined ? opt_renderEdges : false;\n /**\n * @private\n * @type {number}\n */\n _this.pixelRatio_ = pixelRatio;\n /**\n * @private\n * @type {number}\n */\n _this.gutter_ = gutter;\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n _this.canvas_ = null;\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n _this.sourceTileGrid_ = sourceTileGrid;\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n _this.targetTileGrid_ = targetTileGrid;\n /**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\n _this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;\n /**\n * @private\n * @type {!Array}\n */\n _this.sourceTiles_ = [];\n /**\n * @private\n * @type {?Array}\n */\n _this.sourcesListenerKeys_ = null;\n /**\n * @private\n * @type {number}\n */\n _this.sourceZ_ = 0;\n var targetExtent = targetTileGrid.getTileCoordExtent(_this.wrappedTileCoord_);\n var maxTargetExtent = _this.targetTileGrid_.getExtent();\n var maxSourceExtent = _this.sourceTileGrid_.getExtent();\n var limitedTargetExtent = maxTargetExtent\n ? getIntersection(targetExtent, maxTargetExtent)\n : targetExtent;\n if (getArea(limitedTargetExtent) === 0) {\n // Tile is completely outside range -> EMPTY\n // TODO: is it actually correct that the source even creates the tile ?\n _this.state = TileState.EMPTY;\n return _this;\n }\n var sourceProjExtent = sourceProj.getExtent();\n if (sourceProjExtent) {\n if (!maxSourceExtent) {\n maxSourceExtent = sourceProjExtent;\n }\n else {\n maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n }\n }\n var targetResolution = targetTileGrid.getResolution(_this.wrappedTileCoord_[0]);\n var sourceResolution = calculateSourceExtentResolution(sourceProj, targetProj, limitedTargetExtent, targetResolution);\n if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n // invalid sourceResolution -> EMPTY\n // probably edges of the projections when no extent is defined\n _this.state = TileState.EMPTY;\n return _this;\n }\n var errorThresholdInPixels = opt_errorThreshold !== undefined ? opt_errorThreshold : ERROR_THRESHOLD;\n /**\n * @private\n * @type {!import(\"./Triangulation.js\").default}\n */\n _this.triangulation_ = new Triangulation(sourceProj, targetProj, limitedTargetExtent, maxSourceExtent, sourceResolution * errorThresholdInPixels, targetResolution);\n if (_this.triangulation_.getTriangles().length === 0) {\n // no valid triangles -> EMPTY\n _this.state = TileState.EMPTY;\n return _this;\n }\n _this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n var sourceExtent = _this.triangulation_.calculateSourceExtent();\n if (maxSourceExtent) {\n if (sourceProj.canWrapX()) {\n sourceExtent[1] = clamp(sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);\n sourceExtent[3] = clamp(sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);\n }\n else {\n sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n }\n }\n if (!getArea(sourceExtent)) {\n _this.state = TileState.EMPTY;\n }\n else {\n var sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(sourceExtent, _this.sourceZ_);\n for (var srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n for (var srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n var tile = getTileFunction(_this.sourceZ_, srcX, srcY, pixelRatio);\n if (tile) {\n _this.sourceTiles_.push(tile);\n }\n }\n }\n if (_this.sourceTiles_.length === 0) {\n _this.state = TileState.EMPTY;\n }\n }\n return _this;\n }\n /**\n * Get the HTML Canvas element for this tile.\n * @return {HTMLCanvasElement} Canvas.\n */\n ReprojTile.prototype.getImage = function () {\n return this.canvas_;\n };\n /**\n * @private\n */\n ReprojTile.prototype.reproject_ = function () {\n var sources = [];\n this.sourceTiles_.forEach(function (tile, i, arr) {\n if (tile && tile.getState() == TileState.LOADED) {\n sources.push({\n extent: this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord),\n image: tile.getImage(),\n });\n }\n }.bind(this));\n this.sourceTiles_.length = 0;\n if (sources.length === 0) {\n this.state = TileState.ERROR;\n }\n else {\n var z = this.wrappedTileCoord_[0];\n var size = this.targetTileGrid_.getTileSize(z);\n var width = typeof size === 'number' ? size : size[0];\n var height = typeof size === 'number' ? size : size[1];\n var targetResolution = this.targetTileGrid_.getResolution(z);\n var sourceResolution = this.sourceTileGrid_.getResolution(this.sourceZ_);\n var targetExtent = this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);\n this.canvas_ = renderReprojected(width, height, this.pixelRatio_, sourceResolution, this.sourceTileGrid_.getExtent(), targetResolution, targetExtent, this.triangulation_, sources, this.gutter_, this.renderEdges_, this.interpolate);\n this.state = TileState.LOADED;\n }\n this.changed();\n };\n /**\n * Load not yet loaded URI.\n */\n ReprojTile.prototype.load = function () {\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n var leftToLoad_1 = 0;\n this.sourcesListenerKeys_ = [];\n this.sourceTiles_.forEach(function (tile, i, arr) {\n var state = tile.getState();\n if (state == TileState.IDLE || state == TileState.LOADING) {\n leftToLoad_1++;\n var sourceListenKey_1 = listen(tile, EventType.CHANGE, function (e) {\n var state = tile.getState();\n if (state == TileState.LOADED ||\n state == TileState.ERROR ||\n state == TileState.EMPTY) {\n unlistenByKey(sourceListenKey_1);\n leftToLoad_1--;\n if (leftToLoad_1 === 0) {\n this.unlistenSources_();\n this.reproject_();\n }\n }\n }, this);\n this.sourcesListenerKeys_.push(sourceListenKey_1);\n }\n }.bind(this));\n if (leftToLoad_1 === 0) {\n setTimeout(this.reproject_.bind(this), 0);\n }\n else {\n this.sourceTiles_.forEach(function (tile, i, arr) {\n var state = tile.getState();\n if (state == TileState.IDLE) {\n tile.load();\n }\n });\n }\n }\n };\n /**\n * @private\n */\n ReprojTile.prototype.unlistenSources_ = function () {\n this.sourcesListenerKeys_.forEach(unlistenByKey);\n this.sourcesListenerKeys_ = null;\n };\n /**\n * Remove from the cache due to expiry\n */\n ReprojTile.prototype.release = function () {\n if (this.canvas_) {\n releaseCanvas(this.canvas_.getContext('2d'));\n canvasPool.push(this.canvas_);\n this.canvas_ = null;\n }\n _super.prototype.release.call(this);\n };\n return ReprojTile;\n}(Tile));\nexport default ReprojTile;\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/reproj/common\n */\n/**\n * Default maximum allowed threshold (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */\nexport var ERROR_THRESHOLD = 0.5;\n/**\n * Enable automatic reprojection of raster sources. Default is `true`.\n * TODO: decide if we want to expose this as a build flag or remove it\n * @type {boolean}\n */\nexport var ENABLE_RASTER_REPROJECTION = true;\n//# sourceMappingURL=common.js.map","/**\n * @module ol/TileRange\n */\n/**\n * A representation of a contiguous block of tiles. A tile range is specified\n * by its min/max tile coordinates and is inclusive of coordinates.\n */\nvar TileRange = /** @class */ (function () {\n /**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n */\n function TileRange(minX, maxX, minY, maxY) {\n /**\n * @type {number}\n */\n this.minX = minX;\n /**\n * @type {number}\n */\n this.maxX = maxX;\n /**\n * @type {number}\n */\n this.minY = minY;\n /**\n * @type {number}\n */\n this.maxY = maxY;\n }\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {boolean} Contains tile coordinate.\n */\n TileRange.prototype.contains = function (tileCoord) {\n return this.containsXY(tileCoord[1], tileCoord[2]);\n };\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Contains.\n */\n TileRange.prototype.containsTileRange = function (tileRange) {\n return (this.minX <= tileRange.minX &&\n tileRange.maxX <= this.maxX &&\n this.minY <= tileRange.minY &&\n tileRange.maxY <= this.maxY);\n };\n /**\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @return {boolean} Contains coordinate.\n */\n TileRange.prototype.containsXY = function (x, y) {\n return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n };\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Equals.\n */\n TileRange.prototype.equals = function (tileRange) {\n return (this.minX == tileRange.minX &&\n this.minY == tileRange.minY &&\n this.maxX == tileRange.maxX &&\n this.maxY == tileRange.maxY);\n };\n /**\n * @param {TileRange} tileRange Tile range.\n */\n TileRange.prototype.extend = function (tileRange) {\n if (tileRange.minX < this.minX) {\n this.minX = tileRange.minX;\n }\n if (tileRange.maxX > this.maxX) {\n this.maxX = tileRange.maxX;\n }\n if (tileRange.minY < this.minY) {\n this.minY = tileRange.minY;\n }\n if (tileRange.maxY > this.maxY) {\n this.maxY = tileRange.maxY;\n }\n };\n /**\n * @return {number} Height.\n */\n TileRange.prototype.getHeight = function () {\n return this.maxY - this.minY + 1;\n };\n /**\n * @return {import(\"./size.js\").Size} Size.\n */\n TileRange.prototype.getSize = function () {\n return [this.getWidth(), this.getHeight()];\n };\n /**\n * @return {number} Width.\n */\n TileRange.prototype.getWidth = function () {\n return this.maxX - this.minX + 1;\n };\n /**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Intersects.\n */\n TileRange.prototype.intersects = function (tileRange) {\n return (this.minX <= tileRange.maxX &&\n this.maxX >= tileRange.minX &&\n this.minY <= tileRange.maxY &&\n this.maxY >= tileRange.minY);\n };\n return TileRange;\n}());\n/**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n * @param {TileRange} [tileRange] TileRange.\n * @return {TileRange} Tile range.\n */\nexport function createOrUpdate(minX, maxX, minY, maxY, tileRange) {\n if (tileRange !== undefined) {\n tileRange.minX = minX;\n tileRange.maxX = maxX;\n tileRange.minY = minY;\n tileRange.maxY = maxY;\n return tileRange;\n }\n else {\n return new TileRange(minX, maxX, minY, maxY);\n }\n}\nexport default TileRange;\n//# sourceMappingURL=TileRange.js.map","/**\n * @module ol/size\n */\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array} Size\n * @api\n */\n/**\n * Returns a buffered size.\n * @param {Size} size Size.\n * @param {number} num The amount by which to buffer.\n * @param {Size} [opt_size] Optional reusable size array.\n * @return {Size} The buffered size.\n */\nexport function buffer(size, num, opt_size) {\n if (opt_size === undefined) {\n opt_size = [0, 0];\n }\n opt_size[0] = size[0] + 2 * num;\n opt_size[1] = size[1] + 2 * num;\n return opt_size;\n}\n/**\n * Determines if a size has a positive area.\n * @param {Size} size The size to test.\n * @return {boolean} The size has a positive area.\n */\nexport function hasArea(size) {\n return size[0] > 0 && size[1] > 0;\n}\n/**\n * Returns a size scaled by a ratio. The result will be an array of integers.\n * @param {Size} size Size.\n * @param {number} ratio Ratio.\n * @param {Size} [opt_size] Optional reusable size array.\n * @return {Size} The scaled size.\n */\nexport function scale(size, ratio, opt_size) {\n if (opt_size === undefined) {\n opt_size = [0, 0];\n }\n opt_size[0] = (size[0] * ratio + 0.5) | 0;\n opt_size[1] = (size[1] * ratio + 0.5) | 0;\n return opt_size;\n}\n/**\n * Returns an `Size` array for the passed in number (meaning: square) or\n * `Size` array.\n * (meaning: non-square),\n * @param {number|Size} size Width and height.\n * @param {Size} [opt_size] Optional reusable size array.\n * @return {Size} Size.\n * @api\n */\nexport function toSize(size, opt_size) {\n if (Array.isArray(size)) {\n return size;\n }\n else {\n if (opt_size === undefined) {\n opt_size = [size, size];\n }\n else {\n opt_size[0] = size;\n opt_size[1] = size;\n }\n return opt_size;\n }\n}\n//# sourceMappingURL=size.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport ImageTile from '../../ImageTile.js';\nimport ReprojTile from '../../reproj/Tile.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport { IMAGE_SMOOTHING_DISABLED, IMAGE_SMOOTHING_ENABLED } from './common.js';\nimport { apply as applyTransform, compose as composeTransform, makeInverse, toString as toTransformString, } from '../../transform.js';\nimport { assign } from '../../obj.js';\nimport { containsCoordinate, createEmpty, equals, getHeight, getIntersection, getRotatedViewport, getTopLeft, getWidth, intersects, } from '../../extent.js';\nimport { fromUserExtent } from '../../proj.js';\nimport { getUid } from '../../util.js';\nimport { numberSafeCompareFunction } from '../../array.js';\nimport { toSize } from '../../size.js';\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n * @template {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default} [LayerType=import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default]\n * @extends {CanvasLayerRenderer}\n */\nvar CanvasTileLayerRenderer = /** @class */ (function (_super) {\n __extends(CanvasTileLayerRenderer, _super);\n /**\n * @param {LayerType} tileLayer Tile layer.\n */\n function CanvasTileLayerRenderer(tileLayer) {\n var _this = _super.call(this, tileLayer) || this;\n /**\n * Rendered extent has changed since the previous `renderFrame()` call\n * @type {boolean}\n */\n _this.extentChanged = true;\n /**\n * @private\n * @type {?import(\"../../extent.js\").Extent}\n */\n _this.renderedExtent_ = null;\n /**\n * @protected\n * @type {number}\n */\n _this.renderedPixelRatio;\n /**\n * @protected\n * @type {import(\"../../proj/Projection.js\").default}\n */\n _this.renderedProjection = null;\n /**\n * @protected\n * @type {number}\n */\n _this.renderedRevision;\n /**\n * @protected\n * @type {!Array}\n */\n _this.renderedTiles = [];\n /**\n * @private\n * @type {boolean}\n */\n _this.newTiles_ = false;\n /**\n * @protected\n * @type {import(\"../../extent.js\").Extent}\n */\n _this.tmpExtent = createEmpty();\n /**\n * @private\n * @type {import(\"../../TileRange.js\").default}\n */\n _this.tmpTileRange_ = new TileRange(0, 0, 0, 0);\n return _this;\n }\n /**\n * @protected\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {boolean} Tile is drawable.\n */\n CanvasTileLayerRenderer.prototype.isDrawableTile = function (tile) {\n var tileLayer = this.getLayer();\n var tileState = tile.getState();\n var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n return (tileState == TileState.LOADED ||\n tileState == TileState.EMPTY ||\n (tileState == TileState.ERROR && !useInterimTilesOnError));\n };\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {!import(\"../../Tile.js\").default} Tile.\n */\n CanvasTileLayerRenderer.prototype.getTile = function (z, x, y, frameState) {\n var pixelRatio = frameState.pixelRatio;\n var projection = frameState.viewState.projection;\n var tileLayer = this.getLayer();\n var tileSource = tileLayer.getSource();\n var tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n if (tile.getState() == TileState.ERROR) {\n if (!tileLayer.getUseInterimTilesOnError()) {\n // When useInterimTilesOnError is false, we consider the error tile as loaded.\n tile.setState(TileState.LOADED);\n }\n else if (tileLayer.getPreload() > 0) {\n // Preloaded tiles for lower resolutions might have finished loading.\n this.newTiles_ = true;\n }\n }\n if (!this.isDrawableTile(tile)) {\n tile = tile.getInterimTile();\n }\n return tile;\n };\n /**\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray} Data at the pixel location.\n */\n CanvasTileLayerRenderer.prototype.getData = function (pixel) {\n var frameState = this.frameState;\n if (!frameState) {\n return null;\n }\n var layer = this.getLayer();\n var coordinate = applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n var layerExtent = layer.getExtent();\n if (layerExtent) {\n if (!containsCoordinate(layerExtent, coordinate)) {\n return null;\n }\n }\n var pixelRatio = frameState.pixelRatio;\n var projection = frameState.viewState.projection;\n var viewState = frameState.viewState;\n var source = layer.getRenderSource();\n var tileGrid = source.getTileGridForProjection(viewState.projection);\n var tilePixelRatio = source.getTilePixelRatio(frameState.pixelRatio);\n for (var z = tileGrid.getZForResolution(viewState.resolution); z >= tileGrid.getMinZoom(); --z) {\n var tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n var tile = source.getTile(z, tileCoord[1], tileCoord[2], pixelRatio, projection);\n if (!(tile instanceof ImageTile || tile instanceof ReprojTile)) {\n return null;\n }\n if (tile.getState() !== TileState.LOADED) {\n continue;\n }\n var tileOrigin = tileGrid.getOrigin(z);\n var tileSize = toSize(tileGrid.getTileSize(z));\n var tileResolution = tileGrid.getResolution(z);\n var col = Math.floor(tilePixelRatio *\n ((coordinate[0] - tileOrigin[0]) / tileResolution -\n tileCoord[1] * tileSize[0]));\n var row = Math.floor(tilePixelRatio *\n ((tileOrigin[1] - coordinate[1]) / tileResolution -\n tileCoord[2] * tileSize[1]));\n var gutter = Math.round(tilePixelRatio * source.getGutterForProjection(viewState.projection));\n return this.getImageData(tile.getImage(), col + gutter, row + gutter);\n }\n return null;\n };\n /**\n * @param {Object>} tiles Lookup of loaded tiles by zoom level.\n * @param {number} zoom Zoom level.\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {boolean|void} If `false`, the tile will not be considered loaded.\n */\n CanvasTileLayerRenderer.prototype.loadedTileCallback = function (tiles, zoom, tile) {\n if (this.isDrawableTile(tile)) {\n return _super.prototype.loadedTileCallback.call(this, tiles, zoom, tile);\n }\n return false;\n };\n /**\n * Determine whether render should be called.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n */\n CanvasTileLayerRenderer.prototype.prepareFrame = function (frameState) {\n return !!this.getLayer().getSource();\n };\n /**\n * Render the layer.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {HTMLElement} target Target that may be used to render content to.\n * @return {HTMLElement} The rendered element.\n */\n CanvasTileLayerRenderer.prototype.renderFrame = function (frameState, target) {\n var layerState = frameState.layerStatesArray[frameState.layerIndex];\n var viewState = frameState.viewState;\n var projection = viewState.projection;\n var viewResolution = viewState.resolution;\n var viewCenter = viewState.center;\n var rotation = viewState.rotation;\n var pixelRatio = frameState.pixelRatio;\n var tileLayer = this.getLayer();\n var tileSource = tileLayer.getSource();\n var sourceRevision = tileSource.getRevision();\n var tileGrid = tileSource.getTileGridForProjection(projection);\n var z = tileGrid.getZForResolution(viewResolution, tileSource.zDirection);\n var tileResolution = tileGrid.getResolution(z);\n var extent = frameState.extent;\n var resolution = frameState.viewState.resolution;\n var tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n // desired dimensions of the canvas in pixels\n var width = Math.round((getWidth(extent) / resolution) * pixelRatio);\n var height = Math.round((getHeight(extent) / resolution) * pixelRatio);\n var layerExtent = layerState.extent && fromUserExtent(layerState.extent, projection);\n if (layerExtent) {\n extent = getIntersection(extent, fromUserExtent(layerState.extent, projection));\n }\n var dx = (tileResolution * width) / 2 / tilePixelRatio;\n var dy = (tileResolution * height) / 2 / tilePixelRatio;\n var canvasExtent = [\n viewCenter[0] - dx,\n viewCenter[1] - dy,\n viewCenter[0] + dx,\n viewCenter[1] + dy,\n ];\n var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n /**\n * @type {Object>}\n */\n var tilesToDrawByZ = {};\n tilesToDrawByZ[z] = {};\n var findLoadedTiles = this.createLoadedTileFinder(tileSource, projection, tilesToDrawByZ);\n var tmpExtent = this.tmpExtent;\n var tmpTileRange = this.tmpTileRange_;\n this.newTiles_ = false;\n var viewport = rotation\n ? getRotatedViewport(viewState.center, resolution, rotation, frameState.size)\n : undefined;\n for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {\n if (rotation &&\n !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)) {\n continue;\n }\n var tile = this.getTile(z, x, y, frameState);\n if (this.isDrawableTile(tile)) {\n var uid = getUid(this);\n if (tile.getState() == TileState.LOADED) {\n tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n var inTransition = tile.inTransition(uid);\n if (inTransition && layerState.opacity !== 1) {\n // Skipping transition when layer is not fully opaque avoids visual artifacts.\n tile.endTransition(uid);\n inTransition = false;\n }\n if (!this.newTiles_ &&\n (inTransition || this.renderedTiles.indexOf(tile) === -1)) {\n this.newTiles_ = true;\n }\n }\n if (tile.getAlpha(uid, frameState.time) === 1) {\n // don't look for alt tiles if alpha is 1\n continue;\n }\n }\n var childTileRange = tileGrid.getTileCoordChildTileRange(tile.tileCoord, tmpTileRange, tmpExtent);\n var covered = false;\n if (childTileRange) {\n covered = findLoadedTiles(z + 1, childTileRange);\n }\n if (!covered) {\n tileGrid.forEachTileCoordParentTileRange(tile.tileCoord, findLoadedTiles, tmpTileRange, tmpExtent);\n }\n }\n }\n var canvasScale = ((tileResolution / viewResolution) * pixelRatio) / tilePixelRatio;\n // set forward and inverse pixel transforms\n composeTransform(this.pixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / pixelRatio, 1 / pixelRatio, rotation, -width / 2, -height / 2);\n var canvasTransform = toTransformString(this.pixelTransform);\n this.useContainer(target, canvasTransform, this.getBackground(frameState));\n var context = this.context;\n var canvas = context.canvas;\n makeInverse(this.inversePixelTransform, this.pixelTransform);\n // set scale transform for calculating tile positions on the canvas\n composeTransform(this.tempTransform, width / 2, height / 2, canvasScale, canvasScale, 0, -width / 2, -height / 2);\n if (canvas.width != width || canvas.height != height) {\n canvas.width = width;\n canvas.height = height;\n }\n else if (!this.containerReused) {\n context.clearRect(0, 0, width, height);\n }\n if (layerExtent) {\n this.clipUnrotated(context, frameState, layerExtent);\n }\n if (!tileSource.getInterpolate()) {\n assign(context, IMAGE_SMOOTHING_DISABLED);\n }\n this.preRender(context, frameState);\n this.renderedTiles.length = 0;\n /** @type {Array} */\n var zs = Object.keys(tilesToDrawByZ).map(Number);\n zs.sort(numberSafeCompareFunction);\n var clips, clipZs, currentClip;\n if (layerState.opacity === 1 &&\n (!this.containerReused ||\n tileSource.getOpaque(frameState.viewState.projection))) {\n zs = zs.reverse();\n }\n else {\n clips = [];\n clipZs = [];\n }\n for (var i = zs.length - 1; i >= 0; --i) {\n var currentZ = zs[i];\n var currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);\n var currentResolution = tileGrid.getResolution(currentZ);\n var currentScale = currentResolution / tileResolution;\n var dx_1 = currentTilePixelSize[0] * currentScale * canvasScale;\n var dy_1 = currentTilePixelSize[1] * currentScale * canvasScale;\n var originTileCoord = tileGrid.getTileCoordForCoordAndZ(getTopLeft(canvasExtent), currentZ);\n var originTileExtent = tileGrid.getTileCoordExtent(originTileCoord);\n var origin_1 = applyTransform(this.tempTransform, [\n (tilePixelRatio * (originTileExtent[0] - canvasExtent[0])) /\n tileResolution,\n (tilePixelRatio * (canvasExtent[3] - originTileExtent[3])) /\n tileResolution,\n ]);\n var tileGutter = tilePixelRatio * tileSource.getGutterForProjection(projection);\n var tilesToDraw = tilesToDrawByZ[currentZ];\n for (var tileCoordKey in tilesToDraw) {\n var tile = /** @type {import(\"../../ImageTile.js\").default} */ (tilesToDraw[tileCoordKey]);\n var tileCoord = tile.tileCoord;\n // Calculate integer positions and sizes so that tiles align\n var xIndex = originTileCoord[1] - tileCoord[1];\n var nextX = Math.round(origin_1[0] - (xIndex - 1) * dx_1);\n var yIndex = originTileCoord[2] - tileCoord[2];\n var nextY = Math.round(origin_1[1] - (yIndex - 1) * dy_1);\n var x = Math.round(origin_1[0] - xIndex * dx_1);\n var y = Math.round(origin_1[1] - yIndex * dy_1);\n var w = nextX - x;\n var h = nextY - y;\n var transition = z === currentZ;\n var inTransition = transition && tile.getAlpha(getUid(this), frameState.time) !== 1;\n var contextSaved = false;\n if (!inTransition) {\n if (clips) {\n // Clip mask for regions in this tile that already filled by a higher z tile\n currentClip = [x, y, x + w, y, x + w, y + h, x, y + h];\n for (var i_1 = 0, ii = clips.length; i_1 < ii; ++i_1) {\n if (z !== currentZ && currentZ < clipZs[i_1]) {\n var clip = clips[i_1];\n if (intersects([x, y, x + w, y + h], [clip[0], clip[3], clip[4], clip[7]])) {\n if (!contextSaved) {\n context.save();\n contextSaved = true;\n }\n context.beginPath();\n // counter-clockwise (outer ring) for current tile\n context.moveTo(currentClip[0], currentClip[1]);\n context.lineTo(currentClip[2], currentClip[3]);\n context.lineTo(currentClip[4], currentClip[5]);\n context.lineTo(currentClip[6], currentClip[7]);\n // clockwise (inner ring) for higher z tile\n context.moveTo(clip[6], clip[7]);\n context.lineTo(clip[4], clip[5]);\n context.lineTo(clip[2], clip[3]);\n context.lineTo(clip[0], clip[1]);\n context.clip();\n }\n }\n }\n clips.push(currentClip);\n clipZs.push(currentZ);\n }\n else {\n context.clearRect(x, y, w, h);\n }\n }\n this.drawTileImage(tile, frameState, x, y, w, h, tileGutter, transition);\n if (clips && !inTransition) {\n if (contextSaved) {\n context.restore();\n }\n this.renderedTiles.unshift(tile);\n }\n else {\n this.renderedTiles.push(tile);\n }\n this.updateUsedTiles(frameState.usedTiles, tileSource, tile);\n }\n }\n this.renderedRevision = sourceRevision;\n this.renderedResolution = tileResolution;\n this.extentChanged =\n !this.renderedExtent_ || !equals(this.renderedExtent_, canvasExtent);\n this.renderedExtent_ = canvasExtent;\n this.renderedPixelRatio = pixelRatio;\n this.renderedProjection = projection;\n this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio, projection, extent, z, tileLayer.getPreload());\n this.scheduleExpireCache(frameState, tileSource);\n this.postRender(context, frameState);\n if (layerState.extent) {\n context.restore();\n }\n assign(context, IMAGE_SMOOTHING_ENABLED);\n if (canvasTransform !== canvas.style.transform) {\n canvas.style.transform = canvasTransform;\n }\n return this.container;\n };\n /**\n * @param {import(\"../../ImageTile.js\").default} tile Tile.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {number} x Left of the tile.\n * @param {number} y Top of the tile.\n * @param {number} w Width of the tile.\n * @param {number} h Height of the tile.\n * @param {number} gutter Tile gutter.\n * @param {boolean} transition Apply an alpha transition.\n */\n CanvasTileLayerRenderer.prototype.drawTileImage = function (tile, frameState, x, y, w, h, gutter, transition) {\n var image = this.getTileImage(tile);\n if (!image) {\n return;\n }\n var uid = getUid(this);\n var layerState = frameState.layerStatesArray[frameState.layerIndex];\n var alpha = layerState.opacity *\n (transition ? tile.getAlpha(uid, frameState.time) : 1);\n var alphaChanged = alpha !== this.context.globalAlpha;\n if (alphaChanged) {\n this.context.save();\n this.context.globalAlpha = alpha;\n }\n this.context.drawImage(image, gutter, gutter, image.width - 2 * gutter, image.height - 2 * gutter, x, y, w, h);\n if (alphaChanged) {\n this.context.restore();\n }\n if (alpha !== layerState.opacity) {\n frameState.animate = true;\n }\n else if (transition) {\n tile.endTransition(uid);\n }\n };\n /**\n * @return {HTMLCanvasElement} Image\n */\n CanvasTileLayerRenderer.prototype.getImage = function () {\n var context = this.context;\n return context ? context.canvas : null;\n };\n /**\n * Get the image from a tile.\n * @param {import(\"../../ImageTile.js\").default} tile Tile.\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @protected\n */\n CanvasTileLayerRenderer.prototype.getTileImage = function (tile) {\n return tile.getImage();\n };\n /**\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n * @protected\n */\n CanvasTileLayerRenderer.prototype.scheduleExpireCache = function (frameState, tileSource) {\n if (tileSource.canExpireCache()) {\n /**\n * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n * @param {import(\"../../PluggableMap.js\").default} map Map.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n */\n var postRenderFunction = function (tileSource, map, frameState) {\n var tileSourceKey = getUid(tileSource);\n if (tileSourceKey in frameState.usedTiles) {\n tileSource.expireCache(frameState.viewState.projection, frameState.usedTiles[tileSourceKey]);\n }\n }.bind(null, tileSource);\n frameState.postRenderFunctions.push(\n /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction));\n }\n };\n /**\n * @param {!Object>} usedTiles Used tiles.\n * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n * @param {import('../../Tile.js').default} tile Tile.\n * @protected\n */\n CanvasTileLayerRenderer.prototype.updateUsedTiles = function (usedTiles, tileSource, tile) {\n // FIXME should we use tilesToDrawByZ instead?\n var tileSourceKey = getUid(tileSource);\n if (!(tileSourceKey in usedTiles)) {\n usedTiles[tileSourceKey] = {};\n }\n usedTiles[tileSourceKey][tile.getKey()] = true;\n };\n /**\n * Manage tile pyramid.\n * This function performs a number of functions related to the tiles at the\n * current zoom and lower zoom levels:\n * - registers idle tiles in frameState.wantedTiles so that they are not\n * discarded by the tile queue\n * - enqueues missing tiles\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {number} currentZ Current Z.\n * @param {number} preload Load low resolution tiles up to `preload` levels.\n * @param {function(import(\"../../Tile.js\").default):void} [opt_tileCallback] Tile callback.\n * @protected\n */\n CanvasTileLayerRenderer.prototype.manageTilePyramid = function (frameState, tileSource, tileGrid, pixelRatio, projection, extent, currentZ, preload, opt_tileCallback) {\n var tileSourceKey = getUid(tileSource);\n if (!(tileSourceKey in frameState.wantedTiles)) {\n frameState.wantedTiles[tileSourceKey] = {};\n }\n var wantedTiles = frameState.wantedTiles[tileSourceKey];\n var tileQueue = frameState.tileQueue;\n var minZoom = tileGrid.getMinZoom();\n var rotation = frameState.viewState.rotation;\n var viewport = rotation\n ? getRotatedViewport(frameState.viewState.center, frameState.viewState.resolution, rotation, frameState.size)\n : undefined;\n var tileCount = 0;\n var tile, tileRange, tileResolution, x, y, z;\n for (z = minZoom; z <= currentZ; ++z) {\n tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);\n tileResolution = tileGrid.getResolution(z);\n for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n if (rotation &&\n !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)) {\n continue;\n }\n if (currentZ - z <= preload) {\n ++tileCount;\n tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n if (tile.getState() == TileState.IDLE) {\n wantedTiles[tile.getKey()] = true;\n if (!tileQueue.isKeyQueued(tile.getKey())) {\n tileQueue.enqueue([\n tile,\n tileSourceKey,\n tileGrid.getTileCoordCenter(tile.tileCoord),\n tileResolution,\n ]);\n }\n }\n if (opt_tileCallback !== undefined) {\n opt_tileCallback(tile);\n }\n }\n else {\n tileSource.useTile(z, x, y, projection);\n }\n }\n }\n }\n tileSource.updateCacheSize(tileCount, projection);\n };\n return CanvasTileLayerRenderer;\n}(CanvasLayerRenderer));\nexport default CanvasTileLayerRenderer;\n//# sourceMappingURL=TileLayer.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/layer/Tile\n */\nimport BaseTileLayer from './BaseTile.js';\nimport CanvasTileLayerRenderer from '../renderer/canvas/TileLayer.js';\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @extends BaseTileLayer\n * @api\n */\nvar TileLayer = /** @class */ (function (_super) {\n __extends(TileLayer, _super);\n /**\n * @param {import(\"./BaseTile.js\").Options} [opt_options] Tile layer options.\n */\n function TileLayer(opt_options) {\n return _super.call(this, opt_options) || this;\n }\n TileLayer.prototype.createRenderer = function () {\n return new CanvasTileLayerRenderer(this);\n };\n return TileLayer;\n}(BaseTileLayer));\nexport default TileLayer;\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/style/Image\n */\nimport { abstract } from '../util.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {number} opacity Opacity.\n * @property {boolean} rotateWithView If the image should get rotated with the view.\n * @property {number} rotation Rotation.\n * @property {number|import(\"../size.js\").Size} scale Scale.\n * @property {Array} displacement Displacement.\n * @property {\"declutter\"|\"obstacle\"|\"none\"|undefined} declutterMode Declutter mode: `declutter`, `obstacle`, 'none */\n/**\n * @classdesc\n * A base class used for creating subclasses and not instantiated in\n * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and\n * {@link module:ol/style/RegularShape~RegularShape}.\n * @abstract\n * @api\n */\nvar ImageStyle = /** @class */ (function () {\n /**\n * @param {Options} options Options.\n */\n function ImageStyle(options) {\n /**\n * @private\n * @type {number}\n */\n this.opacity_ = options.opacity;\n /**\n * @private\n * @type {boolean}\n */\n this.rotateWithView_ = options.rotateWithView;\n /**\n * @private\n * @type {number}\n */\n this.rotation_ = options.rotation;\n /**\n * @private\n * @type {number|import(\"../size.js\").Size}\n */\n this.scale_ = options.scale;\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.scaleArray_ = toSize(options.scale);\n /**\n * @private\n * @type {Array}\n */\n this.displacement_ = options.displacement;\n /**\n * @private\n * @type {\"declutter\"|\"obstacle\"|\"none\"|undefined}\n */\n this.declutterMode_ = options.declutterMode;\n }\n /**\n * Clones the style.\n * @return {ImageStyle} The cloned style.\n * @api\n */\n ImageStyle.prototype.clone = function () {\n var scale = this.getScale();\n return new ImageStyle({\n opacity: this.getOpacity(),\n scale: Array.isArray(scale) ? scale.slice() : scale,\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n displacement: this.getDisplacement().slice(),\n declutterMode: this.getDeclutterMode(),\n });\n };\n /**\n * Get the symbolizer opacity.\n * @return {number} Opacity.\n * @api\n */\n ImageStyle.prototype.getOpacity = function () {\n return this.opacity_;\n };\n /**\n * Determine whether the symbolizer rotates with the map.\n * @return {boolean} Rotate with map.\n * @api\n */\n ImageStyle.prototype.getRotateWithView = function () {\n return this.rotateWithView_;\n };\n /**\n * Get the symoblizer rotation.\n * @return {number} Rotation.\n * @api\n */\n ImageStyle.prototype.getRotation = function () {\n return this.rotation_;\n };\n /**\n * Get the symbolizer scale.\n * @return {number|import(\"../size.js\").Size} Scale.\n * @api\n */\n ImageStyle.prototype.getScale = function () {\n return this.scale_;\n };\n /**\n * Get the symbolizer scale array.\n * @return {import(\"../size.js\").Size} Scale array.\n */\n ImageStyle.prototype.getScaleArray = function () {\n return this.scaleArray_;\n };\n /**\n * Get the displacement of the shape\n * @return {Array} Shape's center displacement\n * @api\n */\n ImageStyle.prototype.getDisplacement = function () {\n return this.displacement_;\n };\n /**\n * Get the declutter mode of the shape\n * @return {\"declutter\"|\"obstacle\"|\"none\"|undefined} Shape's declutter mode\n * @api\n */\n ImageStyle.prototype.getDeclutterMode = function () {\n return this.declutterMode_;\n };\n /**\n * Get the anchor point in pixels. The anchor determines the center point for the\n * symbolizer.\n * @abstract\n * @return {Array} Anchor.\n */\n ImageStyle.prototype.getAnchor = function () {\n return abstract();\n };\n /**\n * Get the image element for the symbolizer.\n * @abstract\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n */\n ImageStyle.prototype.getImage = function (pixelRatio) {\n return abstract();\n };\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n */\n ImageStyle.prototype.getHitDetectionImage = function () {\n return abstract();\n };\n /**\n * Get the image pixel ratio.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel ratio.\n */\n ImageStyle.prototype.getPixelRatio = function (pixelRatio) {\n return 1;\n };\n /**\n * @abstract\n * @return {import(\"../ImageState.js\").default} Image state.\n */\n ImageStyle.prototype.getImageState = function () {\n return abstract();\n };\n /**\n * @abstract\n * @return {import(\"../size.js\").Size} Image size.\n */\n ImageStyle.prototype.getImageSize = function () {\n return abstract();\n };\n /**\n * Get the origin of the symbolizer.\n * @abstract\n * @return {Array} Origin.\n */\n ImageStyle.prototype.getOrigin = function () {\n return abstract();\n };\n /**\n * Get the size of the symbolizer (in pixels).\n * @abstract\n * @return {import(\"../size.js\").Size} Size.\n */\n ImageStyle.prototype.getSize = function () {\n return abstract();\n };\n /**\n * Set the displacement.\n *\n * @param {Array} displacement Displacement.\n * @api\n */\n ImageStyle.prototype.setDisplacement = function (displacement) {\n this.displacement_ = displacement;\n };\n /**\n * Set the opacity.\n *\n * @param {number} opacity Opacity.\n * @api\n */\n ImageStyle.prototype.setOpacity = function (opacity) {\n this.opacity_ = opacity;\n };\n /**\n * Set whether to rotate the style with the view.\n *\n * @param {boolean} rotateWithView Rotate with map.\n * @api\n */\n ImageStyle.prototype.setRotateWithView = function (rotateWithView) {\n this.rotateWithView_ = rotateWithView;\n };\n /**\n * Set the rotation.\n *\n * @param {number} rotation Rotation.\n * @api\n */\n ImageStyle.prototype.setRotation = function (rotation) {\n this.rotation_ = rotation;\n };\n /**\n * Set the scale.\n *\n * @param {number|import(\"../size.js\").Size} scale Scale.\n * @api\n */\n ImageStyle.prototype.setScale = function (scale) {\n this.scale_ = scale;\n this.scaleArray_ = toSize(scale);\n };\n /**\n * @abstract\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n ImageStyle.prototype.listenImageChange = function (listener) {\n abstract();\n };\n /**\n * Load not yet loaded URI.\n * @abstract\n */\n ImageStyle.prototype.load = function () {\n abstract();\n };\n /**\n * @abstract\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n ImageStyle.prototype.unlistenImageChange = function (listener) {\n abstract();\n };\n return ImageStyle;\n}());\nexport default ImageStyle;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/colorlike\n */\nimport { toString } from './color.js';\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a color, pattern, or gradient. The origin for patterns and\n * gradients as fill style is an increment of 512 css pixels from map coordinate\n * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image\n * must be a factor of two (2, 4, 8, ..., 512).\n *\n * @typedef {string|CanvasPattern|CanvasGradient} ColorLike\n * @api\n */\n/**\n * @param {import(\"./color.js\").Color|ColorLike} color Color.\n * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nexport function asColorLike(color) {\n if (Array.isArray(color)) {\n return toString(color);\n }\n else {\n return color;\n }\n}\n//# sourceMappingURL=colorlike.js.map","/**\n * @module ol/render/canvas\n */\nimport BaseObject from '../Object.js';\nimport EventTarget from '../events/Target.js';\nimport { WORKER_OFFSCREEN_CANVAS } from '../has.js';\nimport { clear } from '../obj.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getFontParameters } from '../css.js';\n/**\n * @typedef {'Circle' | 'Image' | 'LineString' | 'Polygon' | 'Text' | 'Default'} BuilderType\n */\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle FillStyle.\n */\n/**\n * @typedef Label\n * @property {number} width Width.\n * @property {number} height Height.\n * @property {Array} contextInstructions ContextInstructions.\n */\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle] Current FillStyle.\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle] Current StrokeStyle.\n * @property {CanvasLineCap} [currentLineCap] Current LineCap.\n * @property {Array} currentLineDash Current LineDash.\n * @property {number} [currentLineDashOffset] Current LineDashOffset.\n * @property {CanvasLineJoin} [currentLineJoin] Current LineJoin.\n * @property {number} [currentLineWidth] Current LineWidth.\n * @property {number} [currentMiterLimit] Current MiterLimit.\n * @property {number} [lastStroke] Last stroke.\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle] FillStyle.\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle] StrokeStyle.\n * @property {CanvasLineCap} [lineCap] LineCap.\n * @property {Array} lineDash LineDash.\n * @property {number} [lineDashOffset] LineDashOffset.\n * @property {CanvasLineJoin} [lineJoin] LineJoin.\n * @property {number} [lineWidth] LineWidth.\n * @property {number} [miterLimit] MiterLimit.\n */\n/**\n * @typedef {Object} StrokeState\n * @property {CanvasLineCap} lineCap LineCap.\n * @property {Array} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} lineWidth LineWidth.\n * @property {number} miterLimit MiterLimit.\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle StrokeStyle.\n */\n/**\n * @typedef {Object} TextState\n * @property {string} font Font.\n * @property {string} [textAlign] TextAlign.\n * @property {string} [justify] Justify.\n * @property {string} textBaseline TextBaseline.\n * @property {string} [placement] Placement.\n * @property {number} [maxAngle] MaxAngle.\n * @property {boolean} [overflow] Overflow.\n * @property {import(\"../style/Fill.js\").default} [backgroundFill] BackgroundFill.\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke] BackgroundStroke.\n * @property {import(\"../size.js\").Size} [scale] Scale.\n * @property {Array} [padding] Padding.\n */\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array} coordinates The array of all coordinates.\n * @property {!Object} [textStates] The text states (decluttering).\n * @property {!Object} [fillStates] The fill states (decluttering).\n * @property {!Object} [strokeStates] The stroke states (decluttering).\n */\n/**\n * @typedef {Object} DeclutterImageWithText\n */\n/**\n * @const\n * @type {string}\n */\nexport var defaultFont = '10px sans-serif';\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport var defaultFillStyle = '#000';\n/**\n * @const\n * @type {CanvasLineCap}\n */\nexport var defaultLineCap = 'round';\n/**\n * @const\n * @type {Array}\n */\nexport var defaultLineDash = [];\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineDashOffset = 0;\n/**\n * @const\n * @type {CanvasLineJoin}\n */\nexport var defaultLineJoin = 'round';\n/**\n * @const\n * @type {number}\n */\nexport var defaultMiterLimit = 10;\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport var defaultStrokeStyle = '#000';\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextAlign = 'center';\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextBaseline = 'middle';\n/**\n * @const\n * @type {Array}\n */\nexport var defaultPadding = [0, 0, 0, 0];\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineWidth = 1;\n/**\n * @type {BaseObject}\n */\nexport var checkedFonts = new BaseObject();\n/**\n * The label cache for text rendering. To change the default cache size of 2048\n * entries, use {@link module:ol/structs/LRUCache~LRUCache#setSize cache.setSize()}.\n * Deprecated - there is no label cache any more.\n * @type {?}\n * @api\n * @deprecated\n */\nexport var labelCache = new EventTarget();\nlabelCache.setSize = function () {\n console.warn('labelCache is deprecated.'); //eslint-disable-line\n};\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar measureContext = null;\n/**\n * @type {string}\n */\nvar measureFont;\n/**\n * @type {!Object}\n */\nexport var textHeights = {};\n/**\n * Clears the label cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport var registerFont = (function () {\n var retries = 100;\n var size = '32px ';\n var referenceFonts = ['monospace', 'serif'];\n var len = referenceFonts.length;\n var text = 'wmytzilWMYTZIL@#/&?$%10\\uF013';\n var interval, referenceWidth;\n /**\n * @param {string} fontStyle Css font-style\n * @param {string} fontWeight Css font-weight\n * @param {*} fontFamily Css font-family\n * @return {boolean} Font with style and weight is available\n */\n function isAvailable(fontStyle, fontWeight, fontFamily) {\n var available = true;\n for (var i = 0; i < len; ++i) {\n var referenceFont = referenceFonts[i];\n referenceWidth = measureTextWidth(fontStyle + ' ' + fontWeight + ' ' + size + referenceFont, text);\n if (fontFamily != referenceFont) {\n var width = measureTextWidth(fontStyle +\n ' ' +\n fontWeight +\n ' ' +\n size +\n fontFamily +\n ',' +\n referenceFont, text);\n // If width and referenceWidth are the same, then the fallback was used\n // instead of the font we wanted, so the font is not available.\n available = available && width != referenceWidth;\n }\n }\n if (available) {\n return true;\n }\n return false;\n }\n function check() {\n var done = true;\n var fonts = checkedFonts.getKeys();\n for (var i = 0, ii = fonts.length; i < ii; ++i) {\n var font = fonts[i];\n if (checkedFonts.get(font) < retries) {\n if (isAvailable.apply(this, font.split('\\n'))) {\n clear(textHeights);\n // Make sure that loaded fonts are picked up by Safari\n measureContext = null;\n measureFont = undefined;\n checkedFonts.set(font, retries);\n }\n else {\n checkedFonts.set(font, checkedFonts.get(font) + 1, true);\n done = false;\n }\n }\n }\n if (done) {\n clearInterval(interval);\n interval = undefined;\n }\n }\n return function (fontSpec) {\n var font = getFontParameters(fontSpec);\n if (!font) {\n return;\n }\n var families = font.families;\n for (var i = 0, ii = families.length; i < ii; ++i) {\n var family = families[i];\n var key = font.style + '\\n' + font.weight + '\\n' + family;\n if (checkedFonts.get(key) === undefined) {\n checkedFonts.set(key, retries, true);\n if (!isAvailable(font.style, font.weight, family)) {\n checkedFonts.set(key, 0, true);\n if (interval === undefined) {\n interval = setInterval(check, 32);\n }\n }\n }\n }\n };\n})();\n/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport var measureTextHeight = (function () {\n /**\n * @type {HTMLDivElement}\n */\n var measureElement;\n return function (fontSpec) {\n var height = textHeights[fontSpec];\n if (height == undefined) {\n if (WORKER_OFFSCREEN_CANVAS) {\n var font = getFontParameters(fontSpec);\n var metrics = measureText(fontSpec, 'Žg');\n var lineHeight = isNaN(Number(font.lineHeight))\n ? 1.2\n : Number(font.lineHeight);\n height =\n lineHeight *\n (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n }\n else {\n if (!measureElement) {\n measureElement = document.createElement('div');\n measureElement.innerHTML = 'M';\n measureElement.style.minHeight = '0';\n measureElement.style.maxHeight = 'none';\n measureElement.style.height = 'auto';\n measureElement.style.padding = '0';\n measureElement.style.border = 'none';\n measureElement.style.position = 'absolute';\n measureElement.style.display = 'block';\n measureElement.style.left = '-99999px';\n }\n measureElement.style.font = fontSpec;\n document.body.appendChild(measureElement);\n height = measureElement.offsetHeight;\n document.body.removeChild(measureElement);\n }\n textHeights[fontSpec] = height;\n }\n return height;\n };\n})();\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {TextMetrics} Text metrics.\n */\nfunction measureText(font, text) {\n if (!measureContext) {\n measureContext = createCanvasContext2D(1, 1);\n }\n if (font != measureFont) {\n measureContext.font = font;\n measureFont = measureContext.font;\n }\n return measureContext.measureText(text);\n}\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n return measureText(font, text).width;\n}\n/**\n * Measure text width using a cache.\n * @param {string} font The font.\n * @param {string} text The text to measure.\n * @param {Object} cache A lookup of cached widths by text.\n * @return {number} The text width.\n */\nexport function measureAndCacheTextWidth(font, text, cache) {\n if (text in cache) {\n return cache[text];\n }\n var width = text\n .split('\\n')\n .reduce(function (prev, curr) { return Math.max(prev, measureTextWidth(font, curr)); }, 0);\n cache[text] = width;\n return width;\n}\n/**\n * @param {TextState} baseStyle Base style.\n * @param {Array} chunks Text chunks to measure.\n * @return {{width: number, height: number, widths: Array, heights: Array, lineWidths: Array}}} Text metrics.\n */\nexport function getTextDimensions(baseStyle, chunks) {\n var widths = [];\n var heights = [];\n var lineWidths = [];\n var width = 0;\n var lineWidth = 0;\n var height = 0;\n var lineHeight = 0;\n for (var i = 0, ii = chunks.length; i <= ii; i += 2) {\n var text = chunks[i];\n if (text === '\\n' || i === ii) {\n width = Math.max(width, lineWidth);\n lineWidths.push(lineWidth);\n lineWidth = 0;\n height += lineHeight;\n continue;\n }\n var font = chunks[i + 1] || baseStyle.font;\n var currentWidth = measureTextWidth(font, text);\n widths.push(currentWidth);\n lineWidth += currentWidth;\n var currentHeight = measureTextHeight(font);\n heights.push(currentHeight);\n lineHeight = Math.max(lineHeight, currentHeight);\n }\n return { width: width, height: height, widths: widths, heights: heights, lineWidths: lineWidths };\n}\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} offsetX X offset.\n * @param {number} offsetY Y offset.\n */\nexport function rotateAtOffset(context, rotation, offsetX, offsetY) {\n if (rotation !== 0) {\n context.translate(offsetX, offsetY);\n context.rotate(rotation);\n context.translate(-offsetX, -offsetY);\n }\n}\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transform.\n * @param {number} opacity Opacity.\n * @param {Label|HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} labelOrImage Label.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} w Width.\n * @param {number} h Height.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../size.js\").Size} scale Scale.\n */\nexport function drawImageOrLabel(context, transform, opacity, labelOrImage, originX, originY, w, h, x, y, scale) {\n context.save();\n if (opacity !== 1) {\n context.globalAlpha *= opacity;\n }\n if (transform) {\n context.setTransform.apply(context, transform);\n }\n if ( /** @type {*} */(labelOrImage).contextInstructions) {\n // label\n context.translate(x, y);\n context.scale(scale[0], scale[1]);\n executeLabelInstructions(/** @type {Label} */ (labelOrImage), context);\n }\n else if (scale[0] < 0 || scale[1] < 0) {\n // flipped image\n context.translate(x, y);\n context.scale(scale[0], scale[1]);\n context.drawImage(\n /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage), originX, originY, w, h, 0, 0, w, h);\n }\n else {\n // if image not flipped translate and scale can be avoided\n context.drawImage(\n /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage), originX, originY, w, h, x, y, w * scale[0], h * scale[1]);\n }\n context.restore();\n}\n/**\n * @param {Label} label Label.\n * @param {CanvasRenderingContext2D} context Context.\n */\nfunction executeLabelInstructions(label, context) {\n var contextInstructions = label.contextInstructions;\n for (var i = 0, ii = contextInstructions.length; i < ii; i += 2) {\n if (Array.isArray(contextInstructions[i + 1])) {\n context[contextInstructions[i]].apply(context, contextInstructions[i + 1]);\n }\n else {\n context[contextInstructions[i]] = contextInstructions[i + 1];\n }\n }\n}\n//# sourceMappingURL=canvas.js.map","/**\n * @module ol/style/RegularShape\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport { asArray } from '../color.js';\nimport { asColorLike } from '../colorlike.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { defaultFillStyle, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, } from '../render/canvas.js';\n/**\n * Specify radius for regular polygons, or radius1 and radius2 for stars.\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} [radius] Radius of a regular polygon.\n * @property {number} [radius1] First radius of a star. Ignored if radius is set.\n * @property {number} [radius2] Second radius of a star.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up.\n * @property {Array} [displacement=[0,0]] Displacement of the shape\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale. Unless two dimensional scaling is required a better\n * result may be obtained with appropriate settings for `radius`, `radius1` and `radius2`.\n * @property {\"declutter\"|\"obstacle\"|\"none\"|undefined} [declutterMode] Declutter mode\n */\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle] StrokeStyle.\n * @property {number} strokeWidth StrokeWidth.\n * @property {number} size Size.\n * @property {Array} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} miterLimit MiterLimit.\n */\n/**\n * @classdesc\n * Set regular shape style for vector features. The resulting shape will be\n * a regular polygon when `radius` is provided, or a star when `radius1` and\n * `radius2` are provided.\n * @api\n */\nvar RegularShape = /** @class */ (function (_super) {\n __extends(RegularShape, _super);\n /**\n * @param {Options} options Options.\n */\n function RegularShape(options) {\n var _this = this;\n /**\n * @type {boolean}\n */\n var rotateWithView = options.rotateWithView !== undefined ? options.rotateWithView : false;\n _this = _super.call(this, {\n opacity: 1,\n rotateWithView: rotateWithView,\n rotation: options.rotation !== undefined ? options.rotation : 0,\n scale: options.scale !== undefined ? options.scale : 1,\n displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n declutterMode: options.declutterMode,\n }) || this;\n /**\n * @private\n * @type {Object}\n */\n _this.canvas_ = undefined;\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n _this.hitDetectionCanvas_ = null;\n /**\n * @private\n * @type {import(\"./Fill.js\").default}\n */\n _this.fill_ = options.fill !== undefined ? options.fill : null;\n /**\n * @private\n * @type {Array}\n */\n _this.origin_ = [0, 0];\n /**\n * @private\n * @type {number}\n */\n _this.points_ = options.points;\n /**\n * @protected\n * @type {number}\n */\n _this.radius_ =\n options.radius !== undefined ? options.radius : options.radius1;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.radius2_ = options.radius2;\n /**\n * @private\n * @type {number}\n */\n _this.angle_ = options.angle !== undefined ? options.angle : 0;\n /**\n * @private\n * @type {import(\"./Stroke.js\").default}\n */\n _this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n _this.size_ = null;\n /**\n * @private\n * @type {RenderOptions}\n */\n _this.renderOptions_ = null;\n _this.render();\n return _this;\n }\n /**\n * Clones the style.\n * @return {RegularShape} The cloned style.\n * @api\n */\n RegularShape.prototype.clone = function () {\n var scale = this.getScale();\n var style = new RegularShape({\n fill: this.getFill() ? this.getFill().clone() : undefined,\n points: this.getPoints(),\n radius: this.getRadius(),\n radius2: this.getRadius2(),\n angle: this.getAngle(),\n stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n scale: Array.isArray(scale) ? scale.slice() : scale,\n displacement: this.getDisplacement().slice(),\n declutterMode: this.getDeclutterMode(),\n });\n style.setOpacity(this.getOpacity());\n return style;\n };\n /**\n * Get the anchor point in pixels. The anchor determines the center point for the\n * symbolizer.\n * @return {Array} Anchor.\n * @api\n */\n RegularShape.prototype.getAnchor = function () {\n var size = this.size_;\n if (!size) {\n return null;\n }\n var displacement = this.getDisplacement();\n return [size[0] / 2 - displacement[0], size[1] / 2 + displacement[1]];\n };\n /**\n * Get the angle used in generating the shape.\n * @return {number} Shape's rotation in radians.\n * @api\n */\n RegularShape.prototype.getAngle = function () {\n return this.angle_;\n };\n /**\n * Get the fill style for the shape.\n * @return {import(\"./Fill.js\").default} Fill style.\n * @api\n */\n RegularShape.prototype.getFill = function () {\n return this.fill_;\n };\n /**\n * Set the fill style.\n * @param {import(\"./Fill.js\").default} fill Fill style.\n * @api\n */\n RegularShape.prototype.setFill = function (fill) {\n this.fill_ = fill;\n this.render();\n };\n /**\n * @return {HTMLCanvasElement} Image element.\n */\n RegularShape.prototype.getHitDetectionImage = function () {\n if (!this.hitDetectionCanvas_) {\n this.createHitDetectionCanvas_(this.renderOptions_);\n }\n return this.hitDetectionCanvas_;\n };\n /**\n * Get the image icon.\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLCanvasElement} Image or Canvas element.\n * @api\n */\n RegularShape.prototype.getImage = function (pixelRatio) {\n var image = this.canvas_[pixelRatio];\n if (!image) {\n var renderOptions = this.renderOptions_;\n var context = createCanvasContext2D(renderOptions.size * pixelRatio, renderOptions.size * pixelRatio);\n this.draw_(renderOptions, context, pixelRatio);\n image = context.canvas;\n this.canvas_[pixelRatio] = image;\n }\n return image;\n };\n /**\n * Get the image pixel ratio.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel ratio.\n */\n RegularShape.prototype.getPixelRatio = function (pixelRatio) {\n return pixelRatio;\n };\n /**\n * @return {import(\"../size.js\").Size} Image size.\n */\n RegularShape.prototype.getImageSize = function () {\n return this.size_;\n };\n /**\n * @return {import(\"../ImageState.js\").default} Image state.\n */\n RegularShape.prototype.getImageState = function () {\n return ImageState.LOADED;\n };\n /**\n * Get the origin of the symbolizer.\n * @return {Array} Origin.\n * @api\n */\n RegularShape.prototype.getOrigin = function () {\n return this.origin_;\n };\n /**\n * Get the number of points for generating the shape.\n * @return {number} Number of points for stars and regular polygons.\n * @api\n */\n RegularShape.prototype.getPoints = function () {\n return this.points_;\n };\n /**\n * Get the (primary) radius for the shape.\n * @return {number} Radius.\n * @api\n */\n RegularShape.prototype.getRadius = function () {\n return this.radius_;\n };\n /**\n * Get the secondary radius for the shape.\n * @return {number|undefined} Radius2.\n * @api\n */\n RegularShape.prototype.getRadius2 = function () {\n return this.radius2_;\n };\n /**\n * Get the size of the symbolizer (in pixels).\n * @return {import(\"../size.js\").Size} Size.\n * @api\n */\n RegularShape.prototype.getSize = function () {\n return this.size_;\n };\n /**\n * Get the stroke style for the shape.\n * @return {import(\"./Stroke.js\").default} Stroke style.\n * @api\n */\n RegularShape.prototype.getStroke = function () {\n return this.stroke_;\n };\n /**\n * Set the stroke style.\n * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n * @api\n */\n RegularShape.prototype.setStroke = function (stroke) {\n this.stroke_ = stroke;\n this.render();\n };\n /**\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n RegularShape.prototype.listenImageChange = function (listener) { };\n /**\n * Load not yet loaded URI.\n */\n RegularShape.prototype.load = function () { };\n /**\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n */\n RegularShape.prototype.unlistenImageChange = function (listener) { };\n /**\n * Calculate additional canvas size needed for the miter.\n * @param {string} lineJoin Line join\n * @param {number} strokeWidth Stroke width\n * @param {number} miterLimit Miter limit\n * @return {number} Additional canvas size needed\n * @private\n */\n RegularShape.prototype.calculateLineJoinSize_ = function (lineJoin, strokeWidth, miterLimit) {\n if (strokeWidth === 0 ||\n this.points_ === Infinity ||\n (lineJoin !== 'bevel' && lineJoin !== 'miter')) {\n return strokeWidth;\n }\n // m | ^\n // i | |\\ .\n // t >| #\\\n // e | |\\ \\ .\n // r \\s\\\n // | \\t\\ . .\n // \\r\\ . .\n // | \\o\\ . . . . .\n // e \\k\\ . . . .\n // | \\e\\ . . . . .\n // d \\ \\ . . . .\n // | _ _a_ _\\# . . .\n // r1 / ` . .\n // | . .\n // b / . .\n // | . .\n // / r2 . .\n // | . .\n // / . .\n // |α . .\n // / . .\n // ° center\n var r1 = this.radius_;\n var r2 = this.radius2_ === undefined ? r1 : this.radius2_;\n if (r1 < r2) {\n var tmp = r1;\n r1 = r2;\n r2 = tmp;\n }\n var points = this.radius2_ === undefined ? this.points_ : this.points_ * 2;\n var alpha = (2 * Math.PI) / points;\n var a = r2 * Math.sin(alpha);\n var b = Math.sqrt(r2 * r2 - a * a);\n var d = r1 - b;\n var e = Math.sqrt(a * a + d * d);\n var miterRatio = e / a;\n if (lineJoin === 'miter' && miterRatio <= miterLimit) {\n return miterRatio * strokeWidth;\n }\n // Calculate the distnce from center to the stroke corner where\n // it was cut short because of the miter limit.\n // l\n // ----+---- <= distance from center to here is maxr\n // /####|k ##\\\n // /#####^#####\\\n // /#### /+\\# s #\\\n // /### h/+++\\# t #\\\n // /### t/+++++\\# r #\\\n // /### a/+++++++\\# o #\\\n // /### p/++ fill +\\# k #\\\n ///#### /+++++^+++++\\# e #\\\n //#####/+++++/+\\+++++\\#####\\\n var k = strokeWidth / 2 / miterRatio;\n var l = (strokeWidth / 2) * (d / e);\n var maxr = Math.sqrt((r1 + k) * (r1 + k) + l * l);\n var bevelAdd = maxr - r1;\n if (this.radius2_ === undefined || lineJoin === 'bevel') {\n return bevelAdd * 2;\n }\n // If outer miter is over the miter limit the inner miter may reach through the\n // center and be longer than the bevel, same calculation as above but swap r1 / r2.\n var aa = r1 * Math.sin(alpha);\n var bb = Math.sqrt(r1 * r1 - aa * aa);\n var dd = r2 - bb;\n var ee = Math.sqrt(aa * aa + dd * dd);\n var innerMiterRatio = ee / aa;\n if (innerMiterRatio <= miterLimit) {\n var innerLength = (innerMiterRatio * strokeWidth) / 2 - r2 - r1;\n return 2 * Math.max(bevelAdd, innerLength);\n }\n return bevelAdd * 2;\n };\n /**\n * @return {RenderOptions} The render options\n * @protected\n */\n RegularShape.prototype.createRenderOptions = function () {\n var lineJoin = defaultLineJoin;\n var miterLimit = 0;\n var lineDash = null;\n var lineDashOffset = 0;\n var strokeStyle;\n var strokeWidth = 0;\n if (this.stroke_) {\n strokeStyle = this.stroke_.getColor();\n if (strokeStyle === null) {\n strokeStyle = defaultStrokeStyle;\n }\n strokeStyle = asColorLike(strokeStyle);\n strokeWidth = this.stroke_.getWidth();\n if (strokeWidth === undefined) {\n strokeWidth = defaultLineWidth;\n }\n lineDash = this.stroke_.getLineDash();\n lineDashOffset = this.stroke_.getLineDashOffset();\n lineJoin = this.stroke_.getLineJoin();\n if (lineJoin === undefined) {\n lineJoin = defaultLineJoin;\n }\n miterLimit = this.stroke_.getMiterLimit();\n if (miterLimit === undefined) {\n miterLimit = defaultMiterLimit;\n }\n }\n var add = this.calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit);\n var maxRadius = Math.max(this.radius_, this.radius2_ || 0);\n var size = Math.ceil(2 * maxRadius + add);\n return {\n strokeStyle: strokeStyle,\n strokeWidth: strokeWidth,\n size: size,\n lineDash: lineDash,\n lineDashOffset: lineDashOffset,\n lineJoin: lineJoin,\n miterLimit: miterLimit,\n };\n };\n /**\n * @protected\n */\n RegularShape.prototype.render = function () {\n this.renderOptions_ = this.createRenderOptions();\n var size = this.renderOptions_.size;\n this.canvas_ = {};\n this.size_ = [size, size];\n };\n /**\n * @private\n * @param {RenderOptions} renderOptions Render options.\n * @param {CanvasRenderingContext2D} context The rendering context.\n * @param {number} pixelRatio The pixel ratio.\n */\n RegularShape.prototype.draw_ = function (renderOptions, context, pixelRatio) {\n context.scale(pixelRatio, pixelRatio);\n // set origin to canvas center\n context.translate(renderOptions.size / 2, renderOptions.size / 2);\n this.createPath_(context);\n if (this.fill_) {\n var color = this.fill_.getColor();\n if (color === null) {\n color = defaultFillStyle;\n }\n context.fillStyle = asColorLike(color);\n context.fill();\n }\n if (this.stroke_) {\n context.strokeStyle = renderOptions.strokeStyle;\n context.lineWidth = renderOptions.strokeWidth;\n if (context.setLineDash && renderOptions.lineDash) {\n context.setLineDash(renderOptions.lineDash);\n context.lineDashOffset = renderOptions.lineDashOffset;\n }\n context.lineJoin = renderOptions.lineJoin;\n context.miterLimit = renderOptions.miterLimit;\n context.stroke();\n }\n };\n /**\n * @private\n * @param {RenderOptions} renderOptions Render options.\n */\n RegularShape.prototype.createHitDetectionCanvas_ = function (renderOptions) {\n if (this.fill_) {\n var color = this.fill_.getColor();\n // determine if fill is transparent (or pattern or gradient)\n var opacity = 0;\n if (typeof color === 'string') {\n color = asArray(color);\n }\n if (color === null) {\n opacity = 1;\n }\n else if (Array.isArray(color)) {\n opacity = color.length === 4 ? color[3] : 1;\n }\n if (opacity === 0) {\n // if a transparent fill style is set, create an extra hit-detection image\n // with a default fill style\n var context = createCanvasContext2D(renderOptions.size, renderOptions.size);\n this.hitDetectionCanvas_ = context.canvas;\n this.drawHitDetectionCanvas_(renderOptions, context);\n }\n }\n if (!this.hitDetectionCanvas_) {\n this.hitDetectionCanvas_ = this.getImage(1);\n }\n };\n /**\n * @private\n * @param {CanvasRenderingContext2D} context The context to draw in.\n */\n RegularShape.prototype.createPath_ = function (context) {\n var points = this.points_;\n var radius = this.radius_;\n if (points === Infinity) {\n context.arc(0, 0, radius, 0, 2 * Math.PI);\n }\n else {\n var radius2 = this.radius2_ === undefined ? radius : this.radius2_;\n if (this.radius2_ !== undefined) {\n points *= 2;\n }\n var startAngle = this.angle_ - Math.PI / 2;\n var step = (2 * Math.PI) / points;\n for (var i = 0; i < points; i++) {\n var angle0 = startAngle + i * step;\n var radiusC = i % 2 === 0 ? radius : radius2;\n context.lineTo(radiusC * Math.cos(angle0), radiusC * Math.sin(angle0));\n }\n context.closePath();\n }\n };\n /**\n * @private\n * @param {RenderOptions} renderOptions Render options.\n * @param {CanvasRenderingContext2D} context The context.\n */\n RegularShape.prototype.drawHitDetectionCanvas_ = function (renderOptions, context) {\n // set origin to canvas center\n context.translate(renderOptions.size / 2, renderOptions.size / 2);\n this.createPath_(context);\n context.fillStyle = defaultFillStyle;\n context.fill();\n if (this.stroke_) {\n context.strokeStyle = renderOptions.strokeStyle;\n context.lineWidth = renderOptions.strokeWidth;\n if (renderOptions.lineDash) {\n context.setLineDash(renderOptions.lineDash);\n context.lineDashOffset = renderOptions.lineDashOffset;\n }\n context.lineJoin = renderOptions.lineJoin;\n context.miterLimit = renderOptions.miterLimit;\n context.stroke();\n }\n };\n return RegularShape;\n}(ImageStyle));\nexport default RegularShape;\n//# sourceMappingURL=RegularShape.js.map","/**\n * @module ol/style/Circle\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport RegularShape from './RegularShape.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circle radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {Array} [displacement=[0,0]] displacement\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale. A two dimensional scale will produce an ellipse.\n * Unless two dimensional scaling is required a better result may be obtained with an appropriate setting for `radius`.\n * @property {number} [rotation=0] Rotation in radians\n * (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view\n * (meaningful only when used in conjunction with a two dimensional scale).\n * @property {\"declutter\"|\"obstacle\"|\"none\"|undefined} [declutterMode] Declutter mode\n */\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nvar CircleStyle = /** @class */ (function (_super) {\n __extends(CircleStyle, _super);\n /**\n * @param {Options} [opt_options] Options.\n */\n function CircleStyle(opt_options) {\n var options = opt_options ? opt_options : {};\n return _super.call(this, {\n points: Infinity,\n fill: options.fill,\n radius: options.radius,\n stroke: options.stroke,\n scale: options.scale !== undefined ? options.scale : 1,\n rotation: options.rotation !== undefined ? options.rotation : 0,\n rotateWithView: options.rotateWithView !== undefined ? options.rotateWithView : false,\n displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n declutterMode: options.declutterMode,\n }) || this;\n }\n /**\n * Clones the style.\n * @return {CircleStyle} The cloned style.\n * @api\n */\n CircleStyle.prototype.clone = function () {\n var scale = this.getScale();\n var style = new CircleStyle({\n fill: this.getFill() ? this.getFill().clone() : undefined,\n stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n radius: this.getRadius(),\n scale: Array.isArray(scale) ? scale.slice() : scale,\n rotation: this.getRotation(),\n rotateWithView: this.getRotateWithView(),\n displacement: this.getDisplacement().slice(),\n declutterMode: this.getDeclutterMode(),\n });\n style.setOpacity(this.getOpacity());\n return style;\n };\n /**\n * Set the circle radius.\n *\n * @param {number} radius Circle radius.\n * @api\n */\n CircleStyle.prototype.setRadius = function (radius) {\n this.radius_ = radius;\n this.render();\n };\n return CircleStyle;\n}(RegularShape));\nexport default CircleStyle;\n//# sourceMappingURL=Circle.js.map","/**\n * @module ol/style/Fill\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null} [color=null] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n */\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nvar Fill = /** @class */ (function () {\n /**\n * @param {Options} [opt_options] Options.\n */\n function Fill(opt_options) {\n var options = opt_options || {};\n /**\n * @private\n * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null}\n */\n this.color_ = options.color !== undefined ? options.color : null;\n }\n /**\n * Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}.\n * @return {Fill} The cloned style.\n * @api\n */\n Fill.prototype.clone = function () {\n var color = this.getColor();\n return new Fill({\n color: Array.isArray(color) ? color.slice() : color || undefined,\n });\n };\n /**\n * Get the fill color.\n * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null} Color.\n * @api\n */\n Fill.prototype.getColor = function () {\n return this.color_;\n };\n /**\n * Set the color.\n *\n * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike|null} color Color.\n * @api\n */\n Fill.prototype.setColor = function (color) {\n this.color_ = color;\n };\n return Fill;\n}());\nexport default Fill;\n//# sourceMappingURL=Fill.js.map","/**\n * @module ol/style/Stroke\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {CanvasLineCap} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array} [lineDash] Line dash pattern. Default is `null` (no dash).\n * Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on\n * the `CanvasRenderingContext2D` and therefore this option will have no visual effect in these browsers.\n * @property {number} [lineDashOffset=0] Line dash offset.\n * @property {number} [miterLimit=10] Miter limit.\n * @property {number} [width] Width.\n */\n/**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */\nvar Stroke = /** @class */ (function () {\n /**\n * @param {Options} [opt_options] Options.\n */\n function Stroke(opt_options) {\n var options = opt_options || {};\n /**\n * @private\n * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n */\n this.color_ = options.color !== undefined ? options.color : null;\n /**\n * @private\n * @type {CanvasLineCap|undefined}\n */\n this.lineCap_ = options.lineCap;\n /**\n * @private\n * @type {Array}\n */\n this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n /**\n * @private\n * @type {number|undefined}\n */\n this.lineDashOffset_ = options.lineDashOffset;\n /**\n * @private\n * @type {CanvasLineJoin|undefined}\n */\n this.lineJoin_ = options.lineJoin;\n /**\n * @private\n * @type {number|undefined}\n */\n this.miterLimit_ = options.miterLimit;\n /**\n * @private\n * @type {number|undefined}\n */\n this.width_ = options.width;\n }\n /**\n * Clones the style.\n * @return {Stroke} The cloned style.\n * @api\n */\n Stroke.prototype.clone = function () {\n var color = this.getColor();\n return new Stroke({\n color: Array.isArray(color) ? color.slice() : color || undefined,\n lineCap: this.getLineCap(),\n lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,\n lineDashOffset: this.getLineDashOffset(),\n lineJoin: this.getLineJoin(),\n miterLimit: this.getMiterLimit(),\n width: this.getWidth(),\n });\n };\n /**\n * Get the stroke color.\n * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n * @api\n */\n Stroke.prototype.getColor = function () {\n return this.color_;\n };\n /**\n * Get the line cap type for the stroke.\n * @return {CanvasLineCap|undefined} Line cap.\n * @api\n */\n Stroke.prototype.getLineCap = function () {\n return this.lineCap_;\n };\n /**\n * Get the line dash style for the stroke.\n * @return {Array} Line dash.\n * @api\n */\n Stroke.prototype.getLineDash = function () {\n return this.lineDash_;\n };\n /**\n * Get the line dash offset for the stroke.\n * @return {number|undefined} Line dash offset.\n * @api\n */\n Stroke.prototype.getLineDashOffset = function () {\n return this.lineDashOffset_;\n };\n /**\n * Get the line join type for the stroke.\n * @return {CanvasLineJoin|undefined} Line join.\n * @api\n */\n Stroke.prototype.getLineJoin = function () {\n return this.lineJoin_;\n };\n /**\n * Get the miter limit for the stroke.\n * @return {number|undefined} Miter limit.\n * @api\n */\n Stroke.prototype.getMiterLimit = function () {\n return this.miterLimit_;\n };\n /**\n * Get the stroke width.\n * @return {number|undefined} Width.\n * @api\n */\n Stroke.prototype.getWidth = function () {\n return this.width_;\n };\n /**\n * Set the color.\n *\n * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n * @api\n */\n Stroke.prototype.setColor = function (color) {\n this.color_ = color;\n };\n /**\n * Set the line cap.\n *\n * @param {CanvasLineCap|undefined} lineCap Line cap.\n * @api\n */\n Stroke.prototype.setLineCap = function (lineCap) {\n this.lineCap_ = lineCap;\n };\n /**\n * Set the line dash.\n *\n * Please note that Internet Explorer 10 and lower [do not support][mdn] the\n * `setLineDash` method on the `CanvasRenderingContext2D` and therefore this\n * property will have no visual effect in these browsers.\n *\n * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility\n *\n * @param {Array} lineDash Line dash.\n * @api\n */\n Stroke.prototype.setLineDash = function (lineDash) {\n this.lineDash_ = lineDash;\n };\n /**\n * Set the line dash offset.\n *\n * @param {number|undefined} lineDashOffset Line dash offset.\n * @api\n */\n Stroke.prototype.setLineDashOffset = function (lineDashOffset) {\n this.lineDashOffset_ = lineDashOffset;\n };\n /**\n * Set the line join.\n *\n * @param {CanvasLineJoin|undefined} lineJoin Line join.\n * @api\n */\n Stroke.prototype.setLineJoin = function (lineJoin) {\n this.lineJoin_ = lineJoin;\n };\n /**\n * Set the miter limit.\n *\n * @param {number|undefined} miterLimit Miter limit.\n * @api\n */\n Stroke.prototype.setMiterLimit = function (miterLimit) {\n this.miterLimit_ = miterLimit;\n };\n /**\n * Set the width.\n *\n * @param {number|undefined} width Width.\n * @api\n */\n Stroke.prototype.setWidth = function (width) {\n this.width_ = width;\n };\n return Stroke;\n}());\nexport default Stroke;\n//# sourceMappingURL=Stroke.js.map","/**\n * @module ol/style/Style\n */\nimport CircleStyle from './Circle.js';\nimport Fill from './Fill.js';\nimport Stroke from './Stroke.js';\nimport { assert } from '../asserts.js';\n/**\n * A function that takes an {@link module:ol/Feature~Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style~Style} or an array of them. This way e.g. a\n * vector layer can be styled. If the function returns `undefined`, the\n * feature will not be rendered.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array